From ebbbf48abdb12b7fd8d04628b1e7f4e96459ab04 Mon Sep 17 00:00:00 2001 From: mattf Date: Tue, 10 Apr 2007 19:41:19 +0000 Subject: [PATCH] updated LANG_www code and other small fixes relating to that git-svn-id: svn://192.168.202.10@585 3d104415-ff17-0410-8863-d5cf3c621b8a --- .../trunk/LANG_www/agc/conf_exten_check.php | 25 +- agc_2-X/trunk/LANG_www/agc/dbconnect.php | 5 +- agc_2-X/trunk/LANG_www/agc/images/Thumbs.db | Bin 149504 -> 151552 bytes .../agc/images/agc_tab_active_lines_el.gif | Bin 0 -> 984 bytes .../agc/images/agc_tab_conferences_el.gif | Bin 0 -> 861 bytes .../LANG_www/agc/images/agc_tab_main_el.gif | Bin 0 -> 722 bytes .../LANG_www/agc/images/vdc_volume_MUTE.gif | Bin 0 -> 601 bytes .../LANG_www/agc/images/vdc_volume_UNMUTE.gif | Bin 0 -> 624 bytes agc_2-X/trunk/LANG_www/agc/manager_send.php | 101 +- agc_2-X/trunk/LANG_www/agc/vdc_db_query.php | 681 +- agc_2-X/trunk/LANG_www/agc/vicidial.php | 910 +- .../LANG_www/agc_br/conf_exten_check.php | 25 +- .../trunk/LANG_www/agc_br/manager_send.php | 101 +- .../trunk/LANG_www/agc_br/vdc_db_query.php | 681 +- agc_2-X/trunk/LANG_www/agc_br/vicidial.php | 910 +- .../LANG_www/agc_de/conf_exten_check.php | 25 +- .../trunk/LANG_www/agc_de/manager_send.php | 101 +- .../trunk/LANG_www/agc_de/vdc_db_query.php | 681 +- agc_2-X/trunk/LANG_www/agc_de/vicidial.php | 910 +- .../LANG_www/agc_el/conf_exten_check.php | 25 +- .../trunk/LANG_www/agc_el/manager_send.php | 101 +- .../trunk/LANG_www/agc_el/vdc_db_query.php | 681 +- agc_2-X/trunk/LANG_www/agc_el/vicidial.php | 910 +- .../LANG_www/agc_en/conf_exten_check.php | 25 +- .../trunk/LANG_www/agc_en/manager_send.php | 101 +- .../trunk/LANG_www/agc_en/vdc_db_query.php | 681 +- agc_2-X/trunk/LANG_www/agc_en/vicidial.php | 910 +- .../LANG_www/agc_es/conf_exten_check.php | 25 +- .../trunk/LANG_www/agc_es/manager_send.php | 101 +- .../trunk/LANG_www/agc_es/vdc_db_query.php | 681 +- agc_2-X/trunk/LANG_www/agc_es/vicidial.php | 910 +- .../LANG_www/agc_fr/conf_exten_check.php | 25 +- .../trunk/LANG_www/agc_fr/manager_send.php | 101 +- .../trunk/LANG_www/agc_fr/vdc_db_query.php | 681 +- agc_2-X/trunk/LANG_www/agc_fr/vicidial.php | 910 +- .../LANG_www/agc_it/conf_exten_check.php | 25 +- .../trunk/LANG_www/agc_it/manager_send.php | 101 +- .../trunk/LANG_www/agc_it/vdc_db_query.php | 681 +- agc_2-X/trunk/LANG_www/agc_it/vicidial.php | 910 +- .../LANG_www/agc_pl/conf_exten_check.php | 25 +- .../trunk/LANG_www/agc_pl/manager_send.php | 101 +- .../trunk/LANG_www/agc_pl/vdc_db_query.php | 681 +- agc_2-X/trunk/LANG_www/agc_pl/vicidial.php | 910 +- .../LANG_www/agc_pt/conf_exten_check.php | 25 +- .../trunk/LANG_www/agc_pt/manager_send.php | 101 +- .../trunk/LANG_www/agc_pt/vdc_db_query.php | 681 +- agc_2-X/trunk/LANG_www/agc_pt/vicidial.php | 910 +- .../LANG_www/vicidial/AST_CLOSERstats.php | 4 +- .../trunk/LANG_www/vicidial/AST_VDADstats.php | 92 +- .../vicidial/AST_VICIDIAL_hopperlist.php | 18 +- .../vicidial/AST_admin_log_display.php | 2 +- .../vicidial/AST_agent_disposition.php | 237 + .../vicidial/AST_agent_performance.php | 45 +- .../vicidial/AST_agent_performance_detail.php | 95 +- .../vicidial/AST_agent_time_sheet.php | 8 +- .../vicidial/AST_agent_time_sheet_archive.php | 8 +- .../LANG_www/vicidial/AST_inboundEXTstats.php | 400 + .../AST_inboundEXTstats_department.php | 178 + .../trunk/LANG_www/vicidial/AST_parkstats.php | 4 +- .../vicidial/AST_server_performance.php | 4 +- .../LANG_www/vicidial/AST_timeonVDAD.php | 4 +- .../LANG_www/vicidial/AST_timeonVDADall.php | 126 +- .../vicidial/AST_timeonVDADallREC.php | 943 + .../vicidial/AST_timeonVDADallSUMMARY.php | 19 +- .../LANG_www/vicidial/AST_timeonpark.php | 30 +- agc_2-X/trunk/LANG_www/vicidial/admin-old.php | 2289 -- agc_2-X/trunk/LANG_www/vicidial/admin.php | 19758 ++++++++------- .../LANG_www/vicidial/admin_modify_lead.php | 20 +- .../LANG_www/vicidial/admin_search_lead.php | 2 +- .../vicidial/closer-fronter_popup.php | 20 +- .../vicidial/closer-fronter_popup2.php | 20 +- agc_2-X/trunk/LANG_www/vicidial/closer.php | 22 +- .../trunk/LANG_www/vicidial/closer_popup.php | 20 +- agc_2-X/trunk/LANG_www/vicidial/dbconnect.php | 1 + .../LANG_www/vicidial/group_hourly_stats.php | 2 +- .../trunk/LANG_www/vicidial/listloader.php | 8 +- agc_2-X/trunk/LANG_www/vicidial/listloader.pl | 4 +- .../LANG_www/vicidial/listloader_super.pl | 4 +- .../vicidial/new_listloader_superL.php | 2 +- .../trunk/LANG_www/vicidial/phone_stats.php | 2 +- .../LANG_www/vicidial/record_conf_1_hour.php | 2 +- .../trunk/LANG_www/vicidial/user_stats.php | 23 +- .../trunk/LANG_www/vicidial/user_status.php | 10 +- agc_2-X/trunk/LANG_www/vicidial/voice_lab.php | 105 +- agc_2-X/trunk/LANG_www/vicidial/welcome.php | 25 + .../LANG_www/vicidial_de/AST_CLOSERstats.php | 4 +- .../LANG_www/vicidial_de/AST_VDADstats.php | 92 +- .../vicidial_de/AST_VICIDIAL_hopperlist.php | 18 +- .../vicidial_de/AST_admin_log_display.php | 2 +- .../vicidial_de/AST_agent_time_sheet.php | 8 +- .../vicidial_de/AST_inboundEXTstats.php | 400 + .../vicidial_de/AST_server_performance.php | 4 +- .../LANG_www/vicidial_de/AST_timeonVDAD.php | 4 +- .../vicidial_de/AST_timeonVDADall.php | 124 +- .../vicidial_de/AST_timeonVDADallSUMMARY.php | 17 +- .../LANG_www/vicidial_de/AST_timeonpark.php | 28 +- agc_2-X/trunk/LANG_www/vicidial_de/admin.php | 19758 ++++++++------- .../vicidial_de/admin_modify_lead.php | 19 +- .../vicidial_de/admin_search_lead.php | 2 +- .../trunk/LANG_www/vicidial_de/dbconnect.php | 1 + .../vicidial_de/group_hourly_stats.php | 2 +- .../trunk/LANG_www/vicidial_de/listloader.php | 4 +- .../vicidial_de/new_listloader_superL.php | 4 +- .../trunk/LANG_www/vicidial_de/user_stats.php | 23 +- .../LANG_www/vicidial_de/user_status.php | 10 +- .../trunk/LANG_www/vicidial_de/welcome.php | 25 + .../LANG_www/vicidial_el/AST_CLOSERstats.php | 4 +- .../LANG_www/vicidial_el/AST_VDADstats.php | 92 +- .../vicidial_el/AST_VICIDIAL_hopperlist.php | 18 +- .../vicidial_el/AST_admin_log_display.php | 2 +- .../vicidial_el/AST_agent_time_sheet.php | 8 +- .../vicidial_el/AST_inboundEXTstats.php | 400 + .../vicidial_el/AST_server_performance.php | 4 +- .../LANG_www/vicidial_el/AST_timeonVDAD.php | 4 +- .../vicidial_el/AST_timeonVDADall.php | 124 +- .../vicidial_el/AST_timeonVDADallSUMMARY.php | 17 +- .../LANG_www/vicidial_el/AST_timeonpark.php | 28 +- agc_2-X/trunk/LANG_www/vicidial_el/admin.php | 19786 +++++++++------- .../vicidial_el/admin_modify_lead.php | 19 +- .../vicidial_el/admin_search_lead.php | 2 +- .../trunk/LANG_www/vicidial_el/dbconnect.php | 1 + .../vicidial_el/group_hourly_stats.php | 2 +- .../trunk/LANG_www/vicidial_el/listloader.php | 4 +- .../vicidial_el/new_listloader_superL.php | 4 +- .../trunk/LANG_www/vicidial_el/user_stats.php | 23 +- .../LANG_www/vicidial_el/user_status.php | 10 +- .../trunk/LANG_www/vicidial_el/welcome.php | 25 + .../LANG_www/vicidial_en/AST_CLOSERstats.php | 4 +- .../LANG_www/vicidial_en/AST_VDADstats.php | 92 +- .../vicidial_en/AST_VICIDIAL_hopperlist.php | 18 +- .../vicidial_en/AST_admin_log_display.php | 2 +- .../vicidial_en/AST_agent_disposition.php | 237 + .../vicidial_en/AST_agent_performance.php | 45 +- .../AST_agent_performance_detail.php | 95 +- .../vicidial_en/AST_agent_time_sheet.php | 8 +- .../AST_agent_time_sheet_archive.php | 286 + .../vicidial_en/AST_inboundEXTstats.php | 400 + .../AST_inboundEXTstats_department.php | 178 + .../vicidial_en/AST_server_performance.php | 4 +- .../LANG_www/vicidial_en/AST_timeonVDAD.php | 4 +- .../vicidial_en/AST_timeonVDADall.php | 126 +- .../vicidial_en/AST_timeonVDADallREC.php | 943 + .../vicidial_en/AST_timeonVDADallSUMMARY.php | 19 +- .../LANG_www/vicidial_en/AST_timeonpark.php | 28 +- agc_2-X/trunk/LANG_www/vicidial_en/admin.php | 19758 ++++++++------- .../vicidial_en/admin_modify_lead.php | 20 +- .../vicidial_en/admin_search_lead.php | 2 +- .../trunk/LANG_www/vicidial_en/dbconnect.php | 1 + .../vicidial_en/group_hourly_stats.php | 2 +- .../trunk/LANG_www/vicidial_en/listloader.php | 10 +- .../trunk/LANG_www/vicidial_en/listloader.pl | 4 +- .../LANG_www/vicidial_en/listloaderMAIN.php | 17 +- .../LANG_www/vicidial_en/listloader_super.pl | 4 +- .../vicidial_en/new_listloader_superL.php | 4 +- .../trunk/LANG_www/vicidial_en/user_stats.php | 23 +- .../LANG_www/vicidial_en/user_status.php | 10 +- .../trunk/LANG_www/vicidial_en/voice_lab.php | 312 + .../trunk/LANG_www/vicidial_en/welcome.php | 25 + .../LANG_www/vicidial_es/AST_CLOSERstats.php | 4 +- .../LANG_www/vicidial_es/AST_VDADstats.php | 92 +- .../vicidial_es/AST_VICIDIAL_hopperlist.php | 18 +- .../vicidial_es/AST_admin_log_display.php | 2 +- .../vicidial_es/AST_agent_time_sheet.php | 8 +- .../vicidial_es/AST_inboundEXTstats.php | 400 + .../vicidial_es/AST_server_performance.php | 4 +- .../LANG_www/vicidial_es/AST_timeonVDAD.php | 4 +- .../vicidial_es/AST_timeonVDADall.php | 124 +- .../vicidial_es/AST_timeonVDADallSUMMARY.php | 17 +- .../LANG_www/vicidial_es/AST_timeonpark.php | 28 +- agc_2-X/trunk/LANG_www/vicidial_es/admin.php | 19758 ++++++++------- .../vicidial_es/admin_modify_lead.php | 19 +- .../vicidial_es/admin_search_lead.php | 2 +- .../trunk/LANG_www/vicidial_es/dbconnect.php | 1 + .../vicidial_es/group_hourly_stats.php | 2 +- .../trunk/LANG_www/vicidial_es/listloader.php | 4 +- .../vicidial_es/new_listloader_superL.php | 4 +- .../trunk/LANG_www/vicidial_es/user_stats.php | 23 +- .../LANG_www/vicidial_es/user_status.php | 10 +- .../trunk/LANG_www/vicidial_es/welcome.php | 25 + .../trunk/bin/build_translation_www_files.pl | 1 + agc_2-X/trunk/translations/br_language.txt | 7 + agc_2-X/trunk/translations/de_language.txt | 36 +- agc_2-X/trunk/translations/el_language.txt | 7 + agc_2-X/trunk/translations/es_language.txt | 7 + agc_2-X/trunk/translations/fr_language.txt | 7 + agc_2-X/trunk/translations/it_language.txt | 7 + agc_2-X/trunk/translations/pl_language.txt | 7 + agc_2-X/trunk/translations/pt_language.txt | 7 + agc_2-X/trunk/www/vicidial/welcome.php | 25 + 189 files changed, 75620 insertions(+), 50578 deletions(-) create mode 100644 agc_2-X/trunk/LANG_www/agc/images/agc_tab_active_lines_el.gif create mode 100644 agc_2-X/trunk/LANG_www/agc/images/agc_tab_conferences_el.gif create mode 100644 agc_2-X/trunk/LANG_www/agc/images/agc_tab_main_el.gif create mode 100644 agc_2-X/trunk/LANG_www/agc/images/vdc_volume_MUTE.gif create mode 100644 agc_2-X/trunk/LANG_www/agc/images/vdc_volume_UNMUTE.gif create mode 100644 agc_2-X/trunk/LANG_www/vicidial/AST_agent_disposition.php create mode 100644 agc_2-X/trunk/LANG_www/vicidial/AST_inboundEXTstats.php create mode 100644 agc_2-X/trunk/LANG_www/vicidial/AST_inboundEXTstats_department.php create mode 100644 agc_2-X/trunk/LANG_www/vicidial/AST_timeonVDADallREC.php delete mode 100644 agc_2-X/trunk/LANG_www/vicidial/admin-old.php create mode 100644 agc_2-X/trunk/LANG_www/vicidial/welcome.php create mode 100644 agc_2-X/trunk/LANG_www/vicidial_de/AST_inboundEXTstats.php create mode 100644 agc_2-X/trunk/LANG_www/vicidial_de/welcome.php create mode 100644 agc_2-X/trunk/LANG_www/vicidial_el/AST_inboundEXTstats.php create mode 100644 agc_2-X/trunk/LANG_www/vicidial_el/welcome.php create mode 100644 agc_2-X/trunk/LANG_www/vicidial_en/AST_agent_disposition.php create mode 100644 agc_2-X/trunk/LANG_www/vicidial_en/AST_agent_time_sheet_archive.php create mode 100644 agc_2-X/trunk/LANG_www/vicidial_en/AST_inboundEXTstats.php create mode 100644 agc_2-X/trunk/LANG_www/vicidial_en/AST_inboundEXTstats_department.php create mode 100644 agc_2-X/trunk/LANG_www/vicidial_en/AST_timeonVDADallREC.php create mode 100644 agc_2-X/trunk/LANG_www/vicidial_en/voice_lab.php create mode 100644 agc_2-X/trunk/LANG_www/vicidial_en/welcome.php create mode 100644 agc_2-X/trunk/LANG_www/vicidial_es/AST_inboundEXTstats.php create mode 100644 agc_2-X/trunk/LANG_www/vicidial_es/welcome.php create mode 100644 agc_2-X/trunk/www/vicidial/welcome.php diff --git a/agc_2-X/trunk/LANG_www/agc/conf_exten_check.php b/agc_2-X/trunk/LANG_www/agc/conf_exten_check.php index 2852b52e..ea527e43 100644 --- a/agc_2-X/trunk/LANG_www/agc/conf_exten_check.php +++ b/agc_2-X/trunk/LANG_www/agc/conf_exten_check.php @@ -33,6 +33,7 @@ # 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 # 61128-2255 - Added update for manual dial vicidial_live_agents +# 70319-1542 - Added agent disabled display function # require("dbconnect.php"); @@ -69,8 +70,8 @@ if (!isset($format)) {$format="text";} if (!isset($ACTION)) {$ACTION="refresh";} if (!isset($client)) {$client="agc";} -$version = '0.0.10'; -$build = '61128-2255'; +$version = '0.0.11'; +$build = '70319-1542'; $StarTtime = date("U"); $NOW_DATE = date("Y-m-d"); $NOW_TIME = date("Y-m-d H:i:s"); @@ -144,6 +145,23 @@ echo " if ($client == 'vdc') { + $Acount=0; + $AexternalDEAD=0; + + ### see if the agent has a record in the vicidial_live_agents table + $stmt="SELECT count(*) 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); + $Acount=$row[0]; + + # ### find out if external table shows agent should be disabled + # $stmt="SELECT count(*) from another_table where user='$user' and status='DEAD';"; + # if ($DB) {echo "|$stmt|\n";} + # $rslt=mysql_query($stmt, $link); + # $row=mysql_fetch_row($rslt); + # $AexternalDEAD=$row[0]; + if ($auto_dial_level > 0) { ### update the vicidial_live_agents every second with a new random number so it is shown to be alive @@ -186,6 +204,9 @@ echo " } + if ($Acount < 1) {$Astatus='DEAD_VLA';} + if ($AexternalDEAD > 0) {$Astatus='DEAD_EXTERNAL';} + echo 'DateTime: ' . $NOW_TIME . '|UnixTime: ' . $StarTtime . '|Status: ' . $Astatus . '|CampCalls: ' . $RingCalls . "|\n"; } diff --git a/agc_2-X/trunk/LANG_www/agc/dbconnect.php b/agc_2-X/trunk/LANG_www/agc/dbconnect.php index 7221b35e..91e572a3 100644 --- a/agc_2-X/trunk/LANG_www/agc/dbconnect.php +++ b/agc_2-X/trunk/LANG_www/agc/dbconnect.php @@ -1,6 +1,6 @@ LICENSE: GPLv2 +# Copyright (C) 2007 Matt Florell LICENSE: GPLv2 # if ( file_exists("/etc/astguiclient.conf") ) { @@ -36,7 +36,7 @@ $WeBServeRRooT = '/usr/local/apache2/htdocs'; } $link=mysql_connect("$VARDB_server", "$VARDB_user", "$VARDB_pass"); -mysql_select_db("$VARDB_database"); +mysql_select_db("$VARDB_database",$link); $local_DEF = 'Local/'; $conf_silent_prefix = '7'; @@ -44,5 +44,6 @@ $local_AMP = '@'; $ext_context = 'demo'; $recording_exten = '8309'; $WeBRooTWritablE = '1'; +$non_latin = '0'; # set to 1 for UTF rules ?> diff --git a/agc_2-X/trunk/LANG_www/agc/images/Thumbs.db b/agc_2-X/trunk/LANG_www/agc/images/Thumbs.db index b3c0bfc3f79f77b4dcfac17574fba24bfcac2d58..d6ae4c5916fc536684299cbd2c3e8e9ed5c77783 100644 GIT binary patch delta 12901 zcmeHtcT`hN_ipBpgn*$by$eWDnt*`Pq6ny{D5%&Fc)@~#1yE_4C@OY@2vN_pbZb@2vGCdq1 zh5<;1fH43YfHA-n;K0qGo6u}Qa_8P5thl{&McP!*e7SN`S}1^PCap#D13j2KUCKmd z8A$5@fq)>uUx2mTozhk^>p_YGZ0BB=GL(r0DITzw`&lXk$#ZL|`XgP!bu>@cASs|J zjR^m8w~cq>mQyE5U!`FcbPnh=Sq8Qlgaghq8iCufN@8#wpI}e3z#R7%Es!PzGj(nN zVZz-(HZE&(nBt^l~VO{WgEQE^b4Yi`C;#8-L+CCz{qY>{B* zIAn3vOrQD_Gfg01vnvX&M1j!erZjRCc>>oH$DqU$awI6%hZ;?p$VIAAa(TdP5i{1@ zZC+js9GH?5m{p*>7Z;~`PGjf|FKhxO@Lyj{VvQ)^k9HyooMu!@6>#Q3Ra||y6Uc^( zJl&bPV2cNVX!+d_D`GxdSNu`f0m!-UBDB8ou@1$q`N7*IO$KNdzzMKCeJ zEF7uJqM74C&%&Ju2X`C8tl;y!=TfP&^-2A2NS&borJ{ae%{HZKfx-=+?W{cx1ap7| zz!G2uum*@Mt7flKo(ak!oPY6Yl= z5w`W!gr9-aGpS)5!rh}z=1LU%#)6u}aw2Z=Rv518nQO;S10^mCvqOBa-^^+W~y zFV3jIIcf(jb-g+>2?}-tM0GY=zlxa!%2^5VHxM^KxhWx-8-kckpuCb0F&h>#zk~8a zLNskKD&WUVqoYv;cQ!{6>`C3T3mc42T&XU+->KrxOpbe3(dt%LQ7SzkVAqsM|9IP* z^k$1fjhlkqI=QxzU72$2&;Qv}67k?b;gxpIq-1-6dY#lalau+GuA_yI0~O1p-pq=8 zxzXuZroz35Q!f@bUuk?WVP}7}&XMLZFTU8s-d(udeQZa~n(b$fktGkqCbB24dh}SY z*XO%c=Z!&1f?oF-;iv)czDw*D>HamZ2KihBrz{kip z?@r`A=_c7bzUk@tWGa1HyrSgt-6x($(~fT*p{0A)Ju&g1|R-ArY=VYT3I!{7VDtE28ygOY%Kjnr~Y*Sm_ zmW4#D@?4J>OCPy05*RB=|Lz@Ed2R{+UexF(Cto@KrIDDCX+Mqn@xoY@iq~CopPH#M z3Q5rsZtlfBRUPz<)#=>@uZik8lkWdWO$kl`7vfYD%hSVq;WZ% zXt_#AY*+B20FLpnc!`p02F6Ov*oc^)!x)&6I8jVRSW1M5^Y0nX9%gE~9aA1S1;Efm zk{-@92gO1{Tul#Rcu5p}GL-R`MA=UUDJOukMNF{ap93ghB{S&U-5D_jteAdO(0__a zBUp5s=gJN&0-tTOc)mP6tP{pEiW}p z;H0{o^AEbHm3=+3MR2^$?NyTSm)qOf-PJ!ECQRV@rR|Izq{Q?HRUZ03db7dyNABd8 zhE0{Nt?f^bmacS%O!)B3zzcR47iYq#^MjO4dVTM3D&&T+-*l<;2lt*jy{cu@+HFr$ z-P(`&7H@B8{(Ppn{*lJM2W;-WhO@`*?e8V_Sgb!Wrnj$K&+|!w#oJvatG;bnIrG_s z>+T*q4G)L?@ct1K92#^i+&r$qcinlsO;diSEbhd zp8ROWF@9#@x!f(?Cat^D*cWDP$ZCm+^5H#uXK(TT&c%Smd+I$i{O(P$uPSw59y_7- z{`H3{wsquVpWg;Aj{RDdqd`piQOi9)MrXJ-gsW-x_;~9wN3-T!J;?BXlsx|O(mOAHzkYsk>mBw9{byx!TMw-0^Y4E4{6NOK55>h- zk2j9>UZ=hPa+A>p&s=qGO47qk%VP`~p(A(Bk{^&wcskZsOTYZ(8-TzenwX(zaSV`y`Yr&6*8;j1!er?Um`@lXT z?70>)r`97j_tmS6&x;oFiv-fU%*#AXc3bp2WG(sfMAhn|N65%mjv@+_j-Jmh9&6M-+;S^|)nL^iQh4*RaF7SH*?L#g|O0zYwOryM)H59>4$mRLa`} z`wnj3Yu4jXXI`rE-7V>aN_~4odyyXV)6XB91p8tlI&%zC9Z%Dyc`WcH-YdV}kfyu6 z;MR=_%DBas1a7-37qf3&)AT40{>4kkG`ZI^GN$W+^4$A~%E==B{3C_;)N}W9 zR-$6lhc+8B{XCSTaOJeVPspfT{HoGs%e(bA_nMikjFt;n2pP}*bhdnIc`vmBMm@K` zJcingg_sI!#upGosp?XN>CjU{Q-zTzA($0Chul~egKD_H%Gg9Fof~(322&Oi4XB#=3;yEE}qtKBdYm3A;m1mFWdZa^NTlyGHAFQB;vwndK-d;a9Vd|0&D zd;P(4+SO)`iMnC)*6nPxo6^R>_KFcrv~cgpsUvy^x*luxR#vqXeZ0w*?maV4(0Soa zSZjUsorGieRz=5u?k8(l7TV_7$y3&p>~wUzHqX**qifC}WoPvuWllx^fk8_B8KIim zz?4DCSBF8$;xgOTTh(r|2}>Wd<%?S7R<|s9n(jX04kL6`6J^FEN9KX;^6FBzb1GyK zVg+gk`(tx^t)_GSBQTNugu-vM3&PINH>wUBj-CBM<;Beu=Qw(<1+UdTmTaGyq zqkbIhje4U%U)^k3&~2c=42x7>yD|RQ^o|bRN3D=p!?|V;r8|E{dYwP>qE`6#BE9Lb z_CTp4!ZBkJjBRR}}C%*n<4(l8#;6HE(3vJBv(Y zvdgp2HNC8ko6i55l|I4mI6DvNXH*j9{9d1n1OIp&y>rZJjqyD8rKUlOOG`%7g0nRF z)uDyCr_S6`&?sefV1t&gPuH37uRk}{Bs^L@U{t>@)9+bcXI9^nyAP5lpOAj-$iBF-W9+hb zzVTX1+xljly$|vl%u8N9_;5AkvGd{|sW(jaSarH@)8BUIgR_im9-0AE@NEypNrfsnjLZDL+`Qn(?&i=>5e_4h5?(1$g)Tx;%FKj@bPdy{)Nvu^RbL zSDVG_sFu=_A6YdxytUfiKfiBYj0gK$#MTzR!!qrIP8nXejs;|u?3(suDsQjRf{_=d zOWQCL+Fd_Y#z}VscWYH9?piEOl zpJ=_CFt^XYf4xAhV}xL<8f;=UjYbn?Ax|cjkI$06Ed8cxUw_5h$iCa%=vH*HCe1ST zUCQ$dU%o8(E9F#*k>}V??q)i>KhOKz6L_Rk)ivdG*-xQr_#ma{Q)Y(B`#zZ;w%k** z^tgv;dRJ-~(glnfz6{|n1q&s6yv0!G#h3tTN0PSaKOrB5NO6BtcZO$=$RM8VOTNK9*S`i#Ybv$C{q)3Er2Mgu5UJ#F#*LCFok=n z*>)(!zG&80as!G5m<+(SOSv*F{z{8LTMSqtW;b&;wD@U6f))jc25bau0^oBFabL9< zUU}?Hu$MSZ{66A*Ztm%@?6mD!t85lNEt@Xr{B`7gQE6eF<>-U%W6oaKbcpdnX8d8< zP3bpoxX9ZsZl>0s6#U$0*Vo4_X1q*m35(d4!rh9f9j}hBJpR}9WrLJAy5zaukV<=p z?l8gU65^h@zx7Nb@0x`#m4bJ>et+1nGr(IZeY8K-X2sm7wF|-m#swZ}ZYmFWs3)aj zZXD)(PyW~Cxn=V#ixT%mG`=Cr&S-hfk8eNnHCH*W@#Qf}=trrOS@|;|J1aFjcY34O zD-8Vo!R^TDy>HHT>%D(e`&Q_^dyw+{V&p%J;*t@Zs5T3~waCpJvG zZd_M+S)v8kDw2p$c$1mrwyH}#VbSI8*#}x*+Lc;pF3=1(-Bx^z&{e+{|#$*h#}d39}>_v zFUG{-#Q{*fOk5043{X62cySCAH;DKB9J%Pb7sF{-F*5~<4aH}lVad=)4%CFpZ{nw# zQfY}`d6+9>szuue(%)P&Q$v+Bkg@^k0K5r#1aMBg5lWRg4_YChgqvY%B8Rs@3jjrc z8{AscQKL&ix(g@+TnCf`Dgb=IO~7+5ZBS3{9!PkD^giGLcl_Wejkh2@1=Ina0qOxS z0JYqJK|{G#klq0ho33nc(~x5*>hCj)Jmh0 zd}w$&9a$?K0GAvDBm?l+y+}@`BOi^kpq>L{1I`030B~_7d4Z0+b;?1l0Pq1f05<`+ zxC;K8NhN9IPOAs;Ik`w0X^D2we~_`#$Vs*n*e-xTiY%8#s&ssk0+no#M#g9O9rW}R zh>RbT>Ez@Tg}%udAHDT7L-(o+$O$B{#P8p#5YP%m*w0_yZOKuxS*z+zdI;qHXzTQ1_FyX2^tr zx1>3MVguw%@cPxz4rm`V0oe{YMG?x9#U8L5qRfCgFQz68QImmsE~e~EwK0WGiAz$OFL26h-j*W}|9?isS=4CL@ggj&W(gH*8*0XjEID&8w%&#NEpesz}k@yBE|k# zK%yvQLh}Z8CTW31Y#UB4iUJ3R0=t|{i4rG(9pvRGG=C6n$k=V* zj0g}50r<$~M{aE0P%#G<8>c!0-(M6y6kXCuDRHZa`|NCe>O?}YzdfF!_fF-IC5 zMSRgKtx{mh0Qhwj`RyoL$i(M71Far23y&cd^&^&!A4BS*Wfgh#81yD{TSDrP z+;<9GMGe5?WS}5AiY9|65^6LN%Nsb05~&OX$%p`u3_coqeMp+~kuy~bbK(DThxllY z_C(+&0h|EN02hEO0CySL&xfuONvs>tRsO(}OK+f|*O+A14P;7<#@yo@$ePEwh&ZS? z577}r1FDDnh2)zOV@Y!}g27|uLt{v5FG8K+E-9VkMc6Q>f`%co2gaCm_9R9s>I35; zrg8Fw4j_~no??a+8OAvhs!Y7N!O0D0S<+gLP$oI|kvuu?K2l^%lbB0*BgXVUDE@t9 z%$V`tlqxyakx)#pg1j;Unnx#Nt00h!K+LC;zpGH3oEyjv&~5mD9@Qt@nJysC1%Tf~ zQ!sN5*kF(2gU7jqYN%w>SVEsnZ$z3r{x!s+lj?t?1>}O8NJAc4xE>}3aX%Mae>90Y z>fb3tvPf2-^JJ4yB*B);Kj9qPw?0O%m6zC6HY@LwP(N{ILAOJ{!B_Q>Pd3~Bik$v2 z*izo0an#1D4A&XIb<35n4J10RJRcL{Tidm+fBZ&TS9MJPI&+%`PSwUoN6wE?SD$!z z59Q^79VfQ)kUOy|ubUX{%P)AVsR5?bmw1z4B;MvQYPBz-M0EmiC^!%q`Te_3X{2$#GY5 zD-X_D>9TdHwel9l)E+jt6#9+Hq6eCV9*aIdPxYZSTft|k z)Caak#fo(Y-3k@jpEQr^PTpH)vH5M-#@-^k@mc9V?9(qEq>g?v^5N?W->bJY9PdT7 zXt)I>?`CV2oA=M_-gV|}?zkz%&%^y@*5+7@jz49Q6TisdnvG{U%LdYtYEOECu4|A& zY;S2_K<}DXy(%mDUi03S)vnghi~8v7y29QBi!j>bbfvOXhnYJLT`pbEXs|unCPWEa z1-Cl%Ui)|Z?DQ3ma9n3}>1t8kYsID|5BKKWZqp#0LftEsdg9(Gq<2*W`Ka{I>ejpQ zu{R_B7Mm4k*$)}|0Il8VsOQ-zH7VO&A+)nuRVG|-qsK8xI<}UuTs!xYnBn5-PxQR zX|Z<9^@T@%(C_|QyW!DQy)>1iK6w9mJNfJ&4=K7nA#nUWJ7O zxG%0-wd09lOYU@TDj*%g=$~Z;5jNui`u)B{r>-UhxpJQq1d!#*dM#6iTF1j#R_8wV_K4%#KO$ZnS zP~f&a&O>ybrna0CCCOU2krX^FkAqUTIy9NCE(MQUc>cg&bI<^406KtF|AzF(;IB56 z0N7$A{Eq@C15^O20L%+hg0;9Yv-PQO;KG-KLlKYDfJP$N%r?Te!%2UsF=52xHzGr6 zGE;`o;jublUCraSqbW#PGHH5(tsy?4dRIC=VQl(a#FB?K8BpGs$Fr4amVhZil?-}- zG#R+;k6A^LJof-THktK@eFHYdt(IKEk{rt<6d69lC~L9`CME_B1<3{N$*~p$lMI?j zsEejR{4I&-3b5iaCtaNg27)IJ-1RNsa7jPI69=aHfszCWJP=??6S{;X@I@#Tcp$(5 zG6twh@v;Vn{N5DkDB!CmZ86dL!CQF#Jr-L>F;0>4wm<5;(@Bz#L;1>7-`~dR+_{;_H z?+;iASOi!MSOQoI2mmYt1OkEp!GOO2A%IZ8a=;3}N&t)~c}f@vs{v~O5J!GIjsTYZ zLy;j~MdCiT#y-RS|Jaf+=dtRLuQYknoER&G<9JYrju7NBGeVVYGbKind_=$_iX8GJ zc%F2^Rf^m`j?g4$k0TV7jK$Z%%au)(P)Z0{Awx_iIeNrx#%L&m=80AY3NBEeyOQ-F z1%J@xLb9rn9eq9&9Ho(SM-wx6Q%4gq1kYKKm@UOHm(;M+g0STAM-fM95W6_&#z;ya zrq#6-VPN7Q3lalcz&ILeoxqr|CtnytXo|uF4+NlQh`#d^MI~sH$OIEY7JueAh?EBL znRs!8Kg^QErlt0BO86fm9$VmVn?yqkqSq1!y9VCo!>f01DHx)#-=|9MHU%FpEh z*8JfieK5elm&8`XR(hBfeFBODL~@l#a6kln;<*X_hgV-8OboD{_&OW4DC_?)@PxAA zS#A;&$M?U9^8Q$2D&yaX0nM76HjYqbNCKA>QLsMMW|-jH;I0u-ZQ}@ihUp&^Zayh^ zfT#>J36F!5JY)_5Hg*_gO};RP+y`T6sIS1vn!IWQL+LS-p#Bls*5q#+NQVo-5`SAN zy1&T0#scndi7DLMKuu#`tJoBxE82EFB{l6ZO7UE$2&wkYZo4hd+ZvhUu4N{3C z`OpO1CQ5U-*MKr78yvt5bcuUJl#wHN0P@~Y--;;Qc=C`VLn6FA`Hk98$wYu-!lK8`=NW7ILqJxG zUV2F=ZSt-yBo+JuMMCM4d=JRvcvI&;)Ncp@| delta 11320 zcmeI2cT^O~+wZ5EnPI>o2}%wURgfG7nFbM1P(W8PqhbJ&RYVjJm=TN^p;u~kU0rjI zDC4duqav8IqM#y})}IMbVMsIgsb<*4^WJm+de1%gp7YK*AE@VBPghq}KNY%WB!6f~ zHfe17iQCHIaHPnUI)Dl(E>9CIeMW;a<@JJ;Av1t)X>0%~d!P@{7cc^>0b^!5Wn*ju zDQCbIumc2+vnFzc2yuX(CPaK{&E=PA!06Y2UD7SCi6vRFB4F+NJ~l9Y7rC2(-d&QP{N0~ z$F=2|f^n8<<;C?jgcRuu1!S4Pf1VmMmmkWUpbWS~Vy^OOBesQ*Hw*{`!T>hYNS zVu8R{ossYs^>T-65_s^3!@w2 zqM*m6!Za|rU0$4GnSp>?9Ik(se@21=P;r1cms_ad3dtkM1C|4fuDz;r`rEs5F;OPl zn{{%{{Q~;I0ReHi~%)yuY8FHAj4pv>tGY6~U z4rLiCZnx&C71IJ5As=QLFSS=bxT$K3mswNra7{G@S|E0Jh1L!*j+4g?A3t&p?-ZoY zGp+6sLNYW+V01eRuYr-RYCI#+P!tCayrd5I3#5tzy(tYw;t?*e>T!WqEf{Z97q~Oa zJcbG_LDBB%(gH@DssbJmn?r^DKp~^8`?gvd5TRm~izm2*3G{np3r!*W19`^qDW(Vc zQ^iYzuBa78TUn95(}dh!fDq6Ev;iGJ7hve<{#`vdFFL@CcsqeQ2yg~m09U{bV9KKt z42Z)>Fh&7UKs3pqV-f@;V;(V1#6%afR*a;mQ=@4fBZ*j~B$VLe z&31(@qIjNoynY?sg(rD8zlJP;)a@-?1ukYJtl?8k$I7(H zm?#z`_@crEMnY1h)!?xPU~Cs8u)mt~vRF!vwIVDx=87M9) z#hoa^?>!VKQUYP5L59%Ua!p3IQBqjs$=+Uvf+qzqbkRIk7zBnh5zZD(WBWav7*=>D zYs3>{9iFC7nx73u4j=|36sK6UX$_ANY)?lJW>6<>kmFUghNuF?36$fiT6(ccSP#XU zt@jL2mZ*G~Wr6|42e;Sqiv`EzTE&uEov668OpUwi78!p~B0mefKl7Qk%Q@&XlTj|F z@+hXQe1woJHA3K@hgk-WKB^EeER}Z!Wk+dxS0eqqE8Dz};KiIc-=Et;63@=tp1OTi zM|$-Ua^aG(+Vz1Re-S3|1f#ojt-IhpR5e1N`)k7lUOls4K(@9j+k;sK+1@>~KS1_W zRgJ+k{cz?IdiF;3b950>MjCcXX$rBLFI>y|pDBWRnD^B0wzefAsWu@~%= zoIlK4I$OQk%+){QM)Y$1a+AfHxuOTL_jf2cLZ(q&k^SvUht|Z7W%3odaZSxT6g(w| ztJpEsv|(*rleaiabhYENlCxrIeOw!=71uIh9gelVm7KfU?TU`Aoq9^n%Hi@nB`2_L zNtl9v)Ux54NLT!>c9fDMd$d={(dz}pi4v8ZmvIeYN{(*La?#)O6moGv^WGgD88u2y zm6sxT@2-4>U(rYTn-ej^`q+q=WzWMXO077*aUmsMTPc=mpK177Aq_Nq6lfUv*S68C zUxhsOc$b?K8ucw_Xv(_SlEfDt^1ST*)z7XqG(CR$cFoL$nN`1d&XkPU@$9>~qf5Q_ z`u#7mQsraPQsR?`TsM!HcR%>ZhZ4@U+|cwH;okzPj#S;A-f!*Uai<5)FyHm@sFCxU z51%hI2SggAIP0BB8&_O7`qa4mQ>U`~o~wB+hT3_O!Ow(uo@HbLN#V{u~{Cu0UM z3tslu5J93pFo4q!^vFP&07eiH3=Cy7>S9@SAy|`u$-opQrEZKd@l6G5 zJ&*=029^Nn%=0>%Q)U53T8a>ti|J5Am+V0IxiHa_%@3KjII9-!!n*F1Rmna?tL+mY zKBf;M8hJ6xAfSA~;h$)wp-3B5yuqMr2^0AB%$^9@H&pQks~ltx?wP#^vIVNEeKG2b z!UX<3@`W29|BUK#DXooy_;}etB$CPupf(JxLE9|@_dI|BmIEt*mB1=sH9!{CUl}`l z8{=OfbpY556ai#;-vaDqrrW#d?Sm9qO!or^fwRm`g^hVJq{@KPz!{(fkOF@KH<>zn zLn9fa9sw7DOTcBI9AI=E%y_pTQOmd~^^NNw^#FJXJO=IoRlpNwiqfWUJ*1j|SHNrF zEx){%_{f!wn!V7y8-Yzg0S@A$C^l>^fVm$y02~Ak0f+HHK8i3WQS}&18E_G}1Y8En zfh$-~9S!9Xm(O^DIx^+G0JRops3U((qJ9BWz{MBTQD1&Dq+8T*wK}qw(iVv3VfqlF zr7{~N<6#LT3qMGZAA_z86{!BJS>CTlz74oiw?uB>A~dI^kF0^8i>r;W?18X1Cb$52j+TR zJY*mWW7|I%Ok2PXum>D~{=fjdb08YZx{%fefHVXM1VjK01YzWeM0O;5G?_c|gQjZ{z<0crT2BXVHZn9X4BhfOsf%SaO>p-6_1M^`^+ zK%SmzYJ{V%v4&xo{VI)m?nM zBne1vD#?$Pcts$klBO)=unI+1@*X z$3`O$-fmF$;Ps$tknTSU=4E^)8oBWPg5){;zT3YVYsG+i7u0(=Ci>806CnR3*THT1n{yco0}pfGVUF^Uz;Z(MV{%U;*?5Oj?qn zDM)~?rXgRcBpZ#Qq@yy?DGEzwpl}?XjpRjh(IQ?s6cvv%=Axzi8b~&Aaob#!$!mbL zJ#c=QIyzE{BGDLi!Kfx*RR#MM4sW{|e}XS&*CnkdKu970I|*0%a7_Z+7yS<df7l)(=pv}g}Xr+Df(a}RXsc_@dETlYYSJ%*$K7iaE8nHujP&2Frv z+2>Fmx8xF%prR9Kk(M#sr2sO?#}&g{cbFgyl2GTaHzE_5WmEaM?F7o?$3UDW@p0x! zlqp;Z*GyAQL{iCR#7Fp)FJ&aKAqAb@y&Ic-M>z4^y`` zO1ylk#sg7tssF3mYDfBkbW6^)eG`96mu{O?V!e!6cIS*ZZs3!a*gh^v6TV&_l=JEG zmj0nWKVzrOTTcz&bN}4P?Yx}{f1m#P^{cnIZdg{JlCwKT{-=_YXDpH*%8H{dSn`z| zW{muFX5JY4HC(38N_~! zSlJXIK6_uuxwt^dvANUyNVKK1PRY@#Y5c0lAGce{kreIdnEgx6b0x>3ifMF+o*!?P zn55)X9N4vQvQJ_EvgUzta%aoenrEWkiZhf?@$DeWspJl#`LKmlg||S4thl|v!cH<2 z&=uD6h-OQ)O)?bCzS|E5%O3~;h5&(p2*4dO7!1)QMPG!$zz&(o7f}c|k!X7^qOL;% zeD@-9#q=XI-&8d`eu8Kl0B}}yhmbwLc*L8brM3SO#Tf{$MF*yTDVtxV zKwnBkC1tDh>%MHvia93tsjx8q?cyMl|5OL=-oICz?*1DrPq!0 zvX_;WW$VSaI&5?KUB0nd zO}??Q*OfS(nsJSf3+j%lU$WqyX*g55^{1%p0A_6rPyEzvq>0srAlvJfDanT|uWR`K z6d$VisyM2cSz+Mv#XqZ~>}HF2jb+KI+zVz9CMD-P3+i3;Cv^lp@r+2O9viUi_lg|o(1_cE7lcyzae>fBfA(mwP?{o0X+qaJ@75`Woec;cb=7FMSxEj>IZxo)A} z^97Nkbx%c|Uf>4)T##@{Q|t4~^c`0x8|UpigFi^kg~ zM7L^&Y@6)-OoAdsE!kDgbmx|ipmx`}IikC_DpqB@92pVQzIcUQ34~?;O|LUzL(0`8 z=cwO5h7(Iwx-HJ(!n!zuNMv2y&ZV4%5h{zUf+e3&5RzVei{5b!yP7c`a&3tR z)P{I0mMV3rG3wabhqBW8F+=nn*{Z8`uebXp9q=Of8fMT{Fp*)i*T}YOE)98&BDs5s z_RDLSmD&0AEYU6zP4K4M&-G3BOgs4vGUL{g+^jd#)!gaMPN!N0JtU7V=@>}eldfmiqMbNoGC6blSEl?ZGXeRA z?O&*Wuq6)rCf2oJ7uUwMj(4i6^{ZaX{jAGN=@)XcSz|0)K(sz>qFUV zbPaacc}q2>pj1lCyi#BP-34_FdHnsBSMN#ZLPoA!aLXWQ&rgYyUF>XxQzRev7fkhm z&Ce{K6?5);)*Qa&QJK6nvq3!X@7wcsZVovy?3AE3{p{w63ns)b^xkdu?#*$FMsejG z%Sm!(Y{|y*)FT@He{8(I7NtJ;{8%$9wXr-=^Vnb4Pi!mSRjsSrCO&?xvW~WRklMbe z_I+DMS*cvSuqcYUB`lcx_s5z~Q|kv^zF}%`Bf|s&=quTYjsOqcGgRVeu!$^X#(~fw#2X*2RC$ z>>aprQ^&%_bHm=4r>slwbwXS-bRCB_diq4abt|WNt+?iGbxiyYE!)B=33%eg{Hh7V zx7!$`jwtZ9srK2UzU@r}CpK^D!2=!h#X|XqOKtP>k1r|{PWaDXTDLk*KA$?EW)U;# zPF)9X~%@( z1vip=CAZD;{X=Jur%v^u50zp;R!04K{fPYAA1=4-n6YNhSszz}S!-52sEaAFzCPuy zcEJf@W|ddnof@4nB@et}(#&yw#n$Ry?tk!Z63?mrZE1)!`8wL>H~Va~W{KNFN^rby z-mA(DpLVC$HF67VI^RU3)AJ8#+;S5K`pRGUX6>mmo>3h;tz@~gPR#n>wf+9knfajX z=Zt+-o(GSePD)sm91*$l-N#okmWk3|Ze^IQlkA(bE_=)Hez7wO%PltVtvg<`DE(Mf zcvC6nsebb*gTlZ~D^-!9VusldKWv8Y?eqbc_-9{<|f%@0gQPeGOr68+TW2 z&NH~(NJ#+rk!xNr=O{AUoKSIN2bwsAv!ZH+^U>F{<>Kbr@imu@Y5^=irbW6c?DADMan z_-3wsb#`cMKBtZP+I;%l$;Q6SKJm4k^;!{=27BrU?kx$uQoi_;4}PO-5OBDu=(flE zn@i$KET4YQwy12^PD?sJYKZ;2+vlG&x0u#%NE_R9mARg=Nq_Sl-}h4~*a?*;+BkZb ze7t_;;cw|{grkOAI!uPaW|B3>hM%0gCC`vsQyw1wu=DnXZ|IXr*(dRVs|wSl;{Jo2 z9xFNHBm6#1lt(QXbfbLvsTCGK?Y?EYJHGPZmCU$H;tdb7VjiX){^=whrMM%gyYSH7 zZo(V7khA;xFGgz;ZZ9y-czYr6!3BqOJlrSr!RV%uw{EVYdnF5+S0zf5;sTxo}p|b*-+5^2NJcsNU@FDA;9( zmA(a11_E}$Rh1EK2n#j4F7-T+i035Wi|&+j_hQr+M|x0wv4scKM~$q?us*SpSGR)! zt|ku0h=XbYVl zCwRdg(!5(*4U(9gpp!yL#b>}Sx937_1zF^K{_gylum|p$Pd1TOKjhEnEaCk8gAZBg z`w<_g1iK66%w$h%BH?E=ah#cWzBlD2uqF;<`w36W6&v-V`u@9>VkLVYSo^#8tX*E2 zu#Np;Nq5CF&mjXLdHVLGJkn~|`#EDPU+5MGB9TsIw}S~r@C5t+AcY60b{$;@0o|Uk zaWoQ=t@J?Rttyk10;Y9YtwlK>$?7^9NT}hrZ~`eznZ@*uVa4XOJiA{a?$1Jhn#+;2@RavR^I#a5sDQ z%fapf&G5ug&^LZP?rniLfh6u3U{;X*e>p&LoHrHp-xH9|X8#Y&OkH20s^%#t{6a+W z@m3LZJuJ_v*+fLKx|u-mgXB!Z0Mj56i8`40oNz7;@xuN>;hzGp(-52FXAtbeX1$Dp zC<_7E8?X;s7DU zP@XlO9SkFn{F0`-C~JHm7-GD4w*+&m6P5=+JN1b~!v4R!95}NRMpwA@>2cxz%+utw z;D6@n|Au)Q=lesT{{K1|8?e8~=$^7I@byu!EckbiCs-CNFh2@L9r*_SU$5{em^a8b zvfYxmAh6rAsz4U_W)uudQ4h%qb1UGSj3yEpso>@AWCcbLQB<3gS@3Jwo@+x0WCg48 X$rbik7)A9qp+Oo-WSF#m+;99ZaCg9o diff --git a/agc_2-X/trunk/LANG_www/agc/images/agc_tab_active_lines_el.gif b/agc_2-X/trunk/LANG_www/agc/images/agc_tab_active_lines_el.gif new file mode 100644 index 0000000000000000000000000000000000000000..1bea40dcd0754c269e0f4ad77f133ce23913d9c8 GIT binary patch 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{+ literal 0 HcmV?d00001 diff --git a/agc_2-X/trunk/LANG_www/agc/images/agc_tab_conferences_el.gif b/agc_2-X/trunk/LANG_www/agc/images/agc_tab_conferences_el.gif new file mode 100644 index 0000000000000000000000000000000000000000..91282b42f0a2c1c3e9ac3c46ad19e875232ab130 GIT binary patch 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_Eg3#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?_0FJ_3H?p*}@csSi0s^0yn60g? zb8~a%=H~zZ{{R30A^8LV00000EC2ui05kv(000I5AQEt7X`X1Rk|T#$7Rv>qCkTsY z<2rxmi=0j;94>B10fqr-5E@VjBRAj(Iu*(0a>!l=oe0<~iEJ-u$pC%XL@J$l=aFzu z5)8&9LzoCQRviKcA0HPUga91~00#mWh5?0>0|=8JfpK(C3=a`gM|hj zmWqrA1&|v9G?)ev000I70T%^v6$efX7zF|Y02CQe4GyS@2nCFduYVs7IfNYx9RM6d zznTes4+8@Z$$Sap3eO*mxQrFAvDe0u5(O2xEpM6=1S$-eq%4C13>_N8xH8Ba01e(g zENW!U!MzXp4p^FGQB#vgg$h#OfT4mycNYNGh~nUiA|#6f@D(_aOM`)1aOO;CP+*`) zOae?U6hugZB?N>juspC}gT0s-XL|FHBix*E2_pQ&grQD5hJ-YJu&IcUh7KG)47ixD z8v-!{BFO2$;7OfQ8v|fyqQPAULbN^{z%>a07N{8kTr!;V0YFj-N?Hn#Aj5=HR|E#= zQ02gd0I(_{;2;4`EDl{N7%*XAE*yXj5*+vhg8+mA8v=MJU~IPl-@A<+xxu@4aUnp8 n7Z-4s8I%bH7F<9uV1xDR*t2Wj&fPj11u!fq(9q_Bfe-*YMzrL3 literal 0 HcmV?d00001 diff --git a/agc_2-X/trunk/LANG_www/agc/images/vdc_volume_UNMUTE.gif b/agc_2-X/trunk/LANG_www/agc/images/vdc_volume_UNMUTE.gif new file mode 100644 index 0000000000000000000000000000000000000000..b3937d136bf7655b0b616171e5682094b08bd25e GIT binary patch literal 624 zcmV-$0+0PiNk%w1VKe{_0K@FJ4yiM_qOfq{WmR#xur?)LWf zb8~a8t*!t6{{R30A^8LV00000EC2ui05kv(000I5VDoTfX`X1Rl1A&kPxg4pHYMJc z)OteD8=Z$hs7;DLkJ6`H2A>;Z&~q_B9Dzy!TPRclmqNr*2!I`j1Gb`8JKl~l{E{^X z7KaWZpy^-+3=$In9}pP~5eN+e4j&W&5ey##3WyVx79W})3=Wc-4Rv=14FD5-et;1h zgb;)Z6AcZG9|sqjl$Mna76J?p7PkNx4+?h+8wHXEr+t5ctc8RP6^ot>9e@nE5tknl z9vBQ72^S0nN(2%Y7abIu%&5;2(S{7z0<#Pa7#so=3MzFINZbg_La_r6A}AP80fU1HrUh6@?Epgn1P2V1zyRUP?*$wT zEFkOQ$dLsIh#*+tgZcs@ LICENSE: GPLv2 +# Copyright (C) 2007 Matt Florell 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 @@ -12,7 +12,7 @@ # - $user # - $pass # optional variables: -# - $ACTION - ('Originate','Redirect','Hangup','Command','Monitor','StopMonitor','SysCIDOriginate','RedirectName','RedirectNameVmail','MonitorConf','StopMonitorConf','RedirectXtra','RedirectXtraCX','RedirectVD','HangupConfDial','VolumeControl') +# - $ACTION - ('Originate','Redirect','Hangup','Command','Monitor','StopMonitor','SysCIDOriginate','RedirectName','RedirectNameVmail','MonitorConf','StopMonitorConf','RedirectXtra','RedirectXtraCX','RedirectVD','HangupConfDial','VolumeControl','OriginateVDRelogin') # - $queryCID - ('CN012345678901234567',...) # - $format - ('text','debug') # - $channel - ('Zap/41-1','SIP/test101-1jut','IAX2/iaxy@iaxy',...) @@ -35,7 +35,7 @@ # - $stage - ('UP','DOWN') # -# changes +# CHANGELOG: # 50401-1002 - First build of script, Hangup function only # 50404-1045 - Redirect basic function enabled # 50406-1522 - Monitor basic function enabled @@ -64,6 +64,10 @@ # 61004-1526 - Added parsing of volume control command and lookup or number # 61130-1617 - Added lead_id to MonitorConf for recording_log # 61201-1115 - Added user to MonitorConf for recording_log +# 70111-1600 - added ability to use BLEND/INBND/*_C/*_B/*_I as closer campaigns +# 70226-1251 - Added Mute/UnMute to conference volume control +# 70320-1502 - Added option to allow retry of leave-3way-call and debug logging +# 70322-1636 - Added sipsak display ability # require("dbconnect.php"); @@ -123,6 +127,16 @@ if (isset($_GET["phone_number"])) {$phone_number=$_GET["phone_number"];} elseif (isset($_POST["phone_number"])) {$phone_number=$_POST["phone_number"];} if (isset($_GET["stage"])) {$stage=$_GET["stage"];} elseif (isset($_POST["stage"])) {$stage=$_POST["stage"];} +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["phone_ip"])) {$phone_ip=$_GET["phone_ip"];} + elseif (isset($_POST["phone_ip"])) {$phone_ip=$_POST["phone_ip"];} +if (isset($_GET["enable_sipsak_messages"])) {$enable_sipsak_messages=$_GET["enable_sipsak_messages"];} + elseif (isset($_POST["enable_sipsak_messages"])) {$enable_sipsak_messages=$_POST["enable_sipsak_messages"];} +if (isset($_GET["allow_sipsak_messages"])) {$allow_sipsak_messages=$_GET["allow_sipsak_messages"];} + elseif (isset($_POST["allow_sipsak_messages"])) {$allow_sipsak_messages=$_POST["allow_sipsak_messages"];} $user=ereg_replace("[^0-9a-zA-Z]","",$user); $pass=ereg_replace("[^0-9a-zA-Z]","",$pass); @@ -133,8 +147,8 @@ if (!isset($ACTION)) {$ACTION="Originate";} if (!isset($format)) {$format="alert";} if (!isset($ext_priority)) {$ext_priority="1";} -$version = '2.0.27'; -$build = '61130-1617'; +$version = '2.0.29'; +$build = '70320-1502'; $StarTtime = date("U"); $NOW_DATE = date("Y-m-d"); $NOW_TIME = date("Y-m-d H:i:s"); @@ -279,6 +293,21 @@ if ($ACTION=="OriginateNameVmail") } } +if ($ACTION=="OriginateVDRelogin") +{ + if ( ($enable_sipsak_messages > 0) and ($allow_sipsak_messages > 0) and (eregi("SIP",$protocol)) ) + { + $CIDdate = date("ymdHis"); + $DS='-'; + $SIPSAK_prefix = 'LIN-'; + print "\n"; + passthru("/usr/local/bin/sipsak -M -O desktop -B \"$SIPSAK_prefix$campaign\" -r 5060 -s sip:$extension@$phone_ip > /dev/null"); + $queryCID = "$SIPSAK_prefix$campaign$DS$CIDdate"; + + } + $ACTION="Originate"; +} + if ($ACTION=="Originate") { if ( (strlen($exten)<1) or (strlen($channel)<1) or (strlen($ext_context)<1) or (strlen($queryCID)<10) ) @@ -430,7 +459,7 @@ if ($ACTION=="RedirectVD") else { if (strlen($call_server_ip)>6) {$server_ip = $call_server_ip;} - if (eregi("CLOSER",$campaign)) + if (eregi("(CLOSER|BLEND|INBND|_C$|_B$|_I$)",$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";} @@ -560,6 +589,7 @@ if ($ACTION=="RedirectNameVmail") if ($ACTION=="RedirectXtraCX") { + $DBout=''; $row=''; $rowx=''; $channel_liveX=1; $channel_liveY=1; @@ -575,6 +605,15 @@ if ($ACTION=="RedirectXtraCX") echo "ext_context $ext_context must be set\n"; echo "ext_priority $ext_priority must be set\n"; echo "\nRedirect Action not sent\n"; + if (ereg("SECOND|FIRST|DEBUG",$filename)) + { + if ($WeBRooTWritablE > 0) + { + $fp = fopen ("./vicidial_debug.txt", "a"); + fwrite ($fp, "$NOW_TIME|RDCXC|$filename|$user|$campaign|$$channel|$extrachannel|$queryCID|$exten|$ext_context|ext_priority|\n"); + fclose($fp); + } + } } else { @@ -594,6 +633,7 @@ if ($ACTION=="RedirectXtraCX") { $channel_liveX=0; echo "Channel $channel is not live on $call_server_ip, Redirect command not inserted\n"; + if (ereg("SECOND|FIRST|DEBUG",$filename)) {$DBout .= "$channel is not live on $call_server_ip";} } } $stmt="SELECT count(*) FROM live_channels where server_ip = '$server_ip' and channel='$extrachannel';"; @@ -610,6 +650,7 @@ if ($ACTION=="RedirectXtraCX") { $channel_liveY=0; echo "Channel $channel is not live on $server_ip, Redirect command not inserted\n"; + if (ereg("SECOND|FIRST|DEBUG",$filename)) {$DBout .= "$channel is not live on $server_ip";} } } if ( ($channel_liveX==1) && ($channel_liveY==1) ) @@ -622,6 +663,7 @@ if ($ACTION=="RedirectXtraCX") { $channel_liveY=0; echo "No Local agent to send call to, Redirect command not inserted\n"; + if (ereg("SECOND|FIRST|DEBUG",$filename)) {$DBout .= "No Local agent to send call to";} } else { @@ -654,6 +696,7 @@ if ($ACTION=="RedirectXtraCX") $rslt=mysql_query($stmt, $link); echo "RedirectXtraCX command sent for Channel $channel on $call_server_ip and \nHungup $extrachannel on $server_ip\n"; + if (ereg("SECOND|FIRST|DEBUG",$filename)) {$DBout .= "$channel on $call_server_ip, Hungup $extrachannel on $server_ip";} } } else @@ -662,8 +705,19 @@ if ($ACTION=="RedirectXtraCX") {$ACTION="Redirect"; $server_ip = $call_server_ip;} if ($channel_liveY==1) {$ACTION="Redirect"; $channel=$extrachannel;} - + if (ereg("SECOND|FIRST|DEBUG",$filename)) {$DBout .= "Changed to Redirect: $channel on $server_ip";} } + + if (ereg("SECOND|FIRST|DEBUG",$filename)) + { + if ($WeBRooTWritablE > 0) + { + $fp = fopen ("./vicidial_debug.txt", "a"); + fwrite ($fp, "$NOW_TIME|RDCXC|$filename|$user|$campaign|$DBout|\n"); + fclose($fp); + } + } + } } @@ -688,6 +742,15 @@ if ($ACTION=="RedirectXtra") echo "ext_context $ext_context must be set\n"; echo "ext_priority $ext_priority must be set\n"; echo "\nRedirect Action not sent\n"; + if (ereg("SECOND|FIRST|DEBUG",$filename)) + { + if ($WeBRooTWritablE > 0) + { + $fp = fopen ("./vicidial_debug.txt", "a"); + fwrite ($fp, "$NOW_TIME|RDX|$filename|$user|$campaign|$$channel|$extrachannel|$queryCID|$exten|$ext_context|ext_priority|\n"); + fclose($fp); + } + } } else { @@ -708,6 +771,7 @@ if ($ACTION=="RedirectXtra") { $channel_liveX=0; echo "Cannot find empty conference on $server_ip, Redirect command not inserted\n"; + if (ereg("SECOND|FIRST|DEBUG",$filename)) {$DBout .= "Cannot find empty conference on $server_ip";} } } @@ -717,7 +781,7 @@ if ($ACTION=="RedirectXtra") if ($format=='debug') {echo "\n";} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); - if ($row[0]==0) + if ( ($row[0]==0) && (!ereg("SECOND",$filename)) ) { $stmt="SELECT count(*) FROM live_sip_channels where server_ip = '$call_server_ip' and channel='$channel';"; if ($format=='debug') {echo "\n";} @@ -727,13 +791,14 @@ if ($ACTION=="RedirectXtra") { $channel_liveX=0; echo "Channel $channel is not live on $call_server_ip, Redirect command not inserted\n"; + if (ereg("SECOND|FIRST|DEBUG",$filename)) {$DBout .= "$channel is not live on $call_server_ip";} } } $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) + if ( ($row[0]==0) && (!ereg("SECOND",$filename)) ) { $stmt="SELECT count(*) FROM live_sip_channels where server_ip = '$server_ip' and channel='$extrachannel';"; if ($format=='debug') {echo "\n";} @@ -743,6 +808,7 @@ if ($ACTION=="RedirectXtra") { $channel_liveY=0; echo "Channel $channel is not live on $server_ip, Redirect command not inserted\n"; + if (ereg("SECOND|FIRST|DEBUG",$filename)) {$DBout .= "$channel is not live on $server_ip";} } } if ( ($channel_liveX==1) && ($channel_liveY==1) ) @@ -754,6 +820,7 @@ if ($ACTION=="RedirectXtra") $rslt=mysql_query($stmt, $link); echo "RedirectXtra command sent for Channel $channel and \nExtraChannel $extrachannel\n to $exten on $server_ip\n"; + if (ereg("SECOND|FIRST|DEBUG",$filename)) {$DBout .= "$channel and $extrachannel to $exten on $server_ip";} } else { @@ -778,6 +845,7 @@ if ($ACTION=="RedirectXtra") $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"; + if (ereg("SECOND|FIRST|DEBUG",$filename)) {$DBout .= "$channel/$call_server_ip and $extrachannel/$server_ip to $exten";} } } else @@ -788,6 +856,17 @@ if ($ACTION=="RedirectXtra") {$ACTION="Redirect"; $channel=$extrachannel;} } + + if (ereg("SECOND|FIRST|DEBUG",$filename)) + { + if ($WeBRooTWritablE > 0) + { + $fp = fopen ("./vicidial_debug.txt", "a"); + fwrite ($fp, "$NOW_TIME|RDX|$filename|$user|$campaign|$DBout|\n"); + fclose($fp); + } + } + } } } @@ -1018,8 +1097,10 @@ if ($ACTION=="VolumeControl") else { $participant_number='XXYYXXYYXXYYXX'; + if (eregi('UP',$stage)) {$vol_prefix='4';} if (eregi('DOWN',$stage)) {$vol_prefix='3';} - else {$vol_prefix='4';} + if (eregi('UNMUTE',$stage)) {$vol_prefix='2';} + if (eregi('MUTING',$stage)) {$vol_prefix='1';} $local_DEF = 'Local/'; $local_AMP = '@'; $volume_local_channel = "$local_DEF$participant_number$vol_prefix$exten$local_AMP$ext_context"; diff --git a/agc_2-X/trunk/LANG_www/agc/vdc_db_query.php b/agc_2-X/trunk/LANG_www/agc/vdc_db_query.php index 061ed61c..801dff0d 100644 --- a/agc_2-X/trunk/LANG_www/agc/vdc_db_query.php +++ b/agc_2-X/trunk/LANG_www/agc/vdc_db_query.php @@ -1,7 +1,7 @@ LICENSE: GPLv2 +# Copyright (C) 2007 Matt Florell 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 @@ -13,7 +13,7 @@ # - $pass # optional variables: # - $format - ('text','debug') -# - $ACTION - ('regCLOSER','manDiaLnextCALL','manDiaLskip','manDiaLonly','manDiaLlookCALL','manDiaLlogCALL','userLOGout','updateDISPO','VDADpause','VDADready','VDADcheckINCOMING','UpdatEFavoritEs','CalLBacKLisT','CalLBacKCounT') +# - $ACTION - ('regCLOSER','manDiaLnextCALL','manDiaLskip','manDiaLonly','manDiaLlookCALL','manDiaLlogCALL','userLOGout','updateDISPO','VDADpause','VDADready','VDADcheckINCOMING','UpdatEFavoritEs','CalLBacKLisT','CalLBacKCounT','PauseCodeSubmit') # - $stage - ('start','finish','lookup','new') # - $closer_choice - ('CL_TESTCAMP_L CL_OUT123_L -') # - $conf_exten - ('8600011',...) @@ -70,7 +70,7 @@ # - $omit_phone_code - ('Y','N') # - $no_delete_sessions - ('0','1') -# changes +# CHANGELOG: # 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 @@ -101,7 +101,7 @@ # - 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 +# 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 @@ -110,10 +110,28 @@ # 60821-1647 - Added ability to not delete sessions at logout # 60906-1124 - Added lookup and sending of callback data for CALLBK calls # 61128-2229 - Added vicidial_live_agents and vicidial_auto_calls manual dial entries +# 70111-1600 - Added ability to use BLEND/INBND/*_C/*_B/*_I as closer campaigns +# 70115-1733 - Added alt_dial functionality in auto-dial modes +# 70118-1501 - Added user_group to vicidial_log,_agent_log,_closer_log,_callbacks +# 70123-1357 - Fixed bug that would not update vicidial_closer_log status to dispo +# 70202-1438 - Added pause code submit function +# 70203-0930 - Added dialed_number to lead info output +# 70203-1030 - Added dialed_label to lead info output +# 70206-1126 - Added INBOUND status for inbound/closer calls in vicidial_live_agents +# 70212-1253 - Fixed small issue with CXFER +# 70213-1431 - Added QueueMetrics PAUSE/UNPAUSE/AGENTLOGIN/AGENTLOGOFF actions +# 70214-1231 - Added queuemetrics_log_id field for server_id in queue_log +# 70215-1210 - Added queuemetrics COMPLETEAGENT action +# 70216-1051 - Fixed double call complete queuemetrics logging +# 70222-1616 - Changed queue_log PAUSE/UNPAUSE to PAUSEALL/UNPAUSEALL +# 70309-1034 - Allow amphersands and questions marks in comments to pass through +# 70313-1052 - Allow pound signs(hash) in comments to pass through +# 70319-1544 - Added agent disable update customer data function +# 70322-1545 - Added sipsak display ability # -$version = '2.0.38'; -$build = '61128-2229'; +$version = '2.0.55'; +$build = '70322-1545'; require("dbconnect.php"); @@ -240,6 +258,10 @@ if (isset($_GET["use_internal_dnc"])) {$use_internal_dnc=$_GET["use_internal_d elseif (isset($_POST["use_internal_dnc"])) {$use_internal_dnc=$_POST["use_internal_dnc"];} if (isset($_GET["omit_phone_code"])) {$omit_phone_code=$_GET["omit_phone_code"];} elseif (isset($_POST["omit_phone_code"])) {$omit_phone_code=$_POST["omit_phone_code"];} +if (isset($_GET["phone_ip"])) {$phone_ip=$_GET["phone_ip"];} + elseif (isset($_POST["phone_ip"])) {$phone_ip=$_POST["phone_ip"];} +if (isset($_GET["enable_sipsak_messages"])) {$enable_sipsak_messages=$_GET["enable_sipsak_messages"];} + elseif (isset($_POST["enable_sipsak_messages"])) {$enable_sipsak_messages=$_POST["enable_sipsak_messages"];} $user=ereg_replace("[^0-9a-zA-Z]","",$user); @@ -261,6 +283,7 @@ $CIDdate = date("mdHis"); $ENTRYdate = date("YmdHis"); if (!isset($query_date)) {$query_date = $NOW_DATE;} $MT[0]=''; +$agents='@agents'; $stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;"; if ($DB) {echo "|$stmt|\n";} @@ -375,7 +398,7 @@ if ($ACTION == 'manDiaLnextCaLL') 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) ) + if ( (strlen($callback_id)>0) and (strlen($lead_id)>0) ) { $affected_rows=1; $CBleadIDset=1; @@ -421,7 +444,7 @@ if ($ACTION == 'manDiaLnextCaLL') if ($DB) {echo "$stmt\n";} $rslt=mysql_query($stmt, $link); $affected_rows = mysql_affected_rows($link); - $lead_id = mysql_insert_id(); + $lead_id = mysql_insert_id($link); $CBleadIDset=1; } } @@ -432,7 +455,7 @@ if ($ACTION == 'manDiaLnextCaLL') if ($DB) {echo "$stmt\n";} $rslt=mysql_query($stmt, $link); $affected_rows = mysql_affected_rows($link); - $lead_id = mysql_insert_id(); + $lead_id = mysql_insert_id($link); $CBleadIDset=1; } } @@ -535,7 +558,7 @@ if ($ACTION == 'manDiaLnextCaLL') $rslt=mysql_query($stmt, $link); } - $stmt="UPDATE vicidial_agent_log set lead_id='$lead_id' where agent_log_id='$agent_log_id';"; + $stmt="UPDATE vicidial_agent_log set lead_id='$lead_id',comments='MANUAL' where agent_log_id='$agent_log_id';"; if ($format=='debug') {echo "\n";} $rslt=mysql_query($stmt, $link); @@ -579,7 +602,7 @@ if ($ACTION == 'manDiaLnextCaLL') $rslt=mysql_query($stmt, $link); ### update the agent status to INCALL in vicidial_live_agents - $stmt = "UPDATE vicidial_live_agents set status='INCALL',last_call_time='$NOW_TIME',callerid='$MqueryCID',lead_id='$lead_id' where user='$user' and server_ip='$server_ip';"; + $stmt = "UPDATE vicidial_live_agents set status='INCALL',last_call_time='$NOW_TIME',callerid='$MqueryCID',lead_id='$lead_id',comments='MANUAL' where user='$user' and server_ip='$server_ip';"; if ($DB) {echo "$stmt\n";} $rslt=mysql_query($stmt, $link); } @@ -619,6 +642,8 @@ if ($ACTION == 'manDiaLnextCaLL') $LeaD_InfO .= $CBcallback_time . "\n"; $LeaD_InfO .= $CBuser . "\n"; $LeaD_InfO .= $CBcomments . "\n"; + $LeaD_InfO .= $phone_number . "\n"; + $LeaD_InfO .= "MAIN\n"; echo $LeaD_InfO; @@ -716,7 +741,7 @@ if ($ACTION == 'manDiaLonly') $rslt=mysql_query($stmt, $link); ### update the agent status to INCALL in vicidial_live_agents - $stmt = "UPDATE vicidial_live_agents set status='INCALL',last_call_time='$NOW_TIME',callerid='$MqueryCID',lead_id='$lead_id' where user='$user' and server_ip='$server_ip';"; + $stmt = "UPDATE vicidial_live_agents set status='INCALL',last_call_time='$NOW_TIME',callerid='$MqueryCID',lead_id='$lead_id',comments='MANUAL' where user='$user' and server_ip='$server_ip';"; if ($DB) {echo "$stmt\n";} $rslt=mysql_query($stmt, $link); @@ -795,8 +820,18 @@ if ($stage == "start") } else { + $user_group=''; + $stmt="SELECT user_group FROM vicidial_users where user='$user' LIMIT 1;"; + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $ug_record_ct = mysql_num_rows($rslt); + if ($ug_record_ct > 0) + { + $row=mysql_fetch_row($rslt); + $user_group = trim("$row[0]"); + } ##### 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');"; + $stmt="INSERT INTO vicidial_log (uniqueid,lead_id,list_id,campaign_id,call_date,start_epoch,status,phone_code,phone_number,user,comments,processed,user_group) values('$uniqueid','$lead_id','$list_id','$campaign','$NOW_TIME','$StarTtime','INCALL','$phone_code','$phone_number','$user','MANUAL','N','$user_group');"; if ($DB) {echo "$stmt\n";} $rslt=mysql_query($stmt, $link); $affected_rows = mysql_affected_rows($link); @@ -844,10 +879,10 @@ if ($stage == "end") { if ($start_epoch < 1000) { - if (eregi("CLOSER",$campaign)) + if (eregi("(CLOSER|BLEND|INBND|_C$|_B$|_I$)",$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';"; + $stmt="SELECT start_epoch FROM vicidial_closer_log where phone_number='$phone_number' and lead_id='$lead_id' and user='$user' order by closecallid desc limit 1;"; } else { @@ -870,32 +905,249 @@ if ($stage == "end") } else {$length_in_sec = ($StarTtime - $start_epoch);} - if (eregi("CLOSER",$campaign)) + if (eregi("(CLOSER|BLEND|INBND|_C$|_B$|_I$)",$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); } + + ############################################# + ##### START QUEUEMETRICS LOGGING LOOKUP ##### + $stmt = "SELECT enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_log_id FROM system_settings;"; + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $qm_conf_ct = mysql_num_rows($rslt); + $i=0; + while ($i < $qm_conf_ct) + { + $row=mysql_fetch_row($rslt); + $enable_queuemetrics_logging = $row[0]; + $queuemetrics_server_ip = $row[1]; + $queuemetrics_dbname = $row[2]; + $queuemetrics_login = $row[3]; + $queuemetrics_pass = $row[4]; + $queuemetrics_log_id = $row[5]; + $i++; + } + ##### END QUEUEMETRICS LOGGING LOOKUP ##### + ########################################### + if ($auto_dial_level > 0) { + ### check to see if campaign has alt_dial enabled + $stmt="SELECT auto_alt_dial FROM vicidial_campaigns where campaign_id='$campaign';"; + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $VAC_mancall_ct = mysql_num_rows($rslt); + if ($VAC_mancall_ct > 0) + { + $row=mysql_fetch_row($rslt); + $auto_alt_dial =$row[0]; + } + else {$auto_alt_dial = 'NONE';} + if (eregi("(ALT_ONLY|ADDR3_ONLY|ALT_AND_ADDR3)",$auto_alt_dial)) + { + ### check to see if lead should be alt_dialed + $stmt="SELECT alt_dial FROM vicidial_auto_calls where lead_id='$lead_id';"; + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $VAC_mancall_ct = mysql_num_rows($rslt); + if ($VAC_mancall_ct > 0) + { + $row=mysql_fetch_row($rslt); + $alt_dial =$row[0]; + } + else {$alt_dial = 'NONE';} + + if ( (eregi("(NONE|MAIN)",$alt_dial)) and (eregi("(ALT_ONLY|ALT_AND_ADDR3)",$auto_alt_dial)) ) + { + $stmt="SELECT alt_phone,gmt_offset_now,state FROM vicidial_list where lead_id='$lead_id';"; + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $VAC_mancall_ct = mysql_num_rows($rslt); + if ($VAC_mancall_ct > 0) + { + $row=mysql_fetch_row($rslt); + $alt_phone = $row[0]; + $alt_phone = eregi_replace("[^0-9]","",$alt_phone); + $gmt_offset_now = $row[1]; + $state = $row[2]; + } + else {$alt_phone = '';} + if (strlen($alt_phone)>5) + { + ### insert record into vicidial_hopper for address3 call attempt + $stmt = "INSERT INTO vicidial_hopper SET lead_id='$lead_id',campaign_id='$campaign',status='HOLD',list_id='$list_id',gmt_offset_now='$gmt_offset_now',state='$state',alt_dial='ALT',user='';"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + } + } + if ( ( (eregi("(ALT)",$alt_dial)) and (eregi("ALT_AND_ADDR3",$auto_alt_dial)) ) or ( (eregi("(NONE|MAIN)",$alt_dial)) and (eregi("ADDR3_ONLY",$auto_alt_dial)) ) ) + { + $stmt="SELECT address3,gmt_offset_now,state FROM vicidial_list where lead_id='$lead_id';"; + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $VAC_mancall_ct = mysql_num_rows($rslt); + if ($VAC_mancall_ct > 0) + { + $row=mysql_fetch_row($rslt); + $address3 = $row[0]; + $address3 = eregi_replace("[^0-9]","",$address3); + $gmt_offset_now = $row[1]; + $state = $row[2]; + } + else {$address3 = '';} + if (strlen($address3)>5) + { + ### insert record into vicidial_hopper for address3 call attempt + $stmt = "INSERT INTO vicidial_hopper SET lead_id='$lead_id',campaign_id='$campaign',status='HOLD',list_id='$list_id',gmt_offset_now='$gmt_offset_now',state='$state',alt_dial='ADDR3',user='';"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + } + } + } + + if ($enable_queuemetrics_logging > 0) + { + ### check to see if lead should be alt_dialed + $stmt="SELECT auto_call_id,lead_id,phone_number,status,campaign_id,phone_code,alt_dial,stage,callerid,uniqueid from vicidial_auto_calls where lead_id='$lead_id';"; + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $VAC_qm_ct = mysql_num_rows($rslt); + if ($VAC_qm_ct > 0) + { + $row=mysql_fetch_row($rslt); + $auto_call_id = $row[0]; + $CLlead_id = $row[1]; + $CLphone_number = $row[2]; + $CLstatus = $row[3]; + $CLcampaign_id = $row[4]; + $CLphone_code = $row[5]; + $CLalt_dial = $row[6]; + $CLstage = $row[7]; + $CLcallerid = $row[8]; + $CLuniqueid = $row[9]; + } + + $CLstage = preg_replace("/.*-/",'',$CLstage); + if (strlen($CLstage) < 1) {$CLstage=0;} + + $linkB=mysql_connect("$queuemetrics_server_ip", "$queuemetrics_login", "$queuemetrics_pass"); + mysql_select_db("$queuemetrics_dbname", $linkB); + + $stmt="SELECT count(*) from queue_log where call_id='$MDnextCID' and verb='COMPLETECALLER';"; + $rslt=mysql_query($stmt, $linkB); + if ($DB) {echo "$stmt\n";} + $VAC_cc_ct = mysql_num_rows($rslt); + if ($VAC_cc_ct > 0) + { + $row=mysql_fetch_row($rslt); + $caller_complete = $row[0]; + } + + if ($caller_complete < 1) + { + $stmt = "INSERT INTO queue_log SET partition='P01',time_id='$StarTtime',call_id='$MDnextCID',queue='$campaign',agent='Agent/$user',verb='COMPLETEAGENT',data1='$CLstage',data2='$length_in_sec',data3='1',serverid='$queuemetrics_log_id';"; + if ($DB) {echo "$stmt\n";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $linkB); + $affected_rows = mysql_affected_rows($linkB); + } + mysql_close($linkB); + } + ### delete call record from vicidial_auto_calls - $stmt = "DELETE from vicidial_auto_calls where uniqueid='$uniqueid';"; + $stmt = "DELETE from vicidial_auto_calls where lead_id='$lead_id';"; 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';"; + + $stmt = "UPDATE vicidial_live_agents set status='PAUSED',lead_id='',uniqueid=0,callerid='',channel='',call_server_ip='',last_call_finish='$NOW_TIME',comments='' where user='$user' and server_ip='$server_ip';"; if ($DB) {echo "$stmt\n";} $rslt=mysql_query($stmt, $link); + $affected_rows = mysql_affected_rows($link); + if ($affected_rows > 0) + { + if ($enable_queuemetrics_logging > 0) + { + $linkB=mysql_connect("$queuemetrics_server_ip", "$queuemetrics_login", "$queuemetrics_pass"); + mysql_select_db("$queuemetrics_dbname", $linkB); + + $stmt = "INSERT INTO queue_log SET partition='P01',time_id='$StarTtime',call_id='NONE',queue='NONE',agent='Agent/$user',verb='PAUSEALL',serverid='$queuemetrics_log_id';"; + if ($DB) {echo "$stmt\n";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $linkB); + $affected_rows = mysql_affected_rows($linkB); + + mysql_close($linkB); + } + } } else { + if ($enable_queuemetrics_logging > 0) + { + ### check to see if lead should be alt_dialed + $stmt="SELECT auto_call_id,lead_id,phone_number,status,campaign_id,phone_code,alt_dial,stage,callerid,uniqueid from vicidial_auto_calls where lead_id='$lead_id';"; + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $VAC_qm_ct = mysql_num_rows($rslt); + if ($VAC_qm_ct > 0) + { + $row=mysql_fetch_row($rslt); + $auto_call_id = $row[0]; + $CLlead_id = $row[1]; + $CLphone_number = $row[2]; + $CLstatus = $row[3]; + $CLcampaign_id = $row[4]; + $CLphone_code = $row[5]; + $CLalt_dial = $row[6]; + $CLstage = $row[7]; + $CLcallerid = $row[8]; + $CLuniqueid = $row[9]; + } + + $CLstage = preg_replace("/XFER|-/",'',$CLstage); + if ($CLstage < 0.25) {$CLstage=0;} + + $linkB=mysql_connect("$queuemetrics_server_ip", "$queuemetrics_login", "$queuemetrics_pass"); + mysql_select_db("$queuemetrics_dbname", $linkB); + + $stmt = "INSERT INTO queue_log SET partition='P01',time_id='$StarTtime',call_id='$MDnextCID',queue='$campaign',agent='Agent/$user',verb='COMPLETEAGENT',data1='$CLstage',data2='$length_in_sec',data3='1',serverid='$queuemetrics_log_id';"; + if ($DB) {echo "$stmt\n";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $linkB); + $affected_rows = mysql_affected_rows($linkB); + + mysql_close($linkB); + } + $stmt = "DELETE from vicidial_auto_calls lead_id='$lead_id';"; 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';"; + $stmt = "UPDATE vicidial_live_agents set status='PAUSED',lead_id='',uniqueid=0,callerid='',channel='',call_server_ip='',last_call_finish='$NOW_TIME',comments='' where user='$user' and server_ip='$server_ip';"; if ($DB) {echo "$stmt\n";} $rslt=mysql_query($stmt, $link); + $affected_rows = mysql_affected_rows($link); + if ($affected_rows > 0) + { + if ($enable_queuemetrics_logging > 0) + { + $linkB=mysql_connect("$queuemetrics_server_ip", "$queuemetrics_login", "$queuemetrics_pass"); + mysql_select_db("$queuemetrics_dbname", $linkB); + + $stmt = "INSERT INTO queue_log SET partition='P01',time_id='$StarTtime',call_id='NONE',queue='NONE',agent='Agent/$user',verb='PAUSEALL',serverid='$queuemetrics_log_id';"; + if ($DB) {echo "$stmt\n";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $linkB); + $affected_rows = mysql_affected_rows($linkB); + + mysql_close($linkB); + } + } } ##### look for the channel in the UPDATED vicidial_manager record of the call initiation @@ -1095,7 +1347,7 @@ if ($ACTION == 'VDADcheckINCOMING') 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';"; + $stmt = "UPDATE vicidial_live_agents set status='INCALL',last_call_time='$NOW_TIME',comments='AUTO' where user='$user' and server_ip='$server_ip';"; if ($DB) {echo "$stmt\n";} $rslt=mysql_query($stmt, $link); @@ -1163,25 +1415,37 @@ if ($ACTION == 'VDADcheckINCOMING') $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';"; + $user_group=''; + $stmt="SELECT user_group FROM vicidial_users where user='$user' LIMIT 1;"; + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $ug_record_ct = mysql_num_rows($rslt); + if ($ug_record_ct > 0) + { + $row=mysql_fetch_row($rslt); + $user_group = trim("$row[0]"); + } + $stmt = "UPDATE vicidial_log set user='$user', comments='AUTO', list_id='$list_id', status='INCALL', user_group='$user_group' where lead_id='$lead_id' and uniqueid='$uniqueid';"; if ($DB) {echo "$stmt\n";} $rslt=mysql_query($stmt, $link); - if (eregi("CLOSER",$campaign)) + if (eregi("(CLOSER|BLEND|INBND|_C$|_B$|_I$)",$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;"; + $stmt = "UPDATE vicidial_closer_log set user='$user', comments='AUTO', list_id='$list_id', status='INCALL', user_group='$user_group' 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;"; + $stmt = "select campaign_id,phone_number,alt_dial 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) + if ($VDAC_cid_ct > 0) { $row=mysql_fetch_row($rslt); $VDADchannel_group =$row[0]; + $dialed_number =$row[1]; + $dialed_label =$row[2]; } $stmt = "select count(*) from vicidial_log where lead_id='$lead_id' and uniqueid='$uniqueid';"; @@ -1211,6 +1475,11 @@ if ($ACTION == 'VDADcheckINCOMING') $VDCL_xferconf_a_number = $row[11]; $VDCL_xferconf_b_dtmf = $row[12]; $VDCL_xferconf_b_number = $row[13]; + + ### update the comments in vicidial_live_agents record + $stmt = "UPDATE vicidial_live_agents set comments='INBOUND' where user='$user' and server_ip='$server_ip';"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); } else { @@ -1263,6 +1532,17 @@ if ($ACTION == 'VDADcheckINCOMING') $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"; + + $stmt = "select phone_number,alt_dial 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 ($VDAC_cid_ct > 0) + { + $row=mysql_fetch_row($rslt); + $dialed_number =$row[0]; + $dialed_label =$row[1]; + } } $comments = eregi_replace("\r",'',$comments); @@ -1300,6 +1580,8 @@ if ($ACTION == 'VDADcheckINCOMING') $LeaD_InfO .= $CBcallback_time . "\n"; $LeaD_InfO .= $CBuser . "\n"; $LeaD_InfO .= $CBcomments . "\n"; + $LeaD_InfO .= $dialed_number . "\n"; + $LeaD_InfO .= $dialed_label . "\n"; echo $LeaD_InfO; @@ -1327,6 +1609,7 @@ if ($ACTION == 'VDADcheckINCOMING') if ($format=='debug') {echo "\n";} $rslt=mysql_query($stmt, $link); } + } else { @@ -1354,8 +1637,18 @@ if ( (strlen($campaign)<1) || (strlen($conf_exten)<1) ) } else { + $user_group=''; + $stmt="SELECT user_group FROM vicidial_users where user='$user' LIMIT 1;"; + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $ug_record_ct = mysql_num_rows($rslt); + if ($ug_record_ct > 0) + { + $row=mysql_fetch_row($rslt); + $user_group = trim("$row[0]"); + } ##### Insert a LOGOUT record into the user log - $stmt="INSERT INTO vicidial_user_log values('','$user','LOGOUT','$campaign','$NOW_TIME','$StarTtime');"; + $stmt="INSERT INTO vicidial_user_log (user,event,campaign_id,event_date,event_epoch,user_group) values('$user','LOGOUT','$campaign','$NOW_TIME','$StarTtime','$user_group');"; if ($DB) {echo "$stmt\n";} $rslt=mysql_query($stmt, $link); $vul_insert = mysql_affected_rows($link); @@ -1390,11 +1683,94 @@ else $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','','','','','','','','','');"; + $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Hangup','ULGH3459$StarTtime','Channel: $agent_channel','','','','','','','','','');"; if ($format=='debug') {echo "\n";} $rslt=mysql_query($stmt, $link); } + $pause_sec=0; + $stmt = "select pause_epoch,pause_sec,wait_epoch,talk_epoch,dispo_epoch 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) and (strlen($row[3]<5)) and (strlen($row[4]<5)) ) + { + $row=mysql_fetch_row($rslt); + $pause_sec = (($StarTtime - $row[0]) + $row[1]); + + $stmt="UPDATE vicidial_agent_log set pause_sec='$pause_sec',wait_epoch='$StarTtime' where agent_log_id='$agent_log_id';"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + } + + if ($vla_delete > 0) + { + ############################################# + ##### START QUEUEMETRICS LOGGING LOOKUP ##### + $stmt = "SELECT enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_log_id,allow_sipsak_messages FROM system_settings;"; + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $qm_conf_ct = mysql_num_rows($rslt); + $i=0; + while ($i < $qm_conf_ct) + { + $row=mysql_fetch_row($rslt); + $enable_queuemetrics_logging = $row[0]; + $queuemetrics_server_ip = $row[1]; + $queuemetrics_dbname = $row[2]; + $queuemetrics_login = $row[3]; + $queuemetrics_pass = $row[4]; + $queuemetrics_log_id = $row[5]; + $allow_sipsak_messages = $row[6]; + $i++; + } + ##### END QUEUEMETRICS LOGGING LOOKUP ##### + ########################################### + if ( ($enable_sipsak_messages > 0) and ($allow_sipsak_messages > 0) and (eregi("SIP",$protocol)) ) + { + $SIPSAK_message = 'LOGGED OUT'; + passthru("/usr/local/bin/sipsak -M -O desktop -B \"$SIPSAK_message\" -r 5060 -s sip:$extension@$phone_ip > /dev/null"); + } + + if ($enable_queuemetrics_logging > 0) + { + $linkB=mysql_connect("$queuemetrics_server_ip", "$queuemetrics_login", "$queuemetrics_pass"); + mysql_select_db("$queuemetrics_dbname", $linkB); + + # $stmt = "INSERT INTO queue_log SET partition='P01',time_id='$StarTtime',call_id='NONE',queue='$campaign',agent='Agent/$user',verb='PAUSE',serverid='1';"; + # if ($DB) {echo "$stmt\n";} + # if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + # $rslt=mysql_query($stmt, $linkB); + # $affected_rows = mysql_affected_rows($linkB); + + $stmt = "SELECT time_id FROM queue_log where agent='Agent/$user' and verb='AGENTLOGIN' order by time_id desc limit 1;"; + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $linkB); + if ($DB) {echo "$stmt\n";} + echo "$stmt\n"; + $li_conf_ct = mysql_num_rows($rslt); + $i=0; + while ($i < $li_conf_ct) + { + $row=mysql_fetch_row($rslt); + $logintime = $row[0]; + $i++; + } + + $time_logged_in = ($StarTtime - $logintime); + if ($time_logged_in > 1000000) {$time_logged_in=1;} + + $stmt = "INSERT INTO queue_log SET partition='P01',time_id='$StarTtime',call_id='NONE',queue='$campaign',agent='Agent/$user',verb='AGENTLOGOFF',data1='$user$agents',data2='$time_logged_in',serverid='$queuemetrics_log_id';"; + if ($DB) {echo "$stmt\n";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $linkB); + $affected_rows = mysql_affected_rows($linkB); + + mysql_close($linkB); + } + } + echo "$vul_insert|$vc_remove|$vla_delete|$wcs_delete|$agent_channel\n"; } } @@ -1423,7 +1799,14 @@ if ($ACTION == 'updateDISPO') if ($format=='debug') {echo "\n";} $rslt=mysql_query($stmt, $link); - if ( ($use_internal_dnc=='Y') and ($dispo_choice=='DNC') ) + if (eregi("(CLOSER|BLEND|INBND|_C$|_B$|_I$)",$campaign)) + { + $stmt = "UPDATE vicidial_closer_log set status='$dispo_choice' where lead_id='$lead_id' and user='$user' order by closecallid desc limit 1;"; + if ($DB) {echo "$stmt\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";} @@ -1450,20 +1833,91 @@ if ($ACTION == 'updateDISPO') 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');"; + $user_group=''; + $stmt="SELECT user_group FROM vicidial_users where user='$user' LIMIT 1;"; + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $ug_record_ct = mysql_num_rows($rslt); + if ($ug_record_ct > 0) + { + $row=mysql_fetch_row($rslt); + $user_group = trim("$row[0]"); + } + + $stmt="INSERT INTO vicidial_agent_log (user,server_ip,event_time,campaign_id,pause_epoch,pause_sec,wait_epoch,user_group) values('$user','$server_ip','$NOW_TIME','$campaign','$StarTtime','0','$StarTtime','$user_group');"; if ($DB) {echo "$stmt\n";} $rslt=mysql_query($stmt, $link); $affected_rows = mysql_affected_rows($link); - $agent_log_id = mysql_insert_id(); + $agent_log_id = mysql_insert_id($link); ### 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');"; + $stmt="INSERT INTO vicidial_callbacks (lead_id,list_id,campaign_id,status,entry_time,callback_time,user,recipient,comments,user_group) values('$lead_id','$list_id','$campaign','ACTIVE','$NOW_TIME','$CallBackDatETimE','$user','$recipient','$comments','$user_group');"; if ($DB) {echo "$stmt\n";} $rslt=mysql_query($stmt, $link); } + $stmt="SELECT auto_alt_dial_statuses from vicidial_campaigns where campaign_id='$campaign';"; + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + + if ( ($auto_dial_level > 0) and (ereg(" $dispo_choice ",$row[0])) ) + { + $stmt = "select count(*) from vicidial_hopper where lead_id='$lead_id' and status='HOLD';"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + + if ($row[0] > 0) + { + $stmt="UPDATE vicidial_hopper set status='READY' where lead_id='$lead_id' and status='HOLD' limit 1;"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + } + } + else + { + $stmt="DELETE from vicidial_hopper where lead_id='$lead_id' and status='HOLD';"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + } + + ############################################# + ##### START QUEUEMETRICS LOGGING LOOKUP ##### + $stmt = "SELECT enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_log_id FROM system_settings;"; + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $qm_conf_ct = mysql_num_rows($rslt); + $i=0; + while ($i < $qm_conf_ct) + { + $row=mysql_fetch_row($rslt); + $enable_queuemetrics_logging = $row[0]; + $queuemetrics_server_ip = $row[1]; + $queuemetrics_dbname = $row[2]; + $queuemetrics_login = $row[3]; + $queuemetrics_pass = $row[4]; + $queuemetrics_log_id = $row[5]; + $i++; + } + ##### END QUEUEMETRICS LOGGING LOOKUP ##### + ########################################### + if ($enable_queuemetrics_logging > 0) + { + $linkB=mysql_connect("$queuemetrics_server_ip", "$queuemetrics_login", "$queuemetrics_pass"); + mysql_select_db("$queuemetrics_dbname", $linkB); + + $stmt = "INSERT INTO queue_log SET partition='P01',time_id='$StarTtime',call_id='$MDnextCID',queue='$campaign',agent='Agent/$user',verb='CALLSTATUS',data1='$dispo_choice',serverid='$queuemetrics_log_id';"; + if ($DB) {echo "$stmt\n";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $linkB); + $affected_rows = mysql_affected_rows($linkB); + + mysql_close($linkB); + } + echo 'Lead ' . $lead_id . ' has been changed to ' . $dispo_choice . " Status\nNext agent_log_id:\n" . $agent_log_id . "\n"; } @@ -1475,6 +1929,8 @@ if ($ACTION == 'updateLEAD') { $MT[0]=''; $row=''; $rowx=''; + $DO_NOT_UPDATE=0; + $DO_NOT_UPDATE_text=''; if ( (strlen($phone_number)<1) || (strlen($lead_id)<1) ) { echo "phone_number $phone_number or lead_id $lead_id is not valid\n"; @@ -1482,12 +1938,54 @@ if ($ACTION == 'updateLEAD') } 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";} + $stmt = "SELECT disable_alter_custdata FROM vicidial_campaigns where campaign_id='$campaign'"; + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $dac_conf_ct = mysql_num_rows($rslt); + $i=0; + while ($i < $dac_conf_ct) + { + $row=mysql_fetch_row($rslt); + $disable_alter_custdata = $row[0]; + $i++; + } + if (ereg('Y',$disable_alter_custdata)) + { + $DO_NOT_UPDATE=1; + $DO_NOT_UPDATE_text=' NOT'; + $stmt = "SELECT alter_custdata_override FROM vicidial_users where user='$user'"; + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $aco_conf_ct = mysql_num_rows($rslt); + $i=0; + while ($i < $aco_conf_ct) + { + $row=mysql_fetch_row($rslt); + $alter_custdata_override = $row[0]; + $i++; + } + if (ereg('ALLOW_ALTER',$alter_custdata_override)) + { + $DO_NOT_UPDATE=0; + $DO_NOT_UPDATE_text=''; + } + } + + if ($DO_NOT_UPDATE < 1) + { + $comments = eregi_replace("\r",'',$comments); + $comments = eregi_replace("\n",'!N',$comments); + $comments = eregi_replace("--AMP--",'&',$comments); + $comments = eregi_replace("--QUES--",'?',$comments); + $comments = eregi_replace("--POUND--",'#',$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';"; @@ -1495,7 +1993,7 @@ if ($ACTION == 'updateLEAD') $rslt=mysql_query($stmt, $link); } - echo "Lead $lead_id information has been updated\n"; + echo "Lead $lead_id information has$DO_NOT_UPDATE_text been updated\n"; } @@ -1515,10 +2013,54 @@ if ( ($ACTION == 'VDADpause') || ($ACTION == 'VDADready') ) 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';"; + $stmt="UPDATE vicidial_live_agents set lead_id='',uniqueid=0,callerid='',channel='', random_id='$random',comments='' where user='$user' and server_ip='$server_ip';"; if ($format=='debug') {echo "\n";} $rslt=mysql_query($stmt, $link); + $stmt="UPDATE vicidial_live_agents set status='$stage' where user='$user' and server_ip='$server_ip';"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + $affected_rows = mysql_affected_rows($link); + if ($affected_rows > 0) + { + ############################################# + ##### START QUEUEMETRICS LOGGING LOOKUP ##### + $stmt = "SELECT enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_log_id FROM system_settings;"; + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $qm_conf_ct = mysql_num_rows($rslt); + $i=0; + while ($i < $qm_conf_ct) + { + $row=mysql_fetch_row($rslt); + $enable_queuemetrics_logging = $row[0]; + $queuemetrics_server_ip = $row[1]; + $queuemetrics_dbname = $row[2]; + $queuemetrics_login = $row[3]; + $queuemetrics_pass = $row[4]; + $queuemetrics_log_id = $row[5]; + $i++; + } + ##### END QUEUEMETRICS LOGGING LOOKUP ##### + ########################################### + if ($enable_queuemetrics_logging > 0) + { + if (ereg('READY',$stage)) {$QMstatus='UNPAUSEALL';} + if (ereg('PAUSE',$stage)) {$QMstatus='PAUSEALL';} + $linkB=mysql_connect("$queuemetrics_server_ip", "$queuemetrics_login", "$queuemetrics_pass"); + mysql_select_db("$queuemetrics_dbname", $linkB); + + $stmt = "INSERT INTO queue_log SET partition='P01',time_id='$StarTtime',call_id='NONE',queue='NONE',agent='Agent/$user',verb='$QMstatus',serverid='$queuemetrics_log_id';"; + if ($DB) {echo "$stmt\n";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $linkB); + $affected_rows = mysql_affected_rows($linkB); + + mysql_close($linkB); + } + } + if ($agent_log == 'NO') {$donothing=1;} else @@ -1587,6 +2129,71 @@ if ($ACTION == 'UpdatEFavoritEs') } +################################################################################ +### PauseCodeSubmit - Update vicidial_agent_log with pause code +################################################################################ +if ($ACTION == 'PauseCodeSubmit') +{ + $row=''; $rowx=''; + if ( (strlen($status)<1) || (strlen($agent_log_id)<1) ) + { + echo "agent_log_id $agent_log_id or pause_code $status is not valid\n"; + exit; + } + else + { + $stmt="UPDATE vicidial_agent_log set sub_status=\"$status\" where agent_log_id='$agent_log_id';"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + $affected_rows = mysql_affected_rows($link); + if ($affected_rows > 0) + { + ############################################# + ##### START QUEUEMETRICS LOGGING LOOKUP ##### + $stmt = "SELECT enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_log_id,allow_sipsak_messages FROM system_settings;"; + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $qm_conf_ct = mysql_num_rows($rslt); + $i=0; + while ($i < $qm_conf_ct) + { + $row=mysql_fetch_row($rslt); + $enable_queuemetrics_logging = $row[0]; + $queuemetrics_server_ip = $row[1]; + $queuemetrics_dbname = $row[2]; + $queuemetrics_login = $row[3]; + $queuemetrics_pass = $row[4]; + $queuemetrics_log_id = $row[5]; + $allow_sipsak_messages = $row[6]; + $i++; + } + ##### END QUEUEMETRICS LOGGING LOOKUP ##### + ########################################### + if ( ($enable_sipsak_messages > 0) and ($allow_sipsak_messages > 0) and (eregi("SIP",$protocol)) ) + { + $SIPSAK_prefix = 'BK-'; + passthru("/usr/local/bin/sipsak -M -O desktop -B \"$SIPSAK_prefix$status\" -r 5060 -s sip:$extension@$phone_ip > /dev/null"); + } + if ($enable_queuemetrics_logging > 0) + { + $linkB=mysql_connect("$queuemetrics_server_ip", "$queuemetrics_login", "$queuemetrics_pass"); + mysql_select_db("$queuemetrics_dbname", $linkB); + + $stmt = "INSERT INTO queue_log SET partition='P01',time_id='$StarTtime',call_id='NONE',queue='$campaign',agent='Agent/$user',verb='PAUSEREASON',serverid='$queuemetrics_log_id',data1='$status';"; + if ($DB) {echo "$stmt\n";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $linkB); + $affected_rows = mysql_affected_rows($linkB); + + mysql_close($linkB); + } + } + } +echo "Pause Code has been updated to $status for $agent_log_id\n"; +} + + ################################################################################ ### CalLBacKLisT - List the USERONLY callbacks for an agent ################################################################################ diff --git a/agc_2-X/trunk/LANG_www/agc/vicidial.php b/agc_2-X/trunk/LANG_www/agc/vicidial.php index b01db0ae..335422a3 100644 --- a/agc_2-X/trunk/LANG_www/agc/vicidial.php +++ b/agc_2-X/trunk/LANG_www/agc/vicidial.php @@ -1,7 +1,7 @@ LICENSE: GPLv2 +# Copyright (C) 2007 Matt Florell 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 @@ -15,7 +15,7 @@ # - vdc_db_query.php: Updates information in the database # - manager_send.php: Sends manager actions to the DB for execution # -# CHANGES +# CHANGELOG # 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 @@ -132,8 +132,37 @@ # 61128-2229 - Added vicidial_live_agents and vicidial_auto_calls manual dial entries # 61130-1617 - Added lead_id to MonitorConf for recording_log # 61221-1212 - Changed width to 760 to better fit 800x600 screens, widened SCRIPT +# 70109-1128 - Fixed wrapup timer bug +# 70109-1635 - Added option for HotKeys automatically dialing next number in manual mode +# - Added option for alternate number dialing with hotkeys +# 70111-1600 - Added ability to use BLEND/INBND/*_C/*_B/*_I as closer campaigns +# 70118-1517 - Added vicidial_agent_log and vicidial_user_log logging of user_group +# 70201-1249 - Added FAST DIAL option for manually dialing, added UTF8 compatible code +# 70201-1703 - Fixed cursor bug for most text input fields +# 70202-1453 - Added first portions of Agent Pause Codes +# 70203-0108 - Finished Agent Pause Codes functionality +# 70203-0930 - Added dialed_number to webform output +# 70203-1010 - Added dialed_label to webform output +# 70206-1201 - Fixed allow_closers bug +# 70206-1332 - Added vicidial_recording_override users setting function +# 70212-1252 - Fixed small issue with CXFER +# 70213-1018 - Changed CXFER and AXFER to update customer information before transfer +# 70214-1233 - Added queuemetrics_log_id field for server_id in queue_log +# 70215-1240 - Added queuemetrics_log_id field for server_id in queue_log +# 70222-1617 - Changed queue_log PAUSE/UNPAUSE to PAUSEALL/UNPAUSEALL +# 70226-1252 - Added Mute/UnMute to agent screen +# 70309-1035 - Allow amphersands and questions marks in comments to pass through +# 70313-1052 - Allow pound signs(hash) in comments to pass through +# 70316-1406 - Moved the MUTE button to be accessible during a transfer/conf +# 70319-1446 - Added agent-deactive-display and disable customer info update functions +# 70319-1626 - Added option to allow agent logins to campaigns with no leads in the hopper +# 70320-1501 - Added option to allow retry of leave-3way-call from dispo screen +# 70322-1545 - Added sipsak display ability # +$version = '2.0.129'; +$build = '70322-1545'; + require("dbconnect.php"); if (isset($_GET["DB"])) {$DB=$_GET["DB"];} @@ -172,14 +201,11 @@ if (isset($_GET["relogin"])) {$relogin=$_GET["relogin"];} $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); + $VD_campaign=ereg_replace("[^0-9a-zA-Z_]","",$VD_campaign); $forever_stop=0; -$version = '2.0.105'; -$build = '61221-1212'; - if ($force_logout) { echo "You have now logged out. Thank you\n"; @@ -226,6 +252,7 @@ $TEST_all_statuses = '0'; # TEST variable allows all statuses in dispo screen $US='_'; $CL=':'; $AT='@'; +$DS='-'; $date = date("r"); $ip = getenv("REMOTE_ADDR"); $browser = getenv("HTTP_USER_AGENT"); @@ -252,6 +279,7 @@ $camp_form_code = "  (This is usually a 1 in the USA-Canada) Phone Number: -   (12 digits max - digits only) + +   (12 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) @@ -5533,7 +6014,8 @@ echo "\n";

If you want to dial a number and have it NOT be added as a new lead, enter in the exact dialstring that you want to call in the 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) +   (digits only please) +
Dial Now @@ -5557,6 +6039,7 @@ Your Status:
Calls Dialing:
+
Transfer - Conference
INTERNAL CLOSER @@ -5582,11 +6065,12 @@ Your Status:
Calls Dialing: Dial Blind Transfer Blind Transfer VMail Message
+
- +
Lead Dispositioned As:

-
@@ -5594,7 +6078,7 @@ Your Status:
Calls Dialing: + @@ -5610,7 +6094,7 @@ Your Status:
Calls Dialing: +
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:
@@ -5627,7 +6111,7 @@ Your Status:
Calls Dialing: +
Previous Callback Information:
Noone is in your session:
Go Back

@@ -5635,7 +6119,7 @@ Your Status:
Calls Dialing: +
Customer has hung up:
Go Back

@@ -5644,7 +6128,7 @@ Your Status:
Calls Dialing: + "; if (volumecontrol_active!=1) { live_conf_HTML = live_conf_HTML + ""; } else { - live_conf_HTML = live_conf_HTML + ""; + live_conf_HTML = live_conf_HTML + ""; } // var debugspan = document.getElementById("debugbottomspan").innerHTML; @@ -1926,6 +2136,29 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} {custchannellive++;} } + if (volumecontrol_active > 0) + { + if (protocol != 'EXTERNAL') + { + var regAGNTchan = new RegExp(protocol + '/' + extension,"g"); + if ( (channelfieldA.match(regAGNTchan)) && (agentchannel != channelfieldA) ) + { + agentchannel = channelfieldA; + + document.getElementById("AgentMuteSpan").innerHTML = ""; + } + } + else + { + if (agentchannel.length < 3) + { + agentchannel = channelfieldA; + + document.getElementById("AgentMuteSpan").innerHTML = ""; + } + } + } + // document.getElementById("debugbottomspan").innerHTML = debugspan + '
' + channelfieldA + '|' + lastcustchannel + '|' + custchannellive + '|' + LMAcontent_change + '|' + LMAalter; if (!LMAe[ARY_ct]) @@ -1952,7 +2185,11 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} if (LMAcontent_change > 0) { if (conf_channels_xtra_display == 1) - {document.getElementById("outboundcallsspan").innerHTML = live_conf_HTML;} + { + // document.getElementById("MainPanel").style.overflow = 'visible'; + document.getElementById("outboundcallsspan").innerHTML = live_conf_HTML; + // document.getElementById("MainPanel").style.overflow = 'auto'; + } } nochannelinsession=0; } @@ -2086,7 +2323,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} // ################################################################################ // Send Redirect command for live call to Manager sends phone name where call is going to // Covers the following types: XFER, VMAIL, ENTRY, CONF, ESPERA, FROMESPERA, XfeRLOCAL, XfeRINTERNAL, XfeRBLIND, VfeRVMAIL - function mainxfer_send_redirect(taskvar,taskxferconf,taskserverip) + function mainxfer_send_redirect(taskvar,taskxferconf,taskserverip,taskdebugnote) { var xmlhttp=false; /*@cc_on @*/ @@ -2201,6 +2438,8 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} } if (taskvar == '3WAY') { + xferredirect_query=''; + var queryCID = "VXvdcW" + epoch_sec + user_abb; var redirectdestination = "NEXTAVAILABLE"; var redirectXTRAvalue = XDchannel; @@ -2211,7 +2450,18 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} {var redirecttype = 'RedirectXtraCX';} else {var redirecttype = 'RedirectXtra';} - xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=" + redirecttype + "&format=text&channel=" + redirectvalue + "&call_server_ip=" + redirectserverip + "&queryCID=" + queryCID + "&exten=" + redirectdestination + "&ext_context=" + ext_context + "&ext_priority=1&extrachannel=" + redirectXTRAvalue + "&lead_id=" + document.vicidial_form.lead_id.value + "&phone_code=" + document.vicidial_form.phone_code.value + "&phone_number=" + document.vicidial_form.phone_number.value + "&campaign=CL_" + campaign + '' + closerxfercamptail; + DispO3waychannel = redirectvalue; + DispO3wayXtrAchannel = redirectXTRAvalue; + DispO3wayCalLserverip = redirectserverip; + DispO3wayCalLxfernumber = document.vicidial_form.xfernumber.value; + DispO3wayCalLcamptail = document.vicidial_form.xfercode.value; + + xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=" + redirecttype + "&format=text&channel=" + redirectvalue + "&call_server_ip=" + redirectserverip + "&queryCID=" + queryCID + "&exten=" + redirectdestination + "&ext_context=" + ext_context + "&ext_priority=1&extrachannel=" + redirectXTRAvalue + "&lead_id=" + document.vicidial_form.lead_id.value + "&phone_code=" + document.vicidial_form.phone_code.value + "&phone_number=" + document.vicidial_form.phone_number.value+ "&filename=" + taskdebugnote + "&campaign=CL_" + campaign + '' + closerxfercamptail; + + if (taskdebugnote == 'FIRST') + { + document.getElementById("DispoSelectHAspan").innerHTML = "Leave 3Way Call Again"; + } } if (taskvar == 'ParK') { @@ -2257,7 +2507,6 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} Nactiveext = null; Nactiveext = xmlhttp.responseText; // alert(xmlhttp.responseText); - hideMainXfeR(); } } delete xmlhttp; @@ -2326,7 +2575,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} "&list_id=" + document.vicidial_form.list_id.value + "&length_in_sec=0&phone_code=" + document.vicidial_form.phone_code.value + "&phone_number=" + lead_dial_number + - "&exten=" + extension + "&channel=" + lastcustchannel + "&start_epoch=" + MDlogEPOCH + "&auto_dial_level=" + auto_dial_level + "&VDstop_rec_after_each_call=" + VDstop_rec_after_each_call + "&conf_silent_prefix=" + conf_silent_prefix + "&protocol=" + protocol + "&extension=" + extension + "&ext_context=" + ext_context + "&conf_exten=" + session_id + "&user_abb=" + user_abb + "&agent_log_id=" + agent_log_id; + "&exten=" + extension + "&channel=" + lastcustchannel + "&start_epoch=" + MDlogEPOCH + "&auto_dial_level=" + auto_dial_level + "&VDstop_rec_after_each_call=" + VDstop_rec_after_each_call + "&conf_silent_prefix=" + conf_silent_prefix + "&protocol=" + protocol + "&extension=" + extension + "&ext_context=" + ext_context + "&conf_exten=" + session_id + "&user_abb=" + user_abb + "&agent_log_id=" + agent_log_id + "&MDnextCID=" + LasTCID + "&DB=0"; xmlhttp.open('POST', 'vdc_db_query.php'); xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8'); // document.getElementById("busycallsdebug").innerHTML = "vdc_db_query.php?" + manDiaLlog_query; @@ -2538,7 +2787,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} // ################################################################################ // Open page to enter details for a new manual dial lead - function NeWManuaLDiaLCalL() + function NeWManuaLDiaLCalL(TVfast) { if ( (AutoDialWaiting == 1) || (VD_live_customer_call==1) || (alt_dial_active==1) ) { @@ -2546,7 +2795,14 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} } else { - showDiv('NeWManuaLDiaLBox'); + if (TVfast=='FAST') + { + NeWManuaLDiaLCalLSubmiTfast(); + } + else + { + showDiv('NeWManuaLDiaLBox'); + } } } @@ -2584,6 +2840,34 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} document.vicidial_form.MDDiaLOverridE.value = ''; } +// ################################################################################ +// Fast version of manual dial + function NeWManuaLDiaLCalLSubmiTfast() + { + var MDDiaLCodEform = document.vicidial_form.phone_code.value; + var MDPhonENumbeRform = document.vicidial_form.phone_number.value; + + if ( (MDDiaLCodEform.length < 1) || (MDPhonENumbeRform.length < 5) ) + { + alert("VOCÊ DEVE DAR ENTRADA A um NÚMERO De TELEFONE E A um CÓDIGO DoSELETOR PARA USAR O SELETOR RÁPIDO"); + } + else + { + var MDLookuPLeaD = 'new'; + if (document.vicidial_form.LeadLookuP.checked==true) + {MDLookuPLeaD = 'lookup';} + + alt_phone_dialing=1; + auto_dial_level=0; + manual_dial_in_progress=1; + MainPanelToFront(); + buildDiv('DiaLLeaDPrevieW'); + buildDiv('DiaLDiaLAltPhonE'); + document.vicidial_form.LeadPreview.checked=false; + document.vicidial_form.DiaLAltPhonE.checked=true; + ManualDialNext("","",MDDiaLCodEform,MDPhonENumbeRform,MDLookuPLeaD); + } + } // ################################################################################ // Request lookup of manual dial channel @@ -2662,7 +2946,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} document.getElementById("MainStatuSSpan").innerHTML = " Ligou para o terceiro: " + document.vicidial_form.xfernumber.value + " UID: " + CIDcheck; - document.getElementById("Leave3WayCall").innerHTML ="\"ABANDONAR"; + document.getElementById("Leave3WayCall").innerHTML ="\"ABANDONAR"; document.getElementById("DialWithCustomer").innerHTML ="\"Discar"; @@ -2715,8 +2999,8 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} document.getElementById("DialBlindVMail").innerHTML = "\"Blind"; - document.getElementById("VolumeUpSpan").innerHTML = ""; - document.getElementById("VolumeDownSpan").innerHTML = ""; + document.getElementById("VolumeUpSpan").innerHTML = ""; + document.getElementById("VolumeDownSpan").innerHTML = ""; // INSERT VICIDISCAR_LOG ENTRY FOR THIS CHAMADA PROCESS @@ -2805,6 +3089,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} else { fronter = user; + LasTCID = MDnextResponse_array[0]; document.vicidial_form.lead_id.value = MDnextResponse_array[1]; LeaDPreVDispO = MDnextResponse_array[2]; document.vicidial_form.vendor_lead_code.value = MDnextResponse_array[4]; @@ -2839,9 +3124,12 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} CBcallback_time = MDnextResponse_array[29]; CBuser = MDnextResponse_array[30]; CBcomments = MDnextResponse_array[31]; - + dialed_number = MDnextResponse_array[32]; + dialed_label = MDnextResponse_array[33]; + lead_dial_number = document.vicidial_form.phone_number.value; document.getElementById("MainStatuSSpan").innerHTML = " Ligando: " + document.vicidial_form.phone_number.value + " UID: " + MDnextCID + "   " + man_status; + if ( (dialed_label.length < 3) || (dialed_label=='NONE') ) {dialed_label='MAIN';} web_form_vars = "lead_id=" + document.vicidial_form.lead_id.value + @@ -2887,6 +3175,8 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} "&phone=" + document.vicidial_form.phone_number.value + "&parked_by=" + document.vicidial_form.lead_id.value + "&dispo=" + LeaDDispO + '' + + "&dialed_number=" + dialed_number + '' + + "&dialed_label=" + dialed_label + '' + webform_session; // $VICIDISCAR_web_QUERY_STRING =~ s/ /+/gi; @@ -3071,6 +3361,9 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} { var manDiaLonly_num = document.vicidial_form.alt_phone.value; lead_dial_number = document.vicidial_form.alt_phone.value; + dialed_number = lead_dial_number; + dialed_label = 'ALT'; + WebFormRefresH(''); } else { @@ -3078,11 +3371,17 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} { var manDiaLonly_num = document.vicidial_form.address3.value; lead_dial_number = document.vicidial_form.address3.value; - } + dialed_number = lead_dial_number; + dialed_label = 'ADDR3'; + WebFormRefresH(''); + } else { var manDiaLonly_num = document.vicidial_form.phone_number.value; lead_dial_number = document.vicidial_form.phone_number.value; + dialed_number = lead_dial_number; + dialed_label = 'MAIN'; + WebFormRefresH(''); } } var xmlhttp=false; @@ -3213,7 +3512,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} } if (xmlhttp) { - autoDiaLready_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=" + taskaction + "&user=" + user + "&pass=" + pass + "&stage=" + VDRP_stage + "&agent_log_id=" + agent_log_id + "&agent_log=" + taskagentlog; + autoDiaLready_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=" + taskaction + "&user=" + user + "&pass=" + pass + "&stage=" + VDRP_stage + "&agent_log_id=" + agent_log_id + "&agent_log=" + taskagentlog + "&campaign=" + campaign; xmlhttp.open('POST', 'vdc_db_query.php'); xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8'); xmlhttp.send(autoDiaLready_query); @@ -3379,6 +3678,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} custchannellive=1; + LasTCID = check_VDIC_array[4]; LeaDPreVDispO = check_VDIC_array[6]; fronter = check_VDIC_array[7]; document.vicidial_form.vendor_lead_code.value = check_VDIC_array[8]; @@ -3411,6 +3711,8 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} CBcallback_time = check_VDIC_array[33]; CBuser = check_VDIC_array[34]; CBcomments = check_VDIC_array[35]; + dialed_number = check_VDIC_array[36]; + dialed_label = check_VDIC_array[37]; lead_dial_number = document.vicidial_form.phone_number.value; document.getElementById("MainStatuSSpan").innerHTML = " Entrante: " + document.vicidial_form.phone_number.value + " UID: " + CIDcheck + "   " + VDIC_fronter; @@ -3451,8 +3753,8 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} if (lastcustserverip == server_ip) { - document.getElementById("VolumeUpSpan").innerHTML = ""; - document.getElementById("VolumeDownSpan").innerHTML = ""; + document.getElementById("VolumeUpSpan").innerHTML = ""; + document.getElementById("VolumeDownSpan").innerHTML = ""; } document.getElementById("DiaLControl").innerHTML = DiaLControl_auto_HTML_OFF; @@ -3461,6 +3763,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} {var group = VDCL_group_id;} else {var group = campaign;} + if ( (dialed_label.length < 3) || (dialed_label=='NONE') ) {dialed_label='MAIN';} web_form_vars = "lead_id=" + document.vicidial_form.lead_id.value + @@ -3507,6 +3810,8 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} "&phone=" + document.vicidial_form.phone_number.value + "&parked_by=" + document.vicidial_form.lead_id.value + "&dispo=" + LeaDDispO + '' + + "&dialed_number=" + dialed_number + '' + + "&dialed_label=" + dialed_label + '' + webform_session; var regWFspace = new RegExp(" ","ig"); @@ -3568,6 +3873,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} {var group = VDCL_group_id;} else {var group = campaign;} + if ( (dialed_label.length < 3) || (dialed_label=='NONE') ) {dialed_label='MAIN';} web_form_vars = "lead_id=" + document.vicidial_form.lead_id.value + @@ -3614,6 +3920,8 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} "&phone=" + document.vicidial_form.phone_number.value + "&parked_by=" + document.vicidial_form.lead_id.value + "&dispo=" + LeaDDispO + '' + + "&dialed_number=" + dialed_number + '' + + "&dialed_label=" + dialed_label + '' + webform_session; var regWFspace = new RegExp(" ","ig"); @@ -3658,6 +3966,28 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} } +// ################################################################################ +// Send leave 3way call a second time from the dispo screen + function DispoLeavE3wayAgaiN() + { + XDchannel = DispO3wayXtrAchannel; + document.vicidial_form.xfernumber.value = DispO3wayCalLxfernumber; + document.vicidial_form.xfercode.value = DispO3wayCalLcamptail; + MDchannel = DispO3waychannel; + lastcustserverip = DispO3wayCalLserverip; + + document.getElementById("DispoSelectHAspan").innerHTML = ""; + + leave_3way_call('SECOND'); + + DispO3waychannel = ''; + DispO3wayXtrAchannel = ''; + DispO3wayCalLserverip = ''; + DispO3wayCalLxfernumber = ''; + DispO3wayCalLcamptail = ''; + } + + // ################################################################################ // Start Hangup Functions for both function bothcall_send_hangup() @@ -3670,7 +4000,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} // ################################################################################ // Send Hangup command for customer call connected to the conference now to Manager - function dialedcall_send_hangup(dispowindow) + function dialedcall_send_hangup(dispowindow,hotkeysused,altdispo) { var form_cust_channel = document.vicidial_form.callchannel.value; var form_cust_serverip = document.vicidial_form.callserverip.value; @@ -3808,10 +4138,36 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} if (document.vicidial_form.DiaLAltPhonE.checked==true) { reselect_alt_dial = 1; + if (altdispo == 'ALTPH2') + { + ManualDialOnly('ALTTelefoneE'); + } + else + { + if (altdispo == 'ADDR3') + { + ManualDialOnly('AddresS3'); + } + else + { + if (hotkeysused == 'YES') + { + reselect_alt_dial = 0; + manual_auto_hotkey = 1; + } + } + } } else { - document.getElementById("DiaLControl").innerHTML = "\"Discar"; + if (hotkeysused == 'YES') + { + manual_auto_hotkey = 1; + } + else + { + document.getElementById("DiaLControl").innerHTML = "\"Discar"; + } reselect_alt_dial = 0; } } @@ -3820,6 +4176,27 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} if (document.vicidial_form.DiaLAltPhonE.checked==true) { reselect_alt_dial = 1; + if (altdispo == 'ALTPH2') + { + ManualDialOnly('ALTTelefoneE'); + } + else + { + if (altdispo == 'ADDR3') + { + ManualDialOnly('AddresS3'); + } + else + { + if (hotkeysused == 'YES') + { + document.getElementById("MainStatuSSpan").style.background = panel_bgcolor; + document.getElementById("MainStatuSSpan").innerHTML = ''; + document.getElementById("DiaLControl").innerHTML = DiaLControl_auto_HTML_OFF; + reselect_alt_dial = 0; + } + } + } } else { @@ -3965,6 +4342,14 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} // Update vicidial_list lead record with all altered values from form function CustomerData_update() { + + var REGcommentsAMP = new RegExp('&',"g"); + var REGcommentsQUES = new RegExp("\\?","g"); + var REGcommentsPOUND = new RegExp("\\#","g"); + var REGcommentsRESULT = document.vicidial_form.comments.value.replace(REGcommentsAMP, "--AMP--"); + REGcommentsRESULT = REGcommentsRESULT.replace(REGcommentsQUES, "--QUES--"); + REGcommentsRESULT = REGcommentsRESULT.replace(REGcommentsPOUND, "--POUND--"); + var xmlhttp=false; /*@cc_on @*/ /*@if (@_jscript_version >= 5) @@ -3986,7 +4371,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} } if (xmlhttp) { - VLupdate_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=updateLEAD&format=text&user=" + user + "&pass=" + pass + + VLupdate_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&campaign=" + campaign + "&ACTION=updateLEAD&format=text&user=" + user + "&pass=" + pass + "&lead_id=" + document.vicidial_form.lead_id.value + "&vendor_lead_code=" + document.vicidial_form.vendor_lead_code.value + "&phone_number=" + document.vicidial_form.phone_number.value + @@ -4007,7 +4392,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} "&alt_phone=" + document.vicidial_form.alt_phone.value + "&email=" + document.vicidial_form.email.value + "&security_phrase=" + document.vicidial_form.security_phrase.value + - "&comments=" + document.vicidial_form.comments.value; + "&comments=" + REGcommentsRESULT; xmlhttp.open('POST', 'vdc_db_query.php'); xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8'); xmlhttp.send(VLupdate_query); @@ -4053,6 +4438,34 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} document.getElementById("DispoSelectContent").innerHTML = dispo_HTML; } +// ################################################################################ +// Generate the Pausa Code Chooser panel + function PauseCodeSelectContent_create() + { + if ( (AutoDialWaiting == 1) || (VD_live_customer_call==1) || (alt_dial_active==1) ) + { + alert("VOCÊ DEVE SER PAUSADO PARA DAR ENTRADA A um CÓDIGO Da PAUSA NaMODALIDADE De AUTO-DISCAR"); + } + else + { + showDiv('PausaCodeSelectBox'); + WaitingForNextStep=1; + PausaCode_HTML = ''; + document.vicidial_form.PausaCodeSelection.value = ''; + var VD_pause_codes_ct_half = parseInt(VD_pause_codes_ct / 2); + PausaCode_HTML = "
Call Wrapup: seconds remaining in wrapup



@@ -5653,23 +6137,28 @@ Your Status:
Calls Dialing: + +
Your session has been disabled
LOGOUT

Go Back +
+
+ +

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
@@ -5682,8 +6171,15 @@ Your Status:
Calls Dialing: +
SELECT A PAUSE CODE :
+ Pause Code Selection + +

  +
+
- +
Select a CallBack Date :
@@ -5726,7 +6222,7 @@ Your Status:
Calls Dialing: + @@ -5823,6 +6302,7 @@ RECORD ID:
+
CLOSER INBOUND GROUP SELECTION
Closer Inbound Group Selection
@@ -5737,7 +6233,7 @@ Your Status:
Calls Dialing: + Channel Channel @@ -5747,25 +6243,8 @@ Your Status:
Calls Dialing: - - - - - -
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
@@ -5809,7 +6288,7 @@ RECORD ID:

Hangup Customer

-Send DTMF
+
Send DTMF

@@ -5851,14 +6331,18 @@ RECORD ID:
+\n";} + {echo "\n";} else - {echo "\n";} + {echo "\n";} ?> - + +
seconds:   Channel:   Cust Time:   Email:
Comments: +
+
diff --git a/agc_2-X/trunk/LANG_www/agc_br/conf_exten_check.php b/agc_2-X/trunk/LANG_www/agc_br/conf_exten_check.php index 0b561beb..243712bb 100644 --- a/agc_2-X/trunk/LANG_www/agc_br/conf_exten_check.php +++ b/agc_2-X/trunk/LANG_www/agc_br/conf_exten_check.php @@ -33,6 +33,7 @@ # 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 # 61128-2255 - Added update for manual dial vicidial_live_agents +# 70319-1542 - Added agent disabled display function # require("dbconnect.php"); @@ -69,8 +70,8 @@ if (!isset($format)) {$format="text";} if (!isset($ACTION)) {$ACTION="refresh";} if (!isset($client)) {$client="agc";} -$version = '0.0.10'; -$build = '61128-2255'; +$version = '0.0.11'; +$build = '70319-1542'; $StarTtime = date("U"); $NOW_DATE = date("Y-m-d"); $NOW_TIME = date("Y-m-d H:i:s"); @@ -144,6 +145,23 @@ echo " if ($client == 'vdc') { + $Acount=0; + $AexternalDEAD=0; + + ### see if the agent has a record in the vicidial_live_agents table + $stmt="SELECT count(*) 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); + $Acount=$row[0]; + + # ### find out if external table shows agent should be disabled + # $stmt="SELECT count(*) from another_table where user='$user' and status='DEAD';"; + # if ($DB) {echo "|$stmt|\n";} + # $rslt=mysql_query($stmt, $link); + # $row=mysql_fetch_row($rslt); + # $AexternalDEAD=$row[0]; + if ($auto_dial_level > 0) { ### update the vicidial_live_agents every second with a new random number so it is shown to be alive @@ -186,6 +204,9 @@ echo " } + if ($Acount < 1) {$Astatus='DEAD_VLA';} + if ($AexternalDEAD > 0) {$Astatus='DEAD_EXTERNAL';} + echo 'DateTime: ' . $NOW_TIME . '|UnixTime: ' . $StarTtime . '|Status: ' . $Astatus . '|CampCalls: ' . $RingCalls . "|\n"; } diff --git a/agc_2-X/trunk/LANG_www/agc_br/manager_send.php b/agc_2-X/trunk/LANG_www/agc_br/manager_send.php index 00d9d17e..cdef0c9d 100644 --- a/agc_2-X/trunk/LANG_www/agc_br/manager_send.php +++ b/agc_2-X/trunk/LANG_www/agc_br/manager_send.php @@ -1,7 +1,7 @@ LICENSE: GPLv2 +# Copyright (C) 2007 Matt Florell 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 @@ -12,7 +12,7 @@ # - $user # - $pass # optional variables: -# - $ACTION - ('Originate','Redirect','Hangup','Command','Monitor','StopMonitor','SysCIDOriginate','RedirectName','RedirectNameVmail','MonitorConf','StopMonitorConf','RedirectXtra','RedirectXtraCX','RedirectVD','HangupConfDial','VolumeControl') +# - $ACTION - ('Originate','Redirect','Hangup','Command','Monitor','StopMonitor','SysCIDOriginate','RedirectName','RedirectNameVmail','MonitorConf','StopMonitorConf','RedirectXtra','RedirectXtraCX','RedirectVD','HangupConfDial','VolumeControl','OriginateVDRelogin') # - $queryCID - ('CN012345678901234567',...) # - $format - ('text','debug') # - $channel - ('Zap/41-1','SIP/test101-1jut','IAX2/iaxy@iaxy',...) @@ -35,7 +35,7 @@ # - $stage - ('UP','DOWN') # -# changes +# CHANGELOG: # 50401-1002 - First build of script, Hangup function only # 50404-1045 - Redirect basic function enabled # 50406-1522 - Monitor basic function enabled @@ -64,6 +64,10 @@ # 61004-1526 - Added parsing of volume control command and lookup or number # 61130-1617 - Added lead_id to MonitorConf for recording_log # 61201-1115 - Added user to MonitorConf for recording_log +# 70111-1600 - added ability to use BLEND/INBND/*_C/*_B/*_I as closer campaigns +# 70226-1251 - Added Mute/UnMute to conference volume control +# 70320-1502 - Added option to allow retry of leave-3way-call and debug logging +# 70322-1636 - Added sipsak display ability # require("dbconnect.php"); @@ -123,6 +127,16 @@ if (isset($_GET["phone_number"])) {$phone_number=$_GET["phone_number"];} elseif (isset($_POST["phone_number"])) {$phone_number=$_POST["phone_number"];} if (isset($_GET["stage"])) {$stage=$_GET["stage"];} elseif (isset($_POST["stage"])) {$stage=$_POST["stage"];} +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["phone_ip"])) {$phone_ip=$_GET["phone_ip"];} + elseif (isset($_POST["phone_ip"])) {$phone_ip=$_POST["phone_ip"];} +if (isset($_GET["enable_sipsak_messages"])) {$enable_sipsak_messages=$_GET["enable_sipsak_messages"];} + elseif (isset($_POST["enable_sipsak_messages"])) {$enable_sipsak_messages=$_POST["enable_sipsak_messages"];} +if (isset($_GET["allow_sipsak_messages"])) {$allow_sipsak_messages=$_GET["allow_sipsak_messages"];} + elseif (isset($_POST["allow_sipsak_messages"])) {$allow_sipsak_messages=$_POST["allow_sipsak_messages"];} $user=ereg_replace("[^0-9a-zA-Z]","",$user); $pass=ereg_replace("[^0-9a-zA-Z]","",$pass); @@ -133,8 +147,8 @@ if (!isset($ACTION)) {$ACTION="Originate";} if (!isset($format)) {$format="alert";} if (!isset($ext_priority)) {$ext_priority="1";} -$version = '2.0.27'; -$build = '61130-1617'; +$version = '2.0.29'; +$build = '70320-1502'; $StarTtime = date("U"); $NOW_DATE = date("Y-m-d"); $NOW_TIME = date("Y-m-d H:i:s"); @@ -279,6 +293,21 @@ if ($ACTION=="OriginateNameVmail") } } +if ($ACTION=="OriginateVDRelogin") +{ + if ( ($enable_sipsak_messages > 0) and ($allow_sipsak_messages > 0) and (eregi("SIP",$protocol)) ) + { + $CIDdate = date("ymdHis"); + $DS='-'; + $SIPSAK_prefix = 'LIN-'; + print "\n"; + passthru("/usr/local/bin/sipsak -M -O desktop -B \"$SIPSAK_prefix$campaign\" -r 5060 -s sip:$extension@$phone_ip > /dev/null"); + $queryCID = "$SIPSAK_prefix$campaign$DS$CIDdate"; + + } + $ACTION="Originate"; +} + if ($ACTION=="Originate") { if ( (strlen($exten)<1) or (strlen($channel)<1) or (strlen($ext_context)<1) or (strlen($queryCID)<10) ) @@ -430,7 +459,7 @@ if ($ACTION=="RedirectVD") else { if (strlen($call_server_ip)>6) {$server_ip = $call_server_ip;} - if (eregi("CLOSER",$campaign)) + if (eregi("(CLOSER|BLEND|INBND|_C$|_B$|_I$)",$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";} @@ -560,6 +589,7 @@ if ($ACTION=="RedirectNameVmail") if ($ACTION=="RedirectXtraCX") { + $DBout=''; $row=''; $rowx=''; $channel_liveX=1; $channel_liveY=1; @@ -575,6 +605,15 @@ if ($ACTION=="RedirectXtraCX") 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"; + if (ereg("SECOND|FIRST|DEBUG",$filename)) + { + if ($WeBRooTWritablE > 0) + { + $fp = fopen ("./vicidial_debug.txt", "a"); + fwrite ($fp, "$NOW_TIME|RDCXC|$filename|$user|$campaign|$$channel|$extrachannel|$queryCID|$exten|$ext_context|ext_priority|\n"); + fclose($fp); + } + } } else { @@ -594,6 +633,7 @@ if ($ACTION=="RedirectXtraCX") { $channel_liveX=0; echo "Canal $channel não está ativoligado$call_server_ip, Redirect comando não inserido\n"; + if (ereg("SECOND|FIRST|DEBUG",$filename)) {$DBout .= "$channel não está ativoligado$call_server_ip";} } } $stmt="SELECT count(*) FROM live_channels where server_ip = '$server_ip' and channel='$extrachannel';"; @@ -610,6 +650,7 @@ if ($ACTION=="RedirectXtraCX") { $channel_liveY=0; echo "Canal $channel não está ativoligado$server_ip, Redirect comando não inserido\n"; + if (ereg("SECOND|FIRST|DEBUG",$filename)) {$DBout .= "$channel não está ativoligado$server_ip";} } } if ( ($channel_liveX==1) && ($channel_liveY==1) ) @@ -622,6 +663,7 @@ if ($ACTION=="RedirectXtraCX") { $channel_liveY=0; echo "No Local agent to send call to, Redirect comando não inserido\n"; + if (ereg("SECOND|FIRST|DEBUG",$filename)) {$DBout .= "No Local agent to send call to";} } else { @@ -654,6 +696,7 @@ if ($ACTION=="RedirectXtraCX") $rslt=mysql_query($stmt, $link); echo "RedirectXtraCX comando enviado para Canal $channelligado$call_server_ip and \nHungup $extrachannelligado$server_ip\n"; + if (ereg("SECOND|FIRST|DEBUG",$filename)) {$DBout .= "$channelligado$call_server_ip, Hungup $extrachannelligado$server_ip";} } } else @@ -662,8 +705,19 @@ if ($ACTION=="RedirectXtraCX") {$ACTION="Redirect"; $server_ip = $call_server_ip;} if ($channel_liveY==1) {$ACTION="Redirect"; $channel=$extrachannel;} - + if (ereg("SECOND|FIRST|DEBUG",$filename)) {$DBout .= "Changed to Redirect: $channelligado$server_ip";} } + + if (ereg("SECOND|FIRST|DEBUG",$filename)) + { + if ($WeBRooTWritablE > 0) + { + $fp = fopen ("./vicidial_debug.txt", "a"); + fwrite ($fp, "$NOW_TIME|RDCXC|$filename|$user|$campaign|$DBout|\n"); + fclose($fp); + } + } + } } @@ -688,6 +742,15 @@ if ($ACTION=="RedirectXtra") 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"; + if (ereg("SECOND|FIRST|DEBUG",$filename)) + { + if ($WeBRooTWritablE > 0) + { + $fp = fopen ("./vicidial_debug.txt", "a"); + fwrite ($fp, "$NOW_TIME|RDX|$filename|$user|$campaign|$$channel|$extrachannel|$queryCID|$exten|$ext_context|ext_priority|\n"); + fclose($fp); + } + } } else { @@ -708,6 +771,7 @@ if ($ACTION=="RedirectXtra") { $channel_liveX=0; echo "Não foi possível achar uma conferência vazialigado$server_ip, Redirect comando não inserido\n"; + if (ereg("SECOND|FIRST|DEBUG",$filename)) {$DBout .= "Não foi possível achar uma conferência vazialigado$server_ip";} } } @@ -717,7 +781,7 @@ if ($ACTION=="RedirectXtra") if ($format=='debug') {echo "\n";} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); - if ($row[0]==0) + if ( ($row[0]==0) && (!ereg("SECOND",$filename)) ) { $stmt="SELECT count(*) FROM live_sip_channels where server_ip = '$call_server_ip' and channel='$channel';"; if ($format=='debug') {echo "\n";} @@ -727,13 +791,14 @@ if ($ACTION=="RedirectXtra") { $channel_liveX=0; echo "Canal $channel não está ativoligado$call_server_ip, Redirect comando não inserido\n"; + if (ereg("SECOND|FIRST|DEBUG",$filename)) {$DBout .= "$channel não está ativoligado$call_server_ip";} } } $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) + if ( ($row[0]==0) && (!ereg("SECOND",$filename)) ) { $stmt="SELECT count(*) FROM live_sip_channels where server_ip = '$server_ip' and channel='$extrachannel';"; if ($format=='debug') {echo "\n";} @@ -743,6 +808,7 @@ if ($ACTION=="RedirectXtra") { $channel_liveY=0; echo "Canal $channel não está ativoligado$server_ip, Redirect comando não inserido\n"; + if (ereg("SECOND|FIRST|DEBUG",$filename)) {$DBout .= "$channel não está ativoligado$server_ip";} } } if ( ($channel_liveX==1) && ($channel_liveY==1) ) @@ -754,6 +820,7 @@ if ($ACTION=="RedirectXtra") $rslt=mysql_query($stmt, $link); echo "RedirectXtra comando enviado para Canal $channel and \nExtraCanal $extrachannel\n to $extenligado$server_ip\n"; + if (ereg("SECOND|FIRST|DEBUG",$filename)) {$DBout .= "$channel and $extrachannel to $extenligado$server_ip";} } else { @@ -778,6 +845,7 @@ if ($ACTION=="RedirectXtra") $rslt=mysql_query($stmt, $link); echo "RedirectXtra comando enviado para Canal $channelligado$call_server_ip and \nExtraCanal $extrachannel\n to $extenligado$server_ip\n"; + if (ereg("SECOND|FIRST|DEBUG",$filename)) {$DBout .= "$channel/$call_server_ip and $extrachannel/$server_ip to $exten";} } } else @@ -788,6 +856,17 @@ if ($ACTION=="RedirectXtra") {$ACTION="Redirect"; $channel=$extrachannel;} } + + if (ereg("SECOND|FIRST|DEBUG",$filename)) + { + if ($WeBRooTWritablE > 0) + { + $fp = fopen ("./vicidial_debug.txt", "a"); + fwrite ($fp, "$NOW_TIME|RDX|$filename|$user|$campaign|$DBout|\n"); + fclose($fp); + } + } + } } } @@ -1018,8 +1097,10 @@ if ($ACTION=="VolumeControl") else { $participant_number='XXYYXXYYXXYYXX'; + if (eregi('UP',$stage)) {$vol_prefix='4';} if (eregi('DOWN',$stage)) {$vol_prefix='3';} - else {$vol_prefix='4';} + if (eregi('UNMUTE',$stage)) {$vol_prefix='2';} + if (eregi('MUTING',$stage)) {$vol_prefix='1';} $local_DEF = 'Local/'; $local_AMP = '@'; $volume_local_channel = "$local_DEF$participant_number$vol_prefix$exten$local_AMP$ext_context"; diff --git a/agc_2-X/trunk/LANG_www/agc_br/vdc_db_query.php b/agc_2-X/trunk/LANG_www/agc_br/vdc_db_query.php index c61999b8..0db2aeaa 100644 --- a/agc_2-X/trunk/LANG_www/agc_br/vdc_db_query.php +++ b/agc_2-X/trunk/LANG_www/agc_br/vdc_db_query.php @@ -1,7 +1,7 @@ LICENSE: GPLv2 +# Copyright (C) 2007 Matt Florell 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 @@ -13,7 +13,7 @@ # - $pass # optional variables: # - $format - ('text','debug') -# - $ACTION - ('regCLOSER','manDiaLnextCALL','manDiaLskip','manDiaLonly','manDiaLlookCALL','manDiaLlogCALL','userLOGout','updateDISPO','VDADpause','VDADready','VDADcheckINCOMING','UpdatEFavoritEs','CalLBacKLisT','CalLBacKCounT') +# - $ACTION - ('regCLOSER','manDiaLnextCALL','manDiaLskip','manDiaLonly','manDiaLlookCALL','manDiaLlogCALL','userLOGout','updateDISPO','VDADpause','VDADready','VDADcheckINCOMING','UpdatEFavoritEs','CalLBacKLisT','CalLBacKCounT','PauseCodeSubmit') # - $stage - ('start','finish','lookup','new') # - $closer_choice - ('CL_TESTCAMP_L CL_OUT123_L -') # - $conf_exten - ('8600011',...) @@ -70,7 +70,7 @@ # - $omit_phone_code - ('Y','N') # - $no_delete_sessions - ('0','1') -# changes +# CHANGELOG: # 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 @@ -101,7 +101,7 @@ # - 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 +# 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 @@ -110,10 +110,28 @@ # 60821-1647 - Added ability to not delete sessions at logout # 60906-1124 - Added lookup and sending of callback data for CALLBK calls # 61128-2229 - Added vicidial_live_agents and vicidial_auto_calls manual dial entries +# 70111-1600 - Added ability to use BLEND/INBND/*_C/*_B/*_I as closer campaigns +# 70115-1733 - Added alt_dial functionality in auto-dial modes +# 70118-1501 - Added user_group to vicidial_log,_agent_log,_closer_log,_callbacks +# 70123-1357 - Fixed bug that would not update vicidial_closer_log status to dispo +# 70202-1438 - Added pause code submit function +# 70203-0930 - Added dialed_number to lead info output +# 70203-1030 - Added dialed_label to lead info output +# 70206-1126 - Added INBOUND status for inbound/closer calls in vicidial_live_agents +# 70212-1253 - Fixed small issue with CXFER +# 70213-1431 - Added QueueMetrics PAUSE/UNPAUSE/AGENTLOGIN/AGENTLOGOFF actions +# 70214-1231 - Added queuemetrics_log_id field for server_id in queue_log +# 70215-1210 - Added queuemetrics COMPLETEAGENT action +# 70216-1051 - Fixed double call complete queuemetrics logging +# 70222-1616 - Changed queue_log PAUSE/UNPAUSE to PAUSEALL/UNPAUSEALL +# 70309-1034 - Allow amphersands and questions marks in comments to pass through +# 70313-1052 - Allow pound signs(hash) in comments to pass through +# 70319-1544 - Added agent disable update customer data function +# 70322-1545 - Added sipsak display ability # -$version = '2.0.38'; -$build = '61128-2229'; +$version = '2.0.55'; +$build = '70322-1545'; require("dbconnect.php"); @@ -240,6 +258,10 @@ if (isset($_GET["use_internal_dnc"])) {$use_internal_dnc=$_GET["use_internal_d elseif (isset($_POST["use_internal_dnc"])) {$use_internal_dnc=$_POST["use_internal_dnc"];} if (isset($_GET["omit_phone_code"])) {$omit_phone_code=$_GET["omit_phone_code"];} elseif (isset($_POST["omit_phone_code"])) {$omit_phone_code=$_POST["omit_phone_code"];} +if (isset($_GET["phone_ip"])) {$phone_ip=$_GET["phone_ip"];} + elseif (isset($_POST["phone_ip"])) {$phone_ip=$_POST["phone_ip"];} +if (isset($_GET["enable_sipsak_messages"])) {$enable_sipsak_messages=$_GET["enable_sipsak_messages"];} + elseif (isset($_POST["enable_sipsak_messages"])) {$enable_sipsak_messages=$_POST["enable_sipsak_messages"];} $user=ereg_replace("[^0-9a-zA-Z]","",$user); @@ -261,6 +283,7 @@ $CIDdate = date("mdHis"); $ENTRYdate = date("YmdHis"); if (!isset($query_date)) {$query_date = $NOW_DATE;} $MT[0]=''; +$agents='@agents'; $stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;"; if ($DB) {echo "|$stmt|\n";} @@ -375,7 +398,7 @@ if ($ACTION == 'manDiaLnextCaLL') 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) ) + if ( (strlen($callback_id)>0) and (strlen($lead_id)>0) ) { $affected_rows=1; $CBleadIDset=1; @@ -421,7 +444,7 @@ if ($ACTION == 'manDiaLnextCaLL') if ($DB) {echo "$stmt\n";} $rslt=mysql_query($stmt, $link); $affected_rows = mysql_affected_rows($link); - $lead_id = mysql_insert_id(); + $lead_id = mysql_insert_id($link); $CBleadIDset=1; } } @@ -432,7 +455,7 @@ if ($ACTION == 'manDiaLnextCaLL') if ($DB) {echo "$stmt\n";} $rslt=mysql_query($stmt, $link); $affected_rows = mysql_affected_rows($link); - $lead_id = mysql_insert_id(); + $lead_id = mysql_insert_id($link); $CBleadIDset=1; } } @@ -535,7 +558,7 @@ if ($ACTION == 'manDiaLnextCaLL') $rslt=mysql_query($stmt, $link); } - $stmt="UPDATE vicidial_agent_log set lead_id='$lead_id' where agent_log_id='$agent_log_id';"; + $stmt="UPDATE vicidial_agent_log set lead_id='$lead_id',comments='MANUAL' where agent_log_id='$agent_log_id';"; if ($format=='debug') {echo "\n";} $rslt=mysql_query($stmt, $link); @@ -579,7 +602,7 @@ if ($ACTION == 'manDiaLnextCaLL') $rslt=mysql_query($stmt, $link); ### update the agent status to INCALL in vicidial_live_agents - $stmt = "UPDATE vicidial_live_agents set status='INCALL',last_call_time='$NOW_TIME',callerid='$MqueryCID',lead_id='$lead_id' where user='$user' and server_ip='$server_ip';"; + $stmt = "UPDATE vicidial_live_agents set status='INCALL',last_call_time='$NOW_TIME',callerid='$MqueryCID',lead_id='$lead_id',comments='MANUAL' where user='$user' and server_ip='$server_ip';"; if ($DB) {echo "$stmt\n";} $rslt=mysql_query($stmt, $link); } @@ -619,6 +642,8 @@ if ($ACTION == 'manDiaLnextCaLL') $LeaD_InfO .= $CBcallback_time . "\n"; $LeaD_InfO .= $CBuser . "\n"; $LeaD_InfO .= $CBcomments . "\n"; + $LeaD_InfO .= $phone_number . "\n"; + $LeaD_InfO .= "MAIN\n"; echo $LeaD_InfO; @@ -716,7 +741,7 @@ if ($ACTION == 'manDiaLonly') $rslt=mysql_query($stmt, $link); ### update the agent status to INCALL in vicidial_live_agents - $stmt = "UPDATE vicidial_live_agents set status='INCALL',last_call_time='$NOW_TIME',callerid='$MqueryCID',lead_id='$lead_id' where user='$user' and server_ip='$server_ip';"; + $stmt = "UPDATE vicidial_live_agents set status='INCALL',last_call_time='$NOW_TIME',callerid='$MqueryCID',lead_id='$lead_id',comments='MANUAL' where user='$user' and server_ip='$server_ip';"; if ($DB) {echo "$stmt\n";} $rslt=mysql_query($stmt, $link); @@ -795,8 +820,18 @@ if ($stage == "start") } else { + $user_group=''; + $stmt="SELECT user_group FROM vicidial_users where user='$user' LIMIT 1;"; + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $ug_record_ct = mysql_num_rows($rslt); + if ($ug_record_ct > 0) + { + $row=mysql_fetch_row($rslt); + $user_group = trim("$row[0]"); + } ##### 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');"; + $stmt="INSERT INTO vicidial_log (uniqueid,lead_id,list_id,campaign_id,call_date,start_epoch,status,phone_code,phone_number,user,comments,processed,user_group) values('$uniqueid','$lead_id','$list_id','$campaign','$NOW_TIME','$StarTtime','INCALL','$phone_code','$phone_number','$user','MANUAL','N','$user_group');"; if ($DB) {echo "$stmt\n";} $rslt=mysql_query($stmt, $link); $affected_rows = mysql_affected_rows($link); @@ -844,10 +879,10 @@ if ($stage == "end") { if ($start_epoch < 1000) { - if (eregi("CLOSER",$campaign)) + if (eregi("(CLOSER|BLEND|INBND|_C$|_B$|_I$)",$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';"; + $stmt="SELECT start_epoch FROM vicidial_closer_log where phone_number='$phone_number' and lead_id='$lead_id' and user='$user' order by closecallid desc limit 1;"; } else { @@ -870,32 +905,249 @@ if ($stage == "end") } else {$length_in_sec = ($StarTtime - $start_epoch);} - if (eregi("CLOSER",$campaign)) + if (eregi("(CLOSER|BLEND|INBND|_C$|_B$|_I$)",$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); } + + ############################################# + ##### INICIAR QUEUEMETRICS LOGGING LOOKUP ##### + $stmt = "SELECT enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_log_id FROM system_settings;"; + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $qm_conf_ct = mysql_num_rows($rslt); + $i=0; + while ($i < $qm_conf_ct) + { + $row=mysql_fetch_row($rslt); + $enable_queuemetrics_logging = $row[0]; + $queuemetrics_server_ip = $row[1]; + $queuemetrics_dbname = $row[2]; + $queuemetrics_login = $row[3]; + $queuemetrics_pass = $row[4]; + $queuemetrics_log_id = $row[5]; + $i++; + } + ##### END QUEUEMETRICS LOGGING LOOKUP ##### + ########################################### + if ($auto_dial_level > 0) { + ### check to see if campaign has alt_dial enabled + $stmt="SELECT auto_alt_dial FROM vicidial_campaigns where campaign_id='$campaign';"; + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $VAC_mancall_ct = mysql_num_rows($rslt); + if ($VAC_mancall_ct > 0) + { + $row=mysql_fetch_row($rslt); + $auto_alt_dial =$row[0]; + } + else {$auto_alt_dial = 'NONE';} + if (eregi("(ALT_ONLY|ADDR3_ONLY|ALT_AND_ADDR3)",$auto_alt_dial)) + { + ### check to see if lead should be alt_dialed + $stmt="SELECT alt_dial FROM vicidial_auto_calls where lead_id='$lead_id';"; + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $VAC_mancall_ct = mysql_num_rows($rslt); + if ($VAC_mancall_ct > 0) + { + $row=mysql_fetch_row($rslt); + $alt_dial =$row[0]; + } + else {$alt_dial = 'NONE';} + + if ( (eregi("(NONE|MAIN)",$alt_dial)) and (eregi("(ALT_ONLY|ALT_AND_ADDR3)",$auto_alt_dial)) ) + { + $stmt="SELECT alt_phone,gmt_offset_now,state FROM vicidial_list where lead_id='$lead_id';"; + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $VAC_mancall_ct = mysql_num_rows($rslt); + if ($VAC_mancall_ct > 0) + { + $row=mysql_fetch_row($rslt); + $alt_phone = $row[0]; + $alt_phone = eregi_replace("[^0-9]","",$alt_phone); + $gmt_offset_now = $row[1]; + $state = $row[2]; + } + else {$alt_phone = '';} + if (strlen($alt_phone)>5) + { + ### insert record into vicidial_hopper for address3 call attempt + $stmt = "INSERT INTO vicidial_hopper SET lead_id='$lead_id',campaign_id='$campaign',status='HOLD',list_id='$list_id',gmt_offset_now='$gmt_offset_now',state='$state',alt_dial='ALT',user='';"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + } + } + if ( ( (eregi("(ALT)",$alt_dial)) and (eregi("ALT_AND_ADDR3",$auto_alt_dial)) ) or ( (eregi("(NONE|MAIN)",$alt_dial)) and (eregi("ADDR3_ONLY",$auto_alt_dial)) ) ) + { + $stmt="SELECT address3,gmt_offset_now,state FROM vicidial_list where lead_id='$lead_id';"; + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $VAC_mancall_ct = mysql_num_rows($rslt); + if ($VAC_mancall_ct > 0) + { + $row=mysql_fetch_row($rslt); + $address3 = $row[0]; + $address3 = eregi_replace("[^0-9]","",$address3); + $gmt_offset_now = $row[1]; + $state = $row[2]; + } + else {$address3 = '';} + if (strlen($address3)>5) + { + ### insert record into vicidial_hopper for address3 call attempt + $stmt = "INSERT INTO vicidial_hopper SET lead_id='$lead_id',campaign_id='$campaign',status='HOLD',list_id='$list_id',gmt_offset_now='$gmt_offset_now',state='$state',alt_dial='ADDR3',user='';"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + } + } + } + + if ($enable_queuemetrics_logging > 0) + { + ### check to see if lead should be alt_dialed + $stmt="SELECT auto_call_id,lead_id,phone_number,status,campaign_id,phone_code,alt_dial,stage,callerid,uniqueid from vicidial_auto_calls where lead_id='$lead_id';"; + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $VAC_qm_ct = mysql_num_rows($rslt); + if ($VAC_qm_ct > 0) + { + $row=mysql_fetch_row($rslt); + $auto_call_id = $row[0]; + $CLlead_id = $row[1]; + $CLphone_number = $row[2]; + $CLstatus = $row[3]; + $CLcampaign_id = $row[4]; + $CLphone_code = $row[5]; + $CLalt_dial = $row[6]; + $CLstage = $row[7]; + $CLcallerid = $row[8]; + $CLuniqueid = $row[9]; + } + + $CLstage = preg_replace("/.*-/",'',$CLstage); + if (strlen($CLstage) < 1) {$CLstage=0;} + + $linkB=mysql_connect("$queuemetrics_server_ip", "$queuemetrics_login", "$queuemetrics_pass"); + mysql_select_db("$queuemetrics_dbname", $linkB); + + $stmt="SELECT count(*) from queue_log where call_id='$MDnextCID' and verb='COMPLETECALLER';"; + $rslt=mysql_query($stmt, $linkB); + if ($DB) {echo "$stmt\n";} + $VAC_cc_ct = mysql_num_rows($rslt); + if ($VAC_cc_ct > 0) + { + $row=mysql_fetch_row($rslt); + $caller_complete = $row[0]; + } + + if ($caller_complete < 1) + { + $stmt = "INSERT INTO queue_log SET partition='P01',time_id='$StarTtime',call_id='$MDnextCID',queue='$campaign',agent='Agent/$user',verb='COMPLETEAGENT',data1='$CLstage',data2='$length_in_sec',data3='1',serverid='$queuemetrics_log_id';"; + if ($DB) {echo "$stmt\n";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $linkB); + $affected_rows = mysql_affected_rows($linkB); + } + mysql_close($linkB); + } + ### delete call record from vicidial_auto_calls - $stmt = "DELETE from vicidial_auto_calls where uniqueid='$uniqueid';"; + $stmt = "DELETE from vicidial_auto_calls where lead_id='$lead_id';"; 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';"; + + $stmt = "UPDATE vicidial_live_agents set status='PAUSED',lead_id='',uniqueid=0,callerid='',channel='',call_server_ip='',last_call_finish='$NOW_TIME',comments='' where user='$user' and server_ip='$server_ip';"; if ($DB) {echo "$stmt\n";} $rslt=mysql_query($stmt, $link); + $affected_rows = mysql_affected_rows($link); + if ($affected_rows > 0) + { + if ($enable_queuemetrics_logging > 0) + { + $linkB=mysql_connect("$queuemetrics_server_ip", "$queuemetrics_login", "$queuemetrics_pass"); + mysql_select_db("$queuemetrics_dbname", $linkB); + + $stmt = "INSERT INTO queue_log SET partition='P01',time_id='$StarTtime',call_id='NONE',queue='NONE',agent='Agent/$user',verb='PAUSARALL',serverid='$queuemetrics_log_id';"; + if ($DB) {echo "$stmt\n";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $linkB); + $affected_rows = mysql_affected_rows($linkB); + + mysql_close($linkB); + } + } } else { + if ($enable_queuemetrics_logging > 0) + { + ### check to see if lead should be alt_dialed + $stmt="SELECT auto_call_id,lead_id,phone_number,status,campaign_id,phone_code,alt_dial,stage,callerid,uniqueid from vicidial_auto_calls where lead_id='$lead_id';"; + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $VAC_qm_ct = mysql_num_rows($rslt); + if ($VAC_qm_ct > 0) + { + $row=mysql_fetch_row($rslt); + $auto_call_id = $row[0]; + $CLlead_id = $row[1]; + $CLphone_number = $row[2]; + $CLstatus = $row[3]; + $CLcampaign_id = $row[4]; + $CLphone_code = $row[5]; + $CLalt_dial = $row[6]; + $CLstage = $row[7]; + $CLcallerid = $row[8]; + $CLuniqueid = $row[9]; + } + + $CLstage = preg_replace("/XFER|-/",'',$CLstage); + if ($CLstage < 0.25) {$CLstage=0;} + + $linkB=mysql_connect("$queuemetrics_server_ip", "$queuemetrics_login", "$queuemetrics_pass"); + mysql_select_db("$queuemetrics_dbname", $linkB); + + $stmt = "INSERT INTO queue_log SET partition='P01',time_id='$StarTtime',call_id='$MDnextCID',queue='$campaign',agent='Agent/$user',verb='COMPLETEAGENT',data1='$CLstage',data2='$length_in_sec',data3='1',serverid='$queuemetrics_log_id';"; + if ($DB) {echo "$stmt\n";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $linkB); + $affected_rows = mysql_affected_rows($linkB); + + mysql_close($linkB); + } + $stmt = "DELETE from vicidial_auto_calls lead_id='$lead_id';"; 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';"; + $stmt = "UPDATE vicidial_live_agents set status='PAUSED',lead_id='',uniqueid=0,callerid='',channel='',call_server_ip='',last_call_finish='$NOW_TIME',comments='' where user='$user' and server_ip='$server_ip';"; if ($DB) {echo "$stmt\n";} $rslt=mysql_query($stmt, $link); + $affected_rows = mysql_affected_rows($link); + if ($affected_rows > 0) + { + if ($enable_queuemetrics_logging > 0) + { + $linkB=mysql_connect("$queuemetrics_server_ip", "$queuemetrics_login", "$queuemetrics_pass"); + mysql_select_db("$queuemetrics_dbname", $linkB); + + $stmt = "INSERT INTO queue_log SET partition='P01',time_id='$StarTtime',call_id='NONE',queue='NONE',agent='Agent/$user',verb='PAUSARALL',serverid='$queuemetrics_log_id';"; + if ($DB) {echo "$stmt\n";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $linkB); + $affected_rows = mysql_affected_rows($linkB); + + mysql_close($linkB); + } + } } ##### look for the channel in the UPDATED vicidial_manager record of the call initiation @@ -1095,7 +1347,7 @@ if ($ACTION == 'VDADcheckINCOMING') 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';"; + $stmt = "UPDATE vicidial_live_agents set status='INCALL',last_call_time='$NOW_TIME',comments='AUTO' where user='$user' and server_ip='$server_ip';"; if ($DB) {echo "$stmt\n";} $rslt=mysql_query($stmt, $link); @@ -1163,25 +1415,37 @@ if ($ACTION == 'VDADcheckINCOMING') $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';"; + $user_group=''; + $stmt="SELECT user_group FROM vicidial_users where user='$user' LIMIT 1;"; + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $ug_record_ct = mysql_num_rows($rslt); + if ($ug_record_ct > 0) + { + $row=mysql_fetch_row($rslt); + $user_group = trim("$row[0]"); + } + $stmt = "UPDATE vicidial_log set user='$user', comments='AUTO', list_id='$list_id', status='INCALL', user_group='$user_group' where lead_id='$lead_id' and uniqueid='$uniqueid';"; if ($DB) {echo "$stmt\n";} $rslt=mysql_query($stmt, $link); - if (eregi("CLOSER",$campaign)) + if (eregi("(CLOSER|BLEND|INBND|_C$|_B$|_I$)",$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;"; + $stmt = "UPDATE vicidial_closer_log set user='$user', comments='AUTO', list_id='$list_id', status='INCALL', user_group='$user_group' 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;"; + $stmt = "select campaign_id,phone_number,alt_dial 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) + if ($VDAC_cid_ct > 0) { $row=mysql_fetch_row($rslt); $VDADchannel_group =$row[0]; + $dialed_number =$row[1]; + $dialed_label =$row[2]; } $stmt = "select count(*) from vicidial_log where lead_id='$lead_id' and uniqueid='$uniqueid';"; @@ -1211,6 +1475,11 @@ if ($ACTION == 'VDADcheckINCOMING') $VDCL_xferconf_a_number = $row[11]; $VDCL_xferconf_b_dtmf = $row[12]; $VDCL_xferconf_b_number = $row[13]; + + ### update the comments in vicidial_live_agents record + $stmt = "UPDATE vicidial_live_agents set comments='INBOUND' where user='$user' and server_ip='$server_ip';"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); } else { @@ -1263,6 +1532,17 @@ if ($ACTION == 'VDADcheckINCOMING') $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"; + + $stmt = "select phone_number,alt_dial 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 ($VDAC_cid_ct > 0) + { + $row=mysql_fetch_row($rslt); + $dialed_number =$row[0]; + $dialed_label =$row[1]; + } } $comments = eregi_replace("\r",'',$comments); @@ -1300,6 +1580,8 @@ if ($ACTION == 'VDADcheckINCOMING') $LeaD_InfO .= $CBcallback_time . "\n"; $LeaD_InfO .= $CBuser . "\n"; $LeaD_InfO .= $CBcomments . "\n"; + $LeaD_InfO .= $dialed_number . "\n"; + $LeaD_InfO .= $dialed_label . "\n"; echo $LeaD_InfO; @@ -1327,6 +1609,7 @@ if ($ACTION == 'VDADcheckINCOMING') if ($format=='debug') {echo "\n";} $rslt=mysql_query($stmt, $link); } + } else { @@ -1354,8 +1637,18 @@ if ( (strlen($campaign)<1) || (strlen($conf_exten)<1) ) } else { + $user_group=''; + $stmt="SELECT user_group FROM vicidial_users where user='$user' LIMIT 1;"; + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $ug_record_ct = mysql_num_rows($rslt); + if ($ug_record_ct > 0) + { + $row=mysql_fetch_row($rslt); + $user_group = trim("$row[0]"); + } ##### Insert a SAIR record into the user log - $stmt="INSERT INTO vicidial_user_log values('','$user','SAIR','$campaign','$NOW_TIME','$StarTtime');"; + $stmt="INSERT INTO vicidial_user_log (user,event,campaign_id,event_date,event_epoch,user_group) values('$user','SAIR','$campaign','$NOW_TIME','$StarTtime','$user_group');"; if ($DB) {echo "$stmt\n";} $rslt=mysql_query($stmt, $link); $vul_insert = mysql_affected_rows($link); @@ -1390,11 +1683,94 @@ else $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','','','','','','','','','');"; + $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Hangup','ULGH3459$StarTtime','Channel: $agent_channel','','','','','','','','','');"; if ($format=='debug') {echo "\n";} $rslt=mysql_query($stmt, $link); } + $pause_sec=0; + $stmt = "select pause_epoch,pause_sec,wait_epoch,talk_epoch,dispo_epoch 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) and (strlen($row[3]<5)) and (strlen($row[4]<5)) ) + { + $row=mysql_fetch_row($rslt); + $pause_sec = (($StarTtime - $row[0]) + $row[1]); + + $stmt="UPDATE vicidial_agent_log set pause_sec='$pause_sec',wait_epoch='$StarTtime' where agent_log_id='$agent_log_id';"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + } + + if ($vla_delete > 0) + { + ############################################# + ##### INICIAR QUEUEMETRICS LOGGING LOOKUP ##### + $stmt = "SELECT enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_log_id,allow_sipsak_messages FROM system_settings;"; + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $qm_conf_ct = mysql_num_rows($rslt); + $i=0; + while ($i < $qm_conf_ct) + { + $row=mysql_fetch_row($rslt); + $enable_queuemetrics_logging = $row[0]; + $queuemetrics_server_ip = $row[1]; + $queuemetrics_dbname = $row[2]; + $queuemetrics_login = $row[3]; + $queuemetrics_pass = $row[4]; + $queuemetrics_log_id = $row[5]; + $allow_sipsak_messages = $row[6]; + $i++; + } + ##### END QUEUEMETRICS LOGGING LOOKUP ##### + ########################################### + if ( ($enable_sipsak_messages > 0) and ($allow_sipsak_messages > 0) and (eregi("SIP",$protocol)) ) + { + $SIPSAK_message = 'LOGGED OUT'; + passthru("/usr/local/bin/sipsak -M -O desktop -B \"$SIPSAK_message\" -r 5060 -s sip:$extension@$phone_ip > /dev/null"); + } + + if ($enable_queuemetrics_logging > 0) + { + $linkB=mysql_connect("$queuemetrics_server_ip", "$queuemetrics_login", "$queuemetrics_pass"); + mysql_select_db("$queuemetrics_dbname", $linkB); + + # $stmt = "INSERT INTO queue_log SET partition='P01',time_id='$StarTtime',call_id='NONE',queue='$campaign',agent='Agent/$user',verb='PAUSAR',serverid='1';"; + # if ($DB) {echo "$stmt\n";} + # if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + # $rslt=mysql_query($stmt, $linkB); + # $affected_rows = mysql_affected_rows($linkB); + + $stmt = "SELECT time_id FROM queue_log where agent='Agent/$user' and verb='AGENTLOGIN' order by time_id desc limit 1;"; + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $linkB); + if ($DB) {echo "$stmt\n";} + echo "$stmt\n"; + $li_conf_ct = mysql_num_rows($rslt); + $i=0; + while ($i < $li_conf_ct) + { + $row=mysql_fetch_row($rslt); + $logintime = $row[0]; + $i++; + } + + $time_logged_in = ($StarTtime - $logintime); + if ($time_logged_in > 1000000) {$time_logged_in=1;} + + $stmt = "INSERT INTO queue_log SET partition='P01',time_id='$StarTtime',call_id='NONE',queue='$campaign',agent='Agent/$user',verb='AGENTLOGOFF',data1='$user$agents',data2='$time_logged_in',serverid='$queuemetrics_log_id';"; + if ($DB) {echo "$stmt\n";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $linkB); + $affected_rows = mysql_affected_rows($linkB); + + mysql_close($linkB); + } + } + echo "$vul_insert|$vc_remove|$vla_delete|$wcs_delete|$agent_channel\n"; } } @@ -1423,7 +1799,14 @@ if ($ACTION == 'updateDISPO') if ($format=='debug') {echo "\n";} $rslt=mysql_query($stmt, $link); - if ( ($use_internal_dnc=='Y') and ($dispo_choice=='DNC') ) + if (eregi("(CLOSER|BLEND|INBND|_C$|_B$|_I$)",$campaign)) + { + $stmt = "UPDATE vicidial_closer_log set status='$dispo_choice' where lead_id='$lead_id' and user='$user' order by closecallid desc limit 1;"; + if ($DB) {echo "$stmt\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";} @@ -1450,20 +1833,91 @@ if ($ACTION == 'updateDISPO') 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');"; + $user_group=''; + $stmt="SELECT user_group FROM vicidial_users where user='$user' LIMIT 1;"; + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $ug_record_ct = mysql_num_rows($rslt); + if ($ug_record_ct > 0) + { + $row=mysql_fetch_row($rslt); + $user_group = trim("$row[0]"); + } + + $stmt="INSERT INTO vicidial_agent_log (user,server_ip,event_time,campaign_id,pause_epoch,pause_sec,wait_epoch,user_group) values('$user','$server_ip','$NOW_TIME','$campaign','$StarTtime','0','$StarTtime','$user_group');"; if ($DB) {echo "$stmt\n";} $rslt=mysql_query($stmt, $link); $affected_rows = mysql_affected_rows($link); - $agent_log_id = mysql_insert_id(); + $agent_log_id = mysql_insert_id($link); ### CHAMADABACK 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');"; + $stmt="INSERT INTO vicidial_callbacks (lead_id,list_id,campaign_id,status,entry_time,callback_time,user,recipient,comments,user_group) values('$lead_id','$list_id','$campaign','ACTIVE','$NOW_TIME','$CallBackDatETimE','$user','$recipient','$comments','$user_group');"; if ($DB) {echo "$stmt\n";} $rslt=mysql_query($stmt, $link); } + $stmt="SELECT auto_alt_dial_statuses from vicidial_campaigns where campaign_id='$campaign';"; + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + + if ( ($auto_dial_level > 0) and (ereg(" $dispo_choice ",$row[0])) ) + { + $stmt = "select count(*) from vicidial_hopper where lead_id='$lead_id' and status='HOLD';"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + + if ($row[0] > 0) + { + $stmt="UPDATE vicidial_hopper set status='READY' where lead_id='$lead_id' and status='HOLD' limit 1;"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + } + } + else + { + $stmt="DELETE from vicidial_hopper where lead_id='$lead_id' and status='HOLD';"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + } + + ############################################# + ##### INICIAR QUEUEMETRICS LOGGING LOOKUP ##### + $stmt = "SELECT enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_log_id FROM system_settings;"; + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $qm_conf_ct = mysql_num_rows($rslt); + $i=0; + while ($i < $qm_conf_ct) + { + $row=mysql_fetch_row($rslt); + $enable_queuemetrics_logging = $row[0]; + $queuemetrics_server_ip = $row[1]; + $queuemetrics_dbname = $row[2]; + $queuemetrics_login = $row[3]; + $queuemetrics_pass = $row[4]; + $queuemetrics_log_id = $row[5]; + $i++; + } + ##### END QUEUEMETRICS LOGGING LOOKUP ##### + ########################################### + if ($enable_queuemetrics_logging > 0) + { + $linkB=mysql_connect("$queuemetrics_server_ip", "$queuemetrics_login", "$queuemetrics_pass"); + mysql_select_db("$queuemetrics_dbname", $linkB); + + $stmt = "INSERT INTO queue_log SET partition='P01',time_id='$StarTtime',call_id='$MDnextCID',queue='$campaign',agent='Agent/$user',verb='CALLSTATUS',data1='$dispo_choice',serverid='$queuemetrics_log_id';"; + if ($DB) {echo "$stmt\n";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $linkB); + $affected_rows = mysql_affected_rows($linkB); + + mysql_close($linkB); + } + echo 'Lead ' . $lead_id . ' foi modificado para ' . $dispo_choice . " Status\nNext agent_log_id:\n" . $agent_log_id . "\n"; } @@ -1475,6 +1929,8 @@ if ($ACTION == 'updateLEAD') { $MT[0]=''; $row=''; $rowx=''; + $DO_NOT_UPDATE=0; + $DO_NOT_UPDATE_text=''; if ( (strlen($phone_number)<1) || (strlen($lead_id)<1) ) { echo "phone_number $phone_number or lead_id $lead_id não é válido\n"; @@ -1482,12 +1938,54 @@ if ($ACTION == 'updateLEAD') } 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";} + $stmt = "SELECT disable_alter_custdata FROM vicidial_campaigns where campaign_id='$campaign'"; + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $dac_conf_ct = mysql_num_rows($rslt); + $i=0; + while ($i < $dac_conf_ct) + { + $row=mysql_fetch_row($rslt); + $disable_alter_custdata = $row[0]; + $i++; + } + if (ereg('Y',$disable_alter_custdata)) + { + $DO_NOT_UPDATE=1; + $DO_NOT_UPDATE_text=' NOT'; + $stmt = "SELECT alter_custdata_override FROM vicidial_users where user='$user'"; + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $aco_conf_ct = mysql_num_rows($rslt); + $i=0; + while ($i < $aco_conf_ct) + { + $row=mysql_fetch_row($rslt); + $alter_custdata_override = $row[0]; + $i++; + } + if (ereg('ALLOW_ALTER',$alter_custdata_override)) + { + $DO_NOT_UPDATE=0; + $DO_NOT_UPDATE_text=''; + } + } + + if ($DO_NOT_UPDATE < 1) + { + $comments = eregi_replace("\r",'',$comments); + $comments = eregi_replace("\n",'!N',$comments); + $comments = eregi_replace("--AMP--",'&',$comments); + $comments = eregi_replace("--QUES--",'?',$comments); + $comments = eregi_replace("--POUND--",'#',$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';"; @@ -1495,7 +1993,7 @@ if ($ACTION == 'updateLEAD') $rslt=mysql_query($stmt, $link); } - echo "Lead $lead_id a informação foi atualizada\n"; + echo "Lead $lead_id information has$DO_NOT_UPDATE_text been updated\n"; } @@ -1515,10 +2013,54 @@ if ( ($ACTION == 'VDADpause') || ($ACTION == 'VDADready') ) 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';"; + $stmt="UPDATE vicidial_live_agents set lead_id='',uniqueid=0,callerid='',channel='', random_id='$random',comments='' where user='$user' and server_ip='$server_ip';"; if ($format=='debug') {echo "\n";} $rslt=mysql_query($stmt, $link); + $stmt="UPDATE vicidial_live_agents set status='$stage' where user='$user' and server_ip='$server_ip';"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + $affected_rows = mysql_affected_rows($link); + if ($affected_rows > 0) + { + ############################################# + ##### INICIAR QUEUEMETRICS LOGGING LOOKUP ##### + $stmt = "SELECT enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_log_id FROM system_settings;"; + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $qm_conf_ct = mysql_num_rows($rslt); + $i=0; + while ($i < $qm_conf_ct) + { + $row=mysql_fetch_row($rslt); + $enable_queuemetrics_logging = $row[0]; + $queuemetrics_server_ip = $row[1]; + $queuemetrics_dbname = $row[2]; + $queuemetrics_login = $row[3]; + $queuemetrics_pass = $row[4]; + $queuemetrics_log_id = $row[5]; + $i++; + } + ##### END QUEUEMETRICS LOGGING LOOKUP ##### + ########################################### + if ($enable_queuemetrics_logging > 0) + { + if (ereg('READY',$stage)) {$QMstatus='UNPAUSEALL';} + if (ereg('PAUSAR',$stage)) {$QMstatus='PAUSARALL';} + $linkB=mysql_connect("$queuemetrics_server_ip", "$queuemetrics_login", "$queuemetrics_pass"); + mysql_select_db("$queuemetrics_dbname", $linkB); + + $stmt = "INSERT INTO queue_log SET partition='P01',time_id='$StarTtime',call_id='NONE',queue='NONE',agent='Agent/$user',verb='$QMstatus',serverid='$queuemetrics_log_id';"; + if ($DB) {echo "$stmt\n";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $linkB); + $affected_rows = mysql_affected_rows($linkB); + + mysql_close($linkB); + } + } + if ($agent_log == 'NO') {$donothing=1;} else @@ -1587,6 +2129,71 @@ if ($ACTION == 'UpdatEFavoritEs') } +################################################################################ +### PauseCodeSubmit - Update vicidial_agent_log with pause code +################################################################################ +if ($ACTION == 'PausaCodeSubmit') +{ + $row=''; $rowx=''; + if ( (strlen($status)<1) || (strlen($agent_log_id)<1) ) + { + echo "agent_log_id $agent_log_id or pause_code $status não é válido\n"; + exit; + } + else + { + $stmt="UPDATE vicidial_agent_log set sub_status=\"$status\" where agent_log_id='$agent_log_id';"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + $affected_rows = mysql_affected_rows($link); + if ($affected_rows > 0) + { + ############################################# + ##### INICIAR QUEUEMETRICS LOGGING LOOKUP ##### + $stmt = "SELECT enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_log_id,allow_sipsak_messages FROM system_settings;"; + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $qm_conf_ct = mysql_num_rows($rslt); + $i=0; + while ($i < $qm_conf_ct) + { + $row=mysql_fetch_row($rslt); + $enable_queuemetrics_logging = $row[0]; + $queuemetrics_server_ip = $row[1]; + $queuemetrics_dbname = $row[2]; + $queuemetrics_login = $row[3]; + $queuemetrics_pass = $row[4]; + $queuemetrics_log_id = $row[5]; + $allow_sipsak_messages = $row[6]; + $i++; + } + ##### END QUEUEMETRICS LOGGING LOOKUP ##### + ########################################### + if ( ($enable_sipsak_messages > 0) and ($allow_sipsak_messages > 0) and (eregi("SIP",$protocol)) ) + { + $SIPSAK_prefix = 'BK-'; + passthru("/usr/local/bin/sipsak -M -O desktop -B \"$SIPSAK_prefix$status\" -r 5060 -s sip:$extension@$phone_ip > /dev/null"); + } + if ($enable_queuemetrics_logging > 0) + { + $linkB=mysql_connect("$queuemetrics_server_ip", "$queuemetrics_login", "$queuemetrics_pass"); + mysql_select_db("$queuemetrics_dbname", $linkB); + + $stmt = "INSERT INTO queue_log SET partition='P01',time_id='$StarTtime',call_id='NONE',queue='$campaign',agent='Agent/$user',verb='PAUSARREASON',serverid='$queuemetrics_log_id',data1='$status';"; + if ($DB) {echo "$stmt\n";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $linkB); + $affected_rows = mysql_affected_rows($linkB); + + mysql_close($linkB); + } + } + } +echo "Pausa Code has been updated to $status for $agent_log_id\n"; +} + + ################################################################################ ### CalLBacKLisT - List the USERONLY callbacks for an agent ################################################################################ diff --git a/agc_2-X/trunk/LANG_www/agc_br/vicidial.php b/agc_2-X/trunk/LANG_www/agc_br/vicidial.php index 47c913d6..19d06b8f 100644 --- a/agc_2-X/trunk/LANG_www/agc_br/vicidial.php +++ b/agc_2-X/trunk/LANG_www/agc_br/vicidial.php @@ -1,7 +1,7 @@ LICENSE: GPLv2 +# Copyright (C) 2007 Matt Florell 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 @@ -15,7 +15,7 @@ # - vdc_db_query.php: Updates information in the database # - manager_send.php: Sends manager actions to the DB for execution # -# CHANGES +# CHANGELOG # 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 @@ -132,8 +132,37 @@ # 61128-2229 - Added vicidial_live_agents and vicidial_auto_calls manual dial entries # 61130-1617 - Added lead_id to MonitorConf for recording_log # 61221-1212 - Changed width to 760 to better fit 800x600 screens, widened SCRIPT +# 70109-1128 - Fixed wrapup timer bug +# 70109-1635 - Added option for HotKeys automatically dialing next number in manual mode +# - Added option for alternate number dialing with hotkeys +# 70111-1600 - Added ability to use BLEND/INBND/*_C/*_B/*_I as closer campaigns +# 70118-1517 - Added vicidial_agent_log and vicidial_user_log logging of user_group +# 70201-1249 - Added FAST DIAL option for manually dialing, added UTF8 compatible code +# 70201-1703 - Fixed cursor bug for most text input fields +# 70202-1453 - Added first portions of Agent Pause Codes +# 70203-0108 - Finished Agent Pause Codes functionality +# 70203-0930 - Added dialed_number to webform output +# 70203-1010 - Added dialed_label to webform output +# 70206-1201 - Fixed allow_closers bug +# 70206-1332 - Added vicidial_recording_override users setting function +# 70212-1252 - Fixed small issue with CXFER +# 70213-1018 - Changed CXFER and AXFER to update customer information before transfer +# 70214-1233 - Added queuemetrics_log_id field for server_id in queue_log +# 70215-1240 - Added queuemetrics_log_id field for server_id in queue_log +# 70222-1617 - Changed queue_log PAUSE/UNPAUSE to PAUSEALL/UNPAUSEALL +# 70226-1252 - Added Mute/UnMute to agent screen +# 70309-1035 - Allow amphersands and questions marks in comments to pass through +# 70313-1052 - Allow pound signs(hash) in comments to pass through +# 70316-1406 - Moved the MUTE button to be accessible during a transfer/conf +# 70319-1446 - Added agent-deactive-display and disable customer info update functions +# 70319-1626 - Added option to allow agent logins to campaigns with no leads in the hopper +# 70320-1501 - Added option to allow retry of leave-3way-call from dispo screen +# 70322-1545 - Added sipsak display ability # +$version = '2.0.129'; +$build = '70322-1545'; + require("dbconnect.php"); if (isset($_GET["DB"])) {$DB=$_GET["DB"];} @@ -172,14 +201,11 @@ if (isset($_GET["relogin"])) {$relogin=$_GET["relogin"];} $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); + $VD_campaign=ereg_replace("[^0-9a-zA-Z_]","",$VD_campaign); $forever_stop=0; -$version = '2.0.105'; -$build = '61221-1212'; - if ($force_logout) { echo "Você fez o logoff. Obrigado\n"; @@ -226,6 +252,7 @@ $TEST_all_statuses = '0'; # TEST variable allows all statuses in dispo screen $US='_'; $CL=':'; $AT='@'; +$DS='-'; $date = date("r"); $ip = getenv("REMOTE_ADDR"); $browser = getenv("HTTP_USER_AGENT"); @@ -252,6 +279,7 @@ $camp_form_code = " 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $phone_login=$row[0]; @@ -438,6 +467,7 @@ $VDloginDISPLAY=0; { $stmt="SELECT count(*) from vicidial_users where user='$VD_login' and pass='$VD_pass' and user_level > 0;"; if ($DB) {echo "|$stmt|\n";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $auth=$row[0]; @@ -447,7 +477,8 @@ $VDloginDISPLAY=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,user_group from vicidial_users where user='$VD_login' and pass='$VD_pass'"; + $stmt="SELECT full_name,user_level,hotkeys_active,agent_choose_ingroups,scheduled_callbacks,agentonly_callbacks,agentcall_manual,vicidial_recording,vicidial_transfers,closer_default_blended,user_group,vicidial_recording_override from vicidial_users where user='$VD_login' and pass='$VD_pass'"; + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $LOGfullname=$row[0]; @@ -461,6 +492,8 @@ $VDloginDISPLAY=0; $VU_vicidial_transfers=$row[8]; $VU_closer_default_blended=$row[9]; $VU_user_group=$row[10]; + $VU_vicidial_recording_override=$row[11]; + if ($WeBRooTWritablE > 0) { fwrite ($fp, "vdweb|GOOD|$date|$VD_login|$VD_pass|$ip|$browser|$LOGfullname|\n"); @@ -471,6 +504,7 @@ $VDloginDISPLAY=0; {$user_abb = eregi_replace("^.","",$user_abb); $forever_stop++;} $stmt="SELECT allowed_campaigns from vicidial_user_groups where user_group='$VU_user_group';"; + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $LOGallowed_campaigns =$row[0]; @@ -501,6 +535,7 @@ echo " 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $CAMPactive=$row[0]; @@ -512,6 +547,7 @@ echo " 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $VD_statuses_ct = mysql_num_rows($rslt); @@ -528,6 +564,7 @@ echo " 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $VD_statuses_camp = mysql_num_rows($rslt); @@ -548,6 +585,7 @@ echo " 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $HK_statuses_camp = mysql_num_rows($rslt); @@ -577,43 +615,46 @@ echo " 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $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]; - $allcalls_delay=$row[30]; - $omit_phone_code=$row[31]; + $park_ext = $row[0]; + $park_file_name = $row[1]; + $web_form_address = $row[2]; + $allow_closers = $row[3]; + $auto_dial_level = $row[4]; + $dial_timeout = $row[5]; + $dial_prefix = $row[6]; + $campaign_cid = $row[7]; + $campaign_vdad_exten = $row[8]; + $campaign_rec_exten = $row[9]; + $campaign_recording = $row[10]; + $campaign_rec_filename = $row[11]; + $campaign_script = $row[12]; + $get_call_launch = $row[13]; + $campaign_am_message_exten = $row[14]; + $xferconf_a_dtmf = $row[15]; + $xferconf_a_number = $row[16]; + $xferconf_b_dtmf = $row[17]; + $xferconf_b_number = $row[18]; + $alt_number_dialing = $row[19]; + $VC_scheduled_callbacks = $row[20]; + $wrapup_segundos = $row[21]; + $wrapup_message = $row[22]; + $closer_campaigns = $row[23]; + $use_internal_dnc = $row[24]; + $allcalls_delay = $row[25]; + $omit_phone_code = $row[26]; + $agent_pause_codes_active = $row[27]; + $no_hopper_leads_logins = $row[28]; + if ( (!ereg('DISABLED',$VU_vicidial_recording_override)) and ($VU_vicidial_recording > 0) ) + { + $campaign_recording = $VU_vicidial_recording_override; + print "\n"; + } if ( ($VC_scheduled_callbacks=='Y') and ($VU_scheduled_callbacks=='1') ) {$scheduled_callbacks='1';} if ($VU_vicidial_recording=='0') @@ -626,12 +667,37 @@ echo " 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $VD_pause_codes = mysql_num_rows($rslt); + $j=0; + while ($j < $VD_pause_codes) + { + $row=mysql_fetch_row($rslt); + $pause_codes[$i] =$row[0]; + $pause_code_names[$i] =$row[1]; + $VARpause_codes = "$VARpause_codes'$pause_codes[$i]',"; + $VARpause_code_names = "$VARpause_code_names'$pause_code_names[$i]',"; + $i++; + $j++; + } + $VD_pause_codes_ct = ($VD_pause_codes_ct+$VD_pause_codes); + $VARpause_codes = substr("$VARpause_codes", 0, -1); + $VARpause_code_names = substr("$VARpause_code_names", 0, -1); + } + ##### grab the inbound groups to choose from if campaign contains CLOSER $VARingroups="''"; - if (eregi("CLOSER", $VD_campaign)) + if (eregi("(CLOSER|BLEND|INBND|_C$|_B$|_I$)", $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;"; + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $closer_ct = mysql_num_rows($rslt); @@ -648,6 +714,7 @@ echo " 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $row=mysql_fetch_row($rslt); @@ -708,6 +775,7 @@ echo " 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $authphone=$row[0]; @@ -746,6 +814,7 @@ 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";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $extension=$row[0]; @@ -808,6 +877,7 @@ else $DBX_user=$row[57]; $DBX_pass=$row[58]; $DBX_port=$row[59]; + $enable_sipsak_messages=$row[66]; if ($clientDST) { @@ -822,6 +892,7 @@ else $stmt="SELECT asterisk_version from servers where server_ip='$server_ip';"; if ($DB) {echo "|$stmt|\n";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $asterisk_version=$row[0]; @@ -875,21 +946,25 @@ else $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";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $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";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); - if ( (eregi("CLOSER", $VD_campaign)) || ($campaign_leads_to_call > 0) ) + if ( (eregi("(CLOSER|BLEND|INBND|_C$|_B$|_I$)", $VD_campaign)) || ($campaign_leads_to_call > 0) || (ereg('Y',$no_hopper_leads_logins)) ) { ### 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')"; + $stmt = "INSERT INTO vicidial_user_log (user,event,campaign_id,event_date,event_epoch,user_group) values('$VD_login','LOGIN','$VD_campaign','$NOW_TIME','$StarTtimE','$VU_user_group')"; if ($DB) {echo "|$stmt|\n";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $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;"; + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $prev_login_ct = mysql_num_rows($rslt); @@ -906,6 +981,7 @@ 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;"; + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $free_conf_ct = mysql_num_rows($rslt); @@ -917,6 +993,7 @@ else $i++; } $stmt="UPDATE vicidial_conferences set extension='$SIP_user' where server_ip='$server_ip' and conf_exten='$session_id';"; + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); print "\n"; @@ -924,18 +1001,21 @@ else $stmt="UPDATE vicidial_list set status='N', user='' where status IN('QUEUE','INCALL') and user ='$VD_login';"; if ($DB) {echo "$stmt\n";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $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";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $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";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); $affected_rows = mysql_affected_rows($link); print "\n"; @@ -943,11 +1023,45 @@ else # 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 + ### set the callerID for manager middleware-app to connect the phone to the user $SIqueryCID = "S$CIDdate$session_id"; + + ############################################# + ##### INICIAR SYSTEM_SETTINGS LOOKUP ##### + $stmt = "SELECT enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_log_id,vicidial_agent_disable,allow_sipsak_messages FROM system_settings;"; + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $qm_conf_ct = mysql_num_rows($rslt); + $i=0; + while ($i < $qm_conf_ct) + { + $row=mysql_fetch_row($rslt); + $enable_queuemetrics_logging = $row[0]; + $queuemetrics_server_ip = $row[1]; + $queuemetrics_dbname = $row[2]; + $queuemetrics_login = $row[3]; + $queuemetrics_pass = $row[4]; + $queuemetrics_log_id = $row[5]; + $vicidial_agent_disable = $row[6]; + $allow_sipsak_messages = $row[7]; + $i++; + } + ##### END QUEUEMETRICS LOGGING LOOKUP ##### + ########################################### + + if ( ($enable_sipsak_messages > 0) and ($allow_sipsak_messages > 0) and (eregi("SIP",$protocol)) ) + { + $SIPSAK_prefix = 'LIN-'; + print "\n"; + passthru("/usr/local/bin/sipsak -M -O desktop -B \"$SIPSAK_prefix$VD_campaign\" -r 5060 -s sip:$extension@$phone_ip > /dev/null"); + $SIqueryCID = "$SIPSAK_prefix$VD_campaign$DS$CIDdate"; + } + ### 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";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); $affected_rows = mysql_affected_rows($link); print "\n"; @@ -959,13 +1073,38 @@ else $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";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); $affected_rows = mysql_affected_rows($link); print "\n"; - if (eregi("CLOSER", $VD_campaign)) + if ($enable_queuemetrics_logging > 0) { - print "\n"; + $linkB=mysql_connect("$queuemetrics_server_ip", "$queuemetrics_login", "$queuemetrics_pass"); + mysql_select_db("$queuemetrics_dbname", $linkB); + + $stmt = "INSERT INTO queue_log SET partition='P01',time_id='$StarTtimE',call_id='NONE',queue='$VD_campaign',agent='Agent/$VD_login',verb='AGENTLOGIN',data1='$VD_login@agents',serverid='$queuemetrics_log_id';"; + if ($DB) {echo "$stmt\n";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $linkB); + $affected_rows = mysql_affected_rows($linkB); + print "\n"; + + $stmt = "INSERT INTO queue_log SET partition='P01',time_id='$StarTtimE',call_id='NONE',queue='NONE',agent='Agent/$VD_login',verb='PAUSARALL',serverid='$queuemetrics_log_id';"; + if ($DB) {echo "$stmt\n";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $linkB); + $affected_rows = mysql_affected_rows($linkB); + print "\n"; + + mysql_close($linkB); + mysql_select_db("$VARDB_database", $link); + } + + + if (eregi("(CLOSER|BLEND|INBND|_C$|_B$|_I$)", $VD_campaign)) + { + print "\n"; } } else @@ -974,9 +1113,33 @@ else $stmt="INSERT INTO vicidial_live_agents (user,server_ip,conf_exten,extension,status,lead_id,campaign_id,uniqueid,callerid,channel,random_id,last_call_time,last_update_time,last_call_finish,user_level) values('$VD_login','$server_ip','$session_id','$SIP_user','PAUSED','','$VD_campaign','','','','$random','$NOW_TIME','$tsNOW_TIME','$NOW_TIME','$user_level');"; if ($DB) {echo "$stmt\n";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); $affected_rows = mysql_affected_rows($link); print "\n"; + + if ($enable_queuemetrics_logging > 0) + { + $linkB=mysql_connect("$queuemetrics_server_ip", "$queuemetrics_login", "$queuemetrics_pass"); + mysql_select_db("$queuemetrics_dbname", $linkB); + + $stmt = "INSERT INTO queue_log SET partition='P01',time_id='$StarTtimE',call_id='NONE',queue='$VD_campaign',agent='Agent/$VD_login',verb='AGENTLOGIN',data1='$VD_login@agents',serverid='$queuemetrics_log_id';"; + if ($DB) {echo "$stmt\n";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $linkB); + $affected_rows = mysql_affected_rows($linkB); + print "\n"; + + $stmt = "INSERT INTO queue_log SET partition='P01',time_id='$StarTtimE',call_id='NONE',queue='NONE',agent='Agent/$VD_login',verb='PAUSARALL',serverid='$queuemetrics_log_id';"; + if ($DB) {echo "$stmt\n";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $linkB); + $affected_rows = mysql_affected_rows($linkB); + print "\n"; + + mysql_close($linkB); + mysql_select_db("$VARDB_database", $link); + } } } else @@ -1027,11 +1190,12 @@ echo "
0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); $affected_rows = mysql_affected_rows($link); - $agent_log_id = mysql_insert_id(); + $agent_log_id = mysql_insert_id($link); print "\n"; $S='*'; @@ -1048,6 +1212,7 @@ echo " 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $MM_scripts = mysql_num_rows($rslt); @@ -1225,6 +1390,10 @@ $CCAL_OUT .= "
"; var CallBackCommenTs = ''; var scheduled_callbacks = ''; var dispo_check_all_pause = ''; + var agent_pause_codes_active = ''; + VARpause_codes = new Array(); + VARpause_code_names = new Array(); + var VD_pause_codes_ct = ''; VARstatuses = new Array(); VARstatusnames = new Array(); var VD_statuses_ct = ''; @@ -1277,6 +1446,7 @@ $CCAL_OUT .= "
"; var dialplan_number = ''; var ext_context = ''; var protocol = ''; + var agentchannel = ''; var local_gmt =''; var server_ip = ''; var server_ip_dialstring = ''; @@ -1292,6 +1462,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} var CalLCID = ''; var MDnextCID = ''; var XDnextCID = ''; + var LasTCID = ''; var lead_dial_number = ''; var MD_channel_look = 0; var XD_channel_look = 0; @@ -1324,11 +1495,6 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} var CalL_AutO_LauncH = ''; var panel_bgcolor = '#E0C2D6'; var CusTCB_bgcolor = '#FFFF66'; - var status_A = ''; - var status_B = ''; - var status_C = ''; - var status_D = ''; - var status_E = ''; var auto_dial_level = ''; var starting_dial_level = ''; var dial_timeout = ''; @@ -1428,11 +1594,24 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} var no_delete_sessions = ''; var webform_session = ''; var local_consult_xfers = ''; + var vicidial_agent_disable = ''; var CBentry_time = ''; var CBcallback_time = ''; var CBuser = ''; var CBcomments = ''; var volumecontrol_active = ''; + var PausaCode_HTML = ''; + var manual_auto_hotkey = 0; + var dialed_number = ''; + var dialed_label = ''; + var DispO3waychannel = ''; + var DispO3wayXtrAchannel = ''; + var DispO3wayCalLserverip = ''; + var DispO3wayCalLxfernumber = ''; + var DispO3wayCalLcamptail = ''; + var phone_ip = ''; + var enable_sipsak_messages = ''; + var allow_sipsak_messages = ''; var DiaLControl_auto_HTML = "\"Pausa\"\"Início\""; var DiaLControl_auto_HTML_ready = "\"Pausa\"\"Início\""; var DiaLControl_auto_HTML_OFF = "\"Pausa\"\"Início\""; @@ -1536,8 +1715,12 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} // ################################################################################ // Send volume control command for meetme participant - function volume_control(taskdirection,taskvolchannel) + function volume_control(taskdirection,taskvolchannel,taskagentmute) { + if (taskagentmute=='AgenT') + { + taskvolchannel = agentchannel; + } var xmlhttp=false; /*@cc_on @*/ /*@if (@_jscript_version >= 5) @@ -1576,6 +1759,18 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} } delete xmlhttp; } + if (taskagentmute=='AgenT') + { + if (taskdirection=='MUTING') + { + document.getElementById("AgentMuteSpan").innerHTML = ""; + } + else + { + document.getElementById("AgentMuteSpan").innerHTML = ""; + } + } + } @@ -1590,9 +1785,9 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} // ################################################################################ // place 3way and customer into other conference and fake-hangup the lines - function leave_3way_call() + function leave_3way_call(tempvarattempt) { - mainxfer_send_redirect('3WAY'); + mainxfer_send_redirect('3WAY','','',tempvarattempt); document.vicidial_form.callchannel.value = ''; document.vicidial_form.callserverip.value = ''; @@ -1653,6 +1848,35 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} // Send Originate command to manager to place a phone call function basic_originate_call(tasknum,taskprefix,taskreverse,taskdialvalue,tasknowait,taskconfxfer) { + var regCXFvars = new RegExp("CXFER","g"); + var tasknum_string = tasknum.toString(); + if (tasknum_string.match(regCXFvars)) + { + var Ctasknum = tasknum_string.replace(regCXFvars, ''); + if (Ctasknum.length < 2) + {Ctasknum = '990009';} + var closerxfercamptail = '_L' + document.vicidial_form.xfercode.value; + tasknum = Ctasknum + "*CL_" + campaign + '' + closerxfercamptail + '*CXFER*' + document.vicidial_form.lead_id.value + '**' + document.vicidial_form.phone_number.value + '*' + user + '*'; + + CustomerData_update(); + + } + var regAXFvars = new RegExp("AXFER","g"); + if (tasknum_string.match(regAXFvars)) + { + var Ctasknum = tasknum_string.replace(regAXFvars, ''); + if (Ctasknum.length < 2) + {Ctasknum = '83009';} + var closerxfercamptail = '_L' + document.vicidial_form.xfercode.value; + if (closerxfercamptail.length < 3) + {closerxfercamptail = 'IVR';} + tasknum = Ctasknum + '*' + document.vicidial_form.phone_number.value + '*' + document.vicidial_form.lead_id.value + '*' + campaign + '*' + closerxfercamptail + '*' + user + '*'; + + CustomerData_update(); + + } + + var xmlhttp=false; /*@cc_on @*/ /*@if (@_jscript_version >= 5) @@ -1674,27 +1898,6 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} } if (xmlhttp) { - var regCXFvars = new RegExp("CXFER","g"); - var tasknum_string = tasknum.toString(); - if (tasknum_string.match(regCXFvars)) - { - var Ctasknum = tasknum_string.replace(regCXFvars, ''); - if (Ctasknum.length < 2) - {Ctasknum = '990009';} - var closerxfercamptail = '_L' + document.vicidial_form.xfercode.value; - tasknum = Ctasknum + "*CL_" + campaign + '' + closerxfercamptail + '**' + document.vicidial_form.lead_id.value + '**' + document.vicidial_form.phone_number.value + '*' + user + '*'; - } - var regAXFvars = new RegExp("AXFER","g"); - if (tasknum_string.match(regAXFvars)) - { - var Ctasknum = tasknum_string.replace(regAXFvars, ''); - if (Ctasknum.length < 2) - {Ctasknum = '83009';} - var closerxfercamptail = '_L' + document.vicidial_form.xfercode.value; - if (closerxfercamptail.length < 3) - {closerxfercamptail = 'IVR';} - tasknum = Ctasknum + '*' + document.vicidial_form.phone_number.value + '*' + document.vicidial_form.lead_id.value + '*' + campaign + '*' + closerxfercamptail + '*' + user + '*'; - } if (taskprefix == 'NO') {var orig_prefix = '';} else {var orig_prefix = agc_dial_prefix;} if (taskreverse == 'YES') @@ -1858,7 +2061,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} UnixTime = parseInt(UnixTime); UnixTimeMS = (UnixTime * 1000); t.setTime(UnixTimeMS); - if (agentcallsstatus == '1') + if ( (agentcallsstatus == '1') || (vicidial_agent_disable != 'NOT_ACTIVE') ) { var Astatus_array = check_time_array[2].split("Status: "); var AGStatuS = Astatus_array[1]; @@ -1872,6 +2075,14 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} { document.getElementById("AgentStatusCalls").innerHTML = CamPCalLs; } + if ( (AGStatuS == 'DEAD_VLA') && ( (vicidial_agent_disable == 'LIVE_AGENT') || (vicidial_agent_disable == 'ALL') ) ) + { + showDiv('AgenTDisablEBoX'); + } + if ( (AGStatuS == 'DEAD_EXTERNAL') && ( (vicidial_agent_disable == 'EXTERNAL') || (vicidial_agent_disable == 'ALL') ) ) + { + showDiv('AgenTDisablEBoX'); + } } var check_conf_array=check_ALL_array[1].split("|"); var live_conf_calls = check_conf_array[0]; @@ -1903,14 +2114,13 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} {var row_color = '#CCCCFF';} var conv_ct = (loop_ct + conv_start); var channelfieldA = conf_chan_array[conv_ct]; - // live_conf_HTML = live_conf_HTML + "
" + loop_ct + "" + channelfieldA + "HangupTRANFERENCIA
" + loop_ct + "" + channelfieldA + "DESLIGAR
" + loop_ct + "" + channelfieldA + "DESLIGAR    
" + loop_ct + "" + channelfieldA + "DESLIGAR          
PAUSAR CODE
"; + var loop_ct = 0; + while (loop_ct < VD_pause_codes_ct) + { + PausaCode_HTML = PausaCode_HTML + "" + VARpause_codes[loop_ct] + " - " + VARpause_code_names[loop_ct] + "

"; + loop_ct++; + if (loop_ct == VD_pause_codes_ct_half) + {PausaCode_HTML = PausaCode_HTML + "
";} + } + PausaCode_HTML = PausaCode_HTML + "


Voltar"; + document.getElementById("PausaCodeSelectContent").innerHTML = PausaCode_HTML; + } + } // ################################################################################ // open web form, then submit disposition @@ -4114,7 +4527,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} } if (xmlhttp) { - DSupdate_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=updateDISPO&format=text&user=" + user + "&pass=" + pass + "&dispo_choice=" + DispoChoice + "&lead_id=" + document.vicidial_form.lead_id.value + "&campaign=" + campaign + "&auto_dial_level=" + auto_dial_level + "&agent_log_id=" + agent_log_id + "&CallBackDatETimE=" + CallBackDatETimE + "&list_id=" + document.vicidial_form.list_id.value + "&recipient=" + CallBackrecipient + "&use_internal_dnc=" + use_internal_dnc + "&comments=" + CallBackCommenTs; + DSupdate_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=updateDISPO&format=text&user=" + user + "&pass=" + pass + "&dispo_choice=" + DispoChoice + "&lead_id=" + document.vicidial_form.lead_id.value + "&campaign=" + campaign + "&auto_dial_level=" + auto_dial_level + "&agent_log_id=" + agent_log_id + "&CallBackDatETimE=" + CallBackDatETimE + "&list_id=" + document.vicidial_form.list_id.value + "&recipient=" + CallBackrecipient + "&use_internal_dnc=" + use_internal_dnc + "&MDnextCID=" + LasTCID + "&comments=" + CallBackCommenTs; xmlhttp.open('POST', 'vdc_db_query.php'); xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8'); xmlhttp.send(DSupdate_query); @@ -4124,8 +4537,8 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} { var check_dispo = null; check_dispo = xmlhttp.responseText; - // alert(xmlhttp.responseText); var check_DS_array=check_dispo.split("\n"); + // alert(xmlhttp.responseText + "\n|" + check_DS_array[1] + "\n|" + check_DS_array[2] + "|"); if (check_DS_array[1] == 'Next agent_log_id:') { agent_log_id = check_DS_array[2]; @@ -4203,12 +4616,67 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} AutoDial_ReSume_PauSe("VDADready","NO"); // document.getElementById("DiaLControl").innerHTML = DiaLControl_auto_HTML_ready; } + else + { + // trigger HotKeys manual dial automatically go to next lead + if (manual_auto_hotkey == '1') + { + manual_auto_hotkey = 0; + ManualDialNext('','','','',''); + } + } } } } } } + +// ################################################################################ +// Submit the Pausa Code + function PauseCodeSelect_submit(newpausecode) + { + hideDiv('PausaCodeSelectBox'); + WaitingForNextStep=0; + + var xmlhttp=false; + /*@cc_on @*/ + /*@if (@_jscript_version >= 5) + // JScript gives us Conditional compilation, we can cope with old IE versions. + // and security blocked creation of the objects. + try { + xmlhttp = new ActiveXObject("Msxml2.XMLHTTP"); + } catch (e) { + try { + xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); + } catch (E) { + xmlhttp = false; + } + } + @end @*/ + if (!xmlhttp && typeof XMLHttpRequest!='undefined') + { + xmlhttp = new XMLHttpRequest(); + } + if (xmlhttp) + { + VMCpausecode_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=PausaCodeSubmit&format=text&status=" + newpausecode + "&agent_log_id=" + agent_log_id + "&campaign=" + campaign + "&extension=" + extension + "&protocol=" + protocol + "&phone_ip=" + phone_ip + "&enable_sipsak_messages=" + enable_sipsak_messages; + xmlhttp.open('POST', 'vdc_db_query.php'); + xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8'); + xmlhttp.send(VMCpausecode_query); + xmlhttp.onreadystatechange = function() + { + if (xmlhttp.readyState == 4 && xmlhttp.status == 200) + { + // alert(xmlhttp.responseText); + } + } + delete xmlhttp; + } + } + + + // ################################################################################ // Populate the dtmf and xfer number for each preset link in xfer-conf frame function DtMf_PreSet_a() @@ -4302,7 +4770,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} } if (xmlhttp) { - VMCoriginate_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=Originate&format=text&channel=" + originatevalue + "&queryCID=" + queryCID + "&exten=" + session_id + "&ext_context=" + ext_context + "&ext_priority=1"; + VMCoriginate_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=OriginateVDRelogin&format=text&channel=" + originatevalue + "&queryCID=" + queryCID + "&exten=" + session_id + "&ext_context=" + ext_context + "&ext_priority=1" + "&extension=" + extension + "&protocol=" + protocol + "&phone_ip=" + phone_ip + "&enable_sipsak_messages=" + enable_sipsak_messages + "&allow_sipsak_messages=" + allow_sipsak_messages + "&campaign=" + campaign; xmlhttp.open('POST', 'manager_send.php'); xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8'); xmlhttp.send(VMCoriginate_query); @@ -4489,7 +4957,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} } if (xmlhttp) { - VDlogout_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=userLOGout&format=text&user=" + user + "&pass=" + pass + "&campaign=" + campaign + "&conf_exten=" + session_id + "&extension=" + extension + "&protocol=" + protocol + "&no_delete_sessions=" + no_delete_sessions; + VDlogout_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=userLOGout&format=text&user=" + user + "&pass=" + pass + "&campaign=" + campaign + "&conf_exten=" + session_id + "&extension=" + extension + "&protocol=" + protocol + "&agent_log_id=" + agent_log_id + "&no_delete_sessions=" + no_delete_sessions + "&phone_ip=" + phone_ip + "&enable_sipsak_messages=" + enable_sipsak_messages; xmlhttp.open('POST', 'vdc_db_query.php'); xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8'); xmlhttp.send(VDlogout_query); @@ -4536,14 +5004,24 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} document.vicidial_form.inert_button.focus(); document.vicidial_form.inert_button.blur(); CustomerData_update(); - HKdispo_display = 4; - HKfinish=1; var HKdispo_ary = HKdispo.split(" ----- "); - document.getElementById("HotKeyDispo").innerHTML = HKdispo_ary[0] + " - " + HKdispo_ary[1]; - showDiv('HotKeyActionBox'); - hideDiv('HotKeyEntriesBox'); - document.vicidial_form.DispoSelection.value = HKdispo_ary[0]; - dialedcall_send_hangup('NO'); + if ( (HKdispo_ary[0] == 'ALTPH2') || (HKdispo_ary[0] == 'ADDR3') ) + { + if (document.vicidial_form.DiaLAltPhonE.checked==true) + { + dialedcall_send_hangup('NO', 'YES', HKdispo_ary[0]); + } + } + else + { + HKdispo_display = 4; + HKfinish=1; + document.getElementById("HotKeyDispo").innerHTML = HKdispo_ary[0] + " - " + HKdispo_ary[1]; + showDiv('HotKeyActionBox'); + hideDiv('HotKeyEntriesBox'); + document.vicidial_form.DispoSelection.value = HKdispo_ary[0]; + dialedcall_send_hangup('NO', 'YES', HKdispo_ary[0]); + } // DispoSelect_submit(); // AutoDialWaiting = 1; // AutoDial_ReSume_PauSe("VDADready"); @@ -4899,11 +5377,11 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} hideDiv('CBcommentsBox'); hideDiv('HotKeyActionBox'); hideDiv('HotKeyEntriesBox'); - hideDiv('MainXfeRBox'); hideDiv('MainPanel'); hideDiv('ScriptPanel'); hideDiv('DispoSelectBox'); hideDiv('LogouTBox'); + hideDiv('AgenTDisablEBoX'); hideDiv('CustomerGoneBox'); hideDiv('NoneInSessionBox'); hideDiv('WrapupBox'); @@ -4915,6 +5393,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} hideDiv('DispoButtonHideC'); hideDiv('CallBacKsLisTBox'); hideDiv('NeWManuaLDiaLBox'); + hideDiv('PausaCodeSelectBox'); if (agentonly_callbacks != '1') {hideDiv('CallbacksButtons');} // if ( (agentcall_manual != '1') && (starting_dial_level > 0) ) @@ -4930,6 +5409,15 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} {hideDiv('VolumeControlSpan');} document.vicidial_form.LeadLookuP.checked=true; + if (agent_pause_codes_active=='Y') + { + document.getElementById("PausaCodeLinkSpan").innerHTML = "DÊ ENTRADA A um CÓDIGO Da PAUSA"; + } + if (VICIDiaL_allow_closers < 1) + { + document.getElementById("InternalCloser").style.visibility = 'hidden'; + document.getElementById("LocalCloser").style.visibility = 'hidden'; + } document.getElementById("sessionIDspan").innerHTML = session_id; if ( (campaign_recording == 'NEVER') || (campaign_recording == 'ALLFORCE') ) { @@ -4962,6 +5450,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} if (wrapup_segundos > 0) { showDiv('WrapupBox'); + document.getElementById("WrapupTimer").innerHTML = wrapup_segundos; wrapup_waiting=1; } CustomerData_update(); @@ -4994,39 +5483,6 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} if ( (custchannellive < -30) && (lastcustchannel.length > 3) ) {CustomerChanneLGone();} if ( (custchannellive < -10) && (lastcustchannel.length > 3) ) {ReChecKCustoMerChaN();} if ( (nochannelinsession > 16) && (check_n > 15) ) {NoneInSession();} - if (wrapup_segundos > 0) - { - document.getElementById("WrapupTimer").innerHTML = (wrapup_segundos - wrapup_counter); - wrapup_counter++; - if ( (wrapup_counter > wrapup_segundos) && (document.getElementById("WrapupBox").style.visibility == 'visible') ) - { - wrapup_waiting=0; - hideDiv('WrapupBox'); - if (document.vicidial_form.DispoSelectStop.checked==true) - { - if (auto_dial_level != '0') - { - AutoDialWaiting = 0; - AutoDial_ReSume_PauSe("VDADpause","NO"); - // document.getElementById("DiaLControl").innerHTML = DiaLControl_auto_HTML; - } - VICIDiaL_pause_calling = 1; - if (dispo_check_all_pause != '1') - { - document.vicidial_form.DispoSelectStop.checked=false; - } - } - else - { - if (auto_dial_level != '0') - { - AutoDialWaiting = 1; - AutoDial_ReSume_PauSe("VDADready","NO"); - // document.getElementById("DiaLControl").innerHTML = DiaLControl_auto_HTML_ready; - } - } - } - } if (WaitingForNextStep==0) { // check for live channels in conference room and get current datetime @@ -5108,6 +5564,39 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} // parked_calls_display_refresh(); } } + if (wrapup_segundos > 0) + { + document.getElementById("WrapupTimer").innerHTML = (wrapup_segundos - wrapup_counter); + wrapup_counter++; + if ( (wrapup_counter > wrapup_segundos) && (document.getElementById("WrapupBox").style.visibility == 'visible') ) + { + wrapup_waiting=0; + hideDiv('WrapupBox'); + if (document.vicidial_form.DispoSelectStop.checked==true) + { + if (auto_dial_level != '0') + { + AutoDialWaiting = 0; + AutoDial_ReSume_PauSe("VDADpause","NO"); + // document.getElementById("DiaLControl").innerHTML = DiaLControl_auto_HTML; + } + VICIDiaL_pause_calling = 1; + if (dispo_check_all_pause != '1') + { + document.vicidial_form.DispoSelectStop.checked=false; + } + } + else + { + if (auto_dial_level != '0') + { + AutoDialWaiting = 1; + AutoDial_ReSume_PauSe("VDADready","NO"); + // document.getElementById("DiaLControl").innerHTML = DiaLControl_auto_HTML_ready; + } + } + } + } } } setTimeout("all_refresh()", refresh_interval); @@ -5165,6 +5654,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} if (Cmon == 9) {Cmon = "OUT";} if (Cmon == 10) {Cmon = "NOV";} if (Cmon == 11) {Cmon = "DEZ";} + if (Chours == 12) {AMPM = 'PM';} if (Chours > 12) {Chours = (Chours - 12); AMPM = 'PM';} if (Cmin < 10) {Cmin = "0" + Cmin;} if (Csec < 10) {Csec = "0" + Csec;} @@ -5300,25 +5790,6 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} } } - - function showMainXfeR(divvar,taskxferchan,taskxferchanmain) - { - document.getElementById("MainXfeRBox").style.visibility = 'visible'; - getactiveext("MainXfeRBox"); - conference_list_display_refresh("MainXfeRconfContent"); - var XfeR_channel = taskxferchan; - document.vicidial_form.H_XfeR_channel.value = XfeR_channel; - document.vicidial_form.M_XfeR_channel.value = taskxferchanmain; - document.getElementById("MainXfeRChanneL").innerHTML = XfeR_channel; - } - function hideMainXfeR(divvar) - { - document.getElementById("MainXfeRBox").style.visibility = 'hidden'; - var XfeR_channel = ''; - document.vicidial_form.H_XfeR_channel.value = ''; - document.vicidial_form.M_XfeR_channel.value = ''; - document.getElementById("MainXfeRChanneL").innerHTML = ''; - } function conf_channels_detail(divvar) { if (divvar == 'SHOW') @@ -5360,6 +5831,10 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} { if (showxfervar == 'ON') { + var xfer_height = 310; + if (alt_phone_dialing>0) {xfer_height = (xfer_height + 20);} + if ( (auto_dial_level == 0) && (manual_dial_preview == 1) ) {xfer_height = (xfer_height + 20);} + document.getElementById("TransferMain").style.top = xfer_height; HKbutton_allowed = 0; showDiv('TransferMain'); document.getElementById("XferControl").innerHTML = "\"Transferir"; @@ -5428,17 +5903,13 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} - - @@ -5490,15 +5961,23 @@ echo "\n";

VICIDISCAR
- -DISCAGEM MANUAL
+ +DISCAGEM MANUAL       SELETOR RÁPIDO
- + 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.
@@ -5509,7 +5988,7 @@ echo "\n";
- + - + @@ -5533,7 +6014,8 @@ echo "\n"; - +
NOVA DISCAGEM MANUAL PARA :

Digite abaixo a informação do novo contato que você deseja ligar.
\n";
  (Normalmente é 1 nos EUA-Canada)
Telefone Number:   (12 digits max - digits only) +   (12 digits max - digits only) +
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)  (digitos apenas por favor) +

Discar Agora @@ -5557,6 +6039,7 @@ Your Status:
Calls Dialing:
+
Transferir a conferência
CLOSER INTERNO @@ -5582,11 +6065,12 @@ Your Status:
Calls Dialing: Transferência sem acompanhamento Blind Transfer VMail Message
+
- +
Status da ligação definida como:

-
@@ -5594,7 +6078,7 @@ Your Status:
Calls Dialing: + @@ -5610,7 +6094,7 @@ Your Status:
Calls Dialing: +
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:
@@ -5627,7 +6111,7 @@ Your Status:
Calls Dialing: +
Informação Precedente Da Rechamada:
Não existe ninguem na sua sessão:
Voltar

@@ -5635,7 +6119,7 @@ Your Status:
Calls Dialing: + "; if (volumecontrol_active!=1) { live_conf_HTML = live_conf_HTML + ""; } else { - live_conf_HTML = live_conf_HTML + ""; + live_conf_HTML = live_conf_HTML + ""; } // var debugspan = document.getElementById("debugbottomspan").innerHTML; @@ -1926,6 +2136,29 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} {custchannellive++;} } + if (volumecontrol_active > 0) + { + if (protocol != 'EXTERNAL') + { + var regAGNTchan = new RegExp(protocol + '/' + extension,"g"); + if ( (channelfieldA.match(regAGNTchan)) && (agentchannel != channelfieldA) ) + { + agentchannel = channelfieldA; + + document.getElementById("AgentMuteSpan").innerHTML = ""; + } + } + else + { + if (agentchannel.length < 3) + { + agentchannel = channelfieldA; + + document.getElementById("AgentMuteSpan").innerHTML = ""; + } + } + } + // document.getElementById("debugbottomspan").innerHTML = debugspan + '
' + channelfieldA + '|' + lastcustchannel + '|' + custchannellive + '|' + LMAcontent_change + '|' + LMAalter; if (!LMAe[ARY_ct]) @@ -1952,7 +2185,11 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} if (LMAcontent_change > 0) { if (conf_channels_xtra_display == 1) - {document.getElementById("outboundcallsspan").innerHTML = live_conf_HTML;} + { + // document.getElementById("MainPanel").style.overflow = 'visible'; + document.getElementById("outboundcallsspan").innerHTML = live_conf_HTML; + // document.getElementById("MainPanel").style.overflow = 'auto'; + } } nochannelinsession=0; } @@ -2086,7 +2323,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} // ################################################################################ // Send Redirect command for live call to Manager sends phone name where call is going to // Covers the following types: XFER, VMAIL, ENTRY, CONF, PARK, FROMPARK, XfeRLOCAL, XfeRINTERNAL, XfeRBLIND, VfeRVMAIL - function mainxfer_send_redirect(taskvar,taskxferconf,taskserverip) + function mainxfer_send_redirect(taskvar,taskxferconf,taskserverip,taskdebugnote) { var xmlhttp=false; /*@cc_on @*/ @@ -2201,6 +2438,8 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} } if (taskvar == '3WAY') { + xferredirect_query=''; + var queryCID = "VXvdcW" + epoch_sec + user_abb; var redirectdestination = "NEXTAVAILABLE"; var redirectXTRAvalue = XDchannel; @@ -2211,7 +2450,18 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} {var redirecttype = 'RedirectXtraCX';} else {var redirecttype = 'RedirectXtra';} - xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=" + redirecttype + "&format=text&channel=" + redirectvalue + "&call_server_ip=" + redirectserverip + "&queryCID=" + queryCID + "&exten=" + redirectdestination + "&ext_context=" + ext_context + "&ext_priority=1&extrachannel=" + redirectXTRAvalue + "&lead_id=" + document.vicidial_form.lead_id.value + "&phone_code=" + document.vicidial_form.phone_code.value + "&phone_number=" + document.vicidial_form.phone_number.value + "&campaign=CL_" + campaign + '' + closerxfercamptail; + DispO3waychannel = redirectvalue; + DispO3wayXtrAchannel = redirectXTRAvalue; + DispO3wayCalLserverip = redirectserverip; + DispO3wayCalLxfernumber = document.vicidial_form.xfernumber.value; + DispO3wayCalLcamptail = document.vicidial_form.xfercode.value; + + xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=" + redirecttype + "&format=text&channel=" + redirectvalue + "&call_server_ip=" + redirectserverip + "&queryCID=" + queryCID + "&exten=" + redirectdestination + "&ext_context=" + ext_context + "&ext_priority=1&extrachannel=" + redirectXTRAvalue + "&lead_id=" + document.vicidial_form.lead_id.value + "&phone_code=" + document.vicidial_form.phone_code.value + "&phone_number=" + document.vicidial_form.phone_number.value+ "&filename=" + taskdebugnote + "&campaign=CL_" + campaign + '' + closerxfercamptail; + + if (taskdebugnote == 'FIRST') + { + document.getElementById("DispoSelectHAspan").innerHTML = "Leave 3Way Call Again"; + } } if (taskvar == 'ParK') { @@ -2257,7 +2507,6 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} Nactiveext = null; Nactiveext = xmlhttp.responseText; // alert(xmlhttp.responseText); - hideMainXfeR(); } } delete xmlhttp; @@ -2326,7 +2575,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} "&list_id=" + document.vicidial_form.list_id.value + "&length_in_sec=0&phone_code=" + document.vicidial_form.phone_code.value + "&phone_number=" + lead_dial_number + - "&exten=" + extension + "&channel=" + lastcustchannel + "&start_epoch=" + MDlogEPOCH + "&auto_dial_level=" + auto_dial_level + "&VDstop_rec_after_each_call=" + VDstop_rec_after_each_call + "&conf_silent_prefix=" + conf_silent_prefix + "&protocol=" + protocol + "&extension=" + extension + "&ext_context=" + ext_context + "&conf_exten=" + session_id + "&user_abb=" + user_abb + "&agent_log_id=" + agent_log_id; + "&exten=" + extension + "&channel=" + lastcustchannel + "&start_epoch=" + MDlogEPOCH + "&auto_dial_level=" + auto_dial_level + "&VDstop_rec_after_each_call=" + VDstop_rec_after_each_call + "&conf_silent_prefix=" + conf_silent_prefix + "&protocol=" + protocol + "&extension=" + extension + "&ext_context=" + ext_context + "&conf_exten=" + session_id + "&user_abb=" + user_abb + "&agent_log_id=" + agent_log_id + "&MDnextCID=" + LasTCID + "&DB=0"; xmlhttp.open('POST', 'vdc_db_query.php'); xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8'); // document.getElementById("busycallsdebug").innerHTML = "vdc_db_query.php?" + manDiaLlog_query; @@ -2538,7 +2787,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} // ################################################################################ // Open page to enter details for a new manual dial lead - function NeWManuaLDiaLCalL() + function NeWManuaLDiaLCalL(TVfast) { if ( (AutoDialWaiting == 1) || (VD_live_customer_call==1) || (alt_dial_active==1) ) { @@ -2546,7 +2795,14 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} } else { - showDiv('NeWManuaLDiaLBox'); + if (TVfast=='FAST') + { + NeWManuaLDiaLCalLSubmiTfast(); + } + else + { + showDiv('NeWManuaLDiaLBox'); + } } } @@ -2584,6 +2840,34 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} document.vicidial_form.MDDiaLOverridE.value = ''; } +// ################################################################################ +// Fast version of manual dial + function NeWManuaLDiaLCalLSubmiTfast() + { + var MDDiaLCodEform = document.vicidial_form.phone_code.value; + var MDPhonENumbeRform = document.vicidial_form.phone_number.value; + + if ( (MDDiaLCodEform.length < 1) || (MDPhonENumbeRform.length < 5) ) + { + alert("YOU MUST ENTER A PHONE NUMBER AND DIAL CODE TO USE FAST DIAL"); + } + else + { + var MDLookuPLeaD = 'new'; + if (document.vicidial_form.LeadLookuP.checked==true) + {MDLookuPLeaD = 'lookup';} + + alt_phone_dialing=1; + auto_dial_level=0; + manual_dial_in_progress=1; + MainPanelToFront(); + buildDiv('DiaLLeaDPrevieW'); + buildDiv('DiaLDiaLAltPhonE'); + document.vicidial_form.LeadPreview.checked=false; + document.vicidial_form.DiaLAltPhonE.checked=true; + ManualDialNext("","",MDDiaLCodEform,MDPhonENumbeRform,MDLookuPLeaD); + } + } // ################################################################################ // Request lookup of manual dial channel @@ -2662,7 +2946,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} document.getElementById("MainStatuSSpan").innerHTML = " Called 3rd party: " + document.vicidial_form.xfernumber.value + " UID: " + CIDcheck; - document.getElementById("Leave3WayCall").innerHTML ="\"LEAVE"; + document.getElementById("Leave3WayCall").innerHTML ="\"LEAVE"; document.getElementById("DialWithCustomer").innerHTML ="\"Dial"; @@ -2715,8 +2999,8 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} document.getElementById("DialBlindVMail").innerHTML = "\"Blind"; - document.getElementById("VolumeUpSpan").innerHTML = ""; - document.getElementById("VolumeDownSpan").innerHTML = ""; + document.getElementById("VolumeUpSpan").innerHTML = ""; + document.getElementById("VolumeDownSpan").innerHTML = ""; // INSERT VICIDIAL_LOG ENTRY FOR THIS CALL PROCESS @@ -2805,6 +3089,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} else { fronter = user; + LasTCID = MDnextResponse_array[0]; document.vicidial_form.lead_id.value = MDnextResponse_array[1]; LeaDPreVDispO = MDnextResponse_array[2]; document.vicidial_form.vendor_lead_code.value = MDnextResponse_array[4]; @@ -2839,9 +3124,12 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} CBcallback_time = MDnextResponse_array[29]; CBuser = MDnextResponse_array[30]; CBcomments = MDnextResponse_array[31]; - + dialed_number = MDnextResponse_array[32]; + dialed_label = MDnextResponse_array[33]; + lead_dial_number = document.vicidial_form.phone_number.value; document.getElementById("MainStatuSSpan").innerHTML = " Calling: " + document.vicidial_form.phone_number.value + " UID: " + MDnextCID + "   " + man_status; + if ( (dialed_label.length < 3) || (dialed_label=='NONE') ) {dialed_label='MAIN';} web_form_vars = "lead_id=" + document.vicidial_form.lead_id.value + @@ -2887,6 +3175,8 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} "&phone=" + document.vicidial_form.phone_number.value + "&parked_by=" + document.vicidial_form.lead_id.value + "&dispo=" + LeaDDispO + '' + + "&dialed_number=" + dialed_number + '' + + "&dialed_label=" + dialed_label + '' + webform_session; // $VICIDIAL_web_QUERY_STRING =~ s/ /+/gi; @@ -3071,6 +3361,9 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} { var manDiaLonly_num = document.vicidial_form.alt_phone.value; lead_dial_number = document.vicidial_form.alt_phone.value; + dialed_number = lead_dial_number; + dialed_label = 'ALT'; + WebFormRefresH(''); } else { @@ -3078,11 +3371,17 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} { var manDiaLonly_num = document.vicidial_form.address3.value; lead_dial_number = document.vicidial_form.address3.value; - } + dialed_number = lead_dial_number; + dialed_label = 'ADDR3'; + WebFormRefresH(''); + } else { var manDiaLonly_num = document.vicidial_form.phone_number.value; lead_dial_number = document.vicidial_form.phone_number.value; + dialed_number = lead_dial_number; + dialed_label = 'MAIN'; + WebFormRefresH(''); } } var xmlhttp=false; @@ -3213,7 +3512,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} } if (xmlhttp) { - autoDiaLready_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=" + taskaction + "&user=" + user + "&pass=" + pass + "&stage=" + VDRP_stage + "&agent_log_id=" + agent_log_id + "&agent_log=" + taskagentlog; + autoDiaLready_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=" + taskaction + "&user=" + user + "&pass=" + pass + "&stage=" + VDRP_stage + "&agent_log_id=" + agent_log_id + "&agent_log=" + taskagentlog + "&campaign=" + campaign; xmlhttp.open('POST', 'vdc_db_query.php'); xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8'); xmlhttp.send(autoDiaLready_query); @@ -3379,6 +3678,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} custchannellive=1; + LasTCID = check_VDIC_array[4]; LeaDPreVDispO = check_VDIC_array[6]; fronter = check_VDIC_array[7]; document.vicidial_form.vendor_lead_code.value = check_VDIC_array[8]; @@ -3411,6 +3711,8 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} CBcallback_time = check_VDIC_array[33]; CBuser = check_VDIC_array[34]; CBcomments = check_VDIC_array[35]; + dialed_number = check_VDIC_array[36]; + dialed_label = check_VDIC_array[37]; lead_dial_number = document.vicidial_form.phone_number.value; document.getElementById("MainStatuSSpan").innerHTML = " Incoming: " + document.vicidial_form.phone_number.value + " UID: " + CIDcheck + "   " + VDIC_fronter; @@ -3451,8 +3753,8 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} if (lastcustserverip == server_ip) { - document.getElementById("VolumeUpSpan").innerHTML = ""; - document.getElementById("VolumeDownSpan").innerHTML = ""; + document.getElementById("VolumeUpSpan").innerHTML = ""; + document.getElementById("VolumeDownSpan").innerHTML = ""; } document.getElementById("DiaLControl").innerHTML = DiaLControl_auto_HTML_OFF; @@ -3461,6 +3763,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} {var group = VDCL_group_id;} else {var group = campaign;} + if ( (dialed_label.length < 3) || (dialed_label=='NONE') ) {dialed_label='MAIN';} web_form_vars = "lead_id=" + document.vicidial_form.lead_id.value + @@ -3507,6 +3810,8 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} "&phone=" + document.vicidial_form.phone_number.value + "&parked_by=" + document.vicidial_form.lead_id.value + "&dispo=" + LeaDDispO + '' + + "&dialed_number=" + dialed_number + '' + + "&dialed_label=" + dialed_label + '' + webform_session; var regWFspace = new RegExp(" ","ig"); @@ -3568,6 +3873,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} {var group = VDCL_group_id;} else {var group = campaign;} + if ( (dialed_label.length < 3) || (dialed_label=='NONE') ) {dialed_label='MAIN';} web_form_vars = "lead_id=" + document.vicidial_form.lead_id.value + @@ -3614,6 +3920,8 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} "&phone=" + document.vicidial_form.phone_number.value + "&parked_by=" + document.vicidial_form.lead_id.value + "&dispo=" + LeaDDispO + '' + + "&dialed_number=" + dialed_number + '' + + "&dialed_label=" + dialed_label + '' + webform_session; var regWFspace = new RegExp(" ","ig"); @@ -3658,6 +3966,28 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} } +// ################################################################################ +// Send leave 3way call a second time from the dispo screen + function DispoLeavE3wayAgaiN() + { + XDchannel = DispO3wayXtrAchannel; + document.vicidial_form.xfernumber.value = DispO3wayCalLxfernumber; + document.vicidial_form.xfercode.value = DispO3wayCalLcamptail; + MDchannel = DispO3waychannel; + lastcustserverip = DispO3wayCalLserverip; + + document.getElementById("DispoSelectHAspan").innerHTML = ""; + + leave_3way_call('SECOND'); + + DispO3waychannel = ''; + DispO3wayXtrAchannel = ''; + DispO3wayCalLserverip = ''; + DispO3wayCalLxfernumber = ''; + DispO3wayCalLcamptail = ''; + } + + // ################################################################################ // Start Hangup Functions for both function bothcall_send_hangup() @@ -3670,7 +4000,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} // ################################################################################ // Send Hangup command for customer call connected to the conference now to Manager - function dialedcall_send_hangup(dispowindow) + function dialedcall_send_hangup(dispowindow,hotkeysused,altdispo) { var form_cust_channel = document.vicidial_form.callchannel.value; var form_cust_serverip = document.vicidial_form.callserverip.value; @@ -3808,10 +4138,36 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} if (document.vicidial_form.DiaLAltPhonE.checked==true) { reselect_alt_dial = 1; + if (altdispo == 'ALTPH2') + { + ManualDialOnly('ALTPhoneE'); + } + else + { + if (altdispo == 'ADDR3') + { + ManualDialOnly('AddresS3'); + } + else + { + if (hotkeysused == 'YES') + { + reselect_alt_dial = 0; + manual_auto_hotkey = 1; + } + } + } } else { - document.getElementById("DiaLControl").innerHTML = "\"Dial"; + if (hotkeysused == 'YES') + { + manual_auto_hotkey = 1; + } + else + { + document.getElementById("DiaLControl").innerHTML = "\"Dial"; + } reselect_alt_dial = 0; } } @@ -3820,6 +4176,27 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} if (document.vicidial_form.DiaLAltPhonE.checked==true) { reselect_alt_dial = 1; + if (altdispo == 'ALTPH2') + { + ManualDialOnly('ALTPhoneE'); + } + else + { + if (altdispo == 'ADDR3') + { + ManualDialOnly('AddresS3'); + } + else + { + if (hotkeysused == 'YES') + { + document.getElementById("MainStatuSSpan").style.background = panel_bgcolor; + document.getElementById("MainStatuSSpan").innerHTML = ''; + document.getElementById("DiaLControl").innerHTML = DiaLControl_auto_HTML_OFF; + reselect_alt_dial = 0; + } + } + } } else { @@ -3965,6 +4342,14 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} // Update vicidial_list lead record with all altered values from form function CustomerData_update() { + + var REGcommentsAMP = new RegExp('&',"g"); + var REGcommentsQUES = new RegExp("\\?","g"); + var REGcommentsPOUND = new RegExp("\\#","g"); + var REGcommentsRESULT = document.vicidial_form.comments.value.replace(REGcommentsAMP, "--AMP--"); + REGcommentsRESULT = REGcommentsRESULT.replace(REGcommentsQUES, "--QUES--"); + REGcommentsRESULT = REGcommentsRESULT.replace(REGcommentsPOUND, "--POUND--"); + var xmlhttp=false; /*@cc_on @*/ /*@if (@_jscript_version >= 5) @@ -3986,7 +4371,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} } if (xmlhttp) { - VLupdate_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=updateLEAD&format=text&user=" + user + "&pass=" + pass + + VLupdate_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&campaign=" + campaign + "&ACTION=updateLEAD&format=text&user=" + user + "&pass=" + pass + "&lead_id=" + document.vicidial_form.lead_id.value + "&vendor_lead_code=" + document.vicidial_form.vendor_lead_code.value + "&phone_number=" + document.vicidial_form.phone_number.value + @@ -4007,7 +4392,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} "&alt_phone=" + document.vicidial_form.alt_phone.value + "&email=" + document.vicidial_form.email.value + "&security_phrase=" + document.vicidial_form.security_phrase.value + - "&comments=" + document.vicidial_form.comments.value; + "&comments=" + REGcommentsRESULT; xmlhttp.open('POST', 'vdc_db_query.php'); xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8'); xmlhttp.send(VLupdate_query); @@ -4053,6 +4438,34 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} document.getElementById("DispoSelectContent").innerHTML = dispo_HTML; } +// ################################################################################ +// Generate the Pause Code Chooser panel + function PauseCodeSelectContent_create() + { + if ( (AutoDialWaiting == 1) || (VD_live_customer_call==1) || (alt_dial_active==1) ) + { + alert("YOU MUST BE PAUSED TO ENTER A PAUSE CODE IN AUTO-DIAL MODE"); + } + else + { + showDiv('PauseCodeSelectBox'); + WaitingForNextStep=1; + PauseCode_HTML = ''; + document.vicidial_form.PauseCodeSelection.value = ''; + var VD_pause_codes_ct_half = parseInt(VD_pause_codes_ct / 2); + PauseCode_HTML = "
O cliente desligou:
Voltar

@@ -5644,7 +6128,7 @@ Your Status:
Calls Dialing: + "; if (volumecontrol_active!=1) { live_conf_HTML = live_conf_HTML + ""; } else { - live_conf_HTML = live_conf_HTML + ""; + live_conf_HTML = live_conf_HTML + ""; } // var debugspan = document.getElementById("debugbottomspan").innerHTML; @@ -1926,6 +2136,29 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} {custchannellive++;} } + if (volumecontrol_active > 0) + { + if (protocol != 'EXTERNAL') + { + var regAGNTchan = new RegExp(protocol + '/' + extension,"g"); + if ( (channelfieldA.match(regAGNTchan)) && (agentchannel != channelfieldA) ) + { + agentchannel = channelfieldA; + + document.getElementById("AgentMuteSpan").innerHTML = ""; + } + } + else + { + if (agentchannel.length < 3) + { + agentchannel = channelfieldA; + + document.getElementById("AgentMuteSpan").innerHTML = ""; + } + } + } + // document.getElementById("debugbottomspan").innerHTML = debugspan + '
' + channelfieldA + '|' + lastcustchannel + '|' + custchannellive + '|' + LMAcontent_change + '|' + LMAalter; if (!LMAe[ARY_ct]) @@ -1952,7 +2185,11 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} if (LMAcontent_change > 0) { if (conf_channels_xtra_display == 1) - {document.getElementById("outboundcallsspan").innerHTML = live_conf_HTML;} + { + // document.getElementById("MainPanel").style.overflow = 'visible'; + document.getElementById("outboundcallsspan").innerHTML = live_conf_HTML; + // document.getElementById("MainPanel").style.overflow = 'auto'; + } } nochannelinsession=0; } @@ -2086,7 +2323,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} // ################################################################################ // Send Redirect command for live call to Manager sends phone name where call is going to // Covers the following types: XFER, VMAIL, ENTRY, CONF, PARK, FROMPARK, XfeRLOCAL, XfeRINTERNAL, XfeRBLIND, VfeRVMAIL - function mainxfer_send_redirect(taskvar,taskxferconf,taskserverip) + function mainxfer_send_redirect(taskvar,taskxferconf,taskserverip,taskdebugnote) { var xmlhttp=false; /*@cc_on @*/ @@ -2201,6 +2438,8 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} } if (taskvar == '3WAY') { + xferredirect_query=''; + var queryCID = "VXvdcW" + epoch_sec + user_abb; var redirectdestination = "NEXTAVAILABLE"; var redirectXTRAvalue = XDchannel; @@ -2211,7 +2450,18 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} {var redirecttype = 'RedirectXtraCX';} else {var redirecttype = 'RedirectXtra';} - xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=" + redirecttype + "&format=text&channel=" + redirectvalue + "&call_server_ip=" + redirectserverip + "&queryCID=" + queryCID + "&exten=" + redirectdestination + "&ext_context=" + ext_context + "&ext_priority=1&extrachannel=" + redirectXTRAvalue + "&lead_id=" + document.vicidial_form.lead_id.value + "&phone_code=" + document.vicidial_form.phone_code.value + "&phone_number=" + document.vicidial_form.phone_number.value + "&campaign=CL_" + campaign + '' + closerxfercamptail; + DispO3waychannel = redirectvalue; + DispO3wayXtrAchannel = redirectXTRAvalue; + DispO3wayCalLserverip = redirectserverip; + DispO3wayCalLxfernumber = document.vicidial_form.xfernumber.value; + DispO3wayCalLcamptail = document.vicidial_form.xfercode.value; + + xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=" + redirecttype + "&format=text&channel=" + redirectvalue + "&call_server_ip=" + redirectserverip + "&queryCID=" + queryCID + "&exten=" + redirectdestination + "&ext_context=" + ext_context + "&ext_priority=1&extrachannel=" + redirectXTRAvalue + "&lead_id=" + document.vicidial_form.lead_id.value + "&phone_code=" + document.vicidial_form.phone_code.value + "&phone_number=" + document.vicidial_form.phone_number.value+ "&filename=" + taskdebugnote + "&campaign=CL_" + campaign + '' + closerxfercamptail; + + if (taskdebugnote == 'FIRST') + { + document.getElementById("DispoSelectHAspan").innerHTML = "Leave 3Way Call Again"; + } } if (taskvar == 'ParK') { @@ -2257,7 +2507,6 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} Nactiveext = null; Nactiveext = xmlhttp.responseText; // alert(xmlhttp.responseText); - hideMainXfeR(); } } delete xmlhttp; @@ -2326,7 +2575,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} "&list_id=" + document.vicidial_form.list_id.value + "&length_in_sec=0&phone_code=" + document.vicidial_form.phone_code.value + "&phone_number=" + lead_dial_number + - "&exten=" + extension + "&channel=" + lastcustchannel + "&start_epoch=" + MDlogEPOCH + "&auto_dial_level=" + auto_dial_level + "&VDstop_rec_after_each_call=" + VDstop_rec_after_each_call + "&conf_silent_prefix=" + conf_silent_prefix + "&protocol=" + protocol + "&extension=" + extension + "&ext_context=" + ext_context + "&conf_exten=" + session_id + "&user_abb=" + user_abb + "&agent_log_id=" + agent_log_id; + "&exten=" + extension + "&channel=" + lastcustchannel + "&start_epoch=" + MDlogEPOCH + "&auto_dial_level=" + auto_dial_level + "&VDstop_rec_after_each_call=" + VDstop_rec_after_each_call + "&conf_silent_prefix=" + conf_silent_prefix + "&protocol=" + protocol + "&extension=" + extension + "&ext_context=" + ext_context + "&conf_exten=" + session_id + "&user_abb=" + user_abb + "&agent_log_id=" + agent_log_id + "&MDnextCID=" + LasTCID + "&DB=0"; xmlhttp.open('POST', 'vdc_db_query.php'); xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8'); // document.getElementById("busycallsdebug").innerHTML = "vdc_db_query.php?" + manDiaLlog_query; @@ -2538,7 +2787,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} // ################################################################################ // Open page to enter details for a new manual dial lead - function NeWManuaLDiaLCalL() + function NeWManuaLDiaLCalL(TVfast) { if ( (AutoDialWaiting == 1) || (VD_live_customer_call==1) || (alt_dial_active==1) ) { @@ -2546,7 +2795,14 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} } else { - showDiv('NeWManuaLDiaLBox'); + if (TVfast=='FAST') + { + NeWManuaLDiaLCalLSubmiTfast(); + } + else + { + showDiv('NeWManuaLDiaLBox'); + } } } @@ -2584,6 +2840,34 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} document.vicidial_form.MDDiaLOverridE.value = ''; } +// ################################################################################ +// Fast version of manual dial + function NeWManuaLDiaLCalLSubmiTfast() + { + var MDDiaLCodEform = document.vicidial_form.phone_code.value; + var MDPhonENumbeRform = document.vicidial_form.phone_number.value; + + if ( (MDDiaLCodEform.length < 1) || (MDPhonENumbeRform.length < 5) ) + { + alert("YOU MUST ENTER A PHONE NUMMER AND WÄHLEN CODE TO USE FAST WÄHLEN"); + } + else + { + var MDLookuPLeaD = 'new'; + if (document.vicidial_form.LeadLookuP.checked==true) + {MDLookuPLeaD = 'lookup';} + + alt_phone_dialing=1; + auto_dial_level=0; + manual_dial_in_progress=1; + MainPanelToFront(); + buildDiv('DiaLLeaDPrevieW'); + buildDiv('DiaLDiaLAltPhonE'); + document.vicidial_form.LeadPreview.checked=false; + document.vicidial_form.DiaLAltPhonE.checked=true; + ManualDialNext("","",MDDiaLCodEform,MDPhonENumbeRform,MDLookuPLeaD); + } + } // ################################################################################ // Request lookup of manual dial channel @@ -2662,7 +2946,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} document.getElementById("MainStatuSSpan").innerHTML = " Angerufener dritter Teilnehmer: " + document.vicidial_form.xfernumber.value + " UID: " + CIDcheck; - document.getElementById("Leave3WayCall").innerHTML ="\"3-WEGE"; + document.getElementById("Leave3WayCall").innerHTML ="\"3-WEGE"; document.getElementById("DialWithCustomer").innerHTML ="\"Kunden"; @@ -2715,8 +2999,8 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} document.getElementById("DialBlindVMail").innerHTML = "\"Blind"; - document.getElementById("VolumeUpSpan").innerHTML = ""; - document.getElementById("VolumeDownSpan").innerHTML = ""; + document.getElementById("VolumeUpSpan").innerHTML = ""; + document.getElementById("VolumeDownSpan").innerHTML = ""; // INSERT VICIWÄHLEN_LOG ENTRY FOR THIS ANRUF PROCESS @@ -2805,6 +3089,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} else { fronter = user; + LasTCID = MDnextResponse_array[0]; document.vicidial_form.lead_id.value = MDnextResponse_array[1]; LeaDPreVDispO = MDnextResponse_array[2]; document.vicidial_form.vendor_lead_code.value = MDnextResponse_array[4]; @@ -2839,9 +3124,12 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} CBcallback_time = MDnextResponse_array[29]; CBuser = MDnextResponse_array[30]; CBcomments = MDnextResponse_array[31]; - + dialed_number = MDnextResponse_array[32]; + dialed_label = MDnextResponse_array[33]; + lead_dial_number = document.vicidial_form.phone_number.value; document.getElementById("MainStatuSSpan").innerHTML = " Telefonierend: " + document.vicidial_form.phone_number.value + " UID: " + MDnextCID + "   " + man_status; + if ( (dialed_label.length < 3) || (dialed_label=='NONE') ) {dialed_label='MAIN';} web_form_vars = "lead_id=" + document.vicidial_form.lead_id.value + @@ -2887,6 +3175,8 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} "&phone=" + document.vicidial_form.phone_number.value + "&parked_by=" + document.vicidial_form.lead_id.value + "&dispo=" + LeaDDispO + '' + + "&dialed_number=" + dialed_number + '' + + "&dialed_label=" + dialed_label + '' + webform_session; // $VICIWÄHLEN_web_QUERY_STRING =~ s/ /+/gi; @@ -3071,6 +3361,9 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} { var manDiaLonly_num = document.vicidial_form.alt_phone.value; lead_dial_number = document.vicidial_form.alt_phone.value; + dialed_number = lead_dial_number; + dialed_label = 'ALT'; + WebFormRefresH(''); } else { @@ -3078,11 +3371,17 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} { var manDiaLonly_num = document.vicidial_form.address3.value; lead_dial_number = document.vicidial_form.address3.value; - } + dialed_number = lead_dial_number; + dialed_label = 'ADDR3'; + WebFormRefresH(''); + } else { var manDiaLonly_num = document.vicidial_form.phone_number.value; lead_dial_number = document.vicidial_form.phone_number.value; + dialed_number = lead_dial_number; + dialed_label = 'MAIN'; + WebFormRefresH(''); } } var xmlhttp=false; @@ -3213,7 +3512,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} } if (xmlhttp) { - autoDiaLready_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=" + taskaction + "&user=" + user + "&pass=" + pass + "&stage=" + VDRP_stage + "&agent_log_id=" + agent_log_id + "&agent_log=" + taskagentlog; + autoDiaLready_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=" + taskaction + "&user=" + user + "&pass=" + pass + "&stage=" + VDRP_stage + "&agent_log_id=" + agent_log_id + "&agent_log=" + taskagentlog + "&campaign=" + campaign; xmlhttp.open('POST', 'vdc_db_query.php'); xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8'); xmlhttp.send(autoDiaLready_query); @@ -3379,6 +3678,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} custchannellive=1; + LasTCID = check_VDIC_array[4]; LeaDPreVDispO = check_VDIC_array[6]; fronter = check_VDIC_array[7]; document.vicidial_form.vendor_lead_code.value = check_VDIC_array[8]; @@ -3411,6 +3711,8 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} CBcallback_time = check_VDIC_array[33]; CBuser = check_VDIC_array[34]; CBcomments = check_VDIC_array[35]; + dialed_number = check_VDIC_array[36]; + dialed_label = check_VDIC_array[37]; lead_dial_number = document.vicidial_form.phone_number.value; document.getElementById("MainStatuSSpan").innerHTML = " Eingehend: " + document.vicidial_form.phone_number.value + " UID: " + CIDcheck + "   " + VDIC_fronter; @@ -3451,8 +3753,8 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} if (lastcustserverip == server_ip) { - document.getElementById("VolumeUpSpan").innerHTML = ""; - document.getElementById("VolumeDownSpan").innerHTML = ""; + document.getElementById("VolumeUpSpan").innerHTML = ""; + document.getElementById("VolumeDownSpan").innerHTML = ""; } document.getElementById("DiaLControl").innerHTML = DiaLControl_auto_HTML_OFF; @@ -3461,6 +3763,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} {var group = VDCL_group_id;} else {var group = campaign;} + if ( (dialed_label.length < 3) || (dialed_label=='NONE') ) {dialed_label='MAIN';} web_form_vars = "lead_id=" + document.vicidial_form.lead_id.value + @@ -3507,6 +3810,8 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} "&phone=" + document.vicidial_form.phone_number.value + "&parked_by=" + document.vicidial_form.lead_id.value + "&dispo=" + LeaDDispO + '' + + "&dialed_number=" + dialed_number + '' + + "&dialed_label=" + dialed_label + '' + webform_session; var regWFspace = new RegExp(" ","ig"); @@ -3568,6 +3873,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} {var group = VDCL_group_id;} else {var group = campaign;} + if ( (dialed_label.length < 3) || (dialed_label=='NONE') ) {dialed_label='MAIN';} web_form_vars = "lead_id=" + document.vicidial_form.lead_id.value + @@ -3614,6 +3920,8 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} "&phone=" + document.vicidial_form.phone_number.value + "&parked_by=" + document.vicidial_form.lead_id.value + "&dispo=" + LeaDDispO + '' + + "&dialed_number=" + dialed_number + '' + + "&dialed_label=" + dialed_label + '' + webform_session; var regWFspace = new RegExp(" ","ig"); @@ -3658,6 +3966,28 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} } +// ################################################################################ +// Send leave 3way call a second time from the dispo screen + function DispoLeavE3wayAgaiN() + { + XDchannel = DispO3wayXtrAchannel; + document.vicidial_form.xfernumber.value = DispO3wayCalLxfernumber; + document.vicidial_form.xfercode.value = DispO3wayCalLcamptail; + MDchannel = DispO3waychannel; + lastcustserverip = DispO3wayCalLserverip; + + document.getElementById("DispoSelectHAspan").innerHTML = ""; + + leave_3way_call('SECOND'); + + DispO3waychannel = ''; + DispO3wayXtrAchannel = ''; + DispO3wayCalLserverip = ''; + DispO3wayCalLxfernumber = ''; + DispO3wayCalLcamptail = ''; + } + + // ################################################################################ // Start Hangup Functions for both function bothcall_send_hangup() @@ -3670,7 +4000,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} // ################################################################################ // Send Hangup command for customer call connected to the conference now to Manager - function dialedcall_send_hangup(dispowindow) + function dialedcall_send_hangup(dispowindow,hotkeysused,altdispo) { var form_cust_channel = document.vicidial_form.callchannel.value; var form_cust_serverip = document.vicidial_form.callserverip.value; @@ -3808,10 +4138,36 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} if (document.vicidial_form.DiaLAltPhonE.checked==true) { reselect_alt_dial = 1; + if (altdispo == 'ALTPH2') + { + ManualDialOnly('ALTTelefonE'); + } + else + { + if (altdispo == 'ADDR3') + { + ManualDialOnly('AddresS3'); + } + else + { + if (hotkeysused == 'YES') + { + reselect_alt_dial = 0; + manual_auto_hotkey = 1; + } + } + } } else { - document.getElementById("DiaLControl").innerHTML = "\"Nächste"; + if (hotkeysused == 'YES') + { + manual_auto_hotkey = 1; + } + else + { + document.getElementById("DiaLControl").innerHTML = "\"Nächste"; + } reselect_alt_dial = 0; } } @@ -3820,6 +4176,27 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} if (document.vicidial_form.DiaLAltPhonE.checked==true) { reselect_alt_dial = 1; + if (altdispo == 'ALTPH2') + { + ManualDialOnly('ALTTelefonE'); + } + else + { + if (altdispo == 'ADDR3') + { + ManualDialOnly('AddresS3'); + } + else + { + if (hotkeysused == 'YES') + { + document.getElementById("MainStatuSSpan").style.background = panel_bgcolor; + document.getElementById("MainStatuSSpan").innerHTML = ''; + document.getElementById("DiaLControl").innerHTML = DiaLControl_auto_HTML_OFF; + reselect_alt_dial = 0; + } + } + } } else { @@ -3965,6 +4342,14 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} // Update vicidial_list lead record with all altered values from form function CustomerData_update() { + + var REGcommentsAMP = new RegExp('&',"g"); + var REGcommentsQUES = new RegExp("\\?","g"); + var REGcommentsPOUND = new RegExp("\\#","g"); + var REGcommentsRESULT = document.vicidial_form.comments.value.replace(REGcommentsAMP, "--AMP--"); + REGcommentsRESULT = REGcommentsRESULT.replace(REGcommentsQUES, "--QUES--"); + REGcommentsRESULT = REGcommentsRESULT.replace(REGcommentsPOUND, "--POUND--"); + var xmlhttp=false; /*@cc_on @*/ /*@if (@_jscript_version >= 5) @@ -3986,7 +4371,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} } if (xmlhttp) { - VLupdate_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=updateLEAD&format=text&user=" + user + "&pass=" + pass + + VLupdate_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&campaign=" + campaign + "&ACTION=updateLEAD&format=text&user=" + user + "&pass=" + pass + "&lead_id=" + document.vicidial_form.lead_id.value + "&vendor_lead_code=" + document.vicidial_form.vendor_lead_code.value + "&phone_number=" + document.vicidial_form.phone_number.value + @@ -4007,7 +4392,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} "&alt_phone=" + document.vicidial_form.alt_phone.value + "&email=" + document.vicidial_form.email.value + "&security_phrase=" + document.vicidial_form.security_phrase.value + - "&comments=" + document.vicidial_form.comments.value; + "&comments=" + REGcommentsRESULT; xmlhttp.open('POST', 'vdc_db_query.php'); xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8'); xmlhttp.send(VLupdate_query); @@ -4053,6 +4438,34 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} document.getElementById("DispoSelectContent").innerHTML = dispo_HTML; } +// ################################################################################ +// Generate the Pause Code Chooser panel + function PauseCodeSelectContent_create() + { + if ( (AutoDialWaiting == 1) || (VD_live_customer_call==1) || (alt_dial_active==1) ) + { + alert("YOU MUST BE PAUSED TO ENTER A PAUSE CODE IN AUTO-WÄHLEN MODE"); + } + else + { + showDiv('PauseCodeSelectBox'); + WaitingForNextStep=1; + PauseCode_HTML = ''; + document.vicidial_form.PauseCodeSelection.value = ''; + var VD_pause_codes_ct_half = parseInt(VD_pause_codes_ct / 2); + PauseCode_HTML = "
Chamada Wrapup: segundos restantes no wrapup



@@ -5653,23 +6137,28 @@ Your Status:
Calls Dialing: + +
Sua sessão foi incapacitada
SAIR

Voltar +
+
+ +

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
@@ -5682,8 +6171,15 @@ Your Status:
Calls Dialing: +
SELECIONE Um CÓDIGO Da PAUSA :
+ Pausa Code Selection + +

  +
+
- +
Selecione uma data para o retorno :
@@ -5726,7 +6222,7 @@ Your Status:
Calls Dialing: + @@ -5823,6 +6302,7 @@ ID da gravação:
+
SELECAO DO GRUPO DE ENTRADA DO CLOSER
Seleção do grupo de entrada do closer
@@ -5737,7 +6233,7 @@ Your Status:
Calls Dialing: + Canal Canal @@ -5747,25 +6243,8 @@ Your Status:
Calls Dialing: - - - - - -
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
@@ -5809,7 +6288,7 @@ ID da gravação:

Desligar Cliente

-Enviar DTMF
+
Enviar DTMF

@@ -5851,14 +6331,18 @@ ID da gravação:
  Email: +\n";} + {echo "\n";} else - {echo "\n";} + {echo "\n";} ?> - + +
segundos:   Canal:   Tempo de cliente:
Comentários: +
+
diff --git a/agc_2-X/trunk/LANG_www/agc_de/conf_exten_check.php b/agc_2-X/trunk/LANG_www/agc_de/conf_exten_check.php index 541a7c14..ba8ee0c9 100644 --- a/agc_2-X/trunk/LANG_www/agc_de/conf_exten_check.php +++ b/agc_2-X/trunk/LANG_www/agc_de/conf_exten_check.php @@ -33,6 +33,7 @@ # 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 # 61128-2255 - Added update for manual dial vicidial_live_agents +# 70319-1542 - Added agent disabled display function # require("dbconnect.php"); @@ -69,8 +70,8 @@ if (!isset($format)) {$format="text";} if (!isset($ACTION)) {$ACTION="refresh";} if (!isset($client)) {$client="agc";} -$version = '0.0.10'; -$build = '61128-2255'; +$version = '0.0.11'; +$build = '70319-1542'; $StarTtime = date("U"); $NOW_DATE = date("Y-m-d"); $NOW_TIME = date("Y-m-d H:i:s"); @@ -144,6 +145,23 @@ echo " if ($client == 'vdc') { + $Acount=0; + $AexternalDEAD=0; + + ### see if the agent has a record in the vicidial_live_agents table + $stmt="SELECT count(*) 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); + $Acount=$row[0]; + + # ### find out if external table shows agent should be disabled + # $stmt="SELECT count(*) from another_table where user='$user' and status='DEAD';"; + # if ($DB) {echo "|$stmt|\n";} + # $rslt=mysql_query($stmt, $link); + # $row=mysql_fetch_row($rslt); + # $AexternalDEAD=$row[0]; + if ($auto_dial_level > 0) { ### update the vicidial_live_agents every second with a new random number so it is shown to be alive @@ -186,6 +204,9 @@ echo " } + if ($Acount < 1) {$Astatus='DEAD_VLA';} + if ($AexternalDEAD > 0) {$Astatus='DEAD_EXTERNAL';} + echo 'DateTime: ' . $NOW_TIME . '|UnixTime: ' . $StarTtime . '|Status: ' . $Astatus . '|CampCalls: ' . $RingCalls . "|\n"; } diff --git a/agc_2-X/trunk/LANG_www/agc_de/manager_send.php b/agc_2-X/trunk/LANG_www/agc_de/manager_send.php index 33c72aad..b833285d 100644 --- a/agc_2-X/trunk/LANG_www/agc_de/manager_send.php +++ b/agc_2-X/trunk/LANG_www/agc_de/manager_send.php @@ -1,7 +1,7 @@ LICENSE: GPLv2 +# Copyright (C) 2007 Matt Florell 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 @@ -12,7 +12,7 @@ # - $user # - $pass # optional variables: -# - $ACTION - ('Originate','Redirect','Hangup','Command','Monitor','StopMonitor','SysCIDOriginate','RedirectName','RedirectNameVmail','MonitorConf','StopMonitorConf','RedirectXtra','RedirectXtraCX','RedirectVD','HangupConfDial','VolumeControl') +# - $ACTION - ('Originate','Redirect','Hangup','Command','Monitor','StopMonitor','SysCIDOriginate','RedirectName','RedirectNameVmail','MonitorConf','StopMonitorConf','RedirectXtra','RedirectXtraCX','RedirectVD','HangupConfDial','VolumeControl','OriginateVDRelogin') # - $queryCID - ('CN012345678901234567',...) # - $format - ('text','debug') # - $channel - ('Zap/41-1','SIP/test101-1jut','IAX2/iaxy@iaxy',...) @@ -35,7 +35,7 @@ # - $stage - ('UP','DOWN') # -# changes +# CHANGELOG: # 50401-1002 - First build of script, Hangup function only # 50404-1045 - Redirect basic function enabled # 50406-1522 - Monitor basic function enabled @@ -64,6 +64,10 @@ # 61004-1526 - Added parsing of volume control command and lookup or number # 61130-1617 - Added lead_id to MonitorConf for recording_log # 61201-1115 - Added user to MonitorConf for recording_log +# 70111-1600 - added ability to use BLEND/INBND/*_C/*_B/*_I as closer campaigns +# 70226-1251 - Added Mute/UnMute to conference volume control +# 70320-1502 - Added option to allow retry of leave-3way-call and debug logging +# 70322-1636 - Added sipsak display ability # require("dbconnect.php"); @@ -123,6 +127,16 @@ if (isset($_GET["phone_number"])) {$phone_number=$_GET["phone_number"];} elseif (isset($_POST["phone_number"])) {$phone_number=$_POST["phone_number"];} if (isset($_GET["stage"])) {$stage=$_GET["stage"];} elseif (isset($_POST["stage"])) {$stage=$_POST["stage"];} +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["phone_ip"])) {$phone_ip=$_GET["phone_ip"];} + elseif (isset($_POST["phone_ip"])) {$phone_ip=$_POST["phone_ip"];} +if (isset($_GET["enable_sipsak_messages"])) {$enable_sipsak_messages=$_GET["enable_sipsak_messages"];} + elseif (isset($_POST["enable_sipsak_messages"])) {$enable_sipsak_messages=$_POST["enable_sipsak_messages"];} +if (isset($_GET["allow_sipsak_messages"])) {$allow_sipsak_messages=$_GET["allow_sipsak_messages"];} + elseif (isset($_POST["allow_sipsak_messages"])) {$allow_sipsak_messages=$_POST["allow_sipsak_messages"];} $user=ereg_replace("[^0-9a-zA-Z]","",$user); $pass=ereg_replace("[^0-9a-zA-Z]","",$pass); @@ -133,8 +147,8 @@ if (!isset($ACTION)) {$ACTION="Originate";} if (!isset($format)) {$format="alert";} if (!isset($ext_priority)) {$ext_priority="1";} -$version = '2.0.27'; -$build = '61130-1617'; +$version = '2.0.29'; +$build = '70320-1502'; $StarTtime = date("U"); $NOW_DATE = date("Y-m-d"); $NOW_TIME = date("Y-m-d H:i:s"); @@ -279,6 +293,21 @@ if ($ACTION=="OriginateNameVmail") } } +if ($ACTION=="OriginateVDRelogin") +{ + if ( ($enable_sipsak_messages > 0) and ($allow_sipsak_messages > 0) and (eregi("SIP",$protocol)) ) + { + $CIDdate = date("ymdHis"); + $DS='-'; + $SIPSAK_prefix = 'LIN-'; + print "\n"; + passthru("/usr/local/bin/sipsak -M -O desktop -B \"$SIPSAK_prefix$campaign\" -r 5060 -s sip:$extension@$phone_ip > /dev/null"); + $queryCID = "$SIPSAK_prefix$campaign$DS$CIDdate"; + + } + $ACTION="Originate"; +} + if ($ACTION=="Originate") { if ( (strlen($exten)<1) or (strlen($channel)<1) or (strlen($ext_context)<1) or (strlen($queryCID)<10) ) @@ -430,7 +459,7 @@ if ($ACTION=="RedirectVD") else { if (strlen($call_server_ip)>6) {$server_ip = $call_server_ip;} - if (eregi("CLOSER",$campaign)) + if (eregi("(CLOSER|BLEND|INBND|_C$|_B$|_I$)",$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";} @@ -560,6 +589,7 @@ if ($ACTION=="RedirectNameVmail") if ($ACTION=="RedirectXtraCX") { + $DBout=''; $row=''; $rowx=''; $channel_liveX=1; $channel_liveY=1; @@ -575,6 +605,15 @@ if ($ACTION=="RedirectXtraCX") echo "ext_context $ext_context muß eingestellt werden\n"; echo "ext_priority $ext_priority muß eingestellt werden\n"; echo "\nRedirect Action nicht gesendet\n"; + if (ereg("SECOND|FIRST|DEBUG",$filename)) + { + if ($WeBRooTWritablE > 0) + { + $fp = fopen ("./vicidial_debug.txt", "a"); + fwrite ($fp, "$NOW_TIME|RDCXC|$filename|$user|$campaign|$$channel|$extrachannel|$queryCID|$exten|$ext_context|ext_priority|\n"); + fclose($fp); + } + } } else { @@ -594,6 +633,7 @@ if ($ACTION=="RedirectXtraCX") { $channel_liveX=0; echo "Kanal $channel ist nicht Live an $call_server_ip, Redirect Befehl nicht eingesetzt\n"; + if (ereg("SECOND|FIRST|DEBUG",$filename)) {$DBout .= "$channel ist nicht Live an $call_server_ip";} } } $stmt="SELECT count(*) FROM live_channels where server_ip = '$server_ip' and channel='$extrachannel';"; @@ -610,6 +650,7 @@ if ($ACTION=="RedirectXtraCX") { $channel_liveY=0; echo "Kanal $channel ist nicht Live an $server_ip, Redirect Befehl nicht eingesetzt\n"; + if (ereg("SECOND|FIRST|DEBUG",$filename)) {$DBout .= "$channel ist nicht Live an $server_ip";} } } if ( ($channel_liveX==1) && ($channel_liveY==1) ) @@ -622,6 +663,7 @@ if ($ACTION=="RedirectXtraCX") { $channel_liveY=0; echo "No Local agent to send call to, Redirect Befehl nicht eingesetzt\n"; + if (ereg("SECOND|FIRST|DEBUG",$filename)) {$DBout .= "No Local agent to send call to";} } else { @@ -654,6 +696,7 @@ if ($ACTION=="RedirectXtraCX") $rslt=mysql_query($stmt, $link); echo "RedirectXtraCX Befehl gesendet an Kanal $channel an $call_server_ip and \nHungup $extrachannel an $server_ip\n"; + if (ereg("SECOND|FIRST|DEBUG",$filename)) {$DBout .= "$channel an $call_server_ip, Hungup $extrachannel an $server_ip";} } } else @@ -662,8 +705,19 @@ if ($ACTION=="RedirectXtraCX") {$ACTION="Redirect"; $server_ip = $call_server_ip;} if ($channel_liveY==1) {$ACTION="Redirect"; $channel=$extrachannel;} - + if (ereg("SECOND|FIRST|DEBUG",$filename)) {$DBout .= "Changed to Redirect: $channel an $server_ip";} } + + if (ereg("SECOND|FIRST|DEBUG",$filename)) + { + if ($WeBRooTWritablE > 0) + { + $fp = fopen ("./vicidial_debug.txt", "a"); + fwrite ($fp, "$NOW_TIME|RDCXC|$filename|$user|$campaign|$DBout|\n"); + fclose($fp); + } + } + } } @@ -688,6 +742,15 @@ if ($ACTION=="RedirectXtra") echo "ext_context $ext_context muß eingestellt werden\n"; echo "ext_priority $ext_priority muß eingestellt werden\n"; echo "\nRedirect Action nicht gesendet\n"; + if (ereg("SECOND|FIRST|DEBUG",$filename)) + { + if ($WeBRooTWritablE > 0) + { + $fp = fopen ("./vicidial_debug.txt", "a"); + fwrite ($fp, "$NOW_TIME|RDX|$filename|$user|$campaign|$$channel|$extrachannel|$queryCID|$exten|$ext_context|ext_priority|\n"); + fclose($fp); + } + } } else { @@ -708,6 +771,7 @@ if ($ACTION=="RedirectXtra") { $channel_liveX=0; echo "Kann keine leere Konferenz finden an $server_ip, Redirect Befehl nicht eingesetzt\n"; + if (ereg("SECOND|FIRST|DEBUG",$filename)) {$DBout .= "Kann keine leere Konferenz finden an $server_ip";} } } @@ -717,7 +781,7 @@ if ($ACTION=="RedirectXtra") if ($format=='debug') {echo "\n";} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); - if ($row[0]==0) + if ( ($row[0]==0) && (!ereg("SECOND",$filename)) ) { $stmt="SELECT count(*) FROM live_sip_channels where server_ip = '$call_server_ip' and channel='$channel';"; if ($format=='debug') {echo "\n";} @@ -727,13 +791,14 @@ if ($ACTION=="RedirectXtra") { $channel_liveX=0; echo "Kanal $channel ist nicht Live an $call_server_ip, Redirect Befehl nicht eingesetzt\n"; + if (ereg("SECOND|FIRST|DEBUG",$filename)) {$DBout .= "$channel ist nicht Live an $call_server_ip";} } } $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) + if ( ($row[0]==0) && (!ereg("SECOND",$filename)) ) { $stmt="SELECT count(*) FROM live_sip_channels where server_ip = '$server_ip' and channel='$extrachannel';"; if ($format=='debug') {echo "\n";} @@ -743,6 +808,7 @@ if ($ACTION=="RedirectXtra") { $channel_liveY=0; echo "Kanal $channel ist nicht Live an $server_ip, Redirect Befehl nicht eingesetzt\n"; + if (ereg("SECOND|FIRST|DEBUG",$filename)) {$DBout .= "$channel ist nicht Live an $server_ip";} } } if ( ($channel_liveX==1) && ($channel_liveY==1) ) @@ -754,6 +820,7 @@ if ($ACTION=="RedirectXtra") $rslt=mysql_query($stmt, $link); echo "RedirectXtra Befehl gesendet an Kanal $channel and \nExtraKanal $extrachannel\n to $exten an $server_ip\n"; + if (ereg("SECOND|FIRST|DEBUG",$filename)) {$DBout .= "$channel and $extrachannel to $exten an $server_ip";} } else { @@ -778,6 +845,7 @@ if ($ACTION=="RedirectXtra") $rslt=mysql_query($stmt, $link); echo "RedirectXtra Befehl gesendet an Kanal $channel an $call_server_ip and \nExtraKanal $extrachannel\n to $exten an $server_ip\n"; + if (ereg("SECOND|FIRST|DEBUG",$filename)) {$DBout .= "$channel/$call_server_ip and $extrachannel/$server_ip to $exten";} } } else @@ -788,6 +856,17 @@ if ($ACTION=="RedirectXtra") {$ACTION="Redirect"; $channel=$extrachannel;} } + + if (ereg("SECOND|FIRST|DEBUG",$filename)) + { + if ($WeBRooTWritablE > 0) + { + $fp = fopen ("./vicidial_debug.txt", "a"); + fwrite ($fp, "$NOW_TIME|RDX|$filename|$user|$campaign|$DBout|\n"); + fclose($fp); + } + } + } } } @@ -1018,8 +1097,10 @@ if ($ACTION=="VolumeControl") else { $participant_number='XXYYXXYYXXYYXX'; + if (eregi('UP',$stage)) {$vol_prefix='4';} if (eregi('DOWN',$stage)) {$vol_prefix='3';} - else {$vol_prefix='4';} + if (eregi('UNMUTE',$stage)) {$vol_prefix='2';} + if (eregi('MUTING',$stage)) {$vol_prefix='1';} $local_DEF = 'Local/'; $local_AMP = '@'; $volume_local_channel = "$local_DEF$participant_number$vol_prefix$exten$local_AMP$ext_context"; diff --git a/agc_2-X/trunk/LANG_www/agc_de/vdc_db_query.php b/agc_2-X/trunk/LANG_www/agc_de/vdc_db_query.php index bd3df02a..d046f0bd 100644 --- a/agc_2-X/trunk/LANG_www/agc_de/vdc_db_query.php +++ b/agc_2-X/trunk/LANG_www/agc_de/vdc_db_query.php @@ -1,7 +1,7 @@ LICENSE: GPLv2 +# Copyright (C) 2007 Matt Florell 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 @@ -13,7 +13,7 @@ # - $pass # optional variables: # - $format - ('text','debug') -# - $ACTION - ('regCLOSER','manDiaLnextCALL','manDiaLskip','manDiaLonly','manDiaLlookCALL','manDiaLlogCALL','userLOGout','updateDISPO','VDADpause','VDADready','VDADcheckINCOMING','UpdatEFavoritEs','CalLBacKLisT','CalLBacKCounT') +# - $ACTION - ('regCLOSER','manDiaLnextCALL','manDiaLskip','manDiaLonly','manDiaLlookCALL','manDiaLlogCALL','userLOGout','updateDISPO','VDADpause','VDADready','VDADcheckINCOMING','UpdatEFavoritEs','CalLBacKLisT','CalLBacKCounT','PauseCodeSubmit') # - $stage - ('start','finish','lookup','new') # - $closer_choice - ('CL_TESTCAMP_L CL_OUT123_L -') # - $conf_exten - ('8600011',...) @@ -70,7 +70,7 @@ # - $omit_phone_code - ('Y','N') # - $no_delete_sessions - ('0','1') -# changes +# CHANGELOG: # 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 @@ -101,7 +101,7 @@ # - 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 +# 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 @@ -110,10 +110,28 @@ # 60821-1647 - Added ability to not delete sessions at logout # 60906-1124 - Added lookup and sending of callback data for CALLBK calls # 61128-2229 - Added vicidial_live_agents and vicidial_auto_calls manual dial entries +# 70111-1600 - Added ability to use BLEND/INBND/*_C/*_B/*_I as closer campaigns +# 70115-1733 - Added alt_dial functionality in auto-dial modes +# 70118-1501 - Added user_group to vicidial_log,_agent_log,_closer_log,_callbacks +# 70123-1357 - Fixed bug that would not update vicidial_closer_log status to dispo +# 70202-1438 - Added pause code submit function +# 70203-0930 - Added dialed_number to lead info output +# 70203-1030 - Added dialed_label to lead info output +# 70206-1126 - Added INBOUND status for inbound/closer calls in vicidial_live_agents +# 70212-1253 - Fixed small issue with CXFER +# 70213-1431 - Added QueueMetrics PAUSE/UNPAUSE/AGENTLOGIN/AGENTLOGOFF actions +# 70214-1231 - Added queuemetrics_log_id field for server_id in queue_log +# 70215-1210 - Added queuemetrics COMPLETEAGENT action +# 70216-1051 - Fixed double call complete queuemetrics logging +# 70222-1616 - Changed queue_log PAUSE/UNPAUSE to PAUSEALL/UNPAUSEALL +# 70309-1034 - Allow amphersands and questions marks in comments to pass through +# 70313-1052 - Allow pound signs(hash) in comments to pass through +# 70319-1544 - Added agent disable update customer data function +# 70322-1545 - Added sipsak display ability # -$version = '2.0.38'; -$build = '61128-2229'; +$version = '2.0.55'; +$build = '70322-1545'; require("dbconnect.php"); @@ -240,6 +258,10 @@ if (isset($_GET["use_internal_dnc"])) {$use_internal_dnc=$_GET["use_internal_d elseif (isset($_POST["use_internal_dnc"])) {$use_internal_dnc=$_POST["use_internal_dnc"];} if (isset($_GET["omit_phone_code"])) {$omit_phone_code=$_GET["omit_phone_code"];} elseif (isset($_POST["omit_phone_code"])) {$omit_phone_code=$_POST["omit_phone_code"];} +if (isset($_GET["phone_ip"])) {$phone_ip=$_GET["phone_ip"];} + elseif (isset($_POST["phone_ip"])) {$phone_ip=$_POST["phone_ip"];} +if (isset($_GET["enable_sipsak_messages"])) {$enable_sipsak_messages=$_GET["enable_sipsak_messages"];} + elseif (isset($_POST["enable_sipsak_messages"])) {$enable_sipsak_messages=$_POST["enable_sipsak_messages"];} $user=ereg_replace("[^0-9a-zA-Z]","",$user); @@ -261,6 +283,7 @@ $CIDdate = date("mdHis"); $ENTRYdate = date("YmdHis"); if (!isset($query_date)) {$query_date = $NOW_DATE;} $MT[0]=''; +$agents='@agents'; $stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;"; if ($DB) {echo "|$stmt|\n";} @@ -375,7 +398,7 @@ if ($ACTION == 'manDiaLnextCaLL') 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) ) + if ( (strlen($callback_id)>0) and (strlen($lead_id)>0) ) { $affected_rows=1; $CBleadIDset=1; @@ -421,7 +444,7 @@ if ($ACTION == 'manDiaLnextCaLL') if ($DB) {echo "$stmt\n";} $rslt=mysql_query($stmt, $link); $affected_rows = mysql_affected_rows($link); - $lead_id = mysql_insert_id(); + $lead_id = mysql_insert_id($link); $CBleadIDset=1; } } @@ -432,7 +455,7 @@ if ($ACTION == 'manDiaLnextCaLL') if ($DB) {echo "$stmt\n";} $rslt=mysql_query($stmt, $link); $affected_rows = mysql_affected_rows($link); - $lead_id = mysql_insert_id(); + $lead_id = mysql_insert_id($link); $CBleadIDset=1; } } @@ -535,7 +558,7 @@ if ($ACTION == 'manDiaLnextCaLL') $rslt=mysql_query($stmt, $link); } - $stmt="UPDATE vicidial_agent_log set lead_id='$lead_id' where agent_log_id='$agent_log_id';"; + $stmt="UPDATE vicidial_agent_log set lead_id='$lead_id',comments='MANUAL' where agent_log_id='$agent_log_id';"; if ($format=='debug') {echo "\n";} $rslt=mysql_query($stmt, $link); @@ -579,7 +602,7 @@ if ($ACTION == 'manDiaLnextCaLL') $rslt=mysql_query($stmt, $link); ### update the agent status to INCALL in vicidial_live_agents - $stmt = "UPDATE vicidial_live_agents set status='INCALL',last_call_time='$NOW_TIME',callerid='$MqueryCID',lead_id='$lead_id' where user='$user' and server_ip='$server_ip';"; + $stmt = "UPDATE vicidial_live_agents set status='INCALL',last_call_time='$NOW_TIME',callerid='$MqueryCID',lead_id='$lead_id',comments='MANUAL' where user='$user' and server_ip='$server_ip';"; if ($DB) {echo "$stmt\n";} $rslt=mysql_query($stmt, $link); } @@ -619,6 +642,8 @@ if ($ACTION == 'manDiaLnextCaLL') $LeaD_InfO .= $CBcallback_time . "\n"; $LeaD_InfO .= $CBuser . "\n"; $LeaD_InfO .= $CBcomments . "\n"; + $LeaD_InfO .= $phone_number . "\n"; + $LeaD_InfO .= "MAIN\n"; echo $LeaD_InfO; @@ -716,7 +741,7 @@ if ($ACTION == 'manDiaLonly') $rslt=mysql_query($stmt, $link); ### update the agent status to INCALL in vicidial_live_agents - $stmt = "UPDATE vicidial_live_agents set status='INCALL',last_call_time='$NOW_TIME',callerid='$MqueryCID',lead_id='$lead_id' where user='$user' and server_ip='$server_ip';"; + $stmt = "UPDATE vicidial_live_agents set status='INCALL',last_call_time='$NOW_TIME',callerid='$MqueryCID',lead_id='$lead_id',comments='MANUAL' where user='$user' and server_ip='$server_ip';"; if ($DB) {echo "$stmt\n";} $rslt=mysql_query($stmt, $link); @@ -795,8 +820,18 @@ if ($stage == "start") } else { + $user_group=''; + $stmt="SELECT user_group FROM vicidial_users where user='$user' LIMIT 1;"; + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $ug_record_ct = mysql_num_rows($rslt); + if ($ug_record_ct > 0) + { + $row=mysql_fetch_row($rslt); + $user_group = trim("$row[0]"); + } ##### 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');"; + $stmt="INSERT INTO vicidial_log (uniqueid,lead_id,list_id,campaign_id,call_date,start_epoch,status,phone_code,phone_number,user,comments,processed,user_group) values('$uniqueid','$lead_id','$list_id','$campaign','$NOW_TIME','$StarTtime','INCALL','$phone_code','$phone_number','$user','MANUAL','N','$user_group');"; if ($DB) {echo "$stmt\n";} $rslt=mysql_query($stmt, $link); $affected_rows = mysql_affected_rows($link); @@ -844,10 +879,10 @@ if ($stage == "end") { if ($start_epoch < 1000) { - if (eregi("CLOSER",$campaign)) + if (eregi("(CLOSER|BLEND|INBND|_C$|_B$|_I$)",$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';"; + $stmt="SELECT start_epoch FROM vicidial_closer_log where phone_number='$phone_number' and lead_id='$lead_id' and user='$user' order by closecallid desc limit 1;"; } else { @@ -870,32 +905,249 @@ if ($stage == "end") } else {$length_in_sec = ($StarTtime - $start_epoch);} - if (eregi("CLOSER",$campaign)) + if (eregi("(CLOSER|BLEND|INBND|_C$|_B$|_I$)",$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); } + + ############################################# + ##### START QUEUEMETRICS LOGGING LOOKUP ##### + $stmt = "SELECT enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_log_id FROM system_settings;"; + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $qm_conf_ct = mysql_num_rows($rslt); + $i=0; + while ($i < $qm_conf_ct) + { + $row=mysql_fetch_row($rslt); + $enable_queuemetrics_logging = $row[0]; + $queuemetrics_server_ip = $row[1]; + $queuemetrics_dbname = $row[2]; + $queuemetrics_login = $row[3]; + $queuemetrics_pass = $row[4]; + $queuemetrics_log_id = $row[5]; + $i++; + } + ##### END QUEUEMETRICS LOGGING LOOKUP ##### + ########################################### + if ($auto_dial_level > 0) { + ### check to see if campaign has alt_dial enabled + $stmt="SELECT auto_alt_dial FROM vicidial_campaigns where campaign_id='$campaign';"; + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $VAC_mancall_ct = mysql_num_rows($rslt); + if ($VAC_mancall_ct > 0) + { + $row=mysql_fetch_row($rslt); + $auto_alt_dial =$row[0]; + } + else {$auto_alt_dial = 'NONE';} + if (eregi("(ALT_ONLY|ADDR3_ONLY|ALT_AND_ADDR3)",$auto_alt_dial)) + { + ### check to see if lead should be alt_dialed + $stmt="SELECT alt_dial FROM vicidial_auto_calls where lead_id='$lead_id';"; + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $VAC_mancall_ct = mysql_num_rows($rslt); + if ($VAC_mancall_ct > 0) + { + $row=mysql_fetch_row($rslt); + $alt_dial =$row[0]; + } + else {$alt_dial = 'NONE';} + + if ( (eregi("(NONE|MAIN)",$alt_dial)) and (eregi("(ALT_ONLY|ALT_AND_ADDR3)",$auto_alt_dial)) ) + { + $stmt="SELECT alt_phone,gmt_offset_now,state FROM vicidial_list where lead_id='$lead_id';"; + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $VAC_mancall_ct = mysql_num_rows($rslt); + if ($VAC_mancall_ct > 0) + { + $row=mysql_fetch_row($rslt); + $alt_phone = $row[0]; + $alt_phone = eregi_replace("[^0-9]","",$alt_phone); + $gmt_offset_now = $row[1]; + $state = $row[2]; + } + else {$alt_phone = '';} + if (strlen($alt_phone)>5) + { + ### insert record into vicidial_hopper for address3 call attempt + $stmt = "INSERT INTO vicidial_hopper SET lead_id='$lead_id',campaign_id='$campaign',status='HOLD',list_id='$list_id',gmt_offset_now='$gmt_offset_now',state='$state',alt_dial='ALT',user='';"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + } + } + if ( ( (eregi("(ALT)",$alt_dial)) and (eregi("ALT_AND_ADDR3",$auto_alt_dial)) ) or ( (eregi("(NONE|MAIN)",$alt_dial)) and (eregi("ADDR3_ONLY",$auto_alt_dial)) ) ) + { + $stmt="SELECT address3,gmt_offset_now,state FROM vicidial_list where lead_id='$lead_id';"; + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $VAC_mancall_ct = mysql_num_rows($rslt); + if ($VAC_mancall_ct > 0) + { + $row=mysql_fetch_row($rslt); + $address3 = $row[0]; + $address3 = eregi_replace("[^0-9]","",$address3); + $gmt_offset_now = $row[1]; + $state = $row[2]; + } + else {$address3 = '';} + if (strlen($address3)>5) + { + ### insert record into vicidial_hopper for address3 call attempt + $stmt = "INSERT INTO vicidial_hopper SET lead_id='$lead_id',campaign_id='$campaign',status='HOLD',list_id='$list_id',gmt_offset_now='$gmt_offset_now',state='$state',alt_dial='ADDR3',user='';"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + } + } + } + + if ($enable_queuemetrics_logging > 0) + { + ### check to see if lead should be alt_dialed + $stmt="SELECT auto_call_id,lead_id,phone_number,status,campaign_id,phone_code,alt_dial,stage,callerid,uniqueid from vicidial_auto_calls where lead_id='$lead_id';"; + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $VAC_qm_ct = mysql_num_rows($rslt); + if ($VAC_qm_ct > 0) + { + $row=mysql_fetch_row($rslt); + $auto_call_id = $row[0]; + $CLlead_id = $row[1]; + $CLphone_number = $row[2]; + $CLstatus = $row[3]; + $CLcampaign_id = $row[4]; + $CLphone_code = $row[5]; + $CLalt_dial = $row[6]; + $CLstage = $row[7]; + $CLcallerid = $row[8]; + $CLuniqueid = $row[9]; + } + + $CLstage = preg_replace("/.*-/",'',$CLstage); + if (strlen($CLstage) < 1) {$CLstage=0;} + + $linkB=mysql_connect("$queuemetrics_server_ip", "$queuemetrics_login", "$queuemetrics_pass"); + mysql_select_db("$queuemetrics_dbname", $linkB); + + $stmt="SELECT count(*) from queue_log where call_id='$MDnextCID' and verb='COMPLETECALLER';"; + $rslt=mysql_query($stmt, $linkB); + if ($DB) {echo "$stmt\n";} + $VAC_cc_ct = mysql_num_rows($rslt); + if ($VAC_cc_ct > 0) + { + $row=mysql_fetch_row($rslt); + $caller_complete = $row[0]; + } + + if ($caller_complete < 1) + { + $stmt = "INSERT INTO queue_log SET partition='P01',time_id='$StarTtime',call_id='$MDnextCID',queue='$campaign',agent='Agent/$user',verb='COMPLETEAGENT',data1='$CLstage',data2='$length_in_sec',data3='1',serverid='$queuemetrics_log_id';"; + if ($DB) {echo "$stmt\n";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $linkB); + $affected_rows = mysql_affected_rows($linkB); + } + mysql_close($linkB); + } + ### delete call record from vicidial_auto_calls - $stmt = "DELETE from vicidial_auto_calls where uniqueid='$uniqueid';"; + $stmt = "DELETE from vicidial_auto_calls where lead_id='$lead_id';"; 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';"; + + $stmt = "UPDATE vicidial_live_agents set status='PAUSED',lead_id='',uniqueid=0,callerid='',channel='',call_server_ip='',last_call_finish='$NOW_TIME',comments='' where user='$user' and server_ip='$server_ip';"; if ($DB) {echo "$stmt\n";} $rslt=mysql_query($stmt, $link); + $affected_rows = mysql_affected_rows($link); + if ($affected_rows > 0) + { + if ($enable_queuemetrics_logging > 0) + { + $linkB=mysql_connect("$queuemetrics_server_ip", "$queuemetrics_login", "$queuemetrics_pass"); + mysql_select_db("$queuemetrics_dbname", $linkB); + + $stmt = "INSERT INTO queue_log SET partition='P01',time_id='$StarTtime',call_id='NONE',queue='NONE',agent='Agent/$user',verb='PAUSEALL',serverid='$queuemetrics_log_id';"; + if ($DB) {echo "$stmt\n";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $linkB); + $affected_rows = mysql_affected_rows($linkB); + + mysql_close($linkB); + } + } } else { + if ($enable_queuemetrics_logging > 0) + { + ### check to see if lead should be alt_dialed + $stmt="SELECT auto_call_id,lead_id,phone_number,status,campaign_id,phone_code,alt_dial,stage,callerid,uniqueid from vicidial_auto_calls where lead_id='$lead_id';"; + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $VAC_qm_ct = mysql_num_rows($rslt); + if ($VAC_qm_ct > 0) + { + $row=mysql_fetch_row($rslt); + $auto_call_id = $row[0]; + $CLlead_id = $row[1]; + $CLphone_number = $row[2]; + $CLstatus = $row[3]; + $CLcampaign_id = $row[4]; + $CLphone_code = $row[5]; + $CLalt_dial = $row[6]; + $CLstage = $row[7]; + $CLcallerid = $row[8]; + $CLuniqueid = $row[9]; + } + + $CLstage = preg_replace("/XFER|-/",'',$CLstage); + if ($CLstage < 0.25) {$CLstage=0;} + + $linkB=mysql_connect("$queuemetrics_server_ip", "$queuemetrics_login", "$queuemetrics_pass"); + mysql_select_db("$queuemetrics_dbname", $linkB); + + $stmt = "INSERT INTO queue_log SET partition='P01',time_id='$StarTtime',call_id='$MDnextCID',queue='$campaign',agent='Agent/$user',verb='COMPLETEAGENT',data1='$CLstage',data2='$length_in_sec',data3='1',serverid='$queuemetrics_log_id';"; + if ($DB) {echo "$stmt\n";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $linkB); + $affected_rows = mysql_affected_rows($linkB); + + mysql_close($linkB); + } + $stmt = "DELETE from vicidial_auto_calls lead_id='$lead_id';"; 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';"; + $stmt = "UPDATE vicidial_live_agents set status='PAUSED',lead_id='',uniqueid=0,callerid='',channel='',call_server_ip='',last_call_finish='$NOW_TIME',comments='' where user='$user' and server_ip='$server_ip';"; if ($DB) {echo "$stmt\n";} $rslt=mysql_query($stmt, $link); + $affected_rows = mysql_affected_rows($link); + if ($affected_rows > 0) + { + if ($enable_queuemetrics_logging > 0) + { + $linkB=mysql_connect("$queuemetrics_server_ip", "$queuemetrics_login", "$queuemetrics_pass"); + mysql_select_db("$queuemetrics_dbname", $linkB); + + $stmt = "INSERT INTO queue_log SET partition='P01',time_id='$StarTtime',call_id='NONE',queue='NONE',agent='Agent/$user',verb='PAUSEALL',serverid='$queuemetrics_log_id';"; + if ($DB) {echo "$stmt\n";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $linkB); + $affected_rows = mysql_affected_rows($linkB); + + mysql_close($linkB); + } + } } ##### look for the channel in the UPDATED vicidial_manager record of the call initiation @@ -1095,7 +1347,7 @@ if ($ACTION == 'VDADcheckINCOMING') 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';"; + $stmt = "UPDATE vicidial_live_agents set status='INCALL',last_call_time='$NOW_TIME',comments='AUTO' where user='$user' and server_ip='$server_ip';"; if ($DB) {echo "$stmt\n";} $rslt=mysql_query($stmt, $link); @@ -1163,25 +1415,37 @@ if ($ACTION == 'VDADcheckINCOMING') $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';"; + $user_group=''; + $stmt="SELECT user_group FROM vicidial_users where user='$user' LIMIT 1;"; + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $ug_record_ct = mysql_num_rows($rslt); + if ($ug_record_ct > 0) + { + $row=mysql_fetch_row($rslt); + $user_group = trim("$row[0]"); + } + $stmt = "UPDATE vicidial_log set user='$user', comments='AUTO', list_id='$list_id', status='INCALL', user_group='$user_group' where lead_id='$lead_id' and uniqueid='$uniqueid';"; if ($DB) {echo "$stmt\n";} $rslt=mysql_query($stmt, $link); - if (eregi("CLOSER",$campaign)) + if (eregi("(CLOSER|BLEND|INBND|_C$|_B$|_I$)",$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;"; + $stmt = "UPDATE vicidial_closer_log set user='$user', comments='AUTO', list_id='$list_id', status='INCALL', user_group='$user_group' 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;"; + $stmt = "select campaign_id,phone_number,alt_dial 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) + if ($VDAC_cid_ct > 0) { $row=mysql_fetch_row($rslt); $VDADchannel_group =$row[0]; + $dialed_number =$row[1]; + $dialed_label =$row[2]; } $stmt = "select count(*) from vicidial_log where lead_id='$lead_id' and uniqueid='$uniqueid';"; @@ -1211,6 +1475,11 @@ if ($ACTION == 'VDADcheckINCOMING') $VDCL_xferconf_a_number = $row[11]; $VDCL_xferconf_b_dtmf = $row[12]; $VDCL_xferconf_b_number = $row[13]; + + ### update the comments in vicidial_live_agents record + $stmt = "UPDATE vicidial_live_agents set comments='INBOUND' where user='$user' and server_ip='$server_ip';"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); } else { @@ -1263,6 +1532,17 @@ if ($ACTION == 'VDADcheckINCOMING') $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"; + + $stmt = "select phone_number,alt_dial 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 ($VDAC_cid_ct > 0) + { + $row=mysql_fetch_row($rslt); + $dialed_number =$row[0]; + $dialed_label =$row[1]; + } } $comments = eregi_replace("\r",'',$comments); @@ -1300,6 +1580,8 @@ if ($ACTION == 'VDADcheckINCOMING') $LeaD_InfO .= $CBcallback_time . "\n"; $LeaD_InfO .= $CBuser . "\n"; $LeaD_InfO .= $CBcomments . "\n"; + $LeaD_InfO .= $dialed_number . "\n"; + $LeaD_InfO .= $dialed_label . "\n"; echo $LeaD_InfO; @@ -1327,6 +1609,7 @@ if ($ACTION == 'VDADcheckINCOMING') if ($format=='debug') {echo "\n";} $rslt=mysql_query($stmt, $link); } + } else { @@ -1354,8 +1637,18 @@ if ( (strlen($campaign)<1) || (strlen($conf_exten)<1) ) } else { + $user_group=''; + $stmt="SELECT user_group FROM vicidial_users where user='$user' LIMIT 1;"; + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $ug_record_ct = mysql_num_rows($rslt); + if ($ug_record_ct > 0) + { + $row=mysql_fetch_row($rslt); + $user_group = trim("$row[0]"); + } ##### Insert a LOGOUT record into the user log - $stmt="INSERT INTO vicidial_user_log values('','$user','LOGOUT','$campaign','$NOW_TIME','$StarTtime');"; + $stmt="INSERT INTO vicidial_user_log (user,event,campaign_id,event_date,event_epoch,user_group) values('$user','LOGOUT','$campaign','$NOW_TIME','$StarTtime','$user_group');"; if ($DB) {echo "$stmt\n";} $rslt=mysql_query($stmt, $link); $vul_insert = mysql_affected_rows($link); @@ -1390,11 +1683,94 @@ else $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','','','','','','','','','');"; + $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Hangup','ULGH3459$StarTtime','Channel: $agent_channel','','','','','','','','','');"; if ($format=='debug') {echo "\n";} $rslt=mysql_query($stmt, $link); } + $pause_sec=0; + $stmt = "select pause_epoch,pause_sec,wait_epoch,talk_epoch,dispo_epoch 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) and (strlen($row[3]<5)) and (strlen($row[4]<5)) ) + { + $row=mysql_fetch_row($rslt); + $pause_sec = (($StarTtime - $row[0]) + $row[1]); + + $stmt="UPDATE vicidial_agent_log set pause_sec='$pause_sec',wait_epoch='$StarTtime' where agent_log_id='$agent_log_id';"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + } + + if ($vla_delete > 0) + { + ############################################# + ##### START QUEUEMETRICS LOGGING LOOKUP ##### + $stmt = "SELECT enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_log_id,allow_sipsak_messages FROM system_settings;"; + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $qm_conf_ct = mysql_num_rows($rslt); + $i=0; + while ($i < $qm_conf_ct) + { + $row=mysql_fetch_row($rslt); + $enable_queuemetrics_logging = $row[0]; + $queuemetrics_server_ip = $row[1]; + $queuemetrics_dbname = $row[2]; + $queuemetrics_login = $row[3]; + $queuemetrics_pass = $row[4]; + $queuemetrics_log_id = $row[5]; + $allow_sipsak_messages = $row[6]; + $i++; + } + ##### END QUEUEMETRICS LOGGING LOOKUP ##### + ########################################### + if ( ($enable_sipsak_messages > 0) and ($allow_sipsak_messages > 0) and (eregi("SIP",$protocol)) ) + { + $SIPSAK_message = 'LOGGED OUT'; + passthru("/usr/local/bin/sipsak -M -O desktop -B \"$SIPSAK_message\" -r 5060 -s sip:$extension@$phone_ip > /dev/null"); + } + + if ($enable_queuemetrics_logging > 0) + { + $linkB=mysql_connect("$queuemetrics_server_ip", "$queuemetrics_login", "$queuemetrics_pass"); + mysql_select_db("$queuemetrics_dbname", $linkB); + + # $stmt = "INSERT INTO queue_log SET partition='P01',time_id='$StarTtime',call_id='NONE',queue='$campaign',agent='Agent/$user',verb='PAUSE',serverid='1';"; + # if ($DB) {echo "$stmt\n";} + # if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + # $rslt=mysql_query($stmt, $linkB); + # $affected_rows = mysql_affected_rows($linkB); + + $stmt = "SELECT time_id FROM queue_log where agent='Agent/$user' and verb='AGENTLOGIN' order by time_id desc limit 1;"; + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $linkB); + if ($DB) {echo "$stmt\n";} + echo "$stmt\n"; + $li_conf_ct = mysql_num_rows($rslt); + $i=0; + while ($i < $li_conf_ct) + { + $row=mysql_fetch_row($rslt); + $logintime = $row[0]; + $i++; + } + + $time_logged_in = ($StarTtime - $logintime); + if ($time_logged_in > 1000000) {$time_logged_in=1;} + + $stmt = "INSERT INTO queue_log SET partition='P01',time_id='$StarTtime',call_id='NONE',queue='$campaign',agent='Agent/$user',verb='AGENTLOGOFF',data1='$user$agents',data2='$time_logged_in',serverid='$queuemetrics_log_id';"; + if ($DB) {echo "$stmt\n";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $linkB); + $affected_rows = mysql_affected_rows($linkB); + + mysql_close($linkB); + } + } + echo "$vul_insert|$vc_remove|$vla_delete|$wcs_delete|$agent_channel\n"; } } @@ -1423,7 +1799,14 @@ if ($ACTION == 'updateDISPO') if ($format=='debug') {echo "\n";} $rslt=mysql_query($stmt, $link); - if ( ($use_internal_dnc=='Y') and ($dispo_choice=='DNC') ) + if (eregi("(CLOSER|BLEND|INBND|_C$|_B$|_I$)",$campaign)) + { + $stmt = "UPDATE vicidial_closer_log set status='$dispo_choice' where lead_id='$lead_id' and user='$user' order by closecallid desc limit 1;"; + if ($DB) {echo "$stmt\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";} @@ -1450,20 +1833,91 @@ if ($ACTION == 'updateDISPO') 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');"; + $user_group=''; + $stmt="SELECT user_group FROM vicidial_users where user='$user' LIMIT 1;"; + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $ug_record_ct = mysql_num_rows($rslt); + if ($ug_record_ct > 0) + { + $row=mysql_fetch_row($rslt); + $user_group = trim("$row[0]"); + } + + $stmt="INSERT INTO vicidial_agent_log (user,server_ip,event_time,campaign_id,pause_epoch,pause_sec,wait_epoch,user_group) values('$user','$server_ip','$NOW_TIME','$campaign','$StarTtime','0','$StarTtime','$user_group');"; if ($DB) {echo "$stmt\n";} $rslt=mysql_query($stmt, $link); $affected_rows = mysql_affected_rows($link); - $agent_log_id = mysql_insert_id(); + $agent_log_id = mysql_insert_id($link); ### ANRUFBACK 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');"; + $stmt="INSERT INTO vicidial_callbacks (lead_id,list_id,campaign_id,status,entry_time,callback_time,user,recipient,comments,user_group) values('$lead_id','$list_id','$campaign','ACTIVE','$NOW_TIME','$CallBackDatETimE','$user','$recipient','$comments','$user_group');"; if ($DB) {echo "$stmt\n";} $rslt=mysql_query($stmt, $link); } + $stmt="SELECT auto_alt_dial_statuses from vicidial_campaigns where campaign_id='$campaign';"; + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + + if ( ($auto_dial_level > 0) and (ereg(" $dispo_choice ",$row[0])) ) + { + $stmt = "select count(*) from vicidial_hopper where lead_id='$lead_id' and status='HOLD';"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + + if ($row[0] > 0) + { + $stmt="UPDATE vicidial_hopper set status='READY' where lead_id='$lead_id' and status='HOLD' limit 1;"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + } + } + else + { + $stmt="DELETE from vicidial_hopper where lead_id='$lead_id' and status='HOLD';"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + } + + ############################################# + ##### START QUEUEMETRICS LOGGING LOOKUP ##### + $stmt = "SELECT enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_log_id FROM system_settings;"; + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $qm_conf_ct = mysql_num_rows($rslt); + $i=0; + while ($i < $qm_conf_ct) + { + $row=mysql_fetch_row($rslt); + $enable_queuemetrics_logging = $row[0]; + $queuemetrics_server_ip = $row[1]; + $queuemetrics_dbname = $row[2]; + $queuemetrics_login = $row[3]; + $queuemetrics_pass = $row[4]; + $queuemetrics_log_id = $row[5]; + $i++; + } + ##### END QUEUEMETRICS LOGGING LOOKUP ##### + ########################################### + if ($enable_queuemetrics_logging > 0) + { + $linkB=mysql_connect("$queuemetrics_server_ip", "$queuemetrics_login", "$queuemetrics_pass"); + mysql_select_db("$queuemetrics_dbname", $linkB); + + $stmt = "INSERT INTO queue_log SET partition='P01',time_id='$StarTtime',call_id='$MDnextCID',queue='$campaign',agent='Agent/$user',verb='CALLSTATUS',data1='$dispo_choice',serverid='$queuemetrics_log_id';"; + if ($DB) {echo "$stmt\n";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $linkB); + $affected_rows = mysql_affected_rows($linkB); + + mysql_close($linkB); + } + echo 'Lead ' . $lead_id . ' wurde geändert zu ' . $dispo_choice . " Status\nNext agent_log_id:\n" . $agent_log_id . "\n"; } @@ -1475,6 +1929,8 @@ if ($ACTION == 'updateLEAD') { $MT[0]=''; $row=''; $rowx=''; + $DO_NOT_UPDATE=0; + $DO_NOT_UPDATE_text=''; if ( (strlen($phone_number)<1) || (strlen($lead_id)<1) ) { echo "phone_number $phone_number or lead_id $lead_id ist unzulässig\n"; @@ -1482,12 +1938,54 @@ if ($ACTION == 'updateLEAD') } 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";} + $stmt = "SELECT disable_alter_custdata FROM vicidial_campaigns where campaign_id='$campaign'"; + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $dac_conf_ct = mysql_num_rows($rslt); + $i=0; + while ($i < $dac_conf_ct) + { + $row=mysql_fetch_row($rslt); + $disable_alter_custdata = $row[0]; + $i++; + } + if (ereg('Y',$disable_alter_custdata)) + { + $DO_NOT_UPDATE=1; + $DO_NOT_UPDATE_text=' NOT'; + $stmt = "SELECT alter_custdata_override FROM vicidial_users where user='$user'"; + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $aco_conf_ct = mysql_num_rows($rslt); + $i=0; + while ($i < $aco_conf_ct) + { + $row=mysql_fetch_row($rslt); + $alter_custdata_override = $row[0]; + $i++; + } + if (ereg('ALLOW_ALTER',$alter_custdata_override)) + { + $DO_NOT_UPDATE=0; + $DO_NOT_UPDATE_text=''; + } + } + + if ($DO_NOT_UPDATE < 1) + { + $comments = eregi_replace("\r",'',$comments); + $comments = eregi_replace("\n",'!N',$comments); + $comments = eregi_replace("--AMP--",'&',$comments); + $comments = eregi_replace("--QUES--",'?',$comments); + $comments = eregi_replace("--POUND--",'#',$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';"; @@ -1495,7 +1993,7 @@ if ($ACTION == 'updateLEAD') $rslt=mysql_query($stmt, $link); } - echo "Lead $lead_id Informationen sind aktualisiert worden\n"; + echo "Lead $lead_id information has$DO_NOT_UPDATE_text been updated\n"; } @@ -1515,10 +2013,54 @@ if ( ($ACTION == 'VDADpause') || ($ACTION == 'VDADready') ) 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';"; + $stmt="UPDATE vicidial_live_agents set lead_id='',uniqueid=0,callerid='',channel='', random_id='$random',comments='' where user='$user' and server_ip='$server_ip';"; if ($format=='debug') {echo "\n";} $rslt=mysql_query($stmt, $link); + $stmt="UPDATE vicidial_live_agents set status='$stage' where user='$user' and server_ip='$server_ip';"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + $affected_rows = mysql_affected_rows($link); + if ($affected_rows > 0) + { + ############################################# + ##### START QUEUEMETRICS LOGGING LOOKUP ##### + $stmt = "SELECT enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_log_id FROM system_settings;"; + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $qm_conf_ct = mysql_num_rows($rslt); + $i=0; + while ($i < $qm_conf_ct) + { + $row=mysql_fetch_row($rslt); + $enable_queuemetrics_logging = $row[0]; + $queuemetrics_server_ip = $row[1]; + $queuemetrics_dbname = $row[2]; + $queuemetrics_login = $row[3]; + $queuemetrics_pass = $row[4]; + $queuemetrics_log_id = $row[5]; + $i++; + } + ##### END QUEUEMETRICS LOGGING LOOKUP ##### + ########################################### + if ($enable_queuemetrics_logging > 0) + { + if (ereg('READY',$stage)) {$QMstatus='UNPAUSEALL';} + if (ereg('PAUSE',$stage)) {$QMstatus='PAUSEALL';} + $linkB=mysql_connect("$queuemetrics_server_ip", "$queuemetrics_login", "$queuemetrics_pass"); + mysql_select_db("$queuemetrics_dbname", $linkB); + + $stmt = "INSERT INTO queue_log SET partition='P01',time_id='$StarTtime',call_id='NONE',queue='NONE',agent='Agent/$user',verb='$QMstatus',serverid='$queuemetrics_log_id';"; + if ($DB) {echo "$stmt\n";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $linkB); + $affected_rows = mysql_affected_rows($linkB); + + mysql_close($linkB); + } + } + if ($agent_log == 'NO') {$donothing=1;} else @@ -1587,6 +2129,71 @@ if ($ACTION == 'UpdatEFavoritEs') } +################################################################################ +### PauseCodeSubmit - Update vicidial_agent_log with pause code +################################################################################ +if ($ACTION == 'PauseCodeSubmit') +{ + $row=''; $rowx=''; + if ( (strlen($status)<1) || (strlen($agent_log_id)<1) ) + { + echo "agent_log_id $agent_log_id or pause_code $status ist unzulässig\n"; + exit; + } + else + { + $stmt="UPDATE vicidial_agent_log set sub_status=\"$status\" where agent_log_id='$agent_log_id';"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + $affected_rows = mysql_affected_rows($link); + if ($affected_rows > 0) + { + ############################################# + ##### START QUEUEMETRICS LOGGING LOOKUP ##### + $stmt = "SELECT enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_log_id,allow_sipsak_messages FROM system_settings;"; + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $qm_conf_ct = mysql_num_rows($rslt); + $i=0; + while ($i < $qm_conf_ct) + { + $row=mysql_fetch_row($rslt); + $enable_queuemetrics_logging = $row[0]; + $queuemetrics_server_ip = $row[1]; + $queuemetrics_dbname = $row[2]; + $queuemetrics_login = $row[3]; + $queuemetrics_pass = $row[4]; + $queuemetrics_log_id = $row[5]; + $allow_sipsak_messages = $row[6]; + $i++; + } + ##### END QUEUEMETRICS LOGGING LOOKUP ##### + ########################################### + if ( ($enable_sipsak_messages > 0) and ($allow_sipsak_messages > 0) and (eregi("SIP",$protocol)) ) + { + $SIPSAK_prefix = 'BK-'; + passthru("/usr/local/bin/sipsak -M -O desktop -B \"$SIPSAK_prefix$status\" -r 5060 -s sip:$extension@$phone_ip > /dev/null"); + } + if ($enable_queuemetrics_logging > 0) + { + $linkB=mysql_connect("$queuemetrics_server_ip", "$queuemetrics_login", "$queuemetrics_pass"); + mysql_select_db("$queuemetrics_dbname", $linkB); + + $stmt = "INSERT INTO queue_log SET partition='P01',time_id='$StarTtime',call_id='NONE',queue='$campaign',agent='Agent/$user',verb='PAUSEREASON',serverid='$queuemetrics_log_id',data1='$status';"; + if ($DB) {echo "$stmt\n";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $linkB); + $affected_rows = mysql_affected_rows($linkB); + + mysql_close($linkB); + } + } + } +echo "Pause Code has been updated to $status for $agent_log_id\n"; +} + + ################################################################################ ### CalLBacKLisT - List the USERONLY callbacks for an agent ################################################################################ diff --git a/agc_2-X/trunk/LANG_www/agc_de/vicidial.php b/agc_2-X/trunk/LANG_www/agc_de/vicidial.php index fcd71de5..54ce7107 100644 --- a/agc_2-X/trunk/LANG_www/agc_de/vicidial.php +++ b/agc_2-X/trunk/LANG_www/agc_de/vicidial.php @@ -1,7 +1,7 @@ LICENSE: GPLv2 +# Copyright (C) 2007 Matt Florell 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 @@ -15,7 +15,7 @@ # - vdc_db_query.php: Updates information in the database # - manager_send.php: Sends manager actions to the DB for execution # -# CHANGES +# CHANGELOG # 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 @@ -132,8 +132,37 @@ # 61128-2229 - Added vicidial_live_agents and vicidial_auto_calls manual dial entries # 61130-1617 - Added lead_id to MonitorConf for recording_log # 61221-1212 - Changed width to 760 to better fit 800x600 screens, widened SCRIPT +# 70109-1128 - Fixed wrapup timer bug +# 70109-1635 - Added option for HotKeys automatically dialing next number in manual mode +# - Added option for alternate number dialing with hotkeys +# 70111-1600 - Added ability to use BLEND/INBND/*_C/*_B/*_I as closer campaigns +# 70118-1517 - Added vicidial_agent_log and vicidial_user_log logging of user_group +# 70201-1249 - Added FAST DIAL option for manually dialing, added UTF8 compatible code +# 70201-1703 - Fixed cursor bug for most text input fields +# 70202-1453 - Added first portions of Agent Pause Codes +# 70203-0108 - Finished Agent Pause Codes functionality +# 70203-0930 - Added dialed_number to webform output +# 70203-1010 - Added dialed_label to webform output +# 70206-1201 - Fixed allow_closers bug +# 70206-1332 - Added vicidial_recording_override users setting function +# 70212-1252 - Fixed small issue with CXFER +# 70213-1018 - Changed CXFER and AXFER to update customer information before transfer +# 70214-1233 - Added queuemetrics_log_id field for server_id in queue_log +# 70215-1240 - Added queuemetrics_log_id field for server_id in queue_log +# 70222-1617 - Changed queue_log PAUSE/UNPAUSE to PAUSEALL/UNPAUSEALL +# 70226-1252 - Added Mute/UnMute to agent screen +# 70309-1035 - Allow amphersands and questions marks in comments to pass through +# 70313-1052 - Allow pound signs(hash) in comments to pass through +# 70316-1406 - Moved the MUTE button to be accessible during a transfer/conf +# 70319-1446 - Added agent-deactive-display and disable customer info update functions +# 70319-1626 - Added option to allow agent logins to campaigns with no leads in the hopper +# 70320-1501 - Added option to allow retry of leave-3way-call from dispo screen +# 70322-1545 - Added sipsak display ability # +$version = '2.0.129'; +$build = '70322-1545'; + require("dbconnect.php"); if (isset($_GET["DB"])) {$DB=$_GET["DB"];} @@ -172,14 +201,11 @@ if (isset($_GET["relogin"])) {$relogin=$_GET["relogin"];} $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); + $VD_campaign=ereg_replace("[^0-9a-zA-Z_]","",$VD_campaign); $forever_stop=0; -$version = '2.0.105'; -$build = '61221-1212'; - if ($force_logout) { echo "Sie haben sich abgemeldet. Danke\n"; @@ -226,6 +252,7 @@ $TEST_all_statuses = '0'; # TEST variable allows all statuses in dispo screen $US='_'; $CL=':'; $AT='@'; +$DS='-'; $date = date("r"); $ip = getenv("REMOTE_ADDR"); $browser = getenv("HTTP_USER_AGENT"); @@ -252,6 +279,7 @@ $camp_form_code = " 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $phone_login=$row[0]; @@ -438,6 +467,7 @@ $VDloginDISPLAY=0; { $stmt="SELECT count(*) from vicidial_users where user='$VD_login' and pass='$VD_pass' and user_level > 0;"; if ($DB) {echo "|$stmt|\n";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $auth=$row[0]; @@ -447,7 +477,8 @@ $VDloginDISPLAY=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,user_group from vicidial_users where user='$VD_login' and pass='$VD_pass'"; + $stmt="SELECT full_name,user_level,hotkeys_active,agent_choose_ingroups,scheduled_callbacks,agentonly_callbacks,agentcall_manual,vicidial_recording,vicidial_transfers,closer_default_blended,user_group,vicidial_recording_override from vicidial_users where user='$VD_login' and pass='$VD_pass'"; + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $LOGfullname=$row[0]; @@ -461,6 +492,8 @@ $VDloginDISPLAY=0; $VU_vicidial_transfers=$row[8]; $VU_closer_default_blended=$row[9]; $VU_user_group=$row[10]; + $VU_vicidial_recording_override=$row[11]; + if ($WeBRooTWritablE > 0) { fwrite ($fp, "vdweb|GOOD|$date|$VD_login|$VD_pass|$ip|$browser|$LOGfullname|\n"); @@ -471,6 +504,7 @@ $VDloginDISPLAY=0; {$user_abb = eregi_replace("^.","",$user_abb); $forever_stop++;} $stmt="SELECT allowed_campaigns from vicidial_user_groups where user_group='$VU_user_group';"; + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $LOGallowed_campaigns =$row[0]; @@ -501,6 +535,7 @@ echo " 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $CAMPactive=$row[0]; @@ -512,6 +547,7 @@ echo " 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $VD_statuses_ct = mysql_num_rows($rslt); @@ -528,6 +564,7 @@ echo " 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $VD_statuses_camp = mysql_num_rows($rslt); @@ -548,6 +585,7 @@ echo " 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $HK_statuses_camp = mysql_num_rows($rslt); @@ -577,43 +615,46 @@ echo " 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $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]; - $allcalls_delay=$row[30]; - $omit_phone_code=$row[31]; + $park_ext = $row[0]; + $park_file_name = $row[1]; + $web_form_address = $row[2]; + $allow_closers = $row[3]; + $auto_dial_level = $row[4]; + $dial_timeout = $row[5]; + $dial_prefix = $row[6]; + $campaign_cid = $row[7]; + $campaign_vdad_exten = $row[8]; + $campaign_rec_exten = $row[9]; + $campaign_recording = $row[10]; + $campaign_rec_filename = $row[11]; + $campaign_script = $row[12]; + $get_call_launch = $row[13]; + $campaign_am_message_exten = $row[14]; + $xferconf_a_dtmf = $row[15]; + $xferconf_a_number = $row[16]; + $xferconf_b_dtmf = $row[17]; + $xferconf_b_number = $row[18]; + $alt_number_dialing = $row[19]; + $VC_scheduled_callbacks = $row[20]; + $wrapup_Sekunden = $row[21]; + $wrapup_message = $row[22]; + $closer_campaigns = $row[23]; + $use_internal_dnc = $row[24]; + $allcalls_delay = $row[25]; + $omit_phone_code = $row[26]; + $agent_pause_codes_active = $row[27]; + $no_hopper_leads_logins = $row[28]; + if ( (!ereg('DISABLED',$VU_vicidial_recording_override)) and ($VU_vicidial_recording > 0) ) + { + $campaign_recording = $VU_vicidial_recording_override; + print "\n"; + } if ( ($VC_scheduled_callbacks=='Y') and ($VU_scheduled_callbacks=='1') ) {$scheduled_callbacks='1';} if ($VU_vicidial_recording=='0') @@ -626,12 +667,37 @@ echo " 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $VD_pause_codes = mysql_num_rows($rslt); + $j=0; + while ($j < $VD_pause_codes) + { + $row=mysql_fetch_row($rslt); + $pause_codes[$i] =$row[0]; + $pause_code_names[$i] =$row[1]; + $VARpause_codes = "$VARpause_codes'$pause_codes[$i]',"; + $VARpause_code_names = "$VARpause_code_names'$pause_code_names[$i]',"; + $i++; + $j++; + } + $VD_pause_codes_ct = ($VD_pause_codes_ct+$VD_pause_codes); + $VARpause_codes = substr("$VARpause_codes", 0, -1); + $VARpause_code_names = substr("$VARpause_code_names", 0, -1); + } + ##### grab the inbound groups to choose from if campaign contains CLOSER $VARingroups="''"; - if (eregi("CLOSER", $VD_campaign)) + if (eregi("(CLOSER|BLEND|INBND|_C$|_B$|_I$)", $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;"; + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $closer_ct = mysql_num_rows($rslt); @@ -648,6 +714,7 @@ echo " 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $row=mysql_fetch_row($rslt); @@ -708,6 +775,7 @@ echo " 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $authphone=$row[0]; @@ -746,6 +814,7 @@ else echo "VICIWÄHLEN web client\n"; $stmt="SELECT * from phones where login='$phone_login' and pass='$phone_pass' and active = 'Y';"; if ($DB) {echo "|$stmt|\n";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $extension=$row[0]; @@ -808,6 +877,7 @@ else $DBX_user=$row[57]; $DBX_pass=$row[58]; $DBX_port=$row[59]; + $enable_sipsak_messages=$row[66]; if ($clientDST) { @@ -822,6 +892,7 @@ else $stmt="SELECT asterisk_version from servers where server_ip='$server_ip';"; if ($DB) {echo "|$stmt|\n";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $asterisk_version=$row[0]; @@ -875,21 +946,25 @@ else $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";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $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";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); - if ( (eregi("CLOSER", $VD_campaign)) || ($campaign_leads_to_call > 0) ) + if ( (eregi("(CLOSER|BLEND|INBND|_C$|_B$|_I$)", $VD_campaign)) || ($campaign_leads_to_call > 0) || (ereg('Y',$no_hopper_leads_logins)) ) { ### 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')"; + $stmt = "INSERT INTO vicidial_user_log (user,event,campaign_id,event_date,event_epoch,user_group) values('$VD_login','LOGIN','$VD_campaign','$NOW_TIME','$StarTtimE','$VU_user_group')"; if ($DB) {echo "|$stmt|\n";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $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;"; + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $prev_login_ct = mysql_num_rows($rslt); @@ -906,6 +981,7 @@ 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;"; + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $free_conf_ct = mysql_num_rows($rslt); @@ -917,6 +993,7 @@ else $i++; } $stmt="UPDATE vicidial_conferences set extension='$SIP_user' where server_ip='$server_ip' and conf_exten='$session_id';"; + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); print "\n"; @@ -924,18 +1001,21 @@ else $stmt="UPDATE vicidial_list set status='N', user='' where status IN('QUEUE','INCALL') and user ='$VD_login';"; if ($DB) {echo "$stmt\n";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $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";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $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";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); $affected_rows = mysql_affected_rows($link); print "\n"; @@ -943,11 +1023,45 @@ else # print "You have logged in as user: $VD_login an phone: $SIP_user zur Kampagne: $VD_campaign
\n"; $VICIDiaL_is_logged_in=1; - ### use manager middleware-app to connect the phone to the user + ### set the callerID for manager middleware-app to connect the phone to the user $SIqueryCID = "S$CIDdate$session_id"; + + ############################################# + ##### START SYSTEM_SETTINGS LOOKUP ##### + $stmt = "SELECT enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_log_id,vicidial_agent_disable,allow_sipsak_messages FROM system_settings;"; + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $qm_conf_ct = mysql_num_rows($rslt); + $i=0; + while ($i < $qm_conf_ct) + { + $row=mysql_fetch_row($rslt); + $enable_queuemetrics_logging = $row[0]; + $queuemetrics_server_ip = $row[1]; + $queuemetrics_dbname = $row[2]; + $queuemetrics_login = $row[3]; + $queuemetrics_pass = $row[4]; + $queuemetrics_log_id = $row[5]; + $vicidial_agent_disable = $row[6]; + $allow_sipsak_messages = $row[7]; + $i++; + } + ##### END QUEUEMETRICS LOGGING LOOKUP ##### + ########################################### + + if ( ($enable_sipsak_messages > 0) and ($allow_sipsak_messages > 0) and (eregi("SIP",$protocol)) ) + { + $SIPSAK_prefix = 'LIN-'; + print "\n"; + passthru("/usr/local/bin/sipsak -M -O desktop -B \"$SIPSAK_prefix$VD_campaign\" -r 5060 -s sip:$extension@$phone_ip > /dev/null"); + $SIqueryCID = "$SIPSAK_prefix$VD_campaign$DS$CIDdate"; + } + ### 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";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); $affected_rows = mysql_affected_rows($link); print "\n"; @@ -959,13 +1073,38 @@ else $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";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); $affected_rows = mysql_affected_rows($link); print "\n"; - if (eregi("CLOSER", $VD_campaign)) + if ($enable_queuemetrics_logging > 0) { - print "\n"; + $linkB=mysql_connect("$queuemetrics_server_ip", "$queuemetrics_login", "$queuemetrics_pass"); + mysql_select_db("$queuemetrics_dbname", $linkB); + + $stmt = "INSERT INTO queue_log SET partition='P01',time_id='$StarTtimE',call_id='NONE',queue='$VD_campaign',agent='Agent/$VD_login',verb='AGENTLOGIN',data1='$VD_login@agents',serverid='$queuemetrics_log_id';"; + if ($DB) {echo "$stmt\n";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $linkB); + $affected_rows = mysql_affected_rows($linkB); + print "\n"; + + $stmt = "INSERT INTO queue_log SET partition='P01',time_id='$StarTtimE',call_id='NONE',queue='NONE',agent='Agent/$VD_login',verb='PAUSEALL',serverid='$queuemetrics_log_id';"; + if ($DB) {echo "$stmt\n";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $linkB); + $affected_rows = mysql_affected_rows($linkB); + print "\n"; + + mysql_close($linkB); + mysql_select_db("$VARDB_database", $link); + } + + + if (eregi("(CLOSER|BLEND|INBND|_C$|_B$|_I$)", $VD_campaign)) + { + print "\n"; } } else @@ -974,9 +1113,33 @@ else $stmt="INSERT INTO vicidial_live_agents (user,server_ip,conf_exten,extension,status,lead_id,campaign_id,uniqueid,callerid,channel,random_id,last_call_time,last_update_time,last_call_finish,user_level) values('$VD_login','$server_ip','$session_id','$SIP_user','PAUSED','','$VD_campaign','','','','$random','$NOW_TIME','$tsNOW_TIME','$NOW_TIME','$user_level');"; if ($DB) {echo "$stmt\n";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); $affected_rows = mysql_affected_rows($link); print "\n"; + + if ($enable_queuemetrics_logging > 0) + { + $linkB=mysql_connect("$queuemetrics_server_ip", "$queuemetrics_login", "$queuemetrics_pass"); + mysql_select_db("$queuemetrics_dbname", $linkB); + + $stmt = "INSERT INTO queue_log SET partition='P01',time_id='$StarTtimE',call_id='NONE',queue='$VD_campaign',agent='Agent/$VD_login',verb='AGENTLOGIN',data1='$VD_login@agents',serverid='$queuemetrics_log_id';"; + if ($DB) {echo "$stmt\n";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $linkB); + $affected_rows = mysql_affected_rows($linkB); + print "\n"; + + $stmt = "INSERT INTO queue_log SET partition='P01',time_id='$StarTtimE',call_id='NONE',queue='NONE',agent='Agent/$VD_login',verb='PAUSEALL',serverid='$queuemetrics_log_id';"; + if ($DB) {echo "$stmt\n";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $linkB); + $affected_rows = mysql_affected_rows($linkB); + print "\n"; + + mysql_close($linkB); + mysql_select_db("$VARDB_database", $link); + } } } else @@ -1027,11 +1190,12 @@ echo "
0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); $affected_rows = mysql_affected_rows($link); - $agent_log_id = mysql_insert_id(); + $agent_log_id = mysql_insert_id($link); print "\n"; $S='*'; @@ -1048,6 +1212,7 @@ echo " 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $MM_scripts = mysql_num_rows($rslt); @@ -1225,6 +1390,10 @@ $CCAL_OUT .= "
"; var CallBackCommenTs = ''; var scheduled_callbacks = ''; var dispo_check_all_pause = ''; + var agent_pause_codes_active = ''; + VARpause_codes = new Array(); + VARpause_code_names = new Array(); + var VD_pause_codes_ct = ''; VARstatuses = new Array(); VARstatusnames = new Array(); var VD_statuses_ct = ''; @@ -1277,6 +1446,7 @@ $CCAL_OUT .= "
"; var dialplan_number = ''; var ext_context = ''; var protocol = ''; + var agentchannel = ''; var local_gmt =''; var server_ip = ''; var server_ip_dialstring = ''; @@ -1292,6 +1462,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} var CalLCID = ''; var MDnextCID = ''; var XDnextCID = ''; + var LasTCID = ''; var lead_dial_number = ''; var MD_channel_look = 0; var XD_channel_look = 0; @@ -1324,11 +1495,6 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} var CalL_AutO_LauncH = ''; var panel_bgcolor = '#E0C2D6'; var CusTCB_bgcolor = '#FFFF66'; - var status_A = ''; - var status_B = ''; - var status_C = ''; - var status_D = ''; - var status_E = ''; var auto_dial_level = ''; var starting_dial_level = ''; var dial_timeout = ''; @@ -1428,11 +1594,24 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} var no_delete_sessions = ''; var webform_session = ''; var local_consult_xfers = ''; + var vicidial_agent_disable = ''; var CBentry_time = ''; var CBcallback_time = ''; var CBuser = ''; var CBcomments = ''; var volumecontrol_active = ''; + var PauseCode_HTML = ''; + var manual_auto_hotkey = 0; + var dialed_number = ''; + var dialed_label = ''; + var DispO3waychannel = ''; + var DispO3wayXtrAchannel = ''; + var DispO3wayCalLserverip = ''; + var DispO3wayCalLxfernumber = ''; + var DispO3wayCalLcamptail = ''; + var phone_ip = ''; + var enable_sipsak_messages = ''; + var allow_sipsak_messages = ''; var DiaLControl_auto_HTML = "\"Pause\"\"Zusammenfassung\""; var DiaLControl_auto_HTML_ready = "\"Pause\"\"Zusammenfassung\""; var DiaLControl_auto_HTML_OFF = "\"Pause\"\"Zusammenfassung\""; @@ -1536,8 +1715,12 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} // ################################################################################ // Send volume control command for meetme participant - function volume_control(taskdirection,taskvolchannel) + function volume_control(taskdirection,taskvolchannel,taskagentmute) { + if (taskagentmute=='AgenT') + { + taskvolchannel = agentchannel; + } var xmlhttp=false; /*@cc_on @*/ /*@if (@_jscript_version >= 5) @@ -1576,6 +1759,18 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} } delete xmlhttp; } + if (taskagentmute=='AgenT') + { + if (taskdirection=='MUTING') + { + document.getElementById("AgentMuteSpan").innerHTML = ""; + } + else + { + document.getElementById("AgentMuteSpan").innerHTML = ""; + } + } + } @@ -1590,9 +1785,9 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} // ################################################################################ // place 3way and customer into other conference and fake-hangup the lines - function leave_3way_call() + function leave_3way_call(tempvarattempt) { - mainxfer_send_redirect('3WAY'); + mainxfer_send_redirect('3WAY','','',tempvarattempt); document.vicidial_form.callchannel.value = ''; document.vicidial_form.callserverip.value = ''; @@ -1653,6 +1848,35 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} // Send Originate command to manager to place a phone call function basic_originate_call(tasknum,taskprefix,taskreverse,taskdialvalue,tasknowait,taskconfxfer) { + var regCXFvars = new RegExp("CXFER","g"); + var tasknum_string = tasknum.toString(); + if (tasknum_string.match(regCXFvars)) + { + var Ctasknum = tasknum_string.replace(regCXFvars, ''); + if (Ctasknum.length < 2) + {Ctasknum = '990009';} + var closerxfercamptail = '_L' + document.vicidial_form.xfercode.value; + tasknum = Ctasknum + "*CL_" + campaign + '' + closerxfercamptail + '*CXFER*' + document.vicidial_form.lead_id.value + '**' + document.vicidial_form.phone_number.value + '*' + user + '*'; + + CustomerData_update(); + + } + var regAXFvars = new RegExp("AXFER","g"); + if (tasknum_string.match(regAXFvars)) + { + var Ctasknum = tasknum_string.replace(regAXFvars, ''); + if (Ctasknum.length < 2) + {Ctasknum = '83009';} + var closerxfercamptail = '_L' + document.vicidial_form.xfercode.value; + if (closerxfercamptail.length < 3) + {closerxfercamptail = 'IVR';} + tasknum = Ctasknum + '*' + document.vicidial_form.phone_number.value + '*' + document.vicidial_form.lead_id.value + '*' + campaign + '*' + closerxfercamptail + '*' + user + '*'; + + CustomerData_update(); + + } + + var xmlhttp=false; /*@cc_on @*/ /*@if (@_jscript_version >= 5) @@ -1674,27 +1898,6 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} } if (xmlhttp) { - var regCXFvars = new RegExp("CXFER","g"); - var tasknum_string = tasknum.toString(); - if (tasknum_string.match(regCXFvars)) - { - var Ctasknum = tasknum_string.replace(regCXFvars, ''); - if (Ctasknum.length < 2) - {Ctasknum = '990009';} - var closerxfercamptail = '_L' + document.vicidial_form.xfercode.value; - tasknum = Ctasknum + "*CL_" + campaign + '' + closerxfercamptail + '**' + document.vicidial_form.lead_id.value + '**' + document.vicidial_form.phone_number.value + '*' + user + '*'; - } - var regAXFvars = new RegExp("AXFER","g"); - if (tasknum_string.match(regAXFvars)) - { - var Ctasknum = tasknum_string.replace(regAXFvars, ''); - if (Ctasknum.length < 2) - {Ctasknum = '83009';} - var closerxfercamptail = '_L' + document.vicidial_form.xfercode.value; - if (closerxfercamptail.length < 3) - {closerxfercamptail = 'IVR';} - tasknum = Ctasknum + '*' + document.vicidial_form.phone_number.value + '*' + document.vicidial_form.lead_id.value + '*' + campaign + '*' + closerxfercamptail + '*' + user + '*'; - } if (taskprefix == 'NO') {var orig_prefix = '';} else {var orig_prefix = agc_dial_prefix;} if (taskreverse == 'YES') @@ -1858,7 +2061,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} UnixTime = parseInt(UnixTime); UnixTimeMS = (UnixTime * 1000); t.setTime(UnixTimeMS); - if (agentcallsstatus == '1') + if ( (agentcallsstatus == '1') || (vicidial_agent_disable != 'NOT_ACTIVE') ) { var Astatus_array = check_time_array[2].split("Status: "); var AGStatuS = Astatus_array[1]; @@ -1872,6 +2075,14 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} { document.getElementById("AgentStatusCalls").innerHTML = CamPCalLs; } + if ( (AGStatuS == 'DEAD_VLA') && ( (vicidial_agent_disable == 'LIVE_AGENT') || (vicidial_agent_disable == 'ALL') ) ) + { + showDiv('AgenTDisablEBoX'); + } + if ( (AGStatuS == 'DEAD_EXTERNAL') && ( (vicidial_agent_disable == 'EXTERNAL') || (vicidial_agent_disable == 'ALL') ) ) + { + showDiv('AgenTDisablEBoX'); + } } var check_conf_array=check_ALL_array[1].split("|"); var live_conf_calls = check_conf_array[0]; @@ -1903,14 +2114,13 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} {var row_color = '#CCCCFF';} var conv_ct = (loop_ct + conv_start); var channelfieldA = conf_chan_array[conv_ct]; - // live_conf_HTML = live_conf_HTML + "
" + loop_ct + "" + channelfieldA + "HangupXFER
" + loop_ct + "" + channelfieldA + "AUFLEGEN
" + loop_ct + "" + channelfieldA + "AUFLEGEN    
" + loop_ct + "" + channelfieldA + "AUFLEGEN          
PAUSE CODE
"; + var loop_ct = 0; + while (loop_ct < VD_pause_codes_ct) + { + PauseCode_HTML = PauseCode_HTML + "" + VARpause_codes[loop_ct] + " - " + VARpause_code_names[loop_ct] + "

"; + loop_ct++; + if (loop_ct == VD_pause_codes_ct_half) + {PauseCode_HTML = PauseCode_HTML + "
";} + } + PauseCode_HTML = PauseCode_HTML + "


Zurück"; + document.getElementById("PauseCodeSelectContent").innerHTML = PauseCode_HTML; + } + } // ################################################################################ // open web form, then submit disposition @@ -4114,7 +4527,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} } if (xmlhttp) { - DSupdate_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=updateDISPO&format=text&user=" + user + "&pass=" + pass + "&dispo_choice=" + DispoChoice + "&lead_id=" + document.vicidial_form.lead_id.value + "&campaign=" + campaign + "&auto_dial_level=" + auto_dial_level + "&agent_log_id=" + agent_log_id + "&CallBackDatETimE=" + CallBackDatETimE + "&list_id=" + document.vicidial_form.list_id.value + "&recipient=" + CallBackrecipient + "&use_internal_dnc=" + use_internal_dnc + "&comments=" + CallBackCommenTs; + DSupdate_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=updateDISPO&format=text&user=" + user + "&pass=" + pass + "&dispo_choice=" + DispoChoice + "&lead_id=" + document.vicidial_form.lead_id.value + "&campaign=" + campaign + "&auto_dial_level=" + auto_dial_level + "&agent_log_id=" + agent_log_id + "&CallBackDatETimE=" + CallBackDatETimE + "&list_id=" + document.vicidial_form.list_id.value + "&recipient=" + CallBackrecipient + "&use_internal_dnc=" + use_internal_dnc + "&MDnextCID=" + LasTCID + "&comments=" + CallBackCommenTs; xmlhttp.open('POST', 'vdc_db_query.php'); xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8'); xmlhttp.send(DSupdate_query); @@ -4124,8 +4537,8 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} { var check_dispo = null; check_dispo = xmlhttp.responseText; - // alert(xmlhttp.responseText); var check_DS_array=check_dispo.split("\n"); + // alert(xmlhttp.responseText + "\n|" + check_DS_array[1] + "\n|" + check_DS_array[2] + "|"); if (check_DS_array[1] == 'Next agent_log_id:') { agent_log_id = check_DS_array[2]; @@ -4203,12 +4616,67 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} AutoDial_ReSume_PauSe("VDADready","NO"); // document.getElementById("DiaLControl").innerHTML = DiaLControl_auto_HTML_ready; } + else + { + // trigger HotKeys manual dial automatically go to next lead + if (manual_auto_hotkey == '1') + { + manual_auto_hotkey = 0; + ManualDialNext('','','','',''); + } + } } } } } } + +// ################################################################################ +// Submit the Pause Code + function PauseCodeSelect_submit(newpausecode) + { + hideDiv('PauseCodeSelectBox'); + WaitingForNextStep=0; + + var xmlhttp=false; + /*@cc_on @*/ + /*@if (@_jscript_version >= 5) + // JScript gives us Conditional compilation, we can cope with old IE versions. + // and security blocked creation of the objects. + try { + xmlhttp = new ActiveXObject("Msxml2.XMLHTTP"); + } catch (e) { + try { + xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); + } catch (E) { + xmlhttp = false; + } + } + @end @*/ + if (!xmlhttp && typeof XMLHttpRequest!='undefined') + { + xmlhttp = new XMLHttpRequest(); + } + if (xmlhttp) + { + VMCpausecode_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=PauseCodeSubmit&format=text&status=" + newpausecode + "&agent_log_id=" + agent_log_id + "&campaign=" + campaign + "&extension=" + extension + "&protocol=" + protocol + "&phone_ip=" + phone_ip + "&enable_sipsak_messages=" + enable_sipsak_messages; + xmlhttp.open('POST', 'vdc_db_query.php'); + xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8'); + xmlhttp.send(VMCpausecode_query); + xmlhttp.onreadystatechange = function() + { + if (xmlhttp.readyState == 4 && xmlhttp.status == 200) + { + // alert(xmlhttp.responseText); + } + } + delete xmlhttp; + } + } + + + // ################################################################################ // Populate the dtmf and xfer number for each preset link in xfer-conf frame function DtMf_PreSet_a() @@ -4302,7 +4770,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} } if (xmlhttp) { - VMCoriginate_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=Originate&format=text&channel=" + originatevalue + "&queryCID=" + queryCID + "&exten=" + session_id + "&ext_context=" + ext_context + "&ext_priority=1"; + VMCoriginate_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=OriginateVDRelogin&format=text&channel=" + originatevalue + "&queryCID=" + queryCID + "&exten=" + session_id + "&ext_context=" + ext_context + "&ext_priority=1" + "&extension=" + extension + "&protocol=" + protocol + "&phone_ip=" + phone_ip + "&enable_sipsak_messages=" + enable_sipsak_messages + "&allow_sipsak_messages=" + allow_sipsak_messages + "&campaign=" + campaign; xmlhttp.open('POST', 'manager_send.php'); xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8'); xmlhttp.send(VMCoriginate_query); @@ -4489,7 +4957,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} } if (xmlhttp) { - VDlogout_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=userLOGout&format=text&user=" + user + "&pass=" + pass + "&campaign=" + campaign + "&conf_exten=" + session_id + "&extension=" + extension + "&protocol=" + protocol + "&no_delete_sessions=" + no_delete_sessions; + VDlogout_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=userLOGout&format=text&user=" + user + "&pass=" + pass + "&campaign=" + campaign + "&conf_exten=" + session_id + "&extension=" + extension + "&protocol=" + protocol + "&agent_log_id=" + agent_log_id + "&no_delete_sessions=" + no_delete_sessions + "&phone_ip=" + phone_ip + "&enable_sipsak_messages=" + enable_sipsak_messages; xmlhttp.open('POST', 'vdc_db_query.php'); xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8'); xmlhttp.send(VDlogout_query); @@ -4536,14 +5004,24 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} document.vicidial_form.inert_button.focus(); document.vicidial_form.inert_button.blur(); CustomerData_update(); - HKdispo_display = 4; - HKfinish=1; var HKdispo_ary = HKdispo.split(" ----- "); - document.getElementById("HotKeyDispo").innerHTML = HKdispo_ary[0] + " - " + HKdispo_ary[1]; - showDiv('HotKeyActionBox'); - hideDiv('HotKeyEntriesBox'); - document.vicidial_form.DispoSelection.value = HKdispo_ary[0]; - dialedcall_send_hangup('NO'); + if ( (HKdispo_ary[0] == 'ALTPH2') || (HKdispo_ary[0] == 'ADDR3') ) + { + if (document.vicidial_form.DiaLAltPhonE.checked==true) + { + dialedcall_send_hangup('NO', 'YES', HKdispo_ary[0]); + } + } + else + { + HKdispo_display = 4; + HKfinish=1; + document.getElementById("HotKeyDispo").innerHTML = HKdispo_ary[0] + " - " + HKdispo_ary[1]; + showDiv('HotKeyActionBox'); + hideDiv('HotKeyEntriesBox'); + document.vicidial_form.DispoSelection.value = HKdispo_ary[0]; + dialedcall_send_hangup('NO', 'YES', HKdispo_ary[0]); + } // DispoSelect_submit(); // AutoDialWaiting = 1; // AutoDial_ReSume_PauSe("VDADready"); @@ -4899,11 +5377,11 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} hideDiv('CBcommentsBox'); hideDiv('HotKeyActionBox'); hideDiv('HotKeyEntriesBox'); - hideDiv('MainXfeRBox'); hideDiv('MainPanel'); hideDiv('ScriptPanel'); hideDiv('DispoSelectBox'); hideDiv('LogouTBox'); + hideDiv('AgenTDisablEBoX'); hideDiv('CustomerGoneBox'); hideDiv('NoneInSessionBox'); hideDiv('WrapupBox'); @@ -4915,6 +5393,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} hideDiv('DispoButtonHideC'); hideDiv('CallBacKsLisTBox'); hideDiv('NeWManuaLDiaLBox'); + hideDiv('PauseCodeSelectBox'); if (agentonly_callbacks != '1') {hideDiv('CallbacksButtons');} // if ( (agentcall_manual != '1') && (starting_dial_level > 0) ) @@ -4930,6 +5409,15 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} {hideDiv('VolumeControlSpan');} document.vicidial_form.LeadLookuP.checked=true; + if (agent_pause_codes_active=='Y') + { + document.getElementById("PauseCodeLinkSpan").innerHTML = "ENTER A PAUSE CODE"; + } + if (VICIDiaL_allow_closers < 1) + { + document.getElementById("InternalCloser").style.visibility = 'hidden'; + document.getElementById("LocalCloser").style.visibility = 'hidden'; + } document.getElementById("sessionIDspan").innerHTML = session_id; if ( (campaign_recording == 'NEVER') || (campaign_recording == 'ALLFORCE') ) { @@ -4962,6 +5450,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} if (wrapup_Sekunden > 0) { showDiv('WrapupBox'); + document.getElementById("WrapupTimer").innerHTML = wrapup_Sekunden; wrapup_waiting=1; } CustomerData_update(); @@ -4994,39 +5483,6 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} if ( (custchannellive < -30) && (lastcustchannel.length > 3) ) {CustomerChanneLGone();} if ( (custchannellive < -10) && (lastcustchannel.length > 3) ) {ReChecKCustoMerChaN();} if ( (nochannelinsession > 16) && (check_n > 15) ) {NoneInSession();} - if (wrapup_Sekunden > 0) - { - document.getElementById("WrapupTimer").innerHTML = (wrapup_Sekunden - wrapup_counter); - wrapup_counter++; - if ( (wrapup_counter > wrapup_Sekunden) && (document.getElementById("WrapupBox").style.visibility == 'visible') ) - { - wrapup_waiting=0; - hideDiv('WrapupBox'); - if (document.vicidial_form.DispoSelectStop.checked==true) - { - if (auto_dial_level != '0') - { - AutoDialWaiting = 0; - AutoDial_ReSume_PauSe("VDADpause","NO"); - // document.getElementById("DiaLControl").innerHTML = DiaLControl_auto_HTML; - } - VICIDiaL_pause_calling = 1; - if (dispo_check_all_pause != '1') - { - document.vicidial_form.DispoSelectStop.checked=false; - } - } - else - { - if (auto_dial_level != '0') - { - AutoDialWaiting = 1; - AutoDial_ReSume_PauSe("VDADready","NO"); - // document.getElementById("DiaLControl").innerHTML = DiaLControl_auto_HTML_ready; - } - } - } - } if (WaitingForNextStep==0) { // check for live channels in conference room and get current datetime @@ -5108,6 +5564,39 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} // parked_calls_display_refresh(); } } + if (wrapup_Sekunden > 0) + { + document.getElementById("WrapupTimer").innerHTML = (wrapup_Sekunden - wrapup_counter); + wrapup_counter++; + if ( (wrapup_counter > wrapup_Sekunden) && (document.getElementById("WrapupBox").style.visibility == 'visible') ) + { + wrapup_waiting=0; + hideDiv('WrapupBox'); + if (document.vicidial_form.DispoSelectStop.checked==true) + { + if (auto_dial_level != '0') + { + AutoDialWaiting = 0; + AutoDial_ReSume_PauSe("VDADpause","NO"); + // document.getElementById("DiaLControl").innerHTML = DiaLControl_auto_HTML; + } + VICIDiaL_pause_calling = 1; + if (dispo_check_all_pause != '1') + { + document.vicidial_form.DispoSelectStop.checked=false; + } + } + else + { + if (auto_dial_level != '0') + { + AutoDialWaiting = 1; + AutoDial_ReSume_PauSe("VDADready","NO"); + // document.getElementById("DiaLControl").innerHTML = DiaLControl_auto_HTML_ready; + } + } + } + } } } setTimeout("all_refresh()", refresh_interval); @@ -5165,6 +5654,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} if (Cmon == 9) {Cmon = "OKT";} if (Cmon == 10) {Cmon = "NOV";} if (Cmon == 11) {Cmon = "DEZ";} + if (Chours == 12) {AMPM = 'PM';} if (Chours > 12) {Chours = (Chours - 12); AMPM = 'PM';} if (Cmin < 10) {Cmin = "0" + Cmin;} if (Csec < 10) {Csec = "0" + Csec;} @@ -5300,25 +5790,6 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} } } - - function showMainXfeR(divvar,taskxferchan,taskxferchanmain) - { - document.getElementById("MainXfeRBox").style.visibility = 'visible'; - getactiveext("MainXfeRBox"); - conference_list_display_refresh("MainXfeRconfContent"); - var XfeR_channel = taskxferchan; - document.vicidial_form.H_XfeR_channel.value = XfeR_channel; - document.vicidial_form.M_XfeR_channel.value = taskxferchanmain; - document.getElementById("MainXfeRChanneL").innerHTML = XfeR_channel; - } - function hideMainXfeR(divvar) - { - document.getElementById("MainXfeRBox").style.visibility = 'hidden'; - var XfeR_channel = ''; - document.vicidial_form.H_XfeR_channel.value = ''; - document.vicidial_form.M_XfeR_channel.value = ''; - document.getElementById("MainXfeRChanneL").innerHTML = ''; - } function conf_channels_detail(divvar) { if (divvar == 'SHOW') @@ -5360,6 +5831,10 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} { if (showxfervar == 'ON') { + var xfer_height = 310; + if (alt_phone_dialing>0) {xfer_height = (xfer_height + 20);} + if ( (auto_dial_level == 0) && (manual_dial_preview == 1) ) {xfer_height = (xfer_height + 20);} + document.getElementById("TransferMain").style.top = xfer_height; HKbutton_allowed = 0; showDiv('TransferMain'); document.getElementById("XferControl").innerHTML = "\"Transfer"; @@ -5428,17 +5903,13 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} - - @@ -5490,15 +5961,23 @@ echo "\n";

VICIWÄHLEN
- -MANUELLER ANRUF
+ +MANUELLER ANRUF       FAST WÄHLEN
- + X AKTIVE RÜCKRUFE
- + +
+
+ + +
+
+ +
RÜCKRUFE FÜR AGENT :
Klicken Sie jetzt unten auf einen Rückruf, um den Kunden zurückzurufen. Danach wird der Rückruf aus der Liste gelöscht..
@@ -5509,7 +5988,7 @@ echo "\n";
- + - + @@ -5533,7 +6014,8 @@ echo "\n"; - +
NEUE MANUELLE WÄHLADRESSE FÜR :

TRAGEN SIE UNTEN DIE INFORMATIONEN ZU DER NEUEN ADRESSE EIN, DIE SIE WÄHLEN MÖCHTEN.
\n";
  (Dieses ist normalerweise 49 in Deutschland)
Telefon Number:   (12 digits max - digits only) +   (12 digits max - digits only) +
Suche existierende Adresse:   (Wenn diese Option ausgewählt ist wird versucht, die Telefonnummer im System zu finden, bevor sie als neue Adresse eingefügt wird)

Wenn Sie eine Nummer wählen möchten, die nicht in der Adressliste aufgenommen werden soll, müssen die genaue Nummer in das WÄHLVORGANG OVERRIDE Feld eintragen. Um diesen Anruf aufzulegen, müssen Sie auf den ANRUFS IN THIS SESSION Link klicken, und dann mit dem Leitung Link den Anruf zu beenden..
 
Wahl Override:   (Bitte nur Zahlen)  (Bitte nur Zahlen) +

Jetzt wählen @@ -5557,6 +6039,7 @@ Ihr Status:
Calls Dialing:
+
Transfer - Konferenz
INTERNER CLOSER @@ -5582,11 +6065,12 @@ Ihr Status:
Calls Dialing: Wähle blinden Transfer Blind Transfer VMail Message
+
- +
Anrufergebnis:

-
@@ -5594,7 +6078,7 @@ Ihr Status:
Calls Dialing: + @@ -5610,7 +6094,7 @@ Ihr Status:
Calls Dialing: +
Einteilung der Tastaturkürzel: Wenn aktiviert, drücken sie einfach die entsprechende Taste, um das Anrufergebnis zu speichern. Der Anruf wird dann automatisch aufgehängt.:
@@ -5627,7 +6111,7 @@ Ihr Status:
Calls Dialing: +
Vorhergehende Rückrufinformationen:
Niemand ist in ihrer Leitung. Wählen sie sich in ihre Konferenz ein!:
Zurück

@@ -5635,7 +6119,7 @@ Ihr Status:
Calls Dialing: + @@ -5823,6 +6302,7 @@ if ( ($alt_phone_dialing) and ($auto_dial_level==0) ) +
Kunde hat aufgelegt:
Zurück

@@ -5644,7 +6128,7 @@ Ihr Status:
Calls Dialing: + "; if (volumecontrol_active!=1) { live_conf_HTML = live_conf_HTML + ""; } else { - live_conf_HTML = live_conf_HTML + ""; + live_conf_HTML = live_conf_HTML + ""; } // var debugspan = document.getElementById("debugbottomspan").innerHTML; @@ -1926,6 +2136,29 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} {custchannellive++;} } + if (volumecontrol_active > 0) + { + if (protocol != 'EXTERNAL') + { + var regAGNTchan = new RegExp(protocol + '/' + extension,"g"); + if ( (channelfieldA.match(regAGNTchan)) && (agentchannel != channelfieldA) ) + { + agentchannel = channelfieldA; + + document.getElementById("AgentMuteSpan").innerHTML = ""; + } + } + else + { + if (agentchannel.length < 3) + { + agentchannel = channelfieldA; + + document.getElementById("AgentMuteSpan").innerHTML = ""; + } + } + } + // document.getElementById("debugbottomspan").innerHTML = debugspan + '
' + channelfieldA + '|' + lastcustchannel + '|' + custchannellive + '|' + LMAcontent_change + '|' + LMAalter; if (!LMAe[ARY_ct]) @@ -1952,7 +2185,11 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} if (LMAcontent_change > 0) { if (conf_channels_xtra_display == 1) - {document.getElementById("outboundcallsspan").innerHTML = live_conf_HTML;} + { + // document.getElementById("MainPanel").style.overflow = 'visible'; + document.getElementById("outboundcallsspan").innerHTML = live_conf_HTML; + // document.getElementById("MainPanel").style.overflow = 'auto'; + } } nochannelinsession=0; } @@ -2086,7 +2323,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} // ################################################################################ // Send Redirect command for live call to Manager sends phone name where call is going to // Covers the following types: XFER, VMAIL, ENTRY, CONF, ΣΤΑΘΜΕΥΣΗ, FROMΣΤΑΘΜΕΥΣΗ, XfeRLOCAL, XfeRINTERNAL, XfeRBLIND, VfeRVMAIL - function mainxfer_send_redirect(taskvar,taskxferconf,taskserverip) + function mainxfer_send_redirect(taskvar,taskxferconf,taskserverip,taskdebugnote) { var xmlhttp=false; /*@cc_on @*/ @@ -2201,6 +2438,8 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} } if (taskvar == '3WAY') { + xferredirect_query=''; + var queryCID = "VXvdcW" + epoch_sec + user_abb; var redirectdestination = "NEXTAVAILABLE"; var redirectXTRAvalue = XDchannel; @@ -2211,7 +2450,18 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} {var redirecttype = 'RedirectXtraCX';} else {var redirecttype = 'RedirectXtra';} - xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=" + redirecttype + "&format=text&channel=" + redirectvalue + "&call_server_ip=" + redirectserverip + "&queryCID=" + queryCID + "&exten=" + redirectdestination + "&ext_context=" + ext_context + "&ext_priority=1&extrachannel=" + redirectXTRAvalue + "&lead_id=" + document.vicidial_form.lead_id.value + "&phone_code=" + document.vicidial_form.phone_code.value + "&phone_number=" + document.vicidial_form.phone_number.value + "&campaign=CL_" + campaign + '' + closerxfercamptail; + DispO3waychannel = redirectvalue; + DispO3wayXtrAchannel = redirectXTRAvalue; + DispO3wayCalLserverip = redirectserverip; + DispO3wayCalLxfernumber = document.vicidial_form.xfernumber.value; + DispO3wayCalLcamptail = document.vicidial_form.xfercode.value; + + xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=" + redirecttype + "&format=text&channel=" + redirectvalue + "&call_server_ip=" + redirectserverip + "&queryCID=" + queryCID + "&exten=" + redirectdestination + "&ext_context=" + ext_context + "&ext_priority=1&extrachannel=" + redirectXTRAvalue + "&lead_id=" + document.vicidial_form.lead_id.value + "&phone_code=" + document.vicidial_form.phone_code.value + "&phone_number=" + document.vicidial_form.phone_number.value+ "&filename=" + taskdebugnote + "&campaign=CL_" + campaign + '' + closerxfercamptail; + + if (taskdebugnote == 'FIRST') + { + document.getElementById("DispoSelectHAspan").innerHTML = "Leave 3Way Call Again"; + } } if (taskvar == 'ParK') { @@ -2257,7 +2507,6 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} Nactiveext = null; Nactiveext = xmlhttp.responseText; // alert(xmlhttp.responseText); - hideMainXfeR(); } } delete xmlhttp; @@ -2326,7 +2575,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} "&list_id=" + document.vicidial_form.list_id.value + "&length_in_sec=0&phone_code=" + document.vicidial_form.phone_code.value + "&phone_number=" + lead_dial_number + - "&exten=" + extension + "&channel=" + lastcustchannel + "&start_epoch=" + MDlogEPOCH + "&auto_dial_level=" + auto_dial_level + "&VDstop_rec_after_each_call=" + VDstop_rec_after_each_call + "&conf_silent_prefix=" + conf_silent_prefix + "&protocol=" + protocol + "&extension=" + extension + "&ext_context=" + ext_context + "&conf_exten=" + session_id + "&user_abb=" + user_abb + "&agent_log_id=" + agent_log_id; + "&exten=" + extension + "&channel=" + lastcustchannel + "&start_epoch=" + MDlogEPOCH + "&auto_dial_level=" + auto_dial_level + "&VDstop_rec_after_each_call=" + VDstop_rec_after_each_call + "&conf_silent_prefix=" + conf_silent_prefix + "&protocol=" + protocol + "&extension=" + extension + "&ext_context=" + ext_context + "&conf_exten=" + session_id + "&user_abb=" + user_abb + "&agent_log_id=" + agent_log_id + "&MDnextCID=" + LasTCID + "&DB=0"; xmlhttp.open('POST', 'vdc_db_query.php'); xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8'); // document.getElementById("busycallsdebug").innerHTML = "vdc_db_query.php?" + manDiaLlog_query; @@ -2538,7 +2787,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} // ################################################################################ // Open page to enter details for a new manual dial lead - function NeWManuaLDiaLCalL() + function NeWManuaLDiaLCalL(TVfast) { if ( (AutoDialWaiting == 1) || (VD_live_customer_call==1) || (alt_dial_active==1) ) { @@ -2546,7 +2795,14 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} } else { - showDiv('NeWManuaLDiaLBox'); + if (TVfast=='FAST') + { + NeWManuaLDiaLCalLSubmiTfast(); + } + else + { + showDiv('NeWManuaLDiaLBox'); + } } } @@ -2584,6 +2840,34 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} document.vicidial_form.MDDiaLOverridE.value = ''; } +// ################################################################################ +// Fast version of manual dial + function NeWManuaLDiaLCalLSubmiTfast() + { + var MDDiaLCodEform = document.vicidial_form.phone_code.value; + var MDPhonENumbeRform = document.vicidial_form.phone_number.value; + + if ( (MDDiaLCodEform.length < 1) || (MDPhonENumbeRform.length < 5) ) + { + alert("ΠΡΕΠΕΙ ΝΑ ΠΛΗΚΤΡΟΛΟΓΕΣΕΤΕ έναν ΤΗΛΕΦΩΝΙΚΟ ΑΡΙΘΜΟ ΚΑΙ έναν ΚΩΔΙΚΟΠΙΝΑΚΩΝ στο ΓΡΗΓΟΡΟ ΠΙΝΑΚΑ ΧΡΗΣΗΣ"); + } + else + { + var MDLookuPLeaD = 'new'; + if (document.vicidial_form.LeadLookuP.checked==true) + {MDLookuPLeaD = 'lookup';} + + alt_phone_dialing=1; + auto_dial_level=0; + manual_dial_in_progress=1; + MainPanelToFront(); + buildDiv('DiaLLeaDPrevieW'); + buildDiv('DiaLDiaLAltPhonE'); + document.vicidial_form.LeadPreview.checked=false; + document.vicidial_form.DiaLAltPhonE.checked=true; + ManualDialNext("","",MDDiaLCodEform,MDPhonENumbeRform,MDLookuPLeaD); + } + } // ################################################################################ // Request lookup of manual dial channel @@ -2662,7 +2946,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} document.getElementById("MainStatuSSpan").innerHTML = " Κλήση 3ου συμβαλλόμενου μέρους: " + document.vicidial_form.xfernumber.value + " UID: " + CIDcheck; - document.getElementById("Leave3WayCall").innerHTML ="\"ΑΠΟΧΩΡΗΣΗ"; + document.getElementById("Leave3WayCall").innerHTML ="\"ΑΠΟΧΩΡΗΣΗ"; document.getElementById("DialWithCustomer").innerHTML ="\"Κλήση"; @@ -2715,8 +2999,8 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} document.getElementById("DialBlindVMail").innerHTML = "\"Blind"; - document.getElementById("VolumeUpSpan").innerHTML = ""; - document.getElementById("VolumeDownSpan").innerHTML = ""; + document.getElementById("VolumeUpSpan").innerHTML = ""; + document.getElementById("VolumeDownSpan").innerHTML = ""; // INSERT VICIΚΛΗΣΗ_LOG ENTRY FOR THIS ΚΛΗΣΗ PROCESS @@ -2805,6 +3089,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} else { fronter = user; + LasTCID = MDnextResponse_array[0]; document.vicidial_form.lead_id.value = MDnextResponse_array[1]; LeaDPreVDispO = MDnextResponse_array[2]; document.vicidial_form.vendor_lead_code.value = MDnextResponse_array[4]; @@ -2839,9 +3124,12 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} CBcallback_time = MDnextResponse_array[29]; CBuser = MDnextResponse_array[30]; CBcomments = MDnextResponse_array[31]; - + dialed_number = MDnextResponse_array[32]; + dialed_label = MDnextResponse_array[33]; + lead_dial_number = document.vicidial_form.phone_number.value; document.getElementById("MainStatuSSpan").innerHTML = " Σε Κλήση: " + document.vicidial_form.phone_number.value + " UID: " + MDnextCID + "   " + man_status; + if ( (dialed_label.length < 3) || (dialed_label=='NONE') ) {dialed_label='MAIN';} web_form_vars = "lead_id=" + document.vicidial_form.lead_id.value + @@ -2887,6 +3175,8 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} "&phone=" + document.vicidial_form.phone_number.value + "&parked_by=" + document.vicidial_form.lead_id.value + "&dispo=" + LeaDDispO + '' + + "&dialed_number=" + dialed_number + '' + + "&dialed_label=" + dialed_label + '' + webform_session; // $VICIΚΛΗΣΗ_web_QUERY_STRING =~ s/ /+/gi; @@ -3071,6 +3361,9 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} { var manDiaLonly_num = document.vicidial_form.alt_phone.value; lead_dial_number = document.vicidial_form.alt_phone.value; + dialed_number = lead_dial_number; + dialed_label = 'ALT'; + WebFormRefresH(''); } else { @@ -3078,11 +3371,17 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} { var manDiaLonly_num = document.vicidial_form.address3.value; lead_dial_number = document.vicidial_form.address3.value; - } + dialed_number = lead_dial_number; + dialed_label = 'ADDR3'; + WebFormRefresH(''); + } else { var manDiaLonly_num = document.vicidial_form.phone_number.value; lead_dial_number = document.vicidial_form.phone_number.value; + dialed_number = lead_dial_number; + dialed_label = 'MAIN'; + WebFormRefresH(''); } } var xmlhttp=false; @@ -3213,7 +3512,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} } if (xmlhttp) { - autoDiaLready_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=" + taskaction + "&user=" + user + "&pass=" + pass + "&stage=" + VDRP_stage + "&agent_log_id=" + agent_log_id + "&agent_log=" + taskagentlog; + autoDiaLready_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=" + taskaction + "&user=" + user + "&pass=" + pass + "&stage=" + VDRP_stage + "&agent_log_id=" + agent_log_id + "&agent_log=" + taskagentlog + "&campaign=" + campaign; xmlhttp.open('POST', 'vdc_db_query.php'); xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8'); xmlhttp.send(autoDiaLready_query); @@ -3379,6 +3678,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} custchannellive=1; + LasTCID = check_VDIC_array[4]; LeaDPreVDispO = check_VDIC_array[6]; fronter = check_VDIC_array[7]; document.vicidial_form.vendor_lead_code.value = check_VDIC_array[8]; @@ -3411,6 +3711,8 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} CBcallback_time = check_VDIC_array[33]; CBuser = check_VDIC_array[34]; CBcomments = check_VDIC_array[35]; + dialed_number = check_VDIC_array[36]; + dialed_label = check_VDIC_array[37]; lead_dial_number = document.vicidial_form.phone_number.value; document.getElementById("MainStatuSSpan").innerHTML = " Εισερχόμενο: " + document.vicidial_form.phone_number.value + " UID: " + CIDcheck + "   " + VDIC_fronter; @@ -3451,8 +3753,8 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} if (lastcustserverip == server_ip) { - document.getElementById("VolumeUpSpan").innerHTML = ""; - document.getElementById("VolumeDownSpan").innerHTML = ""; + document.getElementById("VolumeUpSpan").innerHTML = ""; + document.getElementById("VolumeDownSpan").innerHTML = ""; } document.getElementById("DiaLControl").innerHTML = DiaLControl_auto_HTML_OFF; @@ -3461,6 +3763,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} {var group = VDCL_group_id;} else {var group = campaign;} + if ( (dialed_label.length < 3) || (dialed_label=='NONE') ) {dialed_label='MAIN';} web_form_vars = "lead_id=" + document.vicidial_form.lead_id.value + @@ -3507,6 +3810,8 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} "&phone=" + document.vicidial_form.phone_number.value + "&parked_by=" + document.vicidial_form.lead_id.value + "&dispo=" + LeaDDispO + '' + + "&dialed_number=" + dialed_number + '' + + "&dialed_label=" + dialed_label + '' + webform_session; var regWFspace = new RegExp(" ","ig"); @@ -3568,6 +3873,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} {var group = VDCL_group_id;} else {var group = campaign;} + if ( (dialed_label.length < 3) || (dialed_label=='NONE') ) {dialed_label='MAIN';} web_form_vars = "lead_id=" + document.vicidial_form.lead_id.value + @@ -3614,6 +3920,8 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} "&phone=" + document.vicidial_form.phone_number.value + "&parked_by=" + document.vicidial_form.lead_id.value + "&dispo=" + LeaDDispO + '' + + "&dialed_number=" + dialed_number + '' + + "&dialed_label=" + dialed_label + '' + webform_session; var regWFspace = new RegExp(" ","ig"); @@ -3658,6 +3966,28 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} } +// ################################################################################ +// Send leave 3way call a second time from the dispo screen + function DispoLeavE3wayAgaiN() + { + XDchannel = DispO3wayXtrAchannel; + document.vicidial_form.xfernumber.value = DispO3wayCalLxfernumber; + document.vicidial_form.xfercode.value = DispO3wayCalLcamptail; + MDchannel = DispO3waychannel; + lastcustserverip = DispO3wayCalLserverip; + + document.getElementById("DispoSelectHAspan").innerHTML = ""; + + leave_3way_call('SECOND'); + + DispO3waychannel = ''; + DispO3wayXtrAchannel = ''; + DispO3wayCalLserverip = ''; + DispO3wayCalLxfernumber = ''; + DispO3wayCalLcamptail = ''; + } + + // ################################################################################ // Start Hangup Functions for both function bothcall_send_hangup() @@ -3670,7 +4000,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} // ################################################################################ // Send Hangup command for customer call connected to the conference now to Manager - function dialedcall_send_hangup(dispowindow) + function dialedcall_send_hangup(dispowindow,hotkeysused,altdispo) { var form_cust_channel = document.vicidial_form.callchannel.value; var form_cust_serverip = document.vicidial_form.callserverip.value; @@ -3808,10 +4138,36 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} if (document.vicidial_form.DiaLAltPhonE.checked==true) { reselect_alt_dial = 1; + if (altdispo == 'ALTPH2') + { + ManualDialOnly('ALTΤηλE'); + } + else + { + if (altdispo == 'ADDR3') + { + ManualDialOnly('AddresS3'); + } + else + { + if (hotkeysused == 'YES') + { + reselect_alt_dial = 0; + manual_auto_hotkey = 1; + } + } + } } else { - document.getElementById("DiaLControl").innerHTML = "\"Κλήση"; + if (hotkeysused == 'YES') + { + manual_auto_hotkey = 1; + } + else + { + document.getElementById("DiaLControl").innerHTML = "\"Κλήση"; + } reselect_alt_dial = 0; } } @@ -3820,6 +4176,27 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} if (document.vicidial_form.DiaLAltPhonE.checked==true) { reselect_alt_dial = 1; + if (altdispo == 'ALTPH2') + { + ManualDialOnly('ALTΤηλE'); + } + else + { + if (altdispo == 'ADDR3') + { + ManualDialOnly('AddresS3'); + } + else + { + if (hotkeysused == 'YES') + { + document.getElementById("MainStatuSSpan").style.background = panel_bgcolor; + document.getElementById("MainStatuSSpan").innerHTML = ''; + document.getElementById("DiaLControl").innerHTML = DiaLControl_auto_HTML_OFF; + reselect_alt_dial = 0; + } + } + } } else { @@ -3965,6 +4342,14 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} // Update vicidial_list lead record with all altered values from form function CustomerData_update() { + + var REGcommentsAMP = new RegExp('&',"g"); + var REGcommentsQUES = new RegExp("\\?","g"); + var REGcommentsPOUND = new RegExp("\\#","g"); + var REGcommentsRESULT = document.vicidial_form.comments.value.replace(REGcommentsAMP, "--AMP--"); + REGcommentsRESULT = REGcommentsRESULT.replace(REGcommentsQUES, "--QUES--"); + REGcommentsRESULT = REGcommentsRESULT.replace(REGcommentsPOUND, "--POUND--"); + var xmlhttp=false; /*@cc_on @*/ /*@if (@_jscript_version >= 5) @@ -3986,7 +4371,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} } if (xmlhttp) { - VLupdate_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=updateLEAD&format=text&user=" + user + "&pass=" + pass + + VLupdate_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&campaign=" + campaign + "&ACTION=updateLEAD&format=text&user=" + user + "&pass=" + pass + "&lead_id=" + document.vicidial_form.lead_id.value + "&vendor_lead_code=" + document.vicidial_form.vendor_lead_code.value + "&phone_number=" + document.vicidial_form.phone_number.value + @@ -4007,7 +4392,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} "&alt_phone=" + document.vicidial_form.alt_phone.value + "&email=" + document.vicidial_form.email.value + "&security_phrase=" + document.vicidial_form.security_phrase.value + - "&comments=" + document.vicidial_form.comments.value; + "&comments=" + REGcommentsRESULT; xmlhttp.open('POST', 'vdc_db_query.php'); xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8'); xmlhttp.send(VLupdate_query); @@ -4053,6 +4438,34 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} document.getElementById("DispoSelectContent").innerHTML = dispo_HTML; } +// ################################################################################ +// Generate the Παύση Code Chooser panel + function PauseCodeSelectContent_create() + { + if ( (AutoDialWaiting == 1) || (VD_live_customer_call==1) || (alt_dial_active==1) ) + { + alert("ΠΡΕΠΕΙ ΝΑ ΣΤΑΜΑΤΗΘΕΙΤΕ ΓΙΑ ΝΑ ΠΛΗΚΤΡΟΛΟΓΕΙΤΕ έναν ΚΩΔΙΚΟ ΜΙΚΡΗΣΔΙΑΚΟΠΉΣ στον ΤΡΟΠΟ αυτόματος-ΠΙΝΑΚΩΝ"); + } + else + { + showDiv('ΠαύσηCodeSelectBox'); + WaitingForNextStep=1; + ΠαύσηCode_HTML = ''; + document.vicidial_form.ΠαύσηCodeSelection.value = ''; + var VD_pause_codes_ct_half = parseInt(VD_pause_codes_ct / 2); + ΠαύσηCode_HTML = "
Anruf Nachbereitung Verbleibende Sekunden der Nachbereitung



@@ -5653,23 +6137,28 @@ Ihr Status:
Calls Dialing: + +
Your session has been disabled
LOGOUT

Zurück +
+
+ +

LOGOUT
- +
- +
 
- +
Die Änderungen an den Kundendaten wurden nicht übernommen. Sie müssen die Kundendaten ändern bevor Sie aufgelegt haben..
- +
ABSCHLUSS ANRUF :       Wieder Auflegen       minimieren
Ende-von-Call Gesprächsergebnis auswählen
@@ -5682,8 +6171,15 @@ Ihr Status:
Calls Dialing: +
SELECT A PAUSE CODE :
+ Pause Code Selection + +

  +
+
- +
Wählen Sie ein Rückrufadatum :
@@ -5726,7 +6222,7 @@ Ihr Status:
Calls Dialing: + @@ -5823,6 +6302,7 @@ Aufzeichnugs ID:
+
GENAUERE INBOUND GRUPPENWAHL
Genauere Inbound Gruppenwahl
@@ -5737,7 +6233,7 @@ Ihr Status:
Calls Dialing: + Kanal Kanal @@ -5747,25 +6243,8 @@ Ihr Status:
Calls Dialing: - - - - - -
LIVE ANRUF WEITERLEITEN
Leitung, die übergeben werden soll: Kanal
Erweiterungen:
Erweiterungen Menü
-
- Senden Sie an ausgewählte Erweiterung

- Senden Sie an ausgewählte Voicemalbox

- Senden Sie an diese Nummer:


- AKTUALISIEREN


- Zurück zu Hauptfenster

-
Konferenzen:
(Wählen sie eine Konferenznummer, um an diese Konferenz zu senden)
Meine Leitung auch senden
Konferenz Menü
-
- - - +
VICIWÄHLEN SCRIPT
@@ -5809,7 +6288,7 @@ Aufzeichnugs ID:

Kunden auflegen

-Senden Sie DTMF
+
Senden Sie DTMF

@@ -5851,14 +6331,18 @@ Aufzeichnugs ID:
+\n";} + {echo "\n";} else - {echo "\n";} + {echo "\n";} ?> - + +
Sekunden:   Kanal:   Cust Zeit:   Email:
Anmerkungen: +
+
diff --git a/agc_2-X/trunk/LANG_www/agc_el/conf_exten_check.php b/agc_2-X/trunk/LANG_www/agc_el/conf_exten_check.php index 5459bde5..7ecdb8e9 100644 --- a/agc_2-X/trunk/LANG_www/agc_el/conf_exten_check.php +++ b/agc_2-X/trunk/LANG_www/agc_el/conf_exten_check.php @@ -33,6 +33,7 @@ # 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 # 61128-2255 - Added update for manual dial vicidial_live_agents +# 70319-1542 - Added agent disabled display function # require("dbconnect.php"); @@ -69,8 +70,8 @@ if (!isset($format)) {$format="text";} if (!isset($ACTION)) {$ACTION="refresh";} if (!isset($client)) {$client="agc";} -$version = '0.0.10'; -$build = '61128-2255'; +$version = '0.0.11'; +$build = '70319-1542'; $StarTtime = date("U"); $NOW_DATE = date("Y-m-d"); $NOW_TIME = date("Y-m-d H:i:s"); @@ -144,6 +145,23 @@ echo " if ($client == 'vdc') { + $Acount=0; + $AexternalDEAD=0; + + ### see if the agent has a record in the vicidial_live_agents table + $stmt="SELECT count(*) 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); + $Acount=$row[0]; + + # ### find out if external table shows agent should be disabled + # $stmt="SELECT count(*) from another_table where user='$user' and status='DEAD';"; + # if ($DB) {echo "|$stmt|\n";} + # $rslt=mysql_query($stmt, $link); + # $row=mysql_fetch_row($rslt); + # $AexternalDEAD=$row[0]; + if ($auto_dial_level > 0) { ### update the vicidial_live_agents every second with a new random number so it is shown to be alive @@ -186,6 +204,9 @@ echo " } + if ($Acount < 1) {$Astatus='DEAD_VLA';} + if ($AexternalDEAD > 0) {$Astatus='DEAD_EXTERNAL';} + echo 'DateTime: ' . $NOW_TIME . '|UnixTime: ' . $StarTtime . '|Κατάσταση: ' . $Astatus . '|CampCalls: ' . $RingCalls . "|\n"; } diff --git a/agc_2-X/trunk/LANG_www/agc_el/manager_send.php b/agc_2-X/trunk/LANG_www/agc_el/manager_send.php index 87ce8c1a..760ad109 100644 --- a/agc_2-X/trunk/LANG_www/agc_el/manager_send.php +++ b/agc_2-X/trunk/LANG_www/agc_el/manager_send.php @@ -1,7 +1,7 @@ LICENSE: GPLv2 +# Copyright (C) 2007 Matt Florell 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 @@ -12,7 +12,7 @@ # - $user # - $pass # optional variables: -# - $ACTION - ('Originate','Redirect','Hangup','Command','Monitor','StopMonitor','SysCIDOriginate','RedirectName','RedirectNameVmail','MonitorConf','StopMonitorConf','RedirectXtra','RedirectXtraCX','RedirectVD','HangupConfDial','VolumeControl') +# - $ACTION - ('Originate','Redirect','Hangup','Command','Monitor','StopMonitor','SysCIDOriginate','RedirectName','RedirectNameVmail','MonitorConf','StopMonitorConf','RedirectXtra','RedirectXtraCX','RedirectVD','HangupConfDial','VolumeControl','OriginateVDRelogin') # - $queryCID - ('CN012345678901234567',...) # - $format - ('text','debug') # - $channel - ('Zap/41-1','SIP/test101-1jut','IAX2/iaxy@iaxy',...) @@ -35,7 +35,7 @@ # - $stage - ('UP','DOWN') # -# changes +# CHANGELOG: # 50401-1002 - First build of script, Hangup function only # 50404-1045 - Redirect basic function enabled # 50406-1522 - Monitor basic function enabled @@ -64,6 +64,10 @@ # 61004-1526 - Added parsing of volume control command and lookup or number # 61130-1617 - Added lead_id to MonitorConf for recording_log # 61201-1115 - Added user to MonitorConf for recording_log +# 70111-1600 - added ability to use BLEND/INBND/*_C/*_B/*_I as closer campaigns +# 70226-1251 - Added Mute/UnMute to conference volume control +# 70320-1502 - Added option to allow retry of leave-3way-call and debug logging +# 70322-1636 - Added sipsak display ability # require("dbconnect.php"); @@ -123,6 +127,16 @@ if (isset($_GET["phone_number"])) {$phone_number=$_GET["phone_number"];} elseif (isset($_POST["phone_number"])) {$phone_number=$_POST["phone_number"];} if (isset($_GET["stage"])) {$stage=$_GET["stage"];} elseif (isset($_POST["stage"])) {$stage=$_POST["stage"];} +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["phone_ip"])) {$phone_ip=$_GET["phone_ip"];} + elseif (isset($_POST["phone_ip"])) {$phone_ip=$_POST["phone_ip"];} +if (isset($_GET["enable_sipsak_messages"])) {$enable_sipsak_messages=$_GET["enable_sipsak_messages"];} + elseif (isset($_POST["enable_sipsak_messages"])) {$enable_sipsak_messages=$_POST["enable_sipsak_messages"];} +if (isset($_GET["allow_sipsak_messages"])) {$allow_sipsak_messages=$_GET["allow_sipsak_messages"];} + elseif (isset($_POST["allow_sipsak_messages"])) {$allow_sipsak_messages=$_POST["allow_sipsak_messages"];} $user=ereg_replace("[^0-9a-zA-Z]","",$user); $pass=ereg_replace("[^0-9a-zA-Z]","",$pass); @@ -133,8 +147,8 @@ if (!isset($ACTION)) {$ACTION="Originate";} if (!isset($format)) {$format="alert";} if (!isset($ext_priority)) {$ext_priority="1";} -$version = '2.0.27'; -$build = '61130-1617'; +$version = '2.0.29'; +$build = '70320-1502'; $StarTtime = date("U"); $NOW_DATE = date("Y-m-d"); $NOW_TIME = date("Y-m-d H:i:s"); @@ -279,6 +293,21 @@ if ($ACTION=="OriginateNameVmail") } } +if ($ACTION=="OriginateVDRelogin") +{ + if ( ($enable_sipsak_messages > 0) and ($allow_sipsak_messages > 0) and (eregi("SIP",$protocol)) ) + { + $CIDdate = date("ymdHis"); + $DS='-'; + $SIPSAK_prefix = 'LIN-'; + print "\n"; + passthru("/usr/local/bin/sipsak -M -O desktop -B \"$SIPSAK_prefix$campaign\" -r 5060 -s sip:$extension@$phone_ip > /dev/null"); + $queryCID = "$SIPSAK_prefix$campaign$DS$CIDdate"; + + } + $ACTION="Originate"; +} + if ($ACTION=="Originate") { if ( (strlen($exten)<1) or (strlen($channel)<1) or (strlen($ext_context)<1) or (strlen($queryCID)<10) ) @@ -430,7 +459,7 @@ if ($ACTION=="RedirectVD") else { if (strlen($call_server_ip)>6) {$server_ip = $call_server_ip;} - if (eregi("CLOSER",$campaign)) + if (eregi("(CLOSER|BLEND|INBND|_C$|_B$|_I$)",$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";} @@ -560,6 +589,7 @@ if ($ACTION=="RedirectNameVmail") if ($ACTION=="RedirectXtraCX") { + $DBout=''; $row=''; $rowx=''; $channel_liveX=1; $channel_liveY=1; @@ -575,6 +605,15 @@ if ($ACTION=="RedirectXtraCX") echo "ext_context $ext_context πρέπει να τεθεί\n"; echo "ext_priority $ext_priority πρέπει να τεθεί\n"; echo "\nRedirect Action μην σταλμένος\n"; + if (ereg("SECOND|FIRST|DEBUG",$filename)) + { + if ($WeBRooTWritablE > 0) + { + $fp = fopen ("./vicidial_debug.txt", "a"); + fwrite ($fp, "$NOW_TIME|RDCXC|$filename|$user|$campaign|$$channel|$extrachannel|$queryCID|$exten|$ext_context|ext_priority|\n"); + fclose($fp); + } + } } else { @@ -594,6 +633,7 @@ if ($ACTION=="RedirectXtraCX") { $channel_liveX=0; echo "Κανάλι $channel δεν είναι ενεργό στο $call_server_ip, Redirect εντολή που δεν έγινε εισαγωγή\n"; + if (ereg("SECOND|FIRST|DEBUG",$filename)) {$DBout .= "$channel δεν είναι ενεργό στο $call_server_ip";} } } $stmt="SELECT count(*) FROM live_channels where server_ip = '$server_ip' and channel='$extrachannel';"; @@ -610,6 +650,7 @@ if ($ACTION=="RedirectXtraCX") { $channel_liveY=0; echo "Κανάλι $channel δεν είναι ενεργό στο $server_ip, Redirect εντολή που δεν έγινε εισαγωγή\n"; + if (ereg("SECOND|FIRST|DEBUG",$filename)) {$DBout .= "$channel δεν είναι ενεργό στο $server_ip";} } } if ( ($channel_liveX==1) && ($channel_liveY==1) ) @@ -622,6 +663,7 @@ if ($ACTION=="RedirectXtraCX") { $channel_liveY=0; echo "No Local agent to send call to, Redirect εντολή που δεν έγινε εισαγωγή\n"; + if (ereg("SECOND|FIRST|DEBUG",$filename)) {$DBout .= "No Local agent to send call to";} } else { @@ -654,6 +696,7 @@ if ($ACTION=="RedirectXtraCX") $rslt=mysql_query($stmt, $link); echo "RedirectXtraCX εντολή που στέλνεται για Κανάλι $channel στο $call_server_ip and \nHungup $extrachannel στο $server_ip\n"; + if (ereg("SECOND|FIRST|DEBUG",$filename)) {$DBout .= "$channel στο $call_server_ip, Hungup $extrachannel στο $server_ip";} } } else @@ -662,8 +705,19 @@ if ($ACTION=="RedirectXtraCX") {$ACTION="Redirect"; $server_ip = $call_server_ip;} if ($channel_liveY==1) {$ACTION="Redirect"; $channel=$extrachannel;} - + if (ereg("SECOND|FIRST|DEBUG",$filename)) {$DBout .= "Changed to Redirect: $channel στο $server_ip";} } + + if (ereg("SECOND|FIRST|DEBUG",$filename)) + { + if ($WeBRooTWritablE > 0) + { + $fp = fopen ("./vicidial_debug.txt", "a"); + fwrite ($fp, "$NOW_TIME|RDCXC|$filename|$user|$campaign|$DBout|\n"); + fclose($fp); + } + } + } } @@ -688,6 +742,15 @@ if ($ACTION=="RedirectXtra") echo "ext_context $ext_context πρέπει να τεθεί\n"; echo "ext_priority $ext_priority πρέπει να τεθεί\n"; echo "\nRedirect Action μην σταλμένος\n"; + if (ereg("SECOND|FIRST|DEBUG",$filename)) + { + if ($WeBRooTWritablE > 0) + { + $fp = fopen ("./vicidial_debug.txt", "a"); + fwrite ($fp, "$NOW_TIME|RDX|$filename|$user|$campaign|$$channel|$extrachannel|$queryCID|$exten|$ext_context|ext_priority|\n"); + fclose($fp); + } + } } else { @@ -708,6 +771,7 @@ if ($ACTION=="RedirectXtra") { $channel_liveX=0; echo "Δεν υπάρχει κενή διάσκεψη στο $server_ip, Redirect εντολή που δεν έγινε εισαγωγή\n"; + if (ereg("SECOND|FIRST|DEBUG",$filename)) {$DBout .= "Δεν υπάρχει κενή διάσκεψη στο $server_ip";} } } @@ -717,7 +781,7 @@ if ($ACTION=="RedirectXtra") if ($format=='debug') {echo "\n";} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); - if ($row[0]==0) + if ( ($row[0]==0) && (!ereg("SECOND",$filename)) ) { $stmt="SELECT count(*) FROM live_sip_channels where server_ip = '$call_server_ip' and channel='$channel';"; if ($format=='debug') {echo "\n";} @@ -727,13 +791,14 @@ if ($ACTION=="RedirectXtra") { $channel_liveX=0; echo "Κανάλι $channel δεν είναι ενεργό στο $call_server_ip, Redirect εντολή που δεν έγινε εισαγωγή\n"; + if (ereg("SECOND|FIRST|DEBUG",$filename)) {$DBout .= "$channel δεν είναι ενεργό στο $call_server_ip";} } } $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) + if ( ($row[0]==0) && (!ereg("SECOND",$filename)) ) { $stmt="SELECT count(*) FROM live_sip_channels where server_ip = '$server_ip' and channel='$extrachannel';"; if ($format=='debug') {echo "\n";} @@ -743,6 +808,7 @@ if ($ACTION=="RedirectXtra") { $channel_liveY=0; echo "Κανάλι $channel δεν είναι ενεργό στο $server_ip, Redirect εντολή που δεν έγινε εισαγωγή\n"; + if (ereg("SECOND|FIRST|DEBUG",$filename)) {$DBout .= "$channel δεν είναι ενεργό στο $server_ip";} } } if ( ($channel_liveX==1) && ($channel_liveY==1) ) @@ -754,6 +820,7 @@ if ($ACTION=="RedirectXtra") $rslt=mysql_query($stmt, $link); echo "RedirectXtra εντολή που στέλνεται για Κανάλι $channel and \nExtraΚανάλι $extrachannel\n to $exten στο $server_ip\n"; + if (ereg("SECOND|FIRST|DEBUG",$filename)) {$DBout .= "$channel and $extrachannel to $exten στο $server_ip";} } else { @@ -778,6 +845,7 @@ if ($ACTION=="RedirectXtra") $rslt=mysql_query($stmt, $link); echo "RedirectXtra εντολή που στέλνεται για Κανάλι $channel στο $call_server_ip and \nExtraΚανάλι $extrachannel\n to $exten στο $server_ip\n"; + if (ereg("SECOND|FIRST|DEBUG",$filename)) {$DBout .= "$channel/$call_server_ip and $extrachannel/$server_ip to $exten";} } } else @@ -788,6 +856,17 @@ if ($ACTION=="RedirectXtra") {$ACTION="Redirect"; $channel=$extrachannel;} } + + if (ereg("SECOND|FIRST|DEBUG",$filename)) + { + if ($WeBRooTWritablE > 0) + { + $fp = fopen ("./vicidial_debug.txt", "a"); + fwrite ($fp, "$NOW_TIME|RDX|$filename|$user|$campaign|$DBout|\n"); + fclose($fp); + } + } + } } } @@ -1018,8 +1097,10 @@ if ($ACTION=="VolumeControl") else { $participant_number='XXYYXXYYXXYYXX'; + if (eregi('UP',$stage)) {$vol_prefix='4';} if (eregi('DOWN',$stage)) {$vol_prefix='3';} - else {$vol_prefix='4';} + if (eregi('UNMUTE',$stage)) {$vol_prefix='2';} + if (eregi('MUTING',$stage)) {$vol_prefix='1';} $local_DEF = 'Local/'; $local_AMP = '@'; $volume_local_channel = "$local_DEF$participant_number$vol_prefix$exten$local_AMP$ext_context"; diff --git a/agc_2-X/trunk/LANG_www/agc_el/vdc_db_query.php b/agc_2-X/trunk/LANG_www/agc_el/vdc_db_query.php index 1d4dae2c..4713aa7d 100644 --- a/agc_2-X/trunk/LANG_www/agc_el/vdc_db_query.php +++ b/agc_2-X/trunk/LANG_www/agc_el/vdc_db_query.php @@ -1,7 +1,7 @@ LICENSE: GPLv2 +# Copyright (C) 2007 Matt Florell 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 @@ -13,7 +13,7 @@ # - $pass # optional variables: # - $format - ('text','debug') -# - $ACTION - ('regCLOSER','manDiaLnextCALL','manDiaLskip','manDiaLonly','manDiaLlookCALL','manDiaLlogCALL','userLOGout','updateDISPO','VDADpause','VDADready','VDADcheckINCOMING','UpdatEFavoritEs','CalLBacKLisT','CalLBacKCounT') +# - $ACTION - ('regCLOSER','manDiaLnextCALL','manDiaLskip','manDiaLonly','manDiaLlookCALL','manDiaLlogCALL','userLOGout','updateDISPO','VDADpause','VDADready','VDADcheckINCOMING','UpdatEFavoritEs','CalLBacKLisT','CalLBacKCounT','PauseCodeSubmit') # - $stage - ('start','finish','lookup','new') # - $closer_choice - ('CL_TESTCAMP_L CL_OUT123_L -') # - $conf_exten - ('8600011',...) @@ -70,7 +70,7 @@ # - $omit_phone_code - ('Y','N') # - $no_delete_sessions - ('0','1') -# changes +# CHANGELOG: # 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 @@ -101,7 +101,7 @@ # - 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 +# 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 @@ -110,10 +110,28 @@ # 60821-1647 - Added ability to not delete sessions at logout # 60906-1124 - Added lookup and sending of callback data for CALLBK calls # 61128-2229 - Added vicidial_live_agents and vicidial_auto_calls manual dial entries +# 70111-1600 - Added ability to use BLEND/INBND/*_C/*_B/*_I as closer campaigns +# 70115-1733 - Added alt_dial functionality in auto-dial modes +# 70118-1501 - Added user_group to vicidial_log,_agent_log,_closer_log,_callbacks +# 70123-1357 - Fixed bug that would not update vicidial_closer_log status to dispo +# 70202-1438 - Added pause code submit function +# 70203-0930 - Added dialed_number to lead info output +# 70203-1030 - Added dialed_label to lead info output +# 70206-1126 - Added INBOUND status for inbound/closer calls in vicidial_live_agents +# 70212-1253 - Fixed small issue with CXFER +# 70213-1431 - Added QueueMetrics PAUSE/UNPAUSE/AGENTLOGIN/AGENTLOGOFF actions +# 70214-1231 - Added queuemetrics_log_id field for server_id in queue_log +# 70215-1210 - Added queuemetrics COMPLETEAGENT action +# 70216-1051 - Fixed double call complete queuemetrics logging +# 70222-1616 - Changed queue_log PAUSE/UNPAUSE to PAUSEALL/UNPAUSEALL +# 70309-1034 - Allow amphersands and questions marks in comments to pass through +# 70313-1052 - Allow pound signs(hash) in comments to pass through +# 70319-1544 - Added agent disable update customer data function +# 70322-1545 - Added sipsak display ability # -$version = '2.0.38'; -$build = '61128-2229'; +$version = '2.0.55'; +$build = '70322-1545'; require("dbconnect.php"); @@ -240,6 +258,10 @@ if (isset($_GET["use_internal_dnc"])) {$use_internal_dnc=$_GET["use_internal_d elseif (isset($_POST["use_internal_dnc"])) {$use_internal_dnc=$_POST["use_internal_dnc"];} if (isset($_GET["omit_phone_code"])) {$omit_phone_code=$_GET["omit_phone_code"];} elseif (isset($_POST["omit_phone_code"])) {$omit_phone_code=$_POST["omit_phone_code"];} +if (isset($_GET["phone_ip"])) {$phone_ip=$_GET["phone_ip"];} + elseif (isset($_POST["phone_ip"])) {$phone_ip=$_POST["phone_ip"];} +if (isset($_GET["enable_sipsak_messages"])) {$enable_sipsak_messages=$_GET["enable_sipsak_messages"];} + elseif (isset($_POST["enable_sipsak_messages"])) {$enable_sipsak_messages=$_POST["enable_sipsak_messages"];} $user=ereg_replace("[^0-9a-zA-Z]","",$user); @@ -261,6 +283,7 @@ $CIDdate = date("mdHis"); $ENTRYdate = date("YmdHis"); if (!isset($query_date)) {$query_date = $NOW_DATE;} $MT[0]=''; +$agents='@agents'; $stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;"; if ($DB) {echo "|$stmt|\n";} @@ -375,7 +398,7 @@ if ($ACTION == 'manDiaLnextCaLL') 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) ) + if ( (strlen($callback_id)>0) and (strlen($lead_id)>0) ) { $affected_rows=1; $CBleadIDset=1; @@ -421,7 +444,7 @@ if ($ACTION == 'manDiaLnextCaLL') if ($DB) {echo "$stmt\n";} $rslt=mysql_query($stmt, $link); $affected_rows = mysql_affected_rows($link); - $lead_id = mysql_insert_id(); + $lead_id = mysql_insert_id($link); $CBleadIDset=1; } } @@ -432,7 +455,7 @@ if ($ACTION == 'manDiaLnextCaLL') if ($DB) {echo "$stmt\n";} $rslt=mysql_query($stmt, $link); $affected_rows = mysql_affected_rows($link); - $lead_id = mysql_insert_id(); + $lead_id = mysql_insert_id($link); $CBleadIDset=1; } } @@ -535,7 +558,7 @@ if ($ACTION == 'manDiaLnextCaLL') $rslt=mysql_query($stmt, $link); } - $stmt="UPDATE vicidial_agent_log set lead_id='$lead_id' where agent_log_id='$agent_log_id';"; + $stmt="UPDATE vicidial_agent_log set lead_id='$lead_id',comments='MANUAL' where agent_log_id='$agent_log_id';"; if ($format=='debug') {echo "\n";} $rslt=mysql_query($stmt, $link); @@ -579,7 +602,7 @@ if ($ACTION == 'manDiaLnextCaLL') $rslt=mysql_query($stmt, $link); ### update the agent status to INCALL in vicidial_live_agents - $stmt = "UPDATE vicidial_live_agents set status='INCALL',last_call_time='$NOW_TIME',callerid='$MqueryCID',lead_id='$lead_id' where user='$user' and server_ip='$server_ip';"; + $stmt = "UPDATE vicidial_live_agents set status='INCALL',last_call_time='$NOW_TIME',callerid='$MqueryCID',lead_id='$lead_id',comments='MANUAL' where user='$user' and server_ip='$server_ip';"; if ($DB) {echo "$stmt\n";} $rslt=mysql_query($stmt, $link); } @@ -619,6 +642,8 @@ if ($ACTION == 'manDiaLnextCaLL') $LeaD_InfO .= $CBcallback_time . "\n"; $LeaD_InfO .= $CBuser . "\n"; $LeaD_InfO .= $CBcomments . "\n"; + $LeaD_InfO .= $phone_number . "\n"; + $LeaD_InfO .= "MAIN\n"; echo $LeaD_InfO; @@ -716,7 +741,7 @@ if ($ACTION == 'manDiaLonly') $rslt=mysql_query($stmt, $link); ### update the agent status to INCALL in vicidial_live_agents - $stmt = "UPDATE vicidial_live_agents set status='INCALL',last_call_time='$NOW_TIME',callerid='$MqueryCID',lead_id='$lead_id' where user='$user' and server_ip='$server_ip';"; + $stmt = "UPDATE vicidial_live_agents set status='INCALL',last_call_time='$NOW_TIME',callerid='$MqueryCID',lead_id='$lead_id',comments='MANUAL' where user='$user' and server_ip='$server_ip';"; if ($DB) {echo "$stmt\n";} $rslt=mysql_query($stmt, $link); @@ -795,8 +820,18 @@ if ($stage == "start") } else { + $user_group=''; + $stmt="SELECT user_group FROM vicidial_users where user='$user' LIMIT 1;"; + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $ug_record_ct = mysql_num_rows($rslt); + if ($ug_record_ct > 0) + { + $row=mysql_fetch_row($rslt); + $user_group = trim("$row[0]"); + } ##### 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');"; + $stmt="INSERT INTO vicidial_log (uniqueid,lead_id,list_id,campaign_id,call_date,start_epoch,status,phone_code,phone_number,user,comments,processed,user_group) values('$uniqueid','$lead_id','$list_id','$campaign','$NOW_TIME','$StarTtime','INCALL','$phone_code','$phone_number','$user','MANUAL','N','$user_group');"; if ($DB) {echo "$stmt\n";} $rslt=mysql_query($stmt, $link); $affected_rows = mysql_affected_rows($link); @@ -844,10 +879,10 @@ if ($stage == "end") { if ($start_epoch < 1000) { - if (eregi("CLOSER",$campaign)) + if (eregi("(CLOSER|BLEND|INBND|_C$|_B$|_I$)",$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';"; + $stmt="SELECT start_epoch FROM vicidial_closer_log where phone_number='$phone_number' and lead_id='$lead_id' and user='$user' order by closecallid desc limit 1;"; } else { @@ -870,32 +905,249 @@ if ($stage == "end") } else {$length_in_sec = ($StarTtime - $start_epoch);} - if (eregi("CLOSER",$campaign)) + if (eregi("(CLOSER|BLEND|INBND|_C$|_B$|_I$)",$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); } + + ############################################# + ##### ΕΝΑΡΞΗ QUEUEMETRICS LOGGING LOOKUP ##### + $stmt = "SELECT enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_log_id FROM system_settings;"; + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $qm_conf_ct = mysql_num_rows($rslt); + $i=0; + while ($i < $qm_conf_ct) + { + $row=mysql_fetch_row($rslt); + $enable_queuemetrics_logging = $row[0]; + $queuemetrics_server_ip = $row[1]; + $queuemetrics_dbname = $row[2]; + $queuemetrics_login = $row[3]; + $queuemetrics_pass = $row[4]; + $queuemetrics_log_id = $row[5]; + $i++; + } + ##### END QUEUEMETRICS LOGGING LOOKUP ##### + ########################################### + if ($auto_dial_level > 0) { + ### check to see if campaign has alt_dial enabled + $stmt="SELECT auto_alt_dial FROM vicidial_campaigns where campaign_id='$campaign';"; + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $VAC_mancall_ct = mysql_num_rows($rslt); + if ($VAC_mancall_ct > 0) + { + $row=mysql_fetch_row($rslt); + $auto_alt_dial =$row[0]; + } + else {$auto_alt_dial = 'NONE';} + if (eregi("(ALT_ONLY|ADDR3_ONLY|ALT_AND_ADDR3)",$auto_alt_dial)) + { + ### check to see if lead should be alt_dialed + $stmt="SELECT alt_dial FROM vicidial_auto_calls where lead_id='$lead_id';"; + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $VAC_mancall_ct = mysql_num_rows($rslt); + if ($VAC_mancall_ct > 0) + { + $row=mysql_fetch_row($rslt); + $alt_dial =$row[0]; + } + else {$alt_dial = 'NONE';} + + if ( (eregi("(NONE|MAIN)",$alt_dial)) and (eregi("(ALT_ONLY|ALT_AND_ADDR3)",$auto_alt_dial)) ) + { + $stmt="SELECT alt_phone,gmt_offset_now,state FROM vicidial_list where lead_id='$lead_id';"; + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $VAC_mancall_ct = mysql_num_rows($rslt); + if ($VAC_mancall_ct > 0) + { + $row=mysql_fetch_row($rslt); + $alt_phone = $row[0]; + $alt_phone = eregi_replace("[^0-9]","",$alt_phone); + $gmt_offset_now = $row[1]; + $state = $row[2]; + } + else {$alt_phone = '';} + if (strlen($alt_phone)>5) + { + ### insert record into vicidial_hopper for address3 call attempt + $stmt = "INSERT INTO vicidial_hopper SET lead_id='$lead_id',campaign_id='$campaign',status='HOLD',list_id='$list_id',gmt_offset_now='$gmt_offset_now',state='$state',alt_dial='ALT',user='';"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + } + } + if ( ( (eregi("(ALT)",$alt_dial)) and (eregi("ALT_AND_ADDR3",$auto_alt_dial)) ) or ( (eregi("(NONE|MAIN)",$alt_dial)) and (eregi("ADDR3_ONLY",$auto_alt_dial)) ) ) + { + $stmt="SELECT address3,gmt_offset_now,state FROM vicidial_list where lead_id='$lead_id';"; + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $VAC_mancall_ct = mysql_num_rows($rslt); + if ($VAC_mancall_ct > 0) + { + $row=mysql_fetch_row($rslt); + $address3 = $row[0]; + $address3 = eregi_replace("[^0-9]","",$address3); + $gmt_offset_now = $row[1]; + $state = $row[2]; + } + else {$address3 = '';} + if (strlen($address3)>5) + { + ### insert record into vicidial_hopper for address3 call attempt + $stmt = "INSERT INTO vicidial_hopper SET lead_id='$lead_id',campaign_id='$campaign',status='HOLD',list_id='$list_id',gmt_offset_now='$gmt_offset_now',state='$state',alt_dial='ADDR3',user='';"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + } + } + } + + if ($enable_queuemetrics_logging > 0) + { + ### check to see if lead should be alt_dialed + $stmt="SELECT auto_call_id,lead_id,phone_number,status,campaign_id,phone_code,alt_dial,stage,callerid,uniqueid from vicidial_auto_calls where lead_id='$lead_id';"; + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $VAC_qm_ct = mysql_num_rows($rslt); + if ($VAC_qm_ct > 0) + { + $row=mysql_fetch_row($rslt); + $auto_call_id = $row[0]; + $CLlead_id = $row[1]; + $CLphone_number = $row[2]; + $CLstatus = $row[3]; + $CLcampaign_id = $row[4]; + $CLphone_code = $row[5]; + $CLalt_dial = $row[6]; + $CLstage = $row[7]; + $CLcallerid = $row[8]; + $CLuniqueid = $row[9]; + } + + $CLstage = preg_replace("/.*-/",'',$CLstage); + if (strlen($CLstage) < 1) {$CLstage=0;} + + $linkB=mysql_connect("$queuemetrics_server_ip", "$queuemetrics_login", "$queuemetrics_pass"); + mysql_select_db("$queuemetrics_dbname", $linkB); + + $stmt="SELECT count(*) from queue_log where call_id='$MDnextCID' and verb='COMPLETECALLER';"; + $rslt=mysql_query($stmt, $linkB); + if ($DB) {echo "$stmt\n";} + $VAC_cc_ct = mysql_num_rows($rslt); + if ($VAC_cc_ct > 0) + { + $row=mysql_fetch_row($rslt); + $caller_complete = $row[0]; + } + + if ($caller_complete < 1) + { + $stmt = "INSERT INTO queue_log SET partition='P01',time_id='$StarTtime',call_id='$MDnextCID',queue='$campaign',agent='Agent/$user',verb='COMPLETEAGENT',data1='$CLstage',data2='$length_in_sec',data3='1',serverid='$queuemetrics_log_id';"; + if ($DB) {echo "$stmt\n";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $linkB); + $affected_rows = mysql_affected_rows($linkB); + } + mysql_close($linkB); + } + ### delete call record from vicidial_auto_calls - $stmt = "DELETE from vicidial_auto_calls where uniqueid='$uniqueid';"; + $stmt = "DELETE from vicidial_auto_calls where lead_id='$lead_id';"; 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';"; + + $stmt = "UPDATE vicidial_live_agents set status='PAUSED',lead_id='',uniqueid=0,callerid='',channel='',call_server_ip='',last_call_finish='$NOW_TIME',comments='' where user='$user' and server_ip='$server_ip';"; if ($DB) {echo "$stmt\n";} $rslt=mysql_query($stmt, $link); + $affected_rows = mysql_affected_rows($link); + if ($affected_rows > 0) + { + if ($enable_queuemetrics_logging > 0) + { + $linkB=mysql_connect("$queuemetrics_server_ip", "$queuemetrics_login", "$queuemetrics_pass"); + mysql_select_db("$queuemetrics_dbname", $linkB); + + $stmt = "INSERT INTO queue_log SET partition='P01',time_id='$StarTtime',call_id='NONE',queue='NONE',agent='Agent/$user',verb='ΠΑΥΣΗALL',serverid='$queuemetrics_log_id';"; + if ($DB) {echo "$stmt\n";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $linkB); + $affected_rows = mysql_affected_rows($linkB); + + mysql_close($linkB); + } + } } else { + if ($enable_queuemetrics_logging > 0) + { + ### check to see if lead should be alt_dialed + $stmt="SELECT auto_call_id,lead_id,phone_number,status,campaign_id,phone_code,alt_dial,stage,callerid,uniqueid from vicidial_auto_calls where lead_id='$lead_id';"; + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $VAC_qm_ct = mysql_num_rows($rslt); + if ($VAC_qm_ct > 0) + { + $row=mysql_fetch_row($rslt); + $auto_call_id = $row[0]; + $CLlead_id = $row[1]; + $CLphone_number = $row[2]; + $CLstatus = $row[3]; + $CLcampaign_id = $row[4]; + $CLphone_code = $row[5]; + $CLalt_dial = $row[6]; + $CLstage = $row[7]; + $CLcallerid = $row[8]; + $CLuniqueid = $row[9]; + } + + $CLstage = preg_replace("/XFER|-/",'',$CLstage); + if ($CLstage < 0.25) {$CLstage=0;} + + $linkB=mysql_connect("$queuemetrics_server_ip", "$queuemetrics_login", "$queuemetrics_pass"); + mysql_select_db("$queuemetrics_dbname", $linkB); + + $stmt = "INSERT INTO queue_log SET partition='P01',time_id='$StarTtime',call_id='$MDnextCID',queue='$campaign',agent='Agent/$user',verb='COMPLETEAGENT',data1='$CLstage',data2='$length_in_sec',data3='1',serverid='$queuemetrics_log_id';"; + if ($DB) {echo "$stmt\n";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $linkB); + $affected_rows = mysql_affected_rows($linkB); + + mysql_close($linkB); + } + $stmt = "DELETE from vicidial_auto_calls lead_id='$lead_id';"; 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';"; + $stmt = "UPDATE vicidial_live_agents set status='PAUSED',lead_id='',uniqueid=0,callerid='',channel='',call_server_ip='',last_call_finish='$NOW_TIME',comments='' where user='$user' and server_ip='$server_ip';"; if ($DB) {echo "$stmt\n";} $rslt=mysql_query($stmt, $link); + $affected_rows = mysql_affected_rows($link); + if ($affected_rows > 0) + { + if ($enable_queuemetrics_logging > 0) + { + $linkB=mysql_connect("$queuemetrics_server_ip", "$queuemetrics_login", "$queuemetrics_pass"); + mysql_select_db("$queuemetrics_dbname", $linkB); + + $stmt = "INSERT INTO queue_log SET partition='P01',time_id='$StarTtime',call_id='NONE',queue='NONE',agent='Agent/$user',verb='ΠΑΥΣΗALL',serverid='$queuemetrics_log_id';"; + if ($DB) {echo "$stmt\n";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $linkB); + $affected_rows = mysql_affected_rows($linkB); + + mysql_close($linkB); + } + } } ##### look for the channel in the UPDATED vicidial_manager record of the call initiation @@ -1095,7 +1347,7 @@ if ($ACTION == 'VDADcheckINCOMING') 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';"; + $stmt = "UPDATE vicidial_live_agents set status='INCALL',last_call_time='$NOW_TIME',comments='AUTO' where user='$user' and server_ip='$server_ip';"; if ($DB) {echo "$stmt\n";} $rslt=mysql_query($stmt, $link); @@ -1163,25 +1415,37 @@ if ($ACTION == 'VDADcheckINCOMING') $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';"; + $user_group=''; + $stmt="SELECT user_group FROM vicidial_users where user='$user' LIMIT 1;"; + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $ug_record_ct = mysql_num_rows($rslt); + if ($ug_record_ct > 0) + { + $row=mysql_fetch_row($rslt); + $user_group = trim("$row[0]"); + } + $stmt = "UPDATE vicidial_log set user='$user', comments='AUTO', list_id='$list_id', status='INCALL', user_group='$user_group' where lead_id='$lead_id' and uniqueid='$uniqueid';"; if ($DB) {echo "$stmt\n";} $rslt=mysql_query($stmt, $link); - if (eregi("CLOSER",$campaign)) + if (eregi("(CLOSER|BLEND|INBND|_C$|_B$|_I$)",$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;"; + $stmt = "UPDATE vicidial_closer_log set user='$user', comments='AUTO', list_id='$list_id', status='INCALL', user_group='$user_group' 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;"; + $stmt = "select campaign_id,phone_number,alt_dial 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) + if ($VDAC_cid_ct > 0) { $row=mysql_fetch_row($rslt); $VDADchannel_group =$row[0]; + $dialed_number =$row[1]; + $dialed_label =$row[2]; } $stmt = "select count(*) from vicidial_log where lead_id='$lead_id' and uniqueid='$uniqueid';"; @@ -1211,6 +1475,11 @@ if ($ACTION == 'VDADcheckINCOMING') $VDCL_xferconf_a_number = $row[11]; $VDCL_xferconf_b_dtmf = $row[12]; $VDCL_xferconf_b_number = $row[13]; + + ### update the comments in vicidial_live_agents record + $stmt = "UPDATE vicidial_live_agents set comments='INBOUND' where user='$user' and server_ip='$server_ip';"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); } else { @@ -1263,6 +1532,17 @@ if ($ACTION == 'VDADcheckINCOMING') $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"; + + $stmt = "select phone_number,alt_dial 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 ($VDAC_cid_ct > 0) + { + $row=mysql_fetch_row($rslt); + $dialed_number =$row[0]; + $dialed_label =$row[1]; + } } $comments = eregi_replace("\r",'',$comments); @@ -1300,6 +1580,8 @@ if ($ACTION == 'VDADcheckINCOMING') $LeaD_InfO .= $CBcallback_time . "\n"; $LeaD_InfO .= $CBuser . "\n"; $LeaD_InfO .= $CBcomments . "\n"; + $LeaD_InfO .= $dialed_number . "\n"; + $LeaD_InfO .= $dialed_label . "\n"; echo $LeaD_InfO; @@ -1327,6 +1609,7 @@ if ($ACTION == 'VDADcheckINCOMING') if ($format=='debug') {echo "\n";} $rslt=mysql_query($stmt, $link); } + } else { @@ -1354,8 +1637,18 @@ if ( (strlen($campaign)<1) || (strlen($conf_exten)<1) ) } else { + $user_group=''; + $stmt="SELECT user_group FROM vicidial_users where user='$user' LIMIT 1;"; + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $ug_record_ct = mysql_num_rows($rslt); + if ($ug_record_ct > 0) + { + $row=mysql_fetch_row($rslt); + $user_group = trim("$row[0]"); + } ##### Insert a ΑΠΟΣΥΝΔΕΣΗ record into the user log - $stmt="INSERT INTO vicidial_user_log values('','$user','ΑΠΟΣΥΝΔΕΣΗ','$campaign','$NOW_TIME','$StarTtime');"; + $stmt="INSERT INTO vicidial_user_log (user,event,campaign_id,event_date,event_epoch,user_group) values('$user','ΑΠΟΣΥΝΔΕΣΗ','$campaign','$NOW_TIME','$StarTtime','$user_group');"; if ($DB) {echo "$stmt\n";} $rslt=mysql_query($stmt, $link); $vul_insert = mysql_affected_rows($link); @@ -1390,11 +1683,94 @@ else $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','','','','','','','','','');"; + $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Hangup','ULGH3459$StarTtime','Channel: $agent_channel','','','','','','','','','');"; if ($format=='debug') {echo "\n";} $rslt=mysql_query($stmt, $link); } + $pause_sec=0; + $stmt = "select pause_epoch,pause_sec,wait_epoch,talk_epoch,dispo_epoch 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) and (strlen($row[3]<5)) and (strlen($row[4]<5)) ) + { + $row=mysql_fetch_row($rslt); + $pause_sec = (($StarTtime - $row[0]) + $row[1]); + + $stmt="UPDATE vicidial_agent_log set pause_sec='$pause_sec',wait_epoch='$StarTtime' where agent_log_id='$agent_log_id';"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + } + + if ($vla_delete > 0) + { + ############################################# + ##### ΕΝΑΡΞΗ QUEUEMETRICS LOGGING LOOKUP ##### + $stmt = "SELECT enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_log_id,allow_sipsak_messages FROM system_settings;"; + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $qm_conf_ct = mysql_num_rows($rslt); + $i=0; + while ($i < $qm_conf_ct) + { + $row=mysql_fetch_row($rslt); + $enable_queuemetrics_logging = $row[0]; + $queuemetrics_server_ip = $row[1]; + $queuemetrics_dbname = $row[2]; + $queuemetrics_login = $row[3]; + $queuemetrics_pass = $row[4]; + $queuemetrics_log_id = $row[5]; + $allow_sipsak_messages = $row[6]; + $i++; + } + ##### END QUEUEMETRICS LOGGING LOOKUP ##### + ########################################### + if ( ($enable_sipsak_messages > 0) and ($allow_sipsak_messages > 0) and (eregi("SIP",$protocol)) ) + { + $SIPSAK_message = 'LOGGED OUT'; + passthru("/usr/local/bin/sipsak -M -O desktop -B \"$SIPSAK_message\" -r 5060 -s sip:$extension@$phone_ip > /dev/null"); + } + + if ($enable_queuemetrics_logging > 0) + { + $linkB=mysql_connect("$queuemetrics_server_ip", "$queuemetrics_login", "$queuemetrics_pass"); + mysql_select_db("$queuemetrics_dbname", $linkB); + + # $stmt = "INSERT INTO queue_log SET partition='P01',time_id='$StarTtime',call_id='NONE',queue='$campaign',agent='Agent/$user',verb='ΠΑΥΣΗ',serverid='1';"; + # if ($DB) {echo "$stmt\n";} + # if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + # $rslt=mysql_query($stmt, $linkB); + # $affected_rows = mysql_affected_rows($linkB); + + $stmt = "SELECT time_id FROM queue_log where agent='Agent/$user' and verb='AGENTLOGIN' order by time_id desc limit 1;"; + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $linkB); + if ($DB) {echo "$stmt\n";} + echo "$stmt\n"; + $li_conf_ct = mysql_num_rows($rslt); + $i=0; + while ($i < $li_conf_ct) + { + $row=mysql_fetch_row($rslt); + $logintime = $row[0]; + $i++; + } + + $time_logged_in = ($StarTtime - $logintime); + if ($time_logged_in > 1000000) {$time_logged_in=1;} + + $stmt = "INSERT INTO queue_log SET partition='P01',time_id='$StarTtime',call_id='NONE',queue='$campaign',agent='Agent/$user',verb='AGENTLOGOFF',data1='$user$agents',data2='$time_logged_in',serverid='$queuemetrics_log_id';"; + if ($DB) {echo "$stmt\n";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $linkB); + $affected_rows = mysql_affected_rows($linkB); + + mysql_close($linkB); + } + } + echo "$vul_insert|$vc_remove|$vla_delete|$wcs_delete|$agent_channel\n"; } } @@ -1423,7 +1799,14 @@ if ($ACTION == 'updateDISPO') if ($format=='debug') {echo "\n";} $rslt=mysql_query($stmt, $link); - if ( ($use_internal_dnc=='Y') and ($dispo_choice=='DNC') ) + if (eregi("(CLOSER|BLEND|INBND|_C$|_B$|_I$)",$campaign)) + { + $stmt = "UPDATE vicidial_closer_log set status='$dispo_choice' where lead_id='$lead_id' and user='$user' order by closecallid desc limit 1;"; + if ($DB) {echo "$stmt\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";} @@ -1450,20 +1833,91 @@ if ($ACTION == 'updateDISPO') 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');"; + $user_group=''; + $stmt="SELECT user_group FROM vicidial_users where user='$user' LIMIT 1;"; + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $ug_record_ct = mysql_num_rows($rslt); + if ($ug_record_ct > 0) + { + $row=mysql_fetch_row($rslt); + $user_group = trim("$row[0]"); + } + + $stmt="INSERT INTO vicidial_agent_log (user,server_ip,event_time,campaign_id,pause_epoch,pause_sec,wait_epoch,user_group) values('$user','$server_ip','$NOW_TIME','$campaign','$StarTtime','0','$StarTtime','$user_group');"; if ($DB) {echo "$stmt\n";} $rslt=mysql_query($stmt, $link); $affected_rows = mysql_affected_rows($link); - $agent_log_id = mysql_insert_id(); + $agent_log_id = mysql_insert_id($link); ### ΚΛΗΣΗBACK 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');"; + $stmt="INSERT INTO vicidial_callbacks (lead_id,list_id,campaign_id,status,entry_time,callback_time,user,recipient,comments,user_group) values('$lead_id','$list_id','$campaign','ACTIVE','$NOW_TIME','$CallBackDatETimE','$user','$recipient','$comments','$user_group');"; if ($DB) {echo "$stmt\n";} $rslt=mysql_query($stmt, $link); } + $stmt="SELECT auto_alt_dial_statuses from vicidial_campaigns where campaign_id='$campaign';"; + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + + if ( ($auto_dial_level > 0) and (ereg(" $dispo_choice ",$row[0])) ) + { + $stmt = "select count(*) from vicidial_hopper where lead_id='$lead_id' and status='HOLD';"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + + if ($row[0] > 0) + { + $stmt="UPDATE vicidial_hopper set status='READY' where lead_id='$lead_id' and status='HOLD' limit 1;"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + } + } + else + { + $stmt="DELETE from vicidial_hopper where lead_id='$lead_id' and status='HOLD';"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + } + + ############################################# + ##### ΕΝΑΡΞΗ QUEUEMETRICS LOGGING LOOKUP ##### + $stmt = "SELECT enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_log_id FROM system_settings;"; + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $qm_conf_ct = mysql_num_rows($rslt); + $i=0; + while ($i < $qm_conf_ct) + { + $row=mysql_fetch_row($rslt); + $enable_queuemetrics_logging = $row[0]; + $queuemetrics_server_ip = $row[1]; + $queuemetrics_dbname = $row[2]; + $queuemetrics_login = $row[3]; + $queuemetrics_pass = $row[4]; + $queuemetrics_log_id = $row[5]; + $i++; + } + ##### END QUEUEMETRICS LOGGING LOOKUP ##### + ########################################### + if ($enable_queuemetrics_logging > 0) + { + $linkB=mysql_connect("$queuemetrics_server_ip", "$queuemetrics_login", "$queuemetrics_pass"); + mysql_select_db("$queuemetrics_dbname", $linkB); + + $stmt = "INSERT INTO queue_log SET partition='P01',time_id='$StarTtime',call_id='$MDnextCID',queue='$campaign',agent='Agent/$user',verb='CALLΚΑΤΑΣΤΑΣΗ',data1='$dispo_choice',serverid='$queuemetrics_log_id';"; + if ($DB) {echo "$stmt\n";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $linkB); + $affected_rows = mysql_affected_rows($linkB); + + mysql_close($linkB); + } + echo 'Lead ' . $lead_id . ' έχει αλλαχτεί ' . $dispo_choice . " Κατάσταση\nNext agent_log_id:\n" . $agent_log_id . "\n"; } @@ -1475,6 +1929,8 @@ if ($ACTION == 'updateLEAD') { $MT[0]=''; $row=''; $rowx=''; + $DO_NOT_UPDATE=0; + $DO_NOT_UPDATE_text=''; if ( (strlen($phone_number)<1) || (strlen($lead_id)<1) ) { echo "phone_number $phone_number or lead_id $lead_id δεν ισχύει\n"; @@ -1482,12 +1938,54 @@ if ($ACTION == 'updateLEAD') } 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";} + $stmt = "SELECT disable_alter_custdata FROM vicidial_campaigns where campaign_id='$campaign'"; + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $dac_conf_ct = mysql_num_rows($rslt); + $i=0; + while ($i < $dac_conf_ct) + { + $row=mysql_fetch_row($rslt); + $disable_alter_custdata = $row[0]; + $i++; + } + if (ereg('Y',$disable_alter_custdata)) + { + $DO_NOT_UPDATE=1; + $DO_NOT_UPDATE_text=' NOT'; + $stmt = "SELECT alter_custdata_override FROM vicidial_users where user='$user'"; + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $aco_conf_ct = mysql_num_rows($rslt); + $i=0; + while ($i < $aco_conf_ct) + { + $row=mysql_fetch_row($rslt); + $alter_custdata_override = $row[0]; + $i++; + } + if (ereg('ALLOW_ALTER',$alter_custdata_override)) + { + $DO_NOT_UPDATE=0; + $DO_NOT_UPDATE_text=''; + } + } + + if ($DO_NOT_UPDATE < 1) + { + $comments = eregi_replace("\r",'',$comments); + $comments = eregi_replace("\n",'!N',$comments); + $comments = eregi_replace("--AMP--",'&',$comments); + $comments = eregi_replace("--QUES--",'?',$comments); + $comments = eregi_replace("--POUND--",'#',$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';"; @@ -1495,7 +1993,7 @@ if ($ACTION == 'updateLEAD') $rslt=mysql_query($stmt, $link); } - echo "Lead $lead_id οι πληροφορίες έχουν ενημερωθεί\n"; + echo "Lead $lead_id information has$DO_NOT_UPDATE_text been updated\n"; } @@ -1515,10 +2013,54 @@ if ( ($ACTION == 'VDADpause') || ($ACTION == 'VDADready') ) 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';"; + $stmt="UPDATE vicidial_live_agents set lead_id='',uniqueid=0,callerid='',channel='', random_id='$random',comments='' where user='$user' and server_ip='$server_ip';"; if ($format=='debug') {echo "\n";} $rslt=mysql_query($stmt, $link); + $stmt="UPDATE vicidial_live_agents set status='$stage' where user='$user' and server_ip='$server_ip';"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + $affected_rows = mysql_affected_rows($link); + if ($affected_rows > 0) + { + ############################################# + ##### ΕΝΑΡΞΗ QUEUEMETRICS LOGGING LOOKUP ##### + $stmt = "SELECT enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_log_id FROM system_settings;"; + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $qm_conf_ct = mysql_num_rows($rslt); + $i=0; + while ($i < $qm_conf_ct) + { + $row=mysql_fetch_row($rslt); + $enable_queuemetrics_logging = $row[0]; + $queuemetrics_server_ip = $row[1]; + $queuemetrics_dbname = $row[2]; + $queuemetrics_login = $row[3]; + $queuemetrics_pass = $row[4]; + $queuemetrics_log_id = $row[5]; + $i++; + } + ##### END QUEUEMETRICS LOGGING LOOKUP ##### + ########################################### + if ($enable_queuemetrics_logging > 0) + { + if (ereg('READY',$stage)) {$QMstatus='UNPAUSEALL';} + if (ereg('ΠΑΥΣΗ',$stage)) {$QMstatus='ΠΑΥΣΗALL';} + $linkB=mysql_connect("$queuemetrics_server_ip", "$queuemetrics_login", "$queuemetrics_pass"); + mysql_select_db("$queuemetrics_dbname", $linkB); + + $stmt = "INSERT INTO queue_log SET partition='P01',time_id='$StarTtime',call_id='NONE',queue='NONE',agent='Agent/$user',verb='$QMstatus',serverid='$queuemetrics_log_id';"; + if ($DB) {echo "$stmt\n";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $linkB); + $affected_rows = mysql_affected_rows($linkB); + + mysql_close($linkB); + } + } + if ($agent_log == 'NO') {$donothing=1;} else @@ -1587,6 +2129,71 @@ if ($ACTION == 'UpdatEFavoritEs') } +################################################################################ +### PauseCodeSubmit - Update vicidial_agent_log with pause code +################################################################################ +if ($ACTION == 'ΠαύσηCodeSubmit') +{ + $row=''; $rowx=''; + if ( (strlen($status)<1) || (strlen($agent_log_id)<1) ) + { + echo "agent_log_id $agent_log_id or pause_code $status δεν ισχύει\n"; + exit; + } + else + { + $stmt="UPDATE vicidial_agent_log set sub_status=\"$status\" where agent_log_id='$agent_log_id';"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + $affected_rows = mysql_affected_rows($link); + if ($affected_rows > 0) + { + ############################################# + ##### ΕΝΑΡΞΗ QUEUEMETRICS LOGGING LOOKUP ##### + $stmt = "SELECT enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_log_id,allow_sipsak_messages FROM system_settings;"; + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $qm_conf_ct = mysql_num_rows($rslt); + $i=0; + while ($i < $qm_conf_ct) + { + $row=mysql_fetch_row($rslt); + $enable_queuemetrics_logging = $row[0]; + $queuemetrics_server_ip = $row[1]; + $queuemetrics_dbname = $row[2]; + $queuemetrics_login = $row[3]; + $queuemetrics_pass = $row[4]; + $queuemetrics_log_id = $row[5]; + $allow_sipsak_messages = $row[6]; + $i++; + } + ##### END QUEUEMETRICS LOGGING LOOKUP ##### + ########################################### + if ( ($enable_sipsak_messages > 0) and ($allow_sipsak_messages > 0) and (eregi("SIP",$protocol)) ) + { + $SIPSAK_prefix = 'BK-'; + passthru("/usr/local/bin/sipsak -M -O desktop -B \"$SIPSAK_prefix$status\" -r 5060 -s sip:$extension@$phone_ip > /dev/null"); + } + if ($enable_queuemetrics_logging > 0) + { + $linkB=mysql_connect("$queuemetrics_server_ip", "$queuemetrics_login", "$queuemetrics_pass"); + mysql_select_db("$queuemetrics_dbname", $linkB); + + $stmt = "INSERT INTO queue_log SET partition='P01',time_id='$StarTtime',call_id='NONE',queue='$campaign',agent='Agent/$user',verb='ΠΑΥΣΗREASON',serverid='$queuemetrics_log_id',data1='$status';"; + if ($DB) {echo "$stmt\n";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $linkB); + $affected_rows = mysql_affected_rows($linkB); + + mysql_close($linkB); + } + } + } +echo "Παύση Code has been updated to $status for $agent_log_id\n"; +} + + ################################################################################ ### CalLBacKLisT - List the USERONLY callbacks for an agent ################################################################################ diff --git a/agc_2-X/trunk/LANG_www/agc_el/vicidial.php b/agc_2-X/trunk/LANG_www/agc_el/vicidial.php index edff1acf..0e7f5366 100644 --- a/agc_2-X/trunk/LANG_www/agc_el/vicidial.php +++ b/agc_2-X/trunk/LANG_www/agc_el/vicidial.php @@ -1,7 +1,7 @@ LICENSE: GPLv2 +# Copyright (C) 2007 Matt Florell 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 @@ -15,7 +15,7 @@ # - vdc_db_query.php: Updates information in the database # - manager_send.php: Sends manager actions to the DB for execution # -# CHANGES +# CHANGELOG # 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 @@ -132,8 +132,37 @@ # 61128-2229 - Added vicidial_live_agents and vicidial_auto_calls manual dial entries # 61130-1617 - Added lead_id to MonitorConf for recording_log # 61221-1212 - Changed width to 760 to better fit 800x600 screens, widened SCRIPT +# 70109-1128 - Fixed wrapup timer bug +# 70109-1635 - Added option for HotKeys automatically dialing next number in manual mode +# - Added option for alternate number dialing with hotkeys +# 70111-1600 - Added ability to use BLEND/INBND/*_C/*_B/*_I as closer campaigns +# 70118-1517 - Added vicidial_agent_log and vicidial_user_log logging of user_group +# 70201-1249 - Added FAST DIAL option for manually dialing, added UTF8 compatible code +# 70201-1703 - Fixed cursor bug for most text input fields +# 70202-1453 - Added first portions of Agent Pause Codes +# 70203-0108 - Finished Agent Pause Codes functionality +# 70203-0930 - Added dialed_number to webform output +# 70203-1010 - Added dialed_label to webform output +# 70206-1201 - Fixed allow_closers bug +# 70206-1332 - Added vicidial_recording_override users setting function +# 70212-1252 - Fixed small issue with CXFER +# 70213-1018 - Changed CXFER and AXFER to update customer information before transfer +# 70214-1233 - Added queuemetrics_log_id field for server_id in queue_log +# 70215-1240 - Added queuemetrics_log_id field for server_id in queue_log +# 70222-1617 - Changed queue_log PAUSE/UNPAUSE to PAUSEALL/UNPAUSEALL +# 70226-1252 - Added Mute/UnMute to agent screen +# 70309-1035 - Allow amphersands and questions marks in comments to pass through +# 70313-1052 - Allow pound signs(hash) in comments to pass through +# 70316-1406 - Moved the MUTE button to be accessible during a transfer/conf +# 70319-1446 - Added agent-deactive-display and disable customer info update functions +# 70319-1626 - Added option to allow agent logins to campaigns with no leads in the hopper +# 70320-1501 - Added option to allow retry of leave-3way-call from dispo screen +# 70322-1545 - Added sipsak display ability # +$version = '2.0.129'; +$build = '70322-1545'; + require("dbconnect.php"); if (isset($_GET["DB"])) {$DB=$_GET["DB"];} @@ -172,14 +201,11 @@ if (isset($_GET["relogin"])) {$relogin=$_GET["relogin"];} $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); + $VD_campaign=ereg_replace("[^0-9a-zA-Z_]","",$VD_campaign); $forever_stop=0; -$version = '2.0.105'; -$build = '61221-1212'; - if ($force_logout) { echo "Έχετε αποσυνδεθεί. Σας ευχαριστούμε\n"; @@ -226,6 +252,7 @@ $TEST_all_statuses = '0'; # TEST variable allows all statuses in dispo screen $US='_'; $CL=':'; $AT='@'; +$DS='-'; $date = date("r"); $ip = getenv("REMOTE_ADDR"); $browser = getenv("HTTP_USER_AGENT"); @@ -252,6 +279,7 @@ $camp_form_code = " 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $phone_login=$row[0]; @@ -438,6 +467,7 @@ $VDloginDISPLAY=0; { $stmt="SELECT count(*) from vicidial_users where user='$VD_login' and pass='$VD_pass' and user_level > 0;"; if ($DB) {echo "|$stmt|\n";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $auth=$row[0]; @@ -447,7 +477,8 @@ $VDloginDISPLAY=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,user_group from vicidial_users where user='$VD_login' and pass='$VD_pass'"; + $stmt="SELECT full_name,user_level,hotkeys_active,agent_choose_ingroups,scheduled_callbacks,agentonly_callbacks,agentcall_manual,vicidial_recording,vicidial_transfers,closer_default_blended,user_group,vicidial_recording_override from vicidial_users where user='$VD_login' and pass='$VD_pass'"; + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $LOGfullname=$row[0]; @@ -461,6 +492,8 @@ $VDloginDISPLAY=0; $VU_vicidial_transfers=$row[8]; $VU_closer_default_blended=$row[9]; $VU_user_group=$row[10]; + $VU_vicidial_recording_override=$row[11]; + if ($WeBRooTWritablE > 0) { fwrite ($fp, "vdweb|GOOD|$date|$VD_login|$VD_pass|$ip|$browser|$LOGfullname|\n"); @@ -471,6 +504,7 @@ $VDloginDISPLAY=0; {$user_abb = eregi_replace("^.","",$user_abb); $forever_stop++;} $stmt="SELECT allowed_campaigns from vicidial_user_groups where user_group='$VU_user_group';"; + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $LOGallowed_campaigns =$row[0]; @@ -501,6 +535,7 @@ echo " 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $CAMPactive=$row[0]; @@ -512,6 +547,7 @@ echo " 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $VD_statuses_ct = mysql_num_rows($rslt); @@ -528,6 +564,7 @@ echo " 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $VD_statuses_camp = mysql_num_rows($rslt); @@ -548,6 +585,7 @@ echo " 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $HK_statuses_camp = mysql_num_rows($rslt); @@ -577,43 +615,46 @@ echo " 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $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]; - $allcalls_delay=$row[30]; - $omit_phone_code=$row[31]; + $park_ext = $row[0]; + $park_file_name = $row[1]; + $web_form_address = $row[2]; + $allow_closers = $row[3]; + $auto_dial_level = $row[4]; + $dial_timeout = $row[5]; + $dial_prefix = $row[6]; + $campaign_cid = $row[7]; + $campaign_vdad_exten = $row[8]; + $campaign_rec_exten = $row[9]; + $campaign_recording = $row[10]; + $campaign_rec_filename = $row[11]; + $campaign_script = $row[12]; + $get_call_launch = $row[13]; + $campaign_am_message_exten = $row[14]; + $xferconf_a_dtmf = $row[15]; + $xferconf_a_number = $row[16]; + $xferconf_b_dtmf = $row[17]; + $xferconf_b_number = $row[18]; + $alt_number_dialing = $row[19]; + $VC_scheduled_callbacks = $row[20]; + $wrapup_δευτερόλεπτα = $row[21]; + $wrapup_message = $row[22]; + $closer_campaigns = $row[23]; + $use_internal_dnc = $row[24]; + $allcalls_delay = $row[25]; + $omit_phone_code = $row[26]; + $agent_pause_codes_active = $row[27]; + $no_hopper_leads_logins = $row[28]; + if ( (!ereg('DISABLED',$VU_vicidial_recording_override)) and ($VU_vicidial_recording > 0) ) + { + $campaign_recording = $VU_vicidial_recording_override; + print "\n"; + } if ( ($VC_scheduled_callbacks=='Y') and ($VU_scheduled_callbacks=='1') ) {$scheduled_callbacks='1';} if ($VU_vicidial_recording=='0') @@ -626,12 +667,37 @@ echo " 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $VD_pause_codes = mysql_num_rows($rslt); + $j=0; + while ($j < $VD_pause_codes) + { + $row=mysql_fetch_row($rslt); + $pause_codes[$i] =$row[0]; + $pause_code_names[$i] =$row[1]; + $VARpause_codes = "$VARpause_codes'$pause_codes[$i]',"; + $VARpause_code_names = "$VARpause_code_names'$pause_code_names[$i]',"; + $i++; + $j++; + } + $VD_pause_codes_ct = ($VD_pause_codes_ct+$VD_pause_codes); + $VARpause_codes = substr("$VARpause_codes", 0, -1); + $VARpause_code_names = substr("$VARpause_code_names", 0, -1); + } + ##### grab the inbound groups to choose from if campaign contains CLOSER $VARingroups="''"; - if (eregi("CLOSER", $VD_campaign)) + if (eregi("(CLOSER|BLEND|INBND|_C$|_B$|_I$)", $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;"; + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $closer_ct = mysql_num_rows($rslt); @@ -648,6 +714,7 @@ echo " 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $row=mysql_fetch_row($rslt); @@ -708,6 +775,7 @@ echo " 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $authphone=$row[0]; @@ -746,6 +814,7 @@ else echo "χειριστής VICIΚΛΗΣΗ\n"; $stmt="SELECT * from phones where login='$phone_login' and pass='$phone_pass' and active = 'Y';"; if ($DB) {echo "|$stmt|\n";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $extension=$row[0]; @@ -808,6 +877,7 @@ else $DBX_user=$row[57]; $DBX_pass=$row[58]; $DBX_port=$row[59]; + $enable_sipsak_messages=$row[66]; if ($clientDST) { @@ -822,6 +892,7 @@ else $stmt="SELECT asterisk_version from servers where server_ip='$server_ip';"; if ($DB) {echo "|$stmt|\n";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $asterisk_version=$row[0]; @@ -875,21 +946,25 @@ else $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";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $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";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); - if ( (eregi("CLOSER", $VD_campaign)) || ($campaign_leads_to_call > 0) ) + if ( (eregi("(CLOSER|BLEND|INBND|_C$|_B$|_I$)", $VD_campaign)) || ($campaign_leads_to_call > 0) || (ereg('Y',$no_hopper_leads_logins)) ) { ### 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')"; + $stmt = "INSERT INTO vicidial_user_log (user,event,campaign_id,event_date,event_epoch,user_group) values('$VD_login','LOGIN','$VD_campaign','$NOW_TIME','$StarTtimE','$VU_user_group')"; if ($DB) {echo "|$stmt|\n";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $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;"; + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $prev_login_ct = mysql_num_rows($rslt); @@ -906,6 +981,7 @@ 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;"; + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $free_conf_ct = mysql_num_rows($rslt); @@ -917,6 +993,7 @@ else $i++; } $stmt="UPDATE vicidial_conferences set extension='$SIP_user' where server_ip='$server_ip' and conf_exten='$session_id';"; + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); print "\n"; @@ -924,18 +1001,21 @@ else $stmt="UPDATE vicidial_list set status='N', user='' where status IN('QUEUE','INCALL') and user ='$VD_login';"; if ($DB) {echo "$stmt\n";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $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";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $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";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); $affected_rows = mysql_affected_rows($link); print "\n"; @@ -943,11 +1023,45 @@ else # 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 + ### set the callerID for manager middleware-app to connect the phone to the user $SIqueryCID = "S$CIDdate$session_id"; + + ############################################# + ##### ΕΝΑΡΞΗ SYSTEM_SETTINGS LOOKUP ##### + $stmt = "SELECT enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_log_id,vicidial_agent_disable,allow_sipsak_messages FROM system_settings;"; + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $qm_conf_ct = mysql_num_rows($rslt); + $i=0; + while ($i < $qm_conf_ct) + { + $row=mysql_fetch_row($rslt); + $enable_queuemetrics_logging = $row[0]; + $queuemetrics_server_ip = $row[1]; + $queuemetrics_dbname = $row[2]; + $queuemetrics_login = $row[3]; + $queuemetrics_pass = $row[4]; + $queuemetrics_log_id = $row[5]; + $vicidial_agent_disable = $row[6]; + $allow_sipsak_messages = $row[7]; + $i++; + } + ##### END QUEUEMETRICS LOGGING LOOKUP ##### + ########################################### + + if ( ($enable_sipsak_messages > 0) and ($allow_sipsak_messages > 0) and (eregi("SIP",$protocol)) ) + { + $SIPSAK_prefix = 'LIN-'; + print "\n"; + passthru("/usr/local/bin/sipsak -M -O desktop -B \"$SIPSAK_prefix$VD_campaign\" -r 5060 -s sip:$extension@$phone_ip > /dev/null"); + $SIqueryCID = "$SIPSAK_prefix$VD_campaign$DS$CIDdate"; + } + ### 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";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); $affected_rows = mysql_affected_rows($link); print "\n"; @@ -959,13 +1073,38 @@ else $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";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); $affected_rows = mysql_affected_rows($link); print "\n"; - if (eregi("CLOSER", $VD_campaign)) + if ($enable_queuemetrics_logging > 0) { - print "\n"; + $linkB=mysql_connect("$queuemetrics_server_ip", "$queuemetrics_login", "$queuemetrics_pass"); + mysql_select_db("$queuemetrics_dbname", $linkB); + + $stmt = "INSERT INTO queue_log SET partition='P01',time_id='$StarTtimE',call_id='NONE',queue='$VD_campaign',agent='Agent/$VD_login',verb='AGENTLOGIN',data1='$VD_login@agents',serverid='$queuemetrics_log_id';"; + if ($DB) {echo "$stmt\n";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $linkB); + $affected_rows = mysql_affected_rows($linkB); + print "\n"; + + $stmt = "INSERT INTO queue_log SET partition='P01',time_id='$StarTtimE',call_id='NONE',queue='NONE',agent='Agent/$VD_login',verb='ΠΑΥΣΗALL',serverid='$queuemetrics_log_id';"; + if ($DB) {echo "$stmt\n";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $linkB); + $affected_rows = mysql_affected_rows($linkB); + print "\n"; + + mysql_close($linkB); + mysql_select_db("$VARDB_database", $link); + } + + + if (eregi("(CLOSER|BLEND|INBND|_C$|_B$|_I$)", $VD_campaign)) + { + print "\n"; } } else @@ -974,9 +1113,33 @@ else $stmt="INSERT INTO vicidial_live_agents (user,server_ip,conf_exten,extension,status,lead_id,campaign_id,uniqueid,callerid,channel,random_id,last_call_time,last_update_time,last_call_finish,user_level) values('$VD_login','$server_ip','$session_id','$SIP_user','PAUSED','','$VD_campaign','','','','$random','$NOW_TIME','$tsNOW_TIME','$NOW_TIME','$user_level');"; if ($DB) {echo "$stmt\n";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); $affected_rows = mysql_affected_rows($link); print "\n"; + + if ($enable_queuemetrics_logging > 0) + { + $linkB=mysql_connect("$queuemetrics_server_ip", "$queuemetrics_login", "$queuemetrics_pass"); + mysql_select_db("$queuemetrics_dbname", $linkB); + + $stmt = "INSERT INTO queue_log SET partition='P01',time_id='$StarTtimE',call_id='NONE',queue='$VD_campaign',agent='Agent/$VD_login',verb='AGENTLOGIN',data1='$VD_login@agents',serverid='$queuemetrics_log_id';"; + if ($DB) {echo "$stmt\n";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $linkB); + $affected_rows = mysql_affected_rows($linkB); + print "\n"; + + $stmt = "INSERT INTO queue_log SET partition='P01',time_id='$StarTtimE',call_id='NONE',queue='NONE',agent='Agent/$VD_login',verb='ΠΑΥΣΗALL',serverid='$queuemetrics_log_id';"; + if ($DB) {echo "$stmt\n";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $linkB); + $affected_rows = mysql_affected_rows($linkB); + print "\n"; + + mysql_close($linkB); + mysql_select_db("$VARDB_database", $link); + } } } else @@ -1027,11 +1190,12 @@ echo "
0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); $affected_rows = mysql_affected_rows($link); - $agent_log_id = mysql_insert_id(); + $agent_log_id = mysql_insert_id($link); print "\n"; $S='*'; @@ -1048,6 +1212,7 @@ echo " 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $MM_scripts = mysql_num_rows($rslt); @@ -1225,6 +1390,10 @@ $CCAL_OUT .= "
"; var CallBackCommenTs = ''; var scheduled_callbacks = ''; var dispo_check_all_pause = ''; + var agent_pause_codes_active = ''; + VARpause_codes = new Array(); + VARpause_code_names = new Array(); + var VD_pause_codes_ct = ''; VARstatuses = new Array(); VARstatusnames = new Array(); var VD_statuses_ct = ''; @@ -1277,6 +1446,7 @@ $CCAL_OUT .= "
"; var dialplan_number = ''; var ext_context = ''; var protocol = ''; + var agentchannel = ''; var local_gmt =''; var server_ip = ''; var server_ip_dialstring = ''; @@ -1292,6 +1462,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} var CalLCID = ''; var MDnextCID = ''; var XDnextCID = ''; + var LasTCID = ''; var lead_dial_number = ''; var MD_channel_look = 0; var XD_channel_look = 0; @@ -1324,11 +1495,6 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} var CalL_AutO_LauncH = ''; var panel_bgcolor = '#E0C2D6'; var CusTCB_bgcolor = '#FFFF66'; - var status_A = ''; - var status_B = ''; - var status_C = ''; - var status_D = ''; - var status_E = ''; var auto_dial_level = ''; var starting_dial_level = ''; var dial_timeout = ''; @@ -1428,11 +1594,24 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} var no_delete_sessions = ''; var webform_session = ''; var local_consult_xfers = ''; + var vicidial_agent_disable = ''; var CBentry_time = ''; var CBcallback_time = ''; var CBuser = ''; var CBcomments = ''; var volumecontrol_active = ''; + var ΠαύσηCode_HTML = ''; + var manual_auto_hotkey = 0; + var dialed_number = ''; + var dialed_label = ''; + var DispO3waychannel = ''; + var DispO3wayXtrAchannel = ''; + var DispO3wayCalLserverip = ''; + var DispO3wayCalLxfernumber = ''; + var DispO3wayCalLcamptail = ''; + var phone_ip = ''; + var enable_sipsak_messages = ''; + var allow_sipsak_messages = ''; var DiaLControl_auto_HTML = "\"Παύση\"\"Επανάληψη\""; var DiaLControl_auto_HTML_ready = "\"Παύση\"\"Επανάληψη\""; var DiaLControl_auto_HTML_OFF = "\"Παύση\"\"Επανάληψη\""; @@ -1536,8 +1715,12 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} // ################################################################################ // Send volume control command for meetme participant - function volume_control(taskdirection,taskvolchannel) + function volume_control(taskdirection,taskvolchannel,taskagentmute) { + if (taskagentmute=='AgenT') + { + taskvolchannel = agentchannel; + } var xmlhttp=false; /*@cc_on @*/ /*@if (@_jscript_version >= 5) @@ -1576,6 +1759,18 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} } delete xmlhttp; } + if (taskagentmute=='AgenT') + { + if (taskdirection=='MUTING') + { + document.getElementById("AgentMuteSpan").innerHTML = ""; + } + else + { + document.getElementById("AgentMuteSpan").innerHTML = ""; + } + } + } @@ -1590,9 +1785,9 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} // ################################################################################ // place 3way and customer into other conference and fake-hangup the lines - function leave_3way_call() + function leave_3way_call(tempvarattempt) { - mainxfer_send_redirect('3WAY'); + mainxfer_send_redirect('3WAY','','',tempvarattempt); document.vicidial_form.callchannel.value = ''; document.vicidial_form.callserverip.value = ''; @@ -1653,6 +1848,35 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} // Send Originate command to manager to place a phone call function basic_originate_call(tasknum,taskprefix,taskreverse,taskdialvalue,tasknowait,taskconfxfer) { + var regCXFvars = new RegExp("CXFER","g"); + var tasknum_string = tasknum.toString(); + if (tasknum_string.match(regCXFvars)) + { + var Ctasknum = tasknum_string.replace(regCXFvars, ''); + if (Ctasknum.length < 2) + {Ctasknum = '990009';} + var closerxfercamptail = '_L' + document.vicidial_form.xfercode.value; + tasknum = Ctasknum + "*CL_" + campaign + '' + closerxfercamptail + '*CXFER*' + document.vicidial_form.lead_id.value + '**' + document.vicidial_form.phone_number.value + '*' + user + '*'; + + CustomerData_update(); + + } + var regAXFvars = new RegExp("AXFER","g"); + if (tasknum_string.match(regAXFvars)) + { + var Ctasknum = tasknum_string.replace(regAXFvars, ''); + if (Ctasknum.length < 2) + {Ctasknum = '83009';} + var closerxfercamptail = '_L' + document.vicidial_form.xfercode.value; + if (closerxfercamptail.length < 3) + {closerxfercamptail = 'IVR';} + tasknum = Ctasknum + '*' + document.vicidial_form.phone_number.value + '*' + document.vicidial_form.lead_id.value + '*' + campaign + '*' + closerxfercamptail + '*' + user + '*'; + + CustomerData_update(); + + } + + var xmlhttp=false; /*@cc_on @*/ /*@if (@_jscript_version >= 5) @@ -1674,27 +1898,6 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} } if (xmlhttp) { - var regCXFvars = new RegExp("CXFER","g"); - var tasknum_string = tasknum.toString(); - if (tasknum_string.match(regCXFvars)) - { - var Ctasknum = tasknum_string.replace(regCXFvars, ''); - if (Ctasknum.length < 2) - {Ctasknum = '990009';} - var closerxfercamptail = '_L' + document.vicidial_form.xfercode.value; - tasknum = Ctasknum + "*CL_" + campaign + '' + closerxfercamptail + '**' + document.vicidial_form.lead_id.value + '**' + document.vicidial_form.phone_number.value + '*' + user + '*'; - } - var regAXFvars = new RegExp("AXFER","g"); - if (tasknum_string.match(regAXFvars)) - { - var Ctasknum = tasknum_string.replace(regAXFvars, ''); - if (Ctasknum.length < 2) - {Ctasknum = '83009';} - var closerxfercamptail = '_L' + document.vicidial_form.xfercode.value; - if (closerxfercamptail.length < 3) - {closerxfercamptail = 'IVR';} - tasknum = Ctasknum + '*' + document.vicidial_form.phone_number.value + '*' + document.vicidial_form.lead_id.value + '*' + campaign + '*' + closerxfercamptail + '*' + user + '*'; - } if (taskprefix == 'NO') {var orig_prefix = '';} else {var orig_prefix = agc_dial_prefix;} if (taskreverse == 'YES') @@ -1858,7 +2061,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} UnixTime = parseInt(UnixTime); UnixTimeMS = (UnixTime * 1000); t.setTime(UnixTimeMS); - if (agentcallsstatus == '1') + if ( (agentcallsstatus == '1') || (vicidial_agent_disable != 'NOT_ACTIVE') ) { var Astatus_array = check_time_array[2].split("Κατάσταση: "); var AGStatuS = Astatus_array[1]; @@ -1872,6 +2075,14 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} { document.getElementById("AgentΚατάστασηCalls").innerHTML = CamPCalLs; } + if ( (AGStatuS == 'DEAD_VLA') && ( (vicidial_agent_disable == 'LIVE_AGENT') || (vicidial_agent_disable == 'ALL') ) ) + { + showDiv('AgenTDisablEBoX'); + } + if ( (AGStatuS == 'DEAD_EXTERNAL') && ( (vicidial_agent_disable == 'EXTERNAL') || (vicidial_agent_disable == 'ALL') ) ) + { + showDiv('AgenTDisablEBoX'); + } } var check_conf_array=check_ALL_array[1].split("|"); var live_conf_calls = check_conf_array[0]; @@ -1903,14 +2114,13 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} {var row_color = '#CCCCFF';} var conv_ct = (loop_ct + conv_start); var channelfieldA = conf_chan_array[conv_ct]; - // live_conf_HTML = live_conf_HTML + "
" + loop_ct + "" + channelfieldA + "HangupXFER
" + loop_ct + "" + channelfieldA + "ΚΛΕΙΣΙΜΟ
" + loop_ct + "" + channelfieldA + "ΚΛΕΙΣΙΜΟ    
" + loop_ct + "" + channelfieldA + "ΚΛΕΙΣΙΜΟ          
ΠΑΥΣΗ CODE
"; + var loop_ct = 0; + while (loop_ct < VD_pause_codes_ct) + { + ΠαύσηCode_HTML = ΠαύσηCode_HTML + "" + VARpause_codes[loop_ct] + " - " + VARpause_code_names[loop_ct] + "

"; + loop_ct++; + if (loop_ct == VD_pause_codes_ct_half) + {ΠαύσηCode_HTML = ΠαύσηCode_HTML + "
";} + } + ΠαύσηCode_HTML = ΠαύσηCode_HTML + "


Επιστροφή"; + document.getElementById("ΠαύσηCodeSelectContent").innerHTML = ΠαύσηCode_HTML; + } + } // ################################################################################ // open web form, then submit disposition @@ -4114,7 +4527,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} } if (xmlhttp) { - DSupdate_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=updateDISPO&format=text&user=" + user + "&pass=" + pass + "&dispo_choice=" + DispoChoice + "&lead_id=" + document.vicidial_form.lead_id.value + "&campaign=" + campaign + "&auto_dial_level=" + auto_dial_level + "&agent_log_id=" + agent_log_id + "&CallBackDatETimE=" + CallBackDatETimE + "&list_id=" + document.vicidial_form.list_id.value + "&recipient=" + CallBackrecipient + "&use_internal_dnc=" + use_internal_dnc + "&comments=" + CallBackCommenTs; + DSupdate_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=updateDISPO&format=text&user=" + user + "&pass=" + pass + "&dispo_choice=" + DispoChoice + "&lead_id=" + document.vicidial_form.lead_id.value + "&campaign=" + campaign + "&auto_dial_level=" + auto_dial_level + "&agent_log_id=" + agent_log_id + "&CallBackDatETimE=" + CallBackDatETimE + "&list_id=" + document.vicidial_form.list_id.value + "&recipient=" + CallBackrecipient + "&use_internal_dnc=" + use_internal_dnc + "&MDnextCID=" + LasTCID + "&comments=" + CallBackCommenTs; xmlhttp.open('POST', 'vdc_db_query.php'); xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8'); xmlhttp.send(DSupdate_query); @@ -4124,8 +4537,8 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} { var check_dispo = null; check_dispo = xmlhttp.responseText; - // alert(xmlhttp.responseText); var check_DS_array=check_dispo.split("\n"); + // alert(xmlhttp.responseText + "\n|" + check_DS_array[1] + "\n|" + check_DS_array[2] + "|"); if (check_DS_array[1] == 'Next agent_log_id:') { agent_log_id = check_DS_array[2]; @@ -4203,12 +4616,67 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} AutoDial_ReSume_PauSe("VDADready","NO"); // document.getElementById("DiaLControl").innerHTML = DiaLControl_auto_HTML_ready; } + else + { + // trigger HotKeys manual dial automatically go to next lead + if (manual_auto_hotkey == '1') + { + manual_auto_hotkey = 0; + ManualDialNext('','','','',''); + } + } } } } } } + +// ################################################################################ +// Submit the Παύση Code + function PauseCodeSelect_submit(newpausecode) + { + hideDiv('ΠαύσηCodeSelectBox'); + WaitingForNextStep=0; + + var xmlhttp=false; + /*@cc_on @*/ + /*@if (@_jscript_version >= 5) + // JScript gives us Conditional compilation, we can cope with old IE versions. + // and security blocked creation of the objects. + try { + xmlhttp = new ActiveXObject("Msxml2.XMLHTTP"); + } catch (e) { + try { + xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); + } catch (E) { + xmlhttp = false; + } + } + @end @*/ + if (!xmlhttp && typeof XMLHttpRequest!='undefined') + { + xmlhttp = new XMLHttpRequest(); + } + if (xmlhttp) + { + VMCpausecode_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=ΠαύσηCodeSubmit&format=text&status=" + newpausecode + "&agent_log_id=" + agent_log_id + "&campaign=" + campaign + "&extension=" + extension + "&protocol=" + protocol + "&phone_ip=" + phone_ip + "&enable_sipsak_messages=" + enable_sipsak_messages; + xmlhttp.open('POST', 'vdc_db_query.php'); + xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8'); + xmlhttp.send(VMCpausecode_query); + xmlhttp.onreadystatechange = function() + { + if (xmlhttp.readyState == 4 && xmlhttp.status == 200) + { + // alert(xmlhttp.responseText); + } + } + delete xmlhttp; + } + } + + + // ################################################################################ // Populate the dtmf and xfer number for each preset link in xfer-conf frame function DtMf_PreSet_a() @@ -4302,7 +4770,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} } if (xmlhttp) { - VMCoriginate_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=Originate&format=text&channel=" + originatevalue + "&queryCID=" + queryCID + "&exten=" + session_id + "&ext_context=" + ext_context + "&ext_priority=1"; + VMCoriginate_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=OriginateVDRelogin&format=text&channel=" + originatevalue + "&queryCID=" + queryCID + "&exten=" + session_id + "&ext_context=" + ext_context + "&ext_priority=1" + "&extension=" + extension + "&protocol=" + protocol + "&phone_ip=" + phone_ip + "&enable_sipsak_messages=" + enable_sipsak_messages + "&allow_sipsak_messages=" + allow_sipsak_messages + "&campaign=" + campaign; xmlhttp.open('POST', 'manager_send.php'); xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8'); xmlhttp.send(VMCoriginate_query); @@ -4489,7 +4957,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} } if (xmlhttp) { - VDlogout_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=userLOGout&format=text&user=" + user + "&pass=" + pass + "&campaign=" + campaign + "&conf_exten=" + session_id + "&extension=" + extension + "&protocol=" + protocol + "&no_delete_sessions=" + no_delete_sessions; + VDlogout_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=userLOGout&format=text&user=" + user + "&pass=" + pass + "&campaign=" + campaign + "&conf_exten=" + session_id + "&extension=" + extension + "&protocol=" + protocol + "&agent_log_id=" + agent_log_id + "&no_delete_sessions=" + no_delete_sessions + "&phone_ip=" + phone_ip + "&enable_sipsak_messages=" + enable_sipsak_messages; xmlhttp.open('POST', 'vdc_db_query.php'); xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8'); xmlhttp.send(VDlogout_query); @@ -4536,14 +5004,24 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} document.vicidial_form.inert_button.focus(); document.vicidial_form.inert_button.blur(); CustomerData_update(); - HKdispo_display = 4; - HKfinish=1; var HKdispo_ary = HKdispo.split(" ----- "); - document.getElementById("HotKeyDispo").innerHTML = HKdispo_ary[0] + " - " + HKdispo_ary[1]; - showDiv('HotKeyActionBox'); - hideDiv('HotKeyEntriesBox'); - document.vicidial_form.DispoSelection.value = HKdispo_ary[0]; - dialedcall_send_hangup('NO'); + if ( (HKdispo_ary[0] == 'ALTPH2') || (HKdispo_ary[0] == 'ADDR3') ) + { + if (document.vicidial_form.DiaLAltPhonE.checked==true) + { + dialedcall_send_hangup('NO', 'YES', HKdispo_ary[0]); + } + } + else + { + HKdispo_display = 4; + HKfinish=1; + document.getElementById("HotKeyDispo").innerHTML = HKdispo_ary[0] + " - " + HKdispo_ary[1]; + showDiv('HotKeyActionBox'); + hideDiv('HotKeyEntriesBox'); + document.vicidial_form.DispoSelection.value = HKdispo_ary[0]; + dialedcall_send_hangup('NO', 'YES', HKdispo_ary[0]); + } // DispoSelect_submit(); // AutoDialWaiting = 1; // AutoDial_ReSume_PauSe("VDADready"); @@ -4899,11 +5377,11 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} hideDiv('CBcommentsBox'); hideDiv('HotKeyActionBox'); hideDiv('HotKeyEntriesBox'); - hideDiv('MainXfeRBox'); hideDiv('MainPanel'); hideDiv('ScriptPanel'); hideDiv('DispoSelectBox'); hideDiv('LogouTBox'); + hideDiv('AgenTDisablEBoX'); hideDiv('CustomerGoneBox'); hideDiv('NoneInSessionBox'); hideDiv('WrapupBox'); @@ -4915,6 +5393,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} hideDiv('DispoButtonHideC'); hideDiv('CallBacKsLisTBox'); hideDiv('NeWManuaLDiaLBox'); + hideDiv('ΠαύσηCodeSelectBox'); if (agentonly_callbacks != '1') {hideDiv('CallbacksButtons');} // if ( (agentcall_manual != '1') && (starting_dial_level > 0) ) @@ -4930,6 +5409,15 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} {hideDiv('VolumeControlSpan');} document.vicidial_form.LeadLookuP.checked=true; + if (agent_pause_codes_active=='Y') + { + document.getElementById("ΠαύσηCodeLinkSpan").innerHTML = "ΠΛΗΚΤΡΟΛΟΓΕΣΤΕ έναν ΚΩΔΙΚΟ ΜΙΚΡΗΣ ΔΙΑΚΟΠΉΣ"; + } + if (VICIDiaL_allow_closers < 1) + { + document.getElementById("InternalCloser").style.visibility = 'hidden'; + document.getElementById("LocalCloser").style.visibility = 'hidden'; + } document.getElementById("sessionIDspan").innerHTML = session_id; if ( (campaign_recording == 'NEVER') || (campaign_recording == 'ALLFORCE') ) { @@ -4962,6 +5450,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} if (wrapup_δευτερόλεπτα > 0) { showDiv('WrapupBox'); + document.getElementById("WrapupTimer").innerHTML = wrapup_δευτερόλεπτα; wrapup_waiting=1; } CustomerData_update(); @@ -4994,39 +5483,6 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} if ( (custchannellive < -30) && (lastcustchannel.length > 3) ) {CustomerChanneLGone();} if ( (custchannellive < -10) && (lastcustchannel.length > 3) ) {ReChecKCustoMerChaN();} if ( (nochannelinsession > 16) && (check_n > 15) ) {NoneInSession();} - if (wrapup_δευτερόλεπτα > 0) - { - document.getElementById("WrapupTimer").innerHTML = (wrapup_δευτερόλεπτα - wrapup_counter); - wrapup_counter++; - if ( (wrapup_counter > wrapup_δευτερόλεπτα) && (document.getElementById("WrapupBox").style.visibility == 'visible') ) - { - wrapup_waiting=0; - hideDiv('WrapupBox'); - if (document.vicidial_form.DispoSelectStop.checked==true) - { - if (auto_dial_level != '0') - { - AutoDialWaiting = 0; - AutoDial_ReSume_PauSe("VDADpause","NO"); - // document.getElementById("DiaLControl").innerHTML = DiaLControl_auto_HTML; - } - VICIDiaL_pause_calling = 1; - if (dispo_check_all_pause != '1') - { - document.vicidial_form.DispoSelectStop.checked=false; - } - } - else - { - if (auto_dial_level != '0') - { - AutoDialWaiting = 1; - AutoDial_ReSume_PauSe("VDADready","NO"); - // document.getElementById("DiaLControl").innerHTML = DiaLControl_auto_HTML_ready; - } - } - } - } if (WaitingForNextStep==0) { // check for live channels in conference room and get current datetime @@ -5108,6 +5564,39 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} // parked_calls_display_refresh(); } } + if (wrapup_δευτερόλεπτα > 0) + { + document.getElementById("WrapupTimer").innerHTML = (wrapup_δευτερόλεπτα - wrapup_counter); + wrapup_counter++; + if ( (wrapup_counter > wrapup_δευτερόλεπτα) && (document.getElementById("WrapupBox").style.visibility == 'visible') ) + { + wrapup_waiting=0; + hideDiv('WrapupBox'); + if (document.vicidial_form.DispoSelectStop.checked==true) + { + if (auto_dial_level != '0') + { + AutoDialWaiting = 0; + AutoDial_ReSume_PauSe("VDADpause","NO"); + // document.getElementById("DiaLControl").innerHTML = DiaLControl_auto_HTML; + } + VICIDiaL_pause_calling = 1; + if (dispo_check_all_pause != '1') + { + document.vicidial_form.DispoSelectStop.checked=false; + } + } + else + { + if (auto_dial_level != '0') + { + AutoDialWaiting = 1; + AutoDial_ReSume_PauSe("VDADready","NO"); + // document.getElementById("DiaLControl").innerHTML = DiaLControl_auto_HTML_ready; + } + } + } + } } } setTimeout("all_refresh()", refresh_interval); @@ -5165,6 +5654,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} if (Cmon == 9) {Cmon = "ΟΚΤ";} if (Cmon == 10) {Cmon = "ΝΟΕ";} if (Cmon == 11) {Cmon = "ΔΕΚ";} + if (Chours == 12) {AMPM = 'PM';} if (Chours > 12) {Chours = (Chours - 12); AMPM = 'PM';} if (Cmin < 10) {Cmin = "0" + Cmin;} if (Csec < 10) {Csec = "0" + Csec;} @@ -5300,25 +5790,6 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} } } - - function showMainXfeR(divvar,taskxferchan,taskxferchanmain) - { - document.getElementById("MainXfeRBox").style.visibility = 'visible'; - getactiveext("MainXfeRBox"); - conference_list_display_refresh("MainXfeRconfContent"); - var XfeR_channel = taskxferchan; - document.vicidial_form.H_XfeR_channel.value = XfeR_channel; - document.vicidial_form.M_XfeR_channel.value = taskxferchanmain; - document.getElementById("MainXfeRChanneL").innerHTML = XfeR_channel; - } - function hideMainXfeR(divvar) - { - document.getElementById("MainXfeRBox").style.visibility = 'hidden'; - var XfeR_channel = ''; - document.vicidial_form.H_XfeR_channel.value = ''; - document.vicidial_form.M_XfeR_channel.value = ''; - document.getElementById("MainXfeRChanneL").innerHTML = ''; - } function conf_channels_detail(divvar) { if (divvar == 'SHOW') @@ -5360,6 +5831,10 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} { if (showxfervar == 'ON') { + var xfer_height = 310; + if (alt_phone_dialing>0) {xfer_height = (xfer_height + 20);} + if ( (auto_dial_level == 0) && (manual_dial_preview == 1) ) {xfer_height = (xfer_height + 20);} + document.getElementById("TransferMain").style.top = xfer_height; HKbutton_allowed = 0; showDiv('TransferMain'); document.getElementById("XferControl").innerHTML = "\"Μεταφορά"; @@ -5428,17 +5903,13 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} - - @@ -5490,15 +5961,23 @@ echo "\n";

VICIΚΛΗΣΗ
- -ΧΕΙΡ.ΚΛΗΣΗ
+ +ΧΕΙΡ.ΚΛΗΣΗ       ΓΡΗΓΟΡΟΣ ΠΙΝΑΚΑΣ
- + X ΕΝΕΡΓΕΣ ΕΠΑΝΑΚΛΗΣΕΙΣ
- + +
+
+ + +
+
+ +
ΕΠΑΝΑΚΛΗΣΕΙΣ ΓΙΑ ΤΟΝ ΧΕΙΡΙΣΤΗ :
Επιλέξτε μία επανάκληση παρακάτω για να καλέσετε τον πελάτη τώρα. Εάν επιλέξετε μία εγγραφή παρακάτω, θα διαγραφεί από την λίστα.
@@ -5509,7 +5988,7 @@ echo "\n";
- + - + @@ -5533,7 +6014,8 @@ echo "\n"; - +
ΝΕΑ ΧΕΙΡΟΚΙΝΗΤΗ ΚΛΗΣΗ ΟΔΗΓΟΥ ΓΙΑ :

Καταχωρήστε τις πληροφορίες παρακάτω για τον νέο οδηγό που επιθυμήτε να καλέσετε.
\n";
  (Αυτό είναι συνήθως ένα 1 στις ΗΠΑ)
Τηλ Number:   (12 digits max - digits only) +   (12 digits max - digits only) +
Αναζήτηση Οδηγών:   (Η επιλογή αυτή επιτρέπει να βρει τον αριθμό στο σύστημα προτού γίνει εισαγωγή ως νέος οδηγός)

Εάν θέλετε να καλέσετε έναν αριθμό και να μην προστεθεί ως νέος οδηγός, καταχωρήστε τον με την σωστή μορφή στο πεδίο Αγνόησε Κλήση παρακάτω. Για να κλείσετε αυτή την κλήση θα πρέπει να ανοίξετε το ΚΛΗΣΕΙΣ ΣΕ ΑΥΤΗ ΤΗΝ ΔΙΑΙΔΚΑΣΙΑ στο κάτω μέρος της οθόνης και να την κλείσετε επιλέγοντας το κανάλι.
 
Αγνόησε Κλήση:   (παρακαλώ μόνο ψηφία)  (παρακαλώ μόνο ψηφία) +

Κάλεσε Τώρα @@ -5557,6 +6039,7 @@ Your Κατάσταση:
+
Μεταφορά - διάσκεψη
ΕΣΩΤΕΡΙΚΟΣ CLOSER @@ -5582,11 +6065,12 @@ Your Κατάσταση: Τυφλή μεταφορά κλήσης Blind Transfer VMail Message
+
- +
Τερματισμό Καθοδήγησης όπως:

-
@@ -5594,7 +6078,7 @@ Your Κατάσταση:
- + @@ -5610,7 +6094,7 @@ Your Κατάσταση:
Πλήκτρα κλειδιά Τερματισμού: Όταν είναι ενεργό, πιέστε απλά το πλήκτρο κλειδί για τον επιθυμητό τερματισμό της κλήσης. Η κλήση θα τρεματίσει αυτόματα:
- + @@ -5627,7 +6111,7 @@ Your Κατάσταση:
Προηγούμενες πληροφορίες επανάκλησης:
- +
Κανένας δεν είναι στη σύνοδό σας:
Επιστροφή

@@ -5635,7 +6119,7 @@ Your Κατάσταση:
- +
Ο πελάτης έχει κλείσει το τηλέφωνο:
Επιστροφή

@@ -5644,7 +6128,7 @@ Your Κατάσταση:
- +
Αναδίπλωση Κλήσης: απομύνοντα δευτερόλεπτα σε αναδίπλωση



@@ -5653,23 +6137,28 @@ Your Κατάσταση:
- + +
Η σύνοδός σας έχει τεθεί εκτός λειτουργίας
ΑΠΟΣΥΝΔΕΣΗ

Επιστροφή +
+
+ +

ΑΠΟΣΥΝΔΕΣΗ
- +
- +
 
- +
Οποιεσδήποτε αλλαγές που γίνονται στις πληροφορίες πελατών κατωτέρω αυτή τη στιγμή δεν θα είναι, πρέπει να αλλάξετε τις πληροφορίες πελατών ενώπιον σας Hangup η κλήση.
- +
Τερματισμός Κλήσης :       Ξανακλήσε       ελαχιστοποιήστε
Επιλογή τερματισμού της κλήσης
@@ -5682,8 +6171,15 @@ Your Κατάσταση:
+ +
ΕΠΙΛΕΞΤΕ έναν ΚΩΔΙΚΑ ΜΙΚΡΗΣ ΔΙΑΚΟΠΉΣ :
+ Παύση Code Selection + +

  +
+
- +
Επιλέξτε μια ημερομηνία CallBack :
@@ -5726,7 +6222,7 @@ Your Κατάσταση:
- +
CLOSER ΕΙΣΕΡΧΟΜΕΝΗ ΕΠΙΛΟΓΗ ΟΜΑΔΑΣ
Επιλογή Closer εισερχόμενης ομάδας
@@ -5737,7 +6233,7 @@ Your Κατάσταση:
- + Κανάλι Κανάλι @@ -5747,25 +6243,8 @@ Your Κατάσταση: - - - - - - -
ΜΕΤΑΦΟΡΑ ΕΝΕΡΓΗΣ ΚΛΗΣΗΣ
Κανάλι προς μεταφορά: Κανάλι
Τηλ.συνδέσεις:
Επιλογές τηλ. συνδέσεων
-
- Στείλε στην επιλεγμένη τηλ.σύνδεση

- Στείλε στο επιλεγμένο vmail

- Στείλε σε αυτόν τον αριθμό:


- ΑΝΑΝΕΩΣΗ


- Επιστροφή στο Βασικό Παράθυρο

-
Διασκέψεις:
(επιλέξτε έναν αριθμό κατωτέρω που θα σταλεί σε μια διάσκεψη)
Στείλε το κανάλι μου επίσης
Επιλογές διασκέψεων
-
- - - +
VICIΚΛΗΣΗ SCRIPT
@@ -5809,7 +6288,7 @@ if ( ($alt_phone_dialing) and ($auto_dial_level==0) )
Κλείσιμο Πελάτη

-Στείλε DTMF
+
Στείλε DTMF

@@ -5851,14 +6331,18 @@ if ( ($alt_phone_dialing) and ($auto_dial_level==0) ) +\n";} + {echo "\n";} else - {echo "\n";} + {echo "\n";} ?> - + +
δευτερόλεπτα:   Κανάλι:   Χρόνος Πελάτη:   Ηλεκτρονικό ταχυδρομείο:
Σχολιάζει: +
+
diff --git a/agc_2-X/trunk/LANG_www/agc_en/conf_exten_check.php b/agc_2-X/trunk/LANG_www/agc_en/conf_exten_check.php index 2852b52e..ea527e43 100644 --- a/agc_2-X/trunk/LANG_www/agc_en/conf_exten_check.php +++ b/agc_2-X/trunk/LANG_www/agc_en/conf_exten_check.php @@ -33,6 +33,7 @@ # 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 # 61128-2255 - Added update for manual dial vicidial_live_agents +# 70319-1542 - Added agent disabled display function # require("dbconnect.php"); @@ -69,8 +70,8 @@ if (!isset($format)) {$format="text";} if (!isset($ACTION)) {$ACTION="refresh";} if (!isset($client)) {$client="agc";} -$version = '0.0.10'; -$build = '61128-2255'; +$version = '0.0.11'; +$build = '70319-1542'; $StarTtime = date("U"); $NOW_DATE = date("Y-m-d"); $NOW_TIME = date("Y-m-d H:i:s"); @@ -144,6 +145,23 @@ echo " if ($client == 'vdc') { + $Acount=0; + $AexternalDEAD=0; + + ### see if the agent has a record in the vicidial_live_agents table + $stmt="SELECT count(*) 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); + $Acount=$row[0]; + + # ### find out if external table shows agent should be disabled + # $stmt="SELECT count(*) from another_table where user='$user' and status='DEAD';"; + # if ($DB) {echo "|$stmt|\n";} + # $rslt=mysql_query($stmt, $link); + # $row=mysql_fetch_row($rslt); + # $AexternalDEAD=$row[0]; + if ($auto_dial_level > 0) { ### update the vicidial_live_agents every second with a new random number so it is shown to be alive @@ -186,6 +204,9 @@ echo " } + if ($Acount < 1) {$Astatus='DEAD_VLA';} + if ($AexternalDEAD > 0) {$Astatus='DEAD_EXTERNAL';} + echo 'DateTime: ' . $NOW_TIME . '|UnixTime: ' . $StarTtime . '|Status: ' . $Astatus . '|CampCalls: ' . $RingCalls . "|\n"; } diff --git a/agc_2-X/trunk/LANG_www/agc_en/manager_send.php b/agc_2-X/trunk/LANG_www/agc_en/manager_send.php index d8434635..10aa003d 100644 --- a/agc_2-X/trunk/LANG_www/agc_en/manager_send.php +++ b/agc_2-X/trunk/LANG_www/agc_en/manager_send.php @@ -1,7 +1,7 @@ LICENSE: GPLv2 +# Copyright (C) 2007 Matt Florell 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 @@ -12,7 +12,7 @@ # - $user # - $pass # optional variables: -# - $ACTION - ('Originate','Redirect','Hangup','Command','Monitor','StopMonitor','SysCIDOriginate','RedirectName','RedirectNameVmail','MonitorConf','StopMonitorConf','RedirectXtra','RedirectXtraCX','RedirectVD','HangupConfDial','VolumeControl') +# - $ACTION - ('Originate','Redirect','Hangup','Command','Monitor','StopMonitor','SysCIDOriginate','RedirectName','RedirectNameVmail','MonitorConf','StopMonitorConf','RedirectXtra','RedirectXtraCX','RedirectVD','HangupConfDial','VolumeControl','OriginateVDRelogin') # - $queryCID - ('CN012345678901234567',...) # - $format - ('text','debug') # - $channel - ('Zap/41-1','SIP/test101-1jut','IAX2/iaxy@iaxy',...) @@ -35,7 +35,7 @@ # - $stage - ('UP','DOWN') # -# changes +# CHANGELOG: # 50401-1002 - First build of script, Hangup function only # 50404-1045 - Redirect basic function enabled # 50406-1522 - Monitor basic function enabled @@ -64,6 +64,10 @@ # 61004-1526 - Added parsing of volume control command and lookup or number # 61130-1617 - Added lead_id to MonitorConf for recording_log # 61201-1115 - Added user to MonitorConf for recording_log +# 70111-1600 - added ability to use BLEND/INBND/*_C/*_B/*_I as closer campaigns +# 70226-1251 - Added Mute/UnMute to conference volume control +# 70320-1502 - Added option to allow retry of leave-3way-call and debug logging +# 70322-1636 - Added sipsak display ability # require("dbconnect.php"); @@ -123,6 +127,16 @@ if (isset($_GET["phone_number"])) {$phone_number=$_GET["phone_number"];} elseif (isset($_POST["phone_number"])) {$phone_number=$_POST["phone_number"];} if (isset($_GET["stage"])) {$stage=$_GET["stage"];} elseif (isset($_POST["stage"])) {$stage=$_POST["stage"];} +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["phone_ip"])) {$phone_ip=$_GET["phone_ip"];} + elseif (isset($_POST["phone_ip"])) {$phone_ip=$_POST["phone_ip"];} +if (isset($_GET["enable_sipsak_messages"])) {$enable_sipsak_messages=$_GET["enable_sipsak_messages"];} + elseif (isset($_POST["enable_sipsak_messages"])) {$enable_sipsak_messages=$_POST["enable_sipsak_messages"];} +if (isset($_GET["allow_sipsak_messages"])) {$allow_sipsak_messages=$_GET["allow_sipsak_messages"];} + elseif (isset($_POST["allow_sipsak_messages"])) {$allow_sipsak_messages=$_POST["allow_sipsak_messages"];} $user=ereg_replace("[^0-9a-zA-Z]","",$user); $pass=ereg_replace("[^0-9a-zA-Z]","",$pass); @@ -133,8 +147,8 @@ if (!isset($ACTION)) {$ACTION="Originate";} if (!isset($format)) {$format="alert";} if (!isset($ext_priority)) {$ext_priority="1";} -$version = '2.0.27'; -$build = '61130-1617'; +$version = '2.0.29'; +$build = '70320-1502'; $StarTtime = date("U"); $NOW_DATE = date("Y-m-d"); $NOW_TIME = date("Y-m-d H:i:s"); @@ -279,6 +293,21 @@ if ($ACTION=="OriginateNameVmail") } } +if ($ACTION=="OriginateVDRelogin") +{ + if ( ($enable_sipsak_messages > 0) and ($allow_sipsak_messages > 0) and (eregi("SIP",$protocol)) ) + { + $CIDdate = date("ymdHis"); + $DS='-'; + $SIPSAK_prefix = 'LIN-'; + print "\n"; + passthru("/usr/local/bin/sipsak -M -O desktop -B \"$SIPSAK_prefix$campaign\" -r 5060 -s sip:$extension@$phone_ip > /dev/null"); + $queryCID = "$SIPSAK_prefix$campaign$DS$CIDdate"; + + } + $ACTION="Originate"; +} + if ($ACTION=="Originate") { if ( (strlen($exten)<1) or (strlen($channel)<1) or (strlen($ext_context)<1) or (strlen($queryCID)<10) ) @@ -430,7 +459,7 @@ if ($ACTION=="RedirectVD") else { if (strlen($call_server_ip)>6) {$server_ip = $call_server_ip;} - if (eregi("CLOSER",$campaign)) + if (eregi("(CLOSER|BLEND|INBND|_C$|_B$|_I$)",$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";} @@ -560,6 +589,7 @@ if ($ACTION=="RedirectNameVmail") if ($ACTION=="RedirectXtraCX") { + $DBout=''; $row=''; $rowx=''; $channel_liveX=1; $channel_liveY=1; @@ -575,6 +605,15 @@ if ($ACTION=="RedirectXtraCX") echo "ext_context $ext_context must be set\n"; echo "ext_priority $ext_priority must be set\n"; echo "\nRedirect Action not sent\n"; + if (ereg("SECOND|FIRST|DEBUG",$filename)) + { + if ($WeBRooTWritablE > 0) + { + $fp = fopen ("./vicidial_debug.txt", "a"); + fwrite ($fp, "$NOW_TIME|RDCXC|$filename|$user|$campaign|$$channel|$extrachannel|$queryCID|$exten|$ext_context|ext_priority|\n"); + fclose($fp); + } + } } else { @@ -594,6 +633,7 @@ if ($ACTION=="RedirectXtraCX") { $channel_liveX=0; echo "Channel $channel is not live on $call_server_ip, Redirect command not inserted\n"; + if (ereg("SECOND|FIRST|DEBUG",$filename)) {$DBout .= "$channel is not live on $call_server_ip";} } } $stmt="SELECT count(*) FROM live_channels where server_ip = '$server_ip' and channel='$extrachannel';"; @@ -610,6 +650,7 @@ if ($ACTION=="RedirectXtraCX") { $channel_liveY=0; echo "Channel $channel is not live on $server_ip, Redirect command not inserted\n"; + if (ereg("SECOND|FIRST|DEBUG",$filename)) {$DBout .= "$channel is not live on $server_ip";} } } if ( ($channel_liveX==1) && ($channel_liveY==1) ) @@ -622,6 +663,7 @@ if ($ACTION=="RedirectXtraCX") { $channel_liveY=0; echo "No Local agent to send call to, Redirect command not inserted\n"; + if (ereg("SECOND|FIRST|DEBUG",$filename)) {$DBout .= "No Local agent to send call to";} } else { @@ -654,6 +696,7 @@ if ($ACTION=="RedirectXtraCX") $rslt=mysql_query($stmt, $link); echo "RedirectXtraCX command sent for Channel $channel on $call_server_ip and \nHungup $extrachannel on $server_ip\n"; + if (ereg("SECOND|FIRST|DEBUG",$filename)) {$DBout .= "$channel on $call_server_ip, Hungup $extrachannel on $server_ip";} } } else @@ -662,8 +705,19 @@ if ($ACTION=="RedirectXtraCX") {$ACTION="Redirect"; $server_ip = $call_server_ip;} if ($channel_liveY==1) {$ACTION="Redirect"; $channel=$extrachannel;} - + if (ereg("SECOND|FIRST|DEBUG",$filename)) {$DBout .= "Changed to Redirect: $channel on $server_ip";} } + + if (ereg("SECOND|FIRST|DEBUG",$filename)) + { + if ($WeBRooTWritablE > 0) + { + $fp = fopen ("./vicidial_debug.txt", "a"); + fwrite ($fp, "$NOW_TIME|RDCXC|$filename|$user|$campaign|$DBout|\n"); + fclose($fp); + } + } + } } @@ -688,6 +742,15 @@ if ($ACTION=="RedirectXtra") echo "ext_context $ext_context must be set\n"; echo "ext_priority $ext_priority must be set\n"; echo "\nRedirect Action not sent\n"; + if (ereg("SECOND|FIRST|DEBUG",$filename)) + { + if ($WeBRooTWritablE > 0) + { + $fp = fopen ("./vicidial_debug.txt", "a"); + fwrite ($fp, "$NOW_TIME|RDX|$filename|$user|$campaign|$$channel|$extrachannel|$queryCID|$exten|$ext_context|ext_priority|\n"); + fclose($fp); + } + } } else { @@ -708,6 +771,7 @@ if ($ACTION=="RedirectXtra") { $channel_liveX=0; echo "Cannot find empty conference on $server_ip, Redirect command not inserted\n"; + if (ereg("SECOND|FIRST|DEBUG",$filename)) {$DBout .= "Cannot find empty conference on $server_ip";} } } @@ -717,7 +781,7 @@ if ($ACTION=="RedirectXtra") if ($format=='debug') {echo "\n";} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); - if ($row[0]==0) + if ( ($row[0]==0) && (!ereg("SECOND",$filename)) ) { $stmt="SELECT count(*) FROM live_sip_channels where server_ip = '$call_server_ip' and channel='$channel';"; if ($format=='debug') {echo "\n";} @@ -727,13 +791,14 @@ if ($ACTION=="RedirectXtra") { $channel_liveX=0; echo "Channel $channel is not live on $call_server_ip, Redirect command not inserted\n"; + if (ereg("SECOND|FIRST|DEBUG",$filename)) {$DBout .= "$channel is not live on $call_server_ip";} } } $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) + if ( ($row[0]==0) && (!ereg("SECOND",$filename)) ) { $stmt="SELECT count(*) FROM live_sip_channels where server_ip = '$server_ip' and channel='$extrachannel';"; if ($format=='debug') {echo "\n";} @@ -743,6 +808,7 @@ if ($ACTION=="RedirectXtra") { $channel_liveY=0; echo "Channel $channel is not live on $server_ip, Redirect command not inserted\n"; + if (ereg("SECOND|FIRST|DEBUG",$filename)) {$DBout .= "$channel is not live on $server_ip";} } } if ( ($channel_liveX==1) && ($channel_liveY==1) ) @@ -754,6 +820,7 @@ if ($ACTION=="RedirectXtra") $rslt=mysql_query($stmt, $link); echo "RedirectXtra command sent for Channel $channel and \nExtraChannel $extrachannel\n to $exten on $server_ip\n"; + if (ereg("SECOND|FIRST|DEBUG",$filename)) {$DBout .= "$channel and $extrachannel to $exten on $server_ip";} } else { @@ -778,6 +845,7 @@ if ($ACTION=="RedirectXtra") $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"; + if (ereg("SECOND|FIRST|DEBUG",$filename)) {$DBout .= "$channel/$call_server_ip and $extrachannel/$server_ip to $exten";} } } else @@ -788,6 +856,17 @@ if ($ACTION=="RedirectXtra") {$ACTION="Redirect"; $channel=$extrachannel;} } + + if (ereg("SECOND|FIRST|DEBUG",$filename)) + { + if ($WeBRooTWritablE > 0) + { + $fp = fopen ("./vicidial_debug.txt", "a"); + fwrite ($fp, "$NOW_TIME|RDX|$filename|$user|$campaign|$DBout|\n"); + fclose($fp); + } + } + } } } @@ -1018,8 +1097,10 @@ if ($ACTION=="VolumeControl") else { $participant_number='XXYYXXYYXXYYXX'; + if (eregi('UP',$stage)) {$vol_prefix='4';} if (eregi('DOWN',$stage)) {$vol_prefix='3';} - else {$vol_prefix='4';} + if (eregi('UNMUTE',$stage)) {$vol_prefix='2';} + if (eregi('MUTING',$stage)) {$vol_prefix='1';} $local_DEF = 'Local/'; $local_AMP = '@'; $volume_local_channel = "$local_DEF$participant_number$vol_prefix$exten$local_AMP$ext_context"; diff --git a/agc_2-X/trunk/LANG_www/agc_en/vdc_db_query.php b/agc_2-X/trunk/LANG_www/agc_en/vdc_db_query.php index 061ed61c..801dff0d 100644 --- a/agc_2-X/trunk/LANG_www/agc_en/vdc_db_query.php +++ b/agc_2-X/trunk/LANG_www/agc_en/vdc_db_query.php @@ -1,7 +1,7 @@ LICENSE: GPLv2 +# Copyright (C) 2007 Matt Florell 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 @@ -13,7 +13,7 @@ # - $pass # optional variables: # - $format - ('text','debug') -# - $ACTION - ('regCLOSER','manDiaLnextCALL','manDiaLskip','manDiaLonly','manDiaLlookCALL','manDiaLlogCALL','userLOGout','updateDISPO','VDADpause','VDADready','VDADcheckINCOMING','UpdatEFavoritEs','CalLBacKLisT','CalLBacKCounT') +# - $ACTION - ('regCLOSER','manDiaLnextCALL','manDiaLskip','manDiaLonly','manDiaLlookCALL','manDiaLlogCALL','userLOGout','updateDISPO','VDADpause','VDADready','VDADcheckINCOMING','UpdatEFavoritEs','CalLBacKLisT','CalLBacKCounT','PauseCodeSubmit') # - $stage - ('start','finish','lookup','new') # - $closer_choice - ('CL_TESTCAMP_L CL_OUT123_L -') # - $conf_exten - ('8600011',...) @@ -70,7 +70,7 @@ # - $omit_phone_code - ('Y','N') # - $no_delete_sessions - ('0','1') -# changes +# CHANGELOG: # 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 @@ -101,7 +101,7 @@ # - 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 +# 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 @@ -110,10 +110,28 @@ # 60821-1647 - Added ability to not delete sessions at logout # 60906-1124 - Added lookup and sending of callback data for CALLBK calls # 61128-2229 - Added vicidial_live_agents and vicidial_auto_calls manual dial entries +# 70111-1600 - Added ability to use BLEND/INBND/*_C/*_B/*_I as closer campaigns +# 70115-1733 - Added alt_dial functionality in auto-dial modes +# 70118-1501 - Added user_group to vicidial_log,_agent_log,_closer_log,_callbacks +# 70123-1357 - Fixed bug that would not update vicidial_closer_log status to dispo +# 70202-1438 - Added pause code submit function +# 70203-0930 - Added dialed_number to lead info output +# 70203-1030 - Added dialed_label to lead info output +# 70206-1126 - Added INBOUND status for inbound/closer calls in vicidial_live_agents +# 70212-1253 - Fixed small issue with CXFER +# 70213-1431 - Added QueueMetrics PAUSE/UNPAUSE/AGENTLOGIN/AGENTLOGOFF actions +# 70214-1231 - Added queuemetrics_log_id field for server_id in queue_log +# 70215-1210 - Added queuemetrics COMPLETEAGENT action +# 70216-1051 - Fixed double call complete queuemetrics logging +# 70222-1616 - Changed queue_log PAUSE/UNPAUSE to PAUSEALL/UNPAUSEALL +# 70309-1034 - Allow amphersands and questions marks in comments to pass through +# 70313-1052 - Allow pound signs(hash) in comments to pass through +# 70319-1544 - Added agent disable update customer data function +# 70322-1545 - Added sipsak display ability # -$version = '2.0.38'; -$build = '61128-2229'; +$version = '2.0.55'; +$build = '70322-1545'; require("dbconnect.php"); @@ -240,6 +258,10 @@ if (isset($_GET["use_internal_dnc"])) {$use_internal_dnc=$_GET["use_internal_d elseif (isset($_POST["use_internal_dnc"])) {$use_internal_dnc=$_POST["use_internal_dnc"];} if (isset($_GET["omit_phone_code"])) {$omit_phone_code=$_GET["omit_phone_code"];} elseif (isset($_POST["omit_phone_code"])) {$omit_phone_code=$_POST["omit_phone_code"];} +if (isset($_GET["phone_ip"])) {$phone_ip=$_GET["phone_ip"];} + elseif (isset($_POST["phone_ip"])) {$phone_ip=$_POST["phone_ip"];} +if (isset($_GET["enable_sipsak_messages"])) {$enable_sipsak_messages=$_GET["enable_sipsak_messages"];} + elseif (isset($_POST["enable_sipsak_messages"])) {$enable_sipsak_messages=$_POST["enable_sipsak_messages"];} $user=ereg_replace("[^0-9a-zA-Z]","",$user); @@ -261,6 +283,7 @@ $CIDdate = date("mdHis"); $ENTRYdate = date("YmdHis"); if (!isset($query_date)) {$query_date = $NOW_DATE;} $MT[0]=''; +$agents='@agents'; $stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;"; if ($DB) {echo "|$stmt|\n";} @@ -375,7 +398,7 @@ if ($ACTION == 'manDiaLnextCaLL') 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) ) + if ( (strlen($callback_id)>0) and (strlen($lead_id)>0) ) { $affected_rows=1; $CBleadIDset=1; @@ -421,7 +444,7 @@ if ($ACTION == 'manDiaLnextCaLL') if ($DB) {echo "$stmt\n";} $rslt=mysql_query($stmt, $link); $affected_rows = mysql_affected_rows($link); - $lead_id = mysql_insert_id(); + $lead_id = mysql_insert_id($link); $CBleadIDset=1; } } @@ -432,7 +455,7 @@ if ($ACTION == 'manDiaLnextCaLL') if ($DB) {echo "$stmt\n";} $rslt=mysql_query($stmt, $link); $affected_rows = mysql_affected_rows($link); - $lead_id = mysql_insert_id(); + $lead_id = mysql_insert_id($link); $CBleadIDset=1; } } @@ -535,7 +558,7 @@ if ($ACTION == 'manDiaLnextCaLL') $rslt=mysql_query($stmt, $link); } - $stmt="UPDATE vicidial_agent_log set lead_id='$lead_id' where agent_log_id='$agent_log_id';"; + $stmt="UPDATE vicidial_agent_log set lead_id='$lead_id',comments='MANUAL' where agent_log_id='$agent_log_id';"; if ($format=='debug') {echo "\n";} $rslt=mysql_query($stmt, $link); @@ -579,7 +602,7 @@ if ($ACTION == 'manDiaLnextCaLL') $rslt=mysql_query($stmt, $link); ### update the agent status to INCALL in vicidial_live_agents - $stmt = "UPDATE vicidial_live_agents set status='INCALL',last_call_time='$NOW_TIME',callerid='$MqueryCID',lead_id='$lead_id' where user='$user' and server_ip='$server_ip';"; + $stmt = "UPDATE vicidial_live_agents set status='INCALL',last_call_time='$NOW_TIME',callerid='$MqueryCID',lead_id='$lead_id',comments='MANUAL' where user='$user' and server_ip='$server_ip';"; if ($DB) {echo "$stmt\n";} $rslt=mysql_query($stmt, $link); } @@ -619,6 +642,8 @@ if ($ACTION == 'manDiaLnextCaLL') $LeaD_InfO .= $CBcallback_time . "\n"; $LeaD_InfO .= $CBuser . "\n"; $LeaD_InfO .= $CBcomments . "\n"; + $LeaD_InfO .= $phone_number . "\n"; + $LeaD_InfO .= "MAIN\n"; echo $LeaD_InfO; @@ -716,7 +741,7 @@ if ($ACTION == 'manDiaLonly') $rslt=mysql_query($stmt, $link); ### update the agent status to INCALL in vicidial_live_agents - $stmt = "UPDATE vicidial_live_agents set status='INCALL',last_call_time='$NOW_TIME',callerid='$MqueryCID',lead_id='$lead_id' where user='$user' and server_ip='$server_ip';"; + $stmt = "UPDATE vicidial_live_agents set status='INCALL',last_call_time='$NOW_TIME',callerid='$MqueryCID',lead_id='$lead_id',comments='MANUAL' where user='$user' and server_ip='$server_ip';"; if ($DB) {echo "$stmt\n";} $rslt=mysql_query($stmt, $link); @@ -795,8 +820,18 @@ if ($stage == "start") } else { + $user_group=''; + $stmt="SELECT user_group FROM vicidial_users where user='$user' LIMIT 1;"; + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $ug_record_ct = mysql_num_rows($rslt); + if ($ug_record_ct > 0) + { + $row=mysql_fetch_row($rslt); + $user_group = trim("$row[0]"); + } ##### 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');"; + $stmt="INSERT INTO vicidial_log (uniqueid,lead_id,list_id,campaign_id,call_date,start_epoch,status,phone_code,phone_number,user,comments,processed,user_group) values('$uniqueid','$lead_id','$list_id','$campaign','$NOW_TIME','$StarTtime','INCALL','$phone_code','$phone_number','$user','MANUAL','N','$user_group');"; if ($DB) {echo "$stmt\n";} $rslt=mysql_query($stmt, $link); $affected_rows = mysql_affected_rows($link); @@ -844,10 +879,10 @@ if ($stage == "end") { if ($start_epoch < 1000) { - if (eregi("CLOSER",$campaign)) + if (eregi("(CLOSER|BLEND|INBND|_C$|_B$|_I$)",$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';"; + $stmt="SELECT start_epoch FROM vicidial_closer_log where phone_number='$phone_number' and lead_id='$lead_id' and user='$user' order by closecallid desc limit 1;"; } else { @@ -870,32 +905,249 @@ if ($stage == "end") } else {$length_in_sec = ($StarTtime - $start_epoch);} - if (eregi("CLOSER",$campaign)) + if (eregi("(CLOSER|BLEND|INBND|_C$|_B$|_I$)",$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); } + + ############################################# + ##### START QUEUEMETRICS LOGGING LOOKUP ##### + $stmt = "SELECT enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_log_id FROM system_settings;"; + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $qm_conf_ct = mysql_num_rows($rslt); + $i=0; + while ($i < $qm_conf_ct) + { + $row=mysql_fetch_row($rslt); + $enable_queuemetrics_logging = $row[0]; + $queuemetrics_server_ip = $row[1]; + $queuemetrics_dbname = $row[2]; + $queuemetrics_login = $row[3]; + $queuemetrics_pass = $row[4]; + $queuemetrics_log_id = $row[5]; + $i++; + } + ##### END QUEUEMETRICS LOGGING LOOKUP ##### + ########################################### + if ($auto_dial_level > 0) { + ### check to see if campaign has alt_dial enabled + $stmt="SELECT auto_alt_dial FROM vicidial_campaigns where campaign_id='$campaign';"; + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $VAC_mancall_ct = mysql_num_rows($rslt); + if ($VAC_mancall_ct > 0) + { + $row=mysql_fetch_row($rslt); + $auto_alt_dial =$row[0]; + } + else {$auto_alt_dial = 'NONE';} + if (eregi("(ALT_ONLY|ADDR3_ONLY|ALT_AND_ADDR3)",$auto_alt_dial)) + { + ### check to see if lead should be alt_dialed + $stmt="SELECT alt_dial FROM vicidial_auto_calls where lead_id='$lead_id';"; + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $VAC_mancall_ct = mysql_num_rows($rslt); + if ($VAC_mancall_ct > 0) + { + $row=mysql_fetch_row($rslt); + $alt_dial =$row[0]; + } + else {$alt_dial = 'NONE';} + + if ( (eregi("(NONE|MAIN)",$alt_dial)) and (eregi("(ALT_ONLY|ALT_AND_ADDR3)",$auto_alt_dial)) ) + { + $stmt="SELECT alt_phone,gmt_offset_now,state FROM vicidial_list where lead_id='$lead_id';"; + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $VAC_mancall_ct = mysql_num_rows($rslt); + if ($VAC_mancall_ct > 0) + { + $row=mysql_fetch_row($rslt); + $alt_phone = $row[0]; + $alt_phone = eregi_replace("[^0-9]","",$alt_phone); + $gmt_offset_now = $row[1]; + $state = $row[2]; + } + else {$alt_phone = '';} + if (strlen($alt_phone)>5) + { + ### insert record into vicidial_hopper for address3 call attempt + $stmt = "INSERT INTO vicidial_hopper SET lead_id='$lead_id',campaign_id='$campaign',status='HOLD',list_id='$list_id',gmt_offset_now='$gmt_offset_now',state='$state',alt_dial='ALT',user='';"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + } + } + if ( ( (eregi("(ALT)",$alt_dial)) and (eregi("ALT_AND_ADDR3",$auto_alt_dial)) ) or ( (eregi("(NONE|MAIN)",$alt_dial)) and (eregi("ADDR3_ONLY",$auto_alt_dial)) ) ) + { + $stmt="SELECT address3,gmt_offset_now,state FROM vicidial_list where lead_id='$lead_id';"; + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $VAC_mancall_ct = mysql_num_rows($rslt); + if ($VAC_mancall_ct > 0) + { + $row=mysql_fetch_row($rslt); + $address3 = $row[0]; + $address3 = eregi_replace("[^0-9]","",$address3); + $gmt_offset_now = $row[1]; + $state = $row[2]; + } + else {$address3 = '';} + if (strlen($address3)>5) + { + ### insert record into vicidial_hopper for address3 call attempt + $stmt = "INSERT INTO vicidial_hopper SET lead_id='$lead_id',campaign_id='$campaign',status='HOLD',list_id='$list_id',gmt_offset_now='$gmt_offset_now',state='$state',alt_dial='ADDR3',user='';"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + } + } + } + + if ($enable_queuemetrics_logging > 0) + { + ### check to see if lead should be alt_dialed + $stmt="SELECT auto_call_id,lead_id,phone_number,status,campaign_id,phone_code,alt_dial,stage,callerid,uniqueid from vicidial_auto_calls where lead_id='$lead_id';"; + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $VAC_qm_ct = mysql_num_rows($rslt); + if ($VAC_qm_ct > 0) + { + $row=mysql_fetch_row($rslt); + $auto_call_id = $row[0]; + $CLlead_id = $row[1]; + $CLphone_number = $row[2]; + $CLstatus = $row[3]; + $CLcampaign_id = $row[4]; + $CLphone_code = $row[5]; + $CLalt_dial = $row[6]; + $CLstage = $row[7]; + $CLcallerid = $row[8]; + $CLuniqueid = $row[9]; + } + + $CLstage = preg_replace("/.*-/",'',$CLstage); + if (strlen($CLstage) < 1) {$CLstage=0;} + + $linkB=mysql_connect("$queuemetrics_server_ip", "$queuemetrics_login", "$queuemetrics_pass"); + mysql_select_db("$queuemetrics_dbname", $linkB); + + $stmt="SELECT count(*) from queue_log where call_id='$MDnextCID' and verb='COMPLETECALLER';"; + $rslt=mysql_query($stmt, $linkB); + if ($DB) {echo "$stmt\n";} + $VAC_cc_ct = mysql_num_rows($rslt); + if ($VAC_cc_ct > 0) + { + $row=mysql_fetch_row($rslt); + $caller_complete = $row[0]; + } + + if ($caller_complete < 1) + { + $stmt = "INSERT INTO queue_log SET partition='P01',time_id='$StarTtime',call_id='$MDnextCID',queue='$campaign',agent='Agent/$user',verb='COMPLETEAGENT',data1='$CLstage',data2='$length_in_sec',data3='1',serverid='$queuemetrics_log_id';"; + if ($DB) {echo "$stmt\n";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $linkB); + $affected_rows = mysql_affected_rows($linkB); + } + mysql_close($linkB); + } + ### delete call record from vicidial_auto_calls - $stmt = "DELETE from vicidial_auto_calls where uniqueid='$uniqueid';"; + $stmt = "DELETE from vicidial_auto_calls where lead_id='$lead_id';"; 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';"; + + $stmt = "UPDATE vicidial_live_agents set status='PAUSED',lead_id='',uniqueid=0,callerid='',channel='',call_server_ip='',last_call_finish='$NOW_TIME',comments='' where user='$user' and server_ip='$server_ip';"; if ($DB) {echo "$stmt\n";} $rslt=mysql_query($stmt, $link); + $affected_rows = mysql_affected_rows($link); + if ($affected_rows > 0) + { + if ($enable_queuemetrics_logging > 0) + { + $linkB=mysql_connect("$queuemetrics_server_ip", "$queuemetrics_login", "$queuemetrics_pass"); + mysql_select_db("$queuemetrics_dbname", $linkB); + + $stmt = "INSERT INTO queue_log SET partition='P01',time_id='$StarTtime',call_id='NONE',queue='NONE',agent='Agent/$user',verb='PAUSEALL',serverid='$queuemetrics_log_id';"; + if ($DB) {echo "$stmt\n";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $linkB); + $affected_rows = mysql_affected_rows($linkB); + + mysql_close($linkB); + } + } } else { + if ($enable_queuemetrics_logging > 0) + { + ### check to see if lead should be alt_dialed + $stmt="SELECT auto_call_id,lead_id,phone_number,status,campaign_id,phone_code,alt_dial,stage,callerid,uniqueid from vicidial_auto_calls where lead_id='$lead_id';"; + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $VAC_qm_ct = mysql_num_rows($rslt); + if ($VAC_qm_ct > 0) + { + $row=mysql_fetch_row($rslt); + $auto_call_id = $row[0]; + $CLlead_id = $row[1]; + $CLphone_number = $row[2]; + $CLstatus = $row[3]; + $CLcampaign_id = $row[4]; + $CLphone_code = $row[5]; + $CLalt_dial = $row[6]; + $CLstage = $row[7]; + $CLcallerid = $row[8]; + $CLuniqueid = $row[9]; + } + + $CLstage = preg_replace("/XFER|-/",'',$CLstage); + if ($CLstage < 0.25) {$CLstage=0;} + + $linkB=mysql_connect("$queuemetrics_server_ip", "$queuemetrics_login", "$queuemetrics_pass"); + mysql_select_db("$queuemetrics_dbname", $linkB); + + $stmt = "INSERT INTO queue_log SET partition='P01',time_id='$StarTtime',call_id='$MDnextCID',queue='$campaign',agent='Agent/$user',verb='COMPLETEAGENT',data1='$CLstage',data2='$length_in_sec',data3='1',serverid='$queuemetrics_log_id';"; + if ($DB) {echo "$stmt\n";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $linkB); + $affected_rows = mysql_affected_rows($linkB); + + mysql_close($linkB); + } + $stmt = "DELETE from vicidial_auto_calls lead_id='$lead_id';"; 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';"; + $stmt = "UPDATE vicidial_live_agents set status='PAUSED',lead_id='',uniqueid=0,callerid='',channel='',call_server_ip='',last_call_finish='$NOW_TIME',comments='' where user='$user' and server_ip='$server_ip';"; if ($DB) {echo "$stmt\n";} $rslt=mysql_query($stmt, $link); + $affected_rows = mysql_affected_rows($link); + if ($affected_rows > 0) + { + if ($enable_queuemetrics_logging > 0) + { + $linkB=mysql_connect("$queuemetrics_server_ip", "$queuemetrics_login", "$queuemetrics_pass"); + mysql_select_db("$queuemetrics_dbname", $linkB); + + $stmt = "INSERT INTO queue_log SET partition='P01',time_id='$StarTtime',call_id='NONE',queue='NONE',agent='Agent/$user',verb='PAUSEALL',serverid='$queuemetrics_log_id';"; + if ($DB) {echo "$stmt\n";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $linkB); + $affected_rows = mysql_affected_rows($linkB); + + mysql_close($linkB); + } + } } ##### look for the channel in the UPDATED vicidial_manager record of the call initiation @@ -1095,7 +1347,7 @@ if ($ACTION == 'VDADcheckINCOMING') 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';"; + $stmt = "UPDATE vicidial_live_agents set status='INCALL',last_call_time='$NOW_TIME',comments='AUTO' where user='$user' and server_ip='$server_ip';"; if ($DB) {echo "$stmt\n";} $rslt=mysql_query($stmt, $link); @@ -1163,25 +1415,37 @@ if ($ACTION == 'VDADcheckINCOMING') $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';"; + $user_group=''; + $stmt="SELECT user_group FROM vicidial_users where user='$user' LIMIT 1;"; + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $ug_record_ct = mysql_num_rows($rslt); + if ($ug_record_ct > 0) + { + $row=mysql_fetch_row($rslt); + $user_group = trim("$row[0]"); + } + $stmt = "UPDATE vicidial_log set user='$user', comments='AUTO', list_id='$list_id', status='INCALL', user_group='$user_group' where lead_id='$lead_id' and uniqueid='$uniqueid';"; if ($DB) {echo "$stmt\n";} $rslt=mysql_query($stmt, $link); - if (eregi("CLOSER",$campaign)) + if (eregi("(CLOSER|BLEND|INBND|_C$|_B$|_I$)",$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;"; + $stmt = "UPDATE vicidial_closer_log set user='$user', comments='AUTO', list_id='$list_id', status='INCALL', user_group='$user_group' 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;"; + $stmt = "select campaign_id,phone_number,alt_dial 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) + if ($VDAC_cid_ct > 0) { $row=mysql_fetch_row($rslt); $VDADchannel_group =$row[0]; + $dialed_number =$row[1]; + $dialed_label =$row[2]; } $stmt = "select count(*) from vicidial_log where lead_id='$lead_id' and uniqueid='$uniqueid';"; @@ -1211,6 +1475,11 @@ if ($ACTION == 'VDADcheckINCOMING') $VDCL_xferconf_a_number = $row[11]; $VDCL_xferconf_b_dtmf = $row[12]; $VDCL_xferconf_b_number = $row[13]; + + ### update the comments in vicidial_live_agents record + $stmt = "UPDATE vicidial_live_agents set comments='INBOUND' where user='$user' and server_ip='$server_ip';"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); } else { @@ -1263,6 +1532,17 @@ if ($ACTION == 'VDADcheckINCOMING') $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"; + + $stmt = "select phone_number,alt_dial 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 ($VDAC_cid_ct > 0) + { + $row=mysql_fetch_row($rslt); + $dialed_number =$row[0]; + $dialed_label =$row[1]; + } } $comments = eregi_replace("\r",'',$comments); @@ -1300,6 +1580,8 @@ if ($ACTION == 'VDADcheckINCOMING') $LeaD_InfO .= $CBcallback_time . "\n"; $LeaD_InfO .= $CBuser . "\n"; $LeaD_InfO .= $CBcomments . "\n"; + $LeaD_InfO .= $dialed_number . "\n"; + $LeaD_InfO .= $dialed_label . "\n"; echo $LeaD_InfO; @@ -1327,6 +1609,7 @@ if ($ACTION == 'VDADcheckINCOMING') if ($format=='debug') {echo "\n";} $rslt=mysql_query($stmt, $link); } + } else { @@ -1354,8 +1637,18 @@ if ( (strlen($campaign)<1) || (strlen($conf_exten)<1) ) } else { + $user_group=''; + $stmt="SELECT user_group FROM vicidial_users where user='$user' LIMIT 1;"; + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $ug_record_ct = mysql_num_rows($rslt); + if ($ug_record_ct > 0) + { + $row=mysql_fetch_row($rslt); + $user_group = trim("$row[0]"); + } ##### Insert a LOGOUT record into the user log - $stmt="INSERT INTO vicidial_user_log values('','$user','LOGOUT','$campaign','$NOW_TIME','$StarTtime');"; + $stmt="INSERT INTO vicidial_user_log (user,event,campaign_id,event_date,event_epoch,user_group) values('$user','LOGOUT','$campaign','$NOW_TIME','$StarTtime','$user_group');"; if ($DB) {echo "$stmt\n";} $rslt=mysql_query($stmt, $link); $vul_insert = mysql_affected_rows($link); @@ -1390,11 +1683,94 @@ else $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','','','','','','','','','');"; + $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Hangup','ULGH3459$StarTtime','Channel: $agent_channel','','','','','','','','','');"; if ($format=='debug') {echo "\n";} $rslt=mysql_query($stmt, $link); } + $pause_sec=0; + $stmt = "select pause_epoch,pause_sec,wait_epoch,talk_epoch,dispo_epoch 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) and (strlen($row[3]<5)) and (strlen($row[4]<5)) ) + { + $row=mysql_fetch_row($rslt); + $pause_sec = (($StarTtime - $row[0]) + $row[1]); + + $stmt="UPDATE vicidial_agent_log set pause_sec='$pause_sec',wait_epoch='$StarTtime' where agent_log_id='$agent_log_id';"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + } + + if ($vla_delete > 0) + { + ############################################# + ##### START QUEUEMETRICS LOGGING LOOKUP ##### + $stmt = "SELECT enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_log_id,allow_sipsak_messages FROM system_settings;"; + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $qm_conf_ct = mysql_num_rows($rslt); + $i=0; + while ($i < $qm_conf_ct) + { + $row=mysql_fetch_row($rslt); + $enable_queuemetrics_logging = $row[0]; + $queuemetrics_server_ip = $row[1]; + $queuemetrics_dbname = $row[2]; + $queuemetrics_login = $row[3]; + $queuemetrics_pass = $row[4]; + $queuemetrics_log_id = $row[5]; + $allow_sipsak_messages = $row[6]; + $i++; + } + ##### END QUEUEMETRICS LOGGING LOOKUP ##### + ########################################### + if ( ($enable_sipsak_messages > 0) and ($allow_sipsak_messages > 0) and (eregi("SIP",$protocol)) ) + { + $SIPSAK_message = 'LOGGED OUT'; + passthru("/usr/local/bin/sipsak -M -O desktop -B \"$SIPSAK_message\" -r 5060 -s sip:$extension@$phone_ip > /dev/null"); + } + + if ($enable_queuemetrics_logging > 0) + { + $linkB=mysql_connect("$queuemetrics_server_ip", "$queuemetrics_login", "$queuemetrics_pass"); + mysql_select_db("$queuemetrics_dbname", $linkB); + + # $stmt = "INSERT INTO queue_log SET partition='P01',time_id='$StarTtime',call_id='NONE',queue='$campaign',agent='Agent/$user',verb='PAUSE',serverid='1';"; + # if ($DB) {echo "$stmt\n";} + # if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + # $rslt=mysql_query($stmt, $linkB); + # $affected_rows = mysql_affected_rows($linkB); + + $stmt = "SELECT time_id FROM queue_log where agent='Agent/$user' and verb='AGENTLOGIN' order by time_id desc limit 1;"; + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $linkB); + if ($DB) {echo "$stmt\n";} + echo "$stmt\n"; + $li_conf_ct = mysql_num_rows($rslt); + $i=0; + while ($i < $li_conf_ct) + { + $row=mysql_fetch_row($rslt); + $logintime = $row[0]; + $i++; + } + + $time_logged_in = ($StarTtime - $logintime); + if ($time_logged_in > 1000000) {$time_logged_in=1;} + + $stmt = "INSERT INTO queue_log SET partition='P01',time_id='$StarTtime',call_id='NONE',queue='$campaign',agent='Agent/$user',verb='AGENTLOGOFF',data1='$user$agents',data2='$time_logged_in',serverid='$queuemetrics_log_id';"; + if ($DB) {echo "$stmt\n";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $linkB); + $affected_rows = mysql_affected_rows($linkB); + + mysql_close($linkB); + } + } + echo "$vul_insert|$vc_remove|$vla_delete|$wcs_delete|$agent_channel\n"; } } @@ -1423,7 +1799,14 @@ if ($ACTION == 'updateDISPO') if ($format=='debug') {echo "\n";} $rslt=mysql_query($stmt, $link); - if ( ($use_internal_dnc=='Y') and ($dispo_choice=='DNC') ) + if (eregi("(CLOSER|BLEND|INBND|_C$|_B$|_I$)",$campaign)) + { + $stmt = "UPDATE vicidial_closer_log set status='$dispo_choice' where lead_id='$lead_id' and user='$user' order by closecallid desc limit 1;"; + if ($DB) {echo "$stmt\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";} @@ -1450,20 +1833,91 @@ if ($ACTION == 'updateDISPO') 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');"; + $user_group=''; + $stmt="SELECT user_group FROM vicidial_users where user='$user' LIMIT 1;"; + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $ug_record_ct = mysql_num_rows($rslt); + if ($ug_record_ct > 0) + { + $row=mysql_fetch_row($rslt); + $user_group = trim("$row[0]"); + } + + $stmt="INSERT INTO vicidial_agent_log (user,server_ip,event_time,campaign_id,pause_epoch,pause_sec,wait_epoch,user_group) values('$user','$server_ip','$NOW_TIME','$campaign','$StarTtime','0','$StarTtime','$user_group');"; if ($DB) {echo "$stmt\n";} $rslt=mysql_query($stmt, $link); $affected_rows = mysql_affected_rows($link); - $agent_log_id = mysql_insert_id(); + $agent_log_id = mysql_insert_id($link); ### 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');"; + $stmt="INSERT INTO vicidial_callbacks (lead_id,list_id,campaign_id,status,entry_time,callback_time,user,recipient,comments,user_group) values('$lead_id','$list_id','$campaign','ACTIVE','$NOW_TIME','$CallBackDatETimE','$user','$recipient','$comments','$user_group');"; if ($DB) {echo "$stmt\n";} $rslt=mysql_query($stmt, $link); } + $stmt="SELECT auto_alt_dial_statuses from vicidial_campaigns where campaign_id='$campaign';"; + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + + if ( ($auto_dial_level > 0) and (ereg(" $dispo_choice ",$row[0])) ) + { + $stmt = "select count(*) from vicidial_hopper where lead_id='$lead_id' and status='HOLD';"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + + if ($row[0] > 0) + { + $stmt="UPDATE vicidial_hopper set status='READY' where lead_id='$lead_id' and status='HOLD' limit 1;"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + } + } + else + { + $stmt="DELETE from vicidial_hopper where lead_id='$lead_id' and status='HOLD';"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + } + + ############################################# + ##### START QUEUEMETRICS LOGGING LOOKUP ##### + $stmt = "SELECT enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_log_id FROM system_settings;"; + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $qm_conf_ct = mysql_num_rows($rslt); + $i=0; + while ($i < $qm_conf_ct) + { + $row=mysql_fetch_row($rslt); + $enable_queuemetrics_logging = $row[0]; + $queuemetrics_server_ip = $row[1]; + $queuemetrics_dbname = $row[2]; + $queuemetrics_login = $row[3]; + $queuemetrics_pass = $row[4]; + $queuemetrics_log_id = $row[5]; + $i++; + } + ##### END QUEUEMETRICS LOGGING LOOKUP ##### + ########################################### + if ($enable_queuemetrics_logging > 0) + { + $linkB=mysql_connect("$queuemetrics_server_ip", "$queuemetrics_login", "$queuemetrics_pass"); + mysql_select_db("$queuemetrics_dbname", $linkB); + + $stmt = "INSERT INTO queue_log SET partition='P01',time_id='$StarTtime',call_id='$MDnextCID',queue='$campaign',agent='Agent/$user',verb='CALLSTATUS',data1='$dispo_choice',serverid='$queuemetrics_log_id';"; + if ($DB) {echo "$stmt\n";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $linkB); + $affected_rows = mysql_affected_rows($linkB); + + mysql_close($linkB); + } + echo 'Lead ' . $lead_id . ' has been changed to ' . $dispo_choice . " Status\nNext agent_log_id:\n" . $agent_log_id . "\n"; } @@ -1475,6 +1929,8 @@ if ($ACTION == 'updateLEAD') { $MT[0]=''; $row=''; $rowx=''; + $DO_NOT_UPDATE=0; + $DO_NOT_UPDATE_text=''; if ( (strlen($phone_number)<1) || (strlen($lead_id)<1) ) { echo "phone_number $phone_number or lead_id $lead_id is not valid\n"; @@ -1482,12 +1938,54 @@ if ($ACTION == 'updateLEAD') } 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";} + $stmt = "SELECT disable_alter_custdata FROM vicidial_campaigns where campaign_id='$campaign'"; + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $dac_conf_ct = mysql_num_rows($rslt); + $i=0; + while ($i < $dac_conf_ct) + { + $row=mysql_fetch_row($rslt); + $disable_alter_custdata = $row[0]; + $i++; + } + if (ereg('Y',$disable_alter_custdata)) + { + $DO_NOT_UPDATE=1; + $DO_NOT_UPDATE_text=' NOT'; + $stmt = "SELECT alter_custdata_override FROM vicidial_users where user='$user'"; + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $aco_conf_ct = mysql_num_rows($rslt); + $i=0; + while ($i < $aco_conf_ct) + { + $row=mysql_fetch_row($rslt); + $alter_custdata_override = $row[0]; + $i++; + } + if (ereg('ALLOW_ALTER',$alter_custdata_override)) + { + $DO_NOT_UPDATE=0; + $DO_NOT_UPDATE_text=''; + } + } + + if ($DO_NOT_UPDATE < 1) + { + $comments = eregi_replace("\r",'',$comments); + $comments = eregi_replace("\n",'!N',$comments); + $comments = eregi_replace("--AMP--",'&',$comments); + $comments = eregi_replace("--QUES--",'?',$comments); + $comments = eregi_replace("--POUND--",'#',$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';"; @@ -1495,7 +1993,7 @@ if ($ACTION == 'updateLEAD') $rslt=mysql_query($stmt, $link); } - echo "Lead $lead_id information has been updated\n"; + echo "Lead $lead_id information has$DO_NOT_UPDATE_text been updated\n"; } @@ -1515,10 +2013,54 @@ if ( ($ACTION == 'VDADpause') || ($ACTION == 'VDADready') ) 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';"; + $stmt="UPDATE vicidial_live_agents set lead_id='',uniqueid=0,callerid='',channel='', random_id='$random',comments='' where user='$user' and server_ip='$server_ip';"; if ($format=='debug') {echo "\n";} $rslt=mysql_query($stmt, $link); + $stmt="UPDATE vicidial_live_agents set status='$stage' where user='$user' and server_ip='$server_ip';"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + $affected_rows = mysql_affected_rows($link); + if ($affected_rows > 0) + { + ############################################# + ##### START QUEUEMETRICS LOGGING LOOKUP ##### + $stmt = "SELECT enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_log_id FROM system_settings;"; + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $qm_conf_ct = mysql_num_rows($rslt); + $i=0; + while ($i < $qm_conf_ct) + { + $row=mysql_fetch_row($rslt); + $enable_queuemetrics_logging = $row[0]; + $queuemetrics_server_ip = $row[1]; + $queuemetrics_dbname = $row[2]; + $queuemetrics_login = $row[3]; + $queuemetrics_pass = $row[4]; + $queuemetrics_log_id = $row[5]; + $i++; + } + ##### END QUEUEMETRICS LOGGING LOOKUP ##### + ########################################### + if ($enable_queuemetrics_logging > 0) + { + if (ereg('READY',$stage)) {$QMstatus='UNPAUSEALL';} + if (ereg('PAUSE',$stage)) {$QMstatus='PAUSEALL';} + $linkB=mysql_connect("$queuemetrics_server_ip", "$queuemetrics_login", "$queuemetrics_pass"); + mysql_select_db("$queuemetrics_dbname", $linkB); + + $stmt = "INSERT INTO queue_log SET partition='P01',time_id='$StarTtime',call_id='NONE',queue='NONE',agent='Agent/$user',verb='$QMstatus',serverid='$queuemetrics_log_id';"; + if ($DB) {echo "$stmt\n";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $linkB); + $affected_rows = mysql_affected_rows($linkB); + + mysql_close($linkB); + } + } + if ($agent_log == 'NO') {$donothing=1;} else @@ -1587,6 +2129,71 @@ if ($ACTION == 'UpdatEFavoritEs') } +################################################################################ +### PauseCodeSubmit - Update vicidial_agent_log with pause code +################################################################################ +if ($ACTION == 'PauseCodeSubmit') +{ + $row=''; $rowx=''; + if ( (strlen($status)<1) || (strlen($agent_log_id)<1) ) + { + echo "agent_log_id $agent_log_id or pause_code $status is not valid\n"; + exit; + } + else + { + $stmt="UPDATE vicidial_agent_log set sub_status=\"$status\" where agent_log_id='$agent_log_id';"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + $affected_rows = mysql_affected_rows($link); + if ($affected_rows > 0) + { + ############################################# + ##### START QUEUEMETRICS LOGGING LOOKUP ##### + $stmt = "SELECT enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_log_id,allow_sipsak_messages FROM system_settings;"; + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $qm_conf_ct = mysql_num_rows($rslt); + $i=0; + while ($i < $qm_conf_ct) + { + $row=mysql_fetch_row($rslt); + $enable_queuemetrics_logging = $row[0]; + $queuemetrics_server_ip = $row[1]; + $queuemetrics_dbname = $row[2]; + $queuemetrics_login = $row[3]; + $queuemetrics_pass = $row[4]; + $queuemetrics_log_id = $row[5]; + $allow_sipsak_messages = $row[6]; + $i++; + } + ##### END QUEUEMETRICS LOGGING LOOKUP ##### + ########################################### + if ( ($enable_sipsak_messages > 0) and ($allow_sipsak_messages > 0) and (eregi("SIP",$protocol)) ) + { + $SIPSAK_prefix = 'BK-'; + passthru("/usr/local/bin/sipsak -M -O desktop -B \"$SIPSAK_prefix$status\" -r 5060 -s sip:$extension@$phone_ip > /dev/null"); + } + if ($enable_queuemetrics_logging > 0) + { + $linkB=mysql_connect("$queuemetrics_server_ip", "$queuemetrics_login", "$queuemetrics_pass"); + mysql_select_db("$queuemetrics_dbname", $linkB); + + $stmt = "INSERT INTO queue_log SET partition='P01',time_id='$StarTtime',call_id='NONE',queue='$campaign',agent='Agent/$user',verb='PAUSEREASON',serverid='$queuemetrics_log_id',data1='$status';"; + if ($DB) {echo "$stmt\n";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $linkB); + $affected_rows = mysql_affected_rows($linkB); + + mysql_close($linkB); + } + } + } +echo "Pause Code has been updated to $status for $agent_log_id\n"; +} + + ################################################################################ ### CalLBacKLisT - List the USERONLY callbacks for an agent ################################################################################ diff --git a/agc_2-X/trunk/LANG_www/agc_en/vicidial.php b/agc_2-X/trunk/LANG_www/agc_en/vicidial.php index ff5b382b..3a307784 100644 --- a/agc_2-X/trunk/LANG_www/agc_en/vicidial.php +++ b/agc_2-X/trunk/LANG_www/agc_en/vicidial.php @@ -1,7 +1,7 @@ LICENSE: GPLv2 +# Copyright (C) 2007 Matt Florell 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 @@ -15,7 +15,7 @@ # - vdc_db_query.php: Updates information in the database # - manager_send.php: Sends manager actions to the DB for execution # -# CHANGES +# CHANGELOG # 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 @@ -132,8 +132,37 @@ # 61128-2229 - Added vicidial_live_agents and vicidial_auto_calls manual dial entries # 61130-1617 - Added lead_id to MonitorConf for recording_log # 61221-1212 - Changed width to 760 to better fit 800x600 screens, widened SCRIPT +# 70109-1128 - Fixed wrapup timer bug +# 70109-1635 - Added option for HotKeys automatically dialing next number in manual mode +# - Added option for alternate number dialing with hotkeys +# 70111-1600 - Added ability to use BLEND/INBND/*_C/*_B/*_I as closer campaigns +# 70118-1517 - Added vicidial_agent_log and vicidial_user_log logging of user_group +# 70201-1249 - Added FAST DIAL option for manually dialing, added UTF8 compatible code +# 70201-1703 - Fixed cursor bug for most text input fields +# 70202-1453 - Added first portions of Agent Pause Codes +# 70203-0108 - Finished Agent Pause Codes functionality +# 70203-0930 - Added dialed_number to webform output +# 70203-1010 - Added dialed_label to webform output +# 70206-1201 - Fixed allow_closers bug +# 70206-1332 - Added vicidial_recording_override users setting function +# 70212-1252 - Fixed small issue with CXFER +# 70213-1018 - Changed CXFER and AXFER to update customer information before transfer +# 70214-1233 - Added queuemetrics_log_id field for server_id in queue_log +# 70215-1240 - Added queuemetrics_log_id field for server_id in queue_log +# 70222-1617 - Changed queue_log PAUSE/UNPAUSE to PAUSEALL/UNPAUSEALL +# 70226-1252 - Added Mute/UnMute to agent screen +# 70309-1035 - Allow amphersands and questions marks in comments to pass through +# 70313-1052 - Allow pound signs(hash) in comments to pass through +# 70316-1406 - Moved the MUTE button to be accessible during a transfer/conf +# 70319-1446 - Added agent-deactive-display and disable customer info update functions +# 70319-1626 - Added option to allow agent logins to campaigns with no leads in the hopper +# 70320-1501 - Added option to allow retry of leave-3way-call from dispo screen +# 70322-1545 - Added sipsak display ability # +$version = '2.0.129'; +$build = '70322-1545'; + require("dbconnect.php"); if (isset($_GET["DB"])) {$DB=$_GET["DB"];} @@ -172,14 +201,11 @@ if (isset($_GET["relogin"])) {$relogin=$_GET["relogin"];} $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); + $VD_campaign=ereg_replace("[^0-9a-zA-Z_]","",$VD_campaign); $forever_stop=0; -$version = '2.0.105'; -$build = '61221-1212'; - if ($force_logout) { echo "You have now logged out. Thank you\n"; @@ -226,6 +252,7 @@ $TEST_all_statuses = '0'; # TEST variable allows all statuses in dispo screen $US='_'; $CL=':'; $AT='@'; +$DS='-'; $date = date("r"); $ip = getenv("REMOTE_ADDR"); $browser = getenv("HTTP_USER_AGENT"); @@ -252,6 +279,7 @@ $camp_form_code = " 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $phone_login=$row[0]; @@ -438,6 +467,7 @@ $VDloginDISPLAY=0; { $stmt="SELECT count(*) from vicidial_users where user='$VD_login' and pass='$VD_pass' and user_level > 0;"; if ($DB) {echo "|$stmt|\n";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $auth=$row[0]; @@ -447,7 +477,8 @@ $VDloginDISPLAY=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,user_group from vicidial_users where user='$VD_login' and pass='$VD_pass'"; + $stmt="SELECT full_name,user_level,hotkeys_active,agent_choose_ingroups,scheduled_callbacks,agentonly_callbacks,agentcall_manual,vicidial_recording,vicidial_transfers,closer_default_blended,user_group,vicidial_recording_override from vicidial_users where user='$VD_login' and pass='$VD_pass'"; + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $LOGfullname=$row[0]; @@ -461,6 +492,8 @@ $VDloginDISPLAY=0; $VU_vicidial_transfers=$row[8]; $VU_closer_default_blended=$row[9]; $VU_user_group=$row[10]; + $VU_vicidial_recording_override=$row[11]; + if ($WeBRooTWritablE > 0) { fwrite ($fp, "vdweb|GOOD|$date|$VD_login|$VD_pass|$ip|$browser|$LOGfullname|\n"); @@ -471,6 +504,7 @@ $VDloginDISPLAY=0; {$user_abb = eregi_replace("^.","",$user_abb); $forever_stop++;} $stmt="SELECT allowed_campaigns from vicidial_user_groups where user_group='$VU_user_group';"; + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $LOGallowed_campaigns =$row[0]; @@ -501,6 +535,7 @@ echo " 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $CAMPactive=$row[0]; @@ -512,6 +547,7 @@ echo " 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $VD_statuses_ct = mysql_num_rows($rslt); @@ -528,6 +564,7 @@ echo " 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $VD_statuses_camp = mysql_num_rows($rslt); @@ -548,6 +585,7 @@ echo " 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $HK_statuses_camp = mysql_num_rows($rslt); @@ -577,43 +615,46 @@ echo " 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $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]; - $allcalls_delay=$row[30]; - $omit_phone_code=$row[31]; + $park_ext = $row[0]; + $park_file_name = $row[1]; + $web_form_address = $row[2]; + $allow_closers = $row[3]; + $auto_dial_level = $row[4]; + $dial_timeout = $row[5]; + $dial_prefix = $row[6]; + $campaign_cid = $row[7]; + $campaign_vdad_exten = $row[8]; + $campaign_rec_exten = $row[9]; + $campaign_recording = $row[10]; + $campaign_rec_filename = $row[11]; + $campaign_script = $row[12]; + $get_call_launch = $row[13]; + $campaign_am_message_exten = $row[14]; + $xferconf_a_dtmf = $row[15]; + $xferconf_a_number = $row[16]; + $xferconf_b_dtmf = $row[17]; + $xferconf_b_number = $row[18]; + $alt_number_dialing = $row[19]; + $VC_scheduled_callbacks = $row[20]; + $wrapup_seconds = $row[21]; + $wrapup_message = $row[22]; + $closer_campaigns = $row[23]; + $use_internal_dnc = $row[24]; + $allcalls_delay = $row[25]; + $omit_phone_code = $row[26]; + $agent_pause_codes_active = $row[27]; + $no_hopper_leads_logins = $row[28]; + if ( (!ereg('DISABLED',$VU_vicidial_recording_override)) and ($VU_vicidial_recording > 0) ) + { + $campaign_recording = $VU_vicidial_recording_override; + print "\n"; + } if ( ($VC_scheduled_callbacks=='Y') and ($VU_scheduled_callbacks=='1') ) {$scheduled_callbacks='1';} if ($VU_vicidial_recording=='0') @@ -626,12 +667,37 @@ echo " 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $VD_pause_codes = mysql_num_rows($rslt); + $j=0; + while ($j < $VD_pause_codes) + { + $row=mysql_fetch_row($rslt); + $pause_codes[$i] =$row[0]; + $pause_code_names[$i] =$row[1]; + $VARpause_codes = "$VARpause_codes'$pause_codes[$i]',"; + $VARpause_code_names = "$VARpause_code_names'$pause_code_names[$i]',"; + $i++; + $j++; + } + $VD_pause_codes_ct = ($VD_pause_codes_ct+$VD_pause_codes); + $VARpause_codes = substr("$VARpause_codes", 0, -1); + $VARpause_code_names = substr("$VARpause_code_names", 0, -1); + } + ##### grab the inbound groups to choose from if campaign contains CLOSER $VARingroups="''"; - if (eregi("CLOSER", $VD_campaign)) + if (eregi("(CLOSER|BLEND|INBND|_C$|_B$|_I$)", $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;"; + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $closer_ct = mysql_num_rows($rslt); @@ -648,6 +714,7 @@ echo " 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $row=mysql_fetch_row($rslt); @@ -708,6 +775,7 @@ echo " 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $authphone=$row[0]; @@ -746,6 +814,7 @@ 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";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $extension=$row[0]; @@ -808,6 +877,7 @@ else $DBX_user=$row[57]; $DBX_pass=$row[58]; $DBX_port=$row[59]; + $enable_sipsak_messages=$row[66]; if ($clientDST) { @@ -822,6 +892,7 @@ else $stmt="SELECT asterisk_version from servers where server_ip='$server_ip';"; if ($DB) {echo "|$stmt|\n";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $asterisk_version=$row[0]; @@ -875,21 +946,25 @@ else $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";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $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";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); - if ( (eregi("CLOSER", $VD_campaign)) || ($campaign_leads_to_call > 0) ) + if ( (eregi("(CLOSER|BLEND|INBND|_C$|_B$|_I$)", $VD_campaign)) || ($campaign_leads_to_call > 0) || (ereg('Y',$no_hopper_leads_logins)) ) { ### 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')"; + $stmt = "INSERT INTO vicidial_user_log (user,event,campaign_id,event_date,event_epoch,user_group) values('$VD_login','LOGIN','$VD_campaign','$NOW_TIME','$StarTtimE','$VU_user_group')"; if ($DB) {echo "|$stmt|\n";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $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;"; + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $prev_login_ct = mysql_num_rows($rslt); @@ -906,6 +981,7 @@ 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;"; + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $free_conf_ct = mysql_num_rows($rslt); @@ -917,6 +993,7 @@ else $i++; } $stmt="UPDATE vicidial_conferences set extension='$SIP_user' where server_ip='$server_ip' and conf_exten='$session_id';"; + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); print "\n"; @@ -924,18 +1001,21 @@ else $stmt="UPDATE vicidial_list set status='N', user='' where status IN('QUEUE','INCALL') and user ='$VD_login';"; if ($DB) {echo "$stmt\n";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $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";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $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";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); $affected_rows = mysql_affected_rows($link); print "\n"; @@ -943,11 +1023,45 @@ else # 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 + ### set the callerID for manager middleware-app to connect the phone to the user $SIqueryCID = "S$CIDdate$session_id"; + + ############################################# + ##### START SYSTEM_SETTINGS LOOKUP ##### + $stmt = "SELECT enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_log_id,vicidial_agent_disable,allow_sipsak_messages FROM system_settings;"; + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $qm_conf_ct = mysql_num_rows($rslt); + $i=0; + while ($i < $qm_conf_ct) + { + $row=mysql_fetch_row($rslt); + $enable_queuemetrics_logging = $row[0]; + $queuemetrics_server_ip = $row[1]; + $queuemetrics_dbname = $row[2]; + $queuemetrics_login = $row[3]; + $queuemetrics_pass = $row[4]; + $queuemetrics_log_id = $row[5]; + $vicidial_agent_disable = $row[6]; + $allow_sipsak_messages = $row[7]; + $i++; + } + ##### END QUEUEMETRICS LOGGING LOOKUP ##### + ########################################### + + if ( ($enable_sipsak_messages > 0) and ($allow_sipsak_messages > 0) and (eregi("SIP",$protocol)) ) + { + $SIPSAK_prefix = 'LIN-'; + print "\n"; + passthru("/usr/local/bin/sipsak -M -O desktop -B \"$SIPSAK_prefix$VD_campaign\" -r 5060 -s sip:$extension@$phone_ip > /dev/null"); + $SIqueryCID = "$SIPSAK_prefix$VD_campaign$DS$CIDdate"; + } + ### 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";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); $affected_rows = mysql_affected_rows($link); print "\n"; @@ -959,13 +1073,38 @@ else $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";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); $affected_rows = mysql_affected_rows($link); print "\n"; - if (eregi("CLOSER", $VD_campaign)) + if ($enable_queuemetrics_logging > 0) { - print "\n"; + $linkB=mysql_connect("$queuemetrics_server_ip", "$queuemetrics_login", "$queuemetrics_pass"); + mysql_select_db("$queuemetrics_dbname", $linkB); + + $stmt = "INSERT INTO queue_log SET partition='P01',time_id='$StarTtimE',call_id='NONE',queue='$VD_campaign',agent='Agent/$VD_login',verb='AGENTLOGIN',data1='$VD_login@agents',serverid='$queuemetrics_log_id';"; + if ($DB) {echo "$stmt\n";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $linkB); + $affected_rows = mysql_affected_rows($linkB); + print "\n"; + + $stmt = "INSERT INTO queue_log SET partition='P01',time_id='$StarTtimE',call_id='NONE',queue='NONE',agent='Agent/$VD_login',verb='PAUSEALL',serverid='$queuemetrics_log_id';"; + if ($DB) {echo "$stmt\n";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $linkB); + $affected_rows = mysql_affected_rows($linkB); + print "\n"; + + mysql_close($linkB); + mysql_select_db("$VARDB_database", $link); + } + + + if (eregi("(CLOSER|BLEND|INBND|_C$|_B$|_I$)", $VD_campaign)) + { + print "\n"; } } else @@ -974,9 +1113,33 @@ else $stmt="INSERT INTO vicidial_live_agents (user,server_ip,conf_exten,extension,status,lead_id,campaign_id,uniqueid,callerid,channel,random_id,last_call_time,last_update_time,last_call_finish,user_level) values('$VD_login','$server_ip','$session_id','$SIP_user','PAUSED','','$VD_campaign','','','','$random','$NOW_TIME','$tsNOW_TIME','$NOW_TIME','$user_level');"; if ($DB) {echo "$stmt\n";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); $affected_rows = mysql_affected_rows($link); print "\n"; + + if ($enable_queuemetrics_logging > 0) + { + $linkB=mysql_connect("$queuemetrics_server_ip", "$queuemetrics_login", "$queuemetrics_pass"); + mysql_select_db("$queuemetrics_dbname", $linkB); + + $stmt = "INSERT INTO queue_log SET partition='P01',time_id='$StarTtimE',call_id='NONE',queue='$VD_campaign',agent='Agent/$VD_login',verb='AGENTLOGIN',data1='$VD_login@agents',serverid='$queuemetrics_log_id';"; + if ($DB) {echo "$stmt\n";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $linkB); + $affected_rows = mysql_affected_rows($linkB); + print "\n"; + + $stmt = "INSERT INTO queue_log SET partition='P01',time_id='$StarTtimE',call_id='NONE',queue='NONE',agent='Agent/$VD_login',verb='PAUSEALL',serverid='$queuemetrics_log_id';"; + if ($DB) {echo "$stmt\n";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $linkB); + $affected_rows = mysql_affected_rows($linkB); + print "\n"; + + mysql_close($linkB); + mysql_select_db("$VARDB_database", $link); + } } } else @@ -1027,11 +1190,12 @@ echo "
0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); $affected_rows = mysql_affected_rows($link); - $agent_log_id = mysql_insert_id(); + $agent_log_id = mysql_insert_id($link); print "\n"; $S='*'; @@ -1048,6 +1212,7 @@ echo " 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $MM_scripts = mysql_num_rows($rslt); @@ -1225,6 +1390,10 @@ $CCAL_OUT .= "
"; var CallBackCommenTs = ''; var scheduled_callbacks = ''; var dispo_check_all_pause = ''; + var agent_pause_codes_active = ''; + VARpause_codes = new Array(); + VARpause_code_names = new Array(); + var VD_pause_codes_ct = ''; VARstatuses = new Array(); VARstatusnames = new Array(); var VD_statuses_ct = ''; @@ -1277,6 +1446,7 @@ $CCAL_OUT .= "
"; var dialplan_number = ''; var ext_context = ''; var protocol = ''; + var agentchannel = ''; var local_gmt =''; var server_ip = ''; var server_ip_dialstring = ''; @@ -1292,6 +1462,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} var CalLCID = ''; var MDnextCID = ''; var XDnextCID = ''; + var LasTCID = ''; var lead_dial_number = ''; var MD_channel_look = 0; var XD_channel_look = 0; @@ -1324,11 +1495,6 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} var CalL_AutO_LauncH = ''; var panel_bgcolor = '#E0C2D6'; var CusTCB_bgcolor = '#FFFF66'; - var status_A = ''; - var status_B = ''; - var status_C = ''; - var status_D = ''; - var status_E = ''; var auto_dial_level = ''; var starting_dial_level = ''; var dial_timeout = ''; @@ -1428,11 +1594,24 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} var no_delete_sessions = ''; var webform_session = ''; var local_consult_xfers = ''; + var vicidial_agent_disable = ''; var CBentry_time = ''; var CBcallback_time = ''; var CBuser = ''; var CBcomments = ''; var volumecontrol_active = ''; + var PauseCode_HTML = ''; + var manual_auto_hotkey = 0; + var dialed_number = ''; + var dialed_label = ''; + var DispO3waychannel = ''; + var DispO3wayXtrAchannel = ''; + var DispO3wayCalLserverip = ''; + var DispO3wayCalLxfernumber = ''; + var DispO3wayCalLcamptail = ''; + var phone_ip = ''; + var enable_sipsak_messages = ''; + var allow_sipsak_messages = ''; var DiaLControl_auto_HTML = "\"Pause\"\"Resume\""; var DiaLControl_auto_HTML_ready = "\"Pause\"\"Resume\""; var DiaLControl_auto_HTML_OFF = "\"Pause\"\"Resume\""; @@ -1536,8 +1715,12 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} // ################################################################################ // Send volume control command for meetme participant - function volume_control(taskdirection,taskvolchannel) + function volume_control(taskdirection,taskvolchannel,taskagentmute) { + if (taskagentmute=='AgenT') + { + taskvolchannel = agentchannel; + } var xmlhttp=false; /*@cc_on @*/ /*@if (@_jscript_version >= 5) @@ -1576,6 +1759,18 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} } delete xmlhttp; } + if (taskagentmute=='AgenT') + { + if (taskdirection=='MUTING') + { + document.getElementById("AgentMuteSpan").innerHTML = ""; + } + else + { + document.getElementById("AgentMuteSpan").innerHTML = ""; + } + } + } @@ -1590,9 +1785,9 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} // ################################################################################ // place 3way and customer into other conference and fake-hangup the lines - function leave_3way_call() + function leave_3way_call(tempvarattempt) { - mainxfer_send_redirect('3WAY'); + mainxfer_send_redirect('3WAY','','',tempvarattempt); document.vicidial_form.callchannel.value = ''; document.vicidial_form.callserverip.value = ''; @@ -1653,6 +1848,35 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} // Send Originate command to manager to place a phone call function basic_originate_call(tasknum,taskprefix,taskreverse,taskdialvalue,tasknowait,taskconfxfer) { + var regCXFvars = new RegExp("CXFER","g"); + var tasknum_string = tasknum.toString(); + if (tasknum_string.match(regCXFvars)) + { + var Ctasknum = tasknum_string.replace(regCXFvars, ''); + if (Ctasknum.length < 2) + {Ctasknum = '990009';} + var closerxfercamptail = '_L' + document.vicidial_form.xfercode.value; + tasknum = Ctasknum + "*CL_" + campaign + '' + closerxfercamptail + '*CXFER*' + document.vicidial_form.lead_id.value + '**' + document.vicidial_form.phone_number.value + '*' + user + '*'; + + CustomerData_update(); + + } + var regAXFvars = new RegExp("AXFER","g"); + if (tasknum_string.match(regAXFvars)) + { + var Ctasknum = tasknum_string.replace(regAXFvars, ''); + if (Ctasknum.length < 2) + {Ctasknum = '83009';} + var closerxfercamptail = '_L' + document.vicidial_form.xfercode.value; + if (closerxfercamptail.length < 3) + {closerxfercamptail = 'IVR';} + tasknum = Ctasknum + '*' + document.vicidial_form.phone_number.value + '*' + document.vicidial_form.lead_id.value + '*' + campaign + '*' + closerxfercamptail + '*' + user + '*'; + + CustomerData_update(); + + } + + var xmlhttp=false; /*@cc_on @*/ /*@if (@_jscript_version >= 5) @@ -1674,27 +1898,6 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} } if (xmlhttp) { - var regCXFvars = new RegExp("CXFER","g"); - var tasknum_string = tasknum.toString(); - if (tasknum_string.match(regCXFvars)) - { - var Ctasknum = tasknum_string.replace(regCXFvars, ''); - if (Ctasknum.length < 2) - {Ctasknum = '990009';} - var closerxfercamptail = '_L' + document.vicidial_form.xfercode.value; - tasknum = Ctasknum + "*CL_" + campaign + '' + closerxfercamptail + '**' + document.vicidial_form.lead_id.value + '**' + document.vicidial_form.phone_number.value + '*' + user + '*'; - } - var regAXFvars = new RegExp("AXFER","g"); - if (tasknum_string.match(regAXFvars)) - { - var Ctasknum = tasknum_string.replace(regAXFvars, ''); - if (Ctasknum.length < 2) - {Ctasknum = '83009';} - var closerxfercamptail = '_L' + document.vicidial_form.xfercode.value; - if (closerxfercamptail.length < 3) - {closerxfercamptail = 'IVR';} - tasknum = Ctasknum + '*' + document.vicidial_form.phone_number.value + '*' + document.vicidial_form.lead_id.value + '*' + campaign + '*' + closerxfercamptail + '*' + user + '*'; - } if (taskprefix == 'NO') {var orig_prefix = '';} else {var orig_prefix = agc_dial_prefix;} if (taskreverse == 'YES') @@ -1858,7 +2061,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} UnixTime = parseInt(UnixTime); UnixTimeMS = (UnixTime * 1000); t.setTime(UnixTimeMS); - if (agentcallsstatus == '1') + if ( (agentcallsstatus == '1') || (vicidial_agent_disable != 'NOT_ACTIVE') ) { var Astatus_array = check_time_array[2].split("Status: "); var AGStatuS = Astatus_array[1]; @@ -1872,6 +2075,14 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} { document.getElementById("AgentStatusCalls").innerHTML = CamPCalLs; } + if ( (AGStatuS == 'DEAD_VLA') && ( (vicidial_agent_disable == 'LIVE_AGENT') || (vicidial_agent_disable == 'ALL') ) ) + { + showDiv('AgenTDisablEBoX'); + } + if ( (AGStatuS == 'DEAD_EXTERNAL') && ( (vicidial_agent_disable == 'EXTERNAL') || (vicidial_agent_disable == 'ALL') ) ) + { + showDiv('AgenTDisablEBoX'); + } } var check_conf_array=check_ALL_array[1].split("|"); var live_conf_calls = check_conf_array[0]; @@ -1903,14 +2114,13 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} {var row_color = '#CCCCFF';} var conv_ct = (loop_ct + conv_start); var channelfieldA = conf_chan_array[conv_ct]; - // live_conf_HTML = live_conf_HTML + "
" + loop_ct + "" + channelfieldA + "HangupXFER
" + loop_ct + "" + channelfieldA + "HANGUP
" + loop_ct + "" + channelfieldA + "HANGUP    
" + loop_ct + "" + channelfieldA + "HANGUP          
PAUSE CODE
"; + var loop_ct = 0; + while (loop_ct < VD_pause_codes_ct) + { + PauseCode_HTML = PauseCode_HTML + "" + VARpause_codes[loop_ct] + " - " + VARpause_code_names[loop_ct] + "

"; + loop_ct++; + if (loop_ct == VD_pause_codes_ct_half) + {PauseCode_HTML = PauseCode_HTML + "
";} + } + PauseCode_HTML = PauseCode_HTML + "


Go Back"; + document.getElementById("PauseCodeSelectContent").innerHTML = PauseCode_HTML; + } + } // ################################################################################ // open web form, then submit disposition @@ -4114,7 +4527,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} } if (xmlhttp) { - DSupdate_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=updateDISPO&format=text&user=" + user + "&pass=" + pass + "&dispo_choice=" + DispoChoice + "&lead_id=" + document.vicidial_form.lead_id.value + "&campaign=" + campaign + "&auto_dial_level=" + auto_dial_level + "&agent_log_id=" + agent_log_id + "&CallBackDatETimE=" + CallBackDatETimE + "&list_id=" + document.vicidial_form.list_id.value + "&recipient=" + CallBackrecipient + "&use_internal_dnc=" + use_internal_dnc + "&comments=" + CallBackCommenTs; + DSupdate_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=updateDISPO&format=text&user=" + user + "&pass=" + pass + "&dispo_choice=" + DispoChoice + "&lead_id=" + document.vicidial_form.lead_id.value + "&campaign=" + campaign + "&auto_dial_level=" + auto_dial_level + "&agent_log_id=" + agent_log_id + "&CallBackDatETimE=" + CallBackDatETimE + "&list_id=" + document.vicidial_form.list_id.value + "&recipient=" + CallBackrecipient + "&use_internal_dnc=" + use_internal_dnc + "&MDnextCID=" + LasTCID + "&comments=" + CallBackCommenTs; xmlhttp.open('POST', 'vdc_db_query.php'); xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8'); xmlhttp.send(DSupdate_query); @@ -4124,8 +4537,8 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} { var check_dispo = null; check_dispo = xmlhttp.responseText; - // alert(xmlhttp.responseText); var check_DS_array=check_dispo.split("\n"); + // alert(xmlhttp.responseText + "\n|" + check_DS_array[1] + "\n|" + check_DS_array[2] + "|"); if (check_DS_array[1] == 'Next agent_log_id:') { agent_log_id = check_DS_array[2]; @@ -4203,12 +4616,67 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} AutoDial_ReSume_PauSe("VDADready","NO"); // document.getElementById("DiaLControl").innerHTML = DiaLControl_auto_HTML_ready; } + else + { + // trigger HotKeys manual dial automatically go to next lead + if (manual_auto_hotkey == '1') + { + manual_auto_hotkey = 0; + ManualDialNext('','','','',''); + } + } } } } } } + +// ################################################################################ +// Submit the Pause Code + function PauseCodeSelect_submit(newpausecode) + { + hideDiv('PauseCodeSelectBox'); + WaitingForNextStep=0; + + var xmlhttp=false; + /*@cc_on @*/ + /*@if (@_jscript_version >= 5) + // JScript gives us Conditional compilation, we can cope with old IE versions. + // and security blocked creation of the objects. + try { + xmlhttp = new ActiveXObject("Msxml2.XMLHTTP"); + } catch (e) { + try { + xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); + } catch (E) { + xmlhttp = false; + } + } + @end @*/ + if (!xmlhttp && typeof XMLHttpRequest!='undefined') + { + xmlhttp = new XMLHttpRequest(); + } + if (xmlhttp) + { + VMCpausecode_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=PauseCodeSubmit&format=text&status=" + newpausecode + "&agent_log_id=" + agent_log_id + "&campaign=" + campaign + "&extension=" + extension + "&protocol=" + protocol + "&phone_ip=" + phone_ip + "&enable_sipsak_messages=" + enable_sipsak_messages; + xmlhttp.open('POST', 'vdc_db_query.php'); + xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8'); + xmlhttp.send(VMCpausecode_query); + xmlhttp.onreadystatechange = function() + { + if (xmlhttp.readyState == 4 && xmlhttp.status == 200) + { + // alert(xmlhttp.responseText); + } + } + delete xmlhttp; + } + } + + + // ################################################################################ // Populate the dtmf and xfer number for each preset link in xfer-conf frame function DtMf_PreSet_a() @@ -4302,7 +4770,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} } if (xmlhttp) { - VMCoriginate_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=Originate&format=text&channel=" + originatevalue + "&queryCID=" + queryCID + "&exten=" + session_id + "&ext_context=" + ext_context + "&ext_priority=1"; + VMCoriginate_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=OriginateVDRelogin&format=text&channel=" + originatevalue + "&queryCID=" + queryCID + "&exten=" + session_id + "&ext_context=" + ext_context + "&ext_priority=1" + "&extension=" + extension + "&protocol=" + protocol + "&phone_ip=" + phone_ip + "&enable_sipsak_messages=" + enable_sipsak_messages + "&allow_sipsak_messages=" + allow_sipsak_messages + "&campaign=" + campaign; xmlhttp.open('POST', 'manager_send.php'); xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8'); xmlhttp.send(VMCoriginate_query); @@ -4489,7 +4957,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} } if (xmlhttp) { - VDlogout_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=userLOGout&format=text&user=" + user + "&pass=" + pass + "&campaign=" + campaign + "&conf_exten=" + session_id + "&extension=" + extension + "&protocol=" + protocol + "&no_delete_sessions=" + no_delete_sessions; + VDlogout_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=userLOGout&format=text&user=" + user + "&pass=" + pass + "&campaign=" + campaign + "&conf_exten=" + session_id + "&extension=" + extension + "&protocol=" + protocol + "&agent_log_id=" + agent_log_id + "&no_delete_sessions=" + no_delete_sessions + "&phone_ip=" + phone_ip + "&enable_sipsak_messages=" + enable_sipsak_messages; xmlhttp.open('POST', 'vdc_db_query.php'); xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8'); xmlhttp.send(VDlogout_query); @@ -4536,14 +5004,24 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} document.vicidial_form.inert_button.focus(); document.vicidial_form.inert_button.blur(); CustomerData_update(); - HKdispo_display = 4; - HKfinish=1; var HKdispo_ary = HKdispo.split(" ----- "); - document.getElementById("HotKeyDispo").innerHTML = HKdispo_ary[0] + " - " + HKdispo_ary[1]; - showDiv('HotKeyActionBox'); - hideDiv('HotKeyEntriesBox'); - document.vicidial_form.DispoSelection.value = HKdispo_ary[0]; - dialedcall_send_hangup('NO'); + if ( (HKdispo_ary[0] == 'ALTPH2') || (HKdispo_ary[0] == 'ADDR3') ) + { + if (document.vicidial_form.DiaLAltPhonE.checked==true) + { + dialedcall_send_hangup('NO', 'YES', HKdispo_ary[0]); + } + } + else + { + HKdispo_display = 4; + HKfinish=1; + document.getElementById("HotKeyDispo").innerHTML = HKdispo_ary[0] + " - " + HKdispo_ary[1]; + showDiv('HotKeyActionBox'); + hideDiv('HotKeyEntriesBox'); + document.vicidial_form.DispoSelection.value = HKdispo_ary[0]; + dialedcall_send_hangup('NO', 'YES', HKdispo_ary[0]); + } // DispoSelect_submit(); // AutoDialWaiting = 1; // AutoDial_ReSume_PauSe("VDADready"); @@ -4899,11 +5377,11 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} hideDiv('CBcommentsBox'); hideDiv('HotKeyActionBox'); hideDiv('HotKeyEntriesBox'); - hideDiv('MainXfeRBox'); hideDiv('MainPanel'); hideDiv('ScriptPanel'); hideDiv('DispoSelectBox'); hideDiv('LogouTBox'); + hideDiv('AgenTDisablEBoX'); hideDiv('CustomerGoneBox'); hideDiv('NoneInSessionBox'); hideDiv('WrapupBox'); @@ -4915,6 +5393,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} hideDiv('DispoButtonHideC'); hideDiv('CallBacKsLisTBox'); hideDiv('NeWManuaLDiaLBox'); + hideDiv('PauseCodeSelectBox'); if (agentonly_callbacks != '1') {hideDiv('CallbacksButtons');} // if ( (agentcall_manual != '1') && (starting_dial_level > 0) ) @@ -4930,6 +5409,15 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} {hideDiv('VolumeControlSpan');} document.vicidial_form.LeadLookuP.checked=true; + if (agent_pause_codes_active=='Y') + { + document.getElementById("PauseCodeLinkSpan").innerHTML = "ENTER A PAUSE CODE"; + } + if (VICIDiaL_allow_closers < 1) + { + document.getElementById("InternalCloser").style.visibility = 'hidden'; + document.getElementById("LocalCloser").style.visibility = 'hidden'; + } document.getElementById("sessionIDspan").innerHTML = session_id; if ( (campaign_recording == 'NEVER') || (campaign_recording == 'ALLFORCE') ) { @@ -4962,6 +5450,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} if (wrapup_seconds > 0) { showDiv('WrapupBox'); + document.getElementById("WrapupTimer").innerHTML = wrapup_seconds; wrapup_waiting=1; } CustomerData_update(); @@ -4994,39 +5483,6 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} if ( (custchannellive < -30) && (lastcustchannel.length > 3) ) {CustomerChanneLGone();} if ( (custchannellive < -10) && (lastcustchannel.length > 3) ) {ReChecKCustoMerChaN();} if ( (nochannelinsession > 16) && (check_n > 15) ) {NoneInSession();} - if (wrapup_seconds > 0) - { - document.getElementById("WrapupTimer").innerHTML = (wrapup_seconds - wrapup_counter); - wrapup_counter++; - if ( (wrapup_counter > wrapup_seconds) && (document.getElementById("WrapupBox").style.visibility == 'visible') ) - { - wrapup_waiting=0; - hideDiv('WrapupBox'); - if (document.vicidial_form.DispoSelectStop.checked==true) - { - if (auto_dial_level != '0') - { - AutoDialWaiting = 0; - AutoDial_ReSume_PauSe("VDADpause","NO"); - // document.getElementById("DiaLControl").innerHTML = DiaLControl_auto_HTML; - } - VICIDiaL_pause_calling = 1; - if (dispo_check_all_pause != '1') - { - document.vicidial_form.DispoSelectStop.checked=false; - } - } - else - { - if (auto_dial_level != '0') - { - AutoDialWaiting = 1; - AutoDial_ReSume_PauSe("VDADready","NO"); - // document.getElementById("DiaLControl").innerHTML = DiaLControl_auto_HTML_ready; - } - } - } - } if (WaitingForNextStep==0) { // check for live channels in conference room and get current datetime @@ -5108,6 +5564,39 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} // parked_calls_display_refresh(); } } + if (wrapup_seconds > 0) + { + document.getElementById("WrapupTimer").innerHTML = (wrapup_seconds - wrapup_counter); + wrapup_counter++; + if ( (wrapup_counter > wrapup_seconds) && (document.getElementById("WrapupBox").style.visibility == 'visible') ) + { + wrapup_waiting=0; + hideDiv('WrapupBox'); + if (document.vicidial_form.DispoSelectStop.checked==true) + { + if (auto_dial_level != '0') + { + AutoDialWaiting = 0; + AutoDial_ReSume_PauSe("VDADpause","NO"); + // document.getElementById("DiaLControl").innerHTML = DiaLControl_auto_HTML; + } + VICIDiaL_pause_calling = 1; + if (dispo_check_all_pause != '1') + { + document.vicidial_form.DispoSelectStop.checked=false; + } + } + else + { + if (auto_dial_level != '0') + { + AutoDialWaiting = 1; + AutoDial_ReSume_PauSe("VDADready","NO"); + // document.getElementById("DiaLControl").innerHTML = DiaLControl_auto_HTML_ready; + } + } + } + } } } setTimeout("all_refresh()", refresh_interval); @@ -5165,6 +5654,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} if (Cmon == 9) {Cmon = "OCT";} if (Cmon == 10) {Cmon = "NOV";} if (Cmon == 11) {Cmon = "DEC";} + if (Chours == 12) {AMPM = 'PM';} if (Chours > 12) {Chours = (Chours - 12); AMPM = 'PM';} if (Cmin < 10) {Cmin = "0" + Cmin;} if (Csec < 10) {Csec = "0" + Csec;} @@ -5300,25 +5790,6 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} } } - - function showMainXfeR(divvar,taskxferchan,taskxferchanmain) - { - document.getElementById("MainXfeRBox").style.visibility = 'visible'; - getactiveext("MainXfeRBox"); - conference_list_display_refresh("MainXfeRconfContent"); - var XfeR_channel = taskxferchan; - document.vicidial_form.H_XfeR_channel.value = XfeR_channel; - document.vicidial_form.M_XfeR_channel.value = taskxferchanmain; - document.getElementById("MainXfeRChanneL").innerHTML = XfeR_channel; - } - function hideMainXfeR(divvar) - { - document.getElementById("MainXfeRBox").style.visibility = 'hidden'; - var XfeR_channel = ''; - document.vicidial_form.H_XfeR_channel.value = ''; - document.vicidial_form.M_XfeR_channel.value = ''; - document.getElementById("MainXfeRChanneL").innerHTML = ''; - } function conf_channels_detail(divvar) { if (divvar == 'SHOW') @@ -5360,6 +5831,10 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} { if (showxfervar == 'ON') { + var xfer_height = 310; + if (alt_phone_dialing>0) {xfer_height = (xfer_height + 20);} + if ( (auto_dial_level == 0) && (manual_dial_preview == 1) ) {xfer_height = (xfer_height + 20);} + document.getElementById("TransferMain").style.top = xfer_height; HKbutton_allowed = 0; showDiv('TransferMain'); document.getElementById("XferControl").innerHTML = "\"Transfer"; @@ -5428,17 +5903,13 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} - - @@ -5490,15 +5961,23 @@ echo "\n";

VICIDIAL
- -MANUAL DIAL
+ +MANUAL DIAL       FAST 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.
@@ -5509,7 +5988,7 @@ echo "\n";
- + - + @@ -5533,7 +6014,8 @@ echo "\n"; - +
NEW MANUAL DIAL LEAD FOR :

Enter information below for the new lead you wish to call.
\n";
  (This is usually a 1 in the USA-Canada)
Phone Number:   (12 digits max - digits only) +   (12 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)  (digits only please) +

Dial Now @@ -5557,6 +6039,7 @@ Your Status:
Calls Dialing:
+
Transfer - Conference
INTERNAL CLOSER @@ -5582,11 +6065,12 @@ Your Status:
Calls Dialing: Dial Blind Transfer Blind Transfer VMail Message
+
- +
Lead Dispositioned As:

-
@@ -5594,7 +6078,7 @@ Your Status:
Calls Dialing: + @@ -5610,7 +6094,7 @@ Your Status:
Calls Dialing: +
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:
@@ -5627,7 +6111,7 @@ Your Status:
Calls Dialing: +
Previous Callback Information:
Noone is in your session:
Go Back

@@ -5635,7 +6119,7 @@ Your Status:
Calls Dialing: +
Customer has hung up:
Go Back

@@ -5644,7 +6128,7 @@ Your Status:
Calls Dialing: + "; if (volumecontrol_active!=1) { live_conf_HTML = live_conf_HTML + ""; } else { - live_conf_HTML = live_conf_HTML + ""; + live_conf_HTML = live_conf_HTML + ""; } // var debugspan = document.getElementById("debugbottomspan").innerHTML; @@ -1926,6 +2136,29 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} {custchannellive++;} } + if (volumecontrol_active > 0) + { + if (protocol != 'EXTERNAL') + { + var regAGNTchan = new RegExp(protocol + '/' + extension,"g"); + if ( (channelfieldA.match(regAGNTchan)) && (agentchannel != channelfieldA) ) + { + agentchannel = channelfieldA; + + document.getElementById("AgentMuteSpan").innerHTML = ""; + } + } + else + { + if (agentchannel.length < 3) + { + agentchannel = channelfieldA; + + document.getElementById("AgentMuteSpan").innerHTML = ""; + } + } + } + // document.getElementById("debugbottomspan").innerHTML = debugspan + '
' + channelfieldA + '|' + lastcustchannel + '|' + custchannellive + '|' + LMAcontent_change + '|' + LMAalter; if (!LMAe[ARY_ct]) @@ -1952,7 +2185,11 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} if (LMAcontent_change > 0) { if (conf_channels_xtra_display == 1) - {document.getElementById("outboundcallsspan").innerHTML = live_conf_HTML;} + { + // document.getElementById("MainPanel").style.overflow = 'visible'; + document.getElementById("outboundcallsspan").innerHTML = live_conf_HTML; + // document.getElementById("MainPanel").style.overflow = 'auto'; + } } nochannelinsession=0; } @@ -2086,7 +2323,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} // ################################################################################ // Send Redirect command for live call to Manager sends phone name where call is going to // Covers the following types: XFER, VMAIL, ENTRY, CONF, PARKING, FROMPARKING, XfeRLOCAL, XfeRINTERNAL, XfeRBLIND, VfeRVMAIL - function mainxfer_send_redirect(taskvar,taskxferconf,taskserverip) + function mainxfer_send_redirect(taskvar,taskxferconf,taskserverip,taskdebugnote) { var xmlhttp=false; /*@cc_on @*/ @@ -2201,6 +2438,8 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} } if (taskvar == '3WAY') { + xferredirect_query=''; + var queryCID = "VXvdcW" + epoch_sec + user_abb; var redirectdestination = "NEXTAVAILABLE"; var redirectXTRAvalue = XDchannel; @@ -2211,7 +2450,18 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} {var redirecttype = 'RedirectXtraCX';} else {var redirecttype = 'RedirectXtra';} - xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=" + redirecttype + "&format=text&channel=" + redirectvalue + "&call_server_ip=" + redirectserverip + "&queryCID=" + queryCID + "&exten=" + redirectdestination + "&ext_context=" + ext_context + "&ext_priority=1&extrachannel=" + redirectXTRAvalue + "&lead_id=" + document.vicidial_form.lead_id.value + "&phone_code=" + document.vicidial_form.phone_code.value + "&phone_number=" + document.vicidial_form.phone_number.value + "&campaign=CL_" + campaign + '' + closerxfercamptail; + DispO3waychannel = redirectvalue; + DispO3wayXtrAchannel = redirectXTRAvalue; + DispO3wayCalLserverip = redirectserverip; + DispO3wayCalLxfernumber = document.vicidial_form.xfernumber.value; + DispO3wayCalLcamptail = document.vicidial_form.xfercode.value; + + xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=" + redirecttype + "&format=text&channel=" + redirectvalue + "&call_server_ip=" + redirectserverip + "&queryCID=" + queryCID + "&exten=" + redirectdestination + "&ext_context=" + ext_context + "&ext_priority=1&extrachannel=" + redirectXTRAvalue + "&lead_id=" + document.vicidial_form.lead_id.value + "&phone_code=" + document.vicidial_form.phone_code.value + "&phone_number=" + document.vicidial_form.phone_number.value+ "&filename=" + taskdebugnote + "&campaign=CL_" + campaign + '' + closerxfercamptail; + + if (taskdebugnote == 'FIRST') + { + document.getElementById("DispoSelectHAspan").innerHTML = "Leave 3Way Call Again"; + } } if (taskvar == 'ParK') { @@ -2257,7 +2507,6 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} Nactiveext = null; Nactiveext = xmlhttp.responseText; // alert(xmlhttp.responseText); - hideMainXfeR(); } } delete xmlhttp; @@ -2326,7 +2575,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} "&list_id=" + document.vicidial_form.list_id.value + "&length_in_sec=0&phone_code=" + document.vicidial_form.phone_code.value + "&phone_number=" + lead_dial_number + - "&exten=" + extension + "&channel=" + lastcustchannel + "&start_epoch=" + MDlogEPOCH + "&auto_dial_level=" + auto_dial_level + "&VDstop_rec_after_each_call=" + VDstop_rec_after_each_call + "&conf_silent_prefix=" + conf_silent_prefix + "&protocol=" + protocol + "&extension=" + extension + "&ext_context=" + ext_context + "&conf_exten=" + session_id + "&user_abb=" + user_abb + "&agent_log_id=" + agent_log_id; + "&exten=" + extension + "&channel=" + lastcustchannel + "&start_epoch=" + MDlogEPOCH + "&auto_dial_level=" + auto_dial_level + "&VDstop_rec_after_each_call=" + VDstop_rec_after_each_call + "&conf_silent_prefix=" + conf_silent_prefix + "&protocol=" + protocol + "&extension=" + extension + "&ext_context=" + ext_context + "&conf_exten=" + session_id + "&user_abb=" + user_abb + "&agent_log_id=" + agent_log_id + "&MDnextCID=" + LasTCID + "&DB=0"; xmlhttp.open('POST', 'vdc_db_query.php'); xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8'); // document.getElementById("busycallsdebug").innerHTML = "vdc_db_query.php?" + manDiaLlog_query; @@ -2538,7 +2787,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} // ################################################################################ // Open page to enter details for a new manual dial lead - function NeWManuaLDiaLCalL() + function NeWManuaLDiaLCalL(TVfast) { if ( (AutoDialWaiting == 1) || (VD_live_customer_call==1) || (alt_dial_active==1) ) { @@ -2546,7 +2795,14 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} } else { - showDiv('NeWManuaLDiaLBox'); + if (TVfast=='FAST') + { + NeWManuaLDiaLCalLSubmiTfast(); + } + else + { + showDiv('NeWManuaLDiaLBox'); + } } } @@ -2584,6 +2840,34 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} document.vicidial_form.MDDiaLOverridE.value = ''; } +// ################################################################################ +// Fast version of manual dial + function NeWManuaLDiaLCalLSubmiTfast() + { + var MDDiaLCodEform = document.vicidial_form.phone_code.value; + var MDPhonENumbeRform = document.vicidial_form.phone_number.value; + + if ( (MDDiaLCodEform.length < 1) || (MDPhonENumbeRform.length < 5) ) + { + alert("USTED DEBE INTRODUCIR Un NÚMERO De TELÉFONO Y Un CÓDIGO Del DIALPARA UTILIZAR El DIAL RÁPIDO"); + } + else + { + var MDLookuPLeaD = 'new'; + if (document.vicidial_form.LeadLookuP.checked==true) + {MDLookuPLeaD = 'lookup';} + + alt_phone_dialing=1; + auto_dial_level=0; + manual_dial_in_progress=1; + MainPanelToFront(); + buildDiv('DiaLLeaDPrevieW'); + buildDiv('DiaLDiaLAltPhonE'); + document.vicidial_form.LeadPreview.checked=false; + document.vicidial_form.DiaLAltPhonE.checked=true; + ManualDialNext("","",MDDiaLCodEform,MDPhonENumbeRform,MDLookuPLeaD); + } + } // ################################################################################ // Request lookup of manual dial channel @@ -2662,7 +2946,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} document.getElementById("MainStatuSSpan").innerHTML = " Terceros llamados: " + document.vicidial_form.xfernumber.value + " UID: " + CIDcheck; - document.getElementById("Leave3WayCall").innerHTML ="\"ABANDONAR"; + document.getElementById("Leave3WayCall").innerHTML ="\"ABANDONAR"; document.getElementById("DialWithCustomer").innerHTML ="\"Marcar"; @@ -2715,8 +2999,8 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} document.getElementById("DialBlindVMail").innerHTML = "\"Blind"; - document.getElementById("VolumeUpSpan").innerHTML = ""; - document.getElementById("VolumeDownSpan").innerHTML = ""; + document.getElementById("VolumeUpSpan").innerHTML = ""; + document.getElementById("VolumeDownSpan").innerHTML = ""; // INSERT VICIDIAL_LOG ENTRY FOR THIS LLAMADA PROCESS @@ -2805,6 +3089,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} else { fronter = user; + LasTCID = MDnextResponse_array[0]; document.vicidial_form.lead_id.value = MDnextResponse_array[1]; LeaDPreVDispO = MDnextResponse_array[2]; document.vicidial_form.vendor_lead_code.value = MDnextResponse_array[4]; @@ -2839,9 +3124,12 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} CBcallback_time = MDnextResponse_array[29]; CBuser = MDnextResponse_array[30]; CBcomments = MDnextResponse_array[31]; - + dialed_number = MDnextResponse_array[32]; + dialed_label = MDnextResponse_array[33]; + lead_dial_number = document.vicidial_form.phone_number.value; document.getElementById("MainStatuSSpan").innerHTML = " Llamando: " + document.vicidial_form.phone_number.value + " UID: " + MDnextCID + "   " + man_status; + if ( (dialed_label.length < 3) || (dialed_label=='NONE') ) {dialed_label='MAIN';} web_form_vars = "lead_id=" + document.vicidial_form.lead_id.value + @@ -2887,6 +3175,8 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} "&phone=" + document.vicidial_form.phone_number.value + "&parked_by=" + document.vicidial_form.lead_id.value + "&dispo=" + LeaDDispO + '' + + "&dialed_number=" + dialed_number + '' + + "&dialed_label=" + dialed_label + '' + webform_session; // $VICIDIAL_web_QUERY_STRING =~ s/ /+/gi; @@ -3071,6 +3361,9 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} { var manDiaLonly_num = document.vicidial_form.alt_phone.value; lead_dial_number = document.vicidial_form.alt_phone.value; + dialed_number = lead_dial_number; + dialed_label = 'ALT'; + WebFormRefresH(''); } else { @@ -3078,11 +3371,17 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} { var manDiaLonly_num = document.vicidial_form.address3.value; lead_dial_number = document.vicidial_form.address3.value; - } + dialed_number = lead_dial_number; + dialed_label = 'ADDR3'; + WebFormRefresH(''); + } else { var manDiaLonly_num = document.vicidial_form.phone_number.value; lead_dial_number = document.vicidial_form.phone_number.value; + dialed_number = lead_dial_number; + dialed_label = 'MAIN'; + WebFormRefresH(''); } } var xmlhttp=false; @@ -3213,7 +3512,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} } if (xmlhttp) { - autoDiaLready_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=" + taskaction + "&user=" + user + "&pass=" + pass + "&stage=" + VDRP_stage + "&agent_log_id=" + agent_log_id + "&agent_log=" + taskagentlog; + autoDiaLready_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=" + taskaction + "&user=" + user + "&pass=" + pass + "&stage=" + VDRP_stage + "&agent_log_id=" + agent_log_id + "&agent_log=" + taskagentlog + "&campaign=" + campaign; xmlhttp.open('POST', 'vdc_db_query.php'); xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8'); xmlhttp.send(autoDiaLready_query); @@ -3379,6 +3678,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} custchannellive=1; + LasTCID = check_VDIC_array[4]; LeaDPreVDispO = check_VDIC_array[6]; fronter = check_VDIC_array[7]; document.vicidial_form.vendor_lead_code.value = check_VDIC_array[8]; @@ -3411,6 +3711,8 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} CBcallback_time = check_VDIC_array[33]; CBuser = check_VDIC_array[34]; CBcomments = check_VDIC_array[35]; + dialed_number = check_VDIC_array[36]; + dialed_label = check_VDIC_array[37]; lead_dial_number = document.vicidial_form.phone_number.value; document.getElementById("MainStatuSSpan").innerHTML = " Entrante: " + document.vicidial_form.phone_number.value + " UID: " + CIDcheck + "   " + VDIC_fronter; @@ -3451,8 +3753,8 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} if (lastcustserverip == server_ip) { - document.getElementById("VolumeUpSpan").innerHTML = ""; - document.getElementById("VolumeDownSpan").innerHTML = ""; + document.getElementById("VolumeUpSpan").innerHTML = ""; + document.getElementById("VolumeDownSpan").innerHTML = ""; } document.getElementById("DiaLControl").innerHTML = DiaLControl_auto_HTML_OFF; @@ -3461,6 +3763,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} {var group = VDCL_group_id;} else {var group = campaign;} + if ( (dialed_label.length < 3) || (dialed_label=='NONE') ) {dialed_label='MAIN';} web_form_vars = "lead_id=" + document.vicidial_form.lead_id.value + @@ -3507,6 +3810,8 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} "&phone=" + document.vicidial_form.phone_number.value + "&parked_by=" + document.vicidial_form.lead_id.value + "&dispo=" + LeaDDispO + '' + + "&dialed_number=" + dialed_number + '' + + "&dialed_label=" + dialed_label + '' + webform_session; var regWFspace = new RegExp(" ","ig"); @@ -3568,6 +3873,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} {var group = VDCL_group_id;} else {var group = campaign;} + if ( (dialed_label.length < 3) || (dialed_label=='NONE') ) {dialed_label='MAIN';} web_form_vars = "lead_id=" + document.vicidial_form.lead_id.value + @@ -3614,6 +3920,8 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} "&phone=" + document.vicidial_form.phone_number.value + "&parked_by=" + document.vicidial_form.lead_id.value + "&dispo=" + LeaDDispO + '' + + "&dialed_number=" + dialed_number + '' + + "&dialed_label=" + dialed_label + '' + webform_session; var regWFspace = new RegExp(" ","ig"); @@ -3658,6 +3966,28 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} } +// ################################################################################ +// Send leave 3way call a second time from the dispo screen + function DispoLeavE3wayAgaiN() + { + XDchannel = DispO3wayXtrAchannel; + document.vicidial_form.xfernumber.value = DispO3wayCalLxfernumber; + document.vicidial_form.xfercode.value = DispO3wayCalLcamptail; + MDchannel = DispO3waychannel; + lastcustserverip = DispO3wayCalLserverip; + + document.getElementById("DispoSelectHAspan").innerHTML = ""; + + leave_3way_call('SECOND'); + + DispO3waychannel = ''; + DispO3wayXtrAchannel = ''; + DispO3wayCalLserverip = ''; + DispO3wayCalLxfernumber = ''; + DispO3wayCalLcamptail = ''; + } + + // ################################################################################ // Start Hangup Functions for both function bothcall_send_hangup() @@ -3670,7 +4000,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} // ################################################################################ // Send Hangup command for customer call connected to the conference now to Manager - function dialedcall_send_hangup(dispowindow) + function dialedcall_send_hangup(dispowindow,hotkeysused,altdispo) { var form_cust_channel = document.vicidial_form.callchannel.value; var form_cust_serverip = document.vicidial_form.callserverip.value; @@ -3808,10 +4138,36 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} if (document.vicidial_form.DiaLAltPhonE.checked==true) { reselect_alt_dial = 1; + if (altdispo == 'ALTPH2') + { + ManualDialOnly('ALTTeléfonoE'); + } + else + { + if (altdispo == 'ADDR3') + { + ManualDialOnly('AddresS3'); + } + else + { + if (hotkeysused == 'YES') + { + reselect_alt_dial = 0; + manual_auto_hotkey = 1; + } + } + } } else { - document.getElementById("DiaLControl").innerHTML = "\"Marcar"; + if (hotkeysused == 'YES') + { + manual_auto_hotkey = 1; + } + else + { + document.getElementById("DiaLControl").innerHTML = "\"Marcar"; + } reselect_alt_dial = 0; } } @@ -3820,6 +4176,27 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} if (document.vicidial_form.DiaLAltPhonE.checked==true) { reselect_alt_dial = 1; + if (altdispo == 'ALTPH2') + { + ManualDialOnly('ALTTeléfonoE'); + } + else + { + if (altdispo == 'ADDR3') + { + ManualDialOnly('AddresS3'); + } + else + { + if (hotkeysused == 'YES') + { + document.getElementById("MainStatuSSpan").style.background = panel_bgcolor; + document.getElementById("MainStatuSSpan").innerHTML = ''; + document.getElementById("DiaLControl").innerHTML = DiaLControl_auto_HTML_OFF; + reselect_alt_dial = 0; + } + } + } } else { @@ -3965,6 +4342,14 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} // Update vicidial_list lead record with all altered values from form function CustomerData_update() { + + var REGcommentsAMP = new RegExp('&',"g"); + var REGcommentsQUES = new RegExp("\\?","g"); + var REGcommentsPOUND = new RegExp("\\#","g"); + var REGcommentsRESULT = document.vicidial_form.comments.value.replace(REGcommentsAMP, "--AMP--"); + REGcommentsRESULT = REGcommentsRESULT.replace(REGcommentsQUES, "--QUES--"); + REGcommentsRESULT = REGcommentsRESULT.replace(REGcommentsPOUND, "--POUND--"); + var xmlhttp=false; /*@cc_on @*/ /*@if (@_jscript_version >= 5) @@ -3986,7 +4371,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} } if (xmlhttp) { - VLupdate_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=updateLEAD&format=text&user=" + user + "&pass=" + pass + + VLupdate_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&campaign=" + campaign + "&ACTION=updateLEAD&format=text&user=" + user + "&pass=" + pass + "&lead_id=" + document.vicidial_form.lead_id.value + "&vendor_lead_code=" + document.vicidial_form.vendor_lead_code.value + "&phone_number=" + document.vicidial_form.phone_number.value + @@ -4007,7 +4392,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} "&alt_phone=" + document.vicidial_form.alt_phone.value + "&email=" + document.vicidial_form.email.value + "&security_phrase=" + document.vicidial_form.security_phrase.value + - "&comments=" + document.vicidial_form.comments.value; + "&comments=" + REGcommentsRESULT; xmlhttp.open('POST', 'vdc_db_query.php'); xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8'); xmlhttp.send(VLupdate_query); @@ -4053,6 +4438,34 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} document.getElementById("DispoSelectContent").innerHTML = dispo_HTML; } +// ################################################################################ +// Generate the Pausa Code Chooser panel + function PauseCodeSelectContent_create() + { + if ( (AutoDialWaiting == 1) || (VD_live_customer_call==1) || (alt_dial_active==1) ) + { + alert("USTED DEBE SER DETENIDO BREVEMENTE PARA INTRODUCIR Un CÓDIGO De la PAUSA EN AUTO-DIAL MODE"); + } + else + { + showDiv('PausaCodeSelectBox'); + WaitingForNextStep=1; + PausaCode_HTML = ''; + document.vicidial_form.PausaCodeSelection.value = ''; + var VD_pause_codes_ct_half = parseInt(VD_pause_codes_ct / 2); + PausaCode_HTML = "
Call Wrapup: seconds remaining in wrapup



@@ -5653,23 +6137,28 @@ Your Status:
Calls Dialing: + +
Your session has been disabled
LOGOUT

Go Back +
+
+ +

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
@@ -5682,8 +6171,15 @@ Your Status:
Calls Dialing: +
SELECT A PAUSE CODE :
+ Pause Code Selection + +

  +
+
- +
Select a CallBack Date :
@@ -5726,7 +6222,7 @@ Your Status:
Calls Dialing: + @@ -5823,6 +6302,7 @@ RECORD ID:
+
CLOSER INBOUND GROUP SELECTION
Closer Inbound Group Selection
@@ -5737,7 +6233,7 @@ Your Status:
Calls Dialing: + Channel Channel @@ -5747,25 +6243,8 @@ Your Status:
Calls Dialing: - - - - - -
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
@@ -5809,7 +6288,7 @@ RECORD ID:

Hangup Customer

-Send DTMF
+
Send DTMF

@@ -5851,14 +6331,18 @@ RECORD ID:
+\n";} + {echo "\n";} else - {echo "\n";} + {echo "\n";} ?> - + +
seconds:   Channel:   Cust Time:   Email:
Comments: +
+
diff --git a/agc_2-X/trunk/LANG_www/agc_es/conf_exten_check.php b/agc_2-X/trunk/LANG_www/agc_es/conf_exten_check.php index 45d9c0dd..de75d295 100644 --- a/agc_2-X/trunk/LANG_www/agc_es/conf_exten_check.php +++ b/agc_2-X/trunk/LANG_www/agc_es/conf_exten_check.php @@ -33,6 +33,7 @@ # 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 # 61128-2255 - Added update for manual dial vicidial_live_agents +# 70319-1542 - Added agent disabled display function # require("dbconnect.php"); @@ -69,8 +70,8 @@ if (!isset($format)) {$format="text";} if (!isset($ACTION)) {$ACTION="refresh";} if (!isset($client)) {$client="agc";} -$version = '0.0.10'; -$build = '61128-2255'; +$version = '0.0.11'; +$build = '70319-1542'; $StarTtime = date("U"); $NOW_DATE = date("Y-m-d"); $NOW_TIME = date("Y-m-d H:i:s"); @@ -144,6 +145,23 @@ echo " if ($client == 'vdc') { + $Acount=0; + $AexternalDEAD=0; + + ### see if the agent has a record in the vicidial_live_agents table + $stmt="SELECT count(*) 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); + $Acount=$row[0]; + + # ### find out if external table shows agent should be disabled + # $stmt="SELECT count(*) from another_table where user='$user' and status='DEAD';"; + # if ($DB) {echo "|$stmt|\n";} + # $rslt=mysql_query($stmt, $link); + # $row=mysql_fetch_row($rslt); + # $AexternalDEAD=$row[0]; + if ($auto_dial_level > 0) { ### update the vicidial_live_agents every second with a new random number so it is shown to be alive @@ -186,6 +204,9 @@ echo " } + if ($Acount < 1) {$Astatus='DEAD_VLA';} + if ($AexternalDEAD > 0) {$Astatus='DEAD_EXTERNAL';} + echo 'DateTime: ' . $NOW_TIME . '|UnixTime: ' . $StarTtime . '|Estado: ' . $Astatus . '|CampCalls: ' . $RingCalls . "|\n"; } diff --git a/agc_2-X/trunk/LANG_www/agc_es/manager_send.php b/agc_2-X/trunk/LANG_www/agc_es/manager_send.php index 1095cced..b8154a10 100644 --- a/agc_2-X/trunk/LANG_www/agc_es/manager_send.php +++ b/agc_2-X/trunk/LANG_www/agc_es/manager_send.php @@ -1,7 +1,7 @@ LICENSE: GPLv2 +# Copyright (C) 2007 Matt Florell 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 @@ -12,7 +12,7 @@ # - $user # - $pass # optional variables: -# - $ACTION - ('Originate','Redirect','Hangup','Command','Monitor','StopMonitor','SysCIDOriginate','RedirectName','RedirectNameVmail','MonitorConf','StopMonitorConf','RedirectXtra','RedirectXtraCX','RedirectVD','HangupConfDial','VolumeControl') +# - $ACTION - ('Originate','Redirect','Hangup','Command','Monitor','StopMonitor','SysCIDOriginate','RedirectName','RedirectNameVmail','MonitorConf','StopMonitorConf','RedirectXtra','RedirectXtraCX','RedirectVD','HangupConfDial','VolumeControl','OriginateVDRelogin') # - $queryCID - ('CN012345678901234567',...) # - $format - ('text','debug') # - $channel - ('Zap/41-1','SIP/test101-1jut','IAX2/iaxy@iaxy',...) @@ -35,7 +35,7 @@ # - $stage - ('UP','DOWN') # -# changes +# CHANGELOG: # 50401-1002 - First build of script, Hangup function only # 50404-1045 - Redirect basic function enabled # 50406-1522 - Monitor basic function enabled @@ -64,6 +64,10 @@ # 61004-1526 - Added parsing of volume control command and lookup or number # 61130-1617 - Added lead_id to MonitorConf for recording_log # 61201-1115 - Added user to MonitorConf for recording_log +# 70111-1600 - added ability to use BLEND/INBND/*_C/*_B/*_I as closer campaigns +# 70226-1251 - Added Mute/UnMute to conference volume control +# 70320-1502 - Added option to allow retry of leave-3way-call and debug logging +# 70322-1636 - Added sipsak display ability # require("dbconnect.php"); @@ -123,6 +127,16 @@ if (isset($_GET["phone_number"])) {$phone_number=$_GET["phone_number"];} elseif (isset($_POST["phone_number"])) {$phone_number=$_POST["phone_number"];} if (isset($_GET["stage"])) {$stage=$_GET["stage"];} elseif (isset($_POST["stage"])) {$stage=$_POST["stage"];} +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["phone_ip"])) {$phone_ip=$_GET["phone_ip"];} + elseif (isset($_POST["phone_ip"])) {$phone_ip=$_POST["phone_ip"];} +if (isset($_GET["enable_sipsak_messages"])) {$enable_sipsak_messages=$_GET["enable_sipsak_messages"];} + elseif (isset($_POST["enable_sipsak_messages"])) {$enable_sipsak_messages=$_POST["enable_sipsak_messages"];} +if (isset($_GET["allow_sipsak_messages"])) {$allow_sipsak_messages=$_GET["allow_sipsak_messages"];} + elseif (isset($_POST["allow_sipsak_messages"])) {$allow_sipsak_messages=$_POST["allow_sipsak_messages"];} $user=ereg_replace("[^0-9a-zA-Z]","",$user); $pass=ereg_replace("[^0-9a-zA-Z]","",$pass); @@ -133,8 +147,8 @@ if (!isset($ACTION)) {$ACTION="Originate";} if (!isset($format)) {$format="alert";} if (!isset($ext_priority)) {$ext_priority="1";} -$version = '2.0.27'; -$build = '61130-1617'; +$version = '2.0.29'; +$build = '70320-1502'; $StarTtime = date("U"); $NOW_DATE = date("Y-m-d"); $NOW_TIME = date("Y-m-d H:i:s"); @@ -279,6 +293,21 @@ if ($ACTION=="OriginateNameVmail") } } +if ($ACTION=="OriginateVDRelogin") +{ + if ( ($enable_sipsak_messages > 0) and ($allow_sipsak_messages > 0) and (eregi("SIP",$protocol)) ) + { + $CIDdate = date("ymdHis"); + $DS='-'; + $SIPSAK_prefix = 'LIN-'; + print "\n"; + passthru("/usr/local/bin/sipsak -M -O desktop -B \"$SIPSAK_prefix$campaign\" -r 5060 -s sip:$extension@$phone_ip > /dev/null"); + $queryCID = "$SIPSAK_prefix$campaign$DS$CIDdate"; + + } + $ACTION="Originate"; +} + if ($ACTION=="Originate") { if ( (strlen($exten)<1) or (strlen($channel)<1) or (strlen($ext_context)<1) or (strlen($queryCID)<10) ) @@ -430,7 +459,7 @@ if ($ACTION=="RedirectVD") else { if (strlen($call_server_ip)>6) {$server_ip = $call_server_ip;} - if (eregi("CLOSER",$campaign)) + if (eregi("(CLOSER|BLEND|INBND|_C$|_B$|_I$)",$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";} @@ -560,6 +589,7 @@ if ($ACTION=="RedirectNameVmail") if ($ACTION=="RedirectXtraCX") { + $DBout=''; $row=''; $rowx=''; $channel_liveX=1; $channel_liveY=1; @@ -575,6 +605,15 @@ if ($ACTION=="RedirectXtraCX") echo "ext_context $ext_context debe ser fijado\n"; echo "ext_priority $ext_priority debe ser fijado\n"; echo "\nRedirect Action no enviado\n"; + if (ereg("SECOND|FIRST|DEBUG",$filename)) + { + if ($WeBRooTWritablE > 0) + { + $fp = fopen ("./vicidial_debug.txt", "a"); + fwrite ($fp, "$NOW_TIME|RDCXC|$filename|$user|$campaign|$$channel|$extrachannel|$queryCID|$exten|$ext_context|ext_priority|\n"); + fclose($fp); + } + } } else { @@ -594,6 +633,7 @@ if ($ACTION=="RedirectXtraCX") { $channel_liveX=0; echo "Canal $channel no está activo en $call_server_ip, Redirect comando no insertado\n"; + if (ereg("SECOND|FIRST|DEBUG",$filename)) {$DBout .= "$channel no está activo en $call_server_ip";} } } $stmt="SELECT count(*) FROM live_channels where server_ip = '$server_ip' and channel='$extrachannel';"; @@ -610,6 +650,7 @@ if ($ACTION=="RedirectXtraCX") { $channel_liveY=0; echo "Canal $channel no está activo en $server_ip, Redirect comando no insertado\n"; + if (ereg("SECOND|FIRST|DEBUG",$filename)) {$DBout .= "$channel no está activo en $server_ip";} } } if ( ($channel_liveX==1) && ($channel_liveY==1) ) @@ -622,6 +663,7 @@ if ($ACTION=="RedirectXtraCX") { $channel_liveY=0; echo "No Local agent to send call to, Redirect comando no insertado\n"; + if (ereg("SECOND|FIRST|DEBUG",$filename)) {$DBout .= "No Local agent to send call to";} } else { @@ -654,6 +696,7 @@ if ($ACTION=="RedirectXtraCX") $rslt=mysql_query($stmt, $link); echo "RedirectXtraCX comando enviado a Canal $channel en $call_server_ip and \nHungup $extrachannel en $server_ip\n"; + if (ereg("SECOND|FIRST|DEBUG",$filename)) {$DBout .= "$channel en $call_server_ip, Hungup $extrachannel en $server_ip";} } } else @@ -662,8 +705,19 @@ if ($ACTION=="RedirectXtraCX") {$ACTION="Redirect"; $server_ip = $call_server_ip;} if ($channel_liveY==1) {$ACTION="Redirect"; $channel=$extrachannel;} - + if (ereg("SECOND|FIRST|DEBUG",$filename)) {$DBout .= "Changed to Redirect: $channel en $server_ip";} } + + if (ereg("SECOND|FIRST|DEBUG",$filename)) + { + if ($WeBRooTWritablE > 0) + { + $fp = fopen ("./vicidial_debug.txt", "a"); + fwrite ($fp, "$NOW_TIME|RDCXC|$filename|$user|$campaign|$DBout|\n"); + fclose($fp); + } + } + } } @@ -688,6 +742,15 @@ if ($ACTION=="RedirectXtra") echo "ext_context $ext_context debe ser fijado\n"; echo "ext_priority $ext_priority debe ser fijado\n"; echo "\nRedirect Action no enviado\n"; + if (ereg("SECOND|FIRST|DEBUG",$filename)) + { + if ($WeBRooTWritablE > 0) + { + $fp = fopen ("./vicidial_debug.txt", "a"); + fwrite ($fp, "$NOW_TIME|RDX|$filename|$user|$campaign|$$channel|$extrachannel|$queryCID|$exten|$ext_context|ext_priority|\n"); + fclose($fp); + } + } } else { @@ -708,6 +771,7 @@ if ($ACTION=="RedirectXtra") { $channel_liveX=0; echo "No puede encontrar conferencia vacía en $server_ip, Redirect comando no insertado\n"; + if (ereg("SECOND|FIRST|DEBUG",$filename)) {$DBout .= "No puede encontrar conferencia vacía en $server_ip";} } } @@ -717,7 +781,7 @@ if ($ACTION=="RedirectXtra") if ($format=='debug') {echo "\n";} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); - if ($row[0]==0) + if ( ($row[0]==0) && (!ereg("SECOND",$filename)) ) { $stmt="SELECT count(*) FROM live_sip_channels where server_ip = '$call_server_ip' and channel='$channel';"; if ($format=='debug') {echo "\n";} @@ -727,13 +791,14 @@ if ($ACTION=="RedirectXtra") { $channel_liveX=0; echo "Canal $channel no está activo en $call_server_ip, Redirect comando no insertado\n"; + if (ereg("SECOND|FIRST|DEBUG",$filename)) {$DBout .= "$channel no está activo en $call_server_ip";} } } $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) + if ( ($row[0]==0) && (!ereg("SECOND",$filename)) ) { $stmt="SELECT count(*) FROM live_sip_channels where server_ip = '$server_ip' and channel='$extrachannel';"; if ($format=='debug') {echo "\n";} @@ -743,6 +808,7 @@ if ($ACTION=="RedirectXtra") { $channel_liveY=0; echo "Canal $channel no está activo en $server_ip, Redirect comando no insertado\n"; + if (ereg("SECOND|FIRST|DEBUG",$filename)) {$DBout .= "$channel no está activo en $server_ip";} } } if ( ($channel_liveX==1) && ($channel_liveY==1) ) @@ -754,6 +820,7 @@ if ($ACTION=="RedirectXtra") $rslt=mysql_query($stmt, $link); echo "RedirectXtra comando enviado a Canal $channel and \nExtraCanal $extrachannel\n to $exten en $server_ip\n"; + if (ereg("SECOND|FIRST|DEBUG",$filename)) {$DBout .= "$channel and $extrachannel to $exten en $server_ip";} } else { @@ -778,6 +845,7 @@ if ($ACTION=="RedirectXtra") $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"; + if (ereg("SECOND|FIRST|DEBUG",$filename)) {$DBout .= "$channel/$call_server_ip and $extrachannel/$server_ip to $exten";} } } else @@ -788,6 +856,17 @@ if ($ACTION=="RedirectXtra") {$ACTION="Redirect"; $channel=$extrachannel;} } + + if (ereg("SECOND|FIRST|DEBUG",$filename)) + { + if ($WeBRooTWritablE > 0) + { + $fp = fopen ("./vicidial_debug.txt", "a"); + fwrite ($fp, "$NOW_TIME|RDX|$filename|$user|$campaign|$DBout|\n"); + fclose($fp); + } + } + } } } @@ -1018,8 +1097,10 @@ if ($ACTION=="VolumeControl") else { $participant_number='XXYYXXYYXXYYXX'; + if (eregi('UP',$stage)) {$vol_prefix='4';} if (eregi('DOWN',$stage)) {$vol_prefix='3';} - else {$vol_prefix='4';} + if (eregi('UNMUTE',$stage)) {$vol_prefix='2';} + if (eregi('MUTING',$stage)) {$vol_prefix='1';} $local_DEF = 'Local/'; $local_AMP = '@'; $volume_local_channel = "$local_DEF$participant_number$vol_prefix$exten$local_AMP$ext_context"; diff --git a/agc_2-X/trunk/LANG_www/agc_es/vdc_db_query.php b/agc_2-X/trunk/LANG_www/agc_es/vdc_db_query.php index 8f533160..87210adc 100644 --- a/agc_2-X/trunk/LANG_www/agc_es/vdc_db_query.php +++ b/agc_2-X/trunk/LANG_www/agc_es/vdc_db_query.php @@ -1,7 +1,7 @@ LICENSE: GPLv2 +# Copyright (C) 2007 Matt Florell 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 @@ -13,7 +13,7 @@ # - $pass # optional variables: # - $format - ('text','debug') -# - $ACTION - ('regCLOSER','manDiaLnextCALL','manDiaLskip','manDiaLonly','manDiaLlookCALL','manDiaLlogCALL','userLOGout','updateDISPO','VDADpause','VDADready','VDADcheckINCOMING','UpdatEFavoritEs','CalLBacKLisT','CalLBacKCounT') +# - $ACTION - ('regCLOSER','manDiaLnextCALL','manDiaLskip','manDiaLonly','manDiaLlookCALL','manDiaLlogCALL','userLOGout','updateDISPO','VDADpause','VDADready','VDADcheckINCOMING','UpdatEFavoritEs','CalLBacKLisT','CalLBacKCounT','PauseCodeSubmit') # - $stage - ('start','finish','lookup','new') # - $closer_choice - ('CL_TESTCAMP_L CL_OUT123_L -') # - $conf_exten - ('8600011',...) @@ -70,7 +70,7 @@ # - $omit_phone_code - ('Y','N') # - $no_delete_sessions - ('0','1') -# changes +# CHANGELOG: # 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 @@ -101,7 +101,7 @@ # - 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 +# 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 @@ -110,10 +110,28 @@ # 60821-1647 - Added ability to not delete sessions at logout # 60906-1124 - Added lookup and sending of callback data for CALLBK calls # 61128-2229 - Added vicidial_live_agents and vicidial_auto_calls manual dial entries +# 70111-1600 - Added ability to use BLEND/INBND/*_C/*_B/*_I as closer campaigns +# 70115-1733 - Added alt_dial functionality in auto-dial modes +# 70118-1501 - Added user_group to vicidial_log,_agent_log,_closer_log,_callbacks +# 70123-1357 - Fixed bug that would not update vicidial_closer_log status to dispo +# 70202-1438 - Added pause code submit function +# 70203-0930 - Added dialed_number to lead info output +# 70203-1030 - Added dialed_label to lead info output +# 70206-1126 - Added INBOUND status for inbound/closer calls in vicidial_live_agents +# 70212-1253 - Fixed small issue with CXFER +# 70213-1431 - Added QueueMetrics PAUSE/UNPAUSE/AGENTLOGIN/AGENTLOGOFF actions +# 70214-1231 - Added queuemetrics_log_id field for server_id in queue_log +# 70215-1210 - Added queuemetrics COMPLETEAGENT action +# 70216-1051 - Fixed double call complete queuemetrics logging +# 70222-1616 - Changed queue_log PAUSE/UNPAUSE to PAUSEALL/UNPAUSEALL +# 70309-1034 - Allow amphersands and questions marks in comments to pass through +# 70313-1052 - Allow pound signs(hash) in comments to pass through +# 70319-1544 - Added agent disable update customer data function +# 70322-1545 - Added sipsak display ability # -$version = '2.0.38'; -$build = '61128-2229'; +$version = '2.0.55'; +$build = '70322-1545'; require("dbconnect.php"); @@ -240,6 +258,10 @@ if (isset($_GET["use_internal_dnc"])) {$use_internal_dnc=$_GET["use_internal_d elseif (isset($_POST["use_internal_dnc"])) {$use_internal_dnc=$_POST["use_internal_dnc"];} if (isset($_GET["omit_phone_code"])) {$omit_phone_code=$_GET["omit_phone_code"];} elseif (isset($_POST["omit_phone_code"])) {$omit_phone_code=$_POST["omit_phone_code"];} +if (isset($_GET["phone_ip"])) {$phone_ip=$_GET["phone_ip"];} + elseif (isset($_POST["phone_ip"])) {$phone_ip=$_POST["phone_ip"];} +if (isset($_GET["enable_sipsak_messages"])) {$enable_sipsak_messages=$_GET["enable_sipsak_messages"];} + elseif (isset($_POST["enable_sipsak_messages"])) {$enable_sipsak_messages=$_POST["enable_sipsak_messages"];} $user=ereg_replace("[^0-9a-zA-Z]","",$user); @@ -261,6 +283,7 @@ $CIDdate = date("mdHis"); $ENTRYdate = date("YmdHis"); if (!isset($query_date)) {$query_date = $NOW_DATE;} $MT[0]=''; +$agents='@agents'; $stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;"; if ($DB) {echo "|$stmt|\n";} @@ -375,7 +398,7 @@ if ($ACTION == 'manDiaLnextCaLL') 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) ) + if ( (strlen($callback_id)>0) and (strlen($lead_id)>0) ) { $affected_rows=1; $CBleadIDset=1; @@ -421,7 +444,7 @@ if ($ACTION == 'manDiaLnextCaLL') if ($DB) {echo "$stmt\n";} $rslt=mysql_query($stmt, $link); $affected_rows = mysql_affected_rows($link); - $lead_id = mysql_insert_id(); + $lead_id = mysql_insert_id($link); $CBleadIDset=1; } } @@ -432,7 +455,7 @@ if ($ACTION == 'manDiaLnextCaLL') if ($DB) {echo "$stmt\n";} $rslt=mysql_query($stmt, $link); $affected_rows = mysql_affected_rows($link); - $lead_id = mysql_insert_id(); + $lead_id = mysql_insert_id($link); $CBleadIDset=1; } } @@ -535,7 +558,7 @@ if ($ACTION == 'manDiaLnextCaLL') $rslt=mysql_query($stmt, $link); } - $stmt="UPDATE vicidial_agent_log set lead_id='$lead_id' where agent_log_id='$agent_log_id';"; + $stmt="UPDATE vicidial_agent_log set lead_id='$lead_id',comments='MANUAL' where agent_log_id='$agent_log_id';"; if ($format=='debug') {echo "\n";} $rslt=mysql_query($stmt, $link); @@ -579,7 +602,7 @@ if ($ACTION == 'manDiaLnextCaLL') $rslt=mysql_query($stmt, $link); ### update the agent status to INCALL in vicidial_live_agents - $stmt = "UPDATE vicidial_live_agents set status='INCALL',last_call_time='$NOW_TIME',callerid='$MqueryCID',lead_id='$lead_id' where user='$user' and server_ip='$server_ip';"; + $stmt = "UPDATE vicidial_live_agents set status='INCALL',last_call_time='$NOW_TIME',callerid='$MqueryCID',lead_id='$lead_id',comments='MANUAL' where user='$user' and server_ip='$server_ip';"; if ($DB) {echo "$stmt\n";} $rslt=mysql_query($stmt, $link); } @@ -619,6 +642,8 @@ if ($ACTION == 'manDiaLnextCaLL') $LeaD_InfO .= $CBcallback_time . "\n"; $LeaD_InfO .= $CBuser . "\n"; $LeaD_InfO .= $CBcomments . "\n"; + $LeaD_InfO .= $phone_number . "\n"; + $LeaD_InfO .= "MAIN\n"; echo $LeaD_InfO; @@ -716,7 +741,7 @@ if ($ACTION == 'manDiaLonly') $rslt=mysql_query($stmt, $link); ### update the agent status to INCALL in vicidial_live_agents - $stmt = "UPDATE vicidial_live_agents set status='INCALL',last_call_time='$NOW_TIME',callerid='$MqueryCID',lead_id='$lead_id' where user='$user' and server_ip='$server_ip';"; + $stmt = "UPDATE vicidial_live_agents set status='INCALL',last_call_time='$NOW_TIME',callerid='$MqueryCID',lead_id='$lead_id',comments='MANUAL' where user='$user' and server_ip='$server_ip';"; if ($DB) {echo "$stmt\n";} $rslt=mysql_query($stmt, $link); @@ -795,8 +820,18 @@ if ($stage == "start") } else { + $user_group=''; + $stmt="SELECT user_group FROM vicidial_users where user='$user' LIMIT 1;"; + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $ug_record_ct = mysql_num_rows($rslt); + if ($ug_record_ct > 0) + { + $row=mysql_fetch_row($rslt); + $user_group = trim("$row[0]"); + } ##### 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');"; + $stmt="INSERT INTO vicidial_log (uniqueid,lead_id,list_id,campaign_id,call_date,start_epoch,status,phone_code,phone_number,user,comments,processed,user_group) values('$uniqueid','$lead_id','$list_id','$campaign','$NOW_TIME','$StarTtime','INCALL','$phone_code','$phone_number','$user','MANUAL','N','$user_group');"; if ($DB) {echo "$stmt\n";} $rslt=mysql_query($stmt, $link); $affected_rows = mysql_affected_rows($link); @@ -844,10 +879,10 @@ if ($stage == "end") { if ($start_epoch < 1000) { - if (eregi("CLOSER",$campaign)) + if (eregi("(CLOSER|BLEND|INBND|_C$|_B$|_I$)",$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';"; + $stmt="SELECT start_epoch FROM vicidial_closer_log where phone_number='$phone_number' and lead_id='$lead_id' and user='$user' order by closecallid desc limit 1;"; } else { @@ -870,32 +905,249 @@ if ($stage == "end") } else {$length_in_sec = ($StarTtime - $start_epoch);} - if (eregi("CLOSER",$campaign)) + if (eregi("(CLOSER|BLEND|INBND|_C$|_B$|_I$)",$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); } + + ############################################# + ##### COMIENZO QUEUEMETRICS LOGGING LOOKUP ##### + $stmt = "SELECT enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_log_id FROM system_settings;"; + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $qm_conf_ct = mysql_num_rows($rslt); + $i=0; + while ($i < $qm_conf_ct) + { + $row=mysql_fetch_row($rslt); + $enable_queuemetrics_logging = $row[0]; + $queuemetrics_server_ip = $row[1]; + $queuemetrics_dbname = $row[2]; + $queuemetrics_login = $row[3]; + $queuemetrics_pass = $row[4]; + $queuemetrics_log_id = $row[5]; + $i++; + } + ##### END QUEUEMETRICS LOGGING LOOKUP ##### + ########################################### + if ($auto_dial_level > 0) { + ### check to see if campaign has alt_dial enabled + $stmt="SELECT auto_alt_dial FROM vicidial_campaigns where campaign_id='$campaign';"; + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $VAC_mancall_ct = mysql_num_rows($rslt); + if ($VAC_mancall_ct > 0) + { + $row=mysql_fetch_row($rslt); + $auto_alt_dial =$row[0]; + } + else {$auto_alt_dial = 'NONE';} + if (eregi("(ALT_ONLY|ADDR3_ONLY|ALT_AND_ADDR3)",$auto_alt_dial)) + { + ### check to see if lead should be alt_dialed + $stmt="SELECT alt_dial FROM vicidial_auto_calls where lead_id='$lead_id';"; + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $VAC_mancall_ct = mysql_num_rows($rslt); + if ($VAC_mancall_ct > 0) + { + $row=mysql_fetch_row($rslt); + $alt_dial =$row[0]; + } + else {$alt_dial = 'NONE';} + + if ( (eregi("(NONE|MAIN)",$alt_dial)) and (eregi("(ALT_ONLY|ALT_AND_ADDR3)",$auto_alt_dial)) ) + { + $stmt="SELECT alt_phone,gmt_offset_now,state FROM vicidial_list where lead_id='$lead_id';"; + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $VAC_mancall_ct = mysql_num_rows($rslt); + if ($VAC_mancall_ct > 0) + { + $row=mysql_fetch_row($rslt); + $alt_phone = $row[0]; + $alt_phone = eregi_replace("[^0-9]","",$alt_phone); + $gmt_offset_now = $row[1]; + $state = $row[2]; + } + else {$alt_phone = '';} + if (strlen($alt_phone)>5) + { + ### insert record into vicidial_hopper for address3 call attempt + $stmt = "INSERT INTO vicidial_hopper SET lead_id='$lead_id',campaign_id='$campaign',status='HOLD',list_id='$list_id',gmt_offset_now='$gmt_offset_now',state='$state',alt_dial='ALT',user='';"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + } + } + if ( ( (eregi("(ALT)",$alt_dial)) and (eregi("ALT_AND_ADDR3",$auto_alt_dial)) ) or ( (eregi("(NONE|MAIN)",$alt_dial)) and (eregi("ADDR3_ONLY",$auto_alt_dial)) ) ) + { + $stmt="SELECT address3,gmt_offset_now,state FROM vicidial_list where lead_id='$lead_id';"; + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $VAC_mancall_ct = mysql_num_rows($rslt); + if ($VAC_mancall_ct > 0) + { + $row=mysql_fetch_row($rslt); + $address3 = $row[0]; + $address3 = eregi_replace("[^0-9]","",$address3); + $gmt_offset_now = $row[1]; + $state = $row[2]; + } + else {$address3 = '';} + if (strlen($address3)>5) + { + ### insert record into vicidial_hopper for address3 call attempt + $stmt = "INSERT INTO vicidial_hopper SET lead_id='$lead_id',campaign_id='$campaign',status='HOLD',list_id='$list_id',gmt_offset_now='$gmt_offset_now',state='$state',alt_dial='ADDR3',user='';"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + } + } + } + + if ($enable_queuemetrics_logging > 0) + { + ### check to see if lead should be alt_dialed + $stmt="SELECT auto_call_id,lead_id,phone_number,status,campaign_id,phone_code,alt_dial,stage,callerid,uniqueid from vicidial_auto_calls where lead_id='$lead_id';"; + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $VAC_qm_ct = mysql_num_rows($rslt); + if ($VAC_qm_ct > 0) + { + $row=mysql_fetch_row($rslt); + $auto_call_id = $row[0]; + $CLlead_id = $row[1]; + $CLphone_number = $row[2]; + $CLstatus = $row[3]; + $CLcampaign_id = $row[4]; + $CLphone_code = $row[5]; + $CLalt_dial = $row[6]; + $CLstage = $row[7]; + $CLcallerid = $row[8]; + $CLuniqueid = $row[9]; + } + + $CLstage = preg_replace("/.*-/",'',$CLstage); + if (strlen($CLstage) < 1) {$CLstage=0;} + + $linkB=mysql_connect("$queuemetrics_server_ip", "$queuemetrics_login", "$queuemetrics_pass"); + mysql_select_db("$queuemetrics_dbname", $linkB); + + $stmt="SELECT count(*) from queue_log where call_id='$MDnextCID' and verb='COMPLETECALLER';"; + $rslt=mysql_query($stmt, $linkB); + if ($DB) {echo "$stmt\n";} + $VAC_cc_ct = mysql_num_rows($rslt); + if ($VAC_cc_ct > 0) + { + $row=mysql_fetch_row($rslt); + $caller_complete = $row[0]; + } + + if ($caller_complete < 1) + { + $stmt = "INSERT INTO queue_log SET partition='P01',time_id='$StarTtime',call_id='$MDnextCID',queue='$campaign',agent='Agent/$user',verb='COMPLETEAGENT',data1='$CLstage',data2='$length_in_sec',data3='1',serverid='$queuemetrics_log_id';"; + if ($DB) {echo "$stmt\n";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $linkB); + $affected_rows = mysql_affected_rows($linkB); + } + mysql_close($linkB); + } + ### delete call record from vicidial_auto_calls - $stmt = "DELETE from vicidial_auto_calls where uniqueid='$uniqueid';"; + $stmt = "DELETE from vicidial_auto_calls where lead_id='$lead_id';"; 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';"; + + $stmt = "UPDATE vicidial_live_agents set status='PAUSED',lead_id='',uniqueid=0,callerid='',channel='',call_server_ip='',last_call_finish='$NOW_TIME',comments='' where user='$user' and server_ip='$server_ip';"; if ($DB) {echo "$stmt\n";} $rslt=mysql_query($stmt, $link); + $affected_rows = mysql_affected_rows($link); + if ($affected_rows > 0) + { + if ($enable_queuemetrics_logging > 0) + { + $linkB=mysql_connect("$queuemetrics_server_ip", "$queuemetrics_login", "$queuemetrics_pass"); + mysql_select_db("$queuemetrics_dbname", $linkB); + + $stmt = "INSERT INTO queue_log SET partition='P01',time_id='$StarTtime',call_id='NONE',queue='NONE',agent='Agent/$user',verb='PAUSAALL',serverid='$queuemetrics_log_id';"; + if ($DB) {echo "$stmt\n";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $linkB); + $affected_rows = mysql_affected_rows($linkB); + + mysql_close($linkB); + } + } } else { + if ($enable_queuemetrics_logging > 0) + { + ### check to see if lead should be alt_dialed + $stmt="SELECT auto_call_id,lead_id,phone_number,status,campaign_id,phone_code,alt_dial,stage,callerid,uniqueid from vicidial_auto_calls where lead_id='$lead_id';"; + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $VAC_qm_ct = mysql_num_rows($rslt); + if ($VAC_qm_ct > 0) + { + $row=mysql_fetch_row($rslt); + $auto_call_id = $row[0]; + $CLlead_id = $row[1]; + $CLphone_number = $row[2]; + $CLstatus = $row[3]; + $CLcampaign_id = $row[4]; + $CLphone_code = $row[5]; + $CLalt_dial = $row[6]; + $CLstage = $row[7]; + $CLcallerid = $row[8]; + $CLuniqueid = $row[9]; + } + + $CLstage = preg_replace("/XFER|-/",'',$CLstage); + if ($CLstage < 0.25) {$CLstage=0;} + + $linkB=mysql_connect("$queuemetrics_server_ip", "$queuemetrics_login", "$queuemetrics_pass"); + mysql_select_db("$queuemetrics_dbname", $linkB); + + $stmt = "INSERT INTO queue_log SET partition='P01',time_id='$StarTtime',call_id='$MDnextCID',queue='$campaign',agent='Agent/$user',verb='COMPLETEAGENT',data1='$CLstage',data2='$length_in_sec',data3='1',serverid='$queuemetrics_log_id';"; + if ($DB) {echo "$stmt\n";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $linkB); + $affected_rows = mysql_affected_rows($linkB); + + mysql_close($linkB); + } + $stmt = "DELETE from vicidial_auto_calls lead_id='$lead_id';"; 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';"; + $stmt = "UPDATE vicidial_live_agents set status='PAUSED',lead_id='',uniqueid=0,callerid='',channel='',call_server_ip='',last_call_finish='$NOW_TIME',comments='' where user='$user' and server_ip='$server_ip';"; if ($DB) {echo "$stmt\n";} $rslt=mysql_query($stmt, $link); + $affected_rows = mysql_affected_rows($link); + if ($affected_rows > 0) + { + if ($enable_queuemetrics_logging > 0) + { + $linkB=mysql_connect("$queuemetrics_server_ip", "$queuemetrics_login", "$queuemetrics_pass"); + mysql_select_db("$queuemetrics_dbname", $linkB); + + $stmt = "INSERT INTO queue_log SET partition='P01',time_id='$StarTtime',call_id='NONE',queue='NONE',agent='Agent/$user',verb='PAUSAALL',serverid='$queuemetrics_log_id';"; + if ($DB) {echo "$stmt\n";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $linkB); + $affected_rows = mysql_affected_rows($linkB); + + mysql_close($linkB); + } + } } ##### look for the channel in the UPDATED vicidial_manager record of the call initiation @@ -1095,7 +1347,7 @@ if ($ACTION == 'VDADcheckINCOMING') 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';"; + $stmt = "UPDATE vicidial_live_agents set status='INCALL',last_call_time='$NOW_TIME',comments='AUTO' where user='$user' and server_ip='$server_ip';"; if ($DB) {echo "$stmt\n";} $rslt=mysql_query($stmt, $link); @@ -1163,25 +1415,37 @@ if ($ACTION == 'VDADcheckINCOMING') $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';"; + $user_group=''; + $stmt="SELECT user_group FROM vicidial_users where user='$user' LIMIT 1;"; + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $ug_record_ct = mysql_num_rows($rslt); + if ($ug_record_ct > 0) + { + $row=mysql_fetch_row($rslt); + $user_group = trim("$row[0]"); + } + $stmt = "UPDATE vicidial_log set user='$user', comments='AUTO', list_id='$list_id', status='INCALL', user_group='$user_group' where lead_id='$lead_id' and uniqueid='$uniqueid';"; if ($DB) {echo "$stmt\n";} $rslt=mysql_query($stmt, $link); - if (eregi("CLOSER",$campaign)) + if (eregi("(CLOSER|BLEND|INBND|_C$|_B$|_I$)",$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;"; + $stmt = "UPDATE vicidial_closer_log set user='$user', comments='AUTO', list_id='$list_id', status='INCALL', user_group='$user_group' 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;"; + $stmt = "select campaign_id,phone_number,alt_dial 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) + if ($VDAC_cid_ct > 0) { $row=mysql_fetch_row($rslt); $VDADchannel_group =$row[0]; + $dialed_number =$row[1]; + $dialed_label =$row[2]; } $stmt = "select count(*) from vicidial_log where lead_id='$lead_id' and uniqueid='$uniqueid';"; @@ -1211,6 +1475,11 @@ if ($ACTION == 'VDADcheckINCOMING') $VDCL_xferconf_a_number = $row[11]; $VDCL_xferconf_b_dtmf = $row[12]; $VDCL_xferconf_b_number = $row[13]; + + ### update the comments in vicidial_live_agents record + $stmt = "UPDATE vicidial_live_agents set comments='INBOUND' where user='$user' and server_ip='$server_ip';"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); } else { @@ -1263,6 +1532,17 @@ if ($ACTION == 'VDADcheckINCOMING') $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"; + + $stmt = "select phone_number,alt_dial 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 ($VDAC_cid_ct > 0) + { + $row=mysql_fetch_row($rslt); + $dialed_number =$row[0]; + $dialed_label =$row[1]; + } } $comments = eregi_replace("\r",'',$comments); @@ -1300,6 +1580,8 @@ if ($ACTION == 'VDADcheckINCOMING') $LeaD_InfO .= $CBcallback_time . "\n"; $LeaD_InfO .= $CBuser . "\n"; $LeaD_InfO .= $CBcomments . "\n"; + $LeaD_InfO .= $dialed_number . "\n"; + $LeaD_InfO .= $dialed_label . "\n"; echo $LeaD_InfO; @@ -1327,6 +1609,7 @@ if ($ACTION == 'VDADcheckINCOMING') if ($format=='debug') {echo "\n";} $rslt=mysql_query($stmt, $link); } + } else { @@ -1354,8 +1637,18 @@ if ( (strlen($campaign)<1) || (strlen($conf_exten)<1) ) } else { + $user_group=''; + $stmt="SELECT user_group FROM vicidial_users where user='$user' LIMIT 1;"; + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $ug_record_ct = mysql_num_rows($rslt); + if ($ug_record_ct > 0) + { + $row=mysql_fetch_row($rslt); + $user_group = trim("$row[0]"); + } ##### Insert a SALIR record into the user log - $stmt="INSERT INTO vicidial_user_log values('','$user','SALIR','$campaign','$NOW_TIME','$StarTtime');"; + $stmt="INSERT INTO vicidial_user_log (user,event,campaign_id,event_date,event_epoch,user_group) values('$user','SALIR','$campaign','$NOW_TIME','$StarTtime','$user_group');"; if ($DB) {echo "$stmt\n";} $rslt=mysql_query($stmt, $link); $vul_insert = mysql_affected_rows($link); @@ -1390,11 +1683,94 @@ else $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','','','','','','','','','');"; + $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Hangup','ULGH3459$StarTtime','Channel: $agent_channel','','','','','','','','','');"; if ($format=='debug') {echo "\n";} $rslt=mysql_query($stmt, $link); } + $pause_sec=0; + $stmt = "select pause_epoch,pause_sec,wait_epoch,talk_epoch,dispo_epoch 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) and (strlen($row[3]<5)) and (strlen($row[4]<5)) ) + { + $row=mysql_fetch_row($rslt); + $pause_sec = (($StarTtime - $row[0]) + $row[1]); + + $stmt="UPDATE vicidial_agent_log set pause_sec='$pause_sec',wait_epoch='$StarTtime' where agent_log_id='$agent_log_id';"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + } + + if ($vla_delete > 0) + { + ############################################# + ##### COMIENZO QUEUEMETRICS LOGGING LOOKUP ##### + $stmt = "SELECT enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_log_id,allow_sipsak_messages FROM system_settings;"; + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $qm_conf_ct = mysql_num_rows($rslt); + $i=0; + while ($i < $qm_conf_ct) + { + $row=mysql_fetch_row($rslt); + $enable_queuemetrics_logging = $row[0]; + $queuemetrics_server_ip = $row[1]; + $queuemetrics_dbname = $row[2]; + $queuemetrics_login = $row[3]; + $queuemetrics_pass = $row[4]; + $queuemetrics_log_id = $row[5]; + $allow_sipsak_messages = $row[6]; + $i++; + } + ##### END QUEUEMETRICS LOGGING LOOKUP ##### + ########################################### + if ( ($enable_sipsak_messages > 0) and ($allow_sipsak_messages > 0) and (eregi("SIP",$protocol)) ) + { + $SIPSAK_message = 'LOGGED OUT'; + passthru("/usr/local/bin/sipsak -M -O desktop -B \"$SIPSAK_message\" -r 5060 -s sip:$extension@$phone_ip > /dev/null"); + } + + if ($enable_queuemetrics_logging > 0) + { + $linkB=mysql_connect("$queuemetrics_server_ip", "$queuemetrics_login", "$queuemetrics_pass"); + mysql_select_db("$queuemetrics_dbname", $linkB); + + # $stmt = "INSERT INTO queue_log SET partition='P01',time_id='$StarTtime',call_id='NONE',queue='$campaign',agent='Agent/$user',verb='PAUSA',serverid='1';"; + # if ($DB) {echo "$stmt\n";} + # if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + # $rslt=mysql_query($stmt, $linkB); + # $affected_rows = mysql_affected_rows($linkB); + + $stmt = "SELECT time_id FROM queue_log where agent='Agent/$user' and verb='AGENTLOGIN' order by time_id desc limit 1;"; + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $linkB); + if ($DB) {echo "$stmt\n";} + echo "$stmt\n"; + $li_conf_ct = mysql_num_rows($rslt); + $i=0; + while ($i < $li_conf_ct) + { + $row=mysql_fetch_row($rslt); + $logintime = $row[0]; + $i++; + } + + $time_logged_in = ($StarTtime - $logintime); + if ($time_logged_in > 1000000) {$time_logged_in=1;} + + $stmt = "INSERT INTO queue_log SET partition='P01',time_id='$StarTtime',call_id='NONE',queue='$campaign',agent='Agent/$user',verb='AGENTLOGOFF',data1='$user$agents',data2='$time_logged_in',serverid='$queuemetrics_log_id';"; + if ($DB) {echo "$stmt\n";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $linkB); + $affected_rows = mysql_affected_rows($linkB); + + mysql_close($linkB); + } + } + echo "$vul_insert|$vc_remove|$vla_delete|$wcs_delete|$agent_channel\n"; } } @@ -1423,7 +1799,14 @@ if ($ACTION == 'updateDISPO') if ($format=='debug') {echo "\n";} $rslt=mysql_query($stmt, $link); - if ( ($use_internal_dnc=='Y') and ($dispo_choice=='DNC') ) + if (eregi("(CLOSER|BLEND|INBND|_C$|_B$|_I$)",$campaign)) + { + $stmt = "UPDATE vicidial_closer_log set status='$dispo_choice' where lead_id='$lead_id' and user='$user' order by closecallid desc limit 1;"; + if ($DB) {echo "$stmt\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";} @@ -1450,20 +1833,91 @@ if ($ACTION == 'updateDISPO') 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');"; + $user_group=''; + $stmt="SELECT user_group FROM vicidial_users where user='$user' LIMIT 1;"; + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $ug_record_ct = mysql_num_rows($rslt); + if ($ug_record_ct > 0) + { + $row=mysql_fetch_row($rslt); + $user_group = trim("$row[0]"); + } + + $stmt="INSERT INTO vicidial_agent_log (user,server_ip,event_time,campaign_id,pause_epoch,pause_sec,wait_epoch,user_group) values('$user','$server_ip','$NOW_TIME','$campaign','$StarTtime','0','$StarTtime','$user_group');"; if ($DB) {echo "$stmt\n";} $rslt=mysql_query($stmt, $link); $affected_rows = mysql_affected_rows($link); - $agent_log_id = mysql_insert_id(); + $agent_log_id = mysql_insert_id($link); ### LLAMADABACK 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');"; + $stmt="INSERT INTO vicidial_callbacks (lead_id,list_id,campaign_id,status,entry_time,callback_time,user,recipient,comments,user_group) values('$lead_id','$list_id','$campaign','ACTIVE','$NOW_TIME','$CallBackDatETimE','$user','$recipient','$comments','$user_group');"; if ($DB) {echo "$stmt\n";} $rslt=mysql_query($stmt, $link); } + $stmt="SELECT auto_alt_dial_statuses from vicidial_campaigns where campaign_id='$campaign';"; + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + + if ( ($auto_dial_level > 0) and (ereg(" $dispo_choice ",$row[0])) ) + { + $stmt = "select count(*) from vicidial_hopper where lead_id='$lead_id' and status='HOLD';"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + + if ($row[0] > 0) + { + $stmt="UPDATE vicidial_hopper set status='READY' where lead_id='$lead_id' and status='HOLD' limit 1;"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + } + } + else + { + $stmt="DELETE from vicidial_hopper where lead_id='$lead_id' and status='HOLD';"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + } + + ############################################# + ##### COMIENZO QUEUEMETRICS LOGGING LOOKUP ##### + $stmt = "SELECT enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_log_id FROM system_settings;"; + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $qm_conf_ct = mysql_num_rows($rslt); + $i=0; + while ($i < $qm_conf_ct) + { + $row=mysql_fetch_row($rslt); + $enable_queuemetrics_logging = $row[0]; + $queuemetrics_server_ip = $row[1]; + $queuemetrics_dbname = $row[2]; + $queuemetrics_login = $row[3]; + $queuemetrics_pass = $row[4]; + $queuemetrics_log_id = $row[5]; + $i++; + } + ##### END QUEUEMETRICS LOGGING LOOKUP ##### + ########################################### + if ($enable_queuemetrics_logging > 0) + { + $linkB=mysql_connect("$queuemetrics_server_ip", "$queuemetrics_login", "$queuemetrics_pass"); + mysql_select_db("$queuemetrics_dbname", $linkB); + + $stmt = "INSERT INTO queue_log SET partition='P01',time_id='$StarTtime',call_id='$MDnextCID',queue='$campaign',agent='Agent/$user',verb='CALLESTADO',data1='$dispo_choice',serverid='$queuemetrics_log_id';"; + if ($DB) {echo "$stmt\n";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $linkB); + $affected_rows = mysql_affected_rows($linkB); + + mysql_close($linkB); + } + echo 'Lead ' . $lead_id . ' se ha cambiado a ' . $dispo_choice . " Estado\nNext agent_log_id:\n" . $agent_log_id . "\n"; } @@ -1475,6 +1929,8 @@ if ($ACTION == 'updateLEAD') { $MT[0]=''; $row=''; $rowx=''; + $DO_NOT_UPDATE=0; + $DO_NOT_UPDATE_text=''; if ( (strlen($phone_number)<1) || (strlen($lead_id)<1) ) { echo "phone_number $phone_number or lead_id $lead_id No es válido\n"; @@ -1482,12 +1938,54 @@ if ($ACTION == 'updateLEAD') } 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";} + $stmt = "SELECT disable_alter_custdata FROM vicidial_campaigns where campaign_id='$campaign'"; + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $dac_conf_ct = mysql_num_rows($rslt); + $i=0; + while ($i < $dac_conf_ct) + { + $row=mysql_fetch_row($rslt); + $disable_alter_custdata = $row[0]; + $i++; + } + if (ereg('Y',$disable_alter_custdata)) + { + $DO_NOT_UPDATE=1; + $DO_NOT_UPDATE_text=' NOT'; + $stmt = "SELECT alter_custdata_override FROM vicidial_users where user='$user'"; + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $aco_conf_ct = mysql_num_rows($rslt); + $i=0; + while ($i < $aco_conf_ct) + { + $row=mysql_fetch_row($rslt); + $alter_custdata_override = $row[0]; + $i++; + } + if (ereg('ALLOW_ALTER',$alter_custdata_override)) + { + $DO_NOT_UPDATE=0; + $DO_NOT_UPDATE_text=''; + } + } + + if ($DO_NOT_UPDATE < 1) + { + $comments = eregi_replace("\r",'',$comments); + $comments = eregi_replace("\n",'!N',$comments); + $comments = eregi_replace("--AMP--",'&',$comments); + $comments = eregi_replace("--QUES--",'?',$comments); + $comments = eregi_replace("--POUND--",'#',$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';"; @@ -1495,7 +1993,7 @@ if ($ACTION == 'updateLEAD') $rslt=mysql_query($stmt, $link); } - echo "Lead $lead_id La información ha sido actualizada\n"; + echo "Lead $lead_id information has$DO_NOT_UPDATE_text been updated\n"; } @@ -1515,10 +2013,54 @@ if ( ($ACTION == 'VDADpause') || ($ACTION == 'VDADready') ) 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';"; + $stmt="UPDATE vicidial_live_agents set lead_id='',uniqueid=0,callerid='',channel='', random_id='$random',comments='' where user='$user' and server_ip='$server_ip';"; if ($format=='debug') {echo "\n";} $rslt=mysql_query($stmt, $link); + $stmt="UPDATE vicidial_live_agents set status='$stage' where user='$user' and server_ip='$server_ip';"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + $affected_rows = mysql_affected_rows($link); + if ($affected_rows > 0) + { + ############################################# + ##### COMIENZO QUEUEMETRICS LOGGING LOOKUP ##### + $stmt = "SELECT enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_log_id FROM system_settings;"; + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $qm_conf_ct = mysql_num_rows($rslt); + $i=0; + while ($i < $qm_conf_ct) + { + $row=mysql_fetch_row($rslt); + $enable_queuemetrics_logging = $row[0]; + $queuemetrics_server_ip = $row[1]; + $queuemetrics_dbname = $row[2]; + $queuemetrics_login = $row[3]; + $queuemetrics_pass = $row[4]; + $queuemetrics_log_id = $row[5]; + $i++; + } + ##### END QUEUEMETRICS LOGGING LOOKUP ##### + ########################################### + if ($enable_queuemetrics_logging > 0) + { + if (ereg('READY',$stage)) {$QMstatus='UNPAUSEALL';} + if (ereg('PAUSA',$stage)) {$QMstatus='PAUSAALL';} + $linkB=mysql_connect("$queuemetrics_server_ip", "$queuemetrics_login", "$queuemetrics_pass"); + mysql_select_db("$queuemetrics_dbname", $linkB); + + $stmt = "INSERT INTO queue_log SET partition='P01',time_id='$StarTtime',call_id='NONE',queue='NONE',agent='Agent/$user',verb='$QMstatus',serverid='$queuemetrics_log_id';"; + if ($DB) {echo "$stmt\n";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $linkB); + $affected_rows = mysql_affected_rows($linkB); + + mysql_close($linkB); + } + } + if ($agent_log == 'NO') {$donothing=1;} else @@ -1587,6 +2129,71 @@ if ($ACTION == 'UpdatEFavoritEs') } +################################################################################ +### PauseCodeSubmit - Update vicidial_agent_log with pause code +################################################################################ +if ($ACTION == 'PausaCodeSubmit') +{ + $row=''; $rowx=''; + if ( (strlen($status)<1) || (strlen($agent_log_id)<1) ) + { + echo "agent_log_id $agent_log_id or pause_code $status No es válido\n"; + exit; + } + else + { + $stmt="UPDATE vicidial_agent_log set sub_status=\"$status\" where agent_log_id='$agent_log_id';"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + $affected_rows = mysql_affected_rows($link); + if ($affected_rows > 0) + { + ############################################# + ##### COMIENZO QUEUEMETRICS LOGGING LOOKUP ##### + $stmt = "SELECT enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_log_id,allow_sipsak_messages FROM system_settings;"; + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $qm_conf_ct = mysql_num_rows($rslt); + $i=0; + while ($i < $qm_conf_ct) + { + $row=mysql_fetch_row($rslt); + $enable_queuemetrics_logging = $row[0]; + $queuemetrics_server_ip = $row[1]; + $queuemetrics_dbname = $row[2]; + $queuemetrics_login = $row[3]; + $queuemetrics_pass = $row[4]; + $queuemetrics_log_id = $row[5]; + $allow_sipsak_messages = $row[6]; + $i++; + } + ##### END QUEUEMETRICS LOGGING LOOKUP ##### + ########################################### + if ( ($enable_sipsak_messages > 0) and ($allow_sipsak_messages > 0) and (eregi("SIP",$protocol)) ) + { + $SIPSAK_prefix = 'BK-'; + passthru("/usr/local/bin/sipsak -M -O desktop -B \"$SIPSAK_prefix$status\" -r 5060 -s sip:$extension@$phone_ip > /dev/null"); + } + if ($enable_queuemetrics_logging > 0) + { + $linkB=mysql_connect("$queuemetrics_server_ip", "$queuemetrics_login", "$queuemetrics_pass"); + mysql_select_db("$queuemetrics_dbname", $linkB); + + $stmt = "INSERT INTO queue_log SET partition='P01',time_id='$StarTtime',call_id='NONE',queue='$campaign',agent='Agent/$user',verb='PAUSAREASON',serverid='$queuemetrics_log_id',data1='$status';"; + if ($DB) {echo "$stmt\n";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $linkB); + $affected_rows = mysql_affected_rows($linkB); + + mysql_close($linkB); + } + } + } +echo "Pausa Code has been updated to $status for $agent_log_id\n"; +} + + ################################################################################ ### CalLBacKLisT - List the USERONLY callbacks for an agent ################################################################################ diff --git a/agc_2-X/trunk/LANG_www/agc_es/vicidial.php b/agc_2-X/trunk/LANG_www/agc_es/vicidial.php index 0c5590c5..177c376d 100644 --- a/agc_2-X/trunk/LANG_www/agc_es/vicidial.php +++ b/agc_2-X/trunk/LANG_www/agc_es/vicidial.php @@ -1,7 +1,7 @@ LICENSE: GPLv2 +# Copyright (C) 2007 Matt Florell 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 @@ -15,7 +15,7 @@ # - vdc_db_query.php: Updates information in the database # - manager_send.php: Sends manager actions to the DB for execution # -# CHANGES +# CHANGELOG # 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 @@ -132,8 +132,37 @@ # 61128-2229 - Added vicidial_live_agents and vicidial_auto_calls manual dial entries # 61130-1617 - Added lead_id to MonitorConf for recording_log # 61221-1212 - Changed width to 760 to better fit 800x600 screens, widened SCRIPT +# 70109-1128 - Fixed wrapup timer bug +# 70109-1635 - Added option for HotKeys automatically dialing next number in manual mode +# - Added option for alternate number dialing with hotkeys +# 70111-1600 - Added ability to use BLEND/INBND/*_C/*_B/*_I as closer campaigns +# 70118-1517 - Added vicidial_agent_log and vicidial_user_log logging of user_group +# 70201-1249 - Added FAST DIAL option for manually dialing, added UTF8 compatible code +# 70201-1703 - Fixed cursor bug for most text input fields +# 70202-1453 - Added first portions of Agent Pause Codes +# 70203-0108 - Finished Agent Pause Codes functionality +# 70203-0930 - Added dialed_number to webform output +# 70203-1010 - Added dialed_label to webform output +# 70206-1201 - Fixed allow_closers bug +# 70206-1332 - Added vicidial_recording_override users setting function +# 70212-1252 - Fixed small issue with CXFER +# 70213-1018 - Changed CXFER and AXFER to update customer information before transfer +# 70214-1233 - Added queuemetrics_log_id field for server_id in queue_log +# 70215-1240 - Added queuemetrics_log_id field for server_id in queue_log +# 70222-1617 - Changed queue_log PAUSE/UNPAUSE to PAUSEALL/UNPAUSEALL +# 70226-1252 - Added Mute/UnMute to agent screen +# 70309-1035 - Allow amphersands and questions marks in comments to pass through +# 70313-1052 - Allow pound signs(hash) in comments to pass through +# 70316-1406 - Moved the MUTE button to be accessible during a transfer/conf +# 70319-1446 - Added agent-deactive-display and disable customer info update functions +# 70319-1626 - Added option to allow agent logins to campaigns with no leads in the hopper +# 70320-1501 - Added option to allow retry of leave-3way-call from dispo screen +# 70322-1545 - Added sipsak display ability # +$version = '2.0.129'; +$build = '70322-1545'; + require("dbconnect.php"); if (isset($_GET["DB"])) {$DB=$_GET["DB"];} @@ -172,14 +201,11 @@ if (isset($_GET["relogin"])) {$relogin=$_GET["relogin"];} $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); + $VD_campaign=ereg_replace("[^0-9a-zA-Z_]","",$VD_campaign); $forever_stop=0; -$version = '2.0.105'; -$build = '61221-1212'; - if ($force_logout) { echo "Usted ahora ha registrado hacia fuera. Gracias\n"; @@ -226,6 +252,7 @@ $TEST_all_statuses = '0'; # TEST variable allows all statuses in dispo screen $US='_'; $CL=':'; $AT='@'; +$DS='-'; $date = date("r"); $ip = getenv("REMOTE_ADDR"); $browser = getenv("HTTP_USER_AGENT"); @@ -252,6 +279,7 @@ $camp_form_code = " 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $phone_login=$row[0]; @@ -438,6 +467,7 @@ $VDloginDISPLAY=0; { $stmt="SELECT count(*) from vicidial_users where user='$VD_login' and pass='$VD_pass' and user_level > 0;"; if ($DB) {echo "|$stmt|\n";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $auth=$row[0]; @@ -447,7 +477,8 @@ $VDloginDISPLAY=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,user_group from vicidial_users where user='$VD_login' and pass='$VD_pass'"; + $stmt="SELECT full_name,user_level,hotkeys_active,agent_choose_ingroups,scheduled_callbacks,agentonly_callbacks,agentcall_manual,vicidial_recording,vicidial_transfers,closer_default_blended,user_group,vicidial_recording_override from vicidial_users where user='$VD_login' and pass='$VD_pass'"; + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $LOGfullname=$row[0]; @@ -461,6 +492,8 @@ $VDloginDISPLAY=0; $VU_vicidial_transfers=$row[8]; $VU_closer_default_blended=$row[9]; $VU_user_group=$row[10]; + $VU_vicidial_recording_override=$row[11]; + if ($WeBRooTWritablE > 0) { fwrite ($fp, "vdweb|GOOD|$date|$VD_login|$VD_pass|$ip|$browser|$LOGfullname|\n"); @@ -471,6 +504,7 @@ $VDloginDISPLAY=0; {$user_abb = eregi_replace("^.","",$user_abb); $forever_stop++;} $stmt="SELECT allowed_campaigns from vicidial_user_groups where user_group='$VU_user_group';"; + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $LOGallowed_campaigns =$row[0]; @@ -501,6 +535,7 @@ echo " 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $CAMPactive=$row[0]; @@ -512,6 +547,7 @@ echo " 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $VD_statuses_ct = mysql_num_rows($rslt); @@ -528,6 +564,7 @@ echo " 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $VD_statuses_camp = mysql_num_rows($rslt); @@ -548,6 +585,7 @@ echo " 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $HK_statuses_camp = mysql_num_rows($rslt); @@ -577,43 +615,46 @@ echo " 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $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]; - $allcalls_delay=$row[30]; - $omit_phone_code=$row[31]; + $park_ext = $row[0]; + $park_file_name = $row[1]; + $web_form_address = $row[2]; + $allow_closers = $row[3]; + $auto_dial_level = $row[4]; + $dial_timeout = $row[5]; + $dial_prefix = $row[6]; + $campaign_cid = $row[7]; + $campaign_vdad_exten = $row[8]; + $campaign_rec_exten = $row[9]; + $campaign_recording = $row[10]; + $campaign_rec_filename = $row[11]; + $campaign_script = $row[12]; + $get_call_launch = $row[13]; + $campaign_am_message_exten = $row[14]; + $xferconf_a_dtmf = $row[15]; + $xferconf_a_number = $row[16]; + $xferconf_b_dtmf = $row[17]; + $xferconf_b_number = $row[18]; + $alt_number_dialing = $row[19]; + $VC_scheduled_callbacks = $row[20]; + $wrapup_segundos = $row[21]; + $wrapup_message = $row[22]; + $closer_campaigns = $row[23]; + $use_internal_dnc = $row[24]; + $allcalls_delay = $row[25]; + $omit_phone_code = $row[26]; + $agent_pause_codes_active = $row[27]; + $no_hopper_leads_logins = $row[28]; + if ( (!ereg('DISABLED',$VU_vicidial_recording_override)) and ($VU_vicidial_recording > 0) ) + { + $campaign_recording = $VU_vicidial_recording_override; + print "\n"; + } if ( ($VC_scheduled_callbacks=='Y') and ($VU_scheduled_callbacks=='1') ) {$scheduled_callbacks='1';} if ($VU_vicidial_recording=='0') @@ -626,12 +667,37 @@ echo " 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $VD_pause_codes = mysql_num_rows($rslt); + $j=0; + while ($j < $VD_pause_codes) + { + $row=mysql_fetch_row($rslt); + $pause_codes[$i] =$row[0]; + $pause_code_names[$i] =$row[1]; + $VARpause_codes = "$VARpause_codes'$pause_codes[$i]',"; + $VARpause_code_names = "$VARpause_code_names'$pause_code_names[$i]',"; + $i++; + $j++; + } + $VD_pause_codes_ct = ($VD_pause_codes_ct+$VD_pause_codes); + $VARpause_codes = substr("$VARpause_codes", 0, -1); + $VARpause_code_names = substr("$VARpause_code_names", 0, -1); + } + ##### grab the inbound groups to choose from if campaign contains CLOSER $VARingroups="''"; - if (eregi("CLOSER", $VD_campaign)) + if (eregi("(CLOSER|BLEND|INBND|_C$|_B$|_I$)", $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;"; + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $closer_ct = mysql_num_rows($rslt); @@ -648,6 +714,7 @@ echo " 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $row=mysql_fetch_row($rslt); @@ -708,6 +775,7 @@ echo " 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $authphone=$row[0]; @@ -746,6 +814,7 @@ 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";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $extension=$row[0]; @@ -808,6 +877,7 @@ else $DBX_user=$row[57]; $DBX_pass=$row[58]; $DBX_port=$row[59]; + $enable_sipsak_messages=$row[66]; if ($clientDST) { @@ -822,6 +892,7 @@ else $stmt="SELECT asterisk_version from servers where server_ip='$server_ip';"; if ($DB) {echo "|$stmt|\n";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $asterisk_version=$row[0]; @@ -875,21 +946,25 @@ else $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";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $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";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); - if ( (eregi("CLOSER", $VD_campaign)) || ($campaign_leads_to_call > 0) ) + if ( (eregi("(CLOSER|BLEND|INBND|_C$|_B$|_I$)", $VD_campaign)) || ($campaign_leads_to_call > 0) || (ereg('Y',$no_hopper_leads_logins)) ) { ### 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')"; + $stmt = "INSERT INTO vicidial_user_log (user,event,campaign_id,event_date,event_epoch,user_group) values('$VD_login','LOGIN','$VD_campaign','$NOW_TIME','$StarTtimE','$VU_user_group')"; if ($DB) {echo "|$stmt|\n";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $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;"; + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $prev_login_ct = mysql_num_rows($rslt); @@ -906,6 +981,7 @@ 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;"; + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $free_conf_ct = mysql_num_rows($rslt); @@ -917,6 +993,7 @@ else $i++; } $stmt="UPDATE vicidial_conferences set extension='$SIP_user' where server_ip='$server_ip' and conf_exten='$session_id';"; + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); print "\n"; @@ -924,18 +1001,21 @@ else $stmt="UPDATE vicidial_list set status='N', user='' where status IN('QUEUE','INCALL') and user ='$VD_login';"; if ($DB) {echo "$stmt\n";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $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";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $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";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); $affected_rows = mysql_affected_rows($link); print "\n"; @@ -943,11 +1023,45 @@ else # 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 + ### set the callerID for manager middleware-app to connect the phone to the user $SIqueryCID = "S$CIDdate$session_id"; + + ############################################# + ##### COMIENZO SYSTEM_SETTINGS LOOKUP ##### + $stmt = "SELECT enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_log_id,vicidial_agent_disable,allow_sipsak_messages FROM system_settings;"; + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $qm_conf_ct = mysql_num_rows($rslt); + $i=0; + while ($i < $qm_conf_ct) + { + $row=mysql_fetch_row($rslt); + $enable_queuemetrics_logging = $row[0]; + $queuemetrics_server_ip = $row[1]; + $queuemetrics_dbname = $row[2]; + $queuemetrics_login = $row[3]; + $queuemetrics_pass = $row[4]; + $queuemetrics_log_id = $row[5]; + $vicidial_agent_disable = $row[6]; + $allow_sipsak_messages = $row[7]; + $i++; + } + ##### END QUEUEMETRICS LOGGING LOOKUP ##### + ########################################### + + if ( ($enable_sipsak_messages > 0) and ($allow_sipsak_messages > 0) and (eregi("SIP",$protocol)) ) + { + $SIPSAK_prefix = 'LIN-'; + print "\n"; + passthru("/usr/local/bin/sipsak -M -O desktop -B \"$SIPSAK_prefix$VD_campaign\" -r 5060 -s sip:$extension@$phone_ip > /dev/null"); + $SIqueryCID = "$SIPSAK_prefix$VD_campaign$DS$CIDdate"; + } + ### 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";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); $affected_rows = mysql_affected_rows($link); print "\n"; @@ -959,13 +1073,38 @@ else $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";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); $affected_rows = mysql_affected_rows($link); print "\n"; - if (eregi("CLOSER", $VD_campaign)) + if ($enable_queuemetrics_logging > 0) { - print "\n"; + $linkB=mysql_connect("$queuemetrics_server_ip", "$queuemetrics_login", "$queuemetrics_pass"); + mysql_select_db("$queuemetrics_dbname", $linkB); + + $stmt = "INSERT INTO queue_log SET partition='P01',time_id='$StarTtimE',call_id='NONE',queue='$VD_campaign',agent='Agent/$VD_login',verb='AGENTLOGIN',data1='$VD_login@agents',serverid='$queuemetrics_log_id';"; + if ($DB) {echo "$stmt\n";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $linkB); + $affected_rows = mysql_affected_rows($linkB); + print "\n"; + + $stmt = "INSERT INTO queue_log SET partition='P01',time_id='$StarTtimE',call_id='NONE',queue='NONE',agent='Agent/$VD_login',verb='PAUSAALL',serverid='$queuemetrics_log_id';"; + if ($DB) {echo "$stmt\n";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $linkB); + $affected_rows = mysql_affected_rows($linkB); + print "\n"; + + mysql_close($linkB); + mysql_select_db("$VARDB_database", $link); + } + + + if (eregi("(CLOSER|BLEND|INBND|_C$|_B$|_I$)", $VD_campaign)) + { + print "\n"; } } else @@ -974,9 +1113,33 @@ else $stmt="INSERT INTO vicidial_live_agents (user,server_ip,conf_exten,extension,status,lead_id,campaign_id,uniqueid,callerid,channel,random_id,last_call_time,last_update_time,last_call_finish,user_level) values('$VD_login','$server_ip','$session_id','$SIP_user','PAUSED','','$VD_campaign','','','','$random','$NOW_TIME','$tsNOW_TIME','$NOW_TIME','$user_level');"; if ($DB) {echo "$stmt\n";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); $affected_rows = mysql_affected_rows($link); print "\n"; + + if ($enable_queuemetrics_logging > 0) + { + $linkB=mysql_connect("$queuemetrics_server_ip", "$queuemetrics_login", "$queuemetrics_pass"); + mysql_select_db("$queuemetrics_dbname", $linkB); + + $stmt = "INSERT INTO queue_log SET partition='P01',time_id='$StarTtimE',call_id='NONE',queue='$VD_campaign',agent='Agent/$VD_login',verb='AGENTLOGIN',data1='$VD_login@agents',serverid='$queuemetrics_log_id';"; + if ($DB) {echo "$stmt\n";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $linkB); + $affected_rows = mysql_affected_rows($linkB); + print "\n"; + + $stmt = "INSERT INTO queue_log SET partition='P01',time_id='$StarTtimE',call_id='NONE',queue='NONE',agent='Agent/$VD_login',verb='PAUSAALL',serverid='$queuemetrics_log_id';"; + if ($DB) {echo "$stmt\n";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $linkB); + $affected_rows = mysql_affected_rows($linkB); + print "\n"; + + mysql_close($linkB); + mysql_select_db("$VARDB_database", $link); + } } } else @@ -1027,11 +1190,12 @@ echo "
0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); $affected_rows = mysql_affected_rows($link); - $agent_log_id = mysql_insert_id(); + $agent_log_id = mysql_insert_id($link); print "\n"; $S='*'; @@ -1048,6 +1212,7 @@ echo " 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $MM_scripts = mysql_num_rows($rslt); @@ -1225,6 +1390,10 @@ $CCAL_OUT .= "
"; var CallBackCommenTs = ''; var scheduled_callbacks = ''; var dispo_check_all_pause = ''; + var agent_pause_codes_active = ''; + VARpause_codes = new Array(); + VARpause_code_names = new Array(); + var VD_pause_codes_ct = ''; VARstatuses = new Array(); VARstatusnames = new Array(); var VD_statuses_ct = ''; @@ -1277,6 +1446,7 @@ $CCAL_OUT .= "
"; var dialplan_number = ''; var ext_context = ''; var protocol = ''; + var agentchannel = ''; var local_gmt =''; var server_ip = ''; var server_ip_dialstring = ''; @@ -1292,6 +1462,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} var CalLCID = ''; var MDnextCID = ''; var XDnextCID = ''; + var LasTCID = ''; var lead_dial_number = ''; var MD_channel_look = 0; var XD_channel_look = 0; @@ -1324,11 +1495,6 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} var CalL_AutO_LauncH = ''; var panel_bgcolor = '#E0C2D6'; var CusTCB_bgcolor = '#FFFF66'; - var status_A = ''; - var status_B = ''; - var status_C = ''; - var status_D = ''; - var status_E = ''; var auto_dial_level = ''; var starting_dial_level = ''; var dial_timeout = ''; @@ -1428,11 +1594,24 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} var no_delete_sessions = ''; var webform_session = ''; var local_consult_xfers = ''; + var vicidial_agent_disable = ''; var CBentry_time = ''; var CBcallback_time = ''; var CBuser = ''; var CBcomments = ''; var volumecontrol_active = ''; + var PausaCode_HTML = ''; + var manual_auto_hotkey = 0; + var dialed_number = ''; + var dialed_label = ''; + var DispO3waychannel = ''; + var DispO3wayXtrAchannel = ''; + var DispO3wayCalLserverip = ''; + var DispO3wayCalLxfernumber = ''; + var DispO3wayCalLcamptail = ''; + var phone_ip = ''; + var enable_sipsak_messages = ''; + var allow_sipsak_messages = ''; var DiaLControl_auto_HTML = "\"Pausa\"\"Comienzo\""; var DiaLControl_auto_HTML_ready = "\"Pausa\"\"Comienzo\""; var DiaLControl_auto_HTML_OFF = "\"Pausa\"\"Comienzo\""; @@ -1536,8 +1715,12 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} // ################################################################################ // Send volume control command for meetme participant - function volume_control(taskdirection,taskvolchannel) + function volume_control(taskdirection,taskvolchannel,taskagentmute) { + if (taskagentmute=='AgenT') + { + taskvolchannel = agentchannel; + } var xmlhttp=false; /*@cc_on @*/ /*@if (@_jscript_version >= 5) @@ -1576,6 +1759,18 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} } delete xmlhttp; } + if (taskagentmute=='AgenT') + { + if (taskdirection=='MUTING') + { + document.getElementById("AgentMuteSpan").innerHTML = ""; + } + else + { + document.getElementById("AgentMuteSpan").innerHTML = ""; + } + } + } @@ -1590,9 +1785,9 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} // ################################################################################ // place 3way and customer into other conference and fake-hangup the lines - function leave_3way_call() + function leave_3way_call(tempvarattempt) { - mainxfer_send_redirect('3WAY'); + mainxfer_send_redirect('3WAY','','',tempvarattempt); document.vicidial_form.callchannel.value = ''; document.vicidial_form.callserverip.value = ''; @@ -1653,6 +1848,35 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} // Send Originate command to manager to place a phone call function basic_originate_call(tasknum,taskprefix,taskreverse,taskdialvalue,tasknowait,taskconfxfer) { + var regCXFvars = new RegExp("CXFER","g"); + var tasknum_string = tasknum.toString(); + if (tasknum_string.match(regCXFvars)) + { + var Ctasknum = tasknum_string.replace(regCXFvars, ''); + if (Ctasknum.length < 2) + {Ctasknum = '990009';} + var closerxfercamptail = '_L' + document.vicidial_form.xfercode.value; + tasknum = Ctasknum + "*CL_" + campaign + '' + closerxfercamptail + '*CXFER*' + document.vicidial_form.lead_id.value + '**' + document.vicidial_form.phone_number.value + '*' + user + '*'; + + CustomerData_update(); + + } + var regAXFvars = new RegExp("AXFER","g"); + if (tasknum_string.match(regAXFvars)) + { + var Ctasknum = tasknum_string.replace(regAXFvars, ''); + if (Ctasknum.length < 2) + {Ctasknum = '83009';} + var closerxfercamptail = '_L' + document.vicidial_form.xfercode.value; + if (closerxfercamptail.length < 3) + {closerxfercamptail = 'IVR';} + tasknum = Ctasknum + '*' + document.vicidial_form.phone_number.value + '*' + document.vicidial_form.lead_id.value + '*' + campaign + '*' + closerxfercamptail + '*' + user + '*'; + + CustomerData_update(); + + } + + var xmlhttp=false; /*@cc_on @*/ /*@if (@_jscript_version >= 5) @@ -1674,27 +1898,6 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} } if (xmlhttp) { - var regCXFvars = new RegExp("CXFER","g"); - var tasknum_string = tasknum.toString(); - if (tasknum_string.match(regCXFvars)) - { - var Ctasknum = tasknum_string.replace(regCXFvars, ''); - if (Ctasknum.length < 2) - {Ctasknum = '990009';} - var closerxfercamptail = '_L' + document.vicidial_form.xfercode.value; - tasknum = Ctasknum + "*CL_" + campaign + '' + closerxfercamptail + '**' + document.vicidial_form.lead_id.value + '**' + document.vicidial_form.phone_number.value + '*' + user + '*'; - } - var regAXFvars = new RegExp("AXFER","g"); - if (tasknum_string.match(regAXFvars)) - { - var Ctasknum = tasknum_string.replace(regAXFvars, ''); - if (Ctasknum.length < 2) - {Ctasknum = '83009';} - var closerxfercamptail = '_L' + document.vicidial_form.xfercode.value; - if (closerxfercamptail.length < 3) - {closerxfercamptail = 'IVR';} - tasknum = Ctasknum + '*' + document.vicidial_form.phone_number.value + '*' + document.vicidial_form.lead_id.value + '*' + campaign + '*' + closerxfercamptail + '*' + user + '*'; - } if (taskprefix == 'NO') {var orig_prefix = '';} else {var orig_prefix = agc_dial_prefix;} if (taskreverse == 'YES') @@ -1858,7 +2061,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} UnixTime = parseInt(UnixTime); UnixTimeMS = (UnixTime * 1000); t.setTime(UnixTimeMS); - if (agentcallsstatus == '1') + if ( (agentcallsstatus == '1') || (vicidial_agent_disable != 'NOT_ACTIVE') ) { var Astatus_array = check_time_array[2].split("Estado: "); var AGStatuS = Astatus_array[1]; @@ -1872,6 +2075,14 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} { document.getElementById("AgentEstadoCalls").innerHTML = CamPCalLs; } + if ( (AGStatuS == 'DEAD_VLA') && ( (vicidial_agent_disable == 'LIVE_AGENT') || (vicidial_agent_disable == 'ALL') ) ) + { + showDiv('AgenTDisablEBoX'); + } + if ( (AGStatuS == 'DEAD_EXTERNAL') && ( (vicidial_agent_disable == 'EXTERNAL') || (vicidial_agent_disable == 'ALL') ) ) + { + showDiv('AgenTDisablEBoX'); + } } var check_conf_array=check_ALL_array[1].split("|"); var live_conf_calls = check_conf_array[0]; @@ -1903,14 +2114,13 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} {var row_color = '#CCCCFF';} var conv_ct = (loop_ct + conv_start); var channelfieldA = conf_chan_array[conv_ct]; - // live_conf_HTML = live_conf_HTML + "
" + loop_ct + "" + channelfieldA + "HangupTRANSFERENCIA
" + loop_ct + "" + channelfieldA + "COLGAR
" + loop_ct + "" + channelfieldA + "COLGAR    
" + loop_ct + "" + channelfieldA + "COLGAR          
PAUSA CODE
"; + var loop_ct = 0; + while (loop_ct < VD_pause_codes_ct) + { + PausaCode_HTML = PausaCode_HTML + "" + VARpause_codes[loop_ct] + " - " + VARpause_code_names[loop_ct] + "

"; + loop_ct++; + if (loop_ct == VD_pause_codes_ct_half) + {PausaCode_HTML = PausaCode_HTML + "
";} + } + PausaCode_HTML = PausaCode_HTML + "


Vaya Detrás"; + document.getElementById("PausaCodeSelectContent").innerHTML = PausaCode_HTML; + } + } // ################################################################################ // open web form, then submit disposition @@ -4114,7 +4527,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} } if (xmlhttp) { - DSupdate_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=updateDISPO&format=text&user=" + user + "&pass=" + pass + "&dispo_choice=" + DispoChoice + "&lead_id=" + document.vicidial_form.lead_id.value + "&campaign=" + campaign + "&auto_dial_level=" + auto_dial_level + "&agent_log_id=" + agent_log_id + "&CallBackDatETimE=" + CallBackDatETimE + "&list_id=" + document.vicidial_form.list_id.value + "&recipient=" + CallBackrecipient + "&use_internal_dnc=" + use_internal_dnc + "&comments=" + CallBackCommenTs; + DSupdate_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=updateDISPO&format=text&user=" + user + "&pass=" + pass + "&dispo_choice=" + DispoChoice + "&lead_id=" + document.vicidial_form.lead_id.value + "&campaign=" + campaign + "&auto_dial_level=" + auto_dial_level + "&agent_log_id=" + agent_log_id + "&CallBackDatETimE=" + CallBackDatETimE + "&list_id=" + document.vicidial_form.list_id.value + "&recipient=" + CallBackrecipient + "&use_internal_dnc=" + use_internal_dnc + "&MDnextCID=" + LasTCID + "&comments=" + CallBackCommenTs; xmlhttp.open('POST', 'vdc_db_query.php'); xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8'); xmlhttp.send(DSupdate_query); @@ -4124,8 +4537,8 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} { var check_dispo = null; check_dispo = xmlhttp.responseText; - // alert(xmlhttp.responseText); var check_DS_array=check_dispo.split("\n"); + // alert(xmlhttp.responseText + "\n|" + check_DS_array[1] + "\n|" + check_DS_array[2] + "|"); if (check_DS_array[1] == 'Next agent_log_id:') { agent_log_id = check_DS_array[2]; @@ -4203,12 +4616,67 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} AutoDial_ReSume_PauSe("VDADready","NO"); // document.getElementById("DiaLControl").innerHTML = DiaLControl_auto_HTML_ready; } + else + { + // trigger HotKeys manual dial automatically go to next lead + if (manual_auto_hotkey == '1') + { + manual_auto_hotkey = 0; + ManualDialNext('','','','',''); + } + } } } } } } + +// ################################################################################ +// Submit the Pausa Code + function PauseCodeSelect_submit(newpausecode) + { + hideDiv('PausaCodeSelectBox'); + WaitingForNextStep=0; + + var xmlhttp=false; + /*@cc_on @*/ + /*@if (@_jscript_version >= 5) + // JScript gives us Conditional compilation, we can cope with old IE versions. + // and security blocked creation of the objects. + try { + xmlhttp = new ActiveXObject("Msxml2.XMLHTTP"); + } catch (e) { + try { + xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); + } catch (E) { + xmlhttp = false; + } + } + @end @*/ + if (!xmlhttp && typeof XMLHttpRequest!='undefined') + { + xmlhttp = new XMLHttpRequest(); + } + if (xmlhttp) + { + VMCpausecode_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=PausaCodeSubmit&format=text&status=" + newpausecode + "&agent_log_id=" + agent_log_id + "&campaign=" + campaign + "&extension=" + extension + "&protocol=" + protocol + "&phone_ip=" + phone_ip + "&enable_sipsak_messages=" + enable_sipsak_messages; + xmlhttp.open('POST', 'vdc_db_query.php'); + xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8'); + xmlhttp.send(VMCpausecode_query); + xmlhttp.onreadystatechange = function() + { + if (xmlhttp.readyState == 4 && xmlhttp.status == 200) + { + // alert(xmlhttp.responseText); + } + } + delete xmlhttp; + } + } + + + // ################################################################################ // Populate the dtmf and xfer number for each preset link in xfer-conf frame function DtMf_PreSet_a() @@ -4302,7 +4770,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} } if (xmlhttp) { - VMCoriginate_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=Originate&format=text&channel=" + originatevalue + "&queryCID=" + queryCID + "&exten=" + session_id + "&ext_context=" + ext_context + "&ext_priority=1"; + VMCoriginate_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=OriginateVDRelogin&format=text&channel=" + originatevalue + "&queryCID=" + queryCID + "&exten=" + session_id + "&ext_context=" + ext_context + "&ext_priority=1" + "&extension=" + extension + "&protocol=" + protocol + "&phone_ip=" + phone_ip + "&enable_sipsak_messages=" + enable_sipsak_messages + "&allow_sipsak_messages=" + allow_sipsak_messages + "&campaign=" + campaign; xmlhttp.open('POST', 'manager_send.php'); xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8'); xmlhttp.send(VMCoriginate_query); @@ -4489,7 +4957,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} } if (xmlhttp) { - VDlogout_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=userLOGout&format=text&user=" + user + "&pass=" + pass + "&campaign=" + campaign + "&conf_exten=" + session_id + "&extension=" + extension + "&protocol=" + protocol + "&no_delete_sessions=" + no_delete_sessions; + VDlogout_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=userLOGout&format=text&user=" + user + "&pass=" + pass + "&campaign=" + campaign + "&conf_exten=" + session_id + "&extension=" + extension + "&protocol=" + protocol + "&agent_log_id=" + agent_log_id + "&no_delete_sessions=" + no_delete_sessions + "&phone_ip=" + phone_ip + "&enable_sipsak_messages=" + enable_sipsak_messages; xmlhttp.open('POST', 'vdc_db_query.php'); xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8'); xmlhttp.send(VDlogout_query); @@ -4536,14 +5004,24 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} document.vicidial_form.inert_button.focus(); document.vicidial_form.inert_button.blur(); CustomerData_update(); - HKdispo_display = 4; - HKfinish=1; var HKdispo_ary = HKdispo.split(" ----- "); - document.getElementById("HotKeyDispo").innerHTML = HKdispo_ary[0] + " - " + HKdispo_ary[1]; - showDiv('HotKeyActionBox'); - hideDiv('HotKeyEntriesBox'); - document.vicidial_form.DispoSelection.value = HKdispo_ary[0]; - dialedcall_send_hangup('NO'); + if ( (HKdispo_ary[0] == 'ALTPH2') || (HKdispo_ary[0] == 'ADDR3') ) + { + if (document.vicidial_form.DiaLAltPhonE.checked==true) + { + dialedcall_send_hangup('NO', 'YES', HKdispo_ary[0]); + } + } + else + { + HKdispo_display = 4; + HKfinish=1; + document.getElementById("HotKeyDispo").innerHTML = HKdispo_ary[0] + " - " + HKdispo_ary[1]; + showDiv('HotKeyActionBox'); + hideDiv('HotKeyEntriesBox'); + document.vicidial_form.DispoSelection.value = HKdispo_ary[0]; + dialedcall_send_hangup('NO', 'YES', HKdispo_ary[0]); + } // DispoSelect_submit(); // AutoDialWaiting = 1; // AutoDial_ReSume_PauSe("VDADready"); @@ -4899,11 +5377,11 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} hideDiv('CBcommentsBox'); hideDiv('HotKeyActionBox'); hideDiv('HotKeyEntriesBox'); - hideDiv('MainXfeRBox'); hideDiv('MainPanel'); hideDiv('ScriptPanel'); hideDiv('DispoSelectBox'); hideDiv('LogouTBox'); + hideDiv('AgenTDisablEBoX'); hideDiv('CustomerGoneBox'); hideDiv('NoneInSessionBox'); hideDiv('WrapupBox'); @@ -4915,6 +5393,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} hideDiv('DispoButtonHideC'); hideDiv('CallBacKsLisTBox'); hideDiv('NeWManuaLDiaLBox'); + hideDiv('PausaCodeSelectBox'); if (agentonly_callbacks != '1') {hideDiv('CallbacksButtons');} // if ( (agentcall_manual != '1') && (starting_dial_level > 0) ) @@ -4930,6 +5409,15 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} {hideDiv('VolumeControlSpan');} document.vicidial_form.LeadLookuP.checked=true; + if (agent_pause_codes_active=='Y') + { + document.getElementById("PausaCodeLinkSpan").innerHTML = "INTRODUZCA Un CÓDIGO De la PAUSA"; + } + if (VICIDiaL_allow_closers < 1) + { + document.getElementById("InternalCloser").style.visibility = 'hidden'; + document.getElementById("LocalCloser").style.visibility = 'hidden'; + } document.getElementById("sessionIDspan").innerHTML = session_id; if ( (campaign_recording == 'NEVER') || (campaign_recording == 'ALLFORCE') ) { @@ -4962,6 +5450,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} if (wrapup_segundos > 0) { showDiv('WrapupBox'); + document.getElementById("WrapupTimer").innerHTML = wrapup_segundos; wrapup_waiting=1; } CustomerData_update(); @@ -4994,39 +5483,6 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} if ( (custchannellive < -30) && (lastcustchannel.length > 3) ) {CustomerChanneLGone();} if ( (custchannellive < -10) && (lastcustchannel.length > 3) ) {ReChecKCustoMerChaN();} if ( (nochannelinsession > 16) && (check_n > 15) ) {NoneInSession();} - if (wrapup_segundos > 0) - { - document.getElementById("WrapupTimer").innerHTML = (wrapup_segundos - wrapup_counter); - wrapup_counter++; - if ( (wrapup_counter > wrapup_segundos) && (document.getElementById("WrapupBox").style.visibility == 'visible') ) - { - wrapup_waiting=0; - hideDiv('WrapupBox'); - if (document.vicidial_form.DispoSelectStop.checked==true) - { - if (auto_dial_level != '0') - { - AutoDialWaiting = 0; - AutoDial_ReSume_PauSe("VDADpause","NO"); - // document.getElementById("DiaLControl").innerHTML = DiaLControl_auto_HTML; - } - VICIDiaL_pause_calling = 1; - if (dispo_check_all_pause != '1') - { - document.vicidial_form.DispoSelectStop.checked=false; - } - } - else - { - if (auto_dial_level != '0') - { - AutoDialWaiting = 1; - AutoDial_ReSume_PauSe("VDADready","NO"); - // document.getElementById("DiaLControl").innerHTML = DiaLControl_auto_HTML_ready; - } - } - } - } if (WaitingForNextStep==0) { // check for live channels in conference room and get current datetime @@ -5108,6 +5564,39 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} // parked_calls_display_refresh(); } } + if (wrapup_segundos > 0) + { + document.getElementById("WrapupTimer").innerHTML = (wrapup_segundos - wrapup_counter); + wrapup_counter++; + if ( (wrapup_counter > wrapup_segundos) && (document.getElementById("WrapupBox").style.visibility == 'visible') ) + { + wrapup_waiting=0; + hideDiv('WrapupBox'); + if (document.vicidial_form.DispoSelectStop.checked==true) + { + if (auto_dial_level != '0') + { + AutoDialWaiting = 0; + AutoDial_ReSume_PauSe("VDADpause","NO"); + // document.getElementById("DiaLControl").innerHTML = DiaLControl_auto_HTML; + } + VICIDiaL_pause_calling = 1; + if (dispo_check_all_pause != '1') + { + document.vicidial_form.DispoSelectStop.checked=false; + } + } + else + { + if (auto_dial_level != '0') + { + AutoDialWaiting = 1; + AutoDial_ReSume_PauSe("VDADready","NO"); + // document.getElementById("DiaLControl").innerHTML = DiaLControl_auto_HTML_ready; + } + } + } + } } } setTimeout("all_refresh()", refresh_interval); @@ -5165,6 +5654,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} if (Cmon == 9) {Cmon = "OCT";} if (Cmon == 10) {Cmon = "NOV";} if (Cmon == 11) {Cmon = "DIC";} + if (Chours == 12) {AMPM = 'PM';} if (Chours > 12) {Chours = (Chours - 12); AMPM = 'PM';} if (Cmin < 10) {Cmin = "0" + Cmin;} if (Csec < 10) {Csec = "0" + Csec;} @@ -5300,25 +5790,6 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} } } - - function showMainXfeR(divvar,taskxferchan,taskxferchanmain) - { - document.getElementById("MainXfeRBox").style.visibility = 'visible'; - getactiveext("MainXfeRBox"); - conference_list_display_refresh("MainXfeRconfContent"); - var XfeR_channel = taskxferchan; - document.vicidial_form.H_XfeR_channel.value = XfeR_channel; - document.vicidial_form.M_XfeR_channel.value = taskxferchanmain; - document.getElementById("MainXfeRChanneL").innerHTML = XfeR_channel; - } - function hideMainXfeR(divvar) - { - document.getElementById("MainXfeRBox").style.visibility = 'hidden'; - var XfeR_channel = ''; - document.vicidial_form.H_XfeR_channel.value = ''; - document.vicidial_form.M_XfeR_channel.value = ''; - document.getElementById("MainXfeRChanneL").innerHTML = ''; - } function conf_channels_detail(divvar) { if (divvar == 'SHOW') @@ -5360,6 +5831,10 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} { if (showxfervar == 'ON') { + var xfer_height = 310; + if (alt_phone_dialing>0) {xfer_height = (xfer_height + 20);} + if ( (auto_dial_level == 0) && (manual_dial_preview == 1) ) {xfer_height = (xfer_height + 20);} + document.getElementById("TransferMain").style.top = xfer_height; HKbutton_allowed = 0; showDiv('TransferMain'); document.getElementById("XferControl").innerHTML = "\"Transferencia"; @@ -5428,17 +5903,13 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} - - @@ -5490,15 +5961,23 @@ echo "\n";

VICIDIAL
- -MARCADO MANUAL
+ +MARCADO MANUAL       DIAL RÁPIDO
- + 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.
@@ -5509,7 +5988,7 @@ echo "\n";
- + - + @@ -5533,7 +6014,8 @@ echo "\n"; - +
NUEVO PLOMO MANUAL DEL DIAL PARA :

Incorpore la información abajo para el nuevo plomo que usted desea llamar.
\n";
  (Éste es generalmente un 1 en los U.S.A. y el Canadá)
Teléfono Number:   (12 digits max - digits only) +   (12 digits max - digits only) +
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)  (los dígitos satisfacen solamente) +

Dial Ahora @@ -5557,6 +6039,7 @@ Su Estado:
Calls Dialing:
+
Transferencia - Conferencia
CLOSER INTERNO @@ -5582,11 +6065,12 @@ Su Estado:
Calls Dialing: Marcar Blind Transfer Blind Transfer VMail Message
+
- +
Lead Dispositioned Como:

-
@@ -5594,7 +6078,7 @@ Su Estado:
Calls Dialing: + @@ -5610,7 +6094,7 @@ Su Estado:
Calls Dialing: +
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:
@@ -5627,7 +6111,7 @@ Su Estado:
Calls Dialing: +
Información Anterior Del Servicio repetido:
Nadie está en su sesión:
Vaya Detrás

@@ -5635,7 +6119,7 @@ Su Estado:
Calls Dialing: + "; if (volumecontrol_active!=1) { live_conf_HTML = live_conf_HTML + ""; } else { - live_conf_HTML = live_conf_HTML + ""; + live_conf_HTML = live_conf_HTML + ""; } // var debugspan = document.getElementById("debugbottomspan").innerHTML; @@ -1926,6 +2136,29 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} {custchannellive++;} } + if (volumecontrol_active > 0) + { + if (protocol != 'EXTERNAL') + { + var regAGNTchan = new RegExp(protocol + '/' + extension,"g"); + if ( (channelfieldA.match(regAGNTchan)) && (agentchannel != channelfieldA) ) + { + agentchannel = channelfieldA; + + document.getElementById("AgentMuteSpan").innerHTML = ""; + } + } + else + { + if (agentchannel.length < 3) + { + agentchannel = channelfieldA; + + document.getElementById("AgentMuteSpan").innerHTML = ""; + } + } + } + // document.getElementById("debugbottomspan").innerHTML = debugspan + '
' + channelfieldA + '|' + lastcustchannel + '|' + custchannellive + '|' + LMAcontent_change + '|' + LMAalter; if (!LMAe[ARY_ct]) @@ -1952,7 +2185,11 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} if (LMAcontent_change > 0) { if (conf_channels_xtra_display == 1) - {document.getElementById("outboundcallsspan").innerHTML = live_conf_HTML;} + { + // document.getElementById("MainPanel").style.overflow = 'visible'; + document.getElementById("outboundcallsspan").innerHTML = live_conf_HTML; + // document.getElementById("MainPanel").style.overflow = 'auto'; + } } nochannelinsession=0; } @@ -2086,7 +2323,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} // ################################################################################ // Send Redirect command for live call to Manager sends phone name where call is going to // Covers the following types: XFER, VMAIL, ENTRY, CONF, PARKING, FROMPARKING, XfeRLOCAL, XfeRINTERNAL, XfeRBLIND, VfeRVMAIL - function mainxfer_send_redirect(taskvar,taskxferconf,taskserverip) + function mainxfer_send_redirect(taskvar,taskxferconf,taskserverip,taskdebugnote) { var xmlhttp=false; /*@cc_on @*/ @@ -2201,6 +2438,8 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} } if (taskvar == '3WAY') { + xferredirect_query=''; + var queryCID = "VXvdcW" + epoch_sec + user_abb; var redirectdestination = "NEXTAVAILABLE"; var redirectXTRAvalue = XDchannel; @@ -2211,7 +2450,18 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} {var redirecttype = 'RedirectXtraCX';} else {var redirecttype = 'RedirectXtra';} - xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=" + redirecttype + "&format=text&channel=" + redirectvalue + "&call_server_ip=" + redirectserverip + "&queryCID=" + queryCID + "&exten=" + redirectdestination + "&ext_context=" + ext_context + "&ext_priority=1&extrachannel=" + redirectXTRAvalue + "&lead_id=" + document.vicidial_form.lead_id.value + "&phone_code=" + document.vicidial_form.phone_code.value + "&phone_number=" + document.vicidial_form.phone_number.value + "&campaign=CL_" + campaign + '' + closerxfercamptail; + DispO3waychannel = redirectvalue; + DispO3wayXtrAchannel = redirectXTRAvalue; + DispO3wayCalLserverip = redirectserverip; + DispO3wayCalLxfernumber = document.vicidial_form.xfernumber.value; + DispO3wayCalLcamptail = document.vicidial_form.xfercode.value; + + xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=" + redirecttype + "&format=text&channel=" + redirectvalue + "&call_server_ip=" + redirectserverip + "&queryCID=" + queryCID + "&exten=" + redirectdestination + "&ext_context=" + ext_context + "&ext_priority=1&extrachannel=" + redirectXTRAvalue + "&lead_id=" + document.vicidial_form.lead_id.value + "&phone_code=" + document.vicidial_form.phone_code.value + "&phone_number=" + document.vicidial_form.phone_number.value+ "&filename=" + taskdebugnote + "&campaign=CL_" + campaign + '' + closerxfercamptail; + + if (taskdebugnote == 'FIRST') + { + document.getElementById("DispoSelectHAspan").innerHTML = "Leave 3Way Call Again"; + } } if (taskvar == 'ParK') { @@ -2257,7 +2507,6 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} Nactiveext = null; Nactiveext = xmlhttp.responseText; // alert(xmlhttp.responseText); - hideMainXfeR(); } } delete xmlhttp; @@ -2326,7 +2575,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} "&list_id=" + document.vicidial_form.list_id.value + "&length_in_sec=0&phone_code=" + document.vicidial_form.phone_code.value + "&phone_number=" + lead_dial_number + - "&exten=" + extension + "&channel=" + lastcustchannel + "&start_epoch=" + MDlogEPOCH + "&auto_dial_level=" + auto_dial_level + "&VDstop_rec_after_each_call=" + VDstop_rec_after_each_call + "&conf_silent_prefix=" + conf_silent_prefix + "&protocol=" + protocol + "&extension=" + extension + "&ext_context=" + ext_context + "&conf_exten=" + session_id + "&user_abb=" + user_abb + "&agent_log_id=" + agent_log_id; + "&exten=" + extension + "&channel=" + lastcustchannel + "&start_epoch=" + MDlogEPOCH + "&auto_dial_level=" + auto_dial_level + "&VDstop_rec_after_each_call=" + VDstop_rec_after_each_call + "&conf_silent_prefix=" + conf_silent_prefix + "&protocol=" + protocol + "&extension=" + extension + "&ext_context=" + ext_context + "&conf_exten=" + session_id + "&user_abb=" + user_abb + "&agent_log_id=" + agent_log_id + "&MDnextCID=" + LasTCID + "&DB=0"; xmlhttp.open('POST', 'vdc_db_query.php'); xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8'); // document.getElementById("busycallsdebug").innerHTML = "vdc_db_query.php?" + manDiaLlog_query; @@ -2538,7 +2787,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} // ################################################################################ // Open page to enter details for a new manual dial lead - function NeWManuaLDiaLCalL() + function NeWManuaLDiaLCalL(TVfast) { if ( (AutoDialWaiting == 1) || (VD_live_customer_call==1) || (alt_dial_active==1) ) { @@ -2546,7 +2795,14 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} } else { - showDiv('NeWManuaLDiaLBox'); + if (TVfast=='FAST') + { + NeWManuaLDiaLCalLSubmiTfast(); + } + else + { + showDiv('NeWManuaLDiaLBox'); + } } } @@ -2584,6 +2840,34 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} document.vicidial_form.MDDiaLOverridE.value = ''; } +// ################################################################################ +// Fast version of manual dial + function NeWManuaLDiaLCalLSubmiTfast() + { + var MDDiaLCodEform = document.vicidial_form.phone_code.value; + var MDPhonENumbeRform = document.vicidial_form.phone_number.value; + + if ( (MDDiaLCodEform.length < 1) || (MDPhonENumbeRform.length < 5) ) + { + alert("WY MUSICIE WCHODZIĆ NUMER TELEFONU I TARCZA SZYFROWAĆ UŻYWAĆ SZYBKI TARCZA"); + } + else + { + var MDLookuPLeaD = 'new'; + if (document.vicidial_form.LeadLookuP.checked==true) + {MDLookuPLeaD = 'lookup';} + + alt_phone_dialing=1; + auto_dial_level=0; + manual_dial_in_progress=1; + MainPanelToFront(); + buildDiv('DiaLLeaDPrevieW'); + buildDiv('DiaLDiaLAltPhonE'); + document.vicidial_form.LeadPreview.checked=false; + document.vicidial_form.DiaLAltPhonE.checked=true; + ManualDialNext("","",MDDiaLCodEform,MDPhonENumbeRform,MDLookuPLeaD); + } + } // ################################################################################ // Request lookup of manual dial channel @@ -2662,7 +2946,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} document.getElementById("MainStatuSSpan").innerHTML = " Zadzwoniono do trzeciej strony: " + document.vicidial_form.xfernumber.value + " UID: " + CIDcheck; - document.getElementById("Leave3WayCall").innerHTML ="\"WYJDŹ"; + document.getElementById("Leave3WayCall").innerHTML ="\"WYJDŹ"; document.getElementById("DialWithCustomer").innerHTML ="\"Połącz"; @@ -2715,8 +2999,8 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} document.getElementById("DialBlindVMail").innerHTML = "\"Blind"; - document.getElementById("VolumeUpSpan").innerHTML = ""; - document.getElementById("VolumeDownSpan").innerHTML = ""; + document.getElementById("VolumeUpSpan").innerHTML = ""; + document.getElementById("VolumeDownSpan").innerHTML = ""; // INSERT VICIWYBIERZ_LOG ENTRY FOR THIS Rozmowa PROCESS @@ -2805,6 +3089,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} else { fronter = user; + LasTCID = MDnextResponse_array[0]; document.vicidial_form.lead_id.value = MDnextResponse_array[1]; LeaDPreVDispO = MDnextResponse_array[2]; document.vicidial_form.vendor_lead_code.value = MDnextResponse_array[4]; @@ -2839,9 +3124,12 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} CBcallback_time = MDnextResponse_array[29]; CBuser = MDnextResponse_array[30]; CBcomments = MDnextResponse_array[31]; - + dialed_number = MDnextResponse_array[32]; + dialed_label = MDnextResponse_array[33]; + lead_dial_number = document.vicidial_form.phone_number.value; document.getElementById("MainStatuSSpan").innerHTML = " Dzwoni: " + document.vicidial_form.phone_number.value + " UID: " + MDnextCID + "   " + man_status; + if ( (dialed_label.length < 3) || (dialed_label=='NONE') ) {dialed_label='MAIN';} web_form_vars = "lead_id=" + document.vicidial_form.lead_id.value + @@ -2887,6 +3175,8 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} "&phone=" + document.vicidial_form.phone_number.value + "&parked_by=" + document.vicidial_form.lead_id.value + "&dispo=" + LeaDDispO + '' + + "&dialed_number=" + dialed_number + '' + + "&dialed_label=" + dialed_label + '' + webform_session; // $VICIWYBIERZ_web_QUERY_STRING =~ s/ /+/gi; @@ -3071,6 +3361,9 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} { var manDiaLonly_num = document.vicidial_form.alt_phone.value; lead_dial_number = document.vicidial_form.alt_phone.value; + dialed_number = lead_dial_number; + dialed_label = 'ALT'; + WebFormRefresH(''); } else { @@ -3078,11 +3371,17 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} { var manDiaLonly_num = document.vicidial_form.address3.value; lead_dial_number = document.vicidial_form.address3.value; - } + dialed_number = lead_dial_number; + dialed_label = 'ADDR3'; + WebFormRefresH(''); + } else { var manDiaLonly_num = document.vicidial_form.phone_number.value; lead_dial_number = document.vicidial_form.phone_number.value; + dialed_number = lead_dial_number; + dialed_label = 'MAIN'; + WebFormRefresH(''); } } var xmlhttp=false; @@ -3213,7 +3512,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} } if (xmlhttp) { - autoDiaLready_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=" + taskaction + "&user=" + user + "&pass=" + pass + "&stage=" + VDRP_stage + "&agent_log_id=" + agent_log_id + "&agent_log=" + taskagentlog; + autoDiaLready_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=" + taskaction + "&user=" + user + "&pass=" + pass + "&stage=" + VDRP_stage + "&agent_log_id=" + agent_log_id + "&agent_log=" + taskagentlog + "&campaign=" + campaign; xmlhttp.open('POST', 'vdc_db_query.php'); xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8'); xmlhttp.send(autoDiaLready_query); @@ -3379,6 +3678,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} custchannellive=1; + LasTCID = check_VDIC_array[4]; LeaDPreVDispO = check_VDIC_array[6]; fronter = check_VDIC_array[7]; document.vicidial_form.vendor_lead_code.value = check_VDIC_array[8]; @@ -3411,6 +3711,8 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} CBcallback_time = check_VDIC_array[33]; CBuser = check_VDIC_array[34]; CBcomments = check_VDIC_array[35]; + dialed_number = check_VDIC_array[36]; + dialed_label = check_VDIC_array[37]; lead_dial_number = document.vicidial_form.phone_number.value; document.getElementById("MainStatuSSpan").innerHTML = " Przychodząca: " + document.vicidial_form.phone_number.value + " UID: " + CIDcheck + "   " + VDIC_fronter; @@ -3451,8 +3753,8 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} if (lastcustserverip == server_ip) { - document.getElementById("VolumeUpSpan").innerHTML = ""; - document.getElementById("VolumeDownSpan").innerHTML = ""; + document.getElementById("VolumeUpSpan").innerHTML = ""; + document.getElementById("VolumeDownSpan").innerHTML = ""; } document.getElementById("DiaLControl").innerHTML = DiaLControl_auto_HTML_OFF; @@ -3461,6 +3763,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} {var group = VDCL_group_id;} else {var group = campaign;} + if ( (dialed_label.length < 3) || (dialed_label=='NONE') ) {dialed_label='MAIN';} web_form_vars = "lead_id=" + document.vicidial_form.lead_id.value + @@ -3507,6 +3810,8 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} "&phone=" + document.vicidial_form.phone_number.value + "&parked_by=" + document.vicidial_form.lead_id.value + "&dispo=" + LeaDDispO + '' + + "&dialed_number=" + dialed_number + '' + + "&dialed_label=" + dialed_label + '' + webform_session; var regWFspace = new RegExp(" ","ig"); @@ -3568,6 +3873,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} {var group = VDCL_group_id;} else {var group = campaign;} + if ( (dialed_label.length < 3) || (dialed_label=='NONE') ) {dialed_label='MAIN';} web_form_vars = "lead_id=" + document.vicidial_form.lead_id.value + @@ -3614,6 +3920,8 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} "&phone=" + document.vicidial_form.phone_number.value + "&parked_by=" + document.vicidial_form.lead_id.value + "&dispo=" + LeaDDispO + '' + + "&dialed_number=" + dialed_number + '' + + "&dialed_label=" + dialed_label + '' + webform_session; var regWFspace = new RegExp(" ","ig"); @@ -3658,6 +3966,28 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} } +// ################################################################################ +// Send leave 3way call a second time from the dispo screen + function DispoLeavE3wayAgaiN() + { + XDchannel = DispO3wayXtrAchannel; + document.vicidial_form.xfernumber.value = DispO3wayCalLxfernumber; + document.vicidial_form.xfercode.value = DispO3wayCalLcamptail; + MDchannel = DispO3waychannel; + lastcustserverip = DispO3wayCalLserverip; + + document.getElementById("DispoSelectHAspan").innerHTML = ""; + + leave_3way_call('SECOND'); + + DispO3waychannel = ''; + DispO3wayXtrAchannel = ''; + DispO3wayCalLserverip = ''; + DispO3wayCalLxfernumber = ''; + DispO3wayCalLcamptail = ''; + } + + // ################################################################################ // Start Hangup Functions for both function bothcall_send_hangup() @@ -3670,7 +4000,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} // ################################################################################ // Send Hangup command for customer call connected to the conference now to Manager - function dialedcall_send_hangup(dispowindow) + function dialedcall_send_hangup(dispowindow,hotkeysused,altdispo) { var form_cust_channel = document.vicidial_form.callchannel.value; var form_cust_serverip = document.vicidial_form.callserverip.value; @@ -3808,10 +4138,36 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} if (document.vicidial_form.DiaLAltPhonE.checked==true) { reselect_alt_dial = 1; + if (altdispo == 'ALTPH2') + { + ManualDialOnly('ALTTelefonE'); + } + else + { + if (altdispo == 'ADDR3') + { + ManualDialOnly('AddresS3'); + } + else + { + if (hotkeysused == 'YES') + { + reselect_alt_dial = 0; + manual_auto_hotkey = 1; + } + } + } } else { - document.getElementById("DiaLControl").innerHTML = "\"Wybierz"; + if (hotkeysused == 'YES') + { + manual_auto_hotkey = 1; + } + else + { + document.getElementById("DiaLControl").innerHTML = "\"Wybierz"; + } reselect_alt_dial = 0; } } @@ -3820,6 +4176,27 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} if (document.vicidial_form.DiaLAltPhonE.checked==true) { reselect_alt_dial = 1; + if (altdispo == 'ALTPH2') + { + ManualDialOnly('ALTTelefonE'); + } + else + { + if (altdispo == 'ADDR3') + { + ManualDialOnly('AddresS3'); + } + else + { + if (hotkeysused == 'YES') + { + document.getElementById("MainStatuSSpan").style.background = panel_bgcolor; + document.getElementById("MainStatuSSpan").innerHTML = ''; + document.getElementById("DiaLControl").innerHTML = DiaLControl_auto_HTML_OFF; + reselect_alt_dial = 0; + } + } + } } else { @@ -3965,6 +4342,14 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} // Update vicidial_list lead record with all altered values from form function CustomerData_update() { + + var REGcommentsAMP = new RegExp('&',"g"); + var REGcommentsQUES = new RegExp("\\?","g"); + var REGcommentsPOUND = new RegExp("\\#","g"); + var REGcommentsRESULT = document.vicidial_form.comments.value.replace(REGcommentsAMP, "--AMP--"); + REGcommentsRESULT = REGcommentsRESULT.replace(REGcommentsQUES, "--QUES--"); + REGcommentsRESULT = REGcommentsRESULT.replace(REGcommentsPOUND, "--POUND--"); + var xmlhttp=false; /*@cc_on @*/ /*@if (@_jscript_version >= 5) @@ -3986,7 +4371,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} } if (xmlhttp) { - VLupdate_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=updateLEAD&format=text&user=" + user + "&pass=" + pass + + VLupdate_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&campaign=" + campaign + "&ACTION=updateLEAD&format=text&user=" + user + "&pass=" + pass + "&lead_id=" + document.vicidial_form.lead_id.value + "&vendor_lead_code=" + document.vicidial_form.vendor_lead_code.value + "&phone_number=" + document.vicidial_form.phone_number.value + @@ -4007,7 +4392,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} "&alt_phone=" + document.vicidial_form.alt_phone.value + "&email=" + document.vicidial_form.email.value + "&security_phrase=" + document.vicidial_form.security_phrase.value + - "&comments=" + document.vicidial_form.comments.value; + "&comments=" + REGcommentsRESULT; xmlhttp.open('POST', 'vdc_db_query.php'); xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8'); xmlhttp.send(VLupdate_query); @@ -4053,6 +4438,34 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} document.getElementById("DispoSelectContent").innerHTML = dispo_HTML; } +// ################################################################################ +// Generate the Przerwa Code Chooser panel + function PauseCodeSelectContent_create() + { + if ( (AutoDialWaiting == 1) || (VD_live_customer_call==1) || (alt_dial_active==1) ) + { + alert("WY MUSICIE BYĆ PRZEDŁUŻANI WCHODZIĆ SZYFR PRZERWY W TRYBIE AUTOTARCZY"); + } + else + { + showDiv('PrzerwaCodeSelectBox'); + WaitingForNextStep=1; + PrzerwaCode_HTML = ''; + document.vicidial_form.PrzerwaCodeSelection.value = ''; + var VD_pause_codes_ct_half = parseInt(VD_pause_codes_ct / 2); + PrzerwaCode_HTML = "
El cliente ha colgado:
Vaya Detrás

@@ -5644,7 +6128,7 @@ Su Estado:
Calls Dialing: + "; if (volumecontrol_active!=1) { live_conf_HTML = live_conf_HTML + ""; } else { - live_conf_HTML = live_conf_HTML + ""; + live_conf_HTML = live_conf_HTML + ""; } // var debugspan = document.getElementById("debugbottomspan").innerHTML; @@ -1926,6 +2136,29 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} {custchannellive++;} } + if (volumecontrol_active > 0) + { + if (protocol != 'EXTERNAL') + { + var regAGNTchan = new RegExp(protocol + '/' + extension,"g"); + if ( (channelfieldA.match(regAGNTchan)) && (agentchannel != channelfieldA) ) + { + agentchannel = channelfieldA; + + document.getElementById("AgentMuteSpan").innerHTML = ""; + } + } + else + { + if (agentchannel.length < 3) + { + agentchannel = channelfieldA; + + document.getElementById("AgentMuteSpan").innerHTML = ""; + } + } + } + // document.getElementById("debugbottomspan").innerHTML = debugspan + '
' + channelfieldA + '|' + lastcustchannel + '|' + custchannellive + '|' + LMAcontent_change + '|' + LMAalter; if (!LMAe[ARY_ct]) @@ -1952,7 +2185,11 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} if (LMAcontent_change > 0) { if (conf_channels_xtra_display == 1) - {document.getElementById("outboundcallsspan").innerHTML = live_conf_HTML;} + { + // document.getElementById("MainPanel").style.overflow = 'visible'; + document.getElementById("outboundcallsspan").innerHTML = live_conf_HTML; + // document.getElementById("MainPanel").style.overflow = 'auto'; + } } nochannelinsession=0; } @@ -2086,7 +2323,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} // ################################################################################ // Send Redirect command for live call to Manager sends phone name where call is going to // Covers the following types: XFER, VMAIL, ENTRY, CONF, MISE EN ATT, FROMMISE EN ATT, XfeRLOCAL, XfeRINTERNAL, XfeRBLIND, VfeRVMAIL - function mainxfer_send_redirect(taskvar,taskxferconf,taskserverip) + function mainxfer_send_redirect(taskvar,taskxferconf,taskserverip,taskdebugnote) { var xmlhttp=false; /*@cc_on @*/ @@ -2201,6 +2438,8 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} } if (taskvar == '3WAY') { + xferredirect_query=''; + var queryCID = "VXvdcW" + epoch_sec + user_abb; var redirectdestination = "NEXTAVAILABLE"; var redirectXTRAvalue = XDchannel; @@ -2211,7 +2450,18 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} {var redirecttype = 'RedirectXtraCX';} else {var redirecttype = 'RedirectXtra';} - xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=" + redirecttype + "&format=text&channel=" + redirectvalue + "&call_server_ip=" + redirectserverip + "&queryCID=" + queryCID + "&exten=" + redirectdestination + "&ext_context=" + ext_context + "&ext_priority=1&extrachannel=" + redirectXTRAvalue + "&lead_id=" + document.vicidial_form.lead_id.value + "&phone_code=" + document.vicidial_form.phone_code.value + "&phone_number=" + document.vicidial_form.phone_number.value + "&campaign=CL_" + campaign + '' + closerxfercamptail; + DispO3waychannel = redirectvalue; + DispO3wayXtrAchannel = redirectXTRAvalue; + DispO3wayCalLserverip = redirectserverip; + DispO3wayCalLxfernumber = document.vicidial_form.xfernumber.value; + DispO3wayCalLcamptail = document.vicidial_form.xfercode.value; + + xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=" + redirecttype + "&format=text&channel=" + redirectvalue + "&call_server_ip=" + redirectserverip + "&queryCID=" + queryCID + "&exten=" + redirectdestination + "&ext_context=" + ext_context + "&ext_priority=1&extrachannel=" + redirectXTRAvalue + "&lead_id=" + document.vicidial_form.lead_id.value + "&phone_code=" + document.vicidial_form.phone_code.value + "&phone_number=" + document.vicidial_form.phone_number.value+ "&filename=" + taskdebugnote + "&campaign=CL_" + campaign + '' + closerxfercamptail; + + if (taskdebugnote == 'FIRST') + { + document.getElementById("DispoSelectHAspan").innerHTML = "Leave 3Way Call Again"; + } } if (taskvar == 'ParK') { @@ -2257,7 +2507,6 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} Nactiveext = null; Nactiveext = xmlhttp.responseText; // alert(xmlhttp.responseText); - hideMainXfeR(); } } delete xmlhttp; @@ -2326,7 +2575,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} "&list_id=" + document.vicidial_form.list_id.value + "&length_in_sec=0&phone_code=" + document.vicidial_form.phone_code.value + "&phone_number=" + lead_dial_number + - "&exten=" + extension + "&channel=" + lastcustchannel + "&start_epoch=" + MDlogEPOCH + "&auto_dial_level=" + auto_dial_level + "&VDstop_rec_after_each_call=" + VDstop_rec_after_each_call + "&conf_silent_prefix=" + conf_silent_prefix + "&protocol=" + protocol + "&extension=" + extension + "&ext_context=" + ext_context + "&conf_exten=" + session_id + "&user_abb=" + user_abb + "&agent_log_id=" + agent_log_id; + "&exten=" + extension + "&channel=" + lastcustchannel + "&start_epoch=" + MDlogEPOCH + "&auto_dial_level=" + auto_dial_level + "&VDstop_rec_after_each_call=" + VDstop_rec_after_each_call + "&conf_silent_prefix=" + conf_silent_prefix + "&protocol=" + protocol + "&extension=" + extension + "&ext_context=" + ext_context + "&conf_exten=" + session_id + "&user_abb=" + user_abb + "&agent_log_id=" + agent_log_id + "&MDnextCID=" + LasTCID + "&DB=0"; xmlhttp.open('POST', 'vdc_db_query.php'); xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8'); // document.getElementById("busycallsdebug").innerHTML = "vdc_db_query.php?" + manDiaLlog_query; @@ -2538,7 +2787,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} // ################################################################################ // Open page to enter details for a new manual dial lead - function NeWManuaLDiaLCalL() + function NeWManuaLDiaLCalL(TVfast) { if ( (AutoDialWaiting == 1) || (VD_live_customer_call==1) || (alt_dial_active==1) ) { @@ -2546,7 +2795,14 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} } else { - showDiv('NeWManuaLDiaLBox'); + if (TVfast=='FAST') + { + NeWManuaLDiaLCalLSubmiTfast(); + } + else + { + showDiv('NeWManuaLDiaLBox'); + } } } @@ -2584,6 +2840,34 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} document.vicidial_form.MDDiaLOverridE.value = ''; } +// ################################################################################ +// Fast version of manual dial + function NeWManuaLDiaLCalLSubmiTfast() + { + var MDDiaLCodEform = document.vicidial_form.phone_code.value; + var MDPhonENumbeRform = document.vicidial_form.phone_number.value; + + if ( (MDDiaLCodEform.length < 1) || (MDPhonENumbeRform.length < 5) ) + { + alert("VOUS DEVEZ ÉCRIRE Un NUMÉRO De TÉLÉPHONE ET Un CODE De CADRAN POURUTILISER Le CADRAN RAPIDE"); + } + else + { + var MDLookuPLeaD = 'new'; + if (document.vicidial_form.LeadLookuP.checked==true) + {MDLookuPLeaD = 'lookup';} + + alt_phone_dialing=1; + auto_dial_level=0; + manual_dial_in_progress=1; + MainPanelToFront(); + buildDiv('DiaLLeaDPrevieW'); + buildDiv('DiaLDiaLAltPhonE'); + document.vicidial_form.LeadPreview.checked=false; + document.vicidial_form.DiaLAltPhonE.checked=true; + ManualDialNext("","",MDDiaLCodEform,MDPhonENumbeRform,MDLookuPLeaD); + } + } // ################################################################################ // Request lookup of manual dial channel @@ -2662,7 +2946,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} document.getElementById("MainStatuSSpan").innerHTML = " Tiers appelé: " + document.vicidial_form.xfernumber.value + " UID: " + CIDcheck; - document.getElementById("Leave3WayCall").innerHTML ="\"QUITTER"; + document.getElementById("Leave3WayCall").innerHTML ="\"QUITTER"; document.getElementById("DialWithCustomer").innerHTML ="\"Appel"; @@ -2715,8 +2999,8 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} document.getElementById("DialBlindVMail").innerHTML = "\"Blind"; - document.getElementById("VolumeUpSpan").innerHTML = ""; - document.getElementById("VolumeDownSpan").innerHTML = ""; + document.getElementById("VolumeUpSpan").innerHTML = ""; + document.getElementById("VolumeDownSpan").innerHTML = ""; // INSERT VICICOMPOSER_LOG ENTRY FOR THIS APPEL PROCESS @@ -2805,6 +3089,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} else { fronter = user; + LasTCID = MDnextResponse_array[0]; document.vicidial_form.lead_id.value = MDnextResponse_array[1]; LeaDPreVDispO = MDnextResponse_array[2]; document.vicidial_form.vendor_lead_code.value = MDnextResponse_array[4]; @@ -2839,9 +3124,12 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} CBcallback_time = MDnextResponse_array[29]; CBuser = MDnextResponse_array[30]; CBcomments = MDnextResponse_array[31]; - + dialed_number = MDnextResponse_array[32]; + dialed_label = MDnextResponse_array[33]; + lead_dial_number = document.vicidial_form.phone_number.value; document.getElementById("MainStatuSSpan").innerHTML = " Appeler: " + document.vicidial_form.phone_number.value + " UID: " + MDnextCID + "   " + man_status; + if ( (dialed_label.length < 3) || (dialed_label=='NONE') ) {dialed_label='MAIN';} web_form_vars = "lead_id=" + document.vicidial_form.lead_id.value + @@ -2887,6 +3175,8 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} "&phone=" + document.vicidial_form.phone_number.value + "&parked_by=" + document.vicidial_form.lead_id.value + "&dispo=" + LeaDDispO + '' + + "&dialed_number=" + dialed_number + '' + + "&dialed_label=" + dialed_label + '' + webform_session; // $VICICOMPOSER_web_QUERY_STRING =~ s/ /+/gi; @@ -3071,6 +3361,9 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} { var manDiaLonly_num = document.vicidial_form.alt_phone.value; lead_dial_number = document.vicidial_form.alt_phone.value; + dialed_number = lead_dial_number; + dialed_label = 'ALT'; + WebFormRefresH(''); } else { @@ -3078,11 +3371,17 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} { var manDiaLonly_num = document.vicidial_form.address3.value; lead_dial_number = document.vicidial_form.address3.value; - } + dialed_number = lead_dial_number; + dialed_label = 'ADDR3'; + WebFormRefresH(''); + } else { var manDiaLonly_num = document.vicidial_form.phone_number.value; lead_dial_number = document.vicidial_form.phone_number.value; + dialed_number = lead_dial_number; + dialed_label = 'MAIN'; + WebFormRefresH(''); } } var xmlhttp=false; @@ -3213,7 +3512,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} } if (xmlhttp) { - autoDiaLready_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=" + taskaction + "&user=" + user + "&pass=" + pass + "&stage=" + VDRP_stage + "&agent_log_id=" + agent_log_id + "&agent_log=" + taskagentlog; + autoDiaLready_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=" + taskaction + "&user=" + user + "&pass=" + pass + "&stage=" + VDRP_stage + "&agent_log_id=" + agent_log_id + "&agent_log=" + taskagentlog + "&campaign=" + campaign; xmlhttp.open('POST', 'vdc_db_query.php'); xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8'); xmlhttp.send(autoDiaLready_query); @@ -3379,6 +3678,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} custchannellive=1; + LasTCID = check_VDIC_array[4]; LeaDPreVDispO = check_VDIC_array[6]; fronter = check_VDIC_array[7]; document.vicidial_form.vendor_lead_code.value = check_VDIC_array[8]; @@ -3411,6 +3711,8 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} CBcallback_time = check_VDIC_array[33]; CBuser = check_VDIC_array[34]; CBcomments = check_VDIC_array[35]; + dialed_number = check_VDIC_array[36]; + dialed_label = check_VDIC_array[37]; lead_dial_number = document.vicidial_form.phone_number.value; document.getElementById("MainStatuSSpan").innerHTML = " Entrant: " + document.vicidial_form.phone_number.value + " UID: " + CIDcheck + "   " + VDIC_fronter; @@ -3451,8 +3753,8 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} if (lastcustserverip == server_ip) { - document.getElementById("VolumeUpSpan").innerHTML = ""; - document.getElementById("VolumeDownSpan").innerHTML = ""; + document.getElementById("VolumeUpSpan").innerHTML = ""; + document.getElementById("VolumeDownSpan").innerHTML = ""; } document.getElementById("DiaLControl").innerHTML = DiaLControl_auto_HTML_OFF; @@ -3461,6 +3763,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} {var group = VDCL_group_id;} else {var group = campaign;} + if ( (dialed_label.length < 3) || (dialed_label=='NONE') ) {dialed_label='MAIN';} web_form_vars = "lead_id=" + document.vicidial_form.lead_id.value + @@ -3507,6 +3810,8 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} "&phone=" + document.vicidial_form.phone_number.value + "&parked_by=" + document.vicidial_form.lead_id.value + "&dispo=" + LeaDDispO + '' + + "&dialed_number=" + dialed_number + '' + + "&dialed_label=" + dialed_label + '' + webform_session; var regWFspace = new RegExp(" ","ig"); @@ -3568,6 +3873,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} {var group = VDCL_group_id;} else {var group = campaign;} + if ( (dialed_label.length < 3) || (dialed_label=='NONE') ) {dialed_label='MAIN';} web_form_vars = "lead_id=" + document.vicidial_form.lead_id.value + @@ -3614,6 +3920,8 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} "&phone=" + document.vicidial_form.phone_number.value + "&parked_by=" + document.vicidial_form.lead_id.value + "&dispo=" + LeaDDispO + '' + + "&dialed_number=" + dialed_number + '' + + "&dialed_label=" + dialed_label + '' + webform_session; var regWFspace = new RegExp(" ","ig"); @@ -3658,6 +3966,28 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} } +// ################################################################################ +// Send leave 3way call a second time from the dispo screen + function DispoLeavE3wayAgaiN() + { + XDchannel = DispO3wayXtrAchannel; + document.vicidial_form.xfernumber.value = DispO3wayCalLxfernumber; + document.vicidial_form.xfercode.value = DispO3wayCalLcamptail; + MDchannel = DispO3waychannel; + lastcustserverip = DispO3wayCalLserverip; + + document.getElementById("DispoSelectHAspan").innerHTML = ""; + + leave_3way_call('SECOND'); + + DispO3waychannel = ''; + DispO3wayXtrAchannel = ''; + DispO3wayCalLserverip = ''; + DispO3wayCalLxfernumber = ''; + DispO3wayCalLcamptail = ''; + } + + // ################################################################################ // Start Hangup Functions for both function bothcall_send_hangup() @@ -3670,7 +4000,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} // ################################################################################ // Send Hangup command for customer call connected to the conference now to Manager - function dialedcall_send_hangup(dispowindow) + function dialedcall_send_hangup(dispowindow,hotkeysused,altdispo) { var form_cust_channel = document.vicidial_form.callchannel.value; var form_cust_serverip = document.vicidial_form.callserverip.value; @@ -3808,10 +4138,36 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} if (document.vicidial_form.DiaLAltPhonE.checked==true) { reselect_alt_dial = 1; + if (altdispo == 'ALTPH2') + { + ManualDialOnly('ALTTéléphoneE'); + } + else + { + if (altdispo == 'ADDR3') + { + ManualDialOnly('AddresS3'); + } + else + { + if (hotkeysused == 'YES') + { + reselect_alt_dial = 0; + manual_auto_hotkey = 1; + } + } + } } else { - document.getElementById("DiaLControl").innerHTML = "\"Appel"; + if (hotkeysused == 'YES') + { + manual_auto_hotkey = 1; + } + else + { + document.getElementById("DiaLControl").innerHTML = "\"Appel"; + } reselect_alt_dial = 0; } } @@ -3820,6 +4176,27 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} if (document.vicidial_form.DiaLAltPhonE.checked==true) { reselect_alt_dial = 1; + if (altdispo == 'ALTPH2') + { + ManualDialOnly('ALTTéléphoneE'); + } + else + { + if (altdispo == 'ADDR3') + { + ManualDialOnly('AddresS3'); + } + else + { + if (hotkeysused == 'YES') + { + document.getElementById("MainStatuSSpan").style.background = panel_bgcolor; + document.getElementById("MainStatuSSpan").innerHTML = ''; + document.getElementById("DiaLControl").innerHTML = DiaLControl_auto_HTML_OFF; + reselect_alt_dial = 0; + } + } + } } else { @@ -3965,6 +4342,14 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} // Update vicidial_list lead record with all altered values from form function CustomerData_update() { + + var REGcommentsAMP = new RegExp('&',"g"); + var REGcommentsQUES = new RegExp("\\?","g"); + var REGcommentsPOUND = new RegExp("\\#","g"); + var REGcommentsRESULT = document.vicidial_form.comments.value.replace(REGcommentsAMP, "--AMP--"); + REGcommentsRESULT = REGcommentsRESULT.replace(REGcommentsQUES, "--QUES--"); + REGcommentsRESULT = REGcommentsRESULT.replace(REGcommentsPOUND, "--POUND--"); + var xmlhttp=false; /*@cc_on @*/ /*@if (@_jscript_version >= 5) @@ -3986,7 +4371,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} } if (xmlhttp) { - VLupdate_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=updateLEAD&format=text&user=" + user + "&pass=" + pass + + VLupdate_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&campaign=" + campaign + "&ACTION=updateLEAD&format=text&user=" + user + "&pass=" + pass + "&lead_id=" + document.vicidial_form.lead_id.value + "&vendor_lead_code=" + document.vicidial_form.vendor_lead_code.value + "&phone_number=" + document.vicidial_form.phone_number.value + @@ -4007,7 +4392,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} "&alt_phone=" + document.vicidial_form.alt_phone.value + "&email=" + document.vicidial_form.email.value + "&security_phrase=" + document.vicidial_form.security_phrase.value + - "&comments=" + document.vicidial_form.comments.value; + "&comments=" + REGcommentsRESULT; xmlhttp.open('POST', 'vdc_db_query.php'); xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8'); xmlhttp.send(VLupdate_query); @@ -4053,6 +4438,34 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} document.getElementById("DispoSelectContent").innerHTML = dispo_HTML; } +// ################################################################################ +// Generate the Pause Code Chooser panel + function PauseCodeSelectContent_create() + { + if ( (AutoDialWaiting == 1) || (VD_live_customer_call==1) || (alt_dial_active==1) ) + { + alert("VOUS DEVEZ ÊTRE FAIT UNE PAUSE POUR ÉCRIRE Un CODE De PAUSE DANS LeMODE D'AUTO-COMPOSER"); + } + else + { + showDiv('PauseCodeSelectBox'); + WaitingForNextStep=1; + PauseCode_HTML = ''; + document.vicidial_form.PauseCodeSelection.value = ''; + var VD_pause_codes_ct_half = parseInt(VD_pause_codes_ct / 2); + PauseCode_HTML = "
Llamada Wrapup: segundos restantes en wrapup



@@ -5653,23 +6137,28 @@ Su Estado:
Calls Dialing: + +
Se ha inhabilitado su sesión
SALIR

Vaya Detrás +
+
+ +

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
@@ -5682,8 +6171,15 @@ Su Estado:
Calls Dialing: +
SELECCIONE Un CÓDIGO De la PAUSA :
+ Pausa Code Selection + +

  +
+
- +
Seleccione una fecha del servicio repetido :
@@ -5726,7 +6222,7 @@ Su Estado:
Calls Dialing: + @@ -5823,6 +6302,7 @@ GRABACIÓN ID:
+
SELECCIÓN DEL GRUPO DE ENTRANTES CLOSER
SELECCIÓN DEL GRUPO DE ENTRANTES CLOSER
@@ -5737,7 +6233,7 @@ Su Estado:
Calls Dialing: + Canal Canal @@ -5747,25 +6243,8 @@ Su Estado:
Calls Dialing: - - - - - -
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
@@ -5809,7 +6288,7 @@ GRABACIÓN ID:

Colgar al Cliente

-Enviar DTMF
+
Enviar DTMF

@@ -5851,14 +6331,18 @@ GRABACIÓN ID:
+\n";} + {echo "\n";} else - {echo "\n";} + {echo "\n";} ?> - + +
segundos:   Canal:   Tiempo:   Email:
Comentarios: +
+
diff --git a/agc_2-X/trunk/LANG_www/agc_fr/conf_exten_check.php b/agc_2-X/trunk/LANG_www/agc_fr/conf_exten_check.php index 03812e84..cce00698 100644 --- a/agc_2-X/trunk/LANG_www/agc_fr/conf_exten_check.php +++ b/agc_2-X/trunk/LANG_www/agc_fr/conf_exten_check.php @@ -33,6 +33,7 @@ # 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 # 61128-2255 - Added update for manual dial vicidial_live_agents +# 70319-1542 - Added agent disabled display function # require("dbconnect.php"); @@ -69,8 +70,8 @@ if (!isset($format)) {$format="text";} if (!isset($ACTION)) {$ACTION="refresh";} if (!isset($client)) {$client="agc";} -$version = '0.0.10'; -$build = '61128-2255'; +$version = '0.0.11'; +$build = '70319-1542'; $StarTtime = date("U"); $NOW_DATE = date("Y-m-d"); $NOW_TIME = date("Y-m-d H:i:s"); @@ -144,6 +145,23 @@ echo " if ($client == 'vdc') { + $Acount=0; + $AexternalDEAD=0; + + ### see if the agent has a record in the vicidial_live_agents table + $stmt="SELECT count(*) 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); + $Acount=$row[0]; + + # ### find out if external table shows agent should be disabled + # $stmt="SELECT count(*) from another_table where user='$user' and status='DEAD';"; + # if ($DB) {echo "|$stmt|\n";} + # $rslt=mysql_query($stmt, $link); + # $row=mysql_fetch_row($rslt); + # $AexternalDEAD=$row[0]; + if ($auto_dial_level > 0) { ### update the vicidial_live_agents every second with a new random number so it is shown to be alive @@ -186,6 +204,9 @@ echo " } + if ($Acount < 1) {$Astatus='DEAD_VLA';} + if ($AexternalDEAD > 0) {$Astatus='DEAD_EXTERNAL';} + echo 'DateTime: ' . $NOW_TIME . '|UnixTime: ' . $StarTtime . '|Statut: ' . $Astatus . '|CampCalls: ' . $RingCalls . "|\n"; } diff --git a/agc_2-X/trunk/LANG_www/agc_fr/manager_send.php b/agc_2-X/trunk/LANG_www/agc_fr/manager_send.php index 91d30d3e..71146e7b 100644 --- a/agc_2-X/trunk/LANG_www/agc_fr/manager_send.php +++ b/agc_2-X/trunk/LANG_www/agc_fr/manager_send.php @@ -1,7 +1,7 @@ LICENSE: GPLv2 +# Copyright (C) 2007 Matt Florell 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 @@ -12,7 +12,7 @@ # - $user # - $pass # optional variables: -# - $ACTION - ('Originate','Redirect','Hangup','Command','Monitor','StopMonitor','SysCIDOriginate','RedirectName','RedirectNameVmail','MonitorConf','StopMonitorConf','RedirectXtra','RedirectXtraCX','RedirectVD','HangupConfDial','VolumeControl') +# - $ACTION - ('Originate','Redirect','Hangup','Command','Monitor','StopMonitor','SysCIDOriginate','RedirectName','RedirectNameVmail','MonitorConf','StopMonitorConf','RedirectXtra','RedirectXtraCX','RedirectVD','HangupConfDial','VolumeControl','OriginateVDRelogin') # - $queryCID - ('CN012345678901234567',...) # - $format - ('text','debug') # - $channel - ('Zap/41-1','SIP/test101-1jut','IAX2/iaxy@iaxy',...) @@ -35,7 +35,7 @@ # - $stage - ('UP','DOWN') # -# changes +# CHANGELOG: # 50401-1002 - First build of script, Hangup function only # 50404-1045 - Redirect basic function enabled # 50406-1522 - Monitor basic function enabled @@ -64,6 +64,10 @@ # 61004-1526 - Added parsing of volume control command and lookup or number # 61130-1617 - Added lead_id to MonitorConf for recording_log # 61201-1115 - Added user to MonitorConf for recording_log +# 70111-1600 - added ability to use BLEND/INBND/*_C/*_B/*_I as closer campaigns +# 70226-1251 - Added Mute/UnMute to conference volume control +# 70320-1502 - Added option to allow retry of leave-3way-call and debug logging +# 70322-1636 - Added sipsak display ability # require("dbconnect.php"); @@ -123,6 +127,16 @@ if (isset($_GET["phone_number"])) {$phone_number=$_GET["phone_number"];} elseif (isset($_POST["phone_number"])) {$phone_number=$_POST["phone_number"];} if (isset($_GET["stage"])) {$stage=$_GET["stage"];} elseif (isset($_POST["stage"])) {$stage=$_POST["stage"];} +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["phone_ip"])) {$phone_ip=$_GET["phone_ip"];} + elseif (isset($_POST["phone_ip"])) {$phone_ip=$_POST["phone_ip"];} +if (isset($_GET["enable_sipsak_messages"])) {$enable_sipsak_messages=$_GET["enable_sipsak_messages"];} + elseif (isset($_POST["enable_sipsak_messages"])) {$enable_sipsak_messages=$_POST["enable_sipsak_messages"];} +if (isset($_GET["allow_sipsak_messages"])) {$allow_sipsak_messages=$_GET["allow_sipsak_messages"];} + elseif (isset($_POST["allow_sipsak_messages"])) {$allow_sipsak_messages=$_POST["allow_sipsak_messages"];} $user=ereg_replace("[^0-9a-zA-Z]","",$user); $pass=ereg_replace("[^0-9a-zA-Z]","",$pass); @@ -133,8 +147,8 @@ if (!isset($ACTION)) {$ACTION="Originate";} if (!isset($format)) {$format="alert";} if (!isset($ext_priority)) {$ext_priority="1";} -$version = '2.0.27'; -$build = '61130-1617'; +$version = '2.0.29'; +$build = '70320-1502'; $StarTtime = date("U"); $NOW_DATE = date("Y-m-d"); $NOW_TIME = date("Y-m-d H:i:s"); @@ -279,6 +293,21 @@ if ($ACTION=="OriginateNameVmail") } } +if ($ACTION=="OriginateVDRelogin") +{ + if ( ($enable_sipsak_messages > 0) and ($allow_sipsak_messages > 0) and (eregi("SIP",$protocol)) ) + { + $CIDdate = date("ymdHis"); + $DS='-'; + $SIPSAK_prefix = 'LIN-'; + print "\n"; + passthru("/usr/local/bin/sipsak -M -O desktop -B \"$SIPSAK_prefix$campaign\" -r 5060 -s sip:$extension@$phone_ip > /dev/null"); + $queryCID = "$SIPSAK_prefix$campaign$DS$CIDdate"; + + } + $ACTION="Originate"; +} + if ($ACTION=="Originate") { if ( (strlen($exten)<1) or (strlen($channel)<1) or (strlen($ext_context)<1) or (strlen($queryCID)<10) ) @@ -430,7 +459,7 @@ if ($ACTION=="RedirectVD") else { if (strlen($call_server_ip)>6) {$server_ip = $call_server_ip;} - if (eregi("CLOSER",$campaign)) + if (eregi("(CLOSER|BLEND|INBND|_C$|_B$|_I$)",$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";} @@ -560,6 +589,7 @@ if ($ACTION=="RedirectNameVmail") if ($ACTION=="RedirectXtraCX") { + $DBout=''; $row=''; $rowx=''; $channel_liveX=1; $channel_liveY=1; @@ -575,6 +605,15 @@ if ($ACTION=="RedirectXtraCX") echo "ext_context $ext_context est obligatoire\n"; echo "ext_priority $ext_priority est obligatoire\n"; echo "\nRedirect Action pas envoyé\n"; + if (ereg("SECOND|FIRST|DEBUG",$filename)) + { + if ($WeBRooTWritablE > 0) + { + $fp = fopen ("./vicidial_debug.txt", "a"); + fwrite ($fp, "$NOW_TIME|RDCXC|$filename|$user|$campaign|$$channel|$extrachannel|$queryCID|$exten|$ext_context|ext_priority|\n"); + fclose($fp); + } + } } else { @@ -594,6 +633,7 @@ if ($ACTION=="RedirectXtraCX") { $channel_liveX=0; echo "Canal $channel n'est pas en ligne sur $call_server_ip, Redirect commande non insérée\n"; + if (ereg("SECOND|FIRST|DEBUG",$filename)) {$DBout .= "$channel n'est pas en ligne sur $call_server_ip";} } } $stmt="SELECT count(*) FROM live_channels where server_ip = '$server_ip' and channel='$extrachannel';"; @@ -610,6 +650,7 @@ if ($ACTION=="RedirectXtraCX") { $channel_liveY=0; echo "Canal $channel n'est pas en ligne sur $server_ip, Redirect commande non insérée\n"; + if (ereg("SECOND|FIRST|DEBUG",$filename)) {$DBout .= "$channel n'est pas en ligne sur $server_ip";} } } if ( ($channel_liveX==1) && ($channel_liveY==1) ) @@ -622,6 +663,7 @@ if ($ACTION=="RedirectXtraCX") { $channel_liveY=0; echo "No Local agent to send call to, Redirect commande non insérée\n"; + if (ereg("SECOND|FIRST|DEBUG",$filename)) {$DBout .= "No Local agent to send call to";} } else { @@ -654,6 +696,7 @@ if ($ACTION=="RedirectXtraCX") $rslt=mysql_query($stmt, $link); echo "RedirectXtraCX commande envoyée pour Canal $channel sur $call_server_ip and \nHungup $extrachannel sur $server_ip\n"; + if (ereg("SECOND|FIRST|DEBUG",$filename)) {$DBout .= "$channel sur $call_server_ip, Hungup $extrachannel sur $server_ip";} } } else @@ -662,8 +705,19 @@ if ($ACTION=="RedirectXtraCX") {$ACTION="Redirect"; $server_ip = $call_server_ip;} if ($channel_liveY==1) {$ACTION="Redirect"; $channel=$extrachannel;} - + if (ereg("SECOND|FIRST|DEBUG",$filename)) {$DBout .= "Changed to Redirect: $channel sur $server_ip";} } + + if (ereg("SECOND|FIRST|DEBUG",$filename)) + { + if ($WeBRooTWritablE > 0) + { + $fp = fopen ("./vicidial_debug.txt", "a"); + fwrite ($fp, "$NOW_TIME|RDCXC|$filename|$user|$campaign|$DBout|\n"); + fclose($fp); + } + } + } } @@ -688,6 +742,15 @@ if ($ACTION=="RedirectXtra") echo "ext_context $ext_context est obligatoire\n"; echo "ext_priority $ext_priority est obligatoire\n"; echo "\nRedirect Action pas envoyé\n"; + if (ereg("SECOND|FIRST|DEBUG",$filename)) + { + if ($WeBRooTWritablE > 0) + { + $fp = fopen ("./vicidial_debug.txt", "a"); + fwrite ($fp, "$NOW_TIME|RDX|$filename|$user|$campaign|$$channel|$extrachannel|$queryCID|$exten|$ext_context|ext_priority|\n"); + fclose($fp); + } + } } else { @@ -708,6 +771,7 @@ if ($ACTION=="RedirectXtra") { $channel_liveX=0; echo "Il n'y a pas de conférence disponible sur $server_ip, Redirect commande non insérée\n"; + if (ereg("SECOND|FIRST|DEBUG",$filename)) {$DBout .= "Il n'y a pas de conférence disponible sur $server_ip";} } } @@ -717,7 +781,7 @@ if ($ACTION=="RedirectXtra") if ($format=='debug') {echo "\n";} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); - if ($row[0]==0) + if ( ($row[0]==0) && (!ereg("SECOND",$filename)) ) { $stmt="SELECT count(*) FROM live_sip_channels where server_ip = '$call_server_ip' and channel='$channel';"; if ($format=='debug') {echo "\n";} @@ -727,13 +791,14 @@ if ($ACTION=="RedirectXtra") { $channel_liveX=0; echo "Canal $channel n'est pas en ligne sur $call_server_ip, Redirect commande non insérée\n"; + if (ereg("SECOND|FIRST|DEBUG",$filename)) {$DBout .= "$channel n'est pas en ligne sur $call_server_ip";} } } $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) + if ( ($row[0]==0) && (!ereg("SECOND",$filename)) ) { $stmt="SELECT count(*) FROM live_sip_channels where server_ip = '$server_ip' and channel='$extrachannel';"; if ($format=='debug') {echo "\n";} @@ -743,6 +808,7 @@ if ($ACTION=="RedirectXtra") { $channel_liveY=0; echo "Canal $channel n'est pas en ligne sur $server_ip, Redirect commande non insérée\n"; + if (ereg("SECOND|FIRST|DEBUG",$filename)) {$DBout .= "$channel n'est pas en ligne sur $server_ip";} } } if ( ($channel_liveX==1) && ($channel_liveY==1) ) @@ -754,6 +820,7 @@ if ($ACTION=="RedirectXtra") $rslt=mysql_query($stmt, $link); echo "RedirectXtra commande envoyée pour Canal $channel and \nExtraCanal $extrachannel\n to $exten sur $server_ip\n"; + if (ereg("SECOND|FIRST|DEBUG",$filename)) {$DBout .= "$channel and $extrachannel to $exten sur $server_ip";} } else { @@ -778,6 +845,7 @@ if ($ACTION=="RedirectXtra") $rslt=mysql_query($stmt, $link); echo "RedirectXtra commande envoyée pour Canal $channel sur $call_server_ip and \nExtraCanal $extrachannel\n to $exten sur $server_ip\n"; + if (ereg("SECOND|FIRST|DEBUG",$filename)) {$DBout .= "$channel/$call_server_ip and $extrachannel/$server_ip to $exten";} } } else @@ -788,6 +856,17 @@ if ($ACTION=="RedirectXtra") {$ACTION="Redirect"; $channel=$extrachannel;} } + + if (ereg("SECOND|FIRST|DEBUG",$filename)) + { + if ($WeBRooTWritablE > 0) + { + $fp = fopen ("./vicidial_debug.txt", "a"); + fwrite ($fp, "$NOW_TIME|RDX|$filename|$user|$campaign|$DBout|\n"); + fclose($fp); + } + } + } } } @@ -1018,8 +1097,10 @@ if ($ACTION=="VolumeControl") else { $participant_number='XXYYXXYYXXYYXX'; + if (eregi('UP',$stage)) {$vol_prefix='4';} if (eregi('DOWN',$stage)) {$vol_prefix='3';} - else {$vol_prefix='4';} + if (eregi('UNMUTE',$stage)) {$vol_prefix='2';} + if (eregi('MUTING',$stage)) {$vol_prefix='1';} $local_DEF = 'Local/'; $local_AMP = '@'; $volume_local_channel = "$local_DEF$participant_number$vol_prefix$exten$local_AMP$ext_context"; diff --git a/agc_2-X/trunk/LANG_www/agc_fr/vdc_db_query.php b/agc_2-X/trunk/LANG_www/agc_fr/vdc_db_query.php index 727cb80b..c03ea7d5 100644 --- a/agc_2-X/trunk/LANG_www/agc_fr/vdc_db_query.php +++ b/agc_2-X/trunk/LANG_www/agc_fr/vdc_db_query.php @@ -1,7 +1,7 @@ LICENSE: GPLv2 +# Copyright (C) 2007 Matt Florell 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 @@ -13,7 +13,7 @@ # - $pass # optional variables: # - $format - ('text','debug') -# - $ACTION - ('regCLOSER','manDiaLnextCALL','manDiaLskip','manDiaLonly','manDiaLlookCALL','manDiaLlogCALL','userLOGout','updateDISPO','VDADpause','VDADready','VDADcheckINCOMING','UpdatEFavoritEs','CalLBacKLisT','CalLBacKCounT') +# - $ACTION - ('regCLOSER','manDiaLnextCALL','manDiaLskip','manDiaLonly','manDiaLlookCALL','manDiaLlogCALL','userLOGout','updateDISPO','VDADpause','VDADready','VDADcheckINCOMING','UpdatEFavoritEs','CalLBacKLisT','CalLBacKCounT','PauseCodeSubmit') # - $stage - ('start','finish','lookup','new') # - $closer_choice - ('CL_TESTCAMP_L CL_OUT123_L -') # - $conf_exten - ('8600011',...) @@ -70,7 +70,7 @@ # - $omit_phone_code - ('Y','N') # - $no_delete_sessions - ('0','1') -# changes +# CHANGELOG: # 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 @@ -101,7 +101,7 @@ # - 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 +# 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 @@ -110,10 +110,28 @@ # 60821-1647 - Added ability to not delete sessions at logout # 60906-1124 - Added lookup and sending of callback data for CALLBK calls # 61128-2229 - Added vicidial_live_agents and vicidial_auto_calls manual dial entries +# 70111-1600 - Added ability to use BLEND/INBND/*_C/*_B/*_I as closer campaigns +# 70115-1733 - Added alt_dial functionality in auto-dial modes +# 70118-1501 - Added user_group to vicidial_log,_agent_log,_closer_log,_callbacks +# 70123-1357 - Fixed bug that would not update vicidial_closer_log status to dispo +# 70202-1438 - Added pause code submit function +# 70203-0930 - Added dialed_number to lead info output +# 70203-1030 - Added dialed_label to lead info output +# 70206-1126 - Added INBOUND status for inbound/closer calls in vicidial_live_agents +# 70212-1253 - Fixed small issue with CXFER +# 70213-1431 - Added QueueMetrics PAUSE/UNPAUSE/AGENTLOGIN/AGENTLOGOFF actions +# 70214-1231 - Added queuemetrics_log_id field for server_id in queue_log +# 70215-1210 - Added queuemetrics COMPLETEAGENT action +# 70216-1051 - Fixed double call complete queuemetrics logging +# 70222-1616 - Changed queue_log PAUSE/UNPAUSE to PAUSEALL/UNPAUSEALL +# 70309-1034 - Allow amphersands and questions marks in comments to pass through +# 70313-1052 - Allow pound signs(hash) in comments to pass through +# 70319-1544 - Added agent disable update customer data function +# 70322-1545 - Added sipsak display ability # -$version = '2.0.38'; -$build = '61128-2229'; +$version = '2.0.55'; +$build = '70322-1545'; require("dbconnect.php"); @@ -240,6 +258,10 @@ if (isset($_GET["use_internal_dnc"])) {$use_internal_dnc=$_GET["use_internal_d elseif (isset($_POST["use_internal_dnc"])) {$use_internal_dnc=$_POST["use_internal_dnc"];} if (isset($_GET["omit_phone_code"])) {$omit_phone_code=$_GET["omit_phone_code"];} elseif (isset($_POST["omit_phone_code"])) {$omit_phone_code=$_POST["omit_phone_code"];} +if (isset($_GET["phone_ip"])) {$phone_ip=$_GET["phone_ip"];} + elseif (isset($_POST["phone_ip"])) {$phone_ip=$_POST["phone_ip"];} +if (isset($_GET["enable_sipsak_messages"])) {$enable_sipsak_messages=$_GET["enable_sipsak_messages"];} + elseif (isset($_POST["enable_sipsak_messages"])) {$enable_sipsak_messages=$_POST["enable_sipsak_messages"];} $user=ereg_replace("[^0-9a-zA-Z]","",$user); @@ -261,6 +283,7 @@ $CIDdate = date("mdHis"); $ENTRYdate = date("YmdHis"); if (!isset($query_date)) {$query_date = $NOW_DATE;} $MT[0]=''; +$agents='@agents'; $stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;"; if ($DB) {echo "|$stmt|\n";} @@ -375,7 +398,7 @@ if ($ACTION == 'manDiaLnextCaLL') 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) ) + if ( (strlen($callback_id)>0) and (strlen($lead_id)>0) ) { $affected_rows=1; $CBleadIDset=1; @@ -421,7 +444,7 @@ if ($ACTION == 'manDiaLnextCaLL') if ($DB) {echo "$stmt\n";} $rslt=mysql_query($stmt, $link); $affected_rows = mysql_affected_rows($link); - $lead_id = mysql_insert_id(); + $lead_id = mysql_insert_id($link); $CBleadIDset=1; } } @@ -432,7 +455,7 @@ if ($ACTION == 'manDiaLnextCaLL') if ($DB) {echo "$stmt\n";} $rslt=mysql_query($stmt, $link); $affected_rows = mysql_affected_rows($link); - $lead_id = mysql_insert_id(); + $lead_id = mysql_insert_id($link); $CBleadIDset=1; } } @@ -535,7 +558,7 @@ if ($ACTION == 'manDiaLnextCaLL') $rslt=mysql_query($stmt, $link); } - $stmt="UPDATE vicidial_agent_log set lead_id='$lead_id' where agent_log_id='$agent_log_id';"; + $stmt="UPDATE vicidial_agent_log set lead_id='$lead_id',comments='MANUAL' where agent_log_id='$agent_log_id';"; if ($format=='debug') {echo "\n";} $rslt=mysql_query($stmt, $link); @@ -579,7 +602,7 @@ if ($ACTION == 'manDiaLnextCaLL') $rslt=mysql_query($stmt, $link); ### update the agent status to INCALL in vicidial_live_agents - $stmt = "UPDATE vicidial_live_agents set status='INCALL',last_call_time='$NOW_TIME',callerid='$MqueryCID',lead_id='$lead_id' where user='$user' and server_ip='$server_ip';"; + $stmt = "UPDATE vicidial_live_agents set status='INCALL',last_call_time='$NOW_TIME',callerid='$MqueryCID',lead_id='$lead_id',comments='MANUAL' where user='$user' and server_ip='$server_ip';"; if ($DB) {echo "$stmt\n";} $rslt=mysql_query($stmt, $link); } @@ -619,6 +642,8 @@ if ($ACTION == 'manDiaLnextCaLL') $LeaD_InfO .= $CBcallback_time . "\n"; $LeaD_InfO .= $CBuser . "\n"; $LeaD_InfO .= $CBcomments . "\n"; + $LeaD_InfO .= $phone_number . "\n"; + $LeaD_InfO .= "MAIN\n"; echo $LeaD_InfO; @@ -716,7 +741,7 @@ if ($ACTION == 'manDiaLonly') $rslt=mysql_query($stmt, $link); ### update the agent status to INCALL in vicidial_live_agents - $stmt = "UPDATE vicidial_live_agents set status='INCALL',last_call_time='$NOW_TIME',callerid='$MqueryCID',lead_id='$lead_id' where user='$user' and server_ip='$server_ip';"; + $stmt = "UPDATE vicidial_live_agents set status='INCALL',last_call_time='$NOW_TIME',callerid='$MqueryCID',lead_id='$lead_id',comments='MANUAL' where user='$user' and server_ip='$server_ip';"; if ($DB) {echo "$stmt\n";} $rslt=mysql_query($stmt, $link); @@ -795,8 +820,18 @@ if ($stage == "start") } else { + $user_group=''; + $stmt="SELECT user_group FROM vicidial_users where user='$user' LIMIT 1;"; + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $ug_record_ct = mysql_num_rows($rslt); + if ($ug_record_ct > 0) + { + $row=mysql_fetch_row($rslt); + $user_group = trim("$row[0]"); + } ##### 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');"; + $stmt="INSERT INTO vicidial_log (uniqueid,lead_id,list_id,campaign_id,call_date,start_epoch,status,phone_code,phone_number,user,comments,processed,user_group) values('$uniqueid','$lead_id','$list_id','$campaign','$NOW_TIME','$StarTtime','INCALL','$phone_code','$phone_number','$user','MANUAL','N','$user_group');"; if ($DB) {echo "$stmt\n";} $rslt=mysql_query($stmt, $link); $affected_rows = mysql_affected_rows($link); @@ -844,10 +879,10 @@ if ($stage == "end") { if ($start_epoch < 1000) { - if (eregi("CLOSER",$campaign)) + if (eregi("(CLOSER|BLEND|INBND|_C$|_B$|_I$)",$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';"; + $stmt="SELECT start_epoch FROM vicidial_closer_log where phone_number='$phone_number' and lead_id='$lead_id' and user='$user' order by closecallid desc limit 1;"; } else { @@ -870,32 +905,249 @@ if ($stage == "end") } else {$length_in_sec = ($StarTtime - $start_epoch);} - if (eregi("CLOSER",$campaign)) + if (eregi("(CLOSER|BLEND|INBND|_C$|_B$|_I$)",$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); } + + ############################################# + ##### DEBUT QUEUEMETRICS LOGGING LOOKUP ##### + $stmt = "SELECT enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_log_id FROM system_settings;"; + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $qm_conf_ct = mysql_num_rows($rslt); + $i=0; + while ($i < $qm_conf_ct) + { + $row=mysql_fetch_row($rslt); + $enable_queuemetrics_logging = $row[0]; + $queuemetrics_server_ip = $row[1]; + $queuemetrics_dbname = $row[2]; + $queuemetrics_login = $row[3]; + $queuemetrics_pass = $row[4]; + $queuemetrics_log_id = $row[5]; + $i++; + } + ##### END QUEUEMETRICS LOGGING LOOKUP ##### + ########################################### + if ($auto_dial_level > 0) { + ### check to see if campaign has alt_dial enabled + $stmt="SELECT auto_alt_dial FROM vicidial_campaigns where campaign_id='$campaign';"; + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $VAC_mancall_ct = mysql_num_rows($rslt); + if ($VAC_mancall_ct > 0) + { + $row=mysql_fetch_row($rslt); + $auto_alt_dial =$row[0]; + } + else {$auto_alt_dial = 'NONE';} + if (eregi("(ALT_ONLY|ADDR3_ONLY|ALT_AND_ADDR3)",$auto_alt_dial)) + { + ### check to see if lead should be alt_dialed + $stmt="SELECT alt_dial FROM vicidial_auto_calls where lead_id='$lead_id';"; + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $VAC_mancall_ct = mysql_num_rows($rslt); + if ($VAC_mancall_ct > 0) + { + $row=mysql_fetch_row($rslt); + $alt_dial =$row[0]; + } + else {$alt_dial = 'NONE';} + + if ( (eregi("(NONE|MAIN)",$alt_dial)) and (eregi("(ALT_ONLY|ALT_AND_ADDR3)",$auto_alt_dial)) ) + { + $stmt="SELECT alt_phone,gmt_offset_now,state FROM vicidial_list where lead_id='$lead_id';"; + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $VAC_mancall_ct = mysql_num_rows($rslt); + if ($VAC_mancall_ct > 0) + { + $row=mysql_fetch_row($rslt); + $alt_phone = $row[0]; + $alt_phone = eregi_replace("[^0-9]","",$alt_phone); + $gmt_offset_now = $row[1]; + $state = $row[2]; + } + else {$alt_phone = '';} + if (strlen($alt_phone)>5) + { + ### insert record into vicidial_hopper for address3 call attempt + $stmt = "INSERT INTO vicidial_hopper SET lead_id='$lead_id',campaign_id='$campaign',status='HOLD',list_id='$list_id',gmt_offset_now='$gmt_offset_now',state='$state',alt_dial='ALT',user='';"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + } + } + if ( ( (eregi("(ALT)",$alt_dial)) and (eregi("ALT_AND_ADDR3",$auto_alt_dial)) ) or ( (eregi("(NONE|MAIN)",$alt_dial)) and (eregi("ADDR3_ONLY",$auto_alt_dial)) ) ) + { + $stmt="SELECT address3,gmt_offset_now,state FROM vicidial_list where lead_id='$lead_id';"; + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $VAC_mancall_ct = mysql_num_rows($rslt); + if ($VAC_mancall_ct > 0) + { + $row=mysql_fetch_row($rslt); + $address3 = $row[0]; + $address3 = eregi_replace("[^0-9]","",$address3); + $gmt_offset_now = $row[1]; + $state = $row[2]; + } + else {$address3 = '';} + if (strlen($address3)>5) + { + ### insert record into vicidial_hopper for address3 call attempt + $stmt = "INSERT INTO vicidial_hopper SET lead_id='$lead_id',campaign_id='$campaign',status='HOLD',list_id='$list_id',gmt_offset_now='$gmt_offset_now',state='$state',alt_dial='ADDR3',user='';"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + } + } + } + + if ($enable_queuemetrics_logging > 0) + { + ### check to see if lead should be alt_dialed + $stmt="SELECT auto_call_id,lead_id,phone_number,status,campaign_id,phone_code,alt_dial,stage,callerid,uniqueid from vicidial_auto_calls where lead_id='$lead_id';"; + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $VAC_qm_ct = mysql_num_rows($rslt); + if ($VAC_qm_ct > 0) + { + $row=mysql_fetch_row($rslt); + $auto_call_id = $row[0]; + $CLlead_id = $row[1]; + $CLphone_number = $row[2]; + $CLstatus = $row[3]; + $CLcampaign_id = $row[4]; + $CLphone_code = $row[5]; + $CLalt_dial = $row[6]; + $CLstage = $row[7]; + $CLcallerid = $row[8]; + $CLuniqueid = $row[9]; + } + + $CLstage = preg_replace("/.*-/",'',$CLstage); + if (strlen($CLstage) < 1) {$CLstage=0;} + + $linkB=mysql_connect("$queuemetrics_server_ip", "$queuemetrics_login", "$queuemetrics_pass"); + mysql_select_db("$queuemetrics_dbname", $linkB); + + $stmt="SELECT count(*) from queue_log where call_id='$MDnextCID' and verb='COMPLETECALLER';"; + $rslt=mysql_query($stmt, $linkB); + if ($DB) {echo "$stmt\n";} + $VAC_cc_ct = mysql_num_rows($rslt); + if ($VAC_cc_ct > 0) + { + $row=mysql_fetch_row($rslt); + $caller_complete = $row[0]; + } + + if ($caller_complete < 1) + { + $stmt = "INSERT INTO queue_log SET partition='P01',time_id='$StarTtime',call_id='$MDnextCID',queue='$campaign',agent='Agent/$user',verb='COMPLETEAGENT',data1='$CLstage',data2='$length_in_sec',data3='1',serverid='$queuemetrics_log_id';"; + if ($DB) {echo "$stmt\n";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $linkB); + $affected_rows = mysql_affected_rows($linkB); + } + mysql_close($linkB); + } + ### delete call record from vicidial_auto_calls - $stmt = "DELETE from vicidial_auto_calls where uniqueid='$uniqueid';"; + $stmt = "DELETE from vicidial_auto_calls where lead_id='$lead_id';"; 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';"; + + $stmt = "UPDATE vicidial_live_agents set status='PAUSED',lead_id='',uniqueid=0,callerid='',channel='',call_server_ip='',last_call_finish='$NOW_TIME',comments='' where user='$user' and server_ip='$server_ip';"; if ($DB) {echo "$stmt\n";} $rslt=mysql_query($stmt, $link); + $affected_rows = mysql_affected_rows($link); + if ($affected_rows > 0) + { + if ($enable_queuemetrics_logging > 0) + { + $linkB=mysql_connect("$queuemetrics_server_ip", "$queuemetrics_login", "$queuemetrics_pass"); + mysql_select_db("$queuemetrics_dbname", $linkB); + + $stmt = "INSERT INTO queue_log SET partition='P01',time_id='$StarTtime',call_id='NONE',queue='NONE',agent='Agent/$user',verb='PAUSEALL',serverid='$queuemetrics_log_id';"; + if ($DB) {echo "$stmt\n";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $linkB); + $affected_rows = mysql_affected_rows($linkB); + + mysql_close($linkB); + } + } } else { + if ($enable_queuemetrics_logging > 0) + { + ### check to see if lead should be alt_dialed + $stmt="SELECT auto_call_id,lead_id,phone_number,status,campaign_id,phone_code,alt_dial,stage,callerid,uniqueid from vicidial_auto_calls where lead_id='$lead_id';"; + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $VAC_qm_ct = mysql_num_rows($rslt); + if ($VAC_qm_ct > 0) + { + $row=mysql_fetch_row($rslt); + $auto_call_id = $row[0]; + $CLlead_id = $row[1]; + $CLphone_number = $row[2]; + $CLstatus = $row[3]; + $CLcampaign_id = $row[4]; + $CLphone_code = $row[5]; + $CLalt_dial = $row[6]; + $CLstage = $row[7]; + $CLcallerid = $row[8]; + $CLuniqueid = $row[9]; + } + + $CLstage = preg_replace("/XFER|-/",'',$CLstage); + if ($CLstage < 0.25) {$CLstage=0;} + + $linkB=mysql_connect("$queuemetrics_server_ip", "$queuemetrics_login", "$queuemetrics_pass"); + mysql_select_db("$queuemetrics_dbname", $linkB); + + $stmt = "INSERT INTO queue_log SET partition='P01',time_id='$StarTtime',call_id='$MDnextCID',queue='$campaign',agent='Agent/$user',verb='COMPLETEAGENT',data1='$CLstage',data2='$length_in_sec',data3='1',serverid='$queuemetrics_log_id';"; + if ($DB) {echo "$stmt\n";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $linkB); + $affected_rows = mysql_affected_rows($linkB); + + mysql_close($linkB); + } + $stmt = "DELETE from vicidial_auto_calls lead_id='$lead_id';"; 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';"; + $stmt = "UPDATE vicidial_live_agents set status='PAUSED',lead_id='',uniqueid=0,callerid='',channel='',call_server_ip='',last_call_finish='$NOW_TIME',comments='' where user='$user' and server_ip='$server_ip';"; if ($DB) {echo "$stmt\n";} $rslt=mysql_query($stmt, $link); + $affected_rows = mysql_affected_rows($link); + if ($affected_rows > 0) + { + if ($enable_queuemetrics_logging > 0) + { + $linkB=mysql_connect("$queuemetrics_server_ip", "$queuemetrics_login", "$queuemetrics_pass"); + mysql_select_db("$queuemetrics_dbname", $linkB); + + $stmt = "INSERT INTO queue_log SET partition='P01',time_id='$StarTtime',call_id='NONE',queue='NONE',agent='Agent/$user',verb='PAUSEALL',serverid='$queuemetrics_log_id';"; + if ($DB) {echo "$stmt\n";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $linkB); + $affected_rows = mysql_affected_rows($linkB); + + mysql_close($linkB); + } + } } ##### look for the channel in the UPDATED vicidial_manager record of the call initiation @@ -1095,7 +1347,7 @@ if ($ACTION == 'VDADcheckINCOMING') 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';"; + $stmt = "UPDATE vicidial_live_agents set status='INCALL',last_call_time='$NOW_TIME',comments='AUTO' where user='$user' and server_ip='$server_ip';"; if ($DB) {echo "$stmt\n";} $rslt=mysql_query($stmt, $link); @@ -1163,25 +1415,37 @@ if ($ACTION == 'VDADcheckINCOMING') $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';"; + $user_group=''; + $stmt="SELECT user_group FROM vicidial_users where user='$user' LIMIT 1;"; + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $ug_record_ct = mysql_num_rows($rslt); + if ($ug_record_ct > 0) + { + $row=mysql_fetch_row($rslt); + $user_group = trim("$row[0]"); + } + $stmt = "UPDATE vicidial_log set user='$user', comments='AUTO', list_id='$list_id', status='INCALL', user_group='$user_group' where lead_id='$lead_id' and uniqueid='$uniqueid';"; if ($DB) {echo "$stmt\n";} $rslt=mysql_query($stmt, $link); - if (eregi("CLOSER",$campaign)) + if (eregi("(CLOSER|BLEND|INBND|_C$|_B$|_I$)",$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;"; + $stmt = "UPDATE vicidial_closer_log set user='$user', comments='AUTO', list_id='$list_id', status='INCALL', user_group='$user_group' 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;"; + $stmt = "select campaign_id,phone_number,alt_dial 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) + if ($VDAC_cid_ct > 0) { $row=mysql_fetch_row($rslt); $VDADchannel_group =$row[0]; + $dialed_number =$row[1]; + $dialed_label =$row[2]; } $stmt = "select count(*) from vicidial_log where lead_id='$lead_id' and uniqueid='$uniqueid';"; @@ -1211,6 +1475,11 @@ if ($ACTION == 'VDADcheckINCOMING') $VDCL_xferconf_a_number = $row[11]; $VDCL_xferconf_b_dtmf = $row[12]; $VDCL_xferconf_b_number = $row[13]; + + ### update the comments in vicidial_live_agents record + $stmt = "UPDATE vicidial_live_agents set comments='INBOUND' where user='$user' and server_ip='$server_ip';"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); } else { @@ -1263,6 +1532,17 @@ if ($ACTION == 'VDADcheckINCOMING') $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"; + + $stmt = "select phone_number,alt_dial 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 ($VDAC_cid_ct > 0) + { + $row=mysql_fetch_row($rslt); + $dialed_number =$row[0]; + $dialed_label =$row[1]; + } } $comments = eregi_replace("\r",'',$comments); @@ -1300,6 +1580,8 @@ if ($ACTION == 'VDADcheckINCOMING') $LeaD_InfO .= $CBcallback_time . "\n"; $LeaD_InfO .= $CBuser . "\n"; $LeaD_InfO .= $CBcomments . "\n"; + $LeaD_InfO .= $dialed_number . "\n"; + $LeaD_InfO .= $dialed_label . "\n"; echo $LeaD_InfO; @@ -1327,6 +1609,7 @@ if ($ACTION == 'VDADcheckINCOMING') if ($format=='debug') {echo "\n";} $rslt=mysql_query($stmt, $link); } + } else { @@ -1354,8 +1637,18 @@ if ( (strlen($campaign)<1) || (strlen($conf_exten)<1) ) } else { + $user_group=''; + $stmt="SELECT user_group FROM vicidial_users where user='$user' LIMIT 1;"; + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $ug_record_ct = mysql_num_rows($rslt); + if ($ug_record_ct > 0) + { + $row=mysql_fetch_row($rslt); + $user_group = trim("$row[0]"); + } ##### Insert a DÉCONNEXION record into the user log - $stmt="INSERT INTO vicidial_user_log values('','$user','DÉCONNEXION','$campaign','$NOW_TIME','$StarTtime');"; + $stmt="INSERT INTO vicidial_user_log (user,event,campaign_id,event_date,event_epoch,user_group) values('$user','DÉCONNEXION','$campaign','$NOW_TIME','$StarTtime','$user_group');"; if ($DB) {echo "$stmt\n";} $rslt=mysql_query($stmt, $link); $vul_insert = mysql_affected_rows($link); @@ -1390,11 +1683,94 @@ else $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','','','','','','','','','');"; + $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Hangup','ULGH3459$StarTtime','Channel: $agent_channel','','','','','','','','','');"; if ($format=='debug') {echo "\n";} $rslt=mysql_query($stmt, $link); } + $pause_sec=0; + $stmt = "select pause_epoch,pause_sec,wait_epoch,talk_epoch,dispo_epoch 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) and (strlen($row[3]<5)) and (strlen($row[4]<5)) ) + { + $row=mysql_fetch_row($rslt); + $pause_sec = (($StarTtime - $row[0]) + $row[1]); + + $stmt="UPDATE vicidial_agent_log set pause_sec='$pause_sec',wait_epoch='$StarTtime' where agent_log_id='$agent_log_id';"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + } + + if ($vla_delete > 0) + { + ############################################# + ##### DEBUT QUEUEMETRICS LOGGING LOOKUP ##### + $stmt = "SELECT enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_log_id,allow_sipsak_messages FROM system_settings;"; + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $qm_conf_ct = mysql_num_rows($rslt); + $i=0; + while ($i < $qm_conf_ct) + { + $row=mysql_fetch_row($rslt); + $enable_queuemetrics_logging = $row[0]; + $queuemetrics_server_ip = $row[1]; + $queuemetrics_dbname = $row[2]; + $queuemetrics_login = $row[3]; + $queuemetrics_pass = $row[4]; + $queuemetrics_log_id = $row[5]; + $allow_sipsak_messages = $row[6]; + $i++; + } + ##### END QUEUEMETRICS LOGGING LOOKUP ##### + ########################################### + if ( ($enable_sipsak_messages > 0) and ($allow_sipsak_messages > 0) and (eregi("SIP",$protocol)) ) + { + $SIPSAK_message = 'LOGGED OUT'; + passthru("/usr/local/bin/sipsak -M -O desktop -B \"$SIPSAK_message\" -r 5060 -s sip:$extension@$phone_ip > /dev/null"); + } + + if ($enable_queuemetrics_logging > 0) + { + $linkB=mysql_connect("$queuemetrics_server_ip", "$queuemetrics_login", "$queuemetrics_pass"); + mysql_select_db("$queuemetrics_dbname", $linkB); + + # $stmt = "INSERT INTO queue_log SET partition='P01',time_id='$StarTtime',call_id='NONE',queue='$campaign',agent='Agent/$user',verb='PAUSE',serverid='1';"; + # if ($DB) {echo "$stmt\n";} + # if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + # $rslt=mysql_query($stmt, $linkB); + # $affected_rows = mysql_affected_rows($linkB); + + $stmt = "SELECT time_id FROM queue_log where agent='Agent/$user' and verb='AGENTLOGIN' order by time_id desc limit 1;"; + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $linkB); + if ($DB) {echo "$stmt\n";} + echo "$stmt\n"; + $li_conf_ct = mysql_num_rows($rslt); + $i=0; + while ($i < $li_conf_ct) + { + $row=mysql_fetch_row($rslt); + $logintime = $row[0]; + $i++; + } + + $time_logged_in = ($StarTtime - $logintime); + if ($time_logged_in > 1000000) {$time_logged_in=1;} + + $stmt = "INSERT INTO queue_log SET partition='P01',time_id='$StarTtime',call_id='NONE',queue='$campaign',agent='Agent/$user',verb='AGENTLOGOFF',data1='$user$agents',data2='$time_logged_in',serverid='$queuemetrics_log_id';"; + if ($DB) {echo "$stmt\n";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $linkB); + $affected_rows = mysql_affected_rows($linkB); + + mysql_close($linkB); + } + } + echo "$vul_insert|$vc_remove|$vla_delete|$wcs_delete|$agent_channel\n"; } } @@ -1423,7 +1799,14 @@ if ($ACTION == 'updateDISPO') if ($format=='debug') {echo "\n";} $rslt=mysql_query($stmt, $link); - if ( ($use_internal_dnc=='Y') and ($dispo_choice=='DNC') ) + if (eregi("(CLOSER|BLEND|INBND|_C$|_B$|_I$)",$campaign)) + { + $stmt = "UPDATE vicidial_closer_log set status='$dispo_choice' where lead_id='$lead_id' and user='$user' order by closecallid desc limit 1;"; + if ($DB) {echo "$stmt\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";} @@ -1450,20 +1833,91 @@ if ($ACTION == 'updateDISPO') 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');"; + $user_group=''; + $stmt="SELECT user_group FROM vicidial_users where user='$user' LIMIT 1;"; + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $ug_record_ct = mysql_num_rows($rslt); + if ($ug_record_ct > 0) + { + $row=mysql_fetch_row($rslt); + $user_group = trim("$row[0]"); + } + + $stmt="INSERT INTO vicidial_agent_log (user,server_ip,event_time,campaign_id,pause_epoch,pause_sec,wait_epoch,user_group) values('$user','$server_ip','$NOW_TIME','$campaign','$StarTtime','0','$StarTtime','$user_group');"; if ($DB) {echo "$stmt\n";} $rslt=mysql_query($stmt, $link); $affected_rows = mysql_affected_rows($link); - $agent_log_id = mysql_insert_id(); + $agent_log_id = mysql_insert_id($link); ### APPELBACK 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');"; + $stmt="INSERT INTO vicidial_callbacks (lead_id,list_id,campaign_id,status,entry_time,callback_time,user,recipient,comments,user_group) values('$lead_id','$list_id','$campaign','ACTIVE','$NOW_TIME','$CallBackDatETimE','$user','$recipient','$comments','$user_group');"; if ($DB) {echo "$stmt\n";} $rslt=mysql_query($stmt, $link); } + $stmt="SELECT auto_alt_dial_statuses from vicidial_campaigns where campaign_id='$campaign';"; + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + + if ( ($auto_dial_level > 0) and (ereg(" $dispo_choice ",$row[0])) ) + { + $stmt = "select count(*) from vicidial_hopper where lead_id='$lead_id' and status='HOLD';"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + + if ($row[0] > 0) + { + $stmt="UPDATE vicidial_hopper set status='READY' where lead_id='$lead_id' and status='HOLD' limit 1;"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + } + } + else + { + $stmt="DELETE from vicidial_hopper where lead_id='$lead_id' and status='HOLD';"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + } + + ############################################# + ##### DEBUT QUEUEMETRICS LOGGING LOOKUP ##### + $stmt = "SELECT enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_log_id FROM system_settings;"; + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $qm_conf_ct = mysql_num_rows($rslt); + $i=0; + while ($i < $qm_conf_ct) + { + $row=mysql_fetch_row($rslt); + $enable_queuemetrics_logging = $row[0]; + $queuemetrics_server_ip = $row[1]; + $queuemetrics_dbname = $row[2]; + $queuemetrics_login = $row[3]; + $queuemetrics_pass = $row[4]; + $queuemetrics_log_id = $row[5]; + $i++; + } + ##### END QUEUEMETRICS LOGGING LOOKUP ##### + ########################################### + if ($enable_queuemetrics_logging > 0) + { + $linkB=mysql_connect("$queuemetrics_server_ip", "$queuemetrics_login", "$queuemetrics_pass"); + mysql_select_db("$queuemetrics_dbname", $linkB); + + $stmt = "INSERT INTO queue_log SET partition='P01',time_id='$StarTtime',call_id='$MDnextCID',queue='$campaign',agent='Agent/$user',verb='CALLSTATUT',data1='$dispo_choice',serverid='$queuemetrics_log_id';"; + if ($DB) {echo "$stmt\n";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $linkB); + $affected_rows = mysql_affected_rows($linkB); + + mysql_close($linkB); + } + echo 'Lead ' . $lead_id . ' a été changé en ' . $dispo_choice . " Statut\nNext agent_log_id:\n" . $agent_log_id . "\n"; } @@ -1475,6 +1929,8 @@ if ($ACTION == 'updateLEAD') { $MT[0]=''; $row=''; $rowx=''; + $DO_NOT_UPDATE=0; + $DO_NOT_UPDATE_text=''; if ( (strlen($phone_number)<1) || (strlen($lead_id)<1) ) { echo "phone_number $phone_number or lead_id $lead_id est invalide\n"; @@ -1482,12 +1938,54 @@ if ($ACTION == 'updateLEAD') } 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";} + $stmt = "SELECT disable_alter_custdata FROM vicidial_campaigns where campaign_id='$campaign'"; + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $dac_conf_ct = mysql_num_rows($rslt); + $i=0; + while ($i < $dac_conf_ct) + { + $row=mysql_fetch_row($rslt); + $disable_alter_custdata = $row[0]; + $i++; + } + if (ereg('Y',$disable_alter_custdata)) + { + $DO_NOT_UPDATE=1; + $DO_NOT_UPDATE_text=' NOT'; + $stmt = "SELECT alter_custdata_override FROM vicidial_users where user='$user'"; + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $aco_conf_ct = mysql_num_rows($rslt); + $i=0; + while ($i < $aco_conf_ct) + { + $row=mysql_fetch_row($rslt); + $alter_custdata_override = $row[0]; + $i++; + } + if (ereg('ALLOW_ALTER',$alter_custdata_override)) + { + $DO_NOT_UPDATE=0; + $DO_NOT_UPDATE_text=''; + } + } + + if ($DO_NOT_UPDATE < 1) + { + $comments = eregi_replace("\r",'',$comments); + $comments = eregi_replace("\n",'!N',$comments); + $comments = eregi_replace("--AMP--",'&',$comments); + $comments = eregi_replace("--QUES--",'?',$comments); + $comments = eregi_replace("--POUND--",'#',$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';"; @@ -1495,7 +1993,7 @@ if ($ACTION == 'updateLEAD') $rslt=mysql_query($stmt, $link); } - echo "Lead $lead_id l'information a été mise à jour\n"; + echo "Lead $lead_id information has$DO_NOT_UPDATE_text been updated\n"; } @@ -1515,10 +2013,54 @@ if ( ($ACTION == 'VDADpause') || ($ACTION == 'VDADready') ) 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';"; + $stmt="UPDATE vicidial_live_agents set lead_id='',uniqueid=0,callerid='',channel='', random_id='$random',comments='' where user='$user' and server_ip='$server_ip';"; if ($format=='debug') {echo "\n";} $rslt=mysql_query($stmt, $link); + $stmt="UPDATE vicidial_live_agents set status='$stage' where user='$user' and server_ip='$server_ip';"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + $affected_rows = mysql_affected_rows($link); + if ($affected_rows > 0) + { + ############################################# + ##### DEBUT QUEUEMETRICS LOGGING LOOKUP ##### + $stmt = "SELECT enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_log_id FROM system_settings;"; + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $qm_conf_ct = mysql_num_rows($rslt); + $i=0; + while ($i < $qm_conf_ct) + { + $row=mysql_fetch_row($rslt); + $enable_queuemetrics_logging = $row[0]; + $queuemetrics_server_ip = $row[1]; + $queuemetrics_dbname = $row[2]; + $queuemetrics_login = $row[3]; + $queuemetrics_pass = $row[4]; + $queuemetrics_log_id = $row[5]; + $i++; + } + ##### END QUEUEMETRICS LOGGING LOOKUP ##### + ########################################### + if ($enable_queuemetrics_logging > 0) + { + if (ereg('READY',$stage)) {$QMstatus='UNPAUSEALL';} + if (ereg('PAUSE',$stage)) {$QMstatus='PAUSEALL';} + $linkB=mysql_connect("$queuemetrics_server_ip", "$queuemetrics_login", "$queuemetrics_pass"); + mysql_select_db("$queuemetrics_dbname", $linkB); + + $stmt = "INSERT INTO queue_log SET partition='P01',time_id='$StarTtime',call_id='NONE',queue='NONE',agent='Agent/$user',verb='$QMstatus',serverid='$queuemetrics_log_id';"; + if ($DB) {echo "$stmt\n";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $linkB); + $affected_rows = mysql_affected_rows($linkB); + + mysql_close($linkB); + } + } + if ($agent_log == 'NO') {$donothing=1;} else @@ -1587,6 +2129,71 @@ if ($ACTION == 'UpdatEFavoritEs') } +################################################################################ +### PauseCodeSubmit - Update vicidial_agent_log with pause code +################################################################################ +if ($ACTION == 'PauseCodeSubmit') +{ + $row=''; $rowx=''; + if ( (strlen($status)<1) || (strlen($agent_log_id)<1) ) + { + echo "agent_log_id $agent_log_id or pause_code $status est invalide\n"; + exit; + } + else + { + $stmt="UPDATE vicidial_agent_log set sub_status=\"$status\" where agent_log_id='$agent_log_id';"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + $affected_rows = mysql_affected_rows($link); + if ($affected_rows > 0) + { + ############################################# + ##### DEBUT QUEUEMETRICS LOGGING LOOKUP ##### + $stmt = "SELECT enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_log_id,allow_sipsak_messages FROM system_settings;"; + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $qm_conf_ct = mysql_num_rows($rslt); + $i=0; + while ($i < $qm_conf_ct) + { + $row=mysql_fetch_row($rslt); + $enable_queuemetrics_logging = $row[0]; + $queuemetrics_server_ip = $row[1]; + $queuemetrics_dbname = $row[2]; + $queuemetrics_login = $row[3]; + $queuemetrics_pass = $row[4]; + $queuemetrics_log_id = $row[5]; + $allow_sipsak_messages = $row[6]; + $i++; + } + ##### END QUEUEMETRICS LOGGING LOOKUP ##### + ########################################### + if ( ($enable_sipsak_messages > 0) and ($allow_sipsak_messages > 0) and (eregi("SIP",$protocol)) ) + { + $SIPSAK_prefix = 'BK-'; + passthru("/usr/local/bin/sipsak -M -O desktop -B \"$SIPSAK_prefix$status\" -r 5060 -s sip:$extension@$phone_ip > /dev/null"); + } + if ($enable_queuemetrics_logging > 0) + { + $linkB=mysql_connect("$queuemetrics_server_ip", "$queuemetrics_login", "$queuemetrics_pass"); + mysql_select_db("$queuemetrics_dbname", $linkB); + + $stmt = "INSERT INTO queue_log SET partition='P01',time_id='$StarTtime',call_id='NONE',queue='$campaign',agent='Agent/$user',verb='PAUSEREASON',serverid='$queuemetrics_log_id',data1='$status';"; + if ($DB) {echo "$stmt\n";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $linkB); + $affected_rows = mysql_affected_rows($linkB); + + mysql_close($linkB); + } + } + } +echo "Pause Code has been updated to $status for $agent_log_id\n"; +} + + ################################################################################ ### CalLBacKLisT - List the USERONLY callbacks for an agent ################################################################################ diff --git a/agc_2-X/trunk/LANG_www/agc_fr/vicidial.php b/agc_2-X/trunk/LANG_www/agc_fr/vicidial.php index 130c2051..1877a624 100644 --- a/agc_2-X/trunk/LANG_www/agc_fr/vicidial.php +++ b/agc_2-X/trunk/LANG_www/agc_fr/vicidial.php @@ -1,7 +1,7 @@ LICENSE: GPLv2 +# Copyright (C) 2007 Matt Florell 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 @@ -15,7 +15,7 @@ # - vdc_db_query.php: Updates information in the database # - manager_send.php: Sends manager actions to the DB for execution # -# CHANGES +# CHANGELOG # 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 @@ -132,8 +132,37 @@ # 61128-2229 - Added vicidial_live_agents and vicidial_auto_calls manual dial entries # 61130-1617 - Added lead_id to MonitorConf for recording_log # 61221-1212 - Changed width to 760 to better fit 800x600 screens, widened SCRIPT +# 70109-1128 - Fixed wrapup timer bug +# 70109-1635 - Added option for HotKeys automatically dialing next number in manual mode +# - Added option for alternate number dialing with hotkeys +# 70111-1600 - Added ability to use BLEND/INBND/*_C/*_B/*_I as closer campaigns +# 70118-1517 - Added vicidial_agent_log and vicidial_user_log logging of user_group +# 70201-1249 - Added FAST DIAL option for manually dialing, added UTF8 compatible code +# 70201-1703 - Fixed cursor bug for most text input fields +# 70202-1453 - Added first portions of Agent Pause Codes +# 70203-0108 - Finished Agent Pause Codes functionality +# 70203-0930 - Added dialed_number to webform output +# 70203-1010 - Added dialed_label to webform output +# 70206-1201 - Fixed allow_closers bug +# 70206-1332 - Added vicidial_recording_override users setting function +# 70212-1252 - Fixed small issue with CXFER +# 70213-1018 - Changed CXFER and AXFER to update customer information before transfer +# 70214-1233 - Added queuemetrics_log_id field for server_id in queue_log +# 70215-1240 - Added queuemetrics_log_id field for server_id in queue_log +# 70222-1617 - Changed queue_log PAUSE/UNPAUSE to PAUSEALL/UNPAUSEALL +# 70226-1252 - Added Mute/UnMute to agent screen +# 70309-1035 - Allow amphersands and questions marks in comments to pass through +# 70313-1052 - Allow pound signs(hash) in comments to pass through +# 70316-1406 - Moved the MUTE button to be accessible during a transfer/conf +# 70319-1446 - Added agent-deactive-display and disable customer info update functions +# 70319-1626 - Added option to allow agent logins to campaigns with no leads in the hopper +# 70320-1501 - Added option to allow retry of leave-3way-call from dispo screen +# 70322-1545 - Added sipsak display ability # +$version = '2.0.129'; +$build = '70322-1545'; + require("dbconnect.php"); if (isset($_GET["DB"])) {$DB=$_GET["DB"];} @@ -172,14 +201,11 @@ if (isset($_GET["relogin"])) {$relogin=$_GET["relogin"];} $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); + $VD_campaign=ereg_replace("[^0-9a-zA-Z_]","",$VD_campaign); $forever_stop=0; -$version = '2.0.105'; -$build = '61221-1212'; - if ($force_logout) { echo "Vous êtes maintenant déconnecté.\n"; @@ -226,6 +252,7 @@ $TEST_all_statuses = '0'; # TEST variable allows all statuses in dispo screen $US='_'; $CL=':'; $AT='@'; +$DS='-'; $date = date("r"); $ip = getenv("REMOTE_ADDR"); $browser = getenv("HTTP_USER_AGENT"); @@ -252,6 +279,7 @@ $camp_form_code = " 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $phone_login=$row[0]; @@ -438,6 +467,7 @@ $VDloginDISPLAY=0; { $stmt="SELECT count(*) from vicidial_users where user='$VD_login' and pass='$VD_pass' and user_level > 0;"; if ($DB) {echo "|$stmt|\n";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $auth=$row[0]; @@ -447,7 +477,8 @@ $VDloginDISPLAY=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,user_group from vicidial_users where user='$VD_login' and pass='$VD_pass'"; + $stmt="SELECT full_name,user_level,hotkeys_active,agent_choose_ingroups,scheduled_callbacks,agentonly_callbacks,agentcall_manual,vicidial_recording,vicidial_transfers,closer_default_blended,user_group,vicidial_recording_override from vicidial_users where user='$VD_login' and pass='$VD_pass'"; + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $LOGfullname=$row[0]; @@ -461,6 +492,8 @@ $VDloginDISPLAY=0; $VU_vicidial_transfers=$row[8]; $VU_closer_default_blended=$row[9]; $VU_user_group=$row[10]; + $VU_vicidial_recording_override=$row[11]; + if ($WeBRooTWritablE > 0) { fwrite ($fp, "vdweb|GOOD|$date|$VD_login|$VD_pass|$ip|$browser|$LOGfullname|\n"); @@ -471,6 +504,7 @@ $VDloginDISPLAY=0; {$user_abb = eregi_replace("^.","",$user_abb); $forever_stop++;} $stmt="SELECT allowed_campaigns from vicidial_user_groups where user_group='$VU_user_group';"; + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $LOGallowed_campaigns =$row[0]; @@ -501,6 +535,7 @@ echo " 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $CAMPactive=$row[0]; @@ -512,6 +547,7 @@ echo " 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $VD_statuses_ct = mysql_num_rows($rslt); @@ -528,6 +564,7 @@ echo " 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $VD_statuses_camp = mysql_num_rows($rslt); @@ -548,6 +585,7 @@ echo " 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $HK_statuses_camp = mysql_num_rows($rslt); @@ -577,43 +615,46 @@ echo " 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $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]; - $allcalls_delay=$row[30]; - $omit_phone_code=$row[31]; + $park_ext = $row[0]; + $park_file_name = $row[1]; + $web_form_address = $row[2]; + $allow_closers = $row[3]; + $auto_dial_level = $row[4]; + $dial_timeout = $row[5]; + $dial_prefix = $row[6]; + $campaign_cid = $row[7]; + $campaign_vdad_exten = $row[8]; + $campaign_rec_exten = $row[9]; + $campaign_recording = $row[10]; + $campaign_rec_filename = $row[11]; + $campaign_script = $row[12]; + $get_call_launch = $row[13]; + $campaign_am_message_exten = $row[14]; + $xferconf_a_dtmf = $row[15]; + $xferconf_a_number = $row[16]; + $xferconf_b_dtmf = $row[17]; + $xferconf_b_number = $row[18]; + $alt_number_dialing = $row[19]; + $VC_scheduled_callbacks = $row[20]; + $wrapup_secondes = $row[21]; + $wrapup_message = $row[22]; + $closer_campaigns = $row[23]; + $use_internal_dnc = $row[24]; + $allcalls_delay = $row[25]; + $omit_phone_code = $row[26]; + $agent_pause_codes_active = $row[27]; + $no_hopper_leads_logins = $row[28]; + if ( (!ereg('DISABLED',$VU_vicidial_recording_override)) and ($VU_vicidial_recording > 0) ) + { + $campaign_recording = $VU_vicidial_recording_override; + print "\n"; + } if ( ($VC_scheduled_callbacks=='Y') and ($VU_scheduled_callbacks=='1') ) {$scheduled_callbacks='1';} if ($VU_vicidial_recording=='0') @@ -626,12 +667,37 @@ echo " 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $VD_pause_codes = mysql_num_rows($rslt); + $j=0; + while ($j < $VD_pause_codes) + { + $row=mysql_fetch_row($rslt); + $pause_codes[$i] =$row[0]; + $pause_code_names[$i] =$row[1]; + $VARpause_codes = "$VARpause_codes'$pause_codes[$i]',"; + $VARpause_code_names = "$VARpause_code_names'$pause_code_names[$i]',"; + $i++; + $j++; + } + $VD_pause_codes_ct = ($VD_pause_codes_ct+$VD_pause_codes); + $VARpause_codes = substr("$VARpause_codes", 0, -1); + $VARpause_code_names = substr("$VARpause_code_names", 0, -1); + } + ##### grab the inbound groups to choose from if campaign contains CLOSER $VARingroups="''"; - if (eregi("CLOSER", $VD_campaign)) + if (eregi("(CLOSER|BLEND|INBND|_C$|_B$|_I$)", $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;"; + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $closer_ct = mysql_num_rows($rslt); @@ -648,6 +714,7 @@ echo " 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $row=mysql_fetch_row($rslt); @@ -708,6 +775,7 @@ echo " 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $authphone=$row[0]; @@ -746,6 +814,7 @@ else echo "VICICOMPOSER Client Web\n"; $stmt="SELECT * from phones where login='$phone_login' and pass='$phone_pass' and active = 'Y';"; if ($DB) {echo "|$stmt|\n";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $extension=$row[0]; @@ -808,6 +877,7 @@ else $DBX_user=$row[57]; $DBX_pass=$row[58]; $DBX_port=$row[59]; + $enable_sipsak_messages=$row[66]; if ($clientDST) { @@ -822,6 +892,7 @@ else $stmt="SELECT asterisk_version from servers where server_ip='$server_ip';"; if ($DB) {echo "|$stmt|\n";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $asterisk_version=$row[0]; @@ -875,21 +946,25 @@ else $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";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $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";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); - if ( (eregi("CLOSER", $VD_campaign)) || ($campaign_leads_to_call > 0) ) + if ( (eregi("(CLOSER|BLEND|INBND|_C$|_B$|_I$)", $VD_campaign)) || ($campaign_leads_to_call > 0) || (ereg('Y',$no_hopper_leads_logins)) ) { ### 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')"; + $stmt = "INSERT INTO vicidial_user_log (user,event,campaign_id,event_date,event_epoch,user_group) values('$VD_login','LOGIN','$VD_campaign','$NOW_TIME','$StarTtimE','$VU_user_group')"; if ($DB) {echo "|$stmt|\n";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $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;"; + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $prev_login_ct = mysql_num_rows($rslt); @@ -906,6 +981,7 @@ 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;"; + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $free_conf_ct = mysql_num_rows($rslt); @@ -917,6 +993,7 @@ else $i++; } $stmt="UPDATE vicidial_conferences set extension='$SIP_user' where server_ip='$server_ip' and conf_exten='$session_id';"; + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); print "\n"; @@ -924,18 +1001,21 @@ else $stmt="UPDATE vicidial_list set status='N', user='' where status IN('QUEUE','INCALL') and user ='$VD_login';"; if ($DB) {echo "$stmt\n";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $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";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $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";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); $affected_rows = mysql_affected_rows($link); print "\n"; @@ -943,11 +1023,45 @@ else # print "You have logged in as user: $VD_login sur phone: $SIP_user Campagne:: $VD_campaign
\n"; $VICIDiaL_is_logged_in=1; - ### use manager middleware-app to connect the phone to the user + ### set the callerID for manager middleware-app to connect the phone to the user $SIqueryCID = "S$CIDdate$session_id"; + + ############################################# + ##### DEBUT SYSTEM_SETTINGS LOOKUP ##### + $stmt = "SELECT enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_log_id,vicidial_agent_disable,allow_sipsak_messages FROM system_settings;"; + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $qm_conf_ct = mysql_num_rows($rslt); + $i=0; + while ($i < $qm_conf_ct) + { + $row=mysql_fetch_row($rslt); + $enable_queuemetrics_logging = $row[0]; + $queuemetrics_server_ip = $row[1]; + $queuemetrics_dbname = $row[2]; + $queuemetrics_login = $row[3]; + $queuemetrics_pass = $row[4]; + $queuemetrics_log_id = $row[5]; + $vicidial_agent_disable = $row[6]; + $allow_sipsak_messages = $row[7]; + $i++; + } + ##### END QUEUEMETRICS LOGGING LOOKUP ##### + ########################################### + + if ( ($enable_sipsak_messages > 0) and ($allow_sipsak_messages > 0) and (eregi("SIP",$protocol)) ) + { + $SIPSAK_prefix = 'LIN-'; + print "\n"; + passthru("/usr/local/bin/sipsak -M -O desktop -B \"$SIPSAK_prefix$VD_campaign\" -r 5060 -s sip:$extension@$phone_ip > /dev/null"); + $SIqueryCID = "$SIPSAK_prefix$VD_campaign$DS$CIDdate"; + } + ### 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";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); $affected_rows = mysql_affected_rows($link); print "\n"; @@ -959,13 +1073,38 @@ else $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";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); $affected_rows = mysql_affected_rows($link); print "\n"; - if (eregi("CLOSER", $VD_campaign)) + if ($enable_queuemetrics_logging > 0) { - print "\n"; + $linkB=mysql_connect("$queuemetrics_server_ip", "$queuemetrics_login", "$queuemetrics_pass"); + mysql_select_db("$queuemetrics_dbname", $linkB); + + $stmt = "INSERT INTO queue_log SET partition='P01',time_id='$StarTtimE',call_id='NONE',queue='$VD_campaign',agent='Agent/$VD_login',verb='AGENTLOGIN',data1='$VD_login@agents',serverid='$queuemetrics_log_id';"; + if ($DB) {echo "$stmt\n";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $linkB); + $affected_rows = mysql_affected_rows($linkB); + print "\n"; + + $stmt = "INSERT INTO queue_log SET partition='P01',time_id='$StarTtimE',call_id='NONE',queue='NONE',agent='Agent/$VD_login',verb='PAUSEALL',serverid='$queuemetrics_log_id';"; + if ($DB) {echo "$stmt\n";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $linkB); + $affected_rows = mysql_affected_rows($linkB); + print "\n"; + + mysql_close($linkB); + mysql_select_db("$VARDB_database", $link); + } + + + if (eregi("(CLOSER|BLEND|INBND|_C$|_B$|_I$)", $VD_campaign)) + { + print "\n"; } } else @@ -974,9 +1113,33 @@ else $stmt="INSERT INTO vicidial_live_agents (user,server_ip,conf_exten,extension,status,lead_id,campaign_id,uniqueid,callerid,channel,random_id,last_call_time,last_update_time,last_call_finish,user_level) values('$VD_login','$server_ip','$session_id','$SIP_user','PAUSED','','$VD_campaign','','','','$random','$NOW_TIME','$tsNOW_TIME','$NOW_TIME','$user_level');"; if ($DB) {echo "$stmt\n";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); $affected_rows = mysql_affected_rows($link); print "\n"; + + if ($enable_queuemetrics_logging > 0) + { + $linkB=mysql_connect("$queuemetrics_server_ip", "$queuemetrics_login", "$queuemetrics_pass"); + mysql_select_db("$queuemetrics_dbname", $linkB); + + $stmt = "INSERT INTO queue_log SET partition='P01',time_id='$StarTtimE',call_id='NONE',queue='$VD_campaign',agent='Agent/$VD_login',verb='AGENTLOGIN',data1='$VD_login@agents',serverid='$queuemetrics_log_id';"; + if ($DB) {echo "$stmt\n";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $linkB); + $affected_rows = mysql_affected_rows($linkB); + print "\n"; + + $stmt = "INSERT INTO queue_log SET partition='P01',time_id='$StarTtimE',call_id='NONE',queue='NONE',agent='Agent/$VD_login',verb='PAUSEALL',serverid='$queuemetrics_log_id';"; + if ($DB) {echo "$stmt\n";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $linkB); + $affected_rows = mysql_affected_rows($linkB); + print "\n"; + + mysql_close($linkB); + mysql_select_db("$VARDB_database", $link); + } } } else @@ -1027,11 +1190,12 @@ echo "
0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); $affected_rows = mysql_affected_rows($link); - $agent_log_id = mysql_insert_id(); + $agent_log_id = mysql_insert_id($link); print "\n"; $S='*'; @@ -1048,6 +1212,7 @@ echo " 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $MM_scripts = mysql_num_rows($rslt); @@ -1225,6 +1390,10 @@ $CCAL_OUT .= "
"; var CallBackCommenTs = ''; var scheduled_callbacks = ''; var dispo_check_all_pause = ''; + var agent_pause_codes_active = ''; + VARpause_codes = new Array(); + VARpause_code_names = new Array(); + var VD_pause_codes_ct = ''; VARstatuses = new Array(); VARstatusnames = new Array(); var VD_statuses_ct = ''; @@ -1277,6 +1446,7 @@ $CCAL_OUT .= "
"; var dialplan_number = ''; var ext_context = ''; var protocol = ''; + var agentchannel = ''; var local_gmt =''; var server_ip = ''; var server_ip_dialstring = ''; @@ -1292,6 +1462,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} var CalLCID = ''; var MDnextCID = ''; var XDnextCID = ''; + var LasTCID = ''; var lead_dial_number = ''; var MD_channel_look = 0; var XD_channel_look = 0; @@ -1324,11 +1495,6 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} var CalL_AutO_LauncH = ''; var panel_bgcolor = '#E0C2D6'; var CusTCB_bgcolor = '#FFFF66'; - var status_A = ''; - var status_B = ''; - var status_C = ''; - var status_D = ''; - var status_E = ''; var auto_dial_level = ''; var starting_dial_level = ''; var dial_timeout = ''; @@ -1428,11 +1594,24 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} var no_delete_sessions = ''; var webform_session = ''; var local_consult_xfers = ''; + var vicidial_agent_disable = ''; var CBentry_time = ''; var CBcallback_time = ''; var CBuser = ''; var CBcomments = ''; var volumecontrol_active = ''; + var PauseCode_HTML = ''; + var manual_auto_hotkey = 0; + var dialed_number = ''; + var dialed_label = ''; + var DispO3waychannel = ''; + var DispO3wayXtrAchannel = ''; + var DispO3wayCalLserverip = ''; + var DispO3wayCalLxfernumber = ''; + var DispO3wayCalLcamptail = ''; + var phone_ip = ''; + var enable_sipsak_messages = ''; + var allow_sipsak_messages = ''; var DiaLControl_auto_HTML = "\"Pause\"\"Résumé\""; var DiaLControl_auto_HTML_ready = "\"Pause\"\"Résumé\""; var DiaLControl_auto_HTML_OFF = "\"Pause\"\"Résumé\""; @@ -1536,8 +1715,12 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} // ################################################################################ // Send volume control command for meetme participant - function volume_control(taskdirection,taskvolchannel) + function volume_control(taskdirection,taskvolchannel,taskagentmute) { + if (taskagentmute=='AgenT') + { + taskvolchannel = agentchannel; + } var xmlhttp=false; /*@cc_on @*/ /*@if (@_jscript_version >= 5) @@ -1576,6 +1759,18 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} } delete xmlhttp; } + if (taskagentmute=='AgenT') + { + if (taskdirection=='MUTING') + { + document.getElementById("AgentMuteSpan").innerHTML = ""; + } + else + { + document.getElementById("AgentMuteSpan").innerHTML = ""; + } + } + } @@ -1590,9 +1785,9 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} // ################################################################################ // place 3way and customer into other conference and fake-hangup the lines - function leave_3way_call() + function leave_3way_call(tempvarattempt) { - mainxfer_send_redirect('3WAY'); + mainxfer_send_redirect('3WAY','','',tempvarattempt); document.vicidial_form.callchannel.value = ''; document.vicidial_form.callserverip.value = ''; @@ -1653,6 +1848,35 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} // Send Originate command to manager to place a phone call function basic_originate_call(tasknum,taskprefix,taskreverse,taskdialvalue,tasknowait,taskconfxfer) { + var regCXFvars = new RegExp("CXFER","g"); + var tasknum_string = tasknum.toString(); + if (tasknum_string.match(regCXFvars)) + { + var Ctasknum = tasknum_string.replace(regCXFvars, ''); + if (Ctasknum.length < 2) + {Ctasknum = '990009';} + var closerxfercamptail = '_L' + document.vicidial_form.xfercode.value; + tasknum = Ctasknum + "*CL_" + campaign + '' + closerxfercamptail + '*CXFER*' + document.vicidial_form.lead_id.value + '**' + document.vicidial_form.phone_number.value + '*' + user + '*'; + + CustomerData_update(); + + } + var regAXFvars = new RegExp("AXFER","g"); + if (tasknum_string.match(regAXFvars)) + { + var Ctasknum = tasknum_string.replace(regAXFvars, ''); + if (Ctasknum.length < 2) + {Ctasknum = '83009';} + var closerxfercamptail = '_L' + document.vicidial_form.xfercode.value; + if (closerxfercamptail.length < 3) + {closerxfercamptail = 'IVR';} + tasknum = Ctasknum + '*' + document.vicidial_form.phone_number.value + '*' + document.vicidial_form.lead_id.value + '*' + campaign + '*' + closerxfercamptail + '*' + user + '*'; + + CustomerData_update(); + + } + + var xmlhttp=false; /*@cc_on @*/ /*@if (@_jscript_version >= 5) @@ -1674,27 +1898,6 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} } if (xmlhttp) { - var regCXFvars = new RegExp("CXFER","g"); - var tasknum_string = tasknum.toString(); - if (tasknum_string.match(regCXFvars)) - { - var Ctasknum = tasknum_string.replace(regCXFvars, ''); - if (Ctasknum.length < 2) - {Ctasknum = '990009';} - var closerxfercamptail = '_L' + document.vicidial_form.xfercode.value; - tasknum = Ctasknum + "*CL_" + campaign + '' + closerxfercamptail + '**' + document.vicidial_form.lead_id.value + '**' + document.vicidial_form.phone_number.value + '*' + user + '*'; - } - var regAXFvars = new RegExp("AXFER","g"); - if (tasknum_string.match(regAXFvars)) - { - var Ctasknum = tasknum_string.replace(regAXFvars, ''); - if (Ctasknum.length < 2) - {Ctasknum = '83009';} - var closerxfercamptail = '_L' + document.vicidial_form.xfercode.value; - if (closerxfercamptail.length < 3) - {closerxfercamptail = 'IVR';} - tasknum = Ctasknum + '*' + document.vicidial_form.phone_number.value + '*' + document.vicidial_form.lead_id.value + '*' + campaign + '*' + closerxfercamptail + '*' + user + '*'; - } if (taskprefix == 'NO') {var orig_prefix = '';} else {var orig_prefix = agc_dial_prefix;} if (taskreverse == 'YES') @@ -1858,7 +2061,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} UnixTime = parseInt(UnixTime); UnixTimeMS = (UnixTime * 1000); t.setTime(UnixTimeMS); - if (agentcallsstatus == '1') + if ( (agentcallsstatus == '1') || (vicidial_agent_disable != 'NOT_ACTIVE') ) { var Astatus_array = check_time_array[2].split("Statut: "); var AGStatuS = Astatus_array[1]; @@ -1872,6 +2075,14 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} { document.getElementById("AgentStatutCalls").innerHTML = CamPCalLs; } + if ( (AGStatuS == 'DEAD_VLA') && ( (vicidial_agent_disable == 'LIVE_AGENT') || (vicidial_agent_disable == 'ALL') ) ) + { + showDiv('AgenTDisablEBoX'); + } + if ( (AGStatuS == 'DEAD_EXTERNAL') && ( (vicidial_agent_disable == 'EXTERNAL') || (vicidial_agent_disable == 'ALL') ) ) + { + showDiv('AgenTDisablEBoX'); + } } var check_conf_array=check_ALL_array[1].split("|"); var live_conf_calls = check_conf_array[0]; @@ -1903,14 +2114,13 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} {var row_color = '#CCCCFF';} var conv_ct = (loop_ct + conv_start); var channelfieldA = conf_chan_array[conv_ct]; - // live_conf_HTML = live_conf_HTML + "
" + loop_ct + "" + channelfieldA + "HangupTRANSFERT
" + loop_ct + "" + channelfieldA + "RACCROCHER
" + loop_ct + "" + channelfieldA + "RACCROCHER    
" + loop_ct + "" + channelfieldA + "RACCROCHER          
PAUSE CODE
"; + var loop_ct = 0; + while (loop_ct < VD_pause_codes_ct) + { + PauseCode_HTML = PauseCode_HTML + "" + VARpause_codes[loop_ct] + " - " + VARpause_code_names[loop_ct] + "

"; + loop_ct++; + if (loop_ct == VD_pause_codes_ct_half) + {PauseCode_HTML = PauseCode_HTML + "
";} + } + PauseCode_HTML = PauseCode_HTML + "


Retour"; + document.getElementById("PauseCodeSelectContent").innerHTML = PauseCode_HTML; + } + } // ################################################################################ // open web form, then submit disposition @@ -4114,7 +4527,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} } if (xmlhttp) { - DSupdate_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=updateDISPO&format=text&user=" + user + "&pass=" + pass + "&dispo_choice=" + DispoChoice + "&lead_id=" + document.vicidial_form.lead_id.value + "&campaign=" + campaign + "&auto_dial_level=" + auto_dial_level + "&agent_log_id=" + agent_log_id + "&CallBackDatETimE=" + CallBackDatETimE + "&list_id=" + document.vicidial_form.list_id.value + "&recipient=" + CallBackrecipient + "&use_internal_dnc=" + use_internal_dnc + "&comments=" + CallBackCommenTs; + DSupdate_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=updateDISPO&format=text&user=" + user + "&pass=" + pass + "&dispo_choice=" + DispoChoice + "&lead_id=" + document.vicidial_form.lead_id.value + "&campaign=" + campaign + "&auto_dial_level=" + auto_dial_level + "&agent_log_id=" + agent_log_id + "&CallBackDatETimE=" + CallBackDatETimE + "&list_id=" + document.vicidial_form.list_id.value + "&recipient=" + CallBackrecipient + "&use_internal_dnc=" + use_internal_dnc + "&MDnextCID=" + LasTCID + "&comments=" + CallBackCommenTs; xmlhttp.open('POST', 'vdc_db_query.php'); xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8'); xmlhttp.send(DSupdate_query); @@ -4124,8 +4537,8 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} { var check_dispo = null; check_dispo = xmlhttp.responseText; - // alert(xmlhttp.responseText); var check_DS_array=check_dispo.split("\n"); + // alert(xmlhttp.responseText + "\n|" + check_DS_array[1] + "\n|" + check_DS_array[2] + "|"); if (check_DS_array[1] == 'Next agent_log_id:') { agent_log_id = check_DS_array[2]; @@ -4203,12 +4616,67 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} AutoDial_ReSume_PauSe("VDADready","NO"); // document.getElementById("DiaLControl").innerHTML = DiaLControl_auto_HTML_ready; } + else + { + // trigger HotKeys manual dial automatically go to next lead + if (manual_auto_hotkey == '1') + { + manual_auto_hotkey = 0; + ManualDialNext('','','','',''); + } + } } } } } } + +// ################################################################################ +// Submit the Pause Code + function PauseCodeSelect_submit(newpausecode) + { + hideDiv('PauseCodeSelectBox'); + WaitingForNextStep=0; + + var xmlhttp=false; + /*@cc_on @*/ + /*@if (@_jscript_version >= 5) + // JScript gives us Conditional compilation, we can cope with old IE versions. + // and security blocked creation of the objects. + try { + xmlhttp = new ActiveXObject("Msxml2.XMLHTTP"); + } catch (e) { + try { + xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); + } catch (E) { + xmlhttp = false; + } + } + @end @*/ + if (!xmlhttp && typeof XMLHttpRequest!='undefined') + { + xmlhttp = new XMLHttpRequest(); + } + if (xmlhttp) + { + VMCpausecode_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=PauseCodeSubmit&format=text&status=" + newpausecode + "&agent_log_id=" + agent_log_id + "&campaign=" + campaign + "&extension=" + extension + "&protocol=" + protocol + "&phone_ip=" + phone_ip + "&enable_sipsak_messages=" + enable_sipsak_messages; + xmlhttp.open('POST', 'vdc_db_query.php'); + xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8'); + xmlhttp.send(VMCpausecode_query); + xmlhttp.onreadystatechange = function() + { + if (xmlhttp.readyState == 4 && xmlhttp.status == 200) + { + // alert(xmlhttp.responseText); + } + } + delete xmlhttp; + } + } + + + // ################################################################################ // Populate the dtmf and xfer number for each preset link in xfer-conf frame function DtMf_PreSet_a() @@ -4302,7 +4770,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} } if (xmlhttp) { - VMCoriginate_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=Originate&format=text&channel=" + originatevalue + "&queryCID=" + queryCID + "&exten=" + session_id + "&ext_context=" + ext_context + "&ext_priority=1"; + VMCoriginate_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=OriginateVDRelogin&format=text&channel=" + originatevalue + "&queryCID=" + queryCID + "&exten=" + session_id + "&ext_context=" + ext_context + "&ext_priority=1" + "&extension=" + extension + "&protocol=" + protocol + "&phone_ip=" + phone_ip + "&enable_sipsak_messages=" + enable_sipsak_messages + "&allow_sipsak_messages=" + allow_sipsak_messages + "&campaign=" + campaign; xmlhttp.open('POST', 'manager_send.php'); xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8'); xmlhttp.send(VMCoriginate_query); @@ -4489,7 +4957,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} } if (xmlhttp) { - VDlogout_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=userLOGout&format=text&user=" + user + "&pass=" + pass + "&campaign=" + campaign + "&conf_exten=" + session_id + "&extension=" + extension + "&protocol=" + protocol + "&no_delete_sessions=" + no_delete_sessions; + VDlogout_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=userLOGout&format=text&user=" + user + "&pass=" + pass + "&campaign=" + campaign + "&conf_exten=" + session_id + "&extension=" + extension + "&protocol=" + protocol + "&agent_log_id=" + agent_log_id + "&no_delete_sessions=" + no_delete_sessions + "&phone_ip=" + phone_ip + "&enable_sipsak_messages=" + enable_sipsak_messages; xmlhttp.open('POST', 'vdc_db_query.php'); xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8'); xmlhttp.send(VDlogout_query); @@ -4536,14 +5004,24 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} document.vicidial_form.inert_button.focus(); document.vicidial_form.inert_button.blur(); CustomerData_update(); - HKdispo_display = 4; - HKfinish=1; var HKdispo_ary = HKdispo.split(" ----- "); - document.getElementById("HotKeyDispo").innerHTML = HKdispo_ary[0] + " - " + HKdispo_ary[1]; - showDiv('HotKeyActionBox'); - hideDiv('HotKeyEntriesBox'); - document.vicidial_form.DispoSelection.value = HKdispo_ary[0]; - dialedcall_send_hangup('NO'); + if ( (HKdispo_ary[0] == 'ALTPH2') || (HKdispo_ary[0] == 'ADDR3') ) + { + if (document.vicidial_form.DiaLAltPhonE.checked==true) + { + dialedcall_send_hangup('NO', 'YES', HKdispo_ary[0]); + } + } + else + { + HKdispo_display = 4; + HKfinish=1; + document.getElementById("HotKeyDispo").innerHTML = HKdispo_ary[0] + " - " + HKdispo_ary[1]; + showDiv('HotKeyActionBox'); + hideDiv('HotKeyEntriesBox'); + document.vicidial_form.DispoSelection.value = HKdispo_ary[0]; + dialedcall_send_hangup('NO', 'YES', HKdispo_ary[0]); + } // DispoSelect_submit(); // AutoDialWaiting = 1; // AutoDial_ReSume_PauSe("VDADready"); @@ -4899,11 +5377,11 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} hideDiv('CBcommentsBox'); hideDiv('HotKeyActionBox'); hideDiv('HotKeyEntriesBox'); - hideDiv('MainXfeRBox'); hideDiv('MainPanel'); hideDiv('ScriptPanel'); hideDiv('DispoSelectBox'); hideDiv('LogouTBox'); + hideDiv('AgenTDisablEBoX'); hideDiv('CustomerGoneBox'); hideDiv('NoneInSessionBox'); hideDiv('WrapupBox'); @@ -4915,6 +5393,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} hideDiv('DispoButtonHideC'); hideDiv('CallBacKsLisTBox'); hideDiv('NeWManuaLDiaLBox'); + hideDiv('PauseCodeSelectBox'); if (agentonly_callbacks != '1') {hideDiv('CallbacksButtons');} // if ( (agentcall_manual != '1') && (starting_dial_level > 0) ) @@ -4930,6 +5409,15 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} {hideDiv('VolumeControlSpan');} document.vicidial_form.LeadLookuP.checked=true; + if (agent_pause_codes_active=='Y') + { + document.getElementById("PauseCodeLinkSpan").innerHTML = "ÉCRIVEZ Un CODE De PAUSE"; + } + if (VICIDiaL_allow_closers < 1) + { + document.getElementById("InternalCloser").style.visibility = 'hidden'; + document.getElementById("LocalCloser").style.visibility = 'hidden'; + } document.getElementById("sessionIDspan").innerHTML = session_id; if ( (campaign_recording == 'NEVER') || (campaign_recording == 'ALLFORCE') ) { @@ -4962,6 +5450,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} if (wrapup_secondes > 0) { showDiv('WrapupBox'); + document.getElementById("WrapupTimer").innerHTML = wrapup_secondes; wrapup_waiting=1; } CustomerData_update(); @@ -4994,39 +5483,6 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} if ( (custchannellive < -30) && (lastcustchannel.length > 3) ) {CustomerChanneLGone();} if ( (custchannellive < -10) && (lastcustchannel.length > 3) ) {ReChecKCustoMerChaN();} if ( (nochannelinsession > 16) && (check_n > 15) ) {NoneInSession();} - if (wrapup_secondes > 0) - { - document.getElementById("WrapupTimer").innerHTML = (wrapup_secondes - wrapup_counter); - wrapup_counter++; - if ( (wrapup_counter > wrapup_secondes) && (document.getElementById("WrapupBox").style.visibility == 'visible') ) - { - wrapup_waiting=0; - hideDiv('WrapupBox'); - if (document.vicidial_form.DispoSelectStop.checked==true) - { - if (auto_dial_level != '0') - { - AutoDialWaiting = 0; - AutoDial_ReSume_PauSe("VDADpause","NO"); - // document.getElementById("DiaLControl").innerHTML = DiaLControl_auto_HTML; - } - VICIDiaL_pause_calling = 1; - if (dispo_check_all_pause != '1') - { - document.vicidial_form.DispoSelectStop.checked=false; - } - } - else - { - if (auto_dial_level != '0') - { - AutoDialWaiting = 1; - AutoDial_ReSume_PauSe("VDADready","NO"); - // document.getElementById("DiaLControl").innerHTML = DiaLControl_auto_HTML_ready; - } - } - } - } if (WaitingForNextStep==0) { // check for live channels in conference room and get current datetime @@ -5108,6 +5564,39 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} // parked_calls_display_refresh(); } } + if (wrapup_secondes > 0) + { + document.getElementById("WrapupTimer").innerHTML = (wrapup_secondes - wrapup_counter); + wrapup_counter++; + if ( (wrapup_counter > wrapup_secondes) && (document.getElementById("WrapupBox").style.visibility == 'visible') ) + { + wrapup_waiting=0; + hideDiv('WrapupBox'); + if (document.vicidial_form.DispoSelectStop.checked==true) + { + if (auto_dial_level != '0') + { + AutoDialWaiting = 0; + AutoDial_ReSume_PauSe("VDADpause","NO"); + // document.getElementById("DiaLControl").innerHTML = DiaLControl_auto_HTML; + } + VICIDiaL_pause_calling = 1; + if (dispo_check_all_pause != '1') + { + document.vicidial_form.DispoSelectStop.checked=false; + } + } + else + { + if (auto_dial_level != '0') + { + AutoDialWaiting = 1; + AutoDial_ReSume_PauSe("VDADready","NO"); + // document.getElementById("DiaLControl").innerHTML = DiaLControl_auto_HTML_ready; + } + } + } + } } } setTimeout("all_refresh()", refresh_interval); @@ -5165,6 +5654,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} if (Cmon == 9) {Cmon = "OCT";} if (Cmon == 10) {Cmon = "NOV";} if (Cmon == 11) {Cmon = "DEC";} + if (Chours == 12) {AMPM = 'PM';} if (Chours > 12) {Chours = (Chours - 12); AMPM = 'PM';} if (Cmin < 10) {Cmin = "0" + Cmin;} if (Csec < 10) {Csec = "0" + Csec;} @@ -5300,25 +5790,6 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} } } - - function showMainXfeR(divvar,taskxferchan,taskxferchanmain) - { - document.getElementById("MainXfeRBox").style.visibility = 'visible'; - getactiveext("MainXfeRBox"); - conference_list_display_refresh("MainXfeRconfContent"); - var XfeR_channel = taskxferchan; - document.vicidial_form.H_XfeR_channel.value = XfeR_channel; - document.vicidial_form.M_XfeR_channel.value = taskxferchanmain; - document.getElementById("MainXfeRChanneL").innerHTML = XfeR_channel; - } - function hideMainXfeR(divvar) - { - document.getElementById("MainXfeRBox").style.visibility = 'hidden'; - var XfeR_channel = ''; - document.vicidial_form.H_XfeR_channel.value = ''; - document.vicidial_form.M_XfeR_channel.value = ''; - document.getElementById("MainXfeRChanneL").innerHTML = ''; - } function conf_channels_detail(divvar) { if (divvar == 'SHOW') @@ -5360,6 +5831,10 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} { if (showxfervar == 'ON') { + var xfer_height = 310; + if (alt_phone_dialing>0) {xfer_height = (xfer_height + 20);} + if ( (auto_dial_level == 0) && (manual_dial_preview == 1) ) {xfer_height = (xfer_height + 20);} + document.getElementById("TransferMain").style.top = xfer_height; HKbutton_allowed = 0; showDiv('TransferMain'); document.getElementById("XferControl").innerHTML = "\"Transfert"; @@ -5428,17 +5903,13 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} - - @@ -5490,15 +5961,23 @@ echo "\n";

VICICOMPOSER
- -APPEL MANUEL
+ +APPEL MANUEL       CADRAN RAPIDE
- + X RAPPELS EN COURS
- + +
+
+ + +
+
+ +
RAPPELS PERSONNELS :
Selectionnez un rappel a éffectuer immédiatement. Une fois éffectué, ce rappel diparaitra de la liste.
@@ -5509,7 +5988,7 @@ echo "\n";
- + - + @@ -5533,7 +6014,8 @@ echo "\n"; - +
NOUVEL APPEL MANUEL VERS :

Nouveau prospect: remplissez le formulaire ci dessous.
\n";
  (La valeur de ce champ est habituellement 1 aux Etats-Unis et au Canada)
Téléphone Number:   (12 digits max - digits only) +   (12 digits max - digits only) +
Rechercher dans les fiches client existantes:   (Si cette option est activée, le numéro de téléphone sera recherché dans la base avant d'être inséré)

Si vous désirez composer un numéro sans insérer de nouvelle fiche client, entrez le N° a appeler dans le champ Surnumerotation. Pour raccrocher cet appel, vous devrez ouvrir la page Appels en Cours et raccrocher manuellement le canal correspondant.
 
Surnumérotation:   (Ce champ n'accepte que des chiffres)  (Ce champ n'accepte que des chiffres) +

Appel Manuel @@ -5557,6 +6039,7 @@ Votre Statut:
Calls Dialing:
+
Transfert - Conférence
CLOSER INTERNE @@ -5582,11 +6065,12 @@ Votre Statut:
Calls Dialing: Transfert immédiat Blind Transfer VMail Message
+
- +
Fiche Prospect Statuée en:

-
@@ -5594,7 +6078,7 @@ Votre Statut:
Calls Dialing: + @@ -5610,7 +6094,7 @@ Votre Statut:
Calls Dialing: +
Raccourcis clavier des Statut: Si actif, utilisez le raccourci clavier pour statuer et raccrocher un appel:
@@ -5627,7 +6111,7 @@ Votre Statut:
Calls Dialing: +
Information De Rappels:
Votre session est vide:
Retour

@@ -5635,7 +6119,7 @@ Votre Statut:
Calls Dialing: + @@ -5823,6 +6302,7 @@ IDENTIFICAZIONE Registrazione: +
Le client a raccroché:
Retour

@@ -5644,7 +6128,7 @@ Votre Statut:
Calls Dialing: + "; if (volumecontrol_active!=1) { live_conf_HTML = live_conf_HTML + ""; } else { - live_conf_HTML = live_conf_HTML + ""; + live_conf_HTML = live_conf_HTML + ""; } // var debugspan = document.getElementById("debugbottomspan").innerHTML; @@ -1926,6 +2136,29 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} {custchannellive++;} } + if (volumecontrol_active > 0) + { + if (protocol != 'EXTERNAL') + { + var regAGNTchan = new RegExp(protocol + '/' + extension,"g"); + if ( (channelfieldA.match(regAGNTchan)) && (agentchannel != channelfieldA) ) + { + agentchannel = channelfieldA; + + document.getElementById("AgentMuteSpan").innerHTML = ""; + } + } + else + { + if (agentchannel.length < 3) + { + agentchannel = channelfieldA; + + document.getElementById("AgentMuteSpan").innerHTML = ""; + } + } + } + // document.getElementById("debugbottomspan").innerHTML = debugspan + '
' + channelfieldA + '|' + lastcustchannel + '|' + custchannellive + '|' + LMAcontent_change + '|' + LMAalter; if (!LMAe[ARY_ct]) @@ -1952,7 +2185,11 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} if (LMAcontent_change > 0) { if (conf_channels_xtra_display == 1) - {document.getElementById("outboundcallsspan").innerHTML = live_conf_HTML;} + { + // document.getElementById("MainPanel").style.overflow = 'visible'; + document.getElementById("outboundcallsspan").innerHTML = live_conf_HTML; + // document.getElementById("MainPanel").style.overflow = 'auto'; + } } nochannelinsession=0; } @@ -2086,7 +2323,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} // ################################################################################ // Send Redirect command for live call to Manager sends phone name where call is going to // Covers the following types: XFER, VMAIL, ENTRY, CONF, PARK, FROMPARK, XfeRLOCAL, XfeRINTERNAL, XfeRBLIND, VfeRVMAIL - function mainxfer_send_redirect(taskvar,taskxferconf,taskserverip) + function mainxfer_send_redirect(taskvar,taskxferconf,taskserverip,taskdebugnote) { var xmlhttp=false; /*@cc_on @*/ @@ -2201,6 +2438,8 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} } if (taskvar == '3WAY') { + xferredirect_query=''; + var queryCID = "VXvdcW" + epoch_sec + user_abb; var redirectdestination = "NEXTAVAILABLE"; var redirectXTRAvalue = XDchannel; @@ -2211,7 +2450,18 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} {var redirecttype = 'RedirectXtraCX';} else {var redirecttype = 'RedirectXtra';} - xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=" + redirecttype + "&format=text&channel=" + redirectvalue + "&call_server_ip=" + redirectserverip + "&queryCID=" + queryCID + "&exten=" + redirectdestination + "&ext_context=" + ext_context + "&ext_priority=1&extrachannel=" + redirectXTRAvalue + "&lead_id=" + document.vicidial_form.lead_id.value + "&phone_code=" + document.vicidial_form.phone_code.value + "&phone_number=" + document.vicidial_form.phone_number.value + "&campaign=CL_" + campaign + '' + closerxfercamptail; + DispO3waychannel = redirectvalue; + DispO3wayXtrAchannel = redirectXTRAvalue; + DispO3wayCalLserverip = redirectserverip; + DispO3wayCalLxfernumber = document.vicidial_form.xfernumber.value; + DispO3wayCalLcamptail = document.vicidial_form.xfercode.value; + + xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=" + redirecttype + "&format=text&channel=" + redirectvalue + "&call_server_ip=" + redirectserverip + "&queryCID=" + queryCID + "&exten=" + redirectdestination + "&ext_context=" + ext_context + "&ext_priority=1&extrachannel=" + redirectXTRAvalue + "&lead_id=" + document.vicidial_form.lead_id.value + "&phone_code=" + document.vicidial_form.phone_code.value + "&phone_number=" + document.vicidial_form.phone_number.value+ "&filename=" + taskdebugnote + "&campaign=CL_" + campaign + '' + closerxfercamptail; + + if (taskdebugnote == 'FIRST') + { + document.getElementById("DispoSelectHAspan").innerHTML = "Leave 3Way Call Again"; + } } if (taskvar == 'ParK') { @@ -2257,7 +2507,6 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} Nactiveext = null; Nactiveext = xmlhttp.responseText; // alert(xmlhttp.responseText); - hideMainXfeR(); } } delete xmlhttp; @@ -2326,7 +2575,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} "&list_id=" + document.vicidial_form.list_id.value + "&length_in_sec=0&phone_code=" + document.vicidial_form.phone_code.value + "&phone_number=" + lead_dial_number + - "&exten=" + extension + "&channel=" + lastcustchannel + "&start_epoch=" + MDlogEPOCH + "&auto_dial_level=" + auto_dial_level + "&VDstop_rec_after_each_call=" + VDstop_rec_after_each_call + "&conf_silent_prefix=" + conf_silent_prefix + "&protocol=" + protocol + "&extension=" + extension + "&ext_context=" + ext_context + "&conf_exten=" + session_id + "&user_abb=" + user_abb + "&agent_log_id=" + agent_log_id; + "&exten=" + extension + "&channel=" + lastcustchannel + "&start_epoch=" + MDlogEPOCH + "&auto_dial_level=" + auto_dial_level + "&VDstop_rec_after_each_call=" + VDstop_rec_after_each_call + "&conf_silent_prefix=" + conf_silent_prefix + "&protocol=" + protocol + "&extension=" + extension + "&ext_context=" + ext_context + "&conf_exten=" + session_id + "&user_abb=" + user_abb + "&agent_log_id=" + agent_log_id + "&MDnextCID=" + LasTCID + "&DB=0"; xmlhttp.open('POST', 'vdc_db_query.php'); xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8'); // document.getElementById("busycallsdebug").innerHTML = "vdc_db_query.php?" + manDiaLlog_query; @@ -2538,7 +2787,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} // ################################################################################ // Open page to enter details for a new manual dial lead - function NeWManuaLDiaLCalL() + function NeWManuaLDiaLCalL(TVfast) { if ( (AutoDialWaiting == 1) || (VD_live_customer_call==1) || (alt_dial_active==1) ) { @@ -2546,7 +2795,14 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} } else { - showDiv('NeWManuaLDiaLBox'); + if (TVfast=='FAST') + { + NeWManuaLDiaLCalLSubmiTfast(); + } + else + { + showDiv('NeWManuaLDiaLBox'); + } } } @@ -2584,6 +2840,34 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} document.vicidial_form.MDDiaLOverridE.value = ''; } +// ################################################################################ +// Fast version of manual dial + function NeWManuaLDiaLCalLSubmiTfast() + { + var MDDiaLCodEform = document.vicidial_form.phone_code.value; + var MDPhonENumbeRform = document.vicidial_form.phone_number.value; + + if ( (MDDiaLCodEform.length < 1) || (MDPhonENumbeRform.length < 5) ) + { + alert("DOVETE IMPOSTARE Un NUMERO DI TELEFONO E Un CODICE Della MANOPOLA PERUTILIZZARE La MANOPOLA VELOCE"); + } + else + { + var MDLookuPLeaD = 'new'; + if (document.vicidial_form.LeadLookuP.checked==true) + {MDLookuPLeaD = 'lookup';} + + alt_phone_dialing=1; + auto_dial_level=0; + manual_dial_in_progress=1; + MainPanelToFront(); + buildDiv('DiaLLeaDPrevieW'); + buildDiv('DiaLDiaLAltPhonE'); + document.vicidial_form.LeadPreview.checked=false; + document.vicidial_form.DiaLAltPhonE.checked=true; + ManualDialNext("","",MDDiaLCodEform,MDPhonENumbeRform,MDLookuPLeaD); + } + } // ################################################################################ // Request lookup of manual dial channel @@ -2662,7 +2946,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} document.getElementById("MainStatuSSpan").innerHTML = " Chiamata l`altro chiamante: " + document.vicidial_form.xfernumber.value + " UID: " + CIDcheck; - document.getElementById("Leave3WayCall").innerHTML ="\"LASCIA"; + document.getElementById("Leave3WayCall").innerHTML ="\"LASCIA"; document.getElementById("DialWithCustomer").innerHTML ="\"Chiama"; @@ -2715,8 +2999,8 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} document.getElementById("DialBlindVMail").innerHTML = "\"Blind"; - document.getElementById("VolumeUpSpan").innerHTML = ""; - document.getElementById("VolumeDownSpan").innerHTML = ""; + document.getElementById("VolumeUpSpan").innerHTML = ""; + document.getElementById("VolumeDownSpan").innerHTML = ""; // INSERT VICICHIAMA_LOG ENTRY FOR THIS CHIAMATA PROCESS @@ -2805,6 +3089,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} else { fronter = user; + LasTCID = MDnextResponse_array[0]; document.vicidial_form.lead_id.value = MDnextResponse_array[1]; LeaDPreVDispO = MDnextResponse_array[2]; document.vicidial_form.vendor_lead_code.value = MDnextResponse_array[4]; @@ -2839,9 +3124,12 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} CBcallback_time = MDnextResponse_array[29]; CBuser = MDnextResponse_array[30]; CBcomments = MDnextResponse_array[31]; - + dialed_number = MDnextResponse_array[32]; + dialed_label = MDnextResponse_array[33]; + lead_dial_number = document.vicidial_form.phone_number.value; document.getElementById("MainStatuSSpan").innerHTML = " In Chiamata: " + document.vicidial_form.phone_number.value + " UID: " + MDnextCID + "   " + man_status; + if ( (dialed_label.length < 3) || (dialed_label=='NONE') ) {dialed_label='MAIN';} web_form_vars = "lead_id=" + document.vicidial_form.lead_id.value + @@ -2887,6 +3175,8 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} "&phone=" + document.vicidial_form.phone_number.value + "&parked_by=" + document.vicidial_form.lead_id.value + "&dispo=" + LeaDDispO + '' + + "&dialed_number=" + dialed_number + '' + + "&dialed_label=" + dialed_label + '' + webform_session; // $VICICHIAMA_web_QUERY_STRING =~ s/ /+/gi; @@ -3071,6 +3361,9 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} { var manDiaLonly_num = document.vicidial_form.alt_phone.value; lead_dial_number = document.vicidial_form.alt_phone.value; + dialed_number = lead_dial_number; + dialed_label = 'ALT'; + WebFormRefresH(''); } else { @@ -3078,11 +3371,17 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} { var manDiaLonly_num = document.vicidial_form.address3.value; lead_dial_number = document.vicidial_form.address3.value; - } + dialed_number = lead_dial_number; + dialed_label = 'ADDR3'; + WebFormRefresH(''); + } else { var manDiaLonly_num = document.vicidial_form.phone_number.value; lead_dial_number = document.vicidial_form.phone_number.value; + dialed_number = lead_dial_number; + dialed_label = 'MAIN'; + WebFormRefresH(''); } } var xmlhttp=false; @@ -3213,7 +3512,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} } if (xmlhttp) { - autoDiaLready_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=" + taskaction + "&user=" + user + "&pass=" + pass + "&stage=" + VDRP_stage + "&agent_log_id=" + agent_log_id + "&agent_log=" + taskagentlog; + autoDiaLready_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=" + taskaction + "&user=" + user + "&pass=" + pass + "&stage=" + VDRP_stage + "&agent_log_id=" + agent_log_id + "&agent_log=" + taskagentlog + "&campaign=" + campaign; xmlhttp.open('POST', 'vdc_db_query.php'); xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8'); xmlhttp.send(autoDiaLready_query); @@ -3379,6 +3678,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} custchannellive=1; + LasTCID = check_VDIC_array[4]; LeaDPreVDispO = check_VDIC_array[6]; fronter = check_VDIC_array[7]; document.vicidial_form.vendor_lead_code.value = check_VDIC_array[8]; @@ -3411,6 +3711,8 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} CBcallback_time = check_VDIC_array[33]; CBuser = check_VDIC_array[34]; CBcomments = check_VDIC_array[35]; + dialed_number = check_VDIC_array[36]; + dialed_label = check_VDIC_array[37]; lead_dial_number = document.vicidial_form.phone_number.value; document.getElementById("MainStatuSSpan").innerHTML = " In entrata: " + document.vicidial_form.phone_number.value + " UID: " + CIDcheck + "   " + VDIC_fronter; @@ -3451,8 +3753,8 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} if (lastcustserverip == server_ip) { - document.getElementById("VolumeUpSpan").innerHTML = ""; - document.getElementById("VolumeDownSpan").innerHTML = ""; + document.getElementById("VolumeUpSpan").innerHTML = ""; + document.getElementById("VolumeDownSpan").innerHTML = ""; } document.getElementById("DiaLControl").innerHTML = DiaLControl_auto_HTML_OFF; @@ -3461,6 +3763,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} {var group = VDCL_group_id;} else {var group = campaign;} + if ( (dialed_label.length < 3) || (dialed_label=='NONE') ) {dialed_label='MAIN';} web_form_vars = "lead_id=" + document.vicidial_form.lead_id.value + @@ -3507,6 +3810,8 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} "&phone=" + document.vicidial_form.phone_number.value + "&parked_by=" + document.vicidial_form.lead_id.value + "&dispo=" + LeaDDispO + '' + + "&dialed_number=" + dialed_number + '' + + "&dialed_label=" + dialed_label + '' + webform_session; var regWFspace = new RegExp(" ","ig"); @@ -3568,6 +3873,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} {var group = VDCL_group_id;} else {var group = campaign;} + if ( (dialed_label.length < 3) || (dialed_label=='NONE') ) {dialed_label='MAIN';} web_form_vars = "lead_id=" + document.vicidial_form.lead_id.value + @@ -3614,6 +3920,8 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} "&phone=" + document.vicidial_form.phone_number.value + "&parked_by=" + document.vicidial_form.lead_id.value + "&dispo=" + LeaDDispO + '' + + "&dialed_number=" + dialed_number + '' + + "&dialed_label=" + dialed_label + '' + webform_session; var regWFspace = new RegExp(" ","ig"); @@ -3658,6 +3966,28 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} } +// ################################################################################ +// Send leave 3way call a second time from the dispo screen + function DispoLeavE3wayAgaiN() + { + XDchannel = DispO3wayXtrAchannel; + document.vicidial_form.xfernumber.value = DispO3wayCalLxfernumber; + document.vicidial_form.xfercode.value = DispO3wayCalLcamptail; + MDchannel = DispO3waychannel; + lastcustserverip = DispO3wayCalLserverip; + + document.getElementById("DispoSelectHAspan").innerHTML = ""; + + leave_3way_call('SECOND'); + + DispO3waychannel = ''; + DispO3wayXtrAchannel = ''; + DispO3wayCalLserverip = ''; + DispO3wayCalLxfernumber = ''; + DispO3wayCalLcamptail = ''; + } + + // ################################################################################ // Start Hangup Functions for both function bothcall_send_hangup() @@ -3670,7 +4000,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} // ################################################################################ // Send Hangup command for customer call connected to the conference now to Manager - function dialedcall_send_hangup(dispowindow) + function dialedcall_send_hangup(dispowindow,hotkeysused,altdispo) { var form_cust_channel = document.vicidial_form.callchannel.value; var form_cust_serverip = document.vicidial_form.callserverip.value; @@ -3808,10 +4138,36 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} if (document.vicidial_form.DiaLAltPhonE.checked==true) { reselect_alt_dial = 1; + if (altdispo == 'ALTPH2') + { + ManualDialOnly('ALTTelefonoE'); + } + else + { + if (altdispo == 'ADDR3') + { + ManualDialOnly('AddresS3'); + } + else + { + if (hotkeysused == 'YES') + { + reselect_alt_dial = 0; + manual_auto_hotkey = 1; + } + } + } } else { - document.getElementById("DiaLControl").innerHTML = "\"Chiama"; + if (hotkeysused == 'YES') + { + manual_auto_hotkey = 1; + } + else + { + document.getElementById("DiaLControl").innerHTML = "\"Chiama"; + } reselect_alt_dial = 0; } } @@ -3820,6 +4176,27 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} if (document.vicidial_form.DiaLAltPhonE.checked==true) { reselect_alt_dial = 1; + if (altdispo == 'ALTPH2') + { + ManualDialOnly('ALTTelefonoE'); + } + else + { + if (altdispo == 'ADDR3') + { + ManualDialOnly('AddresS3'); + } + else + { + if (hotkeysused == 'YES') + { + document.getElementById("MainStatuSSpan").style.background = panel_bgcolor; + document.getElementById("MainStatuSSpan").innerHTML = ''; + document.getElementById("DiaLControl").innerHTML = DiaLControl_auto_HTML_OFF; + reselect_alt_dial = 0; + } + } + } } else { @@ -3965,6 +4342,14 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} // Update vicidial_list lead record with all altered values from form function CustomerData_update() { + + var REGcommentsAMP = new RegExp('&',"g"); + var REGcommentsQUES = new RegExp("\\?","g"); + var REGcommentsPOUND = new RegExp("\\#","g"); + var REGcommentsRESULT = document.vicidial_form.comments.value.replace(REGcommentsAMP, "--AMP--"); + REGcommentsRESULT = REGcommentsRESULT.replace(REGcommentsQUES, "--QUES--"); + REGcommentsRESULT = REGcommentsRESULT.replace(REGcommentsPOUND, "--POUND--"); + var xmlhttp=false; /*@cc_on @*/ /*@if (@_jscript_version >= 5) @@ -3986,7 +4371,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} } if (xmlhttp) { - VLupdate_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=updateLEAD&format=text&user=" + user + "&pass=" + pass + + VLupdate_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&campaign=" + campaign + "&ACTION=updateLEAD&format=text&user=" + user + "&pass=" + pass + "&lead_id=" + document.vicidial_form.lead_id.value + "&vendor_lead_code=" + document.vicidial_form.vendor_lead_code.value + "&phone_number=" + document.vicidial_form.phone_number.value + @@ -4007,7 +4392,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} "&alt_phone=" + document.vicidial_form.alt_phone.value + "&email=" + document.vicidial_form.email.value + "&security_phrase=" + document.vicidial_form.security_phrase.value + - "&comments=" + document.vicidial_form.comments.value; + "&comments=" + REGcommentsRESULT; xmlhttp.open('POST', 'vdc_db_query.php'); xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8'); xmlhttp.send(VLupdate_query); @@ -4053,6 +4438,34 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} document.getElementById("DispoSelectContent").innerHTML = dispo_HTML; } +// ################################################################################ +// Generate the Pausa Code Chooser panel + function PauseCodeSelectContent_create() + { + if ( (AutoDialWaiting == 1) || (VD_live_customer_call==1) || (alt_dial_active==1) ) + { + alert("DOVETE ESSERE FATTI UNA PAUSA PER IMPOSTARE Un CODICE Di PAUSA NelMODO Di AUTO-CHIAMA"); + } + else + { + showDiv('PausaCodeSelectBox'); + WaitingForNextStep=1; + PausaCode_HTML = ''; + document.vicidial_form.PausaCodeSelection.value = ''; + var VD_pause_codes_ct_half = parseInt(VD_pause_codes_ct / 2); + PausaCode_HTML = "
Traitement Post Appel : secondes restant pour le traitement post appel



@@ -5653,23 +6137,28 @@ Votre Statut:
Calls Dialing: + +
Votre session a été neutralisée
DÉCONNEXION

Retour +
+
+ +

DÉCONNEXION
- +
- +
 
- +
Aucune modification ne peut être prise en compte, les modifications doivent être validées avant de raccrocher.
- +
STATUER L'APPEL :       Décrochement Encore       réduire
Selection du status de fin d'appel
@@ -5682,8 +6171,15 @@ Votre Statut:
Calls Dialing: +
CHOISISSEZ Un CODE De PAUSE :
+ Pause Code Selection + +

  +
+
- +
Choisissez une date de Rappel :
@@ -5726,7 +6222,7 @@ Votre Statut:
Calls Dialing: + @@ -5823,6 +6302,7 @@ IDENTIFIANT:
+
UN CHOIX DE GROUPE D'ARRIVÉE PLUS ÉTROIT
Un Choix De Groupe D'arrivée Plus étroit
@@ -5737,7 +6233,7 @@ Votre Statut:
Calls Dialing: + Canal Canal @@ -5747,25 +6243,8 @@ Votre Statut:
Calls Dialing: - - - - - -
TRANSFERT D'APPEL EN COURS
Canal à transférer: Canal
Extensions:
Extensions
-
- Renvoyer l'Appel

- Renvoyer vers la Boite Vocale

- Renvoyer vers ce Numéro:


- RAFRAICHIR


- Retour à la Fenêtre Principale

-
Conférences:
(Selectionnez un Numéro de Conférence)
Renvoyez également mon canal
Conférences
-
- - - +
VICICOMPOSER SCRIPT
@@ -5809,7 +6288,7 @@ IDENTIFIANT:

Raccrocher

-Envoyez DTMF
+
Envoyez DTMF

@@ -5851,14 +6331,18 @@ IDENTIFIANT:
+\n";} + {echo "\n";} else - {echo "\n";} + {echo "\n";} ?> - + +
secondes:   Canal:   Durée d'Appel:   Email:
Commentaires: +
+
diff --git a/agc_2-X/trunk/LANG_www/agc_it/conf_exten_check.php b/agc_2-X/trunk/LANG_www/agc_it/conf_exten_check.php index 6f900c6b..fbb2ec2a 100644 --- a/agc_2-X/trunk/LANG_www/agc_it/conf_exten_check.php +++ b/agc_2-X/trunk/LANG_www/agc_it/conf_exten_check.php @@ -33,6 +33,7 @@ # 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 # 61128-2255 - Added update for manual dial vicidial_live_agents +# 70319-1542 - Added agent disabled display function # require("dbconnect.php"); @@ -69,8 +70,8 @@ if (!isset($format)) {$format="text";} if (!isset($ACTION)) {$ACTION="refresh";} if (!isset($client)) {$client="agc";} -$version = '0.0.10'; -$build = '61128-2255'; +$version = '0.0.11'; +$build = '70319-1542'; $StarTtime = date("U"); $NOW_DATE = date("Y-m-d"); $NOW_TIME = date("Y-m-d H:i:s"); @@ -144,6 +145,23 @@ echo " if ($client == 'vdc') { + $Acount=0; + $AexternalDEAD=0; + + ### see if the agent has a record in the vicidial_live_agents table + $stmt="SELECT count(*) 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); + $Acount=$row[0]; + + # ### find out if external table shows agent should be disabled + # $stmt="SELECT count(*) from another_table where user='$user' and status='DEAD';"; + # if ($DB) {echo "|$stmt|\n";} + # $rslt=mysql_query($stmt, $link); + # $row=mysql_fetch_row($rslt); + # $AexternalDEAD=$row[0]; + if ($auto_dial_level > 0) { ### update the vicidial_live_agents every second with a new random number so it is shown to be alive @@ -186,6 +204,9 @@ echo " } + if ($Acount < 1) {$Astatus='DEAD_VLA';} + if ($AexternalDEAD > 0) {$Astatus='DEAD_EXTERNAL';} + echo 'DateTime: ' . $NOW_TIME . '|UnixTime: ' . $StarTtime . '|Status: ' . $Astatus . '|CampCalls: ' . $RingCalls . "|\n"; } diff --git a/agc_2-X/trunk/LANG_www/agc_it/manager_send.php b/agc_2-X/trunk/LANG_www/agc_it/manager_send.php index 7c50d25e..97dfd192 100644 --- a/agc_2-X/trunk/LANG_www/agc_it/manager_send.php +++ b/agc_2-X/trunk/LANG_www/agc_it/manager_send.php @@ -1,7 +1,7 @@ LICENSE: GPLv2 +# Copyright (C) 2007 Matt Florell 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 @@ -12,7 +12,7 @@ # - $user # - $pass # optional variables: -# - $ACTION - ('Originate','Redirect','Hangup','Command','Monitor','StopMonitor','SysCIDOriginate','RedirectName','RedirectNameVmail','MonitorConf','StopMonitorConf','RedirectXtra','RedirectXtraCX','RedirectVD','HangupConfDial','VolumeControl') +# - $ACTION - ('Originate','Redirect','Hangup','Command','Monitor','StopMonitor','SysCIDOriginate','RedirectName','RedirectNameVmail','MonitorConf','StopMonitorConf','RedirectXtra','RedirectXtraCX','RedirectVD','HangupConfDial','VolumeControl','OriginateVDRelogin') # - $queryCID - ('CN012345678901234567',...) # - $format - ('text','debug') # - $channel - ('Zap/41-1','SIP/test101-1jut','IAX2/iaxy@iaxy',...) @@ -35,7 +35,7 @@ # - $stage - ('UP','DOWN') # -# changes +# CHANGELOG: # 50401-1002 - First build of script, Hangup function only # 50404-1045 - Redirect basic function enabled # 50406-1522 - Monitor basic function enabled @@ -64,6 +64,10 @@ # 61004-1526 - Added parsing of volume control command and lookup or number # 61130-1617 - Added lead_id to MonitorConf for recording_log # 61201-1115 - Added user to MonitorConf for recording_log +# 70111-1600 - added ability to use BLEND/INBND/*_C/*_B/*_I as closer campaigns +# 70226-1251 - Added Mute/UnMute to conference volume control +# 70320-1502 - Added option to allow retry of leave-3way-call and debug logging +# 70322-1636 - Added sipsak display ability # require("dbconnect.php"); @@ -123,6 +127,16 @@ if (isset($_GET["phone_number"])) {$phone_number=$_GET["phone_number"];} elseif (isset($_POST["phone_number"])) {$phone_number=$_POST["phone_number"];} if (isset($_GET["stage"])) {$stage=$_GET["stage"];} elseif (isset($_POST["stage"])) {$stage=$_POST["stage"];} +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["phone_ip"])) {$phone_ip=$_GET["phone_ip"];} + elseif (isset($_POST["phone_ip"])) {$phone_ip=$_POST["phone_ip"];} +if (isset($_GET["enable_sipsak_messages"])) {$enable_sipsak_messages=$_GET["enable_sipsak_messages"];} + elseif (isset($_POST["enable_sipsak_messages"])) {$enable_sipsak_messages=$_POST["enable_sipsak_messages"];} +if (isset($_GET["allow_sipsak_messages"])) {$allow_sipsak_messages=$_GET["allow_sipsak_messages"];} + elseif (isset($_POST["allow_sipsak_messages"])) {$allow_sipsak_messages=$_POST["allow_sipsak_messages"];} $user=ereg_replace("[^0-9a-zA-Z]","",$user); $pass=ereg_replace("[^0-9a-zA-Z]","",$pass); @@ -133,8 +147,8 @@ if (!isset($ACTION)) {$ACTION="Originate";} if (!isset($format)) {$format="alert";} if (!isset($ext_priority)) {$ext_priority="1";} -$version = '2.0.27'; -$build = '61130-1617'; +$version = '2.0.29'; +$build = '70320-1502'; $StarTtime = date("U"); $NOW_DATE = date("Y-m-d"); $NOW_TIME = date("Y-m-d H:i:s"); @@ -279,6 +293,21 @@ if ($ACTION=="OriginateNameVmail") } } +if ($ACTION=="OriginateVDRelogin") +{ + if ( ($enable_sipsak_messages > 0) and ($allow_sipsak_messages > 0) and (eregi("SIP",$protocol)) ) + { + $CIDdate = date("ymdHis"); + $DS='-'; + $SIPSAK_prefix = 'LIN-'; + print "\n"; + passthru("/usr/local/bin/sipsak -M -O desktop -B \"$SIPSAK_prefix$campaign\" -r 5060 -s sip:$extension@$phone_ip > /dev/null"); + $queryCID = "$SIPSAK_prefix$campaign$DS$CIDdate"; + + } + $ACTION="Originate"; +} + if ($ACTION=="Originate") { if ( (strlen($exten)<1) or (strlen($channel)<1) or (strlen($ext_context)<1) or (strlen($queryCID)<10) ) @@ -430,7 +459,7 @@ if ($ACTION=="RedirectVD") else { if (strlen($call_server_ip)>6) {$server_ip = $call_server_ip;} - if (eregi("CLOSER",$campaign)) + if (eregi("(CLOSER|BLEND|INBND|_C$|_B$|_I$)",$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";} @@ -560,6 +589,7 @@ if ($ACTION=="RedirectNameVmail") if ($ACTION=="RedirectXtraCX") { + $DBout=''; $row=''; $rowx=''; $channel_liveX=1; $channel_liveY=1; @@ -575,6 +605,15 @@ if ($ACTION=="RedirectXtraCX") echo "ext_context $ext_context deve essere regolato\n"; echo "ext_priority $ext_priority deve essere regolato\n"; echo "\nRedirect Action non trasmesso\n"; + if (ereg("SECOND|FIRST|DEBUG",$filename)) + { + if ($WeBRooTWritablE > 0) + { + $fp = fopen ("./vicidial_debug.txt", "a"); + fwrite ($fp, "$NOW_TIME|RDCXC|$filename|$user|$campaign|$$channel|$extrachannel|$queryCID|$exten|$ext_context|ext_priority|\n"); + fclose($fp); + } + } } else { @@ -594,6 +633,7 @@ if ($ACTION=="RedirectXtraCX") { $channel_liveX=0; echo "Canale $channel non è attivo su $call_server_ip, Redirect comando non inserito\n"; + if (ereg("SECOND|FIRST|DEBUG",$filename)) {$DBout .= "$channel non è attivo su $call_server_ip";} } } $stmt="SELECT count(*) FROM live_channels where server_ip = '$server_ip' and channel='$extrachannel';"; @@ -610,6 +650,7 @@ if ($ACTION=="RedirectXtraCX") { $channel_liveY=0; echo "Canale $channel non è attivo su $server_ip, Redirect comando non inserito\n"; + if (ereg("SECOND|FIRST|DEBUG",$filename)) {$DBout .= "$channel non è attivo su $server_ip";} } } if ( ($channel_liveX==1) && ($channel_liveY==1) ) @@ -622,6 +663,7 @@ if ($ACTION=="RedirectXtraCX") { $channel_liveY=0; echo "No Local agent to send call to, Redirect comando non inserito\n"; + if (ereg("SECOND|FIRST|DEBUG",$filename)) {$DBout .= "No Local agent to send call to";} } else { @@ -654,6 +696,7 @@ if ($ACTION=="RedirectXtraCX") $rslt=mysql_query($stmt, $link); echo "RedirectXtraCX comando inviato a Canale $channel su $call_server_ip and \nHungup $extrachannel su $server_ip\n"; + if (ereg("SECOND|FIRST|DEBUG",$filename)) {$DBout .= "$channel su $call_server_ip, Hungup $extrachannel su $server_ip";} } } else @@ -662,8 +705,19 @@ if ($ACTION=="RedirectXtraCX") {$ACTION="Redirect"; $server_ip = $call_server_ip;} if ($channel_liveY==1) {$ACTION="Redirect"; $channel=$extrachannel;} - + if (ereg("SECOND|FIRST|DEBUG",$filename)) {$DBout .= "Changed to Redirect: $channel su $server_ip";} } + + if (ereg("SECOND|FIRST|DEBUG",$filename)) + { + if ($WeBRooTWritablE > 0) + { + $fp = fopen ("./vicidial_debug.txt", "a"); + fwrite ($fp, "$NOW_TIME|RDCXC|$filename|$user|$campaign|$DBout|\n"); + fclose($fp); + } + } + } } @@ -688,6 +742,15 @@ if ($ACTION=="RedirectXtra") echo "ext_context $ext_context deve essere regolato\n"; echo "ext_priority $ext_priority deve essere regolato\n"; echo "\nRedirect Action non trasmesso\n"; + if (ereg("SECOND|FIRST|DEBUG",$filename)) + { + if ($WeBRooTWritablE > 0) + { + $fp = fopen ("./vicidial_debug.txt", "a"); + fwrite ($fp, "$NOW_TIME|RDX|$filename|$user|$campaign|$$channel|$extrachannel|$queryCID|$exten|$ext_context|ext_priority|\n"); + fclose($fp); + } + } } else { @@ -708,6 +771,7 @@ if ($ACTION=="RedirectXtra") { $channel_liveX=0; echo "Non puoi trovare conferenze vuote su $server_ip, Redirect comando non inserito\n"; + if (ereg("SECOND|FIRST|DEBUG",$filename)) {$DBout .= "Non puoi trovare conferenze vuote su $server_ip";} } } @@ -717,7 +781,7 @@ if ($ACTION=="RedirectXtra") if ($format=='debug') {echo "\n";} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); - if ($row[0]==0) + if ( ($row[0]==0) && (!ereg("SECOND",$filename)) ) { $stmt="SELECT count(*) FROM live_sip_channels where server_ip = '$call_server_ip' and channel='$channel';"; if ($format=='debug') {echo "\n";} @@ -727,13 +791,14 @@ if ($ACTION=="RedirectXtra") { $channel_liveX=0; echo "Canale $channel non è attivo su $call_server_ip, Redirect comando non inserito\n"; + if (ereg("SECOND|FIRST|DEBUG",$filename)) {$DBout .= "$channel non è attivo su $call_server_ip";} } } $stmt="SELECT count(*) FROM live_channels where server_ip = '$server_ip' and channel='$extrachannel';"; if ($format=='debug') {echo "\n";} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); - if ($row[0]==0) + if ( ($row[0]==0) && (!ereg("SECOND",$filename)) ) { $stmt="SELECT count(*) FROM live_sip_channels where server_ip = '$server_ip' and channel='$extrachannel';"; if ($format=='debug') {echo "\n";} @@ -743,6 +808,7 @@ if ($ACTION=="RedirectXtra") { $channel_liveY=0; echo "Canale $channel non è attivo su $server_ip, Redirect comando non inserito\n"; + if (ereg("SECOND|FIRST|DEBUG",$filename)) {$DBout .= "$channel non è attivo su $server_ip";} } } if ( ($channel_liveX==1) && ($channel_liveY==1) ) @@ -754,6 +820,7 @@ if ($ACTION=="RedirectXtra") $rslt=mysql_query($stmt, $link); echo "RedirectXtra comando inviato a Canale $channel and \nExtraCanale $extrachannel\n to $exten su $server_ip\n"; + if (ereg("SECOND|FIRST|DEBUG",$filename)) {$DBout .= "$channel and $extrachannel to $exten su $server_ip";} } else { @@ -778,6 +845,7 @@ if ($ACTION=="RedirectXtra") $rslt=mysql_query($stmt, $link); echo "RedirectXtra comando inviato a Canale $channel su $call_server_ip and \nExtraCanale $extrachannel\n to $exten su $server_ip\n"; + if (ereg("SECOND|FIRST|DEBUG",$filename)) {$DBout .= "$channel/$call_server_ip and $extrachannel/$server_ip to $exten";} } } else @@ -788,6 +856,17 @@ if ($ACTION=="RedirectXtra") {$ACTION="Redirect"; $channel=$extrachannel;} } + + if (ereg("SECOND|FIRST|DEBUG",$filename)) + { + if ($WeBRooTWritablE > 0) + { + $fp = fopen ("./vicidial_debug.txt", "a"); + fwrite ($fp, "$NOW_TIME|RDX|$filename|$user|$campaign|$DBout|\n"); + fclose($fp); + } + } + } } } @@ -1018,8 +1097,10 @@ if ($ACTION=="VolumeControl") else { $participant_number='XXYYXXYYXXYYXX'; + if (eregi('UP',$stage)) {$vol_prefix='4';} if (eregi('DOWN',$stage)) {$vol_prefix='3';} - else {$vol_prefix='4';} + if (eregi('UNMUTE',$stage)) {$vol_prefix='2';} + if (eregi('MUTING',$stage)) {$vol_prefix='1';} $local_DEF = 'Local/'; $local_AMP = '@'; $volume_local_channel = "$local_DEF$participant_number$vol_prefix$exten$local_AMP$ext_context"; diff --git a/agc_2-X/trunk/LANG_www/agc_it/vdc_db_query.php b/agc_2-X/trunk/LANG_www/agc_it/vdc_db_query.php index b477c12b..75ac5887 100644 --- a/agc_2-X/trunk/LANG_www/agc_it/vdc_db_query.php +++ b/agc_2-X/trunk/LANG_www/agc_it/vdc_db_query.php @@ -1,7 +1,7 @@ LICENSE: GPLv2 +# Copyright (C) 2007 Matt Florell 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 @@ -13,7 +13,7 @@ # - $pass # optional variables: # - $format - ('text','debug') -# - $ACTION - ('regCLOSER','manDiaLnextCALL','manDiaLskip','manDiaLonly','manDiaLlookCALL','manDiaLlogCALL','userLOGout','updateDISPO','VDADpause','VDADready','VDADcheckINCOMING','UpdatEFavoritEs','CalLBacKLisT','CalLBacKCounT') +# - $ACTION - ('regCLOSER','manDiaLnextCALL','manDiaLskip','manDiaLonly','manDiaLlookCALL','manDiaLlogCALL','userLOGout','updateDISPO','VDADpause','VDADready','VDADcheckINCOMING','UpdatEFavoritEs','CalLBacKLisT','CalLBacKCounT','PauseCodeSubmit') # - $stage - ('start','finish','lookup','new') # - $closer_choice - ('CL_TESTCAMP_L CL_OUT123_L -') # - $conf_exten - ('8600011',...) @@ -70,7 +70,7 @@ # - $omit_phone_code - ('Y','N') # - $no_delete_sessions - ('0','1') -# changes +# CHANGELOG: # 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 @@ -101,7 +101,7 @@ # - 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 +# 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 @@ -110,10 +110,28 @@ # 60821-1647 - Added ability to not delete sessions at logout # 60906-1124 - Added lookup and sending of callback data for CALLBK calls # 61128-2229 - Added vicidial_live_agents and vicidial_auto_calls manual dial entries +# 70111-1600 - Added ability to use BLEND/INBND/*_C/*_B/*_I as closer campaigns +# 70115-1733 - Added alt_dial functionality in auto-dial modes +# 70118-1501 - Added user_group to vicidial_log,_agent_log,_closer_log,_callbacks +# 70123-1357 - Fixed bug that would not update vicidial_closer_log status to dispo +# 70202-1438 - Added pause code submit function +# 70203-0930 - Added dialed_number to lead info output +# 70203-1030 - Added dialed_label to lead info output +# 70206-1126 - Added INBOUND status for inbound/closer calls in vicidial_live_agents +# 70212-1253 - Fixed small issue with CXFER +# 70213-1431 - Added QueueMetrics PAUSE/UNPAUSE/AGENTLOGIN/AGENTLOGOFF actions +# 70214-1231 - Added queuemetrics_log_id field for server_id in queue_log +# 70215-1210 - Added queuemetrics COMPLETEAGENT action +# 70216-1051 - Fixed double call complete queuemetrics logging +# 70222-1616 - Changed queue_log PAUSE/UNPAUSE to PAUSEALL/UNPAUSEALL +# 70309-1034 - Allow amphersands and questions marks in comments to pass through +# 70313-1052 - Allow pound signs(hash) in comments to pass through +# 70319-1544 - Added agent disable update customer data function +# 70322-1545 - Added sipsak display ability # -$version = '2.0.38'; -$build = '61128-2229'; +$version = '2.0.55'; +$build = '70322-1545'; require("dbconnect.php"); @@ -240,6 +258,10 @@ if (isset($_GET["use_internal_dnc"])) {$use_internal_dnc=$_GET["use_internal_d elseif (isset($_POST["use_internal_dnc"])) {$use_internal_dnc=$_POST["use_internal_dnc"];} if (isset($_GET["omit_phone_code"])) {$omit_phone_code=$_GET["omit_phone_code"];} elseif (isset($_POST["omit_phone_code"])) {$omit_phone_code=$_POST["omit_phone_code"];} +if (isset($_GET["phone_ip"])) {$phone_ip=$_GET["phone_ip"];} + elseif (isset($_POST["phone_ip"])) {$phone_ip=$_POST["phone_ip"];} +if (isset($_GET["enable_sipsak_messages"])) {$enable_sipsak_messages=$_GET["enable_sipsak_messages"];} + elseif (isset($_POST["enable_sipsak_messages"])) {$enable_sipsak_messages=$_POST["enable_sipsak_messages"];} $user=ereg_replace("[^0-9a-zA-Z]","",$user); @@ -261,6 +283,7 @@ $CIDdate = date("mdHis"); $ENTRYdate = date("YmdHis"); if (!isset($query_date)) {$query_date = $NOW_DATE;} $MT[0]=''; +$agents='@agents'; $stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;"; if ($DB) {echo "|$stmt|\n";} @@ -375,7 +398,7 @@ if ($ACTION == 'manDiaLnextCaLL') 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) ) + if ( (strlen($callback_id)>0) and (strlen($lead_id)>0) ) { $affected_rows=1; $CBleadIDset=1; @@ -421,7 +444,7 @@ if ($ACTION == 'manDiaLnextCaLL') if ($DB) {echo "$stmt\n";} $rslt=mysql_query($stmt, $link); $affected_rows = mysql_affected_rows($link); - $lead_id = mysql_insert_id(); + $lead_id = mysql_insert_id($link); $CBleadIDset=1; } } @@ -432,7 +455,7 @@ if ($ACTION == 'manDiaLnextCaLL') if ($DB) {echo "$stmt\n";} $rslt=mysql_query($stmt, $link); $affected_rows = mysql_affected_rows($link); - $lead_id = mysql_insert_id(); + $lead_id = mysql_insert_id($link); $CBleadIDset=1; } } @@ -535,7 +558,7 @@ if ($ACTION == 'manDiaLnextCaLL') $rslt=mysql_query($stmt, $link); } - $stmt="UPDATE vicidial_agent_log set lead_id='$lead_id' where agent_log_id='$agent_log_id';"; + $stmt="UPDATE vicidial_agent_log set lead_id='$lead_id',comments='MANUAL' where agent_log_id='$agent_log_id';"; if ($format=='debug') {echo "\n";} $rslt=mysql_query($stmt, $link); @@ -579,7 +602,7 @@ if ($ACTION == 'manDiaLnextCaLL') $rslt=mysql_query($stmt, $link); ### update the agent status to INCALL in vicidial_live_agents - $stmt = "UPDATE vicidial_live_agents set status='INCALL',last_call_time='$NOW_TIME',callerid='$MqueryCID',lead_id='$lead_id' where user='$user' and server_ip='$server_ip';"; + $stmt = "UPDATE vicidial_live_agents set status='INCALL',last_call_time='$NOW_TIME',callerid='$MqueryCID',lead_id='$lead_id',comments='MANUAL' where user='$user' and server_ip='$server_ip';"; if ($DB) {echo "$stmt\n";} $rslt=mysql_query($stmt, $link); } @@ -619,6 +642,8 @@ if ($ACTION == 'manDiaLnextCaLL') $LeaD_InfO .= $CBcallback_time . "\n"; $LeaD_InfO .= $CBuser . "\n"; $LeaD_InfO .= $CBcomments . "\n"; + $LeaD_InfO .= $phone_number . "\n"; + $LeaD_InfO .= "MAIN\n"; echo $LeaD_InfO; @@ -716,7 +741,7 @@ if ($ACTION == 'manDiaLonly') $rslt=mysql_query($stmt, $link); ### update the agent status to INCALL in vicidial_live_agents - $stmt = "UPDATE vicidial_live_agents set status='INCALL',last_call_time='$NOW_TIME',callerid='$MqueryCID',lead_id='$lead_id' where user='$user' and server_ip='$server_ip';"; + $stmt = "UPDATE vicidial_live_agents set status='INCALL',last_call_time='$NOW_TIME',callerid='$MqueryCID',lead_id='$lead_id',comments='MANUAL' where user='$user' and server_ip='$server_ip';"; if ($DB) {echo "$stmt\n";} $rslt=mysql_query($stmt, $link); @@ -795,8 +820,18 @@ if ($stage == "start") } else { + $user_group=''; + $stmt="SELECT user_group FROM vicidial_users where user='$user' LIMIT 1;"; + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $ug_record_ct = mysql_num_rows($rslt); + if ($ug_record_ct > 0) + { + $row=mysql_fetch_row($rslt); + $user_group = trim("$row[0]"); + } ##### 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');"; + $stmt="INSERT INTO vicidial_log (uniqueid,lead_id,list_id,campaign_id,call_date,start_epoch,status,phone_code,phone_number,user,comments,processed,user_group) values('$uniqueid','$lead_id','$list_id','$campaign','$NOW_TIME','$StarTtime','INCALL','$phone_code','$phone_number','$user','MANUAL','N','$user_group');"; if ($DB) {echo "$stmt\n";} $rslt=mysql_query($stmt, $link); $affected_rows = mysql_affected_rows($link); @@ -844,10 +879,10 @@ if ($stage == "end") { if ($start_epoch < 1000) { - if (eregi("CLOSER",$campaign)) + if (eregi("(CLOSER|BLEND|INBND|_C$|_B$|_I$)",$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';"; + $stmt="SELECT start_epoch FROM vicidial_closer_log where phone_number='$phone_number' and lead_id='$lead_id' and user='$user' order by closecallid desc limit 1;"; } else { @@ -870,32 +905,249 @@ if ($stage == "end") } else {$length_in_sec = ($StarTtime - $start_epoch);} - if (eregi("CLOSER",$campaign)) + if (eregi("(CLOSER|BLEND|INBND|_C$|_B$|_I$)",$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); } + + ############################################# + ##### INIZIO QUEUEMETRICS LOGGING LOOKUP ##### + $stmt = "SELECT enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_log_id FROM system_settings;"; + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $qm_conf_ct = mysql_num_rows($rslt); + $i=0; + while ($i < $qm_conf_ct) + { + $row=mysql_fetch_row($rslt); + $enable_queuemetrics_logging = $row[0]; + $queuemetrics_server_ip = $row[1]; + $queuemetrics_dbname = $row[2]; + $queuemetrics_login = $row[3]; + $queuemetrics_pass = $row[4]; + $queuemetrics_log_id = $row[5]; + $i++; + } + ##### END QUEUEMETRICS LOGGING LOOKUP ##### + ########################################### + if ($auto_dial_level > 0) { + ### check to see if campaign has alt_dial enabled + $stmt="SELECT auto_alt_dial FROM vicidial_campaigns where campaign_id='$campaign';"; + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $VAC_mancall_ct = mysql_num_rows($rslt); + if ($VAC_mancall_ct > 0) + { + $row=mysql_fetch_row($rslt); + $auto_alt_dial =$row[0]; + } + else {$auto_alt_dial = 'NONE';} + if (eregi("(ALT_ONLY|ADDR3_ONLY|ALT_AND_ADDR3)",$auto_alt_dial)) + { + ### check to see if lead should be alt_dialed + $stmt="SELECT alt_dial FROM vicidial_auto_calls where lead_id='$lead_id';"; + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $VAC_mancall_ct = mysql_num_rows($rslt); + if ($VAC_mancall_ct > 0) + { + $row=mysql_fetch_row($rslt); + $alt_dial =$row[0]; + } + else {$alt_dial = 'NONE';} + + if ( (eregi("(NONE|MAIN)",$alt_dial)) and (eregi("(ALT_ONLY|ALT_AND_ADDR3)",$auto_alt_dial)) ) + { + $stmt="SELECT alt_phone,gmt_offset_now,state FROM vicidial_list where lead_id='$lead_id';"; + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $VAC_mancall_ct = mysql_num_rows($rslt); + if ($VAC_mancall_ct > 0) + { + $row=mysql_fetch_row($rslt); + $alt_phone = $row[0]; + $alt_phone = eregi_replace("[^0-9]","",$alt_phone); + $gmt_offset_now = $row[1]; + $state = $row[2]; + } + else {$alt_phone = '';} + if (strlen($alt_phone)>5) + { + ### insert record into vicidial_hopper for address3 call attempt + $stmt = "INSERT INTO vicidial_hopper SET lead_id='$lead_id',campaign_id='$campaign',status='HOLD',list_id='$list_id',gmt_offset_now='$gmt_offset_now',state='$state',alt_dial='ALT',user='';"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + } + } + if ( ( (eregi("(ALT)",$alt_dial)) and (eregi("ALT_AND_ADDR3",$auto_alt_dial)) ) or ( (eregi("(NONE|MAIN)",$alt_dial)) and (eregi("ADDR3_ONLY",$auto_alt_dial)) ) ) + { + $stmt="SELECT address3,gmt_offset_now,state FROM vicidial_list where lead_id='$lead_id';"; + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $VAC_mancall_ct = mysql_num_rows($rslt); + if ($VAC_mancall_ct > 0) + { + $row=mysql_fetch_row($rslt); + $address3 = $row[0]; + $address3 = eregi_replace("[^0-9]","",$address3); + $gmt_offset_now = $row[1]; + $state = $row[2]; + } + else {$address3 = '';} + if (strlen($address3)>5) + { + ### insert record into vicidial_hopper for address3 call attempt + $stmt = "INSERT INTO vicidial_hopper SET lead_id='$lead_id',campaign_id='$campaign',status='HOLD',list_id='$list_id',gmt_offset_now='$gmt_offset_now',state='$state',alt_dial='ADDR3',user='';"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + } + } + } + + if ($enable_queuemetrics_logging > 0) + { + ### check to see if lead should be alt_dialed + $stmt="SELECT auto_call_id,lead_id,phone_number,status,campaign_id,phone_code,alt_dial,stage,callerid,uniqueid from vicidial_auto_calls where lead_id='$lead_id';"; + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $VAC_qm_ct = mysql_num_rows($rslt); + if ($VAC_qm_ct > 0) + { + $row=mysql_fetch_row($rslt); + $auto_call_id = $row[0]; + $CLlead_id = $row[1]; + $CLphone_number = $row[2]; + $CLstatus = $row[3]; + $CLcampaign_id = $row[4]; + $CLphone_code = $row[5]; + $CLalt_dial = $row[6]; + $CLstage = $row[7]; + $CLcallerid = $row[8]; + $CLuniqueid = $row[9]; + } + + $CLstage = preg_replace("/.*-/",'',$CLstage); + if (strlen($CLstage) < 1) {$CLstage=0;} + + $linkB=mysql_connect("$queuemetrics_server_ip", "$queuemetrics_login", "$queuemetrics_pass"); + mysql_select_db("$queuemetrics_dbname", $linkB); + + $stmt="SELECT count(*) from queue_log where call_id='$MDnextCID' and verb='COMPLETECALLER';"; + $rslt=mysql_query($stmt, $linkB); + if ($DB) {echo "$stmt\n";} + $VAC_cc_ct = mysql_num_rows($rslt); + if ($VAC_cc_ct > 0) + { + $row=mysql_fetch_row($rslt); + $caller_complete = $row[0]; + } + + if ($caller_complete < 1) + { + $stmt = "INSERT INTO queue_log SET partition='P01',time_id='$StarTtime',call_id='$MDnextCID',queue='$campaign',agent='Agent/$user',verb='COMPLETEAGENT',data1='$CLstage',data2='$length_in_sec',data3='1',serverid='$queuemetrics_log_id';"; + if ($DB) {echo "$stmt\n";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $linkB); + $affected_rows = mysql_affected_rows($linkB); + } + mysql_close($linkB); + } + ### delete call record from vicidial_auto_calls - $stmt = "DELETE from vicidial_auto_calls where uniqueid='$uniqueid';"; + $stmt = "DELETE from vicidial_auto_calls where lead_id='$lead_id';"; 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';"; + + $stmt = "UPDATE vicidial_live_agents set status='PAUSED',lead_id='',uniqueid=0,callerid='',channel='',call_server_ip='',last_call_finish='$NOW_TIME',comments='' where user='$user' and server_ip='$server_ip';"; if ($DB) {echo "$stmt\n";} $rslt=mysql_query($stmt, $link); + $affected_rows = mysql_affected_rows($link); + if ($affected_rows > 0) + { + if ($enable_queuemetrics_logging > 0) + { + $linkB=mysql_connect("$queuemetrics_server_ip", "$queuemetrics_login", "$queuemetrics_pass"); + mysql_select_db("$queuemetrics_dbname", $linkB); + + $stmt = "INSERT INTO queue_log SET partition='P01',time_id='$StarTtime',call_id='NONE',queue='NONE',agent='Agent/$user',verb='PAUSAALL',serverid='$queuemetrics_log_id';"; + if ($DB) {echo "$stmt\n";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $linkB); + $affected_rows = mysql_affected_rows($linkB); + + mysql_close($linkB); + } + } } else { + if ($enable_queuemetrics_logging > 0) + { + ### check to see if lead should be alt_dialed + $stmt="SELECT auto_call_id,lead_id,phone_number,status,campaign_id,phone_code,alt_dial,stage,callerid,uniqueid from vicidial_auto_calls where lead_id='$lead_id';"; + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $VAC_qm_ct = mysql_num_rows($rslt); + if ($VAC_qm_ct > 0) + { + $row=mysql_fetch_row($rslt); + $auto_call_id = $row[0]; + $CLlead_id = $row[1]; + $CLphone_number = $row[2]; + $CLstatus = $row[3]; + $CLcampaign_id = $row[4]; + $CLphone_code = $row[5]; + $CLalt_dial = $row[6]; + $CLstage = $row[7]; + $CLcallerid = $row[8]; + $CLuniqueid = $row[9]; + } + + $CLstage = preg_replace("/XFER|-/",'',$CLstage); + if ($CLstage < 0.25) {$CLstage=0;} + + $linkB=mysql_connect("$queuemetrics_server_ip", "$queuemetrics_login", "$queuemetrics_pass"); + mysql_select_db("$queuemetrics_dbname", $linkB); + + $stmt = "INSERT INTO queue_log SET partition='P01',time_id='$StarTtime',call_id='$MDnextCID',queue='$campaign',agent='Agent/$user',verb='COMPLETEAGENT',data1='$CLstage',data2='$length_in_sec',data3='1',serverid='$queuemetrics_log_id';"; + if ($DB) {echo "$stmt\n";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $linkB); + $affected_rows = mysql_affected_rows($linkB); + + mysql_close($linkB); + } + $stmt = "DELETE from vicidial_auto_calls lead_id='$lead_id';"; 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';"; + $stmt = "UPDATE vicidial_live_agents set status='PAUSED',lead_id='',uniqueid=0,callerid='',channel='',call_server_ip='',last_call_finish='$NOW_TIME',comments='' where user='$user' and server_ip='$server_ip';"; if ($DB) {echo "$stmt\n";} $rslt=mysql_query($stmt, $link); + $affected_rows = mysql_affected_rows($link); + if ($affected_rows > 0) + { + if ($enable_queuemetrics_logging > 0) + { + $linkB=mysql_connect("$queuemetrics_server_ip", "$queuemetrics_login", "$queuemetrics_pass"); + mysql_select_db("$queuemetrics_dbname", $linkB); + + $stmt = "INSERT INTO queue_log SET partition='P01',time_id='$StarTtime',call_id='NONE',queue='NONE',agent='Agent/$user',verb='PAUSAALL',serverid='$queuemetrics_log_id';"; + if ($DB) {echo "$stmt\n";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $linkB); + $affected_rows = mysql_affected_rows($linkB); + + mysql_close($linkB); + } + } } ##### look for the channel in the UPDATED vicidial_manager record of the call initiation @@ -1095,7 +1347,7 @@ if ($ACTION == 'VDADcheckINCOMING') 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';"; + $stmt = "UPDATE vicidial_live_agents set status='INCALL',last_call_time='$NOW_TIME',comments='AUTO' where user='$user' and server_ip='$server_ip';"; if ($DB) {echo "$stmt\n";} $rslt=mysql_query($stmt, $link); @@ -1163,25 +1415,37 @@ if ($ACTION == 'VDADcheckINCOMING') $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';"; + $user_group=''; + $stmt="SELECT user_group FROM vicidial_users where user='$user' LIMIT 1;"; + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $ug_record_ct = mysql_num_rows($rslt); + if ($ug_record_ct > 0) + { + $row=mysql_fetch_row($rslt); + $user_group = trim("$row[0]"); + } + $stmt = "UPDATE vicidial_log set user='$user', comments='AUTO', list_id='$list_id', status='INCALL', user_group='$user_group' where lead_id='$lead_id' and uniqueid='$uniqueid';"; if ($DB) {echo "$stmt\n";} $rslt=mysql_query($stmt, $link); - if (eregi("CLOSER",$campaign)) + if (eregi("(CLOSER|BLEND|INBND|_C$|_B$|_I$)",$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;"; + $stmt = "UPDATE vicidial_closer_log set user='$user', comments='AUTO', list_id='$list_id', status='INCALL', user_group='$user_group' 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;"; + $stmt = "select campaign_id,phone_number,alt_dial 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) + if ($VDAC_cid_ct > 0) { $row=mysql_fetch_row($rslt); $VDADchannel_group =$row[0]; + $dialed_number =$row[1]; + $dialed_label =$row[2]; } $stmt = "select count(*) from vicidial_log where lead_id='$lead_id' and uniqueid='$uniqueid';"; @@ -1211,6 +1475,11 @@ if ($ACTION == 'VDADcheckINCOMING') $VDCL_xferconf_a_number = $row[11]; $VDCL_xferconf_b_dtmf = $row[12]; $VDCL_xferconf_b_number = $row[13]; + + ### update the comments in vicidial_live_agents record + $stmt = "UPDATE vicidial_live_agents set comments='INBOUND' where user='$user' and server_ip='$server_ip';"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); } else { @@ -1263,6 +1532,17 @@ if ($ACTION == 'VDADcheckINCOMING') $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"; + + $stmt = "select phone_number,alt_dial 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 ($VDAC_cid_ct > 0) + { + $row=mysql_fetch_row($rslt); + $dialed_number =$row[0]; + $dialed_label =$row[1]; + } } $comments = eregi_replace("\r",'',$comments); @@ -1300,6 +1580,8 @@ if ($ACTION == 'VDADcheckINCOMING') $LeaD_InfO .= $CBcallback_time . "\n"; $LeaD_InfO .= $CBuser . "\n"; $LeaD_InfO .= $CBcomments . "\n"; + $LeaD_InfO .= $dialed_number . "\n"; + $LeaD_InfO .= $dialed_label . "\n"; echo $LeaD_InfO; @@ -1327,6 +1609,7 @@ if ($ACTION == 'VDADcheckINCOMING') if ($format=='debug') {echo "\n";} $rslt=mysql_query($stmt, $link); } + } else { @@ -1354,8 +1637,18 @@ if ( (strlen($campaign)<1) || (strlen($conf_exten)<1) ) } else { + $user_group=''; + $stmt="SELECT user_group FROM vicidial_users where user='$user' LIMIT 1;"; + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $ug_record_ct = mysql_num_rows($rslt); + if ($ug_record_ct > 0) + { + $row=mysql_fetch_row($rslt); + $user_group = trim("$row[0]"); + } ##### Insert a LOGOUT record into the user log - $stmt="INSERT INTO vicidial_user_log values('','$user','LOGOUT','$campaign','$NOW_TIME','$StarTtime');"; + $stmt="INSERT INTO vicidial_user_log (user,event,campaign_id,event_date,event_epoch,user_group) values('$user','LOGOUT','$campaign','$NOW_TIME','$StarTtime','$user_group');"; if ($DB) {echo "$stmt\n";} $rslt=mysql_query($stmt, $link); $vul_insert = mysql_affected_rows($link); @@ -1390,11 +1683,94 @@ else $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','','','','','','','','','');"; + $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Hangup','ULGH3459$StarTtime','Channel: $agent_channel','','','','','','','','','');"; if ($format=='debug') {echo "\n";} $rslt=mysql_query($stmt, $link); } + $pause_sec=0; + $stmt = "select pause_epoch,pause_sec,wait_epoch,talk_epoch,dispo_epoch 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) and (strlen($row[3]<5)) and (strlen($row[4]<5)) ) + { + $row=mysql_fetch_row($rslt); + $pause_sec = (($StarTtime - $row[0]) + $row[1]); + + $stmt="UPDATE vicidial_agent_log set pause_sec='$pause_sec',wait_epoch='$StarTtime' where agent_log_id='$agent_log_id';"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + } + + if ($vla_delete > 0) + { + ############################################# + ##### INIZIO QUEUEMETRICS LOGGING LOOKUP ##### + $stmt = "SELECT enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_log_id,allow_sipsak_messages FROM system_settings;"; + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $qm_conf_ct = mysql_num_rows($rslt); + $i=0; + while ($i < $qm_conf_ct) + { + $row=mysql_fetch_row($rslt); + $enable_queuemetrics_logging = $row[0]; + $queuemetrics_server_ip = $row[1]; + $queuemetrics_dbname = $row[2]; + $queuemetrics_login = $row[3]; + $queuemetrics_pass = $row[4]; + $queuemetrics_log_id = $row[5]; + $allow_sipsak_messages = $row[6]; + $i++; + } + ##### END QUEUEMETRICS LOGGING LOOKUP ##### + ########################################### + if ( ($enable_sipsak_messages > 0) and ($allow_sipsak_messages > 0) and (eregi("SIP",$protocol)) ) + { + $SIPSAK_message = 'LOGGED OUT'; + passthru("/usr/local/bin/sipsak -M -O desktop -B \"$SIPSAK_message\" -r 5060 -s sip:$extension@$phone_ip > /dev/null"); + } + + if ($enable_queuemetrics_logging > 0) + { + $linkB=mysql_connect("$queuemetrics_server_ip", "$queuemetrics_login", "$queuemetrics_pass"); + mysql_select_db("$queuemetrics_dbname", $linkB); + + # $stmt = "INSERT INTO queue_log SET partition='P01',time_id='$StarTtime',call_id='NONE',queue='$campaign',agent='Agent/$user',verb='PAUSA',serverid='1';"; + # if ($DB) {echo "$stmt\n";} + # if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + # $rslt=mysql_query($stmt, $linkB); + # $affected_rows = mysql_affected_rows($linkB); + + $stmt = "SELECT time_id FROM queue_log where agent='Agent/$user' and verb='AGENTLOGIN' order by time_id desc limit 1;"; + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $linkB); + if ($DB) {echo "$stmt\n";} + echo "$stmt\n"; + $li_conf_ct = mysql_num_rows($rslt); + $i=0; + while ($i < $li_conf_ct) + { + $row=mysql_fetch_row($rslt); + $logintime = $row[0]; + $i++; + } + + $time_logged_in = ($StarTtime - $logintime); + if ($time_logged_in > 1000000) {$time_logged_in=1;} + + $stmt = "INSERT INTO queue_log SET partition='P01',time_id='$StarTtime',call_id='NONE',queue='$campaign',agent='Agent/$user',verb='AGENTLOGOFF',data1='$user$agents',data2='$time_logged_in',serverid='$queuemetrics_log_id';"; + if ($DB) {echo "$stmt\n";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $linkB); + $affected_rows = mysql_affected_rows($linkB); + + mysql_close($linkB); + } + } + echo "$vul_insert|$vc_remove|$vla_delete|$wcs_delete|$agent_channel\n"; } } @@ -1423,7 +1799,14 @@ if ($ACTION == 'updateDISPO') if ($format=='debug') {echo "\n";} $rslt=mysql_query($stmt, $link); - if ( ($use_internal_dnc=='Y') and ($dispo_choice=='DNC') ) + if (eregi("(CLOSER|BLEND|INBND|_C$|_B$|_I$)",$campaign)) + { + $stmt = "UPDATE vicidial_closer_log set status='$dispo_choice' where lead_id='$lead_id' and user='$user' order by closecallid desc limit 1;"; + if ($DB) {echo "$stmt\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";} @@ -1450,20 +1833,91 @@ if ($ACTION == 'updateDISPO') 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');"; + $user_group=''; + $stmt="SELECT user_group FROM vicidial_users where user='$user' LIMIT 1;"; + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $ug_record_ct = mysql_num_rows($rslt); + if ($ug_record_ct > 0) + { + $row=mysql_fetch_row($rslt); + $user_group = trim("$row[0]"); + } + + $stmt="INSERT INTO vicidial_agent_log (user,server_ip,event_time,campaign_id,pause_epoch,pause_sec,wait_epoch,user_group) values('$user','$server_ip','$NOW_TIME','$campaign','$StarTtime','0','$StarTtime','$user_group');"; if ($DB) {echo "$stmt\n";} $rslt=mysql_query($stmt, $link); $affected_rows = mysql_affected_rows($link); - $agent_log_id = mysql_insert_id(); + $agent_log_id = mysql_insert_id($link); ### CHIAMATABACK 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');"; + $stmt="INSERT INTO vicidial_callbacks (lead_id,list_id,campaign_id,status,entry_time,callback_time,user,recipient,comments,user_group) values('$lead_id','$list_id','$campaign','ACTIVE','$NOW_TIME','$CallBackDatETimE','$user','$recipient','$comments','$user_group');"; if ($DB) {echo "$stmt\n";} $rslt=mysql_query($stmt, $link); } + $stmt="SELECT auto_alt_dial_statuses from vicidial_campaigns where campaign_id='$campaign';"; + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + + if ( ($auto_dial_level > 0) and (ereg(" $dispo_choice ",$row[0])) ) + { + $stmt = "select count(*) from vicidial_hopper where lead_id='$lead_id' and status='HOLD';"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + + if ($row[0] > 0) + { + $stmt="UPDATE vicidial_hopper set status='READY' where lead_id='$lead_id' and status='HOLD' limit 1;"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + } + } + else + { + $stmt="DELETE from vicidial_hopper where lead_id='$lead_id' and status='HOLD';"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + } + + ############################################# + ##### INIZIO QUEUEMETRICS LOGGING LOOKUP ##### + $stmt = "SELECT enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_log_id FROM system_settings;"; + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $qm_conf_ct = mysql_num_rows($rslt); + $i=0; + while ($i < $qm_conf_ct) + { + $row=mysql_fetch_row($rslt); + $enable_queuemetrics_logging = $row[0]; + $queuemetrics_server_ip = $row[1]; + $queuemetrics_dbname = $row[2]; + $queuemetrics_login = $row[3]; + $queuemetrics_pass = $row[4]; + $queuemetrics_log_id = $row[5]; + $i++; + } + ##### END QUEUEMETRICS LOGGING LOOKUP ##### + ########################################### + if ($enable_queuemetrics_logging > 0) + { + $linkB=mysql_connect("$queuemetrics_server_ip", "$queuemetrics_login", "$queuemetrics_pass"); + mysql_select_db("$queuemetrics_dbname", $linkB); + + $stmt = "INSERT INTO queue_log SET partition='P01',time_id='$StarTtime',call_id='$MDnextCID',queue='$campaign',agent='Agent/$user',verb='CALLSTATUS',data1='$dispo_choice',serverid='$queuemetrics_log_id';"; + if ($DB) {echo "$stmt\n";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $linkB); + $affected_rows = mysql_affected_rows($linkB); + + mysql_close($linkB); + } + echo 'Lead ' . $lead_id . ' è stato cambiato ' . $dispo_choice . " Status\nNext agent_log_id:\n" . $agent_log_id . "\n"; } @@ -1475,6 +1929,8 @@ if ($ACTION == 'updateLEAD') { $MT[0]=''; $row=''; $rowx=''; + $DO_NOT_UPDATE=0; + $DO_NOT_UPDATE_text=''; if ( (strlen($phone_number)<1) || (strlen($lead_id)<1) ) { echo "phone_number $phone_number or lead_id $lead_id non è valido\n"; @@ -1482,12 +1938,54 @@ if ($ACTION == 'updateLEAD') } 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";} + $stmt = "SELECT disable_alter_custdata FROM vicidial_campaigns where campaign_id='$campaign'"; + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $dac_conf_ct = mysql_num_rows($rslt); + $i=0; + while ($i < $dac_conf_ct) + { + $row=mysql_fetch_row($rslt); + $disable_alter_custdata = $row[0]; + $i++; + } + if (ereg('Y',$disable_alter_custdata)) + { + $DO_NOT_UPDATE=1; + $DO_NOT_UPDATE_text=' NOT'; + $stmt = "SELECT alter_custdata_override FROM vicidial_users where user='$user'"; + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $aco_conf_ct = mysql_num_rows($rslt); + $i=0; + while ($i < $aco_conf_ct) + { + $row=mysql_fetch_row($rslt); + $alter_custdata_override = $row[0]; + $i++; + } + if (ereg('ALLOW_ALTER',$alter_custdata_override)) + { + $DO_NOT_UPDATE=0; + $DO_NOT_UPDATE_text=''; + } + } + + if ($DO_NOT_UPDATE < 1) + { + $comments = eregi_replace("\r",'',$comments); + $comments = eregi_replace("\n",'!N',$comments); + $comments = eregi_replace("--AMP--",'&',$comments); + $comments = eregi_replace("--QUES--",'?',$comments); + $comments = eregi_replace("--POUND--",'#',$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';"; @@ -1495,7 +1993,7 @@ if ($ACTION == 'updateLEAD') $rslt=mysql_query($stmt, $link); } - echo "Lead $lead_id le informazioni sono state aggiornate\n"; + echo "Lead $lead_id information has$DO_NOT_UPDATE_text been updated\n"; } @@ -1515,10 +2013,54 @@ if ( ($ACTION == 'VDADpause') || ($ACTION == 'VDADready') ) 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';"; + $stmt="UPDATE vicidial_live_agents set lead_id='',uniqueid=0,callerid='',channel='', random_id='$random',comments='' where user='$user' and server_ip='$server_ip';"; if ($format=='debug') {echo "\n";} $rslt=mysql_query($stmt, $link); + $stmt="UPDATE vicidial_live_agents set status='$stage' where user='$user' and server_ip='$server_ip';"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + $affected_rows = mysql_affected_rows($link); + if ($affected_rows > 0) + { + ############################################# + ##### INIZIO QUEUEMETRICS LOGGING LOOKUP ##### + $stmt = "SELECT enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_log_id FROM system_settings;"; + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $qm_conf_ct = mysql_num_rows($rslt); + $i=0; + while ($i < $qm_conf_ct) + { + $row=mysql_fetch_row($rslt); + $enable_queuemetrics_logging = $row[0]; + $queuemetrics_server_ip = $row[1]; + $queuemetrics_dbname = $row[2]; + $queuemetrics_login = $row[3]; + $queuemetrics_pass = $row[4]; + $queuemetrics_log_id = $row[5]; + $i++; + } + ##### END QUEUEMETRICS LOGGING LOOKUP ##### + ########################################### + if ($enable_queuemetrics_logging > 0) + { + if (ereg('READY',$stage)) {$QMstatus='UNPAUSEALL';} + if (ereg('PAUSA',$stage)) {$QMstatus='PAUSAALL';} + $linkB=mysql_connect("$queuemetrics_server_ip", "$queuemetrics_login", "$queuemetrics_pass"); + mysql_select_db("$queuemetrics_dbname", $linkB); + + $stmt = "INSERT INTO queue_log SET partition='P01',time_id='$StarTtime',call_id='NONE',queue='NONE',agent='Agent/$user',verb='$QMstatus',serverid='$queuemetrics_log_id';"; + if ($DB) {echo "$stmt\n";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $linkB); + $affected_rows = mysql_affected_rows($linkB); + + mysql_close($linkB); + } + } + if ($agent_log == 'NO') {$donothing=1;} else @@ -1587,6 +2129,71 @@ if ($ACTION == 'UpdatEFavoritEs') } +################################################################################ +### PauseCodeSubmit - Update vicidial_agent_log with pause code +################################################################################ +if ($ACTION == 'PausaCodeSubmit') +{ + $row=''; $rowx=''; + if ( (strlen($status)<1) || (strlen($agent_log_id)<1) ) + { + echo "agent_log_id $agent_log_id or pause_code $status non è valido\n"; + exit; + } + else + { + $stmt="UPDATE vicidial_agent_log set sub_status=\"$status\" where agent_log_id='$agent_log_id';"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + $affected_rows = mysql_affected_rows($link); + if ($affected_rows > 0) + { + ############################################# + ##### INIZIO QUEUEMETRICS LOGGING LOOKUP ##### + $stmt = "SELECT enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_log_id,allow_sipsak_messages FROM system_settings;"; + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $qm_conf_ct = mysql_num_rows($rslt); + $i=0; + while ($i < $qm_conf_ct) + { + $row=mysql_fetch_row($rslt); + $enable_queuemetrics_logging = $row[0]; + $queuemetrics_server_ip = $row[1]; + $queuemetrics_dbname = $row[2]; + $queuemetrics_login = $row[3]; + $queuemetrics_pass = $row[4]; + $queuemetrics_log_id = $row[5]; + $allow_sipsak_messages = $row[6]; + $i++; + } + ##### END QUEUEMETRICS LOGGING LOOKUP ##### + ########################################### + if ( ($enable_sipsak_messages > 0) and ($allow_sipsak_messages > 0) and (eregi("SIP",$protocol)) ) + { + $SIPSAK_prefix = 'BK-'; + passthru("/usr/local/bin/sipsak -M -O desktop -B \"$SIPSAK_prefix$status\" -r 5060 -s sip:$extension@$phone_ip > /dev/null"); + } + if ($enable_queuemetrics_logging > 0) + { + $linkB=mysql_connect("$queuemetrics_server_ip", "$queuemetrics_login", "$queuemetrics_pass"); + mysql_select_db("$queuemetrics_dbname", $linkB); + + $stmt = "INSERT INTO queue_log SET partition='P01',time_id='$StarTtime',call_id='NONE',queue='$campaign',agent='Agent/$user',verb='PAUSAREASON',serverid='$queuemetrics_log_id',data1='$status';"; + if ($DB) {echo "$stmt\n";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $linkB); + $affected_rows = mysql_affected_rows($linkB); + + mysql_close($linkB); + } + } + } +echo "Pausa Code has been updated to $status for $agent_log_id\n"; +} + + ################################################################################ ### CalLBacKLisT - List the USERONLY callbacks for an agent ################################################################################ diff --git a/agc_2-X/trunk/LANG_www/agc_it/vicidial.php b/agc_2-X/trunk/LANG_www/agc_it/vicidial.php index 9ae6a647..d9f3435d 100644 --- a/agc_2-X/trunk/LANG_www/agc_it/vicidial.php +++ b/agc_2-X/trunk/LANG_www/agc_it/vicidial.php @@ -1,7 +1,7 @@ LICENSE: GPLv2 +# Copyright (C) 2007 Matt Florell 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 @@ -15,7 +15,7 @@ # - vdc_db_query.php: Updates information in the database # - manager_send.php: Sends manager actions to the DB for execution # -# CHANGES +# CHANGELOG # 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 @@ -132,8 +132,37 @@ # 61128-2229 - Added vicidial_live_agents and vicidial_auto_calls manual dial entries # 61130-1617 - Added lead_id to MonitorConf for recording_log # 61221-1212 - Changed width to 760 to better fit 800x600 screens, widened SCRIPT +# 70109-1128 - Fixed wrapup timer bug +# 70109-1635 - Added option for HotKeys automatically dialing next number in manual mode +# - Added option for alternate number dialing with hotkeys +# 70111-1600 - Added ability to use BLEND/INBND/*_C/*_B/*_I as closer campaigns +# 70118-1517 - Added vicidial_agent_log and vicidial_user_log logging of user_group +# 70201-1249 - Added FAST DIAL option for manually dialing, added UTF8 compatible code +# 70201-1703 - Fixed cursor bug for most text input fields +# 70202-1453 - Added first portions of Agent Pause Codes +# 70203-0108 - Finished Agent Pause Codes functionality +# 70203-0930 - Added dialed_number to webform output +# 70203-1010 - Added dialed_label to webform output +# 70206-1201 - Fixed allow_closers bug +# 70206-1332 - Added vicidial_recording_override users setting function +# 70212-1252 - Fixed small issue with CXFER +# 70213-1018 - Changed CXFER and AXFER to update customer information before transfer +# 70214-1233 - Added queuemetrics_log_id field for server_id in queue_log +# 70215-1240 - Added queuemetrics_log_id field for server_id in queue_log +# 70222-1617 - Changed queue_log PAUSE/UNPAUSE to PAUSEALL/UNPAUSEALL +# 70226-1252 - Added Mute/UnMute to agent screen +# 70309-1035 - Allow amphersands and questions marks in comments to pass through +# 70313-1052 - Allow pound signs(hash) in comments to pass through +# 70316-1406 - Moved the MUTE button to be accessible during a transfer/conf +# 70319-1446 - Added agent-deactive-display and disable customer info update functions +# 70319-1626 - Added option to allow agent logins to campaigns with no leads in the hopper +# 70320-1501 - Added option to allow retry of leave-3way-call from dispo screen +# 70322-1545 - Added sipsak display ability # +$version = '2.0.129'; +$build = '70322-1545'; + require("dbconnect.php"); if (isset($_GET["DB"])) {$DB=$_GET["DB"];} @@ -172,14 +201,11 @@ if (isset($_GET["relogin"])) {$relogin=$_GET["relogin"];} $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); + $VD_campaign=ereg_replace("[^0-9a-zA-Z_]","",$VD_campaign); $forever_stop=0; -$version = '2.0.105'; -$build = '61221-1212'; - if ($force_logout) { echo "Ora siete non Loggati . Grazie\n"; @@ -226,6 +252,7 @@ $TEST_all_statuses = '0'; # TEST variable allows all statuses in dispo screen $US='_'; $CL=':'; $AT='@'; +$DS='-'; $date = date("r"); $ip = getenv("REMOTE_ADDR"); $browser = getenv("HTTP_USER_AGENT"); @@ -252,6 +279,7 @@ $camp_form_code = " 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $phone_login=$row[0]; @@ -438,6 +467,7 @@ $VDloginDISPLAY=0; { $stmt="SELECT count(*) from vicidial_users where user='$VD_login' and pass='$VD_pass' and user_level > 0;"; if ($DB) {echo "|$stmt|\n";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $auth=$row[0]; @@ -447,7 +477,8 @@ $VDloginDISPLAY=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,user_group from vicidial_users where user='$VD_login' and pass='$VD_pass'"; + $stmt="SELECT full_name,user_level,hotkeys_active,agent_choose_ingroups,scheduled_callbacks,agentonly_callbacks,agentcall_manual,vicidial_recording,vicidial_transfers,closer_default_blended,user_group,vicidial_recording_override from vicidial_users where user='$VD_login' and pass='$VD_pass'"; + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $LOGfullname=$row[0]; @@ -461,6 +492,8 @@ $VDloginDISPLAY=0; $VU_vicidial_transfers=$row[8]; $VU_closer_default_blended=$row[9]; $VU_user_group=$row[10]; + $VU_vicidial_recording_override=$row[11]; + if ($WeBRooTWritablE > 0) { fwrite ($fp, "vdweb|GOOD|$date|$VD_login|$VD_pass|$ip|$browser|$LOGfullname|\n"); @@ -471,6 +504,7 @@ $VDloginDISPLAY=0; {$user_abb = eregi_replace("^.","",$user_abb); $forever_stop++;} $stmt="SELECT allowed_campaigns from vicidial_user_groups where user_group='$VU_user_group';"; + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $LOGallowed_campaigns =$row[0]; @@ -501,6 +535,7 @@ echo " 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $CAMPactive=$row[0]; @@ -512,6 +547,7 @@ echo " 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $VD_statuses_ct = mysql_num_rows($rslt); @@ -528,6 +564,7 @@ echo " 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $VD_statuses_camp = mysql_num_rows($rslt); @@ -548,6 +585,7 @@ echo " 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $HK_statuses_camp = mysql_num_rows($rslt); @@ -577,43 +615,46 @@ echo " 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $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]; - $allcalls_delay=$row[30]; - $omit_phone_code=$row[31]; + $park_ext = $row[0]; + $park_file_name = $row[1]; + $web_form_address = $row[2]; + $allow_closers = $row[3]; + $auto_dial_level = $row[4]; + $dial_timeout = $row[5]; + $dial_prefix = $row[6]; + $campaign_cid = $row[7]; + $campaign_vdad_exten = $row[8]; + $campaign_rec_exten = $row[9]; + $campaign_recording = $row[10]; + $campaign_rec_filename = $row[11]; + $campaign_script = $row[12]; + $get_call_launch = $row[13]; + $campaign_am_message_exten = $row[14]; + $xferconf_a_dtmf = $row[15]; + $xferconf_a_number = $row[16]; + $xferconf_b_dtmf = $row[17]; + $xferconf_b_number = $row[18]; + $alt_number_dialing = $row[19]; + $VC_scheduled_callbacks = $row[20]; + $wrapup_secondi = $row[21]; + $wrapup_message = $row[22]; + $closer_campaigns = $row[23]; + $use_internal_dnc = $row[24]; + $allcalls_delay = $row[25]; + $omit_phone_code = $row[26]; + $agent_pause_codes_active = $row[27]; + $no_hopper_leads_logins = $row[28]; + if ( (!ereg('DISABLED',$VU_vicidial_recording_override)) and ($VU_vicidial_recording > 0) ) + { + $campaign_recording = $VU_vicidial_recording_override; + print "\n"; + } if ( ($VC_scheduled_callbacks=='Y') and ($VU_scheduled_callbacks=='1') ) {$scheduled_callbacks='1';} if ($VU_vicidial_recording=='0') @@ -626,12 +667,37 @@ echo " 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $VD_pause_codes = mysql_num_rows($rslt); + $j=0; + while ($j < $VD_pause_codes) + { + $row=mysql_fetch_row($rslt); + $pause_codes[$i] =$row[0]; + $pause_code_names[$i] =$row[1]; + $VARpause_codes = "$VARpause_codes'$pause_codes[$i]',"; + $VARpause_code_names = "$VARpause_code_names'$pause_code_names[$i]',"; + $i++; + $j++; + } + $VD_pause_codes_ct = ($VD_pause_codes_ct+$VD_pause_codes); + $VARpause_codes = substr("$VARpause_codes", 0, -1); + $VARpause_code_names = substr("$VARpause_code_names", 0, -1); + } + ##### grab the inbound groups to choose from if campaign contains CLOSER $VARingroups="''"; - if (eregi("CLOSER", $VD_campaign)) + if (eregi("(CLOSER|BLEND|INBND|_C$|_B$|_I$)", $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;"; + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $closer_ct = mysql_num_rows($rslt); @@ -648,6 +714,7 @@ echo " 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $row=mysql_fetch_row($rslt); @@ -708,6 +775,7 @@ echo " 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $authphone=$row[0]; @@ -746,6 +814,7 @@ else echo "Web client di VICICHIAMA\n"; $stmt="SELECT * from phones where login='$phone_login' and pass='$phone_pass' and active = 'Y';"; if ($DB) {echo "|$stmt|\n";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $extension=$row[0]; @@ -808,6 +877,7 @@ else $DBX_user=$row[57]; $DBX_pass=$row[58]; $DBX_port=$row[59]; + $enable_sipsak_messages=$row[66]; if ($clientDST) { @@ -822,6 +892,7 @@ else $stmt="SELECT asterisk_version from servers where server_ip='$server_ip';"; if ($DB) {echo "|$stmt|\n";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $asterisk_version=$row[0]; @@ -875,21 +946,25 @@ else $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";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $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";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); - if ( (eregi("CLOSER", $VD_campaign)) || ($campaign_leads_to_call > 0) ) + if ( (eregi("(CLOSER|BLEND|INBND|_C$|_B$|_I$)", $VD_campaign)) || ($campaign_leads_to_call > 0) || (ereg('Y',$no_hopper_leads_logins)) ) { ### 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')"; + $stmt = "INSERT INTO vicidial_user_log (user,event,campaign_id,event_date,event_epoch,user_group) values('$VD_login','LOGIN','$VD_campaign','$NOW_TIME','$StarTtimE','$VU_user_group')"; if ($DB) {echo "|$stmt|\n";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $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;"; + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $prev_login_ct = mysql_num_rows($rslt); @@ -906,6 +981,7 @@ 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;"; + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $free_conf_ct = mysql_num_rows($rslt); @@ -917,6 +993,7 @@ else $i++; } $stmt="UPDATE vicidial_conferences set extension='$SIP_user' where server_ip='$server_ip' and conf_exten='$session_id';"; + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); print "\n"; @@ -924,18 +1001,21 @@ else $stmt="UPDATE vicidial_list set status='N', user='' where status IN('QUEUE','INCALL') and user ='$VD_login';"; if ($DB) {echo "$stmt\n";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $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";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $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";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); $affected_rows = mysql_affected_rows($link); print "\n"; @@ -943,11 +1023,45 @@ else # print "You have logged in as user: $VD_login su phone: $SIP_user vai alla campagna: $VD_campaign
\n"; $VICIDiaL_is_logged_in=1; - ### use manager middleware-app to connect the phone to the user + ### set the callerID for manager middleware-app to connect the phone to the user $SIqueryCID = "S$CIDdate$session_id"; + + ############################################# + ##### INIZIO SYSTEM_SETTINGS LOOKUP ##### + $stmt = "SELECT enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_log_id,vicidial_agent_disable,allow_sipsak_messages FROM system_settings;"; + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $qm_conf_ct = mysql_num_rows($rslt); + $i=0; + while ($i < $qm_conf_ct) + { + $row=mysql_fetch_row($rslt); + $enable_queuemetrics_logging = $row[0]; + $queuemetrics_server_ip = $row[1]; + $queuemetrics_dbname = $row[2]; + $queuemetrics_login = $row[3]; + $queuemetrics_pass = $row[4]; + $queuemetrics_log_id = $row[5]; + $vicidial_agent_disable = $row[6]; + $allow_sipsak_messages = $row[7]; + $i++; + } + ##### END QUEUEMETRICS LOGGING LOOKUP ##### + ########################################### + + if ( ($enable_sipsak_messages > 0) and ($allow_sipsak_messages > 0) and (eregi("SIP",$protocol)) ) + { + $SIPSAK_prefix = 'LIN-'; + print "\n"; + passthru("/usr/local/bin/sipsak -M -O desktop -B \"$SIPSAK_prefix$VD_campaign\" -r 5060 -s sip:$extension@$phone_ip > /dev/null"); + $SIqueryCID = "$SIPSAK_prefix$VD_campaign$DS$CIDdate"; + } + ### 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";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); $affected_rows = mysql_affected_rows($link); print "\n"; @@ -959,13 +1073,38 @@ else $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";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); $affected_rows = mysql_affected_rows($link); print "\n"; - if (eregi("CLOSER", $VD_campaign)) + if ($enable_queuemetrics_logging > 0) { - print "\n"; + $linkB=mysql_connect("$queuemetrics_server_ip", "$queuemetrics_login", "$queuemetrics_pass"); + mysql_select_db("$queuemetrics_dbname", $linkB); + + $stmt = "INSERT INTO queue_log SET partition='P01',time_id='$StarTtimE',call_id='NONE',queue='$VD_campaign',agent='Agent/$VD_login',verb='AGENTLOGIN',data1='$VD_login@agents',serverid='$queuemetrics_log_id';"; + if ($DB) {echo "$stmt\n";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $linkB); + $affected_rows = mysql_affected_rows($linkB); + print "\n"; + + $stmt = "INSERT INTO queue_log SET partition='P01',time_id='$StarTtimE',call_id='NONE',queue='NONE',agent='Agent/$VD_login',verb='PAUSAALL',serverid='$queuemetrics_log_id';"; + if ($DB) {echo "$stmt\n";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $linkB); + $affected_rows = mysql_affected_rows($linkB); + print "\n"; + + mysql_close($linkB); + mysql_select_db("$VARDB_database", $link); + } + + + if (eregi("(CLOSER|BLEND|INBND|_C$|_B$|_I$)", $VD_campaign)) + { + print "\n"; } } else @@ -974,9 +1113,33 @@ else $stmt="INSERT INTO vicidial_live_agents (user,server_ip,conf_exten,extension,status,lead_id,campaign_id,uniqueid,callerid,channel,random_id,last_call_time,last_update_time,last_call_finish,user_level) values('$VD_login','$server_ip','$session_id','$SIP_user','PAUSED','','$VD_campaign','','','','$random','$NOW_TIME','$tsNOW_TIME','$NOW_TIME','$user_level');"; if ($DB) {echo "$stmt\n";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); $affected_rows = mysql_affected_rows($link); print "\n"; + + if ($enable_queuemetrics_logging > 0) + { + $linkB=mysql_connect("$queuemetrics_server_ip", "$queuemetrics_login", "$queuemetrics_pass"); + mysql_select_db("$queuemetrics_dbname", $linkB); + + $stmt = "INSERT INTO queue_log SET partition='P01',time_id='$StarTtimE',call_id='NONE',queue='$VD_campaign',agent='Agent/$VD_login',verb='AGENTLOGIN',data1='$VD_login@agents',serverid='$queuemetrics_log_id';"; + if ($DB) {echo "$stmt\n";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $linkB); + $affected_rows = mysql_affected_rows($linkB); + print "\n"; + + $stmt = "INSERT INTO queue_log SET partition='P01',time_id='$StarTtimE',call_id='NONE',queue='NONE',agent='Agent/$VD_login',verb='PAUSAALL',serverid='$queuemetrics_log_id';"; + if ($DB) {echo "$stmt\n";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $linkB); + $affected_rows = mysql_affected_rows($linkB); + print "\n"; + + mysql_close($linkB); + mysql_select_db("$VARDB_database", $link); + } } } else @@ -1027,11 +1190,12 @@ echo "
0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); $affected_rows = mysql_affected_rows($link); - $agent_log_id = mysql_insert_id(); + $agent_log_id = mysql_insert_id($link); print "\n"; $S='*'; @@ -1048,6 +1212,7 @@ echo " 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $MM_scripts = mysql_num_rows($rslt); @@ -1225,6 +1390,10 @@ $CCAL_OUT .= "
"; var CallBackCommenTs = ''; var scheduled_callbacks = ''; var dispo_check_all_pause = ''; + var agent_pause_codes_active = ''; + VARpause_codes = new Array(); + VARpause_code_names = new Array(); + var VD_pause_codes_ct = ''; VARstatuses = new Array(); VARstatusnames = new Array(); var VD_statuses_ct = ''; @@ -1277,6 +1446,7 @@ $CCAL_OUT .= "
"; var dialplan_number = ''; var ext_context = ''; var protocol = ''; + var agentchannel = ''; var local_gmt =''; var server_ip = ''; var server_ip_dialstring = ''; @@ -1292,6 +1462,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} var CalLCID = ''; var MDnextCID = ''; var XDnextCID = ''; + var LasTCID = ''; var lead_dial_number = ''; var MD_channel_look = 0; var XD_channel_look = 0; @@ -1324,11 +1495,6 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} var CalL_AutO_LauncH = ''; var panel_bgcolor = '#E0C2D6'; var CusTCB_bgcolor = '#FFFF66'; - var status_A = ''; - var status_B = ''; - var status_C = ''; - var status_D = ''; - var status_E = ''; var auto_dial_level = ''; var starting_dial_level = ''; var dial_timeout = ''; @@ -1428,11 +1594,24 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} var no_delete_sessions = ''; var webform_session = ''; var local_consult_xfers = ''; + var vicidial_agent_disable = ''; var CBentry_time = ''; var CBcallback_time = ''; var CBuser = ''; var CBcomments = ''; var volumecontrol_active = ''; + var PausaCode_HTML = ''; + var manual_auto_hotkey = 0; + var dialed_number = ''; + var dialed_label = ''; + var DispO3waychannel = ''; + var DispO3wayXtrAchannel = ''; + var DispO3wayCalLserverip = ''; + var DispO3wayCalLxfernumber = ''; + var DispO3wayCalLcamptail = ''; + var phone_ip = ''; + var enable_sipsak_messages = ''; + var allow_sipsak_messages = ''; var DiaLControl_auto_HTML = "\"Pausa\"\"Riprendi\""; var DiaLControl_auto_HTML_ready = "\"Pausa\"\"Riprendi\""; var DiaLControl_auto_HTML_OFF = "\"Pausa\"\"Riprendi\""; @@ -1536,8 +1715,12 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} // ################################################################################ // Send volume control command for meetme participant - function volume_control(taskdirection,taskvolchannel) + function volume_control(taskdirection,taskvolchannel,taskagentmute) { + if (taskagentmute=='AgenT') + { + taskvolchannel = agentchannel; + } var xmlhttp=false; /*@cc_on @*/ /*@if (@_jscript_version >= 5) @@ -1576,6 +1759,18 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} } delete xmlhttp; } + if (taskagentmute=='AgenT') + { + if (taskdirection=='MUTING') + { + document.getElementById("AgentMuteSpan").innerHTML = ""; + } + else + { + document.getElementById("AgentMuteSpan").innerHTML = ""; + } + } + } @@ -1590,9 +1785,9 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} // ################################################################################ // place 3way and customer into other conference and fake-hangup the lines - function leave_3way_call() + function leave_3way_call(tempvarattempt) { - mainxfer_send_redirect('3WAY'); + mainxfer_send_redirect('3WAY','','',tempvarattempt); document.vicidial_form.callchannel.value = ''; document.vicidial_form.callserverip.value = ''; @@ -1653,6 +1848,35 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} // Send Originate command to manager to place a phone call function basic_originate_call(tasknum,taskprefix,taskreverse,taskdialvalue,tasknowait,taskconfxfer) { + var regCXFvars = new RegExp("CXFER","g"); + var tasknum_string = tasknum.toString(); + if (tasknum_string.match(regCXFvars)) + { + var Ctasknum = tasknum_string.replace(regCXFvars, ''); + if (Ctasknum.length < 2) + {Ctasknum = '990009';} + var closerxfercamptail = '_L' + document.vicidial_form.xfercode.value; + tasknum = Ctasknum + "*CL_" + campaign + '' + closerxfercamptail + '*CXFER*' + document.vicidial_form.lead_id.value + '**' + document.vicidial_form.phone_number.value + '*' + user + '*'; + + CustomerData_update(); + + } + var regAXFvars = new RegExp("AXFER","g"); + if (tasknum_string.match(regAXFvars)) + { + var Ctasknum = tasknum_string.replace(regAXFvars, ''); + if (Ctasknum.length < 2) + {Ctasknum = '83009';} + var closerxfercamptail = '_L' + document.vicidial_form.xfercode.value; + if (closerxfercamptail.length < 3) + {closerxfercamptail = 'IVR';} + tasknum = Ctasknum + '*' + document.vicidial_form.phone_number.value + '*' + document.vicidial_form.lead_id.value + '*' + campaign + '*' + closerxfercamptail + '*' + user + '*'; + + CustomerData_update(); + + } + + var xmlhttp=false; /*@cc_on @*/ /*@if (@_jscript_version >= 5) @@ -1674,27 +1898,6 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} } if (xmlhttp) { - var regCXFvars = new RegExp("CXFER","g"); - var tasknum_string = tasknum.toString(); - if (tasknum_string.match(regCXFvars)) - { - var Ctasknum = tasknum_string.replace(regCXFvars, ''); - if (Ctasknum.length < 2) - {Ctasknum = '990009';} - var closerxfercamptail = '_L' + document.vicidial_form.xfercode.value; - tasknum = Ctasknum + "*CL_" + campaign + '' + closerxfercamptail + '**' + document.vicidial_form.lead_id.value + '**' + document.vicidial_form.phone_number.value + '*' + user + '*'; - } - var regAXFvars = new RegExp("AXFER","g"); - if (tasknum_string.match(regAXFvars)) - { - var Ctasknum = tasknum_string.replace(regAXFvars, ''); - if (Ctasknum.length < 2) - {Ctasknum = '83009';} - var closerxfercamptail = '_L' + document.vicidial_form.xfercode.value; - if (closerxfercamptail.length < 3) - {closerxfercamptail = 'IVR';} - tasknum = Ctasknum + '*' + document.vicidial_form.phone_number.value + '*' + document.vicidial_form.lead_id.value + '*' + campaign + '*' + closerxfercamptail + '*' + user + '*'; - } if (taskprefix == 'NO') {var orig_prefix = '';} else {var orig_prefix = agc_dial_prefix;} if (taskreverse == 'YES') @@ -1858,7 +2061,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} UnixTime = parseInt(UnixTime); UnixTimeMS = (UnixTime * 1000); t.setTime(UnixTimeMS); - if (agentcallsstatus == '1') + if ( (agentcallsstatus == '1') || (vicidial_agent_disable != 'NOT_ACTIVE') ) { var Astatus_array = check_time_array[2].split("Status: "); var AGStatuS = Astatus_array[1]; @@ -1872,6 +2075,14 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} { document.getElementById("AgentStatusCalls").innerHTML = CamPCalLs; } + if ( (AGStatuS == 'DEAD_VLA') && ( (vicidial_agent_disable == 'LIVE_AGENT') || (vicidial_agent_disable == 'ALL') ) ) + { + showDiv('AgenTDisablEBoX'); + } + if ( (AGStatuS == 'DEAD_EXTERNAL') && ( (vicidial_agent_disable == 'EXTERNAL') || (vicidial_agent_disable == 'ALL') ) ) + { + showDiv('AgenTDisablEBoX'); + } } var check_conf_array=check_ALL_array[1].split("|"); var live_conf_calls = check_conf_array[0]; @@ -1903,14 +2114,13 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} {var row_color = '#CCCCFF';} var conv_ct = (loop_ct + conv_start); var channelfieldA = conf_chan_array[conv_ct]; - // live_conf_HTML = live_conf_HTML + "
" + loop_ct + "" + channelfieldA + "HangupTRASF
" + loop_ct + "" + channelfieldA + "ATTACCA
" + loop_ct + "" + channelfieldA + "ATTACCA    
" + loop_ct + "" + channelfieldA + "ATTACCA          
PAUSA CODE
"; + var loop_ct = 0; + while (loop_ct < VD_pause_codes_ct) + { + PausaCode_HTML = PausaCode_HTML + "" + VARpause_codes[loop_ct] + " - " + VARpause_code_names[loop_ct] + "

"; + loop_ct++; + if (loop_ct == VD_pause_codes_ct_half) + {PausaCode_HTML = PausaCode_HTML + "
";} + } + PausaCode_HTML = PausaCode_HTML + "


Torna Indietro"; + document.getElementById("PausaCodeSelectContent").innerHTML = PausaCode_HTML; + } + } // ################################################################################ // open web form, then submit disposition @@ -4114,7 +4527,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} } if (xmlhttp) { - DSupdate_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=updateDISPO&format=text&user=" + user + "&pass=" + pass + "&dispo_choice=" + DispoChoice + "&lead_id=" + document.vicidial_form.lead_id.value + "&campaign=" + campaign + "&auto_dial_level=" + auto_dial_level + "&agent_log_id=" + agent_log_id + "&CallBackDatETimE=" + CallBackDatETimE + "&list_id=" + document.vicidial_form.list_id.value + "&recipient=" + CallBackrecipient + "&use_internal_dnc=" + use_internal_dnc + "&comments=" + CallBackCommenTs; + DSupdate_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=updateDISPO&format=text&user=" + user + "&pass=" + pass + "&dispo_choice=" + DispoChoice + "&lead_id=" + document.vicidial_form.lead_id.value + "&campaign=" + campaign + "&auto_dial_level=" + auto_dial_level + "&agent_log_id=" + agent_log_id + "&CallBackDatETimE=" + CallBackDatETimE + "&list_id=" + document.vicidial_form.list_id.value + "&recipient=" + CallBackrecipient + "&use_internal_dnc=" + use_internal_dnc + "&MDnextCID=" + LasTCID + "&comments=" + CallBackCommenTs; xmlhttp.open('POST', 'vdc_db_query.php'); xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8'); xmlhttp.send(DSupdate_query); @@ -4124,8 +4537,8 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} { var check_dispo = null; check_dispo = xmlhttp.responseText; - // alert(xmlhttp.responseText); var check_DS_array=check_dispo.split("\n"); + // alert(xmlhttp.responseText + "\n|" + check_DS_array[1] + "\n|" + check_DS_array[2] + "|"); if (check_DS_array[1] == 'Next agent_log_id:') { agent_log_id = check_DS_array[2]; @@ -4203,12 +4616,67 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} AutoDial_ReSume_PauSe("VDADready","NO"); // document.getElementById("DiaLControl").innerHTML = DiaLControl_auto_HTML_ready; } + else + { + // trigger HotKeys manual dial automatically go to next lead + if (manual_auto_hotkey == '1') + { + manual_auto_hotkey = 0; + ManualDialNext('','','','',''); + } + } } } } } } + +// ################################################################################ +// Submit the Pausa Code + function PauseCodeSelect_submit(newpausecode) + { + hideDiv('PausaCodeSelectBox'); + WaitingForNextStep=0; + + var xmlhttp=false; + /*@cc_on @*/ + /*@if (@_jscript_version >= 5) + // JScript gives us Conditional compilation, we can cope with old IE versions. + // and security blocked creation of the objects. + try { + xmlhttp = new ActiveXObject("Msxml2.XMLHTTP"); + } catch (e) { + try { + xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); + } catch (E) { + xmlhttp = false; + } + } + @end @*/ + if (!xmlhttp && typeof XMLHttpRequest!='undefined') + { + xmlhttp = new XMLHttpRequest(); + } + if (xmlhttp) + { + VMCpausecode_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=PausaCodeSubmit&format=text&status=" + newpausecode + "&agent_log_id=" + agent_log_id + "&campaign=" + campaign + "&extension=" + extension + "&protocol=" + protocol + "&phone_ip=" + phone_ip + "&enable_sipsak_messages=" + enable_sipsak_messages; + xmlhttp.open('POST', 'vdc_db_query.php'); + xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8'); + xmlhttp.send(VMCpausecode_query); + xmlhttp.onreadystatechange = function() + { + if (xmlhttp.readyState == 4 && xmlhttp.status == 200) + { + // alert(xmlhttp.responseText); + } + } + delete xmlhttp; + } + } + + + // ################################################################################ // Populate the dtmf and xfer number for each preset link in xfer-conf frame function DtMf_PreSet_a() @@ -4302,7 +4770,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} } if (xmlhttp) { - VMCoriginate_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=Originate&format=text&channel=" + originatevalue + "&queryCID=" + queryCID + "&exten=" + session_id + "&ext_context=" + ext_context + "&ext_priority=1"; + VMCoriginate_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=OriginateVDRelogin&format=text&channel=" + originatevalue + "&queryCID=" + queryCID + "&exten=" + session_id + "&ext_context=" + ext_context + "&ext_priority=1" + "&extension=" + extension + "&protocol=" + protocol + "&phone_ip=" + phone_ip + "&enable_sipsak_messages=" + enable_sipsak_messages + "&allow_sipsak_messages=" + allow_sipsak_messages + "&campaign=" + campaign; xmlhttp.open('POST', 'manager_send.php'); xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8'); xmlhttp.send(VMCoriginate_query); @@ -4489,7 +4957,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} } if (xmlhttp) { - VDlogout_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=userLOGout&format=text&user=" + user + "&pass=" + pass + "&campaign=" + campaign + "&conf_exten=" + session_id + "&extension=" + extension + "&protocol=" + protocol + "&no_delete_sessions=" + no_delete_sessions; + VDlogout_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=userLOGout&format=text&user=" + user + "&pass=" + pass + "&campaign=" + campaign + "&conf_exten=" + session_id + "&extension=" + extension + "&protocol=" + protocol + "&agent_log_id=" + agent_log_id + "&no_delete_sessions=" + no_delete_sessions + "&phone_ip=" + phone_ip + "&enable_sipsak_messages=" + enable_sipsak_messages; xmlhttp.open('POST', 'vdc_db_query.php'); xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8'); xmlhttp.send(VDlogout_query); @@ -4536,14 +5004,24 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} document.vicidial_form.inert_button.focus(); document.vicidial_form.inert_button.blur(); CustomerData_update(); - HKdispo_display = 4; - HKfinish=1; var HKdispo_ary = HKdispo.split(" ----- "); - document.getElementById("HotKeyDispo").innerHTML = HKdispo_ary[0] + " - " + HKdispo_ary[1]; - showDiv('HotKeyActionBox'); - hideDiv('HotKeyEntriesBox'); - document.vicidial_form.DispoSelection.value = HKdispo_ary[0]; - dialedcall_send_hangup('NO'); + if ( (HKdispo_ary[0] == 'ALTPH2') || (HKdispo_ary[0] == 'ADDR3') ) + { + if (document.vicidial_form.DiaLAltPhonE.checked==true) + { + dialedcall_send_hangup('NO', 'YES', HKdispo_ary[0]); + } + } + else + { + HKdispo_display = 4; + HKfinish=1; + document.getElementById("HotKeyDispo").innerHTML = HKdispo_ary[0] + " - " + HKdispo_ary[1]; + showDiv('HotKeyActionBox'); + hideDiv('HotKeyEntriesBox'); + document.vicidial_form.DispoSelection.value = HKdispo_ary[0]; + dialedcall_send_hangup('NO', 'YES', HKdispo_ary[0]); + } // DispoSelect_submit(); // AutoDialWaiting = 1; // AutoDial_ReSume_PauSe("VDADready"); @@ -4899,11 +5377,11 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} hideDiv('CBcommentsBox'); hideDiv('HotKeyActionBox'); hideDiv('HotKeyEntriesBox'); - hideDiv('MainXfeRBox'); hideDiv('MainPanel'); hideDiv('ScriptPanel'); hideDiv('DispoSelectBox'); hideDiv('LogouTBox'); + hideDiv('AgenTDisablEBoX'); hideDiv('CustomerGoneBox'); hideDiv('NoneInSessionBox'); hideDiv('WrapupBox'); @@ -4915,6 +5393,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} hideDiv('DispoButtonHideC'); hideDiv('CallBacKsLisTBox'); hideDiv('NeWManuaLDiaLBox'); + hideDiv('PausaCodeSelectBox'); if (agentonly_callbacks != '1') {hideDiv('CallbacksButtons');} // if ( (agentcall_manual != '1') && (starting_dial_level > 0) ) @@ -4930,6 +5409,15 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} {hideDiv('VolumeControlSpan');} document.vicidial_form.LeadLookuP.checked=true; + if (agent_pause_codes_active=='Y') + { + document.getElementById("PausaCodeLinkSpan").innerHTML = "IMPOSTI Un CODICE Di PAUSA"; + } + if (VICIDiaL_allow_closers < 1) + { + document.getElementById("InternalCloser").style.visibility = 'hidden'; + document.getElementById("LocalCloser").style.visibility = 'hidden'; + } document.getElementById("sessionIDspan").innerHTML = session_id; if ( (campaign_recording == 'NEVER') || (campaign_recording == 'ALLFORCE') ) { @@ -4962,6 +5450,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} if (wrapup_secondi > 0) { showDiv('WrapupBox'); + document.getElementById("WrapupTimer").innerHTML = wrapup_secondi; wrapup_waiting=1; } CustomerData_update(); @@ -4994,39 +5483,6 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} if ( (custchannellive < -30) && (lastcustchannel.length > 3) ) {CustomerChanneLGone();} if ( (custchannellive < -10) && (lastcustchannel.length > 3) ) {ReChecKCustoMerChaN();} if ( (nochannelinsession > 16) && (check_n > 15) ) {NoneInSession();} - if (wrapup_secondi > 0) - { - document.getElementById("WrapupTimer").innerHTML = (wrapup_secondi - wrapup_counter); - wrapup_counter++; - if ( (wrapup_counter > wrapup_secondi) && (document.getElementById("WrapupBox").style.visibility == 'visible') ) - { - wrapup_waiting=0; - hideDiv('WrapupBox'); - if (document.vicidial_form.DispoSelectStop.checked==true) - { - if (auto_dial_level != '0') - { - AutoDialWaiting = 0; - AutoDial_ReSume_PauSe("VDADpause","NO"); - // document.getElementById("DiaLControl").innerHTML = DiaLControl_auto_HTML; - } - VICIDiaL_pause_calling = 1; - if (dispo_check_all_pause != '1') - { - document.vicidial_form.DispoSelectStop.checked=false; - } - } - else - { - if (auto_dial_level != '0') - { - AutoDialWaiting = 1; - AutoDial_ReSume_PauSe("VDADready","NO"); - // document.getElementById("DiaLControl").innerHTML = DiaLControl_auto_HTML_ready; - } - } - } - } if (WaitingForNextStep==0) { // check for live channels in conference room and get current datetime @@ -5108,6 +5564,39 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} // parked_calls_display_refresh(); } } + if (wrapup_secondi > 0) + { + document.getElementById("WrapupTimer").innerHTML = (wrapup_secondi - wrapup_counter); + wrapup_counter++; + if ( (wrapup_counter > wrapup_secondi) && (document.getElementById("WrapupBox").style.visibility == 'visible') ) + { + wrapup_waiting=0; + hideDiv('WrapupBox'); + if (document.vicidial_form.DispoSelectStop.checked==true) + { + if (auto_dial_level != '0') + { + AutoDialWaiting = 0; + AutoDial_ReSume_PauSe("VDADpause","NO"); + // document.getElementById("DiaLControl").innerHTML = DiaLControl_auto_HTML; + } + VICIDiaL_pause_calling = 1; + if (dispo_check_all_pause != '1') + { + document.vicidial_form.DispoSelectStop.checked=false; + } + } + else + { + if (auto_dial_level != '0') + { + AutoDialWaiting = 1; + AutoDial_ReSume_PauSe("VDADready","NO"); + // document.getElementById("DiaLControl").innerHTML = DiaLControl_auto_HTML_ready; + } + } + } + } } } setTimeout("all_refresh()", refresh_interval); @@ -5165,6 +5654,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} if (Cmon == 9) {Cmon = "OTT";} if (Cmon == 10) {Cmon = "NOV";} if (Cmon == 11) {Cmon = "DIC";} + if (Chours == 12) {AMPM = 'PM';} if (Chours > 12) {Chours = (Chours - 12); AMPM = 'PM';} if (Cmin < 10) {Cmin = "0" + Cmin;} if (Csec < 10) {Csec = "0" + Csec;} @@ -5300,25 +5790,6 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} } } - - function showMainXfeR(divvar,taskxferchan,taskxferchanmain) - { - document.getElementById("MainXfeRBox").style.visibility = 'visible'; - getactiveext("MainXfeRBox"); - conference_list_display_refresh("MainXfeRconfContent"); - var XfeR_channel = taskxferchan; - document.vicidial_form.H_XfeR_channel.value = XfeR_channel; - document.vicidial_form.M_XfeR_channel.value = taskxferchanmain; - document.getElementById("MainXfeRChanneL").innerHTML = XfeR_channel; - } - function hideMainXfeR(divvar) - { - document.getElementById("MainXfeRBox").style.visibility = 'hidden'; - var XfeR_channel = ''; - document.vicidial_form.H_XfeR_channel.value = ''; - document.vicidial_form.M_XfeR_channel.value = ''; - document.getElementById("MainXfeRChanneL").innerHTML = ''; - } function conf_channels_detail(divvar) { if (divvar == 'SHOW') @@ -5360,6 +5831,10 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} { if (showxfervar == 'ON') { + var xfer_height = 310; + if (alt_phone_dialing>0) {xfer_height = (xfer_height + 20);} + if ( (auto_dial_level == 0) && (manual_dial_preview == 1) ) {xfer_height = (xfer_height + 20);} + document.getElementById("TransferMain").style.top = xfer_height; HKbutton_allowed = 0; showDiv('TransferMain'); document.getElementById("XferControl").innerHTML = "\"Trasferimento"; @@ -5428,17 +5903,13 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} - - @@ -5490,15 +5961,23 @@ echo "\n";

VICICHIAMA
- -Chiamata Manuale
+ +Chiamata Manuale       MANOPOLA VELOCE
- + X RICHIAMATE ATTIVE
- + +
+
+ + +
+
+ +
RICHIAMATE PER OPERATORE :
Click su a callback below to call the customer back now. If you click su a record below to call it, it will be removed from the list.
@@ -5509,7 +5988,7 @@ echo "\n";
- + - + @@ -5533,7 +6014,8 @@ echo "\n"; - +
NUOVA CHIAMATA MANUALE PER IL CONTATTO :

Inserisci le informazioni sotto per il nuovo contatto da chiamare.
\n";
  (E solitamente un 1 negli USA e Canada)
Telefono Number:   (12 digits max - digits only) +   (12 digits max - digits only) +
Cerca Contatti esistenti:   (Questa opzione tenterà di trovare il numero di telefono nel sistema prima di inserire un nuovo contatto)

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

Chiama Ora @@ -5557,6 +6039,7 @@ Vostro Status:
Calls Dialing:
+
Trasferimento - Conferenza
INTERNO PIU` VICINO @@ -5582,11 +6065,12 @@ Vostro Status:
Calls Dialing: Effettua il trasferimento cieco Blind Transfer VMail Message
+
- +
Contatto disposto come:

-
@@ -5594,7 +6078,7 @@ Vostro Status:
Calls Dialing:
- + @@ -5610,7 +6094,7 @@ Vostro Status:
Calls Dialing:
tasti funzione per la disposizione: Una volta attiva, premi sulla tastiera per la disposizione sulla chiamata sarà attaccata e disposta automaticamente:
- + @@ -5627,7 +6111,7 @@ Vostro Status:
Calls Dialing:
Le Informazioni Precedenti Di Chiamata ripetuta:
- +
Nessuno è nella vostra sessione:
Torna Indietro

@@ -5635,7 +6119,7 @@ Vostro Status:
Calls Dialing:
- +
Il cliente ha attaccato:
Torna Indietro

@@ -5644,7 +6128,7 @@ Vostro Status:
Calls Dialing:
- +
Chiamata tempo di pausa: secondi restanti prima di nuova chiamata



@@ -5653,23 +6137,28 @@ Vostro Status:
Calls Dialing:
- + +
La vostra sessione è stata inabilitata
LOGOUT

Torna Indietro +
+
+ +

LOGOUT
- +
- +
 
- +
Tutti i cambiamenti fatti sulle informazioni del cliente sotto non saranno effettuate, cambiare le informazioni prima di attaccare.
- +
DISPOSIZIONE CHIAMATA :       Attacca ancora       minimizza
Selezione di fine chiamata
@@ -5682,8 +6171,15 @@ Vostro Status:
Calls Dialing:
+ +
SELEZIONI Un CODICE Di PAUSA :
+ Pausa Code Selection + +

  +
+
- +
Selezionate una richiamata :
@@ -5726,7 +6222,7 @@ Vostro Status:
Calls Dialing:
- +
SELEZIONE DI GRUPPO INBOUND PIÙ VICINO
Selezione di Gruppo Inbound più vicino
@@ -5737,7 +6233,7 @@ Vostro Status:
Calls Dialing:
- + Canale Canale @@ -5747,25 +6243,8 @@ Vostro Status:
Calls Dialing: - - - - - - -
TRASFERIMENTO CHIAMATA ATTIVA
Canale trasferito: Canale
Interni:
Menu degli Interni
-
- Invia all` interno selezionato

- Invia alla VoiceMail selezionata

- Invia a questo numero :


- AGGIORNA


- Tornate alla schermata principale

-
Conferenze:
(Seleziona il numero sopra per inviarlo ad una conferenza)
Invia anche il mio canale
Menu Conferenza
-
- - - +
VICICHIAMA SCRIPT
@@ -5809,7 +6288,7 @@ IDENTIFICAZIONE Registrazione:
Disconnetti il cliente

-Trasmetta DTMF
+
Trasmetta DTMF

@@ -5851,14 +6331,18 @@ IDENTIFICAZIONE Registrazione:   Email: +\n";} + {echo "\n";} else - {echo "\n";} + {echo "\n";} ?> - + +
secondi:   Canale:   Tempo Di Cust:
Osservazioni: +
+
diff --git a/agc_2-X/trunk/LANG_www/agc_pl/conf_exten_check.php b/agc_2-X/trunk/LANG_www/agc_pl/conf_exten_check.php index 69eda1d4..3f4404c9 100644 --- a/agc_2-X/trunk/LANG_www/agc_pl/conf_exten_check.php +++ b/agc_2-X/trunk/LANG_www/agc_pl/conf_exten_check.php @@ -33,6 +33,7 @@ # 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 # 61128-2255 - Added update for manual dial vicidial_live_agents +# 70319-1542 - Added agent disabled display function # require("dbconnect.php"); @@ -69,8 +70,8 @@ if (!isset($format)) {$format="text";} if (!isset($ACTION)) {$ACTION="refresh";} if (!isset($client)) {$client="agc";} -$version = '0.0.10'; -$build = '61128-2255'; +$version = '0.0.11'; +$build = '70319-1542'; $StarTtime = date("U"); $NOW_DATE = date("Y-m-d"); $NOW_TIME = date("Y-m-d H:i:s"); @@ -144,6 +145,23 @@ echo " if ($client == 'vdc') { + $Acount=0; + $AexternalDEAD=0; + + ### see if the agent has a record in the vicidial_live_agents table + $stmt="SELECT count(*) 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); + $Acount=$row[0]; + + # ### find out if external table shows agent should be disabled + # $stmt="SELECT count(*) from another_table where user='$user' and status='DEAD';"; + # if ($DB) {echo "|$stmt|\n";} + # $rslt=mysql_query($stmt, $link); + # $row=mysql_fetch_row($rslt); + # $AexternalDEAD=$row[0]; + if ($auto_dial_level > 0) { ### update the vicidial_live_agents every second with a new random number so it is shown to be alive @@ -186,6 +204,9 @@ echo " } + if ($Acount < 1) {$Astatus='DEAD_VLA';} + if ($AexternalDEAD > 0) {$Astatus='DEAD_EXTERNAL';} + echo 'DateTime: ' . $NOW_TIME . '|UnixTime: ' . $StarTtime . '|Status: ' . $Astatus . '|CampCalls: ' . $RingCalls . "|\n"; } diff --git a/agc_2-X/trunk/LANG_www/agc_pl/manager_send.php b/agc_2-X/trunk/LANG_www/agc_pl/manager_send.php index 25f9b4d7..503a3315 100644 --- a/agc_2-X/trunk/LANG_www/agc_pl/manager_send.php +++ b/agc_2-X/trunk/LANG_www/agc_pl/manager_send.php @@ -1,7 +1,7 @@ LICENSE: GPLv2 +# Copyright (C) 2007 Matt Florell 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 @@ -12,7 +12,7 @@ # - $user # - $pass # optional variables: -# - $ACTION - ('Originate','Redirect','Hangup','Command','Monitor','StopMonitor','SysCIDOriginate','RedirectName','RedirectNameVmail','MonitorConf','StopMonitorConf','RedirectXtra','RedirectXtraCX','RedirectVD','HangupConfDial','VolumeControl') +# - $ACTION - ('Originate','Redirect','Hangup','Command','Monitor','StopMonitor','SysCIDOriginate','RedirectName','RedirectNameVmail','MonitorConf','StopMonitorConf','RedirectXtra','RedirectXtraCX','RedirectVD','HangupConfDial','VolumeControl','OriginateVDRelogin') # - $queryCID - ('CN012345678901234567',...) # - $format - ('text','debug') # - $channel - ('Zap/41-1','SIP/test101-1jut','IAX2/iaxy@iaxy',...) @@ -35,7 +35,7 @@ # - $stage - ('UP','DOWN') # -# changes +# CHANGELOG: # 50401-1002 - First build of script, Hangup function only # 50404-1045 - Redirect basic function enabled # 50406-1522 - Monitor basic function enabled @@ -64,6 +64,10 @@ # 61004-1526 - Added parsing of volume control command and lookup or number # 61130-1617 - Added lead_id to MonitorConf for recording_log # 61201-1115 - Added user to MonitorConf for recording_log +# 70111-1600 - added ability to use BLEND/INBND/*_C/*_B/*_I as closer campaigns +# 70226-1251 - Added Mute/UnMute to conference volume control +# 70320-1502 - Added option to allow retry of leave-3way-call and debug logging +# 70322-1636 - Added sipsak display ability # require("dbconnect.php"); @@ -123,6 +127,16 @@ if (isset($_GET["phone_number"])) {$phone_number=$_GET["phone_number"];} elseif (isset($_POST["phone_number"])) {$phone_number=$_POST["phone_number"];} if (isset($_GET["stage"])) {$stage=$_GET["stage"];} elseif (isset($_POST["stage"])) {$stage=$_POST["stage"];} +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["phone_ip"])) {$phone_ip=$_GET["phone_ip"];} + elseif (isset($_POST["phone_ip"])) {$phone_ip=$_POST["phone_ip"];} +if (isset($_GET["enable_sipsak_messages"])) {$enable_sipsak_messages=$_GET["enable_sipsak_messages"];} + elseif (isset($_POST["enable_sipsak_messages"])) {$enable_sipsak_messages=$_POST["enable_sipsak_messages"];} +if (isset($_GET["allow_sipsak_messages"])) {$allow_sipsak_messages=$_GET["allow_sipsak_messages"];} + elseif (isset($_POST["allow_sipsak_messages"])) {$allow_sipsak_messages=$_POST["allow_sipsak_messages"];} $user=ereg_replace("[^0-9a-zA-Z]","",$user); $pass=ereg_replace("[^0-9a-zA-Z]","",$pass); @@ -133,8 +147,8 @@ if (!isset($ACTION)) {$ACTION="Originate";} if (!isset($format)) {$format="alert";} if (!isset($ext_priority)) {$ext_priority="1";} -$version = '2.0.27'; -$build = '61130-1617'; +$version = '2.0.29'; +$build = '70320-1502'; $StarTtime = date("U"); $NOW_DATE = date("Y-m-d"); $NOW_TIME = date("Y-m-d H:i:s"); @@ -279,6 +293,21 @@ if ($ACTION=="OriginateNameVmail") } } +if ($ACTION=="OriginateVDRelogin") +{ + if ( ($enable_sipsak_messages > 0) and ($allow_sipsak_messages > 0) and (eregi("SIP",$protocol)) ) + { + $CIDdate = date("ymdHis"); + $DS='-'; + $SIPSAK_prefix = 'LIN-'; + print "\n"; + passthru("/usr/local/bin/sipsak -M -O desktop -B \"$SIPSAK_prefix$campaign\" -r 5060 -s sip:$extension@$phone_ip > /dev/null"); + $queryCID = "$SIPSAK_prefix$campaign$DS$CIDdate"; + + } + $ACTION="Originate"; +} + if ($ACTION=="Originate") { if ( (strlen($exten)<1) or (strlen($channel)<1) or (strlen($ext_context)<1) or (strlen($queryCID)<10) ) @@ -430,7 +459,7 @@ if ($ACTION=="RedirectVD") else { if (strlen($call_server_ip)>6) {$server_ip = $call_server_ip;} - if (eregi("CLOSER",$campaign)) + if (eregi("(CLOSER|BLEND|INBND|_C$|_B$|_I$)",$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";} @@ -560,6 +589,7 @@ if ($ACTION=="RedirectNameVmail") if ($ACTION=="RedirectXtraCX") { + $DBout=''; $row=''; $rowx=''; $channel_liveX=1; $channel_liveY=1; @@ -575,6 +605,15 @@ if ($ACTION=="RedirectXtraCX") echo "ext_context $ext_context musi być ustawiony\n"; echo "ext_priority $ext_priority musi być ustawiony\n"; echo "\nRedirect Action nie wysłano\n"; + if (ereg("SECOND|FIRST|DEBUG",$filename)) + { + if ($WeBRooTWritablE > 0) + { + $fp = fopen ("./vicidial_debug.txt", "a"); + fwrite ($fp, "$NOW_TIME|RDCXC|$filename|$user|$campaign|$$channel|$extrachannel|$queryCID|$exten|$ext_context|ext_priority|\n"); + fclose($fp); + } + } } else { @@ -594,6 +633,7 @@ if ($ACTION=="RedirectXtraCX") { $channel_liveX=0; echo "Kanał $channel nie jest aktywna na $call_server_ip, Redirect komenda nie wstawiona\n"; + if (ereg("SECOND|FIRST|DEBUG",$filename)) {$DBout .= "$channel nie jest aktywna na $call_server_ip";} } } $stmt="SELECT count(*) FROM live_channels where server_ip = '$server_ip' and channel='$extrachannel';"; @@ -610,6 +650,7 @@ if ($ACTION=="RedirectXtraCX") { $channel_liveY=0; echo "Kanał $channel nie jest aktywna na $server_ip, Redirect komenda nie wstawiona\n"; + if (ereg("SECOND|FIRST|DEBUG",$filename)) {$DBout .= "$channel nie jest aktywna na $server_ip";} } } if ( ($channel_liveX==1) && ($channel_liveY==1) ) @@ -622,6 +663,7 @@ if ($ACTION=="RedirectXtraCX") { $channel_liveY=0; echo "No Local agent to send call to, Redirect komenda nie wstawiona\n"; + if (ereg("SECOND|FIRST|DEBUG",$filename)) {$DBout .= "No Local agent to send call to";} } else { @@ -654,6 +696,7 @@ if ($ACTION=="RedirectXtraCX") $rslt=mysql_query($stmt, $link); echo "RedirectXtraCX komenda wysłana do Kanał $channel na $call_server_ip and \nHungup $extrachannel na $server_ip\n"; + if (ereg("SECOND|FIRST|DEBUG",$filename)) {$DBout .= "$channel na $call_server_ip, Hungup $extrachannel na $server_ip";} } } else @@ -662,8 +705,19 @@ if ($ACTION=="RedirectXtraCX") {$ACTION="Redirect"; $server_ip = $call_server_ip;} if ($channel_liveY==1) {$ACTION="Redirect"; $channel=$extrachannel;} - + if (ereg("SECOND|FIRST|DEBUG",$filename)) {$DBout .= "Changed to Redirect: $channel na $server_ip";} } + + if (ereg("SECOND|FIRST|DEBUG",$filename)) + { + if ($WeBRooTWritablE > 0) + { + $fp = fopen ("./vicidial_debug.txt", "a"); + fwrite ($fp, "$NOW_TIME|RDCXC|$filename|$user|$campaign|$DBout|\n"); + fclose($fp); + } + } + } } @@ -688,6 +742,15 @@ if ($ACTION=="RedirectXtra") echo "ext_context $ext_context musi być ustawiony\n"; echo "ext_priority $ext_priority musi być ustawiony\n"; echo "\nRedirect Action nie wysłano\n"; + if (ereg("SECOND|FIRST|DEBUG",$filename)) + { + if ($WeBRooTWritablE > 0) + { + $fp = fopen ("./vicidial_debug.txt", "a"); + fwrite ($fp, "$NOW_TIME|RDX|$filename|$user|$campaign|$$channel|$extrachannel|$queryCID|$exten|$ext_context|ext_priority|\n"); + fclose($fp); + } + } } else { @@ -708,6 +771,7 @@ if ($ACTION=="RedirectXtra") { $channel_liveX=0; echo "Nie mogę znaleźć wolnej konferencji na $server_ip, Redirect komenda nie wstawiona\n"; + if (ereg("SECOND|FIRST|DEBUG",$filename)) {$DBout .= "Nie mogę znaleźć wolnej konferencji na $server_ip";} } } @@ -717,7 +781,7 @@ if ($ACTION=="RedirectXtra") if ($format=='debug') {echo "\n";} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); - if ($row[0]==0) + if ( ($row[0]==0) && (!ereg("SECOND",$filename)) ) { $stmt="SELECT count(*) FROM live_sip_channels where server_ip = '$call_server_ip' and channel='$channel';"; if ($format=='debug') {echo "\n";} @@ -727,13 +791,14 @@ if ($ACTION=="RedirectXtra") { $channel_liveX=0; echo "Kanał $channel nie jest aktywna na $call_server_ip, Redirect komenda nie wstawiona\n"; + if (ereg("SECOND|FIRST|DEBUG",$filename)) {$DBout .= "$channel nie jest aktywna na $call_server_ip";} } } $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) + if ( ($row[0]==0) && (!ereg("SECOND",$filename)) ) { $stmt="SELECT count(*) FROM live_sip_channels where server_ip = '$server_ip' and channel='$extrachannel';"; if ($format=='debug') {echo "\n";} @@ -743,6 +808,7 @@ if ($ACTION=="RedirectXtra") { $channel_liveY=0; echo "Kanał $channel nie jest aktywna na $server_ip, Redirect komenda nie wstawiona\n"; + if (ereg("SECOND|FIRST|DEBUG",$filename)) {$DBout .= "$channel nie jest aktywna na $server_ip";} } } if ( ($channel_liveX==1) && ($channel_liveY==1) ) @@ -754,6 +820,7 @@ if ($ACTION=="RedirectXtra") $rslt=mysql_query($stmt, $link); echo "RedirectXtra komenda wysłana do Kanał $channel and \nExtraKanał $extrachannel\n to $exten na $server_ip\n"; + if (ereg("SECOND|FIRST|DEBUG",$filename)) {$DBout .= "$channel and $extrachannel to $exten na $server_ip";} } else { @@ -778,6 +845,7 @@ if ($ACTION=="RedirectXtra") $rslt=mysql_query($stmt, $link); echo "RedirectXtra komenda wysłana do Kanał $channel na $call_server_ip and \nExtraKanał $extrachannel\n to $exten na $server_ip\n"; + if (ereg("SECOND|FIRST|DEBUG",$filename)) {$DBout .= "$channel/$call_server_ip and $extrachannel/$server_ip to $exten";} } } else @@ -788,6 +856,17 @@ if ($ACTION=="RedirectXtra") {$ACTION="Redirect"; $channel=$extrachannel;} } + + if (ereg("SECOND|FIRST|DEBUG",$filename)) + { + if ($WeBRooTWritablE > 0) + { + $fp = fopen ("./vicidial_debug.txt", "a"); + fwrite ($fp, "$NOW_TIME|RDX|$filename|$user|$campaign|$DBout|\n"); + fclose($fp); + } + } + } } } @@ -1018,8 +1097,10 @@ if ($ACTION=="VolumeControl") else { $participant_number='XXYYXXYYXXYYXX'; + if (eregi('UP',$stage)) {$vol_prefix='4';} if (eregi('DOWN',$stage)) {$vol_prefix='3';} - else {$vol_prefix='4';} + if (eregi('UNMUTE',$stage)) {$vol_prefix='2';} + if (eregi('MUTING',$stage)) {$vol_prefix='1';} $local_DEF = 'Local/'; $local_AMP = '@'; $volume_local_channel = "$local_DEF$participant_number$vol_prefix$exten$local_AMP$ext_context"; diff --git a/agc_2-X/trunk/LANG_www/agc_pl/vdc_db_query.php b/agc_2-X/trunk/LANG_www/agc_pl/vdc_db_query.php index 7c6ee7fd..fcf7fb68 100644 --- a/agc_2-X/trunk/LANG_www/agc_pl/vdc_db_query.php +++ b/agc_2-X/trunk/LANG_www/agc_pl/vdc_db_query.php @@ -1,7 +1,7 @@ LICENSE: GPLv2 +# Copyright (C) 2007 Matt Florell 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 @@ -13,7 +13,7 @@ # - $pass # optional variables: # - $format - ('text','debug') -# - $ACTION - ('regCLOSER','manDiaLnextCALL','manDiaLskip','manDiaLonly','manDiaLlookCALL','manDiaLlogCALL','userLOGout','updateDISPO','VDADpause','VDADready','VDADcheckINCOMING','UpdatEFavoritEs','CalLBacKLisT','CalLBacKCounT') +# - $ACTION - ('regCLOSER','manDiaLnextCALL','manDiaLskip','manDiaLonly','manDiaLlookCALL','manDiaLlogCALL','userLOGout','updateDISPO','VDADpause','VDADready','VDADcheckINCOMING','UpdatEFavoritEs','CalLBacKLisT','CalLBacKCounT','PauseCodeSubmit') # - $stage - ('start','finish','lookup','new') # - $closer_choice - ('CL_TESTCAMP_L CL_OUT123_L -') # - $conf_exten - ('8600011',...) @@ -70,7 +70,7 @@ # - $omit_phone_code - ('Y','N') # - $no_delete_sessions - ('0','1') -# changes +# CHANGELOG: # 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 @@ -101,7 +101,7 @@ # - 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 +# 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 @@ -110,10 +110,28 @@ # 60821-1647 - Added ability to not delete sessions at logout # 60906-1124 - Added lookup and sending of callback data for CALLBK calls # 61128-2229 - Added vicidial_live_agents and vicidial_auto_calls manual dial entries +# 70111-1600 - Added ability to use BLEND/INBND/*_C/*_B/*_I as closer campaigns +# 70115-1733 - Added alt_dial functionality in auto-dial modes +# 70118-1501 - Added user_group to vicidial_log,_agent_log,_closer_log,_callbacks +# 70123-1357 - Fixed bug that would not update vicidial_closer_log status to dispo +# 70202-1438 - Added pause code submit function +# 70203-0930 - Added dialed_number to lead info output +# 70203-1030 - Added dialed_label to lead info output +# 70206-1126 - Added INBOUND status for inbound/closer calls in vicidial_live_agents +# 70212-1253 - Fixed small issue with CXFER +# 70213-1431 - Added QueueMetrics PAUSE/UNPAUSE/AGENTLOGIN/AGENTLOGOFF actions +# 70214-1231 - Added queuemetrics_log_id field for server_id in queue_log +# 70215-1210 - Added queuemetrics COMPLETEAGENT action +# 70216-1051 - Fixed double call complete queuemetrics logging +# 70222-1616 - Changed queue_log PAUSE/UNPAUSE to PAUSEALL/UNPAUSEALL +# 70309-1034 - Allow amphersands and questions marks in comments to pass through +# 70313-1052 - Allow pound signs(hash) in comments to pass through +# 70319-1544 - Added agent disable update customer data function +# 70322-1545 - Added sipsak display ability # -$version = '2.0.38'; -$build = '61128-2229'; +$version = '2.0.55'; +$build = '70322-1545'; require("dbconnect.php"); @@ -240,6 +258,10 @@ if (isset($_GET["use_internal_dnc"])) {$use_internal_dnc=$_GET["use_internal_d elseif (isset($_POST["use_internal_dnc"])) {$use_internal_dnc=$_POST["use_internal_dnc"];} if (isset($_GET["omit_phone_code"])) {$omit_phone_code=$_GET["omit_phone_code"];} elseif (isset($_POST["omit_phone_code"])) {$omit_phone_code=$_POST["omit_phone_code"];} +if (isset($_GET["phone_ip"])) {$phone_ip=$_GET["phone_ip"];} + elseif (isset($_POST["phone_ip"])) {$phone_ip=$_POST["phone_ip"];} +if (isset($_GET["enable_sipsak_messages"])) {$enable_sipsak_messages=$_GET["enable_sipsak_messages"];} + elseif (isset($_POST["enable_sipsak_messages"])) {$enable_sipsak_messages=$_POST["enable_sipsak_messages"];} $user=ereg_replace("[^0-9a-zA-Z]","",$user); @@ -261,6 +283,7 @@ $CIDdate = date("mdHis"); $ENTRYdate = date("YmdHis"); if (!isset($query_date)) {$query_date = $NOW_DATE;} $MT[0]=''; +$agents='@agents'; $stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;"; if ($DB) {echo "|$stmt|\n";} @@ -375,7 +398,7 @@ if ($ACTION == 'manDiaLnextCaLL') 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) ) + if ( (strlen($callback_id)>0) and (strlen($lead_id)>0) ) { $affected_rows=1; $CBleadIDset=1; @@ -421,7 +444,7 @@ if ($ACTION == 'manDiaLnextCaLL') if ($DB) {echo "$stmt\n";} $rslt=mysql_query($stmt, $link); $affected_rows = mysql_affected_rows($link); - $lead_id = mysql_insert_id(); + $lead_id = mysql_insert_id($link); $CBleadIDset=1; } } @@ -432,7 +455,7 @@ if ($ACTION == 'manDiaLnextCaLL') if ($DB) {echo "$stmt\n";} $rslt=mysql_query($stmt, $link); $affected_rows = mysql_affected_rows($link); - $lead_id = mysql_insert_id(); + $lead_id = mysql_insert_id($link); $CBleadIDset=1; } } @@ -535,7 +558,7 @@ if ($ACTION == 'manDiaLnextCaLL') $rslt=mysql_query($stmt, $link); } - $stmt="UPDATE vicidial_agent_log set lead_id='$lead_id' where agent_log_id='$agent_log_id';"; + $stmt="UPDATE vicidial_agent_log set lead_id='$lead_id',comments='MANUAL' where agent_log_id='$agent_log_id';"; if ($format=='debug') {echo "\n";} $rslt=mysql_query($stmt, $link); @@ -579,7 +602,7 @@ if ($ACTION == 'manDiaLnextCaLL') $rslt=mysql_query($stmt, $link); ### update the agent status to INCALL in vicidial_live_agents - $stmt = "UPDATE vicidial_live_agents set status='INCALL',last_call_time='$NOW_TIME',callerid='$MqueryCID',lead_id='$lead_id' where user='$user' and server_ip='$server_ip';"; + $stmt = "UPDATE vicidial_live_agents set status='INCALL',last_call_time='$NOW_TIME',callerid='$MqueryCID',lead_id='$lead_id',comments='MANUAL' where user='$user' and server_ip='$server_ip';"; if ($DB) {echo "$stmt\n";} $rslt=mysql_query($stmt, $link); } @@ -619,6 +642,8 @@ if ($ACTION == 'manDiaLnextCaLL') $LeaD_InfO .= $CBcallback_time . "\n"; $LeaD_InfO .= $CBuser . "\n"; $LeaD_InfO .= $CBcomments . "\n"; + $LeaD_InfO .= $phone_number . "\n"; + $LeaD_InfO .= "MAIN\n"; echo $LeaD_InfO; @@ -716,7 +741,7 @@ if ($ACTION == 'manDiaLonly') $rslt=mysql_query($stmt, $link); ### update the agent status to INCALL in vicidial_live_agents - $stmt = "UPDATE vicidial_live_agents set status='INCALL',last_call_time='$NOW_TIME',callerid='$MqueryCID',lead_id='$lead_id' where user='$user' and server_ip='$server_ip';"; + $stmt = "UPDATE vicidial_live_agents set status='INCALL',last_call_time='$NOW_TIME',callerid='$MqueryCID',lead_id='$lead_id',comments='MANUAL' where user='$user' and server_ip='$server_ip';"; if ($DB) {echo "$stmt\n";} $rslt=mysql_query($stmt, $link); @@ -795,8 +820,18 @@ if ($stage == "start") } else { + $user_group=''; + $stmt="SELECT user_group FROM vicidial_users where user='$user' LIMIT 1;"; + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $ug_record_ct = mysql_num_rows($rslt); + if ($ug_record_ct > 0) + { + $row=mysql_fetch_row($rslt); + $user_group = trim("$row[0]"); + } ##### 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');"; + $stmt="INSERT INTO vicidial_log (uniqueid,lead_id,list_id,campaign_id,call_date,start_epoch,status,phone_code,phone_number,user,comments,processed,user_group) values('$uniqueid','$lead_id','$list_id','$campaign','$NOW_TIME','$StarTtime','INCALL','$phone_code','$phone_number','$user','MANUAL','N','$user_group');"; if ($DB) {echo "$stmt\n";} $rslt=mysql_query($stmt, $link); $affected_rows = mysql_affected_rows($link); @@ -844,10 +879,10 @@ if ($stage == "end") { if ($start_epoch < 1000) { - if (eregi("CLOSER",$campaign)) + if (eregi("(CLOSER|BLEND|INBND|_C$|_B$|_I$)",$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';"; + $stmt="SELECT start_epoch FROM vicidial_closer_log where phone_number='$phone_number' and lead_id='$lead_id' and user='$user' order by closecallid desc limit 1;"; } else { @@ -870,32 +905,249 @@ if ($stage == "end") } else {$length_in_sec = ($StarTtime - $start_epoch);} - if (eregi("CLOSER",$campaign)) + if (eregi("(CLOSER|BLEND|INBND|_C$|_B$|_I$)",$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); } + + ############################################# + ##### START QUEUEMETRICS LOGGING LOOKUP ##### + $stmt = "SELECT enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_log_id FROM system_settings;"; + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $qm_conf_ct = mysql_num_rows($rslt); + $i=0; + while ($i < $qm_conf_ct) + { + $row=mysql_fetch_row($rslt); + $enable_queuemetrics_logging = $row[0]; + $queuemetrics_server_ip = $row[1]; + $queuemetrics_dbname = $row[2]; + $queuemetrics_login = $row[3]; + $queuemetrics_pass = $row[4]; + $queuemetrics_log_id = $row[5]; + $i++; + } + ##### END QUEUEMETRICS LOGGING LOOKUP ##### + ########################################### + if ($auto_dial_level > 0) { + ### check to see if campaign has alt_dial enabled + $stmt="SELECT auto_alt_dial FROM vicidial_campaigns where campaign_id='$campaign';"; + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $VAC_mancall_ct = mysql_num_rows($rslt); + if ($VAC_mancall_ct > 0) + { + $row=mysql_fetch_row($rslt); + $auto_alt_dial =$row[0]; + } + else {$auto_alt_dial = 'NONE';} + if (eregi("(ALT_ONLY|ADDR3_ONLY|ALT_AND_ADDR3)",$auto_alt_dial)) + { + ### check to see if lead should be alt_dialed + $stmt="SELECT alt_dial FROM vicidial_auto_calls where lead_id='$lead_id';"; + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $VAC_mancall_ct = mysql_num_rows($rslt); + if ($VAC_mancall_ct > 0) + { + $row=mysql_fetch_row($rslt); + $alt_dial =$row[0]; + } + else {$alt_dial = 'NONE';} + + if ( (eregi("(NONE|MAIN)",$alt_dial)) and (eregi("(ALT_ONLY|ALT_AND_ADDR3)",$auto_alt_dial)) ) + { + $stmt="SELECT alt_phone,gmt_offset_now,state FROM vicidial_list where lead_id='$lead_id';"; + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $VAC_mancall_ct = mysql_num_rows($rslt); + if ($VAC_mancall_ct > 0) + { + $row=mysql_fetch_row($rslt); + $alt_phone = $row[0]; + $alt_phone = eregi_replace("[^0-9]","",$alt_phone); + $gmt_offset_now = $row[1]; + $state = $row[2]; + } + else {$alt_phone = '';} + if (strlen($alt_phone)>5) + { + ### insert record into vicidial_hopper for address3 call attempt + $stmt = "INSERT INTO vicidial_hopper SET lead_id='$lead_id',campaign_id='$campaign',status='HOLD',list_id='$list_id',gmt_offset_now='$gmt_offset_now',state='$state',alt_dial='ALT',user='';"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + } + } + if ( ( (eregi("(ALT)",$alt_dial)) and (eregi("ALT_AND_ADDR3",$auto_alt_dial)) ) or ( (eregi("(NONE|MAIN)",$alt_dial)) and (eregi("ADDR3_ONLY",$auto_alt_dial)) ) ) + { + $stmt="SELECT address3,gmt_offset_now,state FROM vicidial_list where lead_id='$lead_id';"; + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $VAC_mancall_ct = mysql_num_rows($rslt); + if ($VAC_mancall_ct > 0) + { + $row=mysql_fetch_row($rslt); + $address3 = $row[0]; + $address3 = eregi_replace("[^0-9]","",$address3); + $gmt_offset_now = $row[1]; + $state = $row[2]; + } + else {$address3 = '';} + if (strlen($address3)>5) + { + ### insert record into vicidial_hopper for address3 call attempt + $stmt = "INSERT INTO vicidial_hopper SET lead_id='$lead_id',campaign_id='$campaign',status='HOLD',list_id='$list_id',gmt_offset_now='$gmt_offset_now',state='$state',alt_dial='ADDR3',user='';"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + } + } + } + + if ($enable_queuemetrics_logging > 0) + { + ### check to see if lead should be alt_dialed + $stmt="SELECT auto_call_id,lead_id,phone_number,status,campaign_id,phone_code,alt_dial,stage,callerid,uniqueid from vicidial_auto_calls where lead_id='$lead_id';"; + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $VAC_qm_ct = mysql_num_rows($rslt); + if ($VAC_qm_ct > 0) + { + $row=mysql_fetch_row($rslt); + $auto_call_id = $row[0]; + $CLlead_id = $row[1]; + $CLphone_number = $row[2]; + $CLstatus = $row[3]; + $CLcampaign_id = $row[4]; + $CLphone_code = $row[5]; + $CLalt_dial = $row[6]; + $CLstage = $row[7]; + $CLcallerid = $row[8]; + $CLuniqueid = $row[9]; + } + + $CLstage = preg_replace("/.*-/",'',$CLstage); + if (strlen($CLstage) < 1) {$CLstage=0;} + + $linkB=mysql_connect("$queuemetrics_server_ip", "$queuemetrics_login", "$queuemetrics_pass"); + mysql_select_db("$queuemetrics_dbname", $linkB); + + $stmt="SELECT count(*) from queue_log where call_id='$MDnextCID' and verb='COMPLETECALLER';"; + $rslt=mysql_query($stmt, $linkB); + if ($DB) {echo "$stmt\n";} + $VAC_cc_ct = mysql_num_rows($rslt); + if ($VAC_cc_ct > 0) + { + $row=mysql_fetch_row($rslt); + $caller_complete = $row[0]; + } + + if ($caller_complete < 1) + { + $stmt = "INSERT INTO queue_log SET partition='P01',time_id='$StarTtime',call_id='$MDnextCID',queue='$campaign',agent='Agent/$user',verb='COMPLETEAGENT',data1='$CLstage',data2='$length_in_sec',data3='1',serverid='$queuemetrics_log_id';"; + if ($DB) {echo "$stmt\n";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $linkB); + $affected_rows = mysql_affected_rows($linkB); + } + mysql_close($linkB); + } + ### delete call record from vicidial_auto_calls - $stmt = "DELETE from vicidial_auto_calls where uniqueid='$uniqueid';"; + $stmt = "DELETE from vicidial_auto_calls where lead_id='$lead_id';"; 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';"; + + $stmt = "UPDATE vicidial_live_agents set status='PAUSED',lead_id='',uniqueid=0,callerid='',channel='',call_server_ip='',last_call_finish='$NOW_TIME',comments='' where user='$user' and server_ip='$server_ip';"; if ($DB) {echo "$stmt\n";} $rslt=mysql_query($stmt, $link); + $affected_rows = mysql_affected_rows($link); + if ($affected_rows > 0) + { + if ($enable_queuemetrics_logging > 0) + { + $linkB=mysql_connect("$queuemetrics_server_ip", "$queuemetrics_login", "$queuemetrics_pass"); + mysql_select_db("$queuemetrics_dbname", $linkB); + + $stmt = "INSERT INTO queue_log SET partition='P01',time_id='$StarTtime',call_id='NONE',queue='NONE',agent='Agent/$user',verb='PRZERWAALL',serverid='$queuemetrics_log_id';"; + if ($DB) {echo "$stmt\n";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $linkB); + $affected_rows = mysql_affected_rows($linkB); + + mysql_close($linkB); + } + } } else { + if ($enable_queuemetrics_logging > 0) + { + ### check to see if lead should be alt_dialed + $stmt="SELECT auto_call_id,lead_id,phone_number,status,campaign_id,phone_code,alt_dial,stage,callerid,uniqueid from vicidial_auto_calls where lead_id='$lead_id';"; + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $VAC_qm_ct = mysql_num_rows($rslt); + if ($VAC_qm_ct > 0) + { + $row=mysql_fetch_row($rslt); + $auto_call_id = $row[0]; + $CLlead_id = $row[1]; + $CLphone_number = $row[2]; + $CLstatus = $row[3]; + $CLcampaign_id = $row[4]; + $CLphone_code = $row[5]; + $CLalt_dial = $row[6]; + $CLstage = $row[7]; + $CLcallerid = $row[8]; + $CLuniqueid = $row[9]; + } + + $CLstage = preg_replace("/XFER|-/",'',$CLstage); + if ($CLstage < 0.25) {$CLstage=0;} + + $linkB=mysql_connect("$queuemetrics_server_ip", "$queuemetrics_login", "$queuemetrics_pass"); + mysql_select_db("$queuemetrics_dbname", $linkB); + + $stmt = "INSERT INTO queue_log SET partition='P01',time_id='$StarTtime',call_id='$MDnextCID',queue='$campaign',agent='Agent/$user',verb='COMPLETEAGENT',data1='$CLstage',data2='$length_in_sec',data3='1',serverid='$queuemetrics_log_id';"; + if ($DB) {echo "$stmt\n";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $linkB); + $affected_rows = mysql_affected_rows($linkB); + + mysql_close($linkB); + } + $stmt = "DELETE from vicidial_auto_calls lead_id='$lead_id';"; 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';"; + $stmt = "UPDATE vicidial_live_agents set status='PAUSED',lead_id='',uniqueid=0,callerid='',channel='',call_server_ip='',last_call_finish='$NOW_TIME',comments='' where user='$user' and server_ip='$server_ip';"; if ($DB) {echo "$stmt\n";} $rslt=mysql_query($stmt, $link); + $affected_rows = mysql_affected_rows($link); + if ($affected_rows > 0) + { + if ($enable_queuemetrics_logging > 0) + { + $linkB=mysql_connect("$queuemetrics_server_ip", "$queuemetrics_login", "$queuemetrics_pass"); + mysql_select_db("$queuemetrics_dbname", $linkB); + + $stmt = "INSERT INTO queue_log SET partition='P01',time_id='$StarTtime',call_id='NONE',queue='NONE',agent='Agent/$user',verb='PRZERWAALL',serverid='$queuemetrics_log_id';"; + if ($DB) {echo "$stmt\n";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $linkB); + $affected_rows = mysql_affected_rows($linkB); + + mysql_close($linkB); + } + } } ##### look for the channel in the UPDATED vicidial_manager record of the call initiation @@ -1095,7 +1347,7 @@ if ($ACTION == 'VDADcheckINCOMING') 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';"; + $stmt = "UPDATE vicidial_live_agents set status='INCALL',last_call_time='$NOW_TIME',comments='AUTO' where user='$user' and server_ip='$server_ip';"; if ($DB) {echo "$stmt\n";} $rslt=mysql_query($stmt, $link); @@ -1163,25 +1415,37 @@ if ($ACTION == 'VDADcheckINCOMING') $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';"; + $user_group=''; + $stmt="SELECT user_group FROM vicidial_users where user='$user' LIMIT 1;"; + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $ug_record_ct = mysql_num_rows($rslt); + if ($ug_record_ct > 0) + { + $row=mysql_fetch_row($rslt); + $user_group = trim("$row[0]"); + } + $stmt = "UPDATE vicidial_log set user='$user', comments='AUTO', list_id='$list_id', status='INCALL', user_group='$user_group' where lead_id='$lead_id' and uniqueid='$uniqueid';"; if ($DB) {echo "$stmt\n";} $rslt=mysql_query($stmt, $link); - if (eregi("CLOSER",$campaign)) + if (eregi("(CLOSER|BLEND|INBND|_C$|_B$|_I$)",$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;"; + $stmt = "UPDATE vicidial_closer_log set user='$user', comments='AUTO', list_id='$list_id', status='INCALL', user_group='$user_group' 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;"; + $stmt = "select campaign_id,phone_number,alt_dial 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) + if ($VDAC_cid_ct > 0) { $row=mysql_fetch_row($rslt); $VDADchannel_group =$row[0]; + $dialed_number =$row[1]; + $dialed_label =$row[2]; } $stmt = "select count(*) from vicidial_log where lead_id='$lead_id' and uniqueid='$uniqueid';"; @@ -1211,6 +1475,11 @@ if ($ACTION == 'VDADcheckINCOMING') $VDCL_xferconf_a_number = $row[11]; $VDCL_xferconf_b_dtmf = $row[12]; $VDCL_xferconf_b_number = $row[13]; + + ### update the comments in vicidial_live_agents record + $stmt = "UPDATE vicidial_live_agents set comments='INBOUND' where user='$user' and server_ip='$server_ip';"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); } else { @@ -1263,6 +1532,17 @@ if ($ACTION == 'VDADcheckINCOMING') $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"; + + $stmt = "select phone_number,alt_dial 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 ($VDAC_cid_ct > 0) + { + $row=mysql_fetch_row($rslt); + $dialed_number =$row[0]; + $dialed_label =$row[1]; + } } $comments = eregi_replace("\r",'',$comments); @@ -1300,6 +1580,8 @@ if ($ACTION == 'VDADcheckINCOMING') $LeaD_InfO .= $CBcallback_time . "\n"; $LeaD_InfO .= $CBuser . "\n"; $LeaD_InfO .= $CBcomments . "\n"; + $LeaD_InfO .= $dialed_number . "\n"; + $LeaD_InfO .= $dialed_label . "\n"; echo $LeaD_InfO; @@ -1327,6 +1609,7 @@ if ($ACTION == 'VDADcheckINCOMING') if ($format=='debug') {echo "\n";} $rslt=mysql_query($stmt, $link); } + } else { @@ -1354,8 +1637,18 @@ if ( (strlen($campaign)<1) || (strlen($conf_exten)<1) ) } else { + $user_group=''; + $stmt="SELECT user_group FROM vicidial_users where user='$user' LIMIT 1;"; + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $ug_record_ct = mysql_num_rows($rslt); + if ($ug_record_ct > 0) + { + $row=mysql_fetch_row($rslt); + $user_group = trim("$row[0]"); + } ##### Insert a WYLOGUJ record into the user log - $stmt="INSERT INTO vicidial_user_log values('','$user','WYLOGUJ','$campaign','$NOW_TIME','$StarTtime');"; + $stmt="INSERT INTO vicidial_user_log (user,event,campaign_id,event_date,event_epoch,user_group) values('$user','WYLOGUJ','$campaign','$NOW_TIME','$StarTtime','$user_group');"; if ($DB) {echo "$stmt\n";} $rslt=mysql_query($stmt, $link); $vul_insert = mysql_affected_rows($link); @@ -1390,11 +1683,94 @@ else $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','','','','','','','','','');"; + $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Hangup','ULGH3459$StarTtime','Channel: $agent_channel','','','','','','','','','');"; if ($format=='debug') {echo "\n";} $rslt=mysql_query($stmt, $link); } + $pause_sec=0; + $stmt = "select pause_epoch,pause_sec,wait_epoch,talk_epoch,dispo_epoch 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) and (strlen($row[3]<5)) and (strlen($row[4]<5)) ) + { + $row=mysql_fetch_row($rslt); + $pause_sec = (($StarTtime - $row[0]) + $row[1]); + + $stmt="UPDATE vicidial_agent_log set pause_sec='$pause_sec',wait_epoch='$StarTtime' where agent_log_id='$agent_log_id';"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + } + + if ($vla_delete > 0) + { + ############################################# + ##### START QUEUEMETRICS LOGGING LOOKUP ##### + $stmt = "SELECT enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_log_id,allow_sipsak_messages FROM system_settings;"; + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $qm_conf_ct = mysql_num_rows($rslt); + $i=0; + while ($i < $qm_conf_ct) + { + $row=mysql_fetch_row($rslt); + $enable_queuemetrics_logging = $row[0]; + $queuemetrics_server_ip = $row[1]; + $queuemetrics_dbname = $row[2]; + $queuemetrics_login = $row[3]; + $queuemetrics_pass = $row[4]; + $queuemetrics_log_id = $row[5]; + $allow_sipsak_messages = $row[6]; + $i++; + } + ##### END QUEUEMETRICS LOGGING LOOKUP ##### + ########################################### + if ( ($enable_sipsak_messages > 0) and ($allow_sipsak_messages > 0) and (eregi("SIP",$protocol)) ) + { + $SIPSAK_message = 'LOGGED OUT'; + passthru("/usr/local/bin/sipsak -M -O desktop -B \"$SIPSAK_message\" -r 5060 -s sip:$extension@$phone_ip > /dev/null"); + } + + if ($enable_queuemetrics_logging > 0) + { + $linkB=mysql_connect("$queuemetrics_server_ip", "$queuemetrics_login", "$queuemetrics_pass"); + mysql_select_db("$queuemetrics_dbname", $linkB); + + # $stmt = "INSERT INTO queue_log SET partition='P01',time_id='$StarTtime',call_id='NONE',queue='$campaign',agent='Agent/$user',verb='PRZERWA',serverid='1';"; + # if ($DB) {echo "$stmt\n";} + # if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + # $rslt=mysql_query($stmt, $linkB); + # $affected_rows = mysql_affected_rows($linkB); + + $stmt = "SELECT time_id FROM queue_log where agent='Agent/$user' and verb='AGENTLOGIN' order by time_id desc limit 1;"; + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $linkB); + if ($DB) {echo "$stmt\n";} + echo "$stmt\n"; + $li_conf_ct = mysql_num_rows($rslt); + $i=0; + while ($i < $li_conf_ct) + { + $row=mysql_fetch_row($rslt); + $logintime = $row[0]; + $i++; + } + + $time_logged_in = ($StarTtime - $logintime); + if ($time_logged_in > 1000000) {$time_logged_in=1;} + + $stmt = "INSERT INTO queue_log SET partition='P01',time_id='$StarTtime',call_id='NONE',queue='$campaign',agent='Agent/$user',verb='AGENTLOGOFF',data1='$user$agents',data2='$time_logged_in',serverid='$queuemetrics_log_id';"; + if ($DB) {echo "$stmt\n";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $linkB); + $affected_rows = mysql_affected_rows($linkB); + + mysql_close($linkB); + } + } + echo "$vul_insert|$vc_remove|$vla_delete|$wcs_delete|$agent_channel\n"; } } @@ -1423,7 +1799,14 @@ if ($ACTION == 'updateDISPO') if ($format=='debug') {echo "\n";} $rslt=mysql_query($stmt, $link); - if ( ($use_internal_dnc=='Y') and ($dispo_choice=='DNC') ) + if (eregi("(CLOSER|BLEND|INBND|_C$|_B$|_I$)",$campaign)) + { + $stmt = "UPDATE vicidial_closer_log set status='$dispo_choice' where lead_id='$lead_id' and user='$user' order by closecallid desc limit 1;"; + if ($DB) {echo "$stmt\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";} @@ -1450,20 +1833,91 @@ if ($ACTION == 'updateDISPO') 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');"; + $user_group=''; + $stmt="SELECT user_group FROM vicidial_users where user='$user' LIMIT 1;"; + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $ug_record_ct = mysql_num_rows($rslt); + if ($ug_record_ct > 0) + { + $row=mysql_fetch_row($rslt); + $user_group = trim("$row[0]"); + } + + $stmt="INSERT INTO vicidial_agent_log (user,server_ip,event_time,campaign_id,pause_epoch,pause_sec,wait_epoch,user_group) values('$user','$server_ip','$NOW_TIME','$campaign','$StarTtime','0','$StarTtime','$user_group');"; if ($DB) {echo "$stmt\n";} $rslt=mysql_query($stmt, $link); $affected_rows = mysql_affected_rows($link); - $agent_log_id = mysql_insert_id(); + $agent_log_id = mysql_insert_id($link); ### RozmowaBACK 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');"; + $stmt="INSERT INTO vicidial_callbacks (lead_id,list_id,campaign_id,status,entry_time,callback_time,user,recipient,comments,user_group) values('$lead_id','$list_id','$campaign','ACTIVE','$NOW_TIME','$CallBackDatETimE','$user','$recipient','$comments','$user_group');"; if ($DB) {echo "$stmt\n";} $rslt=mysql_query($stmt, $link); } + $stmt="SELECT auto_alt_dial_statuses from vicidial_campaigns where campaign_id='$campaign';"; + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + + if ( ($auto_dial_level > 0) and (ereg(" $dispo_choice ",$row[0])) ) + { + $stmt = "select count(*) from vicidial_hopper where lead_id='$lead_id' and status='HOLD';"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + + if ($row[0] > 0) + { + $stmt="UPDATE vicidial_hopper set status='READY' where lead_id='$lead_id' and status='HOLD' limit 1;"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + } + } + else + { + $stmt="DELETE from vicidial_hopper where lead_id='$lead_id' and status='HOLD';"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + } + + ############################################# + ##### START QUEUEMETRICS LOGGING LOOKUP ##### + $stmt = "SELECT enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_log_id FROM system_settings;"; + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $qm_conf_ct = mysql_num_rows($rslt); + $i=0; + while ($i < $qm_conf_ct) + { + $row=mysql_fetch_row($rslt); + $enable_queuemetrics_logging = $row[0]; + $queuemetrics_server_ip = $row[1]; + $queuemetrics_dbname = $row[2]; + $queuemetrics_login = $row[3]; + $queuemetrics_pass = $row[4]; + $queuemetrics_log_id = $row[5]; + $i++; + } + ##### END QUEUEMETRICS LOGGING LOOKUP ##### + ########################################### + if ($enable_queuemetrics_logging > 0) + { + $linkB=mysql_connect("$queuemetrics_server_ip", "$queuemetrics_login", "$queuemetrics_pass"); + mysql_select_db("$queuemetrics_dbname", $linkB); + + $stmt = "INSERT INTO queue_log SET partition='P01',time_id='$StarTtime',call_id='$MDnextCID',queue='$campaign',agent='Agent/$user',verb='CALLSTATUS',data1='$dispo_choice',serverid='$queuemetrics_log_id';"; + if ($DB) {echo "$stmt\n";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $linkB); + $affected_rows = mysql_affected_rows($linkB); + + mysql_close($linkB); + } + echo 'Lead ' . $lead_id . ' zmieniono na ' . $dispo_choice . " Status\nNext agent_log_id:\n" . $agent_log_id . "\n"; } @@ -1475,6 +1929,8 @@ if ($ACTION == 'updateLEAD') { $MT[0]=''; $row=''; $rowx=''; + $DO_NOT_UPDATE=0; + $DO_NOT_UPDATE_text=''; if ( (strlen($phone_number)<1) || (strlen($lead_id)<1) ) { echo "phone_number $phone_number or lead_id $lead_id nie jest prawidłowy\n"; @@ -1482,12 +1938,54 @@ if ($ACTION == 'updateLEAD') } 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";} + $stmt = "SELECT disable_alter_custdata FROM vicidial_campaigns where campaign_id='$campaign'"; + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $dac_conf_ct = mysql_num_rows($rslt); + $i=0; + while ($i < $dac_conf_ct) + { + $row=mysql_fetch_row($rslt); + $disable_alter_custdata = $row[0]; + $i++; + } + if (ereg('Y',$disable_alter_custdata)) + { + $DO_NOT_UPDATE=1; + $DO_NOT_UPDATE_text=' NOT'; + $stmt = "SELECT alter_custdata_override FROM vicidial_users where user='$user'"; + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $aco_conf_ct = mysql_num_rows($rslt); + $i=0; + while ($i < $aco_conf_ct) + { + $row=mysql_fetch_row($rslt); + $alter_custdata_override = $row[0]; + $i++; + } + if (ereg('ALLOW_ALTER',$alter_custdata_override)) + { + $DO_NOT_UPDATE=0; + $DO_NOT_UPDATE_text=''; + } + } + + if ($DO_NOT_UPDATE < 1) + { + $comments = eregi_replace("\r",'',$comments); + $comments = eregi_replace("\n",'!N',$comments); + $comments = eregi_replace("--AMP--",'&',$comments); + $comments = eregi_replace("--QUES--",'?',$comments); + $comments = eregi_replace("--POUND--",'#',$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';"; @@ -1495,7 +1993,7 @@ if ($ACTION == 'updateLEAD') $rslt=mysql_query($stmt, $link); } - echo "Lead $lead_id informacje zostały zaktualizowane\n"; + echo "Lead $lead_id information has$DO_NOT_UPDATE_text been updated\n"; } @@ -1515,10 +2013,54 @@ if ( ($ACTION == 'VDADpause') || ($ACTION == 'VDADready') ) 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';"; + $stmt="UPDATE vicidial_live_agents set lead_id='',uniqueid=0,callerid='',channel='', random_id='$random',comments='' where user='$user' and server_ip='$server_ip';"; if ($format=='debug') {echo "\n";} $rslt=mysql_query($stmt, $link); + $stmt="UPDATE vicidial_live_agents set status='$stage' where user='$user' and server_ip='$server_ip';"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + $affected_rows = mysql_affected_rows($link); + if ($affected_rows > 0) + { + ############################################# + ##### START QUEUEMETRICS LOGGING LOOKUP ##### + $stmt = "SELECT enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_log_id FROM system_settings;"; + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $qm_conf_ct = mysql_num_rows($rslt); + $i=0; + while ($i < $qm_conf_ct) + { + $row=mysql_fetch_row($rslt); + $enable_queuemetrics_logging = $row[0]; + $queuemetrics_server_ip = $row[1]; + $queuemetrics_dbname = $row[2]; + $queuemetrics_login = $row[3]; + $queuemetrics_pass = $row[4]; + $queuemetrics_log_id = $row[5]; + $i++; + } + ##### END QUEUEMETRICS LOGGING LOOKUP ##### + ########################################### + if ($enable_queuemetrics_logging > 0) + { + if (ereg('READY',$stage)) {$QMstatus='UNPAUSEALL';} + if (ereg('PRZERWA',$stage)) {$QMstatus='PRZERWAALL';} + $linkB=mysql_connect("$queuemetrics_server_ip", "$queuemetrics_login", "$queuemetrics_pass"); + mysql_select_db("$queuemetrics_dbname", $linkB); + + $stmt = "INSERT INTO queue_log SET partition='P01',time_id='$StarTtime',call_id='NONE',queue='NONE',agent='Agent/$user',verb='$QMstatus',serverid='$queuemetrics_log_id';"; + if ($DB) {echo "$stmt\n";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $linkB); + $affected_rows = mysql_affected_rows($linkB); + + mysql_close($linkB); + } + } + if ($agent_log == 'NO') {$donothing=1;} else @@ -1587,6 +2129,71 @@ if ($ACTION == 'UpdatEFavoritEs') } +################################################################################ +### PauseCodeSubmit - Update vicidial_agent_log with pause code +################################################################################ +if ($ACTION == 'PrzerwaCodeSubmit') +{ + $row=''; $rowx=''; + if ( (strlen($status)<1) || (strlen($agent_log_id)<1) ) + { + echo "agent_log_id $agent_log_id or pause_code $status nie jest prawidłowy\n"; + exit; + } + else + { + $stmt="UPDATE vicidial_agent_log set sub_status=\"$status\" where agent_log_id='$agent_log_id';"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + $affected_rows = mysql_affected_rows($link); + if ($affected_rows > 0) + { + ############################################# + ##### START QUEUEMETRICS LOGGING LOOKUP ##### + $stmt = "SELECT enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_log_id,allow_sipsak_messages FROM system_settings;"; + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $qm_conf_ct = mysql_num_rows($rslt); + $i=0; + while ($i < $qm_conf_ct) + { + $row=mysql_fetch_row($rslt); + $enable_queuemetrics_logging = $row[0]; + $queuemetrics_server_ip = $row[1]; + $queuemetrics_dbname = $row[2]; + $queuemetrics_login = $row[3]; + $queuemetrics_pass = $row[4]; + $queuemetrics_log_id = $row[5]; + $allow_sipsak_messages = $row[6]; + $i++; + } + ##### END QUEUEMETRICS LOGGING LOOKUP ##### + ########################################### + if ( ($enable_sipsak_messages > 0) and ($allow_sipsak_messages > 0) and (eregi("SIP",$protocol)) ) + { + $SIPSAK_prefix = 'BK-'; + passthru("/usr/local/bin/sipsak -M -O desktop -B \"$SIPSAK_prefix$status\" -r 5060 -s sip:$extension@$phone_ip > /dev/null"); + } + if ($enable_queuemetrics_logging > 0) + { + $linkB=mysql_connect("$queuemetrics_server_ip", "$queuemetrics_login", "$queuemetrics_pass"); + mysql_select_db("$queuemetrics_dbname", $linkB); + + $stmt = "INSERT INTO queue_log SET partition='P01',time_id='$StarTtime',call_id='NONE',queue='$campaign',agent='Agent/$user',verb='PRZERWAREASON',serverid='$queuemetrics_log_id',data1='$status';"; + if ($DB) {echo "$stmt\n";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $linkB); + $affected_rows = mysql_affected_rows($linkB); + + mysql_close($linkB); + } + } + } +echo "Przerwa Code has been updated to $status for $agent_log_id\n"; +} + + ################################################################################ ### CalLBacKLisT - List the USERONLY callbacks for an agent ################################################################################ diff --git a/agc_2-X/trunk/LANG_www/agc_pl/vicidial.php b/agc_2-X/trunk/LANG_www/agc_pl/vicidial.php index 706c1a37..53301443 100644 --- a/agc_2-X/trunk/LANG_www/agc_pl/vicidial.php +++ b/agc_2-X/trunk/LANG_www/agc_pl/vicidial.php @@ -1,7 +1,7 @@ LICENSE: GPLv2 +# Copyright (C) 2007 Matt Florell 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 @@ -15,7 +15,7 @@ # - vdc_db_query.php: Updates information in the database # - manager_send.php: Sends manager actions to the DB for execution # -# CHANGES +# CHANGELOG # 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 @@ -132,8 +132,37 @@ # 61128-2229 - Added vicidial_live_agents and vicidial_auto_calls manual dial entries # 61130-1617 - Added lead_id to MonitorConf for recording_log # 61221-1212 - Changed width to 760 to better fit 800x600 screens, widened SCRIPT +# 70109-1128 - Fixed wrapup timer bug +# 70109-1635 - Added option for HotKeys automatically dialing next number in manual mode +# - Added option for alternate number dialing with hotkeys +# 70111-1600 - Added ability to use BLEND/INBND/*_C/*_B/*_I as closer campaigns +# 70118-1517 - Added vicidial_agent_log and vicidial_user_log logging of user_group +# 70201-1249 - Added FAST DIAL option for manually dialing, added UTF8 compatible code +# 70201-1703 - Fixed cursor bug for most text input fields +# 70202-1453 - Added first portions of Agent Pause Codes +# 70203-0108 - Finished Agent Pause Codes functionality +# 70203-0930 - Added dialed_number to webform output +# 70203-1010 - Added dialed_label to webform output +# 70206-1201 - Fixed allow_closers bug +# 70206-1332 - Added vicidial_recording_override users setting function +# 70212-1252 - Fixed small issue with CXFER +# 70213-1018 - Changed CXFER and AXFER to update customer information before transfer +# 70214-1233 - Added queuemetrics_log_id field for server_id in queue_log +# 70215-1240 - Added queuemetrics_log_id field for server_id in queue_log +# 70222-1617 - Changed queue_log PAUSE/UNPAUSE to PAUSEALL/UNPAUSEALL +# 70226-1252 - Added Mute/UnMute to agent screen +# 70309-1035 - Allow amphersands and questions marks in comments to pass through +# 70313-1052 - Allow pound signs(hash) in comments to pass through +# 70316-1406 - Moved the MUTE button to be accessible during a transfer/conf +# 70319-1446 - Added agent-deactive-display and disable customer info update functions +# 70319-1626 - Added option to allow agent logins to campaigns with no leads in the hopper +# 70320-1501 - Added option to allow retry of leave-3way-call from dispo screen +# 70322-1545 - Added sipsak display ability # +$version = '2.0.129'; +$build = '70322-1545'; + require("dbconnect.php"); if (isset($_GET["DB"])) {$DB=$_GET["DB"];} @@ -172,14 +201,11 @@ if (isset($_GET["relogin"])) {$relogin=$_GET["relogin"];} $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); + $VD_campaign=ereg_replace("[^0-9a-zA-Z_]","",$VD_campaign); $forever_stop=0; -$version = '2.0.105'; -$build = '61221-1212'; - if ($force_logout) { echo "Wylogowałeś się. Do zobaczenia\n"; @@ -226,6 +252,7 @@ $TEST_all_statuses = '0'; # TEST variable allows all statuses in dispo screen $US='_'; $CL=':'; $AT='@'; +$DS='-'; $date = date("r"); $ip = getenv("REMOTE_ADDR"); $browser = getenv("HTTP_USER_AGENT"); @@ -252,6 +279,7 @@ $camp_form_code = " 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $phone_login=$row[0]; @@ -438,6 +467,7 @@ $VDloginDISPLAY=0; { $stmt="SELECT count(*) from vicidial_users where user='$VD_login' and pass='$VD_pass' and user_level > 0;"; if ($DB) {echo "|$stmt|\n";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $auth=$row[0]; @@ -447,7 +477,8 @@ $VDloginDISPLAY=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,user_group from vicidial_users where user='$VD_login' and pass='$VD_pass'"; + $stmt="SELECT full_name,user_level,hotkeys_active,agent_choose_ingroups,scheduled_callbacks,agentonly_callbacks,agentcall_manual,vicidial_recording,vicidial_transfers,closer_default_blended,user_group,vicidial_recording_override from vicidial_users where user='$VD_login' and pass='$VD_pass'"; + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $LOGfullname=$row[0]; @@ -461,6 +492,8 @@ $VDloginDISPLAY=0; $VU_vicidial_transfers=$row[8]; $VU_closer_default_blended=$row[9]; $VU_user_group=$row[10]; + $VU_vicidial_recording_override=$row[11]; + if ($WeBRooTWritablE > 0) { fwrite ($fp, "vdweb|GOOD|$date|$VD_login|$VD_pass|$ip|$browser|$LOGfullname|\n"); @@ -471,6 +504,7 @@ $VDloginDISPLAY=0; {$user_abb = eregi_replace("^.","",$user_abb); $forever_stop++;} $stmt="SELECT allowed_campaigns from vicidial_user_groups where user_group='$VU_user_group';"; + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $LOGallowed_campaigns =$row[0]; @@ -501,6 +535,7 @@ echo " 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $CAMPactive=$row[0]; @@ -512,6 +547,7 @@ echo " 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $VD_statuses_ct = mysql_num_rows($rslt); @@ -528,6 +564,7 @@ echo " 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $VD_statuses_camp = mysql_num_rows($rslt); @@ -548,6 +585,7 @@ echo " 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $HK_statuses_camp = mysql_num_rows($rslt); @@ -577,43 +615,46 @@ echo " 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $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_sekundy=$row[26]; - $wrapup_message=$row[27]; - $closer_campaigns=$row[28]; - $use_internal_dnc=$row[29]; - $allcalls_delay=$row[30]; - $omit_phone_code=$row[31]; + $park_ext = $row[0]; + $park_file_name = $row[1]; + $web_form_address = $row[2]; + $allow_closers = $row[3]; + $auto_dial_level = $row[4]; + $dial_timeout = $row[5]; + $dial_prefix = $row[6]; + $campaign_cid = $row[7]; + $campaign_vdad_exten = $row[8]; + $campaign_rec_exten = $row[9]; + $campaign_recording = $row[10]; + $campaign_rec_filename = $row[11]; + $campaign_script = $row[12]; + $get_call_launch = $row[13]; + $campaign_am_message_exten = $row[14]; + $xferconf_a_dtmf = $row[15]; + $xferconf_a_number = $row[16]; + $xferconf_b_dtmf = $row[17]; + $xferconf_b_number = $row[18]; + $alt_number_dialing = $row[19]; + $VC_scheduled_callbacks = $row[20]; + $wrapup_sekundy = $row[21]; + $wrapup_message = $row[22]; + $closer_campaigns = $row[23]; + $use_internal_dnc = $row[24]; + $allcalls_delay = $row[25]; + $omit_phone_code = $row[26]; + $agent_pause_codes_active = $row[27]; + $no_hopper_leads_logins = $row[28]; + if ( (!ereg('DISABLED',$VU_vicidial_recording_override)) and ($VU_vicidial_recording > 0) ) + { + $campaign_recording = $VU_vicidial_recording_override; + print "\n"; + } if ( ($VC_scheduled_callbacks=='Y') and ($VU_scheduled_callbacks=='1') ) {$scheduled_callbacks='1';} if ($VU_vicidial_recording=='0') @@ -626,12 +667,37 @@ echo " 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $VD_pause_codes = mysql_num_rows($rslt); + $j=0; + while ($j < $VD_pause_codes) + { + $row=mysql_fetch_row($rslt); + $pause_codes[$i] =$row[0]; + $pause_code_names[$i] =$row[1]; + $VARpause_codes = "$VARpause_codes'$pause_codes[$i]',"; + $VARpause_code_names = "$VARpause_code_names'$pause_code_names[$i]',"; + $i++; + $j++; + } + $VD_pause_codes_ct = ($VD_pause_codes_ct+$VD_pause_codes); + $VARpause_codes = substr("$VARpause_codes", 0, -1); + $VARpause_code_names = substr("$VARpause_code_names", 0, -1); + } + ##### grab the inbound groups to choose from if campaign contains CLOSER $VARingroups="''"; - if (eregi("CLOSER", $VD_campaign)) + if (eregi("(CLOSER|BLEND|INBND|_C$|_B$|_I$)", $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;"; + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $closer_ct = mysql_num_rows($rslt); @@ -648,6 +714,7 @@ echo " 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $row=mysql_fetch_row($rslt); @@ -708,6 +775,7 @@ echo " 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $authphone=$row[0]; @@ -746,6 +814,7 @@ else echo "klient VICIWYBIERZ\n"; $stmt="SELECT * from phones where login='$phone_login' and pass='$phone_pass' and active = 'Y';"; if ($DB) {echo "|$stmt|\n";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $extension=$row[0]; @@ -808,6 +877,7 @@ else $DBX_user=$row[57]; $DBX_pass=$row[58]; $DBX_port=$row[59]; + $enable_sipsak_messages=$row[66]; if ($clientDST) { @@ -822,6 +892,7 @@ else $stmt="SELECT asterisk_version from servers where server_ip='$server_ip';"; if ($DB) {echo "|$stmt|\n";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $asterisk_version=$row[0]; @@ -875,21 +946,25 @@ else $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";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $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";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); - if ( (eregi("CLOSER", $VD_campaign)) || ($campaign_leads_to_call > 0) ) + if ( (eregi("(CLOSER|BLEND|INBND|_C$|_B$|_I$)", $VD_campaign)) || ($campaign_leads_to_call > 0) || (ereg('Y',$no_hopper_leads_logins)) ) { ### 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')"; + $stmt = "INSERT INTO vicidial_user_log (user,event,campaign_id,event_date,event_epoch,user_group) values('$VD_login','LOGIN','$VD_campaign','$NOW_TIME','$StarTtimE','$VU_user_group')"; if ($DB) {echo "|$stmt|\n";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $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;"; + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $prev_login_ct = mysql_num_rows($rslt); @@ -906,6 +981,7 @@ 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;"; + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $free_conf_ct = mysql_num_rows($rslt); @@ -917,6 +993,7 @@ else $i++; } $stmt="UPDATE vicidial_conferences set extension='$SIP_user' where server_ip='$server_ip' and conf_exten='$session_id';"; + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); print "\n"; @@ -924,18 +1001,21 @@ else $stmt="UPDATE vicidial_list set status='N', user='' where status IN('QUEUE','INCALL') and user ='$VD_login';"; if ($DB) {echo "$stmt\n";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $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";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $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";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); $affected_rows = mysql_affected_rows($link); print "\n"; @@ -943,11 +1023,45 @@ else # print "You have logged in as user: $VD_login na phone: $SIP_user do kampani: $VD_campaign
\n"; $VICIDiaL_is_logged_in=1; - ### use manager middleware-app to connect the phone to the user + ### set the callerID for manager middleware-app to connect the phone to the user $SIqueryCID = "S$CIDdate$session_id"; + + ############################################# + ##### START SYSTEM_SETTINGS LOOKUP ##### + $stmt = "SELECT enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_log_id,vicidial_agent_disable,allow_sipsak_messages FROM system_settings;"; + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $qm_conf_ct = mysql_num_rows($rslt); + $i=0; + while ($i < $qm_conf_ct) + { + $row=mysql_fetch_row($rslt); + $enable_queuemetrics_logging = $row[0]; + $queuemetrics_server_ip = $row[1]; + $queuemetrics_dbname = $row[2]; + $queuemetrics_login = $row[3]; + $queuemetrics_pass = $row[4]; + $queuemetrics_log_id = $row[5]; + $vicidial_agent_disable = $row[6]; + $allow_sipsak_messages = $row[7]; + $i++; + } + ##### END QUEUEMETRICS LOGGING LOOKUP ##### + ########################################### + + if ( ($enable_sipsak_messages > 0) and ($allow_sipsak_messages > 0) and (eregi("SIP",$protocol)) ) + { + $SIPSAK_prefix = 'LIN-'; + print "\n"; + passthru("/usr/local/bin/sipsak -M -O desktop -B \"$SIPSAK_prefix$VD_campaign\" -r 5060 -s sip:$extension@$phone_ip > /dev/null"); + $SIqueryCID = "$SIPSAK_prefix$VD_campaign$DS$CIDdate"; + } + ### insert a NOWY 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";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); $affected_rows = mysql_affected_rows($link); print "\n"; @@ -959,13 +1073,38 @@ else $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";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); $affected_rows = mysql_affected_rows($link); print "\n"; - if (eregi("CLOSER", $VD_campaign)) + if ($enable_queuemetrics_logging > 0) { - print "\n"; + $linkB=mysql_connect("$queuemetrics_server_ip", "$queuemetrics_login", "$queuemetrics_pass"); + mysql_select_db("$queuemetrics_dbname", $linkB); + + $stmt = "INSERT INTO queue_log SET partition='P01',time_id='$StarTtimE',call_id='NONE',queue='$VD_campaign',agent='Agent/$VD_login',verb='AGENTLOGIN',data1='$VD_login@agents',serverid='$queuemetrics_log_id';"; + if ($DB) {echo "$stmt\n";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $linkB); + $affected_rows = mysql_affected_rows($linkB); + print "\n"; + + $stmt = "INSERT INTO queue_log SET partition='P01',time_id='$StarTtimE',call_id='NONE',queue='NONE',agent='Agent/$VD_login',verb='PRZERWAALL',serverid='$queuemetrics_log_id';"; + if ($DB) {echo "$stmt\n";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $linkB); + $affected_rows = mysql_affected_rows($linkB); + print "\n"; + + mysql_close($linkB); + mysql_select_db("$VARDB_database", $link); + } + + + if (eregi("(CLOSER|BLEND|INBND|_C$|_B$|_I$)", $VD_campaign)) + { + print "\n"; } } else @@ -974,9 +1113,33 @@ else $stmt="INSERT INTO vicidial_live_agents (user,server_ip,conf_exten,extension,status,lead_id,campaign_id,uniqueid,callerid,channel,random_id,last_call_time,last_update_time,last_call_finish,user_level) values('$VD_login','$server_ip','$session_id','$SIP_user','PAUSED','','$VD_campaign','','','','$random','$NOW_TIME','$tsNOW_TIME','$NOW_TIME','$user_level');"; if ($DB) {echo "$stmt\n";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); $affected_rows = mysql_affected_rows($link); print "\n"; + + if ($enable_queuemetrics_logging > 0) + { + $linkB=mysql_connect("$queuemetrics_server_ip", "$queuemetrics_login", "$queuemetrics_pass"); + mysql_select_db("$queuemetrics_dbname", $linkB); + + $stmt = "INSERT INTO queue_log SET partition='P01',time_id='$StarTtimE',call_id='NONE',queue='$VD_campaign',agent='Agent/$VD_login',verb='AGENTLOGIN',data1='$VD_login@agents',serverid='$queuemetrics_log_id';"; + if ($DB) {echo "$stmt\n";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $linkB); + $affected_rows = mysql_affected_rows($linkB); + print "\n"; + + $stmt = "INSERT INTO queue_log SET partition='P01',time_id='$StarTtimE',call_id='NONE',queue='NONE',agent='Agent/$VD_login',verb='PRZERWAALL',serverid='$queuemetrics_log_id';"; + if ($DB) {echo "$stmt\n";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $linkB); + $affected_rows = mysql_affected_rows($linkB); + print "\n"; + + mysql_close($linkB); + mysql_select_db("$VARDB_database", $link); + } } } else @@ -1027,11 +1190,12 @@ echo "
0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); $affected_rows = mysql_affected_rows($link); - $agent_log_id = mysql_insert_id(); + $agent_log_id = mysql_insert_id($link); print "\n"; $S='*'; @@ -1048,6 +1212,7 @@ echo " 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $MM_scripts = mysql_num_rows($rslt); @@ -1225,6 +1390,10 @@ $CCAL_OUT .= "
"; var CallBackCommenTs = ''; var scheduled_callbacks = ''; var dispo_check_all_pause = ''; + var agent_pause_codes_active = ''; + VARpause_codes = new Array(); + VARpause_code_names = new Array(); + var VD_pause_codes_ct = ''; VARstatuses = new Array(); VARstatusnames = new Array(); var VD_statuses_ct = ''; @@ -1277,6 +1446,7 @@ $CCAL_OUT .= "
"; var dialplan_number = ''; var ext_context = ''; var protocol = ''; + var agentchannel = ''; var local_gmt =''; var server_ip = ''; var server_ip_dialstring = ''; @@ -1292,6 +1462,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} var CalLCID = ''; var MDnextCID = ''; var XDnextCID = ''; + var LasTCID = ''; var lead_dial_number = ''; var MD_channel_look = 0; var XD_channel_look = 0; @@ -1324,11 +1495,6 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} var CalL_AutO_LauncH = ''; var panel_bgcolor = '#E0C2D6'; var CusTCB_bgcolor = '#FFFF66'; - var status_A = ''; - var status_B = ''; - var status_C = ''; - var status_D = ''; - var status_E = ''; var auto_dial_level = ''; var starting_dial_level = ''; var dial_timeout = ''; @@ -1428,11 +1594,24 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} var no_delete_sessions = ''; var webform_session = ''; var local_consult_xfers = ''; + var vicidial_agent_disable = ''; var CBentry_time = ''; var CBcallback_time = ''; var CBuser = ''; var CBcomments = ''; var volumecontrol_active = ''; + var PrzerwaCode_HTML = ''; + var manual_auto_hotkey = 0; + var dialed_number = ''; + var dialed_label = ''; + var DispO3waychannel = ''; + var DispO3wayXtrAchannel = ''; + var DispO3wayCalLserverip = ''; + var DispO3wayCalLxfernumber = ''; + var DispO3wayCalLcamptail = ''; + var phone_ip = ''; + var enable_sipsak_messages = ''; + var allow_sipsak_messages = ''; var DiaLControl_auto_HTML = "\"Przerwa\"\"Ponów\""; var DiaLControl_auto_HTML_ready = "\"Przerwa\"\"Ponów\""; var DiaLControl_auto_HTML_OFF = "\"Przerwa\"\"Ponów\""; @@ -1536,8 +1715,12 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} // ################################################################################ // Send volume control command for meetme participant - function volume_control(taskdirection,taskvolchannel) + function volume_control(taskdirection,taskvolchannel,taskagentmute) { + if (taskagentmute=='AgenT') + { + taskvolchannel = agentchannel; + } var xmlhttp=false; /*@cc_on @*/ /*@if (@_jscript_version >= 5) @@ -1576,6 +1759,18 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} } delete xmlhttp; } + if (taskagentmute=='AgenT') + { + if (taskdirection=='MUTING') + { + document.getElementById("AgentMuteSpan").innerHTML = ""; + } + else + { + document.getElementById("AgentMuteSpan").innerHTML = ""; + } + } + } @@ -1590,9 +1785,9 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} // ################################################################################ // place 3way and customer into other conference and fake-hangup the lines - function leave_3way_call() + function leave_3way_call(tempvarattempt) { - mainxfer_send_redirect('3WAY'); + mainxfer_send_redirect('3WAY','','',tempvarattempt); document.vicidial_form.callchannel.value = ''; document.vicidial_form.callserverip.value = ''; @@ -1653,6 +1848,35 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} // Send Originate command to manager to place a phone call function basic_originate_call(tasknum,taskprefix,taskreverse,taskdialvalue,tasknowait,taskconfxfer) { + var regCXFvars = new RegExp("CXFER","g"); + var tasknum_string = tasknum.toString(); + if (tasknum_string.match(regCXFvars)) + { + var Ctasknum = tasknum_string.replace(regCXFvars, ''); + if (Ctasknum.length < 2) + {Ctasknum = '990009';} + var closerxfercamptail = '_L' + document.vicidial_form.xfercode.value; + tasknum = Ctasknum + "*CL_" + campaign + '' + closerxfercamptail + '*CXFER*' + document.vicidial_form.lead_id.value + '**' + document.vicidial_form.phone_number.value + '*' + user + '*'; + + CustomerData_update(); + + } + var regAXFvars = new RegExp("AXFER","g"); + if (tasknum_string.match(regAXFvars)) + { + var Ctasknum = tasknum_string.replace(regAXFvars, ''); + if (Ctasknum.length < 2) + {Ctasknum = '83009';} + var closerxfercamptail = '_L' + document.vicidial_form.xfercode.value; + if (closerxfercamptail.length < 3) + {closerxfercamptail = 'IVR';} + tasknum = Ctasknum + '*' + document.vicidial_form.phone_number.value + '*' + document.vicidial_form.lead_id.value + '*' + campaign + '*' + closerxfercamptail + '*' + user + '*'; + + CustomerData_update(); + + } + + var xmlhttp=false; /*@cc_on @*/ /*@if (@_jscript_version >= 5) @@ -1674,27 +1898,6 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} } if (xmlhttp) { - var regCXFvars = new RegExp("CXFER","g"); - var tasknum_string = tasknum.toString(); - if (tasknum_string.match(regCXFvars)) - { - var Ctasknum = tasknum_string.replace(regCXFvars, ''); - if (Ctasknum.length < 2) - {Ctasknum = '990009';} - var closerxfercamptail = '_L' + document.vicidial_form.xfercode.value; - tasknum = Ctasknum + "*CL_" + campaign + '' + closerxfercamptail + '**' + document.vicidial_form.lead_id.value + '**' + document.vicidial_form.phone_number.value + '*' + user + '*'; - } - var regAXFvars = new RegExp("AXFER","g"); - if (tasknum_string.match(regAXFvars)) - { - var Ctasknum = tasknum_string.replace(regAXFvars, ''); - if (Ctasknum.length < 2) - {Ctasknum = '83009';} - var closerxfercamptail = '_L' + document.vicidial_form.xfercode.value; - if (closerxfercamptail.length < 3) - {closerxfercamptail = 'IVR';} - tasknum = Ctasknum + '*' + document.vicidial_form.phone_number.value + '*' + document.vicidial_form.lead_id.value + '*' + campaign + '*' + closerxfercamptail + '*' + user + '*'; - } if (taskprefix == 'NO') {var orig_prefix = '';} else {var orig_prefix = agc_dial_prefix;} if (taskreverse == 'YES') @@ -1858,7 +2061,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} UnixTime = parseInt(UnixTime); UnixTimeMS = (UnixTime * 1000); t.setTime(UnixTimeMS); - if (agentcallsstatus == '1') + if ( (agentcallsstatus == '1') || (vicidial_agent_disable != 'NOT_ACTIVE') ) { var Astatus_array = check_time_array[2].split("Status: "); var AGStatuS = Astatus_array[1]; @@ -1872,6 +2075,14 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} { document.getElementById("AgentStatusCalls").innerHTML = CamPCalLs; } + if ( (AGStatuS == 'DEAD_VLA') && ( (vicidial_agent_disable == 'LIVE_AGENT') || (vicidial_agent_disable == 'ALL') ) ) + { + showDiv('AgenTDisablEBoX'); + } + if ( (AGStatuS == 'DEAD_EXTERNAL') && ( (vicidial_agent_disable == 'EXTERNAL') || (vicidial_agent_disable == 'ALL') ) ) + { + showDiv('AgenTDisablEBoX'); + } } var check_conf_array=check_ALL_array[1].split("|"); var live_conf_calls = check_conf_array[0]; @@ -1903,14 +2114,13 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} {var row_color = '#CCCCFF';} var conv_ct = (loop_ct + conv_start); var channelfieldA = conf_chan_array[conv_ct]; - // live_conf_HTML = live_conf_HTML + "
" + loop_ct + "" + channelfieldA + "HangupTRANSFER
" + loop_ct + "" + channelfieldA + "ROZŁĄCZ
" + loop_ct + "" + channelfieldA + "ROZŁĄCZ    
" + loop_ct + "" + channelfieldA + "ROZŁĄCZ          
PRZERWA CODE
"; + var loop_ct = 0; + while (loop_ct < VD_pause_codes_ct) + { + PrzerwaCode_HTML = PrzerwaCode_HTML + "" + VARpause_codes[loop_ct] + " - " + VARpause_code_names[loop_ct] + "

"; + loop_ct++; + if (loop_ct == VD_pause_codes_ct_half) + {PrzerwaCode_HTML = PrzerwaCode_HTML + "
";} + } + PrzerwaCode_HTML = PrzerwaCode_HTML + "


Wróć"; + document.getElementById("PrzerwaCodeSelectContent").innerHTML = PrzerwaCode_HTML; + } + } // ################################################################################ // open web form, then submit disposition @@ -4114,7 +4527,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} } if (xmlhttp) { - DSupdate_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=updateDISPO&format=text&user=" + user + "&pass=" + pass + "&dispo_choice=" + DispoChoice + "&lead_id=" + document.vicidial_form.lead_id.value + "&campaign=" + campaign + "&auto_dial_level=" + auto_dial_level + "&agent_log_id=" + agent_log_id + "&CallBackDatETimE=" + CallBackDatETimE + "&list_id=" + document.vicidial_form.list_id.value + "&recipient=" + CallBackrecipient + "&use_internal_dnc=" + use_internal_dnc + "&comments=" + CallBackCommenTs; + DSupdate_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=updateDISPO&format=text&user=" + user + "&pass=" + pass + "&dispo_choice=" + DispoChoice + "&lead_id=" + document.vicidial_form.lead_id.value + "&campaign=" + campaign + "&auto_dial_level=" + auto_dial_level + "&agent_log_id=" + agent_log_id + "&CallBackDatETimE=" + CallBackDatETimE + "&list_id=" + document.vicidial_form.list_id.value + "&recipient=" + CallBackrecipient + "&use_internal_dnc=" + use_internal_dnc + "&MDnextCID=" + LasTCID + "&comments=" + CallBackCommenTs; xmlhttp.open('POST', 'vdc_db_query.php'); xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8'); xmlhttp.send(DSupdate_query); @@ -4124,8 +4537,8 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} { var check_dispo = null; check_dispo = xmlhttp.responseText; - // alert(xmlhttp.responseText); var check_DS_array=check_dispo.split("\n"); + // alert(xmlhttp.responseText + "\n|" + check_DS_array[1] + "\n|" + check_DS_array[2] + "|"); if (check_DS_array[1] == 'Next agent_log_id:') { agent_log_id = check_DS_array[2]; @@ -4203,12 +4616,67 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} AutoDial_ReSume_PauSe("VDADready","NO"); // document.getElementById("DiaLControl").innerHTML = DiaLControl_auto_HTML_ready; } + else + { + // trigger HotKeys manual dial automatically go to next lead + if (manual_auto_hotkey == '1') + { + manual_auto_hotkey = 0; + ManualDialNext('','','','',''); + } + } } } } } } + +// ################################################################################ +// Submit the Przerwa Code + function PauseCodeSelect_submit(newpausecode) + { + hideDiv('PrzerwaCodeSelectBox'); + WaitingForNextStep=0; + + var xmlhttp=false; + /*@cc_on @*/ + /*@if (@_jscript_version >= 5) + // JScript gives us Conditional compilation, we can cope with old IE versions. + // and security blocked creation of the objects. + try { + xmlhttp = new ActiveXObject("Msxml2.XMLHTTP"); + } catch (e) { + try { + xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); + } catch (E) { + xmlhttp = false; + } + } + @end @*/ + if (!xmlhttp && typeof XMLHttpRequest!='undefined') + { + xmlhttp = new XMLHttpRequest(); + } + if (xmlhttp) + { + VMCpausecode_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=PrzerwaCodeSubmit&format=text&status=" + newpausecode + "&agent_log_id=" + agent_log_id + "&campaign=" + campaign + "&extension=" + extension + "&protocol=" + protocol + "&phone_ip=" + phone_ip + "&enable_sipsak_messages=" + enable_sipsak_messages; + xmlhttp.open('POST', 'vdc_db_query.php'); + xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8'); + xmlhttp.send(VMCpausecode_query); + xmlhttp.onreadystatechange = function() + { + if (xmlhttp.readyState == 4 && xmlhttp.status == 200) + { + // alert(xmlhttp.responseText); + } + } + delete xmlhttp; + } + } + + + // ################################################################################ // Populate the dtmf and xfer number for each preset link in xfer-conf frame function DtMf_PreSet_a() @@ -4302,7 +4770,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} } if (xmlhttp) { - VMCoriginate_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=Originate&format=text&channel=" + originatevalue + "&queryCID=" + queryCID + "&exten=" + session_id + "&ext_context=" + ext_context + "&ext_priority=1"; + VMCoriginate_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=OriginateVDRelogin&format=text&channel=" + originatevalue + "&queryCID=" + queryCID + "&exten=" + session_id + "&ext_context=" + ext_context + "&ext_priority=1" + "&extension=" + extension + "&protocol=" + protocol + "&phone_ip=" + phone_ip + "&enable_sipsak_messages=" + enable_sipsak_messages + "&allow_sipsak_messages=" + allow_sipsak_messages + "&campaign=" + campaign; xmlhttp.open('POST', 'manager_send.php'); xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8'); xmlhttp.send(VMCoriginate_query); @@ -4489,7 +4957,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} } if (xmlhttp) { - VDlogout_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=userLOGout&format=text&user=" + user + "&pass=" + pass + "&campaign=" + campaign + "&conf_exten=" + session_id + "&extension=" + extension + "&protocol=" + protocol + "&no_delete_sessions=" + no_delete_sessions; + VDlogout_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=userLOGout&format=text&user=" + user + "&pass=" + pass + "&campaign=" + campaign + "&conf_exten=" + session_id + "&extension=" + extension + "&protocol=" + protocol + "&agent_log_id=" + agent_log_id + "&no_delete_sessions=" + no_delete_sessions + "&phone_ip=" + phone_ip + "&enable_sipsak_messages=" + enable_sipsak_messages; xmlhttp.open('POST', 'vdc_db_query.php'); xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8'); xmlhttp.send(VDlogout_query); @@ -4536,14 +5004,24 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} document.vicidial_form.inert_button.focus(); document.vicidial_form.inert_button.blur(); CustomerData_update(); - HKdispo_display = 4; - HKfinish=1; var HKdispo_ary = HKdispo.split(" ----- "); - document.getElementById("HotKeyDispo").innerHTML = HKdispo_ary[0] + " - " + HKdispo_ary[1]; - showDiv('HotKeyActionBox'); - hideDiv('HotKeyEntriesBox'); - document.vicidial_form.DispoSelection.value = HKdispo_ary[0]; - dialedcall_send_hangup('NO'); + if ( (HKdispo_ary[0] == 'ALTPH2') || (HKdispo_ary[0] == 'ADDR3') ) + { + if (document.vicidial_form.DiaLAltPhonE.checked==true) + { + dialedcall_send_hangup('NO', 'YES', HKdispo_ary[0]); + } + } + else + { + HKdispo_display = 4; + HKfinish=1; + document.getElementById("HotKeyDispo").innerHTML = HKdispo_ary[0] + " - " + HKdispo_ary[1]; + showDiv('HotKeyActionBox'); + hideDiv('HotKeyEntriesBox'); + document.vicidial_form.DispoSelection.value = HKdispo_ary[0]; + dialedcall_send_hangup('NO', 'YES', HKdispo_ary[0]); + } // DispoSelect_submit(); // AutoDialWaiting = 1; // AutoDial_ReSume_PauSe("VDADready"); @@ -4899,11 +5377,11 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} hideDiv('CBcommentsBox'); hideDiv('HotKeyActionBox'); hideDiv('HotKeyEntriesBox'); - hideDiv('MainXfeRBox'); hideDiv('MainPanel'); hideDiv('ScriptPanel'); hideDiv('DispoSelectBox'); hideDiv('LogouTBox'); + hideDiv('AgenTDisablEBoX'); hideDiv('CustomerGoneBox'); hideDiv('NoneInSessionBox'); hideDiv('WrapupBox'); @@ -4915,6 +5393,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} hideDiv('DispoButtonHideC'); hideDiv('CallBacKsLisTBox'); hideDiv('NeWManuaLDiaLBox'); + hideDiv('PrzerwaCodeSelectBox'); if (agentonly_callbacks != '1') {hideDiv('CallbacksButtons');} // if ( (agentcall_manual != '1') && (starting_dial_level > 0) ) @@ -4930,6 +5409,15 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} {hideDiv('VolumeControlSpan');} document.vicidial_form.LeadLookuP.checked=true; + if (agent_pause_codes_active=='Y') + { + document.getElementById("PrzerwaCodeLinkSpan").innerHTML = "WCHODZĄ SZYFR PRZERWY"; + } + if (VICIDiaL_allow_closers < 1) + { + document.getElementById("InternalCloser").style.visibility = 'hidden'; + document.getElementById("LocalCloser").style.visibility = 'hidden'; + } document.getElementById("sessionIDspan").innerHTML = session_id; if ( (campaign_recording == 'NEVER') || (campaign_recording == 'ALLFORCE') ) { @@ -4962,6 +5450,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} if (wrapup_sekundy > 0) { showDiv('WrapupBox'); + document.getElementById("WrapupTimer").innerHTML = wrapup_sekundy; wrapup_waiting=1; } CustomerData_update(); @@ -4994,39 +5483,6 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} if ( (custchannellive < -30) && (lastcustchannel.length > 3) ) {CustomerChanneLGone();} if ( (custchannellive < -10) && (lastcustchannel.length > 3) ) {ReChecKCustoMerChaN();} if ( (nochannelinsession > 16) && (check_n > 15) ) {NoneInSession();} - if (wrapup_sekundy > 0) - { - document.getElementById("WrapupTimer").innerHTML = (wrapup_sekundy - wrapup_counter); - wrapup_counter++; - if ( (wrapup_counter > wrapup_sekundy) && (document.getElementById("WrapupBox").style.visibility == 'visible') ) - { - wrapup_waiting=0; - hideDiv('WrapupBox'); - if (document.vicidial_form.DispoSelectStop.checked==true) - { - if (auto_dial_level != '0') - { - AutoDialWaiting = 0; - AutoDial_ReSume_PauSe("VDADpause","NO"); - // document.getElementById("DiaLControl").innerHTML = DiaLControl_auto_HTML; - } - VICIDiaL_pause_calling = 1; - if (dispo_check_all_pause != '1') - { - document.vicidial_form.DispoSelectStop.checked=false; - } - } - else - { - if (auto_dial_level != '0') - { - AutoDialWaiting = 1; - AutoDial_ReSume_PauSe("VDADready","NO"); - // document.getElementById("DiaLControl").innerHTML = DiaLControl_auto_HTML_ready; - } - } - } - } if (WaitingForNextStep==0) { // check for live channels in conference room and get current datetime @@ -5108,6 +5564,39 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} // parked_calls_display_refresh(); } } + if (wrapup_sekundy > 0) + { + document.getElementById("WrapupTimer").innerHTML = (wrapup_sekundy - wrapup_counter); + wrapup_counter++; + if ( (wrapup_counter > wrapup_sekundy) && (document.getElementById("WrapupBox").style.visibility == 'visible') ) + { + wrapup_waiting=0; + hideDiv('WrapupBox'); + if (document.vicidial_form.DispoSelectStop.checked==true) + { + if (auto_dial_level != '0') + { + AutoDialWaiting = 0; + AutoDial_ReSume_PauSe("VDADpause","NO"); + // document.getElementById("DiaLControl").innerHTML = DiaLControl_auto_HTML; + } + VICIDiaL_pause_calling = 1; + if (dispo_check_all_pause != '1') + { + document.vicidial_form.DispoSelectStop.checked=false; + } + } + else + { + if (auto_dial_level != '0') + { + AutoDialWaiting = 1; + AutoDial_ReSume_PauSe("VDADready","NO"); + // document.getElementById("DiaLControl").innerHTML = DiaLControl_auto_HTML_ready; + } + } + } + } } } setTimeout("all_refresh()", refresh_interval); @@ -5165,6 +5654,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} if (Cmon == 9) {Cmon = "PAŹ";} if (Cmon == 10) {Cmon = "LIS";} if (Cmon == 11) {Cmon = "GRU";} + if (Chours == 12) {AMPM = 'PM';} if (Chours > 12) {Chours = (Chours - 12); AMPM = 'PM';} if (Cmin < 10) {Cmin = "0" + Cmin;} if (Csec < 10) {Csec = "0" + Csec;} @@ -5300,25 +5790,6 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} } } - - function showMainXfeR(divvar,taskxferchan,taskxferchanmain) - { - document.getElementById("MainXfeRBox").style.visibility = 'visible'; - getactiveext("MainXfeRBox"); - conference_list_display_refresh("MainXfeRconfContent"); - var XfeR_channel = taskxferchan; - document.vicidial_form.H_XfeR_channel.value = XfeR_channel; - document.vicidial_form.M_XfeR_channel.value = taskxferchanmain; - document.getElementById("MainXfeRChanneL").innerHTML = XfeR_channel; - } - function hideMainXfeR(divvar) - { - document.getElementById("MainXfeRBox").style.visibility = 'hidden'; - var XfeR_channel = ''; - document.vicidial_form.H_XfeR_channel.value = ''; - document.vicidial_form.M_XfeR_channel.value = ''; - document.getElementById("MainXfeRChanneL").innerHTML = ''; - } function conf_channels_detail(divvar) { if (divvar == 'SHOW') @@ -5360,6 +5831,10 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} { if (showxfervar == 'ON') { + var xfer_height = 310; + if (alt_phone_dialing>0) {xfer_height = (xfer_height + 20);} + if ( (auto_dial_level == 0) && (manual_dial_preview == 1) ) {xfer_height = (xfer_height + 20);} + document.getElementById("TransferMain").style.top = xfer_height; HKbutton_allowed = 0; showDiv('TransferMain'); document.getElementById("XferControl").innerHTML = "\"Transfer"; @@ -5428,17 +5903,13 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} - - @@ -5490,15 +5961,23 @@ echo "\n";

VICIWYBIERZ
- -WYBIERANIE RĘCZNE
+ +WYBIERANIE RĘCZNE       SZYBKA TARCZA
- + X AKTYWNE INNE TERMINY
- + +
+
+ + +
+
+ +
INNE TERMINY DLA AGENTA :
Kliknij poniżej na Inne terminy żeby teraz zadzwonić do klienta. Jeżeli klikniesz na rekordzie by zadzwonić, rekord zostanie usunięty z listy.
@@ -5509,7 +5988,7 @@ echo "\n";
- + - + @@ -5533,7 +6014,8 @@ echo "\n"; - +
NOWE RĘCZNE WYBIERANIE NUMERU DLA :

Wpisz poniżej informacje o kontakcie do którego chcesz wykonać połączenie.
\n";
  (dla polski będzie to 48)
Telefon Number:   (12 digits max - digits only) +   (12 digits max - digits only) +
Przeszukuj rekordy:   (This option if checked will attempt to find the phone number in the system before inserting it as a new lead)

Jeżeli chcesz wybrać numer tak aby NIE został dodany jako nowy kontakt, wpisz dokładny numer telefonu w polu Wybierz ten numer poniżej. By zakończyć połączenie musisz otworzyć ROZMOWY W TEJ SESJI (w dole ekranu), i zakończyć połączenie klinając na link jego kanału..
 
Wybierz ten numer:   (tylko cyfry)  (tylko cyfry) +

Wybierz teraz @@ -5557,6 +6039,7 @@ Twój Status:
Calls Dialing:
+
Transfer - Konferencja
WEWNĘTRZNY FINALIZUJĄCYCH @@ -5582,11 +6065,12 @@ Twój Status:
Calls Dialing: Wybierz numer do nieweryfikowanego transferu Blind Transfer VMail Message
+
- +
Połączenie rozdysponowane jako:

-
@@ -5594,7 +6078,7 @@ Twój Status:
Calls Dialing: + @@ -5610,7 +6094,7 @@ Twój Status:
Calls Dialing: +
Klawisze skrótu dyspozycji: Kiedy aktywne, naciśnij guzik na klawiaturze w celu wybrania opcji dla tej rozmowy. Rozmowa zostanie automatycznie rozłączona a opcja ustawiona:
@@ -5627,7 +6111,7 @@ Twój Status:
Calls Dialing: +
Previous Callback Information:
Nikt nie uczestniczy w Twojej sesji:
Wróć

@@ -5635,7 +6119,7 @@ Twój Status:
Calls Dialing: +
Klient sie rozłączył:
Wróć

@@ -5644,7 +6128,7 @@ Twój Status:
Calls Dialing: + "; if (volumecontrol_active!=1) { live_conf_HTML = live_conf_HTML + ""; } else { - live_conf_HTML = live_conf_HTML + ""; + live_conf_HTML = live_conf_HTML + ""; } // var debugspan = document.getElementById("debugbottomspan").innerHTML; @@ -1926,6 +2136,29 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} {custchannellive++;} } + if (volumecontrol_active > 0) + { + if (protocol != 'EXTERNAL') + { + var regAGNTchan = new RegExp(protocol + '/' + extension,"g"); + if ( (channelfieldA.match(regAGNTchan)) && (agentchannel != channelfieldA) ) + { + agentchannel = channelfieldA; + + document.getElementById("AgentMuteSpan").innerHTML = ""; + } + } + else + { + if (agentchannel.length < 3) + { + agentchannel = channelfieldA; + + document.getElementById("AgentMuteSpan").innerHTML = ""; + } + } + } + // document.getElementById("debugbottomspan").innerHTML = debugspan + '
' + channelfieldA + '|' + lastcustchannel + '|' + custchannellive + '|' + LMAcontent_change + '|' + LMAalter; if (!LMAe[ARY_ct]) @@ -1952,7 +2185,11 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} if (LMAcontent_change > 0) { if (conf_channels_xtra_display == 1) - {document.getElementById("outboundcallsspan").innerHTML = live_conf_HTML;} + { + // document.getElementById("MainPanel").style.overflow = 'visible'; + document.getElementById("outboundcallsspan").innerHTML = live_conf_HTML; + // document.getElementById("MainPanel").style.overflow = 'auto'; + } } nochannelinsession=0; } @@ -2086,7 +2323,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} // ################################################################################ // Send Redirect command for live call to Manager sends phone name where call is going to // Covers the following types: XFER, VMAIL, ENTRY, CONF, PARQUE, FROMPARQUE, XfeRLOCAL, XfeRINTERNAL, XfeRBLIND, VfeRVMAIL - function mainxfer_send_redirect(taskvar,taskxferconf,taskserverip) + function mainxfer_send_redirect(taskvar,taskxferconf,taskserverip,taskdebugnote) { var xmlhttp=false; /*@cc_on @*/ @@ -2201,6 +2438,8 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} } if (taskvar == '3WAY') { + xferredirect_query=''; + var queryCID = "VXvdcW" + epoch_sec + user_abb; var redirectdestination = "NEXTAVAILABLE"; var redirectXTRAvalue = XDchannel; @@ -2211,7 +2450,18 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} {var redirecttype = 'RedirectXtraCX';} else {var redirecttype = 'RedirectXtra';} - xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=" + redirecttype + "&format=text&channel=" + redirectvalue + "&call_server_ip=" + redirectserverip + "&queryCID=" + queryCID + "&exten=" + redirectdestination + "&ext_context=" + ext_context + "&ext_priority=1&extrachannel=" + redirectXTRAvalue + "&lead_id=" + document.vicidial_form.lead_id.value + "&phone_code=" + document.vicidial_form.phone_code.value + "&phone_number=" + document.vicidial_form.phone_number.value + "&campaign=CL_" + campaign + '' + closerxfercamptail; + DispO3waychannel = redirectvalue; + DispO3wayXtrAchannel = redirectXTRAvalue; + DispO3wayCalLserverip = redirectserverip; + DispO3wayCalLxfernumber = document.vicidial_form.xfernumber.value; + DispO3wayCalLcamptail = document.vicidial_form.xfercode.value; + + xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=" + redirecttype + "&format=text&channel=" + redirectvalue + "&call_server_ip=" + redirectserverip + "&queryCID=" + queryCID + "&exten=" + redirectdestination + "&ext_context=" + ext_context + "&ext_priority=1&extrachannel=" + redirectXTRAvalue + "&lead_id=" + document.vicidial_form.lead_id.value + "&phone_code=" + document.vicidial_form.phone_code.value + "&phone_number=" + document.vicidial_form.phone_number.value+ "&filename=" + taskdebugnote + "&campaign=CL_" + campaign + '' + closerxfercamptail; + + if (taskdebugnote == 'FIRST') + { + document.getElementById("DispoSelectHAspan").innerHTML = "Leave 3Way Call Again"; + } } if (taskvar == 'ParK') { @@ -2257,7 +2507,6 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} Nactiveext = null; Nactiveext = xmlhttp.responseText; // alert(xmlhttp.responseText); - hideMainXfeR(); } } delete xmlhttp; @@ -2326,7 +2575,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} "&list_id=" + document.vicidial_form.list_id.value + "&length_in_sec=0&phone_code=" + document.vicidial_form.phone_code.value + "&phone_number=" + lead_dial_number + - "&exten=" + extension + "&channel=" + lastcustchannel + "&start_epoch=" + MDlogEPOCH + "&auto_dial_level=" + auto_dial_level + "&VDstop_rec_after_each_call=" + VDstop_rec_after_each_call + "&conf_silent_prefix=" + conf_silent_prefix + "&protocol=" + protocol + "&extension=" + extension + "&ext_context=" + ext_context + "&conf_exten=" + session_id + "&user_abb=" + user_abb + "&agent_log_id=" + agent_log_id; + "&exten=" + extension + "&channel=" + lastcustchannel + "&start_epoch=" + MDlogEPOCH + "&auto_dial_level=" + auto_dial_level + "&VDstop_rec_after_each_call=" + VDstop_rec_after_each_call + "&conf_silent_prefix=" + conf_silent_prefix + "&protocol=" + protocol + "&extension=" + extension + "&ext_context=" + ext_context + "&conf_exten=" + session_id + "&user_abb=" + user_abb + "&agent_log_id=" + agent_log_id + "&MDnextCID=" + LasTCID + "&DB=0"; xmlhttp.open('POST', 'vdc_db_query.php'); xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8'); // document.getElementById("busycallsdebug").innerHTML = "vdc_db_query.php?" + manDiaLlog_query; @@ -2538,7 +2787,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} // ################################################################################ // Open page to enter details for a new manual dial lead - function NeWManuaLDiaLCalL() + function NeWManuaLDiaLCalL(TVfast) { if ( (AutoDialWaiting == 1) || (VD_live_customer_call==1) || (alt_dial_active==1) ) { @@ -2546,7 +2795,14 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} } else { - showDiv('NeWManuaLDiaLBox'); + if (TVfast=='FAST') + { + NeWManuaLDiaLCalLSubmiTfast(); + } + else + { + showDiv('NeWManuaLDiaLBox'); + } } } @@ -2584,6 +2840,34 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} document.vicidial_form.MDDiaLOverridE.value = ''; } +// ################################################################################ +// Fast version of manual dial + function NeWManuaLDiaLCalLSubmiTfast() + { + var MDDiaLCodEform = document.vicidial_form.phone_code.value; + var MDPhonENumbeRform = document.vicidial_form.phone_number.value; + + if ( (MDDiaLCodEform.length < 1) || (MDPhonENumbeRform.length < 5) ) + { + alert("VOCÊ DEVE DAR ENTRADA A um NÚMERO De TELEFONE E A um CÓDIGO DoSELETOR PARA USAR O SELETOR RÁPIDO"); + } + else + { + var MDLookuPLeaD = 'new'; + if (document.vicidial_form.LeadLookuP.checked==true) + {MDLookuPLeaD = 'lookup';} + + alt_phone_dialing=1; + auto_dial_level=0; + manual_dial_in_progress=1; + MainPanelToFront(); + buildDiv('DiaLLeaDPrevieW'); + buildDiv('DiaLDiaLAltPhonE'); + document.vicidial_form.LeadPreview.checked=false; + document.vicidial_form.DiaLAltPhonE.checked=true; + ManualDialNext("","",MDDiaLCodEform,MDPhonENumbeRform,MDLookuPLeaD); + } + } // ################################################################################ // Request lookup of manual dial channel @@ -2662,7 +2946,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} document.getElementById("MainStatuSSpan").innerHTML = " Ó partido chamado: " + document.vicidial_form.xfernumber.value + " UID: " + CIDcheck; - document.getElementById("Leave3WayCall").innerHTML ="\"CHAMADA"; + document.getElementById("Leave3WayCall").innerHTML ="\"CHAMADA"; document.getElementById("DialWithCustomer").innerHTML ="\"Seletor"; @@ -2715,8 +2999,8 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} document.getElementById("DialBlindVMail").innerHTML = "\"Blind"; - document.getElementById("VolumeUpSpan").innerHTML = ""; - document.getElementById("VolumeDownSpan").innerHTML = ""; + document.getElementById("VolumeUpSpan").innerHTML = ""; + document.getElementById("VolumeDownSpan").innerHTML = ""; // INSERT VICISELETOR_LOG ENTRY FOR THIS CHAMADA PROCESS @@ -2805,6 +3089,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} else { fronter = user; + LasTCID = MDnextResponse_array[0]; document.vicidial_form.lead_id.value = MDnextResponse_array[1]; LeaDPreVDispO = MDnextResponse_array[2]; document.vicidial_form.vendor_lead_code.value = MDnextResponse_array[4]; @@ -2839,9 +3124,12 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} CBcallback_time = MDnextResponse_array[29]; CBuser = MDnextResponse_array[30]; CBcomments = MDnextResponse_array[31]; - + dialed_number = MDnextResponse_array[32]; + dialed_label = MDnextResponse_array[33]; + lead_dial_number = document.vicidial_form.phone_number.value; document.getElementById("MainStatuSSpan").innerHTML = " Chamada: " + document.vicidial_form.phone_number.value + " UID: " + MDnextCID + "   " + man_status; + if ( (dialed_label.length < 3) || (dialed_label=='NONE') ) {dialed_label='MAIN';} web_form_vars = "lead_id=" + document.vicidial_form.lead_id.value + @@ -2887,6 +3175,8 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} "&phone=" + document.vicidial_form.phone_number.value + "&parked_by=" + document.vicidial_form.lead_id.value + "&dispo=" + LeaDDispO + '' + + "&dialed_number=" + dialed_number + '' + + "&dialed_label=" + dialed_label + '' + webform_session; // $VICISELETOR_web_QUERY_STRING =~ s/ /+/gi; @@ -3071,6 +3361,9 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} { var manDiaLonly_num = document.vicidial_form.alt_phone.value; lead_dial_number = document.vicidial_form.alt_phone.value; + dialed_number = lead_dial_number; + dialed_label = 'ALT'; + WebFormRefresH(''); } else { @@ -3078,11 +3371,17 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} { var manDiaLonly_num = document.vicidial_form.address3.value; lead_dial_number = document.vicidial_form.address3.value; - } + dialed_number = lead_dial_number; + dialed_label = 'ADDR3'; + WebFormRefresH(''); + } else { var manDiaLonly_num = document.vicidial_form.phone_number.value; lead_dial_number = document.vicidial_form.phone_number.value; + dialed_number = lead_dial_number; + dialed_label = 'MAIN'; + WebFormRefresH(''); } } var xmlhttp=false; @@ -3213,7 +3512,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} } if (xmlhttp) { - autoDiaLready_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=" + taskaction + "&user=" + user + "&pass=" + pass + "&stage=" + VDRP_stage + "&agent_log_id=" + agent_log_id + "&agent_log=" + taskagentlog; + autoDiaLready_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=" + taskaction + "&user=" + user + "&pass=" + pass + "&stage=" + VDRP_stage + "&agent_log_id=" + agent_log_id + "&agent_log=" + taskagentlog + "&campaign=" + campaign; xmlhttp.open('POST', 'vdc_db_query.php'); xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8'); xmlhttp.send(autoDiaLready_query); @@ -3379,6 +3678,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} custchannellive=1; + LasTCID = check_VDIC_array[4]; LeaDPreVDispO = check_VDIC_array[6]; fronter = check_VDIC_array[7]; document.vicidial_form.vendor_lead_code.value = check_VDIC_array[8]; @@ -3411,6 +3711,8 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} CBcallback_time = check_VDIC_array[33]; CBuser = check_VDIC_array[34]; CBcomments = check_VDIC_array[35]; + dialed_number = check_VDIC_array[36]; + dialed_label = check_VDIC_array[37]; lead_dial_number = document.vicidial_form.phone_number.value; document.getElementById("MainStatuSSpan").innerHTML = " Entrante: " + document.vicidial_form.phone_number.value + " UID: " + CIDcheck + "   " + VDIC_fronter; @@ -3451,8 +3753,8 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} if (lastcustserverip == server_ip) { - document.getElementById("VolumeUpSpan").innerHTML = ""; - document.getElementById("VolumeDownSpan").innerHTML = ""; + document.getElementById("VolumeUpSpan").innerHTML = ""; + document.getElementById("VolumeDownSpan").innerHTML = ""; } document.getElementById("DiaLControl").innerHTML = DiaLControl_auto_HTML_OFF; @@ -3461,6 +3763,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} {var group = VDCL_group_id;} else {var group = campaign;} + if ( (dialed_label.length < 3) || (dialed_label=='NONE') ) {dialed_label='MAIN';} web_form_vars = "lead_id=" + document.vicidial_form.lead_id.value + @@ -3507,6 +3810,8 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} "&phone=" + document.vicidial_form.phone_number.value + "&parked_by=" + document.vicidial_form.lead_id.value + "&dispo=" + LeaDDispO + '' + + "&dialed_number=" + dialed_number + '' + + "&dialed_label=" + dialed_label + '' + webform_session; var regWFspace = new RegExp(" ","ig"); @@ -3568,6 +3873,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} {var group = VDCL_group_id;} else {var group = campaign;} + if ( (dialed_label.length < 3) || (dialed_label=='NONE') ) {dialed_label='MAIN';} web_form_vars = "lead_id=" + document.vicidial_form.lead_id.value + @@ -3614,6 +3920,8 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} "&phone=" + document.vicidial_form.phone_number.value + "&parked_by=" + document.vicidial_form.lead_id.value + "&dispo=" + LeaDDispO + '' + + "&dialed_number=" + dialed_number + '' + + "&dialed_label=" + dialed_label + '' + webform_session; var regWFspace = new RegExp(" ","ig"); @@ -3658,6 +3966,28 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} } +// ################################################################################ +// Send leave 3way call a second time from the dispo screen + function DispoLeavE3wayAgaiN() + { + XDchannel = DispO3wayXtrAchannel; + document.vicidial_form.xfernumber.value = DispO3wayCalLxfernumber; + document.vicidial_form.xfercode.value = DispO3wayCalLcamptail; + MDchannel = DispO3waychannel; + lastcustserverip = DispO3wayCalLserverip; + + document.getElementById("DispoSelectHAspan").innerHTML = ""; + + leave_3way_call('SECOND'); + + DispO3waychannel = ''; + DispO3wayXtrAchannel = ''; + DispO3wayCalLserverip = ''; + DispO3wayCalLxfernumber = ''; + DispO3wayCalLcamptail = ''; + } + + // ################################################################################ // Start Hangup Functions for both function bothcall_send_hangup() @@ -3670,7 +4000,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} // ################################################################################ // Send Hangup command for customer call connected to the conference now to Manager - function dialedcall_send_hangup(dispowindow) + function dialedcall_send_hangup(dispowindow,hotkeysused,altdispo) { var form_cust_channel = document.vicidial_form.callchannel.value; var form_cust_serverip = document.vicidial_form.callserverip.value; @@ -3808,10 +4138,36 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} if (document.vicidial_form.DiaLAltPhonE.checked==true) { reselect_alt_dial = 1; + if (altdispo == 'ALTPH2') + { + ManualDialOnly('ALTTelefoneE'); + } + else + { + if (altdispo == 'ADDR3') + { + ManualDialOnly('AddresS3'); + } + else + { + if (hotkeysused == 'YES') + { + reselect_alt_dial = 0; + manual_auto_hotkey = 1; + } + } + } } else { - document.getElementById("DiaLControl").innerHTML = "\"Número"; + if (hotkeysused == 'YES') + { + manual_auto_hotkey = 1; + } + else + { + document.getElementById("DiaLControl").innerHTML = "\"Número"; + } reselect_alt_dial = 0; } } @@ -3820,6 +4176,27 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} if (document.vicidial_form.DiaLAltPhonE.checked==true) { reselect_alt_dial = 1; + if (altdispo == 'ALTPH2') + { + ManualDialOnly('ALTTelefoneE'); + } + else + { + if (altdispo == 'ADDR3') + { + ManualDialOnly('AddresS3'); + } + else + { + if (hotkeysused == 'YES') + { + document.getElementById("MainStatuSSpan").style.background = panel_bgcolor; + document.getElementById("MainStatuSSpan").innerHTML = ''; + document.getElementById("DiaLControl").innerHTML = DiaLControl_auto_HTML_OFF; + reselect_alt_dial = 0; + } + } + } } else { @@ -3965,6 +4342,14 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} // Update vicidial_list lead record with all altered values from form function CustomerData_update() { + + var REGcommentsAMP = new RegExp('&',"g"); + var REGcommentsQUES = new RegExp("\\?","g"); + var REGcommentsPOUND = new RegExp("\\#","g"); + var REGcommentsRESULT = document.vicidial_form.comments.value.replace(REGcommentsAMP, "--AMP--"); + REGcommentsRESULT = REGcommentsRESULT.replace(REGcommentsQUES, "--QUES--"); + REGcommentsRESULT = REGcommentsRESULT.replace(REGcommentsPOUND, "--POUND--"); + var xmlhttp=false; /*@cc_on @*/ /*@if (@_jscript_version >= 5) @@ -3986,7 +4371,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} } if (xmlhttp) { - VLupdate_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=updateLEAD&format=text&user=" + user + "&pass=" + pass + + VLupdate_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&campaign=" + campaign + "&ACTION=updateLEAD&format=text&user=" + user + "&pass=" + pass + "&lead_id=" + document.vicidial_form.lead_id.value + "&vendor_lead_code=" + document.vicidial_form.vendor_lead_code.value + "&phone_number=" + document.vicidial_form.phone_number.value + @@ -4007,7 +4392,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} "&alt_phone=" + document.vicidial_form.alt_phone.value + "&email=" + document.vicidial_form.email.value + "&security_phrase=" + document.vicidial_form.security_phrase.value + - "&comments=" + document.vicidial_form.comments.value; + "&comments=" + REGcommentsRESULT; xmlhttp.open('POST', 'vdc_db_query.php'); xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8'); xmlhttp.send(VLupdate_query); @@ -4053,6 +4438,34 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} document.getElementById("DispoSelectContent").innerHTML = dispo_HTML; } +// ################################################################################ +// Generate the Pausa Code Chooser panel + function PauseCodeSelectContent_create() + { + if ( (AutoDialWaiting == 1) || (VD_live_customer_call==1) || (alt_dial_active==1) ) + { + alert("VOCÊ DEVE SER PAUSADO PARA DAR ENTRADA A um CÓDIGO Da PAUSA NaMODALIDADE De AUTO-SELETOR"); + } + else + { + showDiv('PausaCodeSelectBox'); + WaitingForNextStep=1; + PausaCode_HTML = ''; + document.vicidial_form.PausaCodeSelection.value = ''; + var VD_pause_codes_ct_half = parseInt(VD_pause_codes_ct / 2); + PausaCode_HTML = "
Call Wrapup sekundy remaining in wrapup



@@ -5653,23 +6137,28 @@ Twój Status:
Calls Dialing: + +
Wasza sesja była uszkadzana
WYLOGUJ

Wróć +
+
+ +

WYLOGUJ
- +
- +
 
- +
Zmiany wprowadzone w informacjach o kliencie będą zapisane tylko podczas trwania połączenia. Nie po rozłączaniu!.
- +
REZULTAT ROZMOWY :       Rozłącz się ponownie       minimalizuj
Koniec rozmowy, wybierz rezultat
@@ -5682,8 +6171,15 @@ Twój Status:
Calls Dialing: +
WYBÓR SZYFR PRZERWY :
+ Przerwa Code Selection + +

  +
+
- +
Wybierz datę oddzwonienia :
@@ -5726,7 +6222,7 @@ Twój Status:
Calls Dialing: + @@ -5823,6 +6302,7 @@ NUMER NAGRANIA:
+
SELEKCJA GRUPY ZAWNĘTRZNYCH FINALIZUJĄCYCH
Selekcja grupy zawnętrznych finalizujących
@@ -5737,7 +6233,7 @@ Twój Status:
Calls Dialing: + Kanał Kanał @@ -5747,25 +6243,8 @@ Twój Status:
Calls Dialing: - - - - - -
AKTYWNA ROZMOWA PRZENIESIONA
Kanały do przeniesienia: Kanał
NumerWenętrzny:
Menu rozszerzeń
-
- Przełącz do wybranego numeru wewnętrznego

- Przełącz do poczty głosowej

- Przełącz do numeru:


- ODSWIEŻ


- Wróć do Głównego okna

-
Konferencje:
(wybierz poniższy numer w celu przełączenia do konferencji)
Przełącz również mój kanał
Menu konferencji
-
- - - +
VICIWYBIERZ SCRIPT
@@ -5809,7 +6288,7 @@ NUMER NAGRANIA:

Odłącz kilenta

-Wyślij tonowo
+
Wyślij tonowo

@@ -5851,14 +6331,18 @@ NUMER NAGRANIA:
+\n";} + {echo "\n";} else - {echo "\n";} + {echo "\n";} ?> - + +
sekundy:   Kanał:   Ustawiony Czas:   Email:
Komentarz: +
+
diff --git a/agc_2-X/trunk/LANG_www/agc_pt/conf_exten_check.php b/agc_2-X/trunk/LANG_www/agc_pt/conf_exten_check.php index 4fdba665..5bc22d09 100644 --- a/agc_2-X/trunk/LANG_www/agc_pt/conf_exten_check.php +++ b/agc_2-X/trunk/LANG_www/agc_pt/conf_exten_check.php @@ -33,6 +33,7 @@ # 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 # 61128-2255 - Added update for manual dial vicidial_live_agents +# 70319-1542 - Added agent disabled display function # require("dbconnect.php"); @@ -69,8 +70,8 @@ if (!isset($format)) {$format="text";} if (!isset($ACTION)) {$ACTION="refresh";} if (!isset($client)) {$client="agc";} -$version = '0.0.10'; -$build = '61128-2255'; +$version = '0.0.11'; +$build = '70319-1542'; $StarTtime = date("U"); $NOW_DATE = date("Y-m-d"); $NOW_TIME = date("Y-m-d H:i:s"); @@ -144,6 +145,23 @@ echo " if ($client == 'vdc') { + $Acount=0; + $AexternalDEAD=0; + + ### see if the agent has a record in the vicidial_live_agents table + $stmt="SELECT count(*) 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); + $Acount=$row[0]; + + # ### find out if external table shows agent should be disabled + # $stmt="SELECT count(*) from another_table where user='$user' and status='DEAD';"; + # if ($DB) {echo "|$stmt|\n";} + # $rslt=mysql_query($stmt, $link); + # $row=mysql_fetch_row($rslt); + # $AexternalDEAD=$row[0]; + if ($auto_dial_level > 0) { ### update the vicidial_live_agents every second with a new random number so it is shown to be alive @@ -186,6 +204,9 @@ echo " } + if ($Acount < 1) {$Astatus='DEAD_VLA';} + if ($AexternalDEAD > 0) {$Astatus='DEAD_EXTERNAL';} + echo 'DateTime: ' . $NOW_TIME . '|UnixTime: ' . $StarTtime . '|Status: ' . $Astatus . '|CampCalls: ' . $RingCalls . "|\n"; } diff --git a/agc_2-X/trunk/LANG_www/agc_pt/manager_send.php b/agc_2-X/trunk/LANG_www/agc_pt/manager_send.php index 485587de..c4e0e5e8 100644 --- a/agc_2-X/trunk/LANG_www/agc_pt/manager_send.php +++ b/agc_2-X/trunk/LANG_www/agc_pt/manager_send.php @@ -1,7 +1,7 @@ LICENSE: GPLv2 +# Copyright (C) 2007 Matt Florell 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 @@ -12,7 +12,7 @@ # - $user # - $pass # optional variables: -# - $ACTION - ('Originate','Redirect','Hangup','Command','Monitor','StopMonitor','SysCIDOriginate','RedirectName','RedirectNameVmail','MonitorConf','StopMonitorConf','RedirectXtra','RedirectXtraCX','RedirectVD','HangupConfDial','VolumeControl') +# - $ACTION - ('Originate','Redirect','Hangup','Command','Monitor','StopMonitor','SysCIDOriginate','RedirectName','RedirectNameVmail','MonitorConf','StopMonitorConf','RedirectXtra','RedirectXtraCX','RedirectVD','HangupConfDial','VolumeControl','OriginateVDRelogin') # - $queryCID - ('CN012345678901234567',...) # - $format - ('text','debug') # - $channel - ('Zap/41-1','SIP/test101-1jut','IAX2/iaxy@iaxy',...) @@ -35,7 +35,7 @@ # - $stage - ('UP','DOWN') # -# changes +# CHANGELOG: # 50401-1002 - First build of script, Hangup function only # 50404-1045 - Redirect basic function enabled # 50406-1522 - Monitor basic function enabled @@ -64,6 +64,10 @@ # 61004-1526 - Added parsing of volume control command and lookup or number # 61130-1617 - Added lead_id to MonitorConf for recording_log # 61201-1115 - Added user to MonitorConf for recording_log +# 70111-1600 - added ability to use BLEND/INBND/*_C/*_B/*_I as closer campaigns +# 70226-1251 - Added Mute/UnMute to conference volume control +# 70320-1502 - Added option to allow retry of leave-3way-call and debug logging +# 70322-1636 - Added sipsak display ability # require("dbconnect.php"); @@ -123,6 +127,16 @@ if (isset($_GET["phone_number"])) {$phone_number=$_GET["phone_number"];} elseif (isset($_POST["phone_number"])) {$phone_number=$_POST["phone_number"];} if (isset($_GET["stage"])) {$stage=$_GET["stage"];} elseif (isset($_POST["stage"])) {$stage=$_POST["stage"];} +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["phone_ip"])) {$phone_ip=$_GET["phone_ip"];} + elseif (isset($_POST["phone_ip"])) {$phone_ip=$_POST["phone_ip"];} +if (isset($_GET["enable_sipsak_messages"])) {$enable_sipsak_messages=$_GET["enable_sipsak_messages"];} + elseif (isset($_POST["enable_sipsak_messages"])) {$enable_sipsak_messages=$_POST["enable_sipsak_messages"];} +if (isset($_GET["allow_sipsak_messages"])) {$allow_sipsak_messages=$_GET["allow_sipsak_messages"];} + elseif (isset($_POST["allow_sipsak_messages"])) {$allow_sipsak_messages=$_POST["allow_sipsak_messages"];} $user=ereg_replace("[^0-9a-zA-Z]","",$user); $pass=ereg_replace("[^0-9a-zA-Z]","",$pass); @@ -133,8 +147,8 @@ if (!isset($ACTION)) {$ACTION="Originate";} if (!isset($format)) {$format="alert";} if (!isset($ext_priority)) {$ext_priority="1";} -$version = '2.0.27'; -$build = '61130-1617'; +$version = '2.0.29'; +$build = '70320-1502'; $StarTtime = date("U"); $NOW_DATE = date("Y-m-d"); $NOW_TIME = date("Y-m-d H:i:s"); @@ -279,6 +293,21 @@ if ($ACTION=="OriginateNameVmail") } } +if ($ACTION=="OriginateVDRelogin") +{ + if ( ($enable_sipsak_messages > 0) and ($allow_sipsak_messages > 0) and (eregi("SIP",$protocol)) ) + { + $CIDdate = date("ymdHis"); + $DS='-'; + $SIPSAK_prefix = 'LIN-'; + print "\n"; + passthru("/usr/local/bin/sipsak -M -O desktop -B \"$SIPSAK_prefix$campaign\" -r 5060 -s sip:$extension@$phone_ip > /dev/null"); + $queryCID = "$SIPSAK_prefix$campaign$DS$CIDdate"; + + } + $ACTION="Originate"; +} + if ($ACTION=="Originate") { if ( (strlen($exten)<1) or (strlen($channel)<1) or (strlen($ext_context)<1) or (strlen($queryCID)<10) ) @@ -430,7 +459,7 @@ if ($ACTION=="RedirectVD") else { if (strlen($call_server_ip)>6) {$server_ip = $call_server_ip;} - if (eregi("CLOSER",$campaign)) + if (eregi("(CLOSER|BLEND|INBND|_C$|_B$|_I$)",$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";} @@ -560,6 +589,7 @@ if ($ACTION=="RedirectNameVmail") if ($ACTION=="RedirectXtraCX") { + $DBout=''; $row=''; $rowx=''; $channel_liveX=1; $channel_liveY=1; @@ -575,6 +605,15 @@ if ($ACTION=="RedirectXtraCX") 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"; + if (ereg("SECOND|FIRST|DEBUG",$filename)) + { + if ($WeBRooTWritablE > 0) + { + $fp = fopen ("./vicidial_debug.txt", "a"); + fwrite ($fp, "$NOW_TIME|RDCXC|$filename|$user|$campaign|$$channel|$extrachannel|$queryCID|$exten|$ext_context|ext_priority|\n"); + fclose($fp); + } + } } else { @@ -594,6 +633,7 @@ if ($ACTION=="RedirectXtraCX") { $channel_liveX=0; echo "Canaleta $channel não está vivo em $call_server_ip, Redirect comando não introduzido\n"; + if (ereg("SECOND|FIRST|DEBUG",$filename)) {$DBout .= "$channel não está vivo em $call_server_ip";} } } $stmt="SELECT count(*) FROM live_channels where server_ip = '$server_ip' and channel='$extrachannel';"; @@ -610,6 +650,7 @@ if ($ACTION=="RedirectXtraCX") { $channel_liveY=0; echo "Canaleta $channel não está vivo em $server_ip, Redirect comando não introduzido\n"; + if (ereg("SECOND|FIRST|DEBUG",$filename)) {$DBout .= "$channel não está vivo em $server_ip";} } } if ( ($channel_liveX==1) && ($channel_liveY==1) ) @@ -622,6 +663,7 @@ if ($ACTION=="RedirectXtraCX") { $channel_liveY=0; echo "No Local agent to send call to, Redirect comando não introduzido\n"; + if (ereg("SECOND|FIRST|DEBUG",$filename)) {$DBout .= "No Local agent to send call to";} } else { @@ -654,6 +696,7 @@ if ($ACTION=="RedirectXtraCX") $rslt=mysql_query($stmt, $link); echo "RedirectXtraCX comando emitido para Canaleta $channel em $call_server_ip and \nHungup $extrachannel em $server_ip\n"; + if (ereg("SECOND|FIRST|DEBUG",$filename)) {$DBout .= "$channel em $call_server_ip, Hungup $extrachannel em $server_ip";} } } else @@ -662,8 +705,19 @@ if ($ACTION=="RedirectXtraCX") {$ACTION="Redirect"; $server_ip = $call_server_ip;} if ($channel_liveY==1) {$ACTION="Redirect"; $channel=$extrachannel;} - + if (ereg("SECOND|FIRST|DEBUG",$filename)) {$DBout .= "Changed to Redirect: $channel em $server_ip";} } + + if (ereg("SECOND|FIRST|DEBUG",$filename)) + { + if ($WeBRooTWritablE > 0) + { + $fp = fopen ("./vicidial_debug.txt", "a"); + fwrite ($fp, "$NOW_TIME|RDCXC|$filename|$user|$campaign|$DBout|\n"); + fclose($fp); + } + } + } } @@ -688,6 +742,15 @@ if ($ACTION=="RedirectXtra") 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"; + if (ereg("SECOND|FIRST|DEBUG",$filename)) + { + if ($WeBRooTWritablE > 0) + { + $fp = fopen ("./vicidial_debug.txt", "a"); + fwrite ($fp, "$NOW_TIME|RDX|$filename|$user|$campaign|$$channel|$extrachannel|$queryCID|$exten|$ext_context|ext_priority|\n"); + fclose($fp); + } + } } else { @@ -708,6 +771,7 @@ if ($ACTION=="RedirectXtra") { $channel_liveX=0; echo "Não pode encontrar a conferência vazia em $server_ip, Redirect comando não introduzido\n"; + if (ereg("SECOND|FIRST|DEBUG",$filename)) {$DBout .= "Não pode encontrar a conferência vazia em $server_ip";} } } @@ -717,7 +781,7 @@ if ($ACTION=="RedirectXtra") if ($format=='debug') {echo "\n";} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); - if ($row[0]==0) + if ( ($row[0]==0) && (!ereg("SECOND",$filename)) ) { $stmt="SELECT count(*) FROM live_sip_channels where server_ip = '$call_server_ip' and channel='$channel';"; if ($format=='debug') {echo "\n";} @@ -727,13 +791,14 @@ if ($ACTION=="RedirectXtra") { $channel_liveX=0; echo "Canaleta $channel não está vivo em $call_server_ip, Redirect comando não introduzido\n"; + if (ereg("SECOND|FIRST|DEBUG",$filename)) {$DBout .= "$channel não está vivo em $call_server_ip";} } } $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) + if ( ($row[0]==0) && (!ereg("SECOND",$filename)) ) { $stmt="SELECT count(*) FROM live_sip_channels where server_ip = '$server_ip' and channel='$extrachannel';"; if ($format=='debug') {echo "\n";} @@ -743,6 +808,7 @@ if ($ACTION=="RedirectXtra") { $channel_liveY=0; echo "Canaleta $channel não está vivo em $server_ip, Redirect comando não introduzido\n"; + if (ereg("SECOND|FIRST|DEBUG",$filename)) {$DBout .= "$channel não está vivo em $server_ip";} } } if ( ($channel_liveX==1) && ($channel_liveY==1) ) @@ -754,6 +820,7 @@ if ($ACTION=="RedirectXtra") $rslt=mysql_query($stmt, $link); echo "RedirectXtra comando emitido para Canaleta $channel and \nExtraCanaleta $extrachannel\n to $exten em $server_ip\n"; + if (ereg("SECOND|FIRST|DEBUG",$filename)) {$DBout .= "$channel and $extrachannel to $exten em $server_ip";} } else { @@ -778,6 +845,7 @@ if ($ACTION=="RedirectXtra") $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"; + if (ereg("SECOND|FIRST|DEBUG",$filename)) {$DBout .= "$channel/$call_server_ip and $extrachannel/$server_ip to $exten";} } } else @@ -788,6 +856,17 @@ if ($ACTION=="RedirectXtra") {$ACTION="Redirect"; $channel=$extrachannel;} } + + if (ereg("SECOND|FIRST|DEBUG",$filename)) + { + if ($WeBRooTWritablE > 0) + { + $fp = fopen ("./vicidial_debug.txt", "a"); + fwrite ($fp, "$NOW_TIME|RDX|$filename|$user|$campaign|$DBout|\n"); + fclose($fp); + } + } + } } } @@ -1018,8 +1097,10 @@ if ($ACTION=="VolumeControl") else { $participant_number='XXYYXXYYXXYYXX'; + if (eregi('UP',$stage)) {$vol_prefix='4';} if (eregi('DOWN',$stage)) {$vol_prefix='3';} - else {$vol_prefix='4';} + if (eregi('UNMUTE',$stage)) {$vol_prefix='2';} + if (eregi('MUTING',$stage)) {$vol_prefix='1';} $local_DEF = 'Local/'; $local_AMP = '@'; $volume_local_channel = "$local_DEF$participant_number$vol_prefix$exten$local_AMP$ext_context"; diff --git a/agc_2-X/trunk/LANG_www/agc_pt/vdc_db_query.php b/agc_2-X/trunk/LANG_www/agc_pt/vdc_db_query.php index 601d64e5..b758fd0e 100644 --- a/agc_2-X/trunk/LANG_www/agc_pt/vdc_db_query.php +++ b/agc_2-X/trunk/LANG_www/agc_pt/vdc_db_query.php @@ -1,7 +1,7 @@ LICENSE: GPLv2 +# Copyright (C) 2007 Matt Florell 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 @@ -13,7 +13,7 @@ # - $pass # optional variables: # - $format - ('text','debug') -# - $ACTION - ('regCLOSER','manDiaLnextCALL','manDiaLskip','manDiaLonly','manDiaLlookCALL','manDiaLlogCALL','userLOGout','updateDISPO','VDADpause','VDADready','VDADcheckINCOMING','UpdatEFavoritEs','CalLBacKLisT','CalLBacKCounT') +# - $ACTION - ('regCLOSER','manDiaLnextCALL','manDiaLskip','manDiaLonly','manDiaLlookCALL','manDiaLlogCALL','userLOGout','updateDISPO','VDADpause','VDADready','VDADcheckINCOMING','UpdatEFavoritEs','CalLBacKLisT','CalLBacKCounT','PauseCodeSubmit') # - $stage - ('start','finish','lookup','new') # - $closer_choice - ('CL_TESTCAMP_L CL_OUT123_L -') # - $conf_exten - ('8600011',...) @@ -70,7 +70,7 @@ # - $omit_phone_code - ('Y','N') # - $no_delete_sessions - ('0','1') -# changes +# CHANGELOG: # 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 @@ -101,7 +101,7 @@ # - 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 +# 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 @@ -110,10 +110,28 @@ # 60821-1647 - Added ability to not delete sessions at logout # 60906-1124 - Added lookup and sending of callback data for CALLBK calls # 61128-2229 - Added vicidial_live_agents and vicidial_auto_calls manual dial entries +# 70111-1600 - Added ability to use BLEND/INBND/*_C/*_B/*_I as closer campaigns +# 70115-1733 - Added alt_dial functionality in auto-dial modes +# 70118-1501 - Added user_group to vicidial_log,_agent_log,_closer_log,_callbacks +# 70123-1357 - Fixed bug that would not update vicidial_closer_log status to dispo +# 70202-1438 - Added pause code submit function +# 70203-0930 - Added dialed_number to lead info output +# 70203-1030 - Added dialed_label to lead info output +# 70206-1126 - Added INBOUND status for inbound/closer calls in vicidial_live_agents +# 70212-1253 - Fixed small issue with CXFER +# 70213-1431 - Added QueueMetrics PAUSE/UNPAUSE/AGENTLOGIN/AGENTLOGOFF actions +# 70214-1231 - Added queuemetrics_log_id field for server_id in queue_log +# 70215-1210 - Added queuemetrics COMPLETEAGENT action +# 70216-1051 - Fixed double call complete queuemetrics logging +# 70222-1616 - Changed queue_log PAUSE/UNPAUSE to PAUSEALL/UNPAUSEALL +# 70309-1034 - Allow amphersands and questions marks in comments to pass through +# 70313-1052 - Allow pound signs(hash) in comments to pass through +# 70319-1544 - Added agent disable update customer data function +# 70322-1545 - Added sipsak display ability # -$version = '2.0.38'; -$build = '61128-2229'; +$version = '2.0.55'; +$build = '70322-1545'; require("dbconnect.php"); @@ -240,6 +258,10 @@ if (isset($_GET["use_internal_dnc"])) {$use_internal_dnc=$_GET["use_internal_d elseif (isset($_POST["use_internal_dnc"])) {$use_internal_dnc=$_POST["use_internal_dnc"];} if (isset($_GET["omit_phone_code"])) {$omit_phone_code=$_GET["omit_phone_code"];} elseif (isset($_POST["omit_phone_code"])) {$omit_phone_code=$_POST["omit_phone_code"];} +if (isset($_GET["phone_ip"])) {$phone_ip=$_GET["phone_ip"];} + elseif (isset($_POST["phone_ip"])) {$phone_ip=$_POST["phone_ip"];} +if (isset($_GET["enable_sipsak_messages"])) {$enable_sipsak_messages=$_GET["enable_sipsak_messages"];} + elseif (isset($_POST["enable_sipsak_messages"])) {$enable_sipsak_messages=$_POST["enable_sipsak_messages"];} $user=ereg_replace("[^0-9a-zA-Z]","",$user); @@ -261,6 +283,7 @@ $CIDdate = date("mdHis"); $ENTRYdate = date("YmdHis"); if (!isset($query_date)) {$query_date = $NOW_DATE;} $MT[0]=''; +$agents='@agents'; $stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;"; if ($DB) {echo "|$stmt|\n";} @@ -375,7 +398,7 @@ if ($ACTION == 'manDiaLnextCaLL') 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) ) + if ( (strlen($callback_id)>0) and (strlen($lead_id)>0) ) { $affected_rows=1; $CBleadIDset=1; @@ -421,7 +444,7 @@ if ($ACTION == 'manDiaLnextCaLL') if ($DB) {echo "$stmt\n";} $rslt=mysql_query($stmt, $link); $affected_rows = mysql_affected_rows($link); - $lead_id = mysql_insert_id(); + $lead_id = mysql_insert_id($link); $CBleadIDset=1; } } @@ -432,7 +455,7 @@ if ($ACTION == 'manDiaLnextCaLL') if ($DB) {echo "$stmt\n";} $rslt=mysql_query($stmt, $link); $affected_rows = mysql_affected_rows($link); - $lead_id = mysql_insert_id(); + $lead_id = mysql_insert_id($link); $CBleadIDset=1; } } @@ -535,7 +558,7 @@ if ($ACTION == 'manDiaLnextCaLL') $rslt=mysql_query($stmt, $link); } - $stmt="UPDATE vicidial_agent_log set lead_id='$lead_id' where agent_log_id='$agent_log_id';"; + $stmt="UPDATE vicidial_agent_log set lead_id='$lead_id',comments='MANUAL' where agent_log_id='$agent_log_id';"; if ($format=='debug') {echo "\n";} $rslt=mysql_query($stmt, $link); @@ -579,7 +602,7 @@ if ($ACTION == 'manDiaLnextCaLL') $rslt=mysql_query($stmt, $link); ### update the agent status to INCALL in vicidial_live_agents - $stmt = "UPDATE vicidial_live_agents set status='INCALL',last_call_time='$NOW_TIME',callerid='$MqueryCID',lead_id='$lead_id' where user='$user' and server_ip='$server_ip';"; + $stmt = "UPDATE vicidial_live_agents set status='INCALL',last_call_time='$NOW_TIME',callerid='$MqueryCID',lead_id='$lead_id',comments='MANUAL' where user='$user' and server_ip='$server_ip';"; if ($DB) {echo "$stmt\n";} $rslt=mysql_query($stmt, $link); } @@ -619,6 +642,8 @@ if ($ACTION == 'manDiaLnextCaLL') $LeaD_InfO .= $CBcallback_time . "\n"; $LeaD_InfO .= $CBuser . "\n"; $LeaD_InfO .= $CBcomments . "\n"; + $LeaD_InfO .= $phone_number . "\n"; + $LeaD_InfO .= "MAIN\n"; echo $LeaD_InfO; @@ -716,7 +741,7 @@ if ($ACTION == 'manDiaLonly') $rslt=mysql_query($stmt, $link); ### update the agent status to INCALL in vicidial_live_agents - $stmt = "UPDATE vicidial_live_agents set status='INCALL',last_call_time='$NOW_TIME',callerid='$MqueryCID',lead_id='$lead_id' where user='$user' and server_ip='$server_ip';"; + $stmt = "UPDATE vicidial_live_agents set status='INCALL',last_call_time='$NOW_TIME',callerid='$MqueryCID',lead_id='$lead_id',comments='MANUAL' where user='$user' and server_ip='$server_ip';"; if ($DB) {echo "$stmt\n";} $rslt=mysql_query($stmt, $link); @@ -795,8 +820,18 @@ if ($stage == "start") } else { + $user_group=''; + $stmt="SELECT user_group FROM vicidial_users where user='$user' LIMIT 1;"; + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $ug_record_ct = mysql_num_rows($rslt); + if ($ug_record_ct > 0) + { + $row=mysql_fetch_row($rslt); + $user_group = trim("$row[0]"); + } ##### 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');"; + $stmt="INSERT INTO vicidial_log (uniqueid,lead_id,list_id,campaign_id,call_date,start_epoch,status,phone_code,phone_number,user,comments,processed,user_group) values('$uniqueid','$lead_id','$list_id','$campaign','$NOW_TIME','$StarTtime','INCALL','$phone_code','$phone_number','$user','MANUAL','N','$user_group');"; if ($DB) {echo "$stmt\n";} $rslt=mysql_query($stmt, $link); $affected_rows = mysql_affected_rows($link); @@ -844,10 +879,10 @@ if ($stage == "end") { if ($start_epoch < 1000) { - if (eregi("CLOSER",$campaign)) + if (eregi("(CLOSER|BLEND|INBND|_C$|_B$|_I$)",$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';"; + $stmt="SELECT start_epoch FROM vicidial_closer_log where phone_number='$phone_number' and lead_id='$lead_id' and user='$user' order by closecallid desc limit 1;"; } else { @@ -870,32 +905,249 @@ if ($stage == "end") } else {$length_in_sec = ($StarTtime - $start_epoch);} - if (eregi("CLOSER",$campaign)) + if (eregi("(CLOSER|BLEND|INBND|_C$|_B$|_I$)",$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); } + + ############################################# + ##### COMEÇO QUEUEMETRICS LOGGING LOOKUP ##### + $stmt = "SELECT enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_log_id FROM system_settings;"; + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $qm_conf_ct = mysql_num_rows($rslt); + $i=0; + while ($i < $qm_conf_ct) + { + $row=mysql_fetch_row($rslt); + $enable_queuemetrics_logging = $row[0]; + $queuemetrics_server_ip = $row[1]; + $queuemetrics_dbname = $row[2]; + $queuemetrics_login = $row[3]; + $queuemetrics_pass = $row[4]; + $queuemetrics_log_id = $row[5]; + $i++; + } + ##### END QUEUEMETRICS LOGGING LOOKUP ##### + ########################################### + if ($auto_dial_level > 0) { + ### check to see if campaign has alt_dial enabled + $stmt="SELECT auto_alt_dial FROM vicidial_campaigns where campaign_id='$campaign';"; + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $VAC_mancall_ct = mysql_num_rows($rslt); + if ($VAC_mancall_ct > 0) + { + $row=mysql_fetch_row($rslt); + $auto_alt_dial =$row[0]; + } + else {$auto_alt_dial = 'NONE';} + if (eregi("(ALT_ONLY|ADDR3_ONLY|ALT_AND_ADDR3)",$auto_alt_dial)) + { + ### check to see if lead should be alt_dialed + $stmt="SELECT alt_dial FROM vicidial_auto_calls where lead_id='$lead_id';"; + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $VAC_mancall_ct = mysql_num_rows($rslt); + if ($VAC_mancall_ct > 0) + { + $row=mysql_fetch_row($rslt); + $alt_dial =$row[0]; + } + else {$alt_dial = 'NONE';} + + if ( (eregi("(NONE|MAIN)",$alt_dial)) and (eregi("(ALT_ONLY|ALT_AND_ADDR3)",$auto_alt_dial)) ) + { + $stmt="SELECT alt_phone,gmt_offset_now,state FROM vicidial_list where lead_id='$lead_id';"; + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $VAC_mancall_ct = mysql_num_rows($rslt); + if ($VAC_mancall_ct > 0) + { + $row=mysql_fetch_row($rslt); + $alt_phone = $row[0]; + $alt_phone = eregi_replace("[^0-9]","",$alt_phone); + $gmt_offset_now = $row[1]; + $state = $row[2]; + } + else {$alt_phone = '';} + if (strlen($alt_phone)>5) + { + ### insert record into vicidial_hopper for address3 call attempt + $stmt = "INSERT INTO vicidial_hopper SET lead_id='$lead_id',campaign_id='$campaign',status='HOLD',list_id='$list_id',gmt_offset_now='$gmt_offset_now',state='$state',alt_dial='ALT',user='';"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + } + } + if ( ( (eregi("(ALT)",$alt_dial)) and (eregi("ALT_AND_ADDR3",$auto_alt_dial)) ) or ( (eregi("(NONE|MAIN)",$alt_dial)) and (eregi("ADDR3_ONLY",$auto_alt_dial)) ) ) + { + $stmt="SELECT address3,gmt_offset_now,state FROM vicidial_list where lead_id='$lead_id';"; + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $VAC_mancall_ct = mysql_num_rows($rslt); + if ($VAC_mancall_ct > 0) + { + $row=mysql_fetch_row($rslt); + $address3 = $row[0]; + $address3 = eregi_replace("[^0-9]","",$address3); + $gmt_offset_now = $row[1]; + $state = $row[2]; + } + else {$address3 = '';} + if (strlen($address3)>5) + { + ### insert record into vicidial_hopper for address3 call attempt + $stmt = "INSERT INTO vicidial_hopper SET lead_id='$lead_id',campaign_id='$campaign',status='HOLD',list_id='$list_id',gmt_offset_now='$gmt_offset_now',state='$state',alt_dial='ADDR3',user='';"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + } + } + } + + if ($enable_queuemetrics_logging > 0) + { + ### check to see if lead should be alt_dialed + $stmt="SELECT auto_call_id,lead_id,phone_number,status,campaign_id,phone_code,alt_dial,stage,callerid,uniqueid from vicidial_auto_calls where lead_id='$lead_id';"; + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $VAC_qm_ct = mysql_num_rows($rslt); + if ($VAC_qm_ct > 0) + { + $row=mysql_fetch_row($rslt); + $auto_call_id = $row[0]; + $CLlead_id = $row[1]; + $CLphone_number = $row[2]; + $CLstatus = $row[3]; + $CLcampaign_id = $row[4]; + $CLphone_code = $row[5]; + $CLalt_dial = $row[6]; + $CLstage = $row[7]; + $CLcallerid = $row[8]; + $CLuniqueid = $row[9]; + } + + $CLstage = preg_replace("/.*-/",'',$CLstage); + if (strlen($CLstage) < 1) {$CLstage=0;} + + $linkB=mysql_connect("$queuemetrics_server_ip", "$queuemetrics_login", "$queuemetrics_pass"); + mysql_select_db("$queuemetrics_dbname", $linkB); + + $stmt="SELECT count(*) from queue_log where call_id='$MDnextCID' and verb='COMPLETECALLER';"; + $rslt=mysql_query($stmt, $linkB); + if ($DB) {echo "$stmt\n";} + $VAC_cc_ct = mysql_num_rows($rslt); + if ($VAC_cc_ct > 0) + { + $row=mysql_fetch_row($rslt); + $caller_complete = $row[0]; + } + + if ($caller_complete < 1) + { + $stmt = "INSERT INTO queue_log SET partition='P01',time_id='$StarTtime',call_id='$MDnextCID',queue='$campaign',agent='Agent/$user',verb='COMPLETEAGENT',data1='$CLstage',data2='$length_in_sec',data3='1',serverid='$queuemetrics_log_id';"; + if ($DB) {echo "$stmt\n";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $linkB); + $affected_rows = mysql_affected_rows($linkB); + } + mysql_close($linkB); + } + ### delete call record from vicidial_auto_calls - $stmt = "DELETE from vicidial_auto_calls where uniqueid='$uniqueid';"; + $stmt = "DELETE from vicidial_auto_calls where lead_id='$lead_id';"; 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';"; + + $stmt = "UPDATE vicidial_live_agents set status='PAUSED',lead_id='',uniqueid=0,callerid='',channel='',call_server_ip='',last_call_finish='$NOW_TIME',comments='' where user='$user' and server_ip='$server_ip';"; if ($DB) {echo "$stmt\n";} $rslt=mysql_query($stmt, $link); + $affected_rows = mysql_affected_rows($link); + if ($affected_rows > 0) + { + if ($enable_queuemetrics_logging > 0) + { + $linkB=mysql_connect("$queuemetrics_server_ip", "$queuemetrics_login", "$queuemetrics_pass"); + mysql_select_db("$queuemetrics_dbname", $linkB); + + $stmt = "INSERT INTO queue_log SET partition='P01',time_id='$StarTtime',call_id='NONE',queue='NONE',agent='Agent/$user',verb='PAUSAALL',serverid='$queuemetrics_log_id';"; + if ($DB) {echo "$stmt\n";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $linkB); + $affected_rows = mysql_affected_rows($linkB); + + mysql_close($linkB); + } + } } else { + if ($enable_queuemetrics_logging > 0) + { + ### check to see if lead should be alt_dialed + $stmt="SELECT auto_call_id,lead_id,phone_number,status,campaign_id,phone_code,alt_dial,stage,callerid,uniqueid from vicidial_auto_calls where lead_id='$lead_id';"; + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $VAC_qm_ct = mysql_num_rows($rslt); + if ($VAC_qm_ct > 0) + { + $row=mysql_fetch_row($rslt); + $auto_call_id = $row[0]; + $CLlead_id = $row[1]; + $CLphone_number = $row[2]; + $CLstatus = $row[3]; + $CLcampaign_id = $row[4]; + $CLphone_code = $row[5]; + $CLalt_dial = $row[6]; + $CLstage = $row[7]; + $CLcallerid = $row[8]; + $CLuniqueid = $row[9]; + } + + $CLstage = preg_replace("/XFER|-/",'',$CLstage); + if ($CLstage < 0.25) {$CLstage=0;} + + $linkB=mysql_connect("$queuemetrics_server_ip", "$queuemetrics_login", "$queuemetrics_pass"); + mysql_select_db("$queuemetrics_dbname", $linkB); + + $stmt = "INSERT INTO queue_log SET partition='P01',time_id='$StarTtime',call_id='$MDnextCID',queue='$campaign',agent='Agent/$user',verb='COMPLETEAGENT',data1='$CLstage',data2='$length_in_sec',data3='1',serverid='$queuemetrics_log_id';"; + if ($DB) {echo "$stmt\n";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $linkB); + $affected_rows = mysql_affected_rows($linkB); + + mysql_close($linkB); + } + $stmt = "DELETE from vicidial_auto_calls lead_id='$lead_id';"; 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';"; + $stmt = "UPDATE vicidial_live_agents set status='PAUSED',lead_id='',uniqueid=0,callerid='',channel='',call_server_ip='',last_call_finish='$NOW_TIME',comments='' where user='$user' and server_ip='$server_ip';"; if ($DB) {echo "$stmt\n";} $rslt=mysql_query($stmt, $link); + $affected_rows = mysql_affected_rows($link); + if ($affected_rows > 0) + { + if ($enable_queuemetrics_logging > 0) + { + $linkB=mysql_connect("$queuemetrics_server_ip", "$queuemetrics_login", "$queuemetrics_pass"); + mysql_select_db("$queuemetrics_dbname", $linkB); + + $stmt = "INSERT INTO queue_log SET partition='P01',time_id='$StarTtime',call_id='NONE',queue='NONE',agent='Agent/$user',verb='PAUSAALL',serverid='$queuemetrics_log_id';"; + if ($DB) {echo "$stmt\n";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $linkB); + $affected_rows = mysql_affected_rows($linkB); + + mysql_close($linkB); + } + } } ##### look for the channel in the UPDATED vicidial_manager record of the call initiation @@ -1095,7 +1347,7 @@ if ($ACTION == 'VDADcheckINCOMING') 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';"; + $stmt = "UPDATE vicidial_live_agents set status='INCALL',last_call_time='$NOW_TIME',comments='AUTO' where user='$user' and server_ip='$server_ip';"; if ($DB) {echo "$stmt\n";} $rslt=mysql_query($stmt, $link); @@ -1163,25 +1415,37 @@ if ($ACTION == 'VDADcheckINCOMING') $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';"; + $user_group=''; + $stmt="SELECT user_group FROM vicidial_users where user='$user' LIMIT 1;"; + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $ug_record_ct = mysql_num_rows($rslt); + if ($ug_record_ct > 0) + { + $row=mysql_fetch_row($rslt); + $user_group = trim("$row[0]"); + } + $stmt = "UPDATE vicidial_log set user='$user', comments='AUTO', list_id='$list_id', status='INCALL', user_group='$user_group' where lead_id='$lead_id' and uniqueid='$uniqueid';"; if ($DB) {echo "$stmt\n";} $rslt=mysql_query($stmt, $link); - if (eregi("CLOSER",$campaign)) + if (eregi("(CLOSER|BLEND|INBND|_C$|_B$|_I$)",$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;"; + $stmt = "UPDATE vicidial_closer_log set user='$user', comments='AUTO', list_id='$list_id', status='INCALL', user_group='$user_group' 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;"; + $stmt = "select campaign_id,phone_number,alt_dial 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) + if ($VDAC_cid_ct > 0) { $row=mysql_fetch_row($rslt); $VDADchannel_group =$row[0]; + $dialed_number =$row[1]; + $dialed_label =$row[2]; } $stmt = "select count(*) from vicidial_log where lead_id='$lead_id' and uniqueid='$uniqueid';"; @@ -1211,6 +1475,11 @@ if ($ACTION == 'VDADcheckINCOMING') $VDCL_xferconf_a_number = $row[11]; $VDCL_xferconf_b_dtmf = $row[12]; $VDCL_xferconf_b_number = $row[13]; + + ### update the comments in vicidial_live_agents record + $stmt = "UPDATE vicidial_live_agents set comments='INBOUND' where user='$user' and server_ip='$server_ip';"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); } else { @@ -1263,6 +1532,17 @@ if ($ACTION == 'VDADcheckINCOMING') $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"; + + $stmt = "select phone_number,alt_dial 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 ($VDAC_cid_ct > 0) + { + $row=mysql_fetch_row($rslt); + $dialed_number =$row[0]; + $dialed_label =$row[1]; + } } $comments = eregi_replace("\r",'',$comments); @@ -1300,6 +1580,8 @@ if ($ACTION == 'VDADcheckINCOMING') $LeaD_InfO .= $CBcallback_time . "\n"; $LeaD_InfO .= $CBuser . "\n"; $LeaD_InfO .= $CBcomments . "\n"; + $LeaD_InfO .= $dialed_number . "\n"; + $LeaD_InfO .= $dialed_label . "\n"; echo $LeaD_InfO; @@ -1327,6 +1609,7 @@ if ($ACTION == 'VDADcheckINCOMING') if ($format=='debug') {echo "\n";} $rslt=mysql_query($stmt, $link); } + } else { @@ -1354,8 +1637,18 @@ if ( (strlen($campaign)<1) || (strlen($conf_exten)<1) ) } else { + $user_group=''; + $stmt="SELECT user_group FROM vicidial_users where user='$user' LIMIT 1;"; + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $ug_record_ct = mysql_num_rows($rslt); + if ($ug_record_ct > 0) + { + $row=mysql_fetch_row($rslt); + $user_group = trim("$row[0]"); + } ##### Insert a LOGOUT record into the user log - $stmt="INSERT INTO vicidial_user_log values('','$user','LOGOUT','$campaign','$NOW_TIME','$StarTtime');"; + $stmt="INSERT INTO vicidial_user_log (user,event,campaign_id,event_date,event_epoch,user_group) values('$user','LOGOUT','$campaign','$NOW_TIME','$StarTtime','$user_group');"; if ($DB) {echo "$stmt\n";} $rslt=mysql_query($stmt, $link); $vul_insert = mysql_affected_rows($link); @@ -1390,11 +1683,94 @@ else $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','','','','','','','','','');"; + $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Hangup','ULGH3459$StarTtime','Channel: $agent_channel','','','','','','','','','');"; if ($format=='debug') {echo "\n";} $rslt=mysql_query($stmt, $link); } + $pause_sec=0; + $stmt = "select pause_epoch,pause_sec,wait_epoch,talk_epoch,dispo_epoch 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) and (strlen($row[3]<5)) and (strlen($row[4]<5)) ) + { + $row=mysql_fetch_row($rslt); + $pause_sec = (($StarTtime - $row[0]) + $row[1]); + + $stmt="UPDATE vicidial_agent_log set pause_sec='$pause_sec',wait_epoch='$StarTtime' where agent_log_id='$agent_log_id';"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + } + + if ($vla_delete > 0) + { + ############################################# + ##### COMEÇO QUEUEMETRICS LOGGING LOOKUP ##### + $stmt = "SELECT enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_log_id,allow_sipsak_messages FROM system_settings;"; + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $qm_conf_ct = mysql_num_rows($rslt); + $i=0; + while ($i < $qm_conf_ct) + { + $row=mysql_fetch_row($rslt); + $enable_queuemetrics_logging = $row[0]; + $queuemetrics_server_ip = $row[1]; + $queuemetrics_dbname = $row[2]; + $queuemetrics_login = $row[3]; + $queuemetrics_pass = $row[4]; + $queuemetrics_log_id = $row[5]; + $allow_sipsak_messages = $row[6]; + $i++; + } + ##### END QUEUEMETRICS LOGGING LOOKUP ##### + ########################################### + if ( ($enable_sipsak_messages > 0) and ($allow_sipsak_messages > 0) and (eregi("SIP",$protocol)) ) + { + $SIPSAK_message = 'LOGGED OUT'; + passthru("/usr/local/bin/sipsak -M -O desktop -B \"$SIPSAK_message\" -r 5060 -s sip:$extension@$phone_ip > /dev/null"); + } + + if ($enable_queuemetrics_logging > 0) + { + $linkB=mysql_connect("$queuemetrics_server_ip", "$queuemetrics_login", "$queuemetrics_pass"); + mysql_select_db("$queuemetrics_dbname", $linkB); + + # $stmt = "INSERT INTO queue_log SET partition='P01',time_id='$StarTtime',call_id='NONE',queue='$campaign',agent='Agent/$user',verb='PAUSA',serverid='1';"; + # if ($DB) {echo "$stmt\n";} + # if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + # $rslt=mysql_query($stmt, $linkB); + # $affected_rows = mysql_affected_rows($linkB); + + $stmt = "SELECT time_id FROM queue_log where agent='Agent/$user' and verb='AGENTLOGIN' order by time_id desc limit 1;"; + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $linkB); + if ($DB) {echo "$stmt\n";} + echo "$stmt\n"; + $li_conf_ct = mysql_num_rows($rslt); + $i=0; + while ($i < $li_conf_ct) + { + $row=mysql_fetch_row($rslt); + $logintime = $row[0]; + $i++; + } + + $time_logged_in = ($StarTtime - $logintime); + if ($time_logged_in > 1000000) {$time_logged_in=1;} + + $stmt = "INSERT INTO queue_log SET partition='P01',time_id='$StarTtime',call_id='NONE',queue='$campaign',agent='Agent/$user',verb='AGENTLOGOFF',data1='$user$agents',data2='$time_logged_in',serverid='$queuemetrics_log_id';"; + if ($DB) {echo "$stmt\n";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $linkB); + $affected_rows = mysql_affected_rows($linkB); + + mysql_close($linkB); + } + } + echo "$vul_insert|$vc_remove|$vla_delete|$wcs_delete|$agent_channel\n"; } } @@ -1423,7 +1799,14 @@ if ($ACTION == 'updateDISPO') if ($format=='debug') {echo "\n";} $rslt=mysql_query($stmt, $link); - if ( ($use_internal_dnc=='Y') and ($dispo_choice=='DNC') ) + if (eregi("(CLOSER|BLEND|INBND|_C$|_B$|_I$)",$campaign)) + { + $stmt = "UPDATE vicidial_closer_log set status='$dispo_choice' where lead_id='$lead_id' and user='$user' order by closecallid desc limit 1;"; + if ($DB) {echo "$stmt\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";} @@ -1450,20 +1833,91 @@ if ($ACTION == 'updateDISPO') 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');"; + $user_group=''; + $stmt="SELECT user_group FROM vicidial_users where user='$user' LIMIT 1;"; + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $ug_record_ct = mysql_num_rows($rslt); + if ($ug_record_ct > 0) + { + $row=mysql_fetch_row($rslt); + $user_group = trim("$row[0]"); + } + + $stmt="INSERT INTO vicidial_agent_log (user,server_ip,event_time,campaign_id,pause_epoch,pause_sec,wait_epoch,user_group) values('$user','$server_ip','$NOW_TIME','$campaign','$StarTtime','0','$StarTtime','$user_group');"; if ($DB) {echo "$stmt\n";} $rslt=mysql_query($stmt, $link); $affected_rows = mysql_affected_rows($link); - $agent_log_id = mysql_insert_id(); + $agent_log_id = mysql_insert_id($link); ### CHAMADABACK 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');"; + $stmt="INSERT INTO vicidial_callbacks (lead_id,list_id,campaign_id,status,entry_time,callback_time,user,recipient,comments,user_group) values('$lead_id','$list_id','$campaign','ACTIVE','$NOW_TIME','$CallBackDatETimE','$user','$recipient','$comments','$user_group');"; if ($DB) {echo "$stmt\n";} $rslt=mysql_query($stmt, $link); } + $stmt="SELECT auto_alt_dial_statuses from vicidial_campaigns where campaign_id='$campaign';"; + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + + if ( ($auto_dial_level > 0) and (ereg(" $dispo_choice ",$row[0])) ) + { + $stmt = "select count(*) from vicidial_hopper where lead_id='$lead_id' and status='HOLD';"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + + if ($row[0] > 0) + { + $stmt="UPDATE vicidial_hopper set status='READY' where lead_id='$lead_id' and status='HOLD' limit 1;"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + } + } + else + { + $stmt="DELETE from vicidial_hopper where lead_id='$lead_id' and status='HOLD';"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + } + + ############################################# + ##### COMEÇO QUEUEMETRICS LOGGING LOOKUP ##### + $stmt = "SELECT enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_log_id FROM system_settings;"; + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $qm_conf_ct = mysql_num_rows($rslt); + $i=0; + while ($i < $qm_conf_ct) + { + $row=mysql_fetch_row($rslt); + $enable_queuemetrics_logging = $row[0]; + $queuemetrics_server_ip = $row[1]; + $queuemetrics_dbname = $row[2]; + $queuemetrics_login = $row[3]; + $queuemetrics_pass = $row[4]; + $queuemetrics_log_id = $row[5]; + $i++; + } + ##### END QUEUEMETRICS LOGGING LOOKUP ##### + ########################################### + if ($enable_queuemetrics_logging > 0) + { + $linkB=mysql_connect("$queuemetrics_server_ip", "$queuemetrics_login", "$queuemetrics_pass"); + mysql_select_db("$queuemetrics_dbname", $linkB); + + $stmt = "INSERT INTO queue_log SET partition='P01',time_id='$StarTtime',call_id='$MDnextCID',queue='$campaign',agent='Agent/$user',verb='CALLSTATUS',data1='$dispo_choice',serverid='$queuemetrics_log_id';"; + if ($DB) {echo "$stmt\n";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $linkB); + $affected_rows = mysql_affected_rows($linkB); + + mysql_close($linkB); + } + echo 'Lead ' . $lead_id . ' foi mudado a ' . $dispo_choice . " Status\nNext agent_log_id:\n" . $agent_log_id . "\n"; } @@ -1475,6 +1929,8 @@ if ($ACTION == 'updateLEAD') { $MT[0]=''; $row=''; $rowx=''; + $DO_NOT_UPDATE=0; + $DO_NOT_UPDATE_text=''; if ( (strlen($phone_number)<1) || (strlen($lead_id)<1) ) { echo "phone_number $phone_number or lead_id $lead_id é inválido\n"; @@ -1482,12 +1938,54 @@ if ($ACTION == 'updateLEAD') } 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";} + $stmt = "SELECT disable_alter_custdata FROM vicidial_campaigns where campaign_id='$campaign'"; + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $dac_conf_ct = mysql_num_rows($rslt); + $i=0; + while ($i < $dac_conf_ct) + { + $row=mysql_fetch_row($rslt); + $disable_alter_custdata = $row[0]; + $i++; + } + if (ereg('Y',$disable_alter_custdata)) + { + $DO_NOT_UPDATE=1; + $DO_NOT_UPDATE_text=' NOT'; + $stmt = "SELECT alter_custdata_override FROM vicidial_users where user='$user'"; + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $aco_conf_ct = mysql_num_rows($rslt); + $i=0; + while ($i < $aco_conf_ct) + { + $row=mysql_fetch_row($rslt); + $alter_custdata_override = $row[0]; + $i++; + } + if (ereg('ALLOW_ALTER',$alter_custdata_override)) + { + $DO_NOT_UPDATE=0; + $DO_NOT_UPDATE_text=''; + } + } + + if ($DO_NOT_UPDATE < 1) + { + $comments = eregi_replace("\r",'',$comments); + $comments = eregi_replace("\n",'!N',$comments); + $comments = eregi_replace("--AMP--",'&',$comments); + $comments = eregi_replace("--QUES--",'?',$comments); + $comments = eregi_replace("--POUND--",'#',$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';"; @@ -1495,7 +1993,7 @@ if ($ACTION == 'updateLEAD') $rslt=mysql_query($stmt, $link); } - echo "Lead $lead_id a informação foi atualizada\n"; + echo "Lead $lead_id information has$DO_NOT_UPDATE_text been updated\n"; } @@ -1515,10 +2013,54 @@ if ( ($ACTION == 'VDADpause') || ($ACTION == 'VDADready') ) 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';"; + $stmt="UPDATE vicidial_live_agents set lead_id='',uniqueid=0,callerid='',channel='', random_id='$random',comments='' where user='$user' and server_ip='$server_ip';"; if ($format=='debug') {echo "\n";} $rslt=mysql_query($stmt, $link); + $stmt="UPDATE vicidial_live_agents set status='$stage' where user='$user' and server_ip='$server_ip';"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + $affected_rows = mysql_affected_rows($link); + if ($affected_rows > 0) + { + ############################################# + ##### COMEÇO QUEUEMETRICS LOGGING LOOKUP ##### + $stmt = "SELECT enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_log_id FROM system_settings;"; + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $qm_conf_ct = mysql_num_rows($rslt); + $i=0; + while ($i < $qm_conf_ct) + { + $row=mysql_fetch_row($rslt); + $enable_queuemetrics_logging = $row[0]; + $queuemetrics_server_ip = $row[1]; + $queuemetrics_dbname = $row[2]; + $queuemetrics_login = $row[3]; + $queuemetrics_pass = $row[4]; + $queuemetrics_log_id = $row[5]; + $i++; + } + ##### END QUEUEMETRICS LOGGING LOOKUP ##### + ########################################### + if ($enable_queuemetrics_logging > 0) + { + if (ereg('READY',$stage)) {$QMstatus='UNPAUSEALL';} + if (ereg('PAUSA',$stage)) {$QMstatus='PAUSAALL';} + $linkB=mysql_connect("$queuemetrics_server_ip", "$queuemetrics_login", "$queuemetrics_pass"); + mysql_select_db("$queuemetrics_dbname", $linkB); + + $stmt = "INSERT INTO queue_log SET partition='P01',time_id='$StarTtime',call_id='NONE',queue='NONE',agent='Agent/$user',verb='$QMstatus',serverid='$queuemetrics_log_id';"; + if ($DB) {echo "$stmt\n";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $linkB); + $affected_rows = mysql_affected_rows($linkB); + + mysql_close($linkB); + } + } + if ($agent_log == 'NO') {$donothing=1;} else @@ -1587,6 +2129,71 @@ if ($ACTION == 'UpdatEFavoritEs') } +################################################################################ +### PauseCodeSubmit - Update vicidial_agent_log with pause code +################################################################################ +if ($ACTION == 'PausaCodeSubmit') +{ + $row=''; $rowx=''; + if ( (strlen($status)<1) || (strlen($agent_log_id)<1) ) + { + echo "agent_log_id $agent_log_id or pause_code $status é inválido\n"; + exit; + } + else + { + $stmt="UPDATE vicidial_agent_log set sub_status=\"$status\" where agent_log_id='$agent_log_id';"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + $affected_rows = mysql_affected_rows($link); + if ($affected_rows > 0) + { + ############################################# + ##### COMEÇO QUEUEMETRICS LOGGING LOOKUP ##### + $stmt = "SELECT enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_log_id,allow_sipsak_messages FROM system_settings;"; + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $qm_conf_ct = mysql_num_rows($rslt); + $i=0; + while ($i < $qm_conf_ct) + { + $row=mysql_fetch_row($rslt); + $enable_queuemetrics_logging = $row[0]; + $queuemetrics_server_ip = $row[1]; + $queuemetrics_dbname = $row[2]; + $queuemetrics_login = $row[3]; + $queuemetrics_pass = $row[4]; + $queuemetrics_log_id = $row[5]; + $allow_sipsak_messages = $row[6]; + $i++; + } + ##### END QUEUEMETRICS LOGGING LOOKUP ##### + ########################################### + if ( ($enable_sipsak_messages > 0) and ($allow_sipsak_messages > 0) and (eregi("SIP",$protocol)) ) + { + $SIPSAK_prefix = 'BK-'; + passthru("/usr/local/bin/sipsak -M -O desktop -B \"$SIPSAK_prefix$status\" -r 5060 -s sip:$extension@$phone_ip > /dev/null"); + } + if ($enable_queuemetrics_logging > 0) + { + $linkB=mysql_connect("$queuemetrics_server_ip", "$queuemetrics_login", "$queuemetrics_pass"); + mysql_select_db("$queuemetrics_dbname", $linkB); + + $stmt = "INSERT INTO queue_log SET partition='P01',time_id='$StarTtime',call_id='NONE',queue='$campaign',agent='Agent/$user',verb='PAUSAREASON',serverid='$queuemetrics_log_id',data1='$status';"; + if ($DB) {echo "$stmt\n";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $linkB); + $affected_rows = mysql_affected_rows($linkB); + + mysql_close($linkB); + } + } + } +echo "Pausa Code has been updated to $status for $agent_log_id\n"; +} + + ################################################################################ ### CalLBacKLisT - List the USERONLY callbacks for an agent ################################################################################ diff --git a/agc_2-X/trunk/LANG_www/agc_pt/vicidial.php b/agc_2-X/trunk/LANG_www/agc_pt/vicidial.php index 1723bd8c..baa6d7f8 100644 --- a/agc_2-X/trunk/LANG_www/agc_pt/vicidial.php +++ b/agc_2-X/trunk/LANG_www/agc_pt/vicidial.php @@ -1,7 +1,7 @@ LICENSE: GPLv2 +# Copyright (C) 2007 Matt Florell 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 @@ -15,7 +15,7 @@ # - vdc_db_query.php: Updates information in the database # - manager_send.php: Sends manager actions to the DB for execution # -# CHANGES +# CHANGELOG # 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 @@ -132,8 +132,37 @@ # 61128-2229 - Added vicidial_live_agents and vicidial_auto_calls manual dial entries # 61130-1617 - Added lead_id to MonitorConf for recording_log # 61221-1212 - Changed width to 760 to better fit 800x600 screens, widened SCRIPT +# 70109-1128 - Fixed wrapup timer bug +# 70109-1635 - Added option for HotKeys automatically dialing next number in manual mode +# - Added option for alternate number dialing with hotkeys +# 70111-1600 - Added ability to use BLEND/INBND/*_C/*_B/*_I as closer campaigns +# 70118-1517 - Added vicidial_agent_log and vicidial_user_log logging of user_group +# 70201-1249 - Added FAST DIAL option for manually dialing, added UTF8 compatible code +# 70201-1703 - Fixed cursor bug for most text input fields +# 70202-1453 - Added first portions of Agent Pause Codes +# 70203-0108 - Finished Agent Pause Codes functionality +# 70203-0930 - Added dialed_number to webform output +# 70203-1010 - Added dialed_label to webform output +# 70206-1201 - Fixed allow_closers bug +# 70206-1332 - Added vicidial_recording_override users setting function +# 70212-1252 - Fixed small issue with CXFER +# 70213-1018 - Changed CXFER and AXFER to update customer information before transfer +# 70214-1233 - Added queuemetrics_log_id field for server_id in queue_log +# 70215-1240 - Added queuemetrics_log_id field for server_id in queue_log +# 70222-1617 - Changed queue_log PAUSE/UNPAUSE to PAUSEALL/UNPAUSEALL +# 70226-1252 - Added Mute/UnMute to agent screen +# 70309-1035 - Allow amphersands and questions marks in comments to pass through +# 70313-1052 - Allow pound signs(hash) in comments to pass through +# 70316-1406 - Moved the MUTE button to be accessible during a transfer/conf +# 70319-1446 - Added agent-deactive-display and disable customer info update functions +# 70319-1626 - Added option to allow agent logins to campaigns with no leads in the hopper +# 70320-1501 - Added option to allow retry of leave-3way-call from dispo screen +# 70322-1545 - Added sipsak display ability # +$version = '2.0.129'; +$build = '70322-1545'; + require("dbconnect.php"); if (isset($_GET["DB"])) {$DB=$_GET["DB"];} @@ -172,14 +201,11 @@ if (isset($_GET["relogin"])) {$relogin=$_GET["relogin"];} $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); + $VD_campaign=ereg_replace("[^0-9a-zA-Z_]","",$VD_campaign); $forever_stop=0; -$version = '2.0.105'; -$build = '61221-1212'; - if ($force_logout) { echo "Você tem registrado agora para fora. Obrigado\n"; @@ -226,6 +252,7 @@ $TEST_all_statuses = '0'; # TEST variable allows all statuses in dispo screen $US='_'; $CL=':'; $AT='@'; +$DS='-'; $date = date("r"); $ip = getenv("REMOTE_ADDR"); $browser = getenv("HTTP_USER_AGENT"); @@ -252,6 +279,7 @@ $camp_form_code = " 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $phone_login=$row[0]; @@ -438,6 +467,7 @@ $VDloginDISPLAY=0; { $stmt="SELECT count(*) from vicidial_users where user='$VD_login' and pass='$VD_pass' and user_level > 0;"; if ($DB) {echo "|$stmt|\n";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $auth=$row[0]; @@ -447,7 +477,8 @@ $VDloginDISPLAY=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,user_group from vicidial_users where user='$VD_login' and pass='$VD_pass'"; + $stmt="SELECT full_name,user_level,hotkeys_active,agent_choose_ingroups,scheduled_callbacks,agentonly_callbacks,agentcall_manual,vicidial_recording,vicidial_transfers,closer_default_blended,user_group,vicidial_recording_override from vicidial_users where user='$VD_login' and pass='$VD_pass'"; + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $LOGfullname=$row[0]; @@ -461,6 +492,8 @@ $VDloginDISPLAY=0; $VU_vicidial_transfers=$row[8]; $VU_closer_default_blended=$row[9]; $VU_user_group=$row[10]; + $VU_vicidial_recording_override=$row[11]; + if ($WeBRooTWritablE > 0) { fwrite ($fp, "vdweb|GOOD|$date|$VD_login|$VD_pass|$ip|$browser|$LOGfullname|\n"); @@ -471,6 +504,7 @@ $VDloginDISPLAY=0; {$user_abb = eregi_replace("^.","",$user_abb); $forever_stop++;} $stmt="SELECT allowed_campaigns from vicidial_user_groups where user_group='$VU_user_group';"; + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $LOGallowed_campaigns =$row[0]; @@ -501,6 +535,7 @@ echo " 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $CAMPactive=$row[0]; @@ -512,6 +547,7 @@ echo " 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $VD_statuses_ct = mysql_num_rows($rslt); @@ -528,6 +564,7 @@ echo " 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $VD_statuses_camp = mysql_num_rows($rslt); @@ -548,6 +585,7 @@ echo " 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $HK_statuses_camp = mysql_num_rows($rslt); @@ -577,43 +615,46 @@ echo " 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $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]; - $allcalls_delay=$row[30]; - $omit_phone_code=$row[31]; + $park_ext = $row[0]; + $park_file_name = $row[1]; + $web_form_address = $row[2]; + $allow_closers = $row[3]; + $auto_dial_level = $row[4]; + $dial_timeout = $row[5]; + $dial_prefix = $row[6]; + $campaign_cid = $row[7]; + $campaign_vdad_exten = $row[8]; + $campaign_rec_exten = $row[9]; + $campaign_recording = $row[10]; + $campaign_rec_filename = $row[11]; + $campaign_script = $row[12]; + $get_call_launch = $row[13]; + $campaign_am_message_exten = $row[14]; + $xferconf_a_dtmf = $row[15]; + $xferconf_a_number = $row[16]; + $xferconf_b_dtmf = $row[17]; + $xferconf_b_number = $row[18]; + $alt_number_dialing = $row[19]; + $VC_scheduled_callbacks = $row[20]; + $wrapup_segundos = $row[21]; + $wrapup_message = $row[22]; + $closer_campaigns = $row[23]; + $use_internal_dnc = $row[24]; + $allcalls_delay = $row[25]; + $omit_phone_code = $row[26]; + $agent_pause_codes_active = $row[27]; + $no_hopper_leads_logins = $row[28]; + if ( (!ereg('DISABLED',$VU_vicidial_recording_override)) and ($VU_vicidial_recording > 0) ) + { + $campaign_recording = $VU_vicidial_recording_override; + print "\n"; + } if ( ($VC_scheduled_callbacks=='Y') and ($VU_scheduled_callbacks=='1') ) {$scheduled_callbacks='1';} if ($VU_vicidial_recording=='0') @@ -626,12 +667,37 @@ echo " 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $VD_pause_codes = mysql_num_rows($rslt); + $j=0; + while ($j < $VD_pause_codes) + { + $row=mysql_fetch_row($rslt); + $pause_codes[$i] =$row[0]; + $pause_code_names[$i] =$row[1]; + $VARpause_codes = "$VARpause_codes'$pause_codes[$i]',"; + $VARpause_code_names = "$VARpause_code_names'$pause_code_names[$i]',"; + $i++; + $j++; + } + $VD_pause_codes_ct = ($VD_pause_codes_ct+$VD_pause_codes); + $VARpause_codes = substr("$VARpause_codes", 0, -1); + $VARpause_code_names = substr("$VARpause_code_names", 0, -1); + } + ##### grab the inbound groups to choose from if campaign contains CLOSER $VARingroups="''"; - if (eregi("CLOSER", $VD_campaign)) + if (eregi("(CLOSER|BLEND|INBND|_C$|_B$|_I$)", $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;"; + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $closer_ct = mysql_num_rows($rslt); @@ -648,6 +714,7 @@ echo " 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $row=mysql_fetch_row($rslt); @@ -708,6 +775,7 @@ echo " 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $authphone=$row[0]; @@ -746,6 +814,7 @@ 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";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $extension=$row[0]; @@ -808,6 +877,7 @@ else $DBX_user=$row[57]; $DBX_pass=$row[58]; $DBX_port=$row[59]; + $enable_sipsak_messages=$row[66]; if ($clientDST) { @@ -822,6 +892,7 @@ else $stmt="SELECT asterisk_version from servers where server_ip='$server_ip';"; if ($DB) {echo "|$stmt|\n";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $asterisk_version=$row[0]; @@ -875,21 +946,25 @@ else $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";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $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";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); - if ( (eregi("CLOSER", $VD_campaign)) || ($campaign_leads_to_call > 0) ) + if ( (eregi("(CLOSER|BLEND|INBND|_C$|_B$|_I$)", $VD_campaign)) || ($campaign_leads_to_call > 0) || (ereg('Y',$no_hopper_leads_logins)) ) { ### 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')"; + $stmt = "INSERT INTO vicidial_user_log (user,event,campaign_id,event_date,event_epoch,user_group) values('$VD_login','LOGIN','$VD_campaign','$NOW_TIME','$StarTtimE','$VU_user_group')"; if ($DB) {echo "|$stmt|\n";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $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;"; + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $prev_login_ct = mysql_num_rows($rslt); @@ -906,6 +981,7 @@ 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;"; + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $free_conf_ct = mysql_num_rows($rslt); @@ -917,6 +993,7 @@ else $i++; } $stmt="UPDATE vicidial_conferences set extension='$SIP_user' where server_ip='$server_ip' and conf_exten='$session_id';"; + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); print "\n"; @@ -924,18 +1001,21 @@ else $stmt="UPDATE vicidial_list set status='N', user='' where status IN('QUEUE','INCALL') and user ='$VD_login';"; if ($DB) {echo "$stmt\n";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $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";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $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";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); $affected_rows = mysql_affected_rows($link); print "\n"; @@ -943,11 +1023,45 @@ else # 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 + ### set the callerID for manager middleware-app to connect the phone to the user $SIqueryCID = "S$CIDdate$session_id"; + + ############################################# + ##### COMEÇO SYSTEM_SETTINGS LOOKUP ##### + $stmt = "SELECT enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_log_id,vicidial_agent_disable,allow_sipsak_messages FROM system_settings;"; + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $qm_conf_ct = mysql_num_rows($rslt); + $i=0; + while ($i < $qm_conf_ct) + { + $row=mysql_fetch_row($rslt); + $enable_queuemetrics_logging = $row[0]; + $queuemetrics_server_ip = $row[1]; + $queuemetrics_dbname = $row[2]; + $queuemetrics_login = $row[3]; + $queuemetrics_pass = $row[4]; + $queuemetrics_log_id = $row[5]; + $vicidial_agent_disable = $row[6]; + $allow_sipsak_messages = $row[7]; + $i++; + } + ##### END QUEUEMETRICS LOGGING LOOKUP ##### + ########################################### + + if ( ($enable_sipsak_messages > 0) and ($allow_sipsak_messages > 0) and (eregi("SIP",$protocol)) ) + { + $SIPSAK_prefix = 'LIN-'; + print "\n"; + passthru("/usr/local/bin/sipsak -M -O desktop -B \"$SIPSAK_prefix$VD_campaign\" -r 5060 -s sip:$extension@$phone_ip > /dev/null"); + $SIqueryCID = "$SIPSAK_prefix$VD_campaign$DS$CIDdate"; + } + ### 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";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); $affected_rows = mysql_affected_rows($link); print "\n"; @@ -959,13 +1073,38 @@ else $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";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); $affected_rows = mysql_affected_rows($link); print "\n"; - if (eregi("CLOSER", $VD_campaign)) + if ($enable_queuemetrics_logging > 0) { - print "\n"; + $linkB=mysql_connect("$queuemetrics_server_ip", "$queuemetrics_login", "$queuemetrics_pass"); + mysql_select_db("$queuemetrics_dbname", $linkB); + + $stmt = "INSERT INTO queue_log SET partition='P01',time_id='$StarTtimE',call_id='NONE',queue='$VD_campaign',agent='Agent/$VD_login',verb='AGENTLOGIN',data1='$VD_login@agents',serverid='$queuemetrics_log_id';"; + if ($DB) {echo "$stmt\n";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $linkB); + $affected_rows = mysql_affected_rows($linkB); + print "\n"; + + $stmt = "INSERT INTO queue_log SET partition='P01',time_id='$StarTtimE',call_id='NONE',queue='NONE',agent='Agent/$VD_login',verb='PAUSAALL',serverid='$queuemetrics_log_id';"; + if ($DB) {echo "$stmt\n";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $linkB); + $affected_rows = mysql_affected_rows($linkB); + print "\n"; + + mysql_close($linkB); + mysql_select_db("$VARDB_database", $link); + } + + + if (eregi("(CLOSER|BLEND|INBND|_C$|_B$|_I$)", $VD_campaign)) + { + print "\n"; } } else @@ -974,9 +1113,33 @@ else $stmt="INSERT INTO vicidial_live_agents (user,server_ip,conf_exten,extension,status,lead_id,campaign_id,uniqueid,callerid,channel,random_id,last_call_time,last_update_time,last_call_finish,user_level) values('$VD_login','$server_ip','$session_id','$SIP_user','PAUSED','','$VD_campaign','','','','$random','$NOW_TIME','$tsNOW_TIME','$NOW_TIME','$user_level');"; if ($DB) {echo "$stmt\n";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); $affected_rows = mysql_affected_rows($link); print "\n"; + + if ($enable_queuemetrics_logging > 0) + { + $linkB=mysql_connect("$queuemetrics_server_ip", "$queuemetrics_login", "$queuemetrics_pass"); + mysql_select_db("$queuemetrics_dbname", $linkB); + + $stmt = "INSERT INTO queue_log SET partition='P01',time_id='$StarTtimE',call_id='NONE',queue='$VD_campaign',agent='Agent/$VD_login',verb='AGENTLOGIN',data1='$VD_login@agents',serverid='$queuemetrics_log_id';"; + if ($DB) {echo "$stmt\n";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $linkB); + $affected_rows = mysql_affected_rows($linkB); + print "\n"; + + $stmt = "INSERT INTO queue_log SET partition='P01',time_id='$StarTtimE',call_id='NONE',queue='NONE',agent='Agent/$VD_login',verb='PAUSAALL',serverid='$queuemetrics_log_id';"; + if ($DB) {echo "$stmt\n";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + $rslt=mysql_query($stmt, $linkB); + $affected_rows = mysql_affected_rows($linkB); + print "\n"; + + mysql_close($linkB); + mysql_select_db("$VARDB_database", $link); + } } } else @@ -1027,11 +1190,12 @@ echo "
0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); $affected_rows = mysql_affected_rows($link); - $agent_log_id = mysql_insert_id(); + $agent_log_id = mysql_insert_id($link); print "\n"; $S='*'; @@ -1048,6 +1212,7 @@ echo " 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $MM_scripts = mysql_num_rows($rslt); @@ -1225,6 +1390,10 @@ $CCAL_OUT .= "
"; var CallBackCommenTs = ''; var scheduled_callbacks = ''; var dispo_check_all_pause = ''; + var agent_pause_codes_active = ''; + VARpause_codes = new Array(); + VARpause_code_names = new Array(); + var VD_pause_codes_ct = ''; VARstatuses = new Array(); VARstatusnames = new Array(); var VD_statuses_ct = ''; @@ -1277,6 +1446,7 @@ $CCAL_OUT .= "
"; var dialplan_number = ''; var ext_context = ''; var protocol = ''; + var agentchannel = ''; var local_gmt =''; var server_ip = ''; var server_ip_dialstring = ''; @@ -1292,6 +1462,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} var CalLCID = ''; var MDnextCID = ''; var XDnextCID = ''; + var LasTCID = ''; var lead_dial_number = ''; var MD_channel_look = 0; var XD_channel_look = 0; @@ -1324,11 +1495,6 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} var CalL_AutO_LauncH = ''; var panel_bgcolor = '#E0C2D6'; var CusTCB_bgcolor = '#FFFF66'; - var status_A = ''; - var status_B = ''; - var status_C = ''; - var status_D = ''; - var status_E = ''; var auto_dial_level = ''; var starting_dial_level = ''; var dial_timeout = ''; @@ -1428,11 +1594,24 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} var no_delete_sessions = ''; var webform_session = ''; var local_consult_xfers = ''; + var vicidial_agent_disable = ''; var CBentry_time = ''; var CBcallback_time = ''; var CBuser = ''; var CBcomments = ''; var volumecontrol_active = ''; + var PausaCode_HTML = ''; + var manual_auto_hotkey = 0; + var dialed_number = ''; + var dialed_label = ''; + var DispO3waychannel = ''; + var DispO3wayXtrAchannel = ''; + var DispO3wayCalLserverip = ''; + var DispO3wayCalLxfernumber = ''; + var DispO3wayCalLcamptail = ''; + var phone_ip = ''; + var enable_sipsak_messages = ''; + var allow_sipsak_messages = ''; var DiaLControl_auto_HTML = "\"Pausa\"\"Resumo\""; var DiaLControl_auto_HTML_ready = "\"Pausa\"\"Resumo\""; var DiaLControl_auto_HTML_OFF = "\"Pausa\"\"Resumo\""; @@ -1536,8 +1715,12 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} // ################################################################################ // Send volume control command for meetme participant - function volume_control(taskdirection,taskvolchannel) + function volume_control(taskdirection,taskvolchannel,taskagentmute) { + if (taskagentmute=='AgenT') + { + taskvolchannel = agentchannel; + } var xmlhttp=false; /*@cc_on @*/ /*@if (@_jscript_version >= 5) @@ -1576,6 +1759,18 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} } delete xmlhttp; } + if (taskagentmute=='AgenT') + { + if (taskdirection=='MUTING') + { + document.getElementById("AgentMuteSpan").innerHTML = ""; + } + else + { + document.getElementById("AgentMuteSpan").innerHTML = ""; + } + } + } @@ -1590,9 +1785,9 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} // ################################################################################ // place 3way and customer into other conference and fake-hangup the lines - function leave_3way_call() + function leave_3way_call(tempvarattempt) { - mainxfer_send_redirect('3WAY'); + mainxfer_send_redirect('3WAY','','',tempvarattempt); document.vicidial_form.callchannel.value = ''; document.vicidial_form.callserverip.value = ''; @@ -1653,6 +1848,35 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} // Send Originate command to manager to place a phone call function basic_originate_call(tasknum,taskprefix,taskreverse,taskdialvalue,tasknowait,taskconfxfer) { + var regCXFvars = new RegExp("CXFER","g"); + var tasknum_string = tasknum.toString(); + if (tasknum_string.match(regCXFvars)) + { + var Ctasknum = tasknum_string.replace(regCXFvars, ''); + if (Ctasknum.length < 2) + {Ctasknum = '990009';} + var closerxfercamptail = '_L' + document.vicidial_form.xfercode.value; + tasknum = Ctasknum + "*CL_" + campaign + '' + closerxfercamptail + '*CXFER*' + document.vicidial_form.lead_id.value + '**' + document.vicidial_form.phone_number.value + '*' + user + '*'; + + CustomerData_update(); + + } + var regAXFvars = new RegExp("AXFER","g"); + if (tasknum_string.match(regAXFvars)) + { + var Ctasknum = tasknum_string.replace(regAXFvars, ''); + if (Ctasknum.length < 2) + {Ctasknum = '83009';} + var closerxfercamptail = '_L' + document.vicidial_form.xfercode.value; + if (closerxfercamptail.length < 3) + {closerxfercamptail = 'IVR';} + tasknum = Ctasknum + '*' + document.vicidial_form.phone_number.value + '*' + document.vicidial_form.lead_id.value + '*' + campaign + '*' + closerxfercamptail + '*' + user + '*'; + + CustomerData_update(); + + } + + var xmlhttp=false; /*@cc_on @*/ /*@if (@_jscript_version >= 5) @@ -1674,27 +1898,6 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} } if (xmlhttp) { - var regCXFvars = new RegExp("CXFER","g"); - var tasknum_string = tasknum.toString(); - if (tasknum_string.match(regCXFvars)) - { - var Ctasknum = tasknum_string.replace(regCXFvars, ''); - if (Ctasknum.length < 2) - {Ctasknum = '990009';} - var closerxfercamptail = '_L' + document.vicidial_form.xfercode.value; - tasknum = Ctasknum + "*CL_" + campaign + '' + closerxfercamptail + '**' + document.vicidial_form.lead_id.value + '**' + document.vicidial_form.phone_number.value + '*' + user + '*'; - } - var regAXFvars = new RegExp("AXFER","g"); - if (tasknum_string.match(regAXFvars)) - { - var Ctasknum = tasknum_string.replace(regAXFvars, ''); - if (Ctasknum.length < 2) - {Ctasknum = '83009';} - var closerxfercamptail = '_L' + document.vicidial_form.xfercode.value; - if (closerxfercamptail.length < 3) - {closerxfercamptail = 'IVR';} - tasknum = Ctasknum + '*' + document.vicidial_form.phone_number.value + '*' + document.vicidial_form.lead_id.value + '*' + campaign + '*' + closerxfercamptail + '*' + user + '*'; - } if (taskprefix == 'NO') {var orig_prefix = '';} else {var orig_prefix = agc_dial_prefix;} if (taskreverse == 'YES') @@ -1858,7 +2061,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} UnixTime = parseInt(UnixTime); UnixTimeMS = (UnixTime * 1000); t.setTime(UnixTimeMS); - if (agentcallsstatus == '1') + if ( (agentcallsstatus == '1') || (vicidial_agent_disable != 'NOT_ACTIVE') ) { var Astatus_array = check_time_array[2].split("Status: "); var AGStatuS = Astatus_array[1]; @@ -1872,6 +2075,14 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} { document.getElementById("AgentStatusCalls").innerHTML = CamPCalLs; } + if ( (AGStatuS == 'DEAD_VLA') && ( (vicidial_agent_disable == 'LIVE_AGENT') || (vicidial_agent_disable == 'ALL') ) ) + { + showDiv('AgenTDisablEBoX'); + } + if ( (AGStatuS == 'DEAD_EXTERNAL') && ( (vicidial_agent_disable == 'EXTERNAL') || (vicidial_agent_disable == 'ALL') ) ) + { + showDiv('AgenTDisablEBoX'); + } } var check_conf_array=check_ALL_array[1].split("|"); var live_conf_calls = check_conf_array[0]; @@ -1903,14 +2114,13 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} {var row_color = '#CCCCFF';} var conv_ct = (loop_ct + conv_start); var channelfieldA = conf_chan_array[conv_ct]; - // live_conf_HTML = live_conf_HTML + "
" + loop_ct + "" + channelfieldA + "HangupXFER
" + loop_ct + "" + channelfieldA + "HANGUP
" + loop_ct + "" + channelfieldA + "HANGUP    
" + loop_ct + "" + channelfieldA + "HANGUP          
PAUSA CODE
"; + var loop_ct = 0; + while (loop_ct < VD_pause_codes_ct) + { + PausaCode_HTML = PausaCode_HTML + "" + VARpause_codes[loop_ct] + " - " + VARpause_code_names[loop_ct] + "

"; + loop_ct++; + if (loop_ct == VD_pause_codes_ct_half) + {PausaCode_HTML = PausaCode_HTML + "
";} + } + PausaCode_HTML = PausaCode_HTML + "


Vá Para trás"; + document.getElementById("PausaCodeSelectContent").innerHTML = PausaCode_HTML; + } + } // ################################################################################ // open web form, then submit disposition @@ -4114,7 +4527,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} } if (xmlhttp) { - DSupdate_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=updateDISPO&format=text&user=" + user + "&pass=" + pass + "&dispo_choice=" + DispoChoice + "&lead_id=" + document.vicidial_form.lead_id.value + "&campaign=" + campaign + "&auto_dial_level=" + auto_dial_level + "&agent_log_id=" + agent_log_id + "&CallBackDatETimE=" + CallBackDatETimE + "&list_id=" + document.vicidial_form.list_id.value + "&recipient=" + CallBackrecipient + "&use_internal_dnc=" + use_internal_dnc + "&comments=" + CallBackCommenTs; + DSupdate_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=updateDISPO&format=text&user=" + user + "&pass=" + pass + "&dispo_choice=" + DispoChoice + "&lead_id=" + document.vicidial_form.lead_id.value + "&campaign=" + campaign + "&auto_dial_level=" + auto_dial_level + "&agent_log_id=" + agent_log_id + "&CallBackDatETimE=" + CallBackDatETimE + "&list_id=" + document.vicidial_form.list_id.value + "&recipient=" + CallBackrecipient + "&use_internal_dnc=" + use_internal_dnc + "&MDnextCID=" + LasTCID + "&comments=" + CallBackCommenTs; xmlhttp.open('POST', 'vdc_db_query.php'); xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8'); xmlhttp.send(DSupdate_query); @@ -4124,8 +4537,8 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} { var check_dispo = null; check_dispo = xmlhttp.responseText; - // alert(xmlhttp.responseText); var check_DS_array=check_dispo.split("\n"); + // alert(xmlhttp.responseText + "\n|" + check_DS_array[1] + "\n|" + check_DS_array[2] + "|"); if (check_DS_array[1] == 'Next agent_log_id:') { agent_log_id = check_DS_array[2]; @@ -4203,12 +4616,67 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} AutoDial_ReSume_PauSe("VDADready","NO"); // document.getElementById("DiaLControl").innerHTML = DiaLControl_auto_HTML_ready; } + else + { + // trigger HotKeys manual dial automatically go to next lead + if (manual_auto_hotkey == '1') + { + manual_auto_hotkey = 0; + ManualDialNext('','','','',''); + } + } } } } } } + +// ################################################################################ +// Submit the Pausa Code + function PauseCodeSelect_submit(newpausecode) + { + hideDiv('PausaCodeSelectBox'); + WaitingForNextStep=0; + + var xmlhttp=false; + /*@cc_on @*/ + /*@if (@_jscript_version >= 5) + // JScript gives us Conditional compilation, we can cope with old IE versions. + // and security blocked creation of the objects. + try { + xmlhttp = new ActiveXObject("Msxml2.XMLHTTP"); + } catch (e) { + try { + xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); + } catch (E) { + xmlhttp = false; + } + } + @end @*/ + if (!xmlhttp && typeof XMLHttpRequest!='undefined') + { + xmlhttp = new XMLHttpRequest(); + } + if (xmlhttp) + { + VMCpausecode_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=PausaCodeSubmit&format=text&status=" + newpausecode + "&agent_log_id=" + agent_log_id + "&campaign=" + campaign + "&extension=" + extension + "&protocol=" + protocol + "&phone_ip=" + phone_ip + "&enable_sipsak_messages=" + enable_sipsak_messages; + xmlhttp.open('POST', 'vdc_db_query.php'); + xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8'); + xmlhttp.send(VMCpausecode_query); + xmlhttp.onreadystatechange = function() + { + if (xmlhttp.readyState == 4 && xmlhttp.status == 200) + { + // alert(xmlhttp.responseText); + } + } + delete xmlhttp; + } + } + + + // ################################################################################ // Populate the dtmf and xfer number for each preset link in xfer-conf frame function DtMf_PreSet_a() @@ -4302,7 +4770,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} } if (xmlhttp) { - VMCoriginate_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=Originate&format=text&channel=" + originatevalue + "&queryCID=" + queryCID + "&exten=" + session_id + "&ext_context=" + ext_context + "&ext_priority=1"; + VMCoriginate_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=OriginateVDRelogin&format=text&channel=" + originatevalue + "&queryCID=" + queryCID + "&exten=" + session_id + "&ext_context=" + ext_context + "&ext_priority=1" + "&extension=" + extension + "&protocol=" + protocol + "&phone_ip=" + phone_ip + "&enable_sipsak_messages=" + enable_sipsak_messages + "&allow_sipsak_messages=" + allow_sipsak_messages + "&campaign=" + campaign; xmlhttp.open('POST', 'manager_send.php'); xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8'); xmlhttp.send(VMCoriginate_query); @@ -4489,7 +4957,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} } if (xmlhttp) { - VDlogout_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=userLOGout&format=text&user=" + user + "&pass=" + pass + "&campaign=" + campaign + "&conf_exten=" + session_id + "&extension=" + extension + "&protocol=" + protocol + "&no_delete_sessions=" + no_delete_sessions; + VDlogout_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=userLOGout&format=text&user=" + user + "&pass=" + pass + "&campaign=" + campaign + "&conf_exten=" + session_id + "&extension=" + extension + "&protocol=" + protocol + "&agent_log_id=" + agent_log_id + "&no_delete_sessions=" + no_delete_sessions + "&phone_ip=" + phone_ip + "&enable_sipsak_messages=" + enable_sipsak_messages; xmlhttp.open('POST', 'vdc_db_query.php'); xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8'); xmlhttp.send(VDlogout_query); @@ -4536,14 +5004,24 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} document.vicidial_form.inert_button.focus(); document.vicidial_form.inert_button.blur(); CustomerData_update(); - HKdispo_display = 4; - HKfinish=1; var HKdispo_ary = HKdispo.split(" ----- "); - document.getElementById("HotKeyDispo").innerHTML = HKdispo_ary[0] + " - " + HKdispo_ary[1]; - showDiv('HotKeyActionBox'); - hideDiv('HotKeyEntriesBox'); - document.vicidial_form.DispoSelection.value = HKdispo_ary[0]; - dialedcall_send_hangup('NO'); + if ( (HKdispo_ary[0] == 'ALTPH2') || (HKdispo_ary[0] == 'ADDR3') ) + { + if (document.vicidial_form.DiaLAltPhonE.checked==true) + { + dialedcall_send_hangup('NO', 'YES', HKdispo_ary[0]); + } + } + else + { + HKdispo_display = 4; + HKfinish=1; + document.getElementById("HotKeyDispo").innerHTML = HKdispo_ary[0] + " - " + HKdispo_ary[1]; + showDiv('HotKeyActionBox'); + hideDiv('HotKeyEntriesBox'); + document.vicidial_form.DispoSelection.value = HKdispo_ary[0]; + dialedcall_send_hangup('NO', 'YES', HKdispo_ary[0]); + } // DispoSelect_submit(); // AutoDialWaiting = 1; // AutoDial_ReSume_PauSe("VDADready"); @@ -4899,11 +5377,11 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} hideDiv('CBcommentsBox'); hideDiv('HotKeyActionBox'); hideDiv('HotKeyEntriesBox'); - hideDiv('MainXfeRBox'); hideDiv('MainPanel'); hideDiv('ScriptPanel'); hideDiv('DispoSelectBox'); hideDiv('LogouTBox'); + hideDiv('AgenTDisablEBoX'); hideDiv('CustomerGoneBox'); hideDiv('NoneInSessionBox'); hideDiv('WrapupBox'); @@ -4915,6 +5393,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} hideDiv('DispoButtonHideC'); hideDiv('CallBacKsLisTBox'); hideDiv('NeWManuaLDiaLBox'); + hideDiv('PausaCodeSelectBox'); if (agentonly_callbacks != '1') {hideDiv('CallbacksButtons');} // if ( (agentcall_manual != '1') && (starting_dial_level > 0) ) @@ -4930,6 +5409,15 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} {hideDiv('VolumeControlSpan');} document.vicidial_form.LeadLookuP.checked=true; + if (agent_pause_codes_active=='Y') + { + document.getElementById("PausaCodeLinkSpan").innerHTML = "DÊ ENTRADA A um CÓDIGO Da PAUSA"; + } + if (VICIDiaL_allow_closers < 1) + { + document.getElementById("InternalCloser").style.visibility = 'hidden'; + document.getElementById("LocalCloser").style.visibility = 'hidden'; + } document.getElementById("sessionIDspan").innerHTML = session_id; if ( (campaign_recording == 'NEVER') || (campaign_recording == 'ALLFORCE') ) { @@ -4962,6 +5450,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} if (wrapup_segundos > 0) { showDiv('WrapupBox'); + document.getElementById("WrapupTimer").innerHTML = wrapup_segundos; wrapup_waiting=1; } CustomerData_update(); @@ -4994,39 +5483,6 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} if ( (custchannellive < -30) && (lastcustchannel.length > 3) ) {CustomerChanneLGone();} if ( (custchannellive < -10) && (lastcustchannel.length > 3) ) {ReChecKCustoMerChaN();} if ( (nochannelinsession > 16) && (check_n > 15) ) {NoneInSession();} - if (wrapup_segundos > 0) - { - document.getElementById("WrapupTimer").innerHTML = (wrapup_segundos - wrapup_counter); - wrapup_counter++; - if ( (wrapup_counter > wrapup_segundos) && (document.getElementById("WrapupBox").style.visibility == 'visible') ) - { - wrapup_waiting=0; - hideDiv('WrapupBox'); - if (document.vicidial_form.DispoSelectStop.checked==true) - { - if (auto_dial_level != '0') - { - AutoDialWaiting = 0; - AutoDial_ReSume_PauSe("VDADpause","NO"); - // document.getElementById("DiaLControl").innerHTML = DiaLControl_auto_HTML; - } - VICIDiaL_pause_calling = 1; - if (dispo_check_all_pause != '1') - { - document.vicidial_form.DispoSelectStop.checked=false; - } - } - else - { - if (auto_dial_level != '0') - { - AutoDialWaiting = 1; - AutoDial_ReSume_PauSe("VDADready","NO"); - // document.getElementById("DiaLControl").innerHTML = DiaLControl_auto_HTML_ready; - } - } - } - } if (WaitingForNextStep==0) { // check for live channels in conference room and get current datetime @@ -5108,6 +5564,39 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} // parked_calls_display_refresh(); } } + if (wrapup_segundos > 0) + { + document.getElementById("WrapupTimer").innerHTML = (wrapup_segundos - wrapup_counter); + wrapup_counter++; + if ( (wrapup_counter > wrapup_segundos) && (document.getElementById("WrapupBox").style.visibility == 'visible') ) + { + wrapup_waiting=0; + hideDiv('WrapupBox'); + if (document.vicidial_form.DispoSelectStop.checked==true) + { + if (auto_dial_level != '0') + { + AutoDialWaiting = 0; + AutoDial_ReSume_PauSe("VDADpause","NO"); + // document.getElementById("DiaLControl").innerHTML = DiaLControl_auto_HTML; + } + VICIDiaL_pause_calling = 1; + if (dispo_check_all_pause != '1') + { + document.vicidial_form.DispoSelectStop.checked=false; + } + } + else + { + if (auto_dial_level != '0') + { + AutoDialWaiting = 1; + AutoDial_ReSume_PauSe("VDADready","NO"); + // document.getElementById("DiaLControl").innerHTML = DiaLControl_auto_HTML_ready; + } + } + } + } } } setTimeout("all_refresh()", refresh_interval); @@ -5165,6 +5654,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} if (Cmon == 9) {Cmon = "OUT";} if (Cmon == 10) {Cmon = "NOV";} if (Cmon == 11) {Cmon = "DEZ";} + if (Chours == 12) {AMPM = 'PM';} if (Chours > 12) {Chours = (Chours - 12); AMPM = 'PM';} if (Cmin < 10) {Cmin = "0" + Cmin;} if (Csec < 10) {Csec = "0" + Csec;} @@ -5300,25 +5790,6 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} } } - - function showMainXfeR(divvar,taskxferchan,taskxferchanmain) - { - document.getElementById("MainXfeRBox").style.visibility = 'visible'; - getactiveext("MainXfeRBox"); - conference_list_display_refresh("MainXfeRconfContent"); - var XfeR_channel = taskxferchan; - document.vicidial_form.H_XfeR_channel.value = XfeR_channel; - document.vicidial_form.M_XfeR_channel.value = taskxferchanmain; - document.getElementById("MainXfeRChanneL").innerHTML = XfeR_channel; - } - function hideMainXfeR(divvar) - { - document.getElementById("MainXfeRBox").style.visibility = 'hidden'; - var XfeR_channel = ''; - document.vicidial_form.H_XfeR_channel.value = ''; - document.vicidial_form.M_XfeR_channel.value = ''; - document.getElementById("MainXfeRChanneL").innerHTML = ''; - } function conf_channels_detail(divvar) { if (divvar == 'SHOW') @@ -5360,6 +5831,10 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} { if (showxfervar == 'ON') { + var xfer_height = 310; + if (alt_phone_dialing>0) {xfer_height = (xfer_height + 20);} + if ( (auto_dial_level == 0) && (manual_dial_preview == 1) ) {xfer_height = (xfer_height + 20);} + document.getElementById("TransferMain").style.top = xfer_height; HKbutton_allowed = 0; showDiv('TransferMain'); document.getElementById("XferControl").innerHTML = "\"Transferência"; @@ -5428,17 +5903,13 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} - - @@ -5490,15 +5961,23 @@ echo "\n";

VICISELETOR
- -SELETOR MANUAL
+ +SELETOR MANUAL       SELETOR RÁPIDO
- + 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.
@@ -5509,7 +5988,7 @@ echo "\n";
- + - + @@ -5533,7 +6014,8 @@ echo "\n"; - +
LIGAÇÃO MANUAL NOVA DO SELETOR PARA :

Incorpore a informação abaixo para a ligação que nova você deseja se chamar.
\n";
  (Este é geralmente um 1 nos EUA e no Canadá)
Telefone Number:   (12 digits max - digits only) +   (12 digits max - digits only) +
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)  (os dígitos satisfazem somente) +

Seletor Agora @@ -5557,6 +6039,7 @@ Seu Status:
Calls Dialing:
+
Transferência - Conferência
MAIS PRÓXIMO INTERNO @@ -5582,11 +6065,12 @@ Seu Status:
Calls Dialing: Transferência Da Cortina Do Seletor Blind Transfer VMail Message
+
- +
Ligação Dispositioned Como:

-
@@ -5594,7 +6078,7 @@ Seu Status:
Calls Dialing: + @@ -5610,7 +6094,7 @@ Seu Status:
Calls Dialing: +
Chaves Quentes Da Disposição: Quando ativo, pressione simplesmente a chave de teclado para a:
@@ -5627,7 +6111,7 @@ Seu Status:
Calls Dialing: +
Informação Precedente Da Rechamada:
Noone está em sua sessão:
Vá Para trás

@@ -5635,7 +6119,7 @@ Seu Status:
Calls Dialing: +
O cliente pendurou acima:
Vá Para trás

@@ -5644,7 +6128,7 @@ Seu Status:
Calls Dialing: +
Chamada Wrapup: segundos restantes no wrapup



@@ -5653,23 +6137,28 @@ Seu Status:
Calls Dialing: + +
Sua sessão foi incapacitada
LOGOUT

Vá Para trás +
+
+ +

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.
- + "; echo ""; echo ""; echo ""; -echo ""; +echo ""; echo ""; echo ""; @@ -240,7 +245,7 @@ echo "
CHAMADA DA DISPOSIÇÃO :       Hangup Outra vez       minimize
Extremidade-$$$-CHAME A Seleção Da Disposição
@@ -5682,8 +6171,15 @@ Seu Status:
Calls Dialing: +
SELECIONE Um CÓDIGO Da PAUSA :
+ Pausa Code Selection + +

  +
+
- + "; echo ""; echo ""; echo ""; -echo ""; +echo ""; echo ""; echo ""; @@ -401,9 +436,13 @@ echo "\n\n"; ################################################################################### ###### OUTBOUND CALLS ################################################################################### -if (eregi("CLOSER",$group)) +if (eregi("(CLOSER|BLEND|INBND|_C$|_B$|_I$)",$group)) { $stmt="select closer_campaigns from vicidial_campaigns where campaign_id='" . mysql_real_escape_string($group) . "';"; +if ($non_latin > 0) +{ +$rslt=mysql_query("SET NAMES 'UTF8'"); +} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $closer_campaigns = preg_replace("/^ | -$/","",$row[0]); @@ -419,6 +458,10 @@ else $stmt="select status from vicidial_auto_calls where status NOT IN('XFER') $groupSQL;"; } +if ($non_latin > 0) +{ +$rslt=mysql_query("SET NAMES 'UTF8'"); +} $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $parked_to_print = mysql_num_rows($rslt); @@ -450,7 +493,7 @@ $parked_to_print = mysql_num_rows($rslt); if ($out_live > 9) {$F=''; $FG='';} if ($out_live > 14) {$F=''; $FG='';} - if (eregi("CLOSER",$group)) + if (eregi("(CLOSER|BLEND|INBND|_C$|_B$|_I$)",$group)) {echo "$NFB$out_total$NFE current active calls      \n";} else {echo "$NFB$out_total$NFE calls being placed       \n";} @@ -489,8 +532,8 @@ $HDsessionid = "------------------+"; $HTsessionid = " SESSIONID |"; $HDbarge = "-------+"; $HTbarge = " BARGE |"; -$HDstatus = "--------+"; -$HTstatus = " STATUS |"; +$HDstatus = "----------+"; +$HTstatus = " STATUS |"; $HDserver_ip = "-----------------+"; $HTserver_ip = " SERVER IP |"; $HDcall_server_ip = "-----------------+"; @@ -553,10 +596,14 @@ else {$groupSQL = " and campaign_id='" . mysql_real_escape_string($group) . "'"; if (strlen($usergroup)<1) {$usergroupSQL = '';} else {$usergroupSQL = " and user_group='" . mysql_real_escape_string($usergroup) . "'";} -$stmt="select extension,vicidial_live_agents.user,conf_exten,status,server_ip,UNIX_TIMESTAMP(last_call_time),UNIX_TIMESTAMP(last_call_finish),call_server_ip,campaign_id,vicidial_users.user_group,vicidial_users.full_name from vicidial_live_agents,vicidial_users where vicidial_live_agents.user=vicidial_users.user $groupSQL $usergroupSQL order by $orderSQL;"; +$stmt="select extension,vicidial_live_agents.user,conf_exten,status,server_ip,UNIX_TIMESTAMP(last_call_time),UNIX_TIMESTAMP(last_call_finish),call_server_ip,campaign_id,vicidial_users.user_group,vicidial_users.full_name,vicidial_live_agents.comments from vicidial_live_agents,vicidial_users where vicidial_live_agents.user=vicidial_users.user $groupSQL $usergroupSQL order by $orderSQL;"; #$stmt="select extension,vicidial_live_agents.user,conf_exten,status,server_ip,UNIX_TIMESTAMP(last_call_time),UNIX_TIMESTAMP(last_call_finish),call_server_ip,campaign_id,vicidial_users.user_group,vicidial_users.full_name from vicidial_live_agents,vicidial_users where vicidial_live_agents.user=vicidial_users.user and campaign_id='" . mysql_real_escape_string($group) . "' order by $orderSQL;"; +if ($non_latin > 0) +{ +$rslt=mysql_query("SET NAMES 'UTF8'"); +} $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $talking_to_print = mysql_num_rows($rslt); @@ -567,13 +614,22 @@ $talking_to_print = mysql_num_rows($rslt); while ($i < $talking_to_print) { $row=mysql_fetch_row($rslt); - if (eregi("READY|PAUSED",$row[4])) + if (eregi("READY|PAUSED",$row[3])) { $row[5]=$row[6]; } - $extension = eregi_replace('Local/',"",$row[0]); - $extension = sprintf("%-10s", $extension); + if ($non_latin < 1) + { + $extension = eregi_replace('Local/',"",$row[0]); + $extension = sprintf("%-10s", $extension); while(strlen($extension)>10) {$extension = substr("$extension", 0, -1);} + } + else + { + $extension = eregi_replace('Local/',"",$row[0]); + $extension = sprintf("%-40s", $extension); + while(mb_strlen($extension, 'utf-8')>10) {$extension = mb_substr("$extension", 0, -1,'utf8');} + } $Luser = $row[1]; $user = sprintf("%-18s", $row[1]); $Lsessionid = $row[2]; @@ -582,16 +638,48 @@ $talking_to_print = mysql_num_rows($rslt); $status = sprintf("%-6s", $row[3]); $server_ip = sprintf("%-15s", $row[4]); $call_server_ip = sprintf("%-15s", $row[7]); - $campaign_id = sprintf("%-10s", $row[8]); + $campaign_id = sprintf("%-10s", $row[8]); + $comments= $row[11]; + + if (eregi("INCALL",$Lstatus)) + { + if ( (eregi("AUTO",$comments)) or (strlen($comments)<1) ) + {$CM='A';} + else + { + if (eregi("INBOUND",$comments)) + {$CM='I';} + else + {$CM='M';} + } + } + else {$CM=' ';} + if ($UGdisplay > 0) { - $user_group = sprintf("%-12s", $row[9]); + if ($non_latin < 1) + { + $user_group = sprintf("%-12s", $row[9]); while(strlen($user_group)>12) {$user_group = substr("$user_group", 0, -1);} + } + else + { + $user_group = sprintf("%-40s", $row[9]); + while(mb_strlen($user_group, 'utf-8')>12) {$user_group = mb_substr("$user_group", 0, -1,'utf8');} + } } if ($UidORname > 0) { - $user = sprintf("%-18s", $row[10]); + if ($non_latin < 1) + { + $user = sprintf("%-18s", $row[10]); while(strlen($user)>18) {$user = substr("$user", 0, -1);} + } + else + { + $user = sprintf("%-40s", $row[10]); + while(mb_strlen($user, 'utf-8')>18) {$user = mb_substr("$user", 0, -1,'utf8');} + } } if (!eregi("INCALL|QUEUE",$row[3])) {$call_time_S = ($STARTtime - $row[6]);} @@ -655,7 +743,7 @@ $talking_to_print = mysql_num_rows($rslt); $agentcount++; - $Aecho .= "| $G$extension$EG | $G$user$EG |$UGD $G$sessionid$EG$L$R | $G$status$EG | $SVD$G$call_time_MS$EG | $G$campaign_id$EG |\n"; + $Aecho .= "| $G$extension$EG | $G$user$EG |$UGD $G$sessionid$EG$L$R | $G$status$EG $CM | $SVD$G$call_time_MS$EG | $G$campaign_id$EG |\n"; $i++; } diff --git a/agc_2-X/trunk/LANG_www/vicidial/AST_timeonVDADallREC.php b/agc_2-X/trunk/LANG_www/vicidial/AST_timeonVDADallREC.php new file mode 100644 index 00000000..2abf27b2 --- /dev/null +++ b/agc_2-X/trunk/LANG_www/vicidial/AST_timeonVDADallREC.php @@ -0,0 +1,943 @@ + LICENSE: GPLv2 +# +# live real-time stats for the VICIDIAL Auto-Dialer all servers +# +# STOP=4000, SLOW=40, GO=4 seconds refresh interval +# +# CHANGELOG: +# 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) +# 60901-1123 - Changed display elements at the top of the screen +# 60905-1342 - Fixed non INCALL|QUEUE timer column +# 61002-1642 - Added TRUNK SHORT/FILL stats +# 61101-1318 - Added SIP and IAX Listen and Barge links option +# 61101-1647 - Added Usergroup column and user name option as well as sorting +# 61102-1155 - Made display of columns more modular, added ability to hide server info +# 61215-1131 - Added answered calls and drop percent taken from answered calls +# 70111-1600 - Added ability to use BLEND/INBND/*_C/*_B/*_I as closer campaigns +# 70123-1151 - Added non_latin options for substr in display variables, thanks Marin Blu +# 70206-1140 - Added call-type statuses to display(A-Auto, M-Manual, I-Inbound/Closer) +# + +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["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["usergroup"])) {$usergroup=$_GET["usergroup"];} + elseif (isset($_POST["usergroup"])) {$usergroup=$_POST["usergroup"];} +if (isset($_GET["DB"])) {$DB=$_GET["DB"];} + elseif (isset($_POST["DB"])) {$DB=$_POST["DB"];} +if (isset($_GET["adastats"])) {$adastats=$_GET["adastats"];} + elseif (isset($_POST["adastats"])) {$adastats=$_POST["adastats"];} +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["SIPmonitorLINK"])) {$SIPmonitorLINK=$_GET["SIPmonitorLINK"];} + elseif (isset($_POST["SIPmonitorLINK"])) {$SIPmonitorLINK=$_POST["SIPmonitorLINK"];} +if (isset($_GET["IAXmonitorLINK"])) {$IAXmonitorLINK=$_GET["IAXmonitorLINK"];} + elseif (isset($_POST["IAXmonitorLINK"])) {$IAXmonitorLINK=$_POST["IAXmonitorLINK"];} +if (isset($_GET["UGdisplay"])) {$UGdisplay=$_GET["UGdisplay"];} + elseif (isset($_POST["UGdisplay"])) {$UGdisplay=$_POST["UGdisplay"];} +if (isset($_GET["UidORname"])) {$UidORname=$_GET["UidORname"];} + elseif (isset($_POST["UidORname"])) {$UidORname=$_POST["UidORname"];} +if (isset($_GET["orderby"])) {$orderby=$_GET["orderby"];} + elseif (isset($_POST["orderby"])) {$orderby=$_POST["orderby"];} +if (isset($_GET["SERVdisplay"])) {$SERVdisplay=$_GET["SERVdisplay"];} + elseif (isset($_POST["SERVdisplay"])) {$SERVdisplay=$_POST["SERVdisplay"];} + +if (isset($_GET["RECmonitorLINK"])) {$RECmonitorLINK=$_GET["RECmonitorLINK"];} + elseif (isset($_POST["RECmonitorLINK"])) {$RECmonitorLINK=$_POST["RECmonitorLINK"];} + +if (!isset($RR)) {$gRRroup=4;} +if (!isset($group)) {$group='';} +if (!isset($usergroup)) {$usergroup='';} +if (!isset($UGdisplay)) {$UGdisplay=0;} # 0=no, 1=yes +if (!isset($UidORname)) {$UidORname=0;} # 0=id, 1=name +if (!isset($orderby)) {$orderby='timeup';} +if (!isset($SERVdisplay)) {$SERVdisplay=1;} # 0=no, 1=yes + +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 and view_reports='1';"; + if ($DB) {echo "|$stmt|\n";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + if ($non_latin > 0) {$rslta=mysql_query("SET NAMES 'UTF8'");} $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; + } + + $stmt="SELECT vicidial_recording from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 6 and view_reports='1';"; + if ($DB) {echo "|$stmt|\n";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + if ($non_latin > 0) {$rslta=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + $authrec=$row[0]; + if ($authrec=='1') {$RECmonitorLINK = 1;} else {$RECmonitorLINK = 0;} + + +$NOW_TIME = date("Y-m-d H:i:s"); +$FILE_TIME = date("Ymd-His"); +$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';"; +if ($non_latin > 0) +{ +$rslt=mysql_query("SET NAMES 'UTF8'"); +} +if ($non_latin > 0) {$rslta=mysql_query("SET NAMES 'UTF8'");} $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++; + } + +$stmt="select * from vicidial_user_groups;"; +if ($non_latin > 0) +{ +$rslt=mysql_query("SET NAMES 'UTF8'"); +} +if ($non_latin > 0) {$rslta=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); +if (!isset($DB)) {$DB=0;} +if ($DB) {echo "$stmt\n";} +$usergroups_to_print = mysql_num_rows($rslt); +$i=0; +while ($i < $usergroups_to_print) + { + $row=mysql_fetch_row($rslt); + $usergroups[$i] =$row[0]; + $i++; + } + +if (!isset($RR)) {$RR=4;} + +$NFB = ''; +$NFE = ''; +$F=''; $FG=''; $B=''; $BG=''; + +?> + + + + + + + + + +\n"; +echo"\n"; +echo "VICIDIAL: Time On VDAD Campaign: $group\n"; +echo "\n"; +echo "VICIDIAL 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"; +if ($UGdisplay > 0) + { + echo "\n"; + } +echo "         \n"; +echo "STOP | "; +echo "SLOW | "; +echo "GO"; +echo "       MODIFY | \n"; +echo "SUMMARY | \n"; +echo "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,dial_method,adaptive_maximum_level,adaptive_dropped_percentage,adaptive_dl_diff_target,adaptive_intensity,available_only_ratio_tally,adaptive_latest_server_time,local_call_time,dial_timeout,dial_statuses from vicidial_campaigns where campaign_id='" . mysql_real_escape_string($group) . "';"; + +if ($group=='XXXX-ALL-ACTIVE-XXXX') + { + $stmt="select avg(auto_dial_level),min(dial_status_a),min(dial_status_b),min(dial_status_c),min(dial_status_d),min(dial_status_e),min(lead_order),min(lead_filter_id),sum(hopper_level),min(dial_method),avg(adaptive_maximum_level),avg(adaptive_dropped_percentage),avg(adaptive_dl_diff_target),avg(adaptive_intensity),min(available_only_ratio_tally),min(adaptive_latest_server_time),min(local_call_time),avg(dial_timeout),min(dial_statuses) from vicidial_campaigns;"; + } +if ($non_latin > 0) +{ +$rslt=mysql_query("SET NAMES 'UTF8'"); +} +if ($non_latin > 0) {$rslta=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); +$row=mysql_fetch_row($rslt); +$DIALlev = $row[0]; +$DIALstatusA = $row[1]; +$DIALstatusB = $row[2]; +$DIALstatusC = $row[3]; +$DIALstatusD = $row[4]; +$DIALstatusE = $row[5]; +$DIALorder = $row[6]; +$DIALfilter = $row[7]; +$HOPlev = $row[8]; +$DIALmethod = $row[9]; +$maxDIALlev = $row[10]; +$DROPmax = $row[11]; +$targetDIFF = $row[12]; +$ADAintense = $row[13]; +$ADAavailonly = $row[14]; +$TAPERtime = $row[15]; +$CALLtime = $row[16]; +$DIALtimeout = $row[17]; +$DIALstatuses = $row[18]; + $DIALstatuses = (preg_replace("/ -$|^ /","",$DIALstatuses)); + $DIALstatuses = (ereg_replace(' ',', ',$DIALstatuses)); + +$stmt="select count(*) from vicidial_hopper where campaign_id='" . mysql_real_escape_string($group) . "';"; +if ($group=='XXXX-ALL-ACTIVE-XXXX') + { + $stmt="select count(*) from vicidial_hopper;"; + } +if ($non_latin > 0) +{ +$rslt=mysql_query("SET NAMES 'UTF8'"); +} +if ($non_latin > 0) {$rslta=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); +$row=mysql_fetch_row($rslt); +$VDhop = $row[0]; + +$stmt="select dialable_leads,calls_today,drops_today,drops_answers_today_pct,differential_onemin,agents_average_onemin,balance_trunk_fill,answers_today from vicidial_campaign_stats where campaign_id='" . mysql_real_escape_string($group) . "';"; +if ($group=='XXXX-ALL-ACTIVE-XXXX') + { + $stmt="select sum(dialable_leads),sum(calls_today),sum(drops_today),avg(drops_answers_today_pct),avg(differential_onemin),avg(agents_average_onemin),sum(balance_trunk_fill),sum(answers_today) from vicidial_campaign_stats;"; + } +if ($non_latin > 0) +{ +$rslt=mysql_query("SET NAMES 'UTF8'"); +} +if ($non_latin > 0) {$rslta=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); +$row=mysql_fetch_row($rslt); +$DAleads = $row[0]; +$callsTODAY = $row[1]; +$dropsTODAY = $row[2]; +$drpctTODAY = $row[3]; +$diffONEMIN = $row[4]; +$agentsONEMIN = $row[5]; +$balanceFILL = $row[6]; +$answersTODAY = $row[7]; +if ( ($diffONEMIN != 0) and ($agentsONEMIN > 0) ) + { + $diffpctONEMIN = ( ($diffONEMIN / $agentsONEMIN) * 100); + $diffpctONEMIN = sprintf("%01.2f", $diffpctONEMIN); + } +else {$diffpctONEMIN = '0.00';} + +$stmt="select sum(local_trunk_shortage) from vicidial_campaign_server_stats where campaign_id='" . mysql_real_escape_string($group) . "';"; +if ($group=='XXXX-ALL-ACTIVE-XXXX') + { + $stmt="select sum(local_trunk_shortage) from vicidial_campaign_server_stats;"; + } +if ($non_latin > 0) +{ +$rslt=mysql_query("SET NAMES 'UTF8'"); +} +if ($non_latin > 0) {$rslta=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); +$row=mysql_fetch_row($rslt); +$balanceSHORT = $row[0]; + +echo "
Selecione uma data da rechamada :
@@ -5726,7 +6222,7 @@ Seu Status:
Calls Dialing: + @@ -5823,6 +6302,7 @@ ID REGISTRO:
+
SELEÇÃO DE GRUPO INBOUND MAIS PRÓXIMA
Seleção De Grupo Inbound Mais próxima
@@ -5737,7 +6233,7 @@ Seu Status:
Calls Dialing: + Canaleta Canaleta @@ -5747,25 +6243,8 @@ Seu Status:
Calls Dialing: - - - - - -
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
@@ -5809,7 +6288,7 @@ ID REGISTRO:

Cliente Do Hangup

-Emita DTMF
+
Emita DTMF

@@ -5851,14 +6331,18 @@ ID REGISTRO:
+\n";} + {echo "\n";} else - {echo "\n";} + {echo "\n";} ?> - + +
segundos:   Canaleta:   Tempo De Cust:   Email:
Comentários: +
+
diff --git a/agc_2-X/trunk/LANG_www/vicidial/AST_CLOSERstats.php b/agc_2-X/trunk/LANG_www/vicidial/AST_CLOSERstats.php index ca0ebf4f..c2bea4d6 100644 --- a/agc_2-X/trunk/LANG_www/vicidial/AST_CLOSERstats.php +++ b/agc_2-X/trunk/LANG_www/vicidial/AST_CLOSERstats.php @@ -27,7 +27,7 @@ if (isset($_GET["SUBMIT"])) {$SUBMIT=$_GET["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;"; + $stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 6 and view_reports='1';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); @@ -86,7 +86,7 @@ echo "\n"; echo "\n"; -echo "           MODIFY | REPORTS \n"; +echo "           MODIFY | REPORTS \n"; echo "\n\n"; echo "
\n\n";
diff --git a/agc_2-X/trunk/LANG_www/vicidial/AST_VDADstats.php b/agc_2-X/trunk/LANG_www/vicidial/AST_VDADstats.php
index 3dd9b290..b26e245f 100644
--- a/agc_2-X/trunk/LANG_www/vicidial/AST_VDADstats.php
+++ b/agc_2-X/trunk/LANG_www/vicidial/AST_VDADstats.php
@@ -29,7 +29,7 @@ if (isset($_GET["SUBMIT"]))				{$SUBMIT=$_GET["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;";
+	$stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 6 and view_reports='1';";
 	if ($DB) {echo "|$stmt|\n";}
 	$rslt=mysql_query($stmt, $link);
 	$row=mysql_fetch_row($rslt);
@@ -88,7 +88,7 @@ echo "\n";
 echo "\n";
-echo "           MODIFY | REPORTS \n";
+echo "           MODIFY | REPORTS \n";
 echo "\n\n";
 
 echo "
\n\n";
@@ -202,6 +202,82 @@ echo "Total NA calls -Busy,Disconnect,RingNoAnswer: $NAcalls  $NApercent%\n";
 echo "Average Call Length for NA Calls in seconds:  $average_na_seconds\n";
 
 
+##############################
+#########  CALL STATUS STATS
+
+$TOTALcalls = 0;
+
+echo "\n";
+echo "---------- CALL STATUS STATS\n";
+echo "+--------+----------------------+------------+\n";
+echo "| STATUS | DESCRIPTION          | CALLS      |\n";
+echo "+--------+----------------------+------------+\n";
+
+$stmt="SELECT * from vicidial_statuses order by status";
+$rslt=mysql_query($stmt, $link);
+$statuses_to_print = mysql_num_rows($rslt);
+$statuses_list='';
+
+$o=0;
+while ($statuses_to_print > $o) 
+	{
+	$rowx=mysql_fetch_row($rslt);
+	$statname_list["$rowx[0]"] = "$rowx[1]";
+	$o++;
+	}
+
+$stmt="SELECT * from vicidial_campaign_statuses where campaign_id='" . mysql_real_escape_string($group) . "' 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);
+	$statname_list["$rowx[0]"] = "$rowx[1]";
+	$o++;
+	}
+
+$stmt="select count(*),status 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) . "' group by status;";
+if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");}
+$rslt=mysql_query($stmt, $link);
+if ($DB) {echo "$stmt\n";}
+$statuses_to_print = mysql_num_rows($rslt);
+$i=0;
+while ($i < $statuses_to_print)
+	{
+	$row=mysql_fetch_row($rslt);
+
+	$TOTALcalls = ($TOTALcalls + $row[0]);
+
+	$STATUScount =	sprintf("%10s", $row[0]);while(strlen($STATUScount)>10) {$STATUScount = substr("$STATUScount", 0, -1);}
+	$RAWstatus = $row[1];
+	$status =	sprintf("%-6s", $row[1]);while(strlen($status)>6) {$status = substr("$status", 0, -1);}
+
+	if ($non_latin < 1)
+		{
+		 $status_name =	sprintf("%-20s", $statname_list[$RAWstatus]); 
+		 while(strlen($status_name)>20) {$status_name = substr("$status_name", 0, -1);}	
+		}
+	else
+		{
+		 $status_name =	sprintf("%-60s", $statname_list[$RAWstatus]); 
+		 while(mb_strlen($status_name,'utf-8')>20) {$status_name = mb_substr("$status_name", 0, -1,'utf-8');}	
+		}
+
+
+	echo "| $status | $status_name | $STATUScount |\n";
+
+	$i++;
+	}
+
+$TOTALcalls =		sprintf("%10s", $TOTALcalls);
+
+echo "+--------+----------------------+------------+\n";
+echo "| TOTAL:                        | $TOTALcalls |\n";
+echo "+-------------------------------+------------+\n";
+
+
 ##############################
 #########  USER STATS
 
@@ -217,6 +293,7 @@ echo "| AGENT                    | 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;";
+if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");}
 $rslt=mysql_query($stmt, $link);
 if ($DB) {echo "$stmt\n";}
 $users_to_print = mysql_num_rows($rslt);
@@ -228,8 +305,15 @@ while ($i < $users_to_print)
 	$TOTcalls = ($TOTcalls + $row[2]);
 	$TOTtime = ($TOTtime + $row[3]);
 
-	$user =			sprintf("%-6s", $row[0]);
-	$full_name =	sprintf("%-15s", $row[1]); while(strlen($full_name)>15) {$full_name = substr("$full_name", 0, -1);}
+	$user =	sprintf("%-6s", $row[0]);while(strlen($user)>6) {$user = substr("$user", 0, -1);}
+	if ($non_latin < 1)
+	{
+ 	 $full_name =	sprintf("%-15s", $row[1]); while(strlen($full_name)>15) {$full_name = substr("$full_name", 0, -1);}	
+	}
+	else
+	{
+	 $full_name =	sprintf("%-45s", $row[1]); while(mb_strlen($full_name,'utf-8')>15) {$full_name = mb_substr("$full_name", 0, -1,'utf-8');}	
+	}
 	$USERcalls =	sprintf("%10s", $row[2]);
 	$USERtotTALK =	$row[3];
 	$USERavgTALK =	$row[4];
diff --git a/agc_2-X/trunk/LANG_www/vicidial/AST_VICIDIAL_hopperlist.php b/agc_2-X/trunk/LANG_www/vicidial/AST_VICIDIAL_hopperlist.php
index feaae790..dae17443 100644
--- a/agc_2-X/trunk/LANG_www/vicidial/AST_VICIDIAL_hopperlist.php
+++ b/agc_2-X/trunk/LANG_www/vicidial/AST_VICIDIAL_hopperlist.php
@@ -7,7 +7,8 @@
 #
 # 60619-1654 - Added variable filtering to eliminate SQL injection attack threat
 #            - Added required user/pass to gain access to this page
-#
+# 70115-1614 - Added ALT field for vicidial_hopper alt_dial column
+# 
 
 require("dbconnect.php");
 
@@ -24,7 +25,7 @@ if (isset($_GET["SUBMIT"]))				{$SUBMIT=$_GET["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;";
+	$stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 6 and view_reports='1' and modify_campaigns='1';";
 	if ($DB) {echo "|$stmt|\n";}
 	$rslt=mysql_query($stmt, $link);
 	$row=mysql_fetch_row($rslt);
@@ -122,11 +123,11 @@ echo "Total leads in hopper right now:       $TOTALcalls\n";
 
 echo "\n";
 echo "---------- LEADS IN HOPPER\n";
-echo "+------+-----------+------------+-------+--------+-------+--------+\n";
-echo "|      | LEAD_ID   | PHONE NUM  | STATE | STATUS | COUNT | GMT    |\n";
-echo "+------+-----------+------------+-------+--------+-------+--------+\n";
+echo "+------+-----------+------------+-------+--------+-------+--------+-------+\n";
+echo "|      | LEAD_ID   | PHONE NUM  | STATE | STATUS | COUNT | GMT    | ALT   |\n";
+echo "+------+-----------+------------+-------+--------+-------+--------+-------+\n";
 
-$stmt="select vicidial_hopper.lead_id,phone_number,vicidial_hopper.state,vicidial_list.status,called_count,vicidial_hopper.gmt_offset_now,hopper_id 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;";
+$stmt="select vicidial_hopper.lead_id,phone_number,vicidial_hopper.state,vicidial_list.status,called_count,vicidial_hopper.gmt_offset_now,hopper_id,alt_dial 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);
@@ -143,14 +144,15 @@ while ($i < $users_to_print)
 	$count =		sprintf("%-5s", $row[4]);
 	$gmt =			sprintf("%-6s", $row[5]);
 	$hopper_id =	sprintf("%-6s", $row[6]);
+	$alt_dial =		sprintf("%-5s", $row[7]);
 
 if ($DB) {echo "| $FMT_i | $lead_id | $phone_number | $state | $status | $count | $gmt | $hopper_id |\n";}
-else {echo "| $FMT_i | $lead_id | $phone_number | $state | $status | $count | $gmt |\n";}
+else {echo "| $FMT_i | $lead_id | $phone_number | $state | $status | $count | $gmt | $alt_dial |\n";}
 
 	$i++;
 	}
 
-echo "+------+-----------+------------+-------+--------+-------+--------+\n";
+echo "+------+-----------+------------+-------+--------+-------+--------+-------+\n";
 
 
 }
diff --git a/agc_2-X/trunk/LANG_www/vicidial/AST_admin_log_display.php b/agc_2-X/trunk/LANG_www/vicidial/AST_admin_log_display.php
index b5286873..9c5c4af6 100644
--- a/agc_2-X/trunk/LANG_www/vicidial/AST_admin_log_display.php
+++ b/agc_2-X/trunk/LANG_www/vicidial/AST_admin_log_display.php
@@ -35,7 +35,7 @@ $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;";
+	$stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 8 and view_reports='1';";
 	if ($DB) {echo "|$stmt|\n";}
 	$rslt=mysql_query($stmt, $link);
 	$row=mysql_fetch_row($rslt);
diff --git a/agc_2-X/trunk/LANG_www/vicidial/AST_agent_disposition.php b/agc_2-X/trunk/LANG_www/vicidial/AST_agent_disposition.php
new file mode 100644
index 00000000..b0b0a461
--- /dev/null
+++ b/agc_2-X/trunk/LANG_www/vicidial/AST_agent_disposition.php
@@ -0,0 +1,237 @@
+    LICENSE: GPLv2
+###
+# CHANGES
+#
+# 70201-1213 - First build - from Marin Blu
+#            
+# 
+
+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($begin_date)) {$begin_date =  $NOW_DATE;}
+if (!isset($end_date)) {$end_date =  $NOW_DATE;}
+
+$stmt="select campaign_id from vicidial_campaigns;";
+if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");}
+$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 Disposition\n";
+echo "
\n"; +echo "Date - From: to \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 ABOVE AND CLICK SUBMIT\n";
+}
+
+else
+{
+
+echo "VICIDIAL: Agent Disposition                             $NOW_TIME\n";
+
+echo "Time range: $begin_date to $end_date \n\n";
+echo "---------- Disposition Details -------------\n\n";
+
+echo "+-----------------+------------+--------+--------+--------+------+------+------+------+------+------+------+------+------+------+------+------+------+------+------+------+------+------+\n";
+echo "| USER NAME       | ID         | CALLS  | TALK   | TALKAVG| A    | B    |CALLBK|CBHOLD| DEC  | DC   | DNC  | DROP |INCALL| LB   | N    | NA   | NI   | NP   | NQ   |QUEUE | SALE | XFER |\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 >= '$begin_date 00:00:01' and call_date <= '$end_date 23:59:59'  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;";
+if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");}
+$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("%-10s", $row[3]); while(strlen($user[$i])>10) {$user[$i] = substr("$user[$i]", 0, -1);}
+	$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   ";  $ctINCALL[$k]="0   ";  $ctDROP[$k]="0   ";  $ctQUEUE[$k]="0   ";  $ctNP[$k]="0   ";   $ctDEC[$k]="0   ";  $ctNQ[$k]="0   ";  $ctNA[$k]="0   ";   $ctXFER[$k]="0   "; $ctLB[$k]="0   ";  $ctCALLBK[$k]="0   "; $ctCBHOLD[$k]="0   ";
+	$stmt="select count(*),status from vicidial_log where call_date >= '$begin_date 00:00:01' and call_date <= '$end_date 23:59:59'  and user='$user[$k]' and campaign_id='" . mysql_real_escape_string($group) . "' group by status;";
+	if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");}
+	$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') {$ctSALE[$k]=sprintf("%-4s", $row[0]);	$TOT_SALE = ($TOT_SALE + $row[0]);}
+		if ($row[1] == 'INCALL') {$ctINCALL[$k]=sprintf("%-4s", $row[0]);	$TOT_INCALL = ($TOT_INCALL + $row[0]);}
+		if ($row[1] == 'DROP') {$ctDROP[$k]=sprintf("%-4s", $row[0]);	$TOT_DROP = ($TOT_DROP + $row[0]);}
+		if ($row[1] == 'QUEUE') {$ctQUEUE[$k]=sprintf("%-4s", $row[0]);	$TOT_QUEUE = ($TOT_QUEUE + $row[0]);}
+		if ($row[1] == 'NP') {$ctNP[$k]=sprintf("%-4s", $row[0]);	$TOT_NP = ($TOT_NP + $row[0]);}
+		if ($row[1] == 'DEC') {$ctDEC[$k]=sprintf("%-4s", $row[0]);	$TOT_DEC = ($TOT_DEC + $row[0]);}
+		if ($row[1] == 'NQ') {$ctNQ[$k]=sprintf("%-4s", $row[0]);	$TOT_NQ = ($TOT_NQ + $row[0]);}
+		if ($row[1] == 'NA') {$ctNA[$k]=sprintf("%-4s", $row[0]);	$TOT_NA = ($TOT_NA + $row[0]);}
+		if ($row[1] == 'XFER') {$ctXFER[$k]=sprintf("%-4s", $row[0]);	$TOT_XFER = ($TOT_XFER + $row[0]);}
+		if ($row[1] == 'LB') {$ctLB[$k]=sprintf("%-4s", $row[0]);	$TOT_LB = ($TOT_LB + $row[0]);}
+		if ($row[1] == 'CALLBK') {$ctCALLBK[$k]=sprintf("%-4s", $row[0]);	$TOT_CALLBK = ($TOT_CALLBK + $row[0]);}
+		if ($row[1] == 'CBHOLD') {$ctCBHOLD[$k]=sprintf("%-4s", $row[0]);	$TOT_CBHOLD = ($TOT_CBHOLD + $row[0]);}
+		$m++;
+		}
+	echo "| $full_name[$k] | $user[$k] | $calls[$k] | $pfUSERtotTALK_MS[$k] | $pfUSERavgTALK_MS[$k] | $ctA[$k] | $ctB[$k] | $ctCALLBK[$k] | $ctCBHOLD[$k] | $ctDEC[$k] | $ctDC[$k] | $ctDNC[$k] | $ctDROP[$k] | $ctINCALL[$k] | $ctLB[$k] | $ctN[$k] | $ctNA[$k] | $ctNI[$k] | $ctNP[$k] | $ctNQ[$k] | $ctQUEUE[$k] | $ctSALE[$k] | $ctXFER[$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);
+	$TOT_INCALL = sprintf("%-5s", $TOT_INCALL);
+	$TOT_DROP = sprintf("%-5s", $TOT_DROP); 
+	$TOT_QUEUE = sprintf("%-5s", $TOT_QUEUE);
+	$TOT_NP = sprintf("%-5s", $TOT_NP);
+	$TOT_DEC = sprintf("%-5s", $TOT_DEC);
+	$TOT_NQ = sprintf("%-5s", $TOT_NQ);
+	$TOT_NA = sprintf("%-5s", $TOT_NA);
+	$TOT_XFER = sprintf("%-5s", $TOT_XFER);
+	$TOT_LB= sprintf("%-5s", $TOT_LB);
+	$TOT_CALLBK = sprintf("%-5s", $TOT_CALLBK);
+	$TOT_CBHOLD = sprintf("%-5s", $TOT_CBHOLD);
+
+echo "+-----------------+------------+--------+--------+--------+------+------+------+------+------+------+------+------+------+------+------+------+------+------+------+------+------+------+\n";
+echo "|  TOTALS                      | $TOTcalls| $TOTtotTALK_MS|        | $TOT_A| $TOT_B| $TOT_CALLBK| $TOT_CBHOLD| $TOT_DEC| $TOT_DC| $TOT_DNC| $TOT_DROP| $TOT_INCALL| $TOT_LB| $TOT_N| $TOT_NA| $TOT_NI| $TOT_NP| $TOT_NQ| $TOT_QUEUE| $TOT_SALE| $TOT_XFER|\n";
+echo "+-----------------+------------+--------+--------+--------+------+------+------+------+------+------+------+------+------+------+------+------+------+------+------+------+------+------+\n";
+echo "\n";
+
+}
+?>
+
\ No newline at end of file
diff --git a/agc_2-X/trunk/LANG_www/vicidial/AST_agent_performance.php b/agc_2-X/trunk/LANG_www/vicidial/AST_agent_performance.php
index a489bc7d..eb2ceac4 100644
--- a/agc_2-X/trunk/LANG_www/vicidial/AST_agent_performance.php
+++ b/agc_2-X/trunk/LANG_www/vicidial/AST_agent_performance.php
@@ -7,6 +7,7 @@
 #
 # 60619-1711 - Added variable filtering to eliminate SQL injection attack threat
 #            - Added required user/pass to gain access to this page
+# 70201-1203 - Added non_latin UTF8 output code, widened USER ID to 8 chars
 #
 
 require("dbconnect.php");
@@ -28,8 +29,9 @@ if (isset($_GET["SUBMIT"]))				{$SUBMIT=$_GET["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;";
+	$stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 6 and view_reports='1';";
 	if ($DB) {echo "|$stmt|\n";}
+	if ($non_latin > 0) { $rslt=mysql_query("SET NAMES 'UTF8'");}
 	$rslt=mysql_query($stmt, $link);
 	$row=mysql_fetch_row($rslt);
 	$auth=$row[0];
@@ -49,6 +51,7 @@ if (!isset($group)) {$group = '';}
 if (!isset($query_date)) {$query_date = $NOW_DATE;}
 
 $stmt="select campaign_id from vicidial_campaigns;";
+if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");}
 $rslt=mysql_query($stmt, $link);
 if ($DB) {echo "$stmt\n";}
 $campaigns_to_print = mysql_num_rows($rslt);
@@ -91,7 +94,7 @@ echo "\n";
 echo "\n";
 echo "\n";
 echo "\n";
-echo "           MODIFY | REPORTS \n";
+echo "           MODIFY | REPORTS \n";
 echo "\n\n";
 
 echo "
\n";
@@ -126,11 +129,12 @@ 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";
+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;";
+if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");}
 $rslt=mysql_query($stmt, $link);
 if ($DB) {echo "$stmt\n";}
 $rows_to_print = mysql_num_rows($rslt);
@@ -141,8 +145,25 @@ while ($i < $rows_to_print)
 	$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]);
+
+	if ($non_latin < 1)
+	{
+   	 $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]);
+        while(strlen($user[$i])>6) {$user[$i] = substr("$user[$i]", 0, -1);}
+       }
+	else
+	{	
+        $full_name[$i]=	sprintf("%-45s", $row[2]); 
+	 while(mb_strlen($full_name[$i],'utf-8')>15) {$full_name[$i] = mb_substr("$full_name[$i]", 0, -1,'utf-8');}
+
+ 	 $user[$i] =		sprintf("%-18s", $row[3]);
+	 while(mb_strlen($user[$i],'utf-8')>6) {$user[$i] = mb_substr("$user[$i]", 0, -1,'utf-8');}
+	}
+
+	$user[$i] =		sprintf("%-8s", $row[3]);
 	$USERtotTALK =	$row[1];
 	$USERavgTALK =	$row[4];
 
@@ -173,6 +194,10 @@ 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;";
+	if ($non_latin > 0)
+	{
+	$rslt=mysql_query("SET NAMES 'UTF8'");
+	}
 	$rslt=mysql_query($stmt, $link);
 	if ($DB) {echo "$stmt\n";}
 	$rows_to_print = mysql_num_rows($rslt);
@@ -217,9 +242,9 @@ while($k < $i)
 	$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";
+echo "|  TOTALS                    | $TOTcalls| $TOTtotTALK_MS|        | $TOT_A| $TOT_B| $TOT_DC| $TOT_DNC| $TOT_N| $TOT_NI| $TOT_SALE|\n";
+echo "+-----------------+----------+--------+--------+--------+------+------+------+------+------+------+------+\n";
 
 echo "\n";
 
diff --git a/agc_2-X/trunk/LANG_www/vicidial/AST_agent_performance_detail.php b/agc_2-X/trunk/LANG_www/vicidial/AST_agent_performance_detail.php
index 2dd3dc5e..72779f6e 100644
--- a/agc_2-X/trunk/LANG_www/vicidial/AST_agent_performance_detail.php
+++ b/agc_2-X/trunk/LANG_www/vicidial/AST_agent_performance_detail.php
@@ -7,6 +7,8 @@
 #
 # 60619-1712 - Added variable filtering to eliminate SQL injection attack threat
 #            - Added required user/pass to gain access to this page
+# 70118-1705 - Added user_group filtering option
+# 70201-1207 - Added non_latin UTF8 output code, widened USER ID to 8 chars
 #
 
 require("dbconnect.php");
@@ -15,21 +17,26 @@ $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"];}
+	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["user_group"]))				{$user_group=$_GET["user_group"];}
+	elseif (isset($_POST["user_group"]))	{$user_group=$_POST["user_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"];}
+	elseif (isset($_POST["submit"]))	{$submit=$_POST["submit"];}
 if (isset($_GET["SUBMIT"]))				{$SUBMIT=$_GET["SUBMIT"];}
-	elseif (isset($_POST["SUBMIT"]))		{$SUBMIT=$_POST["SUBMIT"];}
+	elseif (isset($_POST["SUBMIT"]))	{$SUBMIT=$_POST["SUBMIT"];}
+
+if (strlen($shift)<2) {$shift='ALL';}
 
 $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;";
+	$stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 6 and view_reports='1';";
 	if ($DB) {echo "|$stmt|\n";}
+	if ($non_latin > 0) { $rslt=mysql_query("SET NAMES 'UTF8'");}
 	$rslt=mysql_query($stmt, $link);
 	$row=mysql_fetch_row($rslt);
 	$auth=$row[0];
@@ -49,6 +56,7 @@ if (!isset($group)) {$group = '';}
 if (!isset($query_date)) {$query_date = $NOW_DATE;}
 
 $stmt="select campaign_id from vicidial_campaigns;";
+if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");}
 $rslt=mysql_query($stmt, $link);
 if ($DB) {echo "$stmt\n";}
 $campaigns_to_print = mysql_num_rows($rslt);
@@ -59,6 +67,18 @@ while ($i < $campaigns_to_print)
 	$groups[$i] =$row[0];
 	$i++;
 	}
+$stmt="select user_group from vicidial_user_groups;";
+if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");}
+$rslt=mysql_query($stmt, $link);
+if ($DB) {echo "$stmt\n";}
+$user_groups_to_print = mysql_num_rows($rslt);
+$i=0;
+while ($i < $user_groups_to_print)
+	{
+	$row=mysql_fetch_row($rslt);
+	$user_groups[$i] =$row[0];
+	$i++;
+	}
 ?>
 
 
@@ -86,12 +106,25 @@ echo "\n";
+echo "\n";
 echo "\n";
 echo "\n";
-echo "           MODIFY | REPORTS \n";
+echo "           MODIFY | REPORTS \n";
 echo "\n\n";
 
 echo "
\n";
@@ -101,7 +134,7 @@ 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";
+echo " NOTE: stats taken from shift specified\n";
 }
 
 else
@@ -120,17 +153,28 @@ if ($shift == 'PM')
 	$time_BEGIN = "15:15:00";   
 	$time_END = "23:15:00";
 	}
+if ($shift == 'ALL') 
+	{
+	$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";
+	}
+
+if (strlen($user_group)>0) {$ugSQL="and vicidial_agent_log.user_group='$user_group'";}
+else {$ugSQL='';}
 
 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";
+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;";
+$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 $ugSQL group by full_name order by calls desc limit 1000;";
+if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");}
 $rslt=mysql_query($stmt, $link);
 if ($DB) {echo "$stmt\n";}
 $rows_to_print = mysql_num_rows($rslt);
@@ -145,8 +189,25 @@ while ($i < $rows_to_print)
 	$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]);
+
+	if ($non_latin < 1)
+	{
+   	 $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]);
+        while(strlen($user[$i])>6) {$user[$i] = substr("$user[$i]", 0, -1);}
+       }
+	else
+	{	
+        $full_name[$i]=	sprintf("%-45s", $row[2]); 
+	 while(mb_strlen($full_name[$i],'utf-8')>15) {$full_name[$i] = mb_substr("$full_name[$i]", 0, -1,'utf-8');}
+
+ 	 $user[$i] =		sprintf("%-18s", $row[3]);
+	 while(mb_strlen($user[$i],'utf-8')>6) {$user[$i] = mb_substr("$user[$i]", 0, -1,'utf-8');}
+	}
+
+	$user[$i] =		sprintf("%-8s", $row[3]);
 	$USERtime =	($row[1] + $row[5] + $row[7] + $row[9]);
 	$USERtotTALK =	$row[1];
 	$USERavgTALK =	$row[4];
@@ -255,6 +316,7 @@ 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;";
+	if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");}
 	$rslt=mysql_query($stmt, $link);
 	if ($DB) {echo "$stmt\n";}
 	$rows_to_print = mysql_num_rows($rslt);
@@ -390,10 +452,11 @@ while($k < $i)
 	$TOT_NI = sprintf("%-5s", $TOT_NI);
 	$TOT_CB = sprintf("%-5s", $TOT_CB);
 	$TOT_SALE = sprintf("%-5s", $TOT_SALE);
+	$TOT_AGENTS = sprintf("%-4s", $k);
 
-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";
+echo "|  TOTALS        AGENTS:$TOT_AGENTS | $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";
 
diff --git a/agc_2-X/trunk/LANG_www/vicidial/AST_agent_time_sheet.php b/agc_2-X/trunk/LANG_www/vicidial/AST_agent_time_sheet.php
index 017d39d6..bd562a7b 100644
--- a/agc_2-X/trunk/LANG_www/vicidial/AST_agent_time_sheet.php
+++ b/agc_2-X/trunk/LANG_www/vicidial/AST_agent_time_sheet.php
@@ -28,7 +28,7 @@ if (isset($_GET["SUBMIT"]))				{$SUBMIT=$_GET["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;";
+	$stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 6 and view_reports='1';";
 	if ($DB) {echo "|$stmt|\n";}
 	$rslt=mysql_query($stmt, $link);
 	$row=mysql_fetch_row($rslt);
@@ -63,7 +63,11 @@ if (!isset($query_date)) {$query_date = $NOW_DATE;}
 \n";
 echo "VICIDIAL: Agent Time Sheet\n";
-echo "VICIDIAL ADMIN: Agent Time Sheet
\n"; +echo "VICIDIAL ADMIN: Agent Time Sheet\n"; +echo " - User Stats\n"; +echo " - User Status\n"; +echo " - Modify User\n"; +echo "
\n"; echo "
  \n"; echo "Date: \n"; echo "User ID: \n"; diff --git a/agc_2-X/trunk/LANG_www/vicidial/AST_agent_time_sheet_archive.php b/agc_2-X/trunk/LANG_www/vicidial/AST_agent_time_sheet_archive.php index 273df49d..fb71d1d6 100644 --- a/agc_2-X/trunk/LANG_www/vicidial/AST_agent_time_sheet_archive.php +++ b/agc_2-X/trunk/LANG_www/vicidial/AST_agent_time_sheet_archive.php @@ -28,7 +28,7 @@ if (isset($_GET["SUBMIT"])) {$SUBMIT=$_GET["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;"; + $stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 6 and view_reports='1';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); @@ -63,7 +63,11 @@ if (!isset($query_date)) {$query_date = $NOW_DATE;} \n"; echo "VICIDIAL: Agent Time Sheet\n"; -echo "VICIDIAL ADMIN: Agent Time Sheet Archive
\n"; +echo "VICIDIAL ADMIN: Agent Time Sheet\n"; +echo " - User Stats\n"; +echo " - User Status\n"; +echo " - Modify User\n"; +echo "
\n"; echo "   \n"; echo "Date: \n"; echo "User ID: \n"; diff --git a/agc_2-X/trunk/LANG_www/vicidial/AST_inboundEXTstats.php b/agc_2-X/trunk/LANG_www/vicidial/AST_inboundEXTstats.php new file mode 100644 index 00000000..5bc24935 --- /dev/null +++ b/agc_2-X/trunk/LANG_www/vicidial/AST_inboundEXTstats.php @@ -0,0 +1,400 @@ + 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 and view_reports='1';"; + 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_www/vicidial/AST_inboundEXTstats_department.php b/agc_2-X/trunk/LANG_www/vicidial/AST_inboundEXTstats_department.php new file mode 100644 index 00000000..015f6820 --- /dev/null +++ b/agc_2-X/trunk/LANG_www/vicidial/AST_inboundEXTstats_department.php @@ -0,0 +1,178 @@ + LICENSE: GPLv2 +# +# CHANGES +# 70201-1710 - First Build +# + +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["end_query_date"])) {$end_query_date=$_GET["end_query_date"];} + elseif (isset($_POST["end_query_date"])) {$end_query_date=$_POST["end_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 and view_reports='1';"; + 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($end_query_date)) {$end_query_date = $NOW_DATE;} +if (!isset($server_ip)) {$server_ip = '10.10.11.20';} + +$stmt="select distinct department from inbound_numbers;"; +$rslt=mysql_query($stmt, $link); +if ($DB) {echo "$stmt\n";} +$dept_to_print = mysql_num_rows($rslt); +$i=0; +while ($i < $dept_to_print) + { + $row=mysql_fetch_row($rslt); + $dept[$i] =$row[0]; + $i++; + } + +?> + + + + + +\n"; +#echo"\n"; +echo "ASTERISK: Inbound Calls Stats - By Department\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 "PLEASE SELECT A DEPARTMENT AND DATE RANGE ABOVE AND CLICK SUBMIT\n";
+}
+
+else
+{
+$extSQL='';
+$stmt="select extension from inbound_numbers where department='$group';";
+$rslt=mysql_query($stmt, $link);
+if ($DB) {echo "$stmt\n";}
+$inbound_to_print = mysql_num_rows($rslt);
+$i=0;
+while ($i < $inbound_to_print)
+	{
+	if (strlen($extSQL)> 1) {$extSQL .= ",";}
+	$row=mysql_fetch_row($rslt);
+	$extensions[$i] =$row[0];
+	$extSQL .= "'$extensions[$i]'";
+	$i++;
+	}
+
+echo "ASTERISK: Inbound Calls Stats For $group   from $query_date to $end_query_date\n";
+
+echo "\n";
+echo "---------- TOTALS\n";
+echo "\n";
+
+echo "+----------------------+------------+------------+\n";
+echo "| NUMBER               | CALLS      | AVG TIME   |\n";
+echo "+----------------------+------------+------------+\n";
+
+$k=0;
+while ($k < $inbound_to_print)
+	{
+	$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($end_query_date) . " 23:59:59' and server_ip='" . mysql_real_escape_string($server_ip) . "' and extension='$extensions[$k]' ;";
+	$rslt=mysql_query($stmt, $link);
+	if ($DB) {echo "$stmt\n";}
+	$row=mysql_fetch_row($rslt);
+
+	$extensions[$k] = sprintf("%20s", $extensions[$k]);
+	$TOTALcalls =	sprintf("%10s", $row[0]);
+	if ( ($row[0]<1) or ($row[1]<1) )
+		{
+		$average_hold_seconds = "         0";
+		}
+	else
+		{
+		$average_hold_seconds = ($row[1] / $row[0]);
+		$average_hold_seconds = round($average_hold_seconds, 0);
+		$average_hold_seconds =	sprintf("%10s", $average_hold_seconds);
+		}
+
+	$calls = ($TOTALcalls + $calls);
+	$seconds = ($row[1] + $seconds);
+
+	echo "| $extensions[$k] | $TOTALcalls | $average_hold_seconds |\n";
+	$k++;
+	}
+
+$calls =	sprintf("%10s", $calls);
+$seconds = ($seconds / $calls);
+$seconds = round($seconds, 0);
+$seconds =	sprintf("%5s", $seconds);
+echo "+----------------------+------------+------------+\n";
+echo "| TOTALS               | $calls | AVG: $seconds |\n";
+echo "+----------------------+------------+------------+\n";
+
+
+}
+
+
+
+?>
+
+ + \ No newline at end of file diff --git a/agc_2-X/trunk/LANG_www/vicidial/AST_parkstats.php b/agc_2-X/trunk/LANG_www/vicidial/AST_parkstats.php index eef768ca..13552c30 100644 --- a/agc_2-X/trunk/LANG_www/vicidial/AST_parkstats.php +++ b/agc_2-X/trunk/LANG_www/vicidial/AST_parkstats.php @@ -26,7 +26,7 @@ if (isset($_GET["SUBMIT"])) {$SUBMIT=$_GET["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;"; + $stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 6 and view_reports='1';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); @@ -85,7 +85,7 @@ echo "\n"; echo "\n"; -echo "           MODIFY | REPORTS \n"; +echo "           MODIFY | REPORTS \n"; echo "\n\n"; echo "
\n\n";
diff --git a/agc_2-X/trunk/LANG_www/vicidial/AST_server_performance.php b/agc_2-X/trunk/LANG_www/vicidial/AST_server_performance.php
index f3e5b9fb..8a3b6529 100644
--- a/agc_2-X/trunk/LANG_www/vicidial/AST_server_performance.php
+++ b/agc_2-X/trunk/LANG_www/vicidial/AST_server_performance.php
@@ -28,7 +28,7 @@ if (isset($_GET["SUBMIT"]))				{$SUBMIT=$_GET["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;";
+	$stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 6 and view_reports='1' and modify_servers='1';";
 	if ($DB) {echo "|$stmt|\n";}
 	$rslt=mysql_query($stmt, $link);
 	$row=mysql_fetch_row($rslt);
@@ -96,7 +96,7 @@ echo "\n";
 echo "\n";
 echo "\n";
 echo "\n";
-echo "             REPORTS \n";
+echo "             REPORTS \n";
 echo "\n\n";
 
 echo "
\n";
diff --git a/agc_2-X/trunk/LANG_www/vicidial/AST_timeonVDAD.php b/agc_2-X/trunk/LANG_www/vicidial/AST_timeonVDAD.php
index 06b6e181..e9c8f52e 100644
--- a/agc_2-X/trunk/LANG_www/vicidial/AST_timeonVDAD.php
+++ b/agc_2-X/trunk/LANG_www/vicidial/AST_timeonVDAD.php
@@ -33,7 +33,7 @@ if (isset($_GET["closer_display"]))				{$closer_display=$_GET["closer_display"];
 $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;";
+	$stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 6 and view_reports='1';";
 	if ($DB) {echo "|$stmt|\n";}
 	$rslt=mysql_query($stmt, $link);
 	$row=mysql_fetch_row($rslt);
@@ -133,7 +133,7 @@ echo "SERVER: $server_ip\n";
 if ($closer_display>0) {$closer_display_reverse=0;   $closer_reverse_link='DEFAULT';}
 else {$closer_display_reverse=1;   $closer_reverse_link='CLOSER';}
 
-echo "VICIDIAL: Agents Time On Calls           $NOW_TIME    $closer_reverse_link | REPORTS\n\n";
+echo "VICIDIAL: Agents Time On Calls           $NOW_TIME    $closer_reverse_link | REPORTS\n\n";
 
 if ($closer_display>0)
 {
diff --git a/agc_2-X/trunk/LANG_www/vicidial/AST_timeonVDADall.php b/agc_2-X/trunk/LANG_www/vicidial/AST_timeonVDADall.php
index 3eae6859..5946b75a 100644
--- a/agc_2-X/trunk/LANG_www/vicidial/AST_timeonVDADall.php
+++ b/agc_2-X/trunk/LANG_www/vicidial/AST_timeonVDADall.php
@@ -7,7 +7,7 @@
 #
 # STOP=4000, SLOW=40, GO=4 seconds refresh interval
 # 
-# changes:
+# CHANGELOG:
 # 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
@@ -21,7 +21,11 @@
 # 61002-1642 - Added TRUNK SHORT/FILL stats
 # 61101-1318 - Added SIP and IAX Listen and Barge links option
 # 61101-1647 - Added Usergroup column and user name option as well as sorting
-# 61102-1155 - made display of columns more modular, added ability to hide server info
+# 61102-1155 - Made display of columns more modular, added ability to hide server info
+# 61215-1131 - Added answered calls and drop percent taken from answered calls
+# 70111-1600 - Added ability to use BLEND/INBND/*_C/*_B/*_I as closer campaigns
+# 70123-1151 - Added non_latin options for substr in display variables, thanks Marin Blu
+# 70206-1140 - Added call-type statuses to display(A-Auto, M-Manual, I-Inbound/Closer)
 #
 
 header ("Content-type: text/html; charset=utf-8");
@@ -113,8 +117,12 @@ $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;";
+	$stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 6 and view_reports='1';";
 	if ($DB) {echo "|$stmt|\n";}
+if ($non_latin > 0)
+{
+$rslt=mysql_query("SET NAMES 'UTF8'");
+}
 	$rslt=mysql_query($stmt, $link);
 	$row=mysql_fetch_row($rslt);
 	$auth=$row[0];
@@ -135,6 +143,10 @@ $epochSIXhoursAGO = ($STARTtime - 21600);
 $timeSIXhoursAGO = date("Y-m-d H:i:s",$epochSIXhoursAGO);
 
 $stmt="select campaign_id from vicidial_campaigns where active='Y';";
+if ($non_latin > 0)
+{
+$rslt=mysql_query("SET NAMES 'UTF8'");
+}
 $rslt=mysql_query($stmt, $link);
 if (!isset($DB))   {$DB=0;}
 if ($DB) {echo "$stmt\n";}
@@ -148,6 +160,10 @@ while ($i < $groups_to_print)
 	}
 
 $stmt="select * from vicidial_user_groups;";
+if ($non_latin > 0)
+{
+$rslt=mysql_query("SET NAMES 'UTF8'");
+}
 $rslt=mysql_query($stmt, $link);
 if (!isset($DB))   {$DB=0;}
 if ($DB) {echo "$stmt\n";}
@@ -242,18 +258,22 @@ echo "GO";
 echo "       MODIFY | \n";
 echo "SUMMARY | \n";
-echo "REPORTS \n";
+echo "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,dial_method,adaptive_maximum_level,adaptive_dropped_percentage,adaptive_dl_diff_target,adaptive_intensity,available_only_ratio_tally,adaptive_latest_server_time,local_call_time,dial_timeout from vicidial_campaigns where campaign_id='" . mysql_real_escape_string($group) . "';"; +$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,dial_method,adaptive_maximum_level,adaptive_dropped_percentage,adaptive_dl_diff_target,adaptive_intensity,available_only_ratio_tally,adaptive_latest_server_time,local_call_time,dial_timeout,dial_statuses from vicidial_campaigns where campaign_id='" . mysql_real_escape_string($group) . "';"; if ($group=='XXXX-ALL-ACTIVE-XXXX') { - $stmt="select avg(auto_dial_level),min(dial_status_a),min(dial_status_b),min(dial_status_c),min(dial_status_d),min(dial_status_e),min(lead_order),min(lead_filter_id),sum(hopper_level),min(dial_method),avg(adaptive_maximum_level),avg(adaptive_dropped_percentage),avg(adaptive_dl_diff_target),avg(adaptive_intensity),min(available_only_ratio_tally),min(adaptive_latest_server_time),min(local_call_time),avg(dial_timeout) from vicidial_campaigns;"; + $stmt="select avg(auto_dial_level),min(dial_status_a),min(dial_status_b),min(dial_status_c),min(dial_status_d),min(dial_status_e),min(lead_order),min(lead_filter_id),sum(hopper_level),min(dial_method),avg(adaptive_maximum_level),avg(adaptive_dropped_percentage),avg(adaptive_dl_diff_target),avg(adaptive_intensity),min(available_only_ratio_tally),min(adaptive_latest_server_time),min(local_call_time),avg(dial_timeout),min(dial_statuses) from vicidial_campaigns;"; } +if ($non_latin > 0) +{ +$rslt=mysql_query("SET NAMES 'UTF8'"); +} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $DIALlev = $row[0]; @@ -274,12 +294,19 @@ $ADAavailonly = $row[14]; $TAPERtime = $row[15]; $CALLtime = $row[16]; $DIALtimeout = $row[17]; +$DIALstatuses = $row[18]; + $DIALstatuses = (preg_replace("/ -$|^ /","",$DIALstatuses)); + $DIALstatuses = (ereg_replace(' ',', ',$DIALstatuses)); $stmt="select count(*) from vicidial_hopper where campaign_id='" . mysql_real_escape_string($group) . "';"; if ($group=='XXXX-ALL-ACTIVE-XXXX') { $stmt="select count(*) from vicidial_hopper;"; } +if ($non_latin > 0) +{ +$rslt=mysql_query("SET NAMES 'UTF8'"); +} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $VDhop = $row[0]; @@ -289,6 +316,10 @@ if ($group=='XXXX-ALL-ACTIVE-XXXX') { $stmt="select sum(dialable_leads),sum(calls_today),sum(drops_today),avg(drops_answers_today_pct),avg(differential_onemin),avg(agents_average_onemin),sum(balance_trunk_fill),sum(answers_today) from vicidial_campaign_stats;"; } +if ($non_latin > 0) +{ +$rslt=mysql_query("SET NAMES 'UTF8'"); +} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $DAleads = $row[0]; @@ -311,6 +342,10 @@ if ($group=='XXXX-ALL-ACTIVE-XXXX') { $stmt="select sum(local_trunk_shortage) from vicidial_campaign_server_stats;"; } +if ($non_latin > 0) +{ +$rslt=mysql_query("SET NAMES 'UTF8'"); +} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $balanceSHORT = $row[0]; @@ -351,7 +386,7 @@ echo "
HOPPER LEVEL:  $HOPlev     DROPPED / ANSWERED:  $dropsTODAY / $answersTODAY   DL DIFF:  $diffONEMIN     STATUSES:  $DIALstatusA, $DIALstatusB, $DIALstatusC, $DIALstatusD, $DIALstatusE     STATUSES:  $DIALstatuses    
"; +echo ""; +echo ""; +echo ""; +echo ""; +echo ""; +echo ""; + +if ($adastats>1) + { + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + } + +echo ""; +echo ""; +echo ""; +echo ""; +echo ""; +echo ""; + +echo ""; +echo ""; +echo ""; +echo ""; +echo ""; +echo ""; + +echo ""; +echo ""; +echo ""; +echo ""; +echo ""; +echo ""; + +echo ""; +echo ""; +echo ""; +echo "
DIAL LEVEL:  $DIALlev    TRUNK SHORT/FILL:  $balanceSHORT / $balanceFILL     FILTER:  $DIALfilter   TIME:   $NOW_TIME
- min   MAX LEVEL:  $maxDIALlev   DROPPED MAX:  $DROPmax%    TARGET DIFF:  $targetDIFF     INTENSITY:  $ADAintense    
DIAL TIMEOUT:  $DIALtimeout  TAPER TIME:  $TAPERtime  LOCAL TIME:  $CALLtime  AVAIL ONLY:  $ADAavailonly  
DIALABLE LEADS:  $DAleads     CALLS TODAY:  $callsTODAY     AVG AGENTS:  $agentsONEMIN     DIAL METHOD:  $DIALmethod    
HOPPER LEVEL:  $HOPlev     DROPPED / ANSWERED:  $dropsTODAY / $answersTODAY   DL DIFF:  $diffONEMIN     STATUSES:  $DIALstatuses    
LEADS IN HOPPER:  $VDhop     DROPPED PERCENT:  $drpctTODAY%    DIFF:  $diffpctONEMIN%     ORDER:  $DIALorder    
"; + +if ($adastats<2) + { + echo "+ VIEW MORE SETTINGS"; + } +if ($UGdisplay>0) + { + echo "       HIDE USER GROUP"; + } +else + { + echo "       VIEW USER GROUP"; + } +if ($UidORname>0) + { + echo "       SHOW AGENT ID"; + } +else + { + echo "       SHOW AGENT NAME"; + } +if ($SERVdisplay>0) + { + echo "       HIDE SERVER INFO"; + } +else + { + echo "       SHOW SERVER INFO"; + } +echo "
"; + +echo "\n\n"; +} +################################################################################### +###### OUTBOUND CALLS +################################################################################### +if (eregi("(CLOSER|BLEND|INBND|_C$|_B$|_I$)",$group)) + { + $stmt="select closer_campaigns from vicidial_campaigns where campaign_id='" . mysql_real_escape_string($group) . "';"; +if ($non_latin > 0) +{ +$rslt=mysql_query("SET NAMES 'UTF8'"); +} + if ($non_latin > 0) {$rslta=mysql_query("SET NAMES 'UTF8'");} $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 + { + if ($group=='XXXX-ALL-ACTIVE-XXXX') {$groupSQL = '';} + else {$groupSQL = " and campaign_id='" . mysql_real_escape_string($group) . "'";} + + $stmt="select status from vicidial_auto_calls where status NOT IN('XFER') $groupSQL;"; + } +if ($non_latin > 0) +{ +$rslt=mysql_query("SET NAMES 'UTF8'"); +} +if ($non_latin > 0) {$rslta=mysql_query("SET NAMES 'UTF8'");} $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|BLEND|INBND|_C$|_B$|_I$)",$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"; + + +$HDbegin = "+"; +$HTbegin = "|"; +$HDstation = "------------+"; +$HTstation = " STATION |"; +$HDuser = "--------------------+"; +$HTuser = " USER |"; +$HDusergroup = "--------------+"; +$HTusergroup = " USER GROUP |"; +$HDsessionid = "------------------+"; +$HTsessionid = " SESSIONID |"; +$HDbarge = "-------+"; +$HTbarge = " BARGE |"; +$HDrec = "---------+"; +$HTrec = " MONITOR |"; +$HDstatus = "----------+"; +$HTstatus = " STATUS |"; +$HDserver_ip = "-----------------+"; +$HTserver_ip = " SERVER IP |"; +$HDcall_server_ip = "-----------------+"; +$HTcall_server_ip = " CALL SERVER IP |"; +$HDtime = "---------+"; +$HTtime = " MM:SS |"; +$HDcampaign = "------------+"; +$HTcampaign = " CAMPAIGN |"; + +if ($UGdisplay < 1) + { + $HDusergroup = ''; + $HTusergroup = ''; + } +if ( ($SIPmonitorLINK<1) && ($IAXmonitorLINK<1) ) + { + $HDsessionid = "-----------+"; + $HTsessionid = " SESSIONID |"; + } +if ( ($SIPmonitorLINK<2) && ($IAXmonitorLINK<2) ) + { + $HDbarge = ''; + $HTbarge = ''; + } +if ($SERVdisplay < 1) + { + $HDserver_ip = ''; + $HTserver_ip = ''; + $HDcall_server_ip = ''; + $HTcall_server_ip = ''; + } + +if ( ($RECmonitorLINK<1) ) +{ + $HDrec = ''; + $HTrec = ''; +} + +$Aline = "$HDbegin$HDstation$HDuser$HDusergroup$HDsessionid$HDbarge$HDstatus$HDrec$HDserver_ip$HDcall_server_ip$HDtime$HDcampaign\n"; +$Bline = "$HTbegin$HTstation$HTuser$HTusergroup$HTsessionid$HTbarge$HTstatus$HTrec$HTserver_ip$HTcall_server_ip$HTtime$HTcampaign\n"; + +$Aecho .= "$Aline"; +$Aecho .= "$Bline"; +$Aecho .= "$Aline"; + +if ($orderby=='timeup') {$orderSQL='status,last_call_time';} +if ($orderby=='timedown') {$orderSQL='status desc,last_call_time desc';} +if ($orderby=='campaignup') {$orderSQL='campaign_id,status,last_call_time';} +if ($orderby=='campaigndown') {$orderSQL='campaign_id desc,status desc,last_call_time desc';} +if ($orderby=='groupup') {$orderSQL='user_group,status,last_call_time';} +if ($orderby=='groupdown') {$orderSQL='user_group desc,status desc,last_call_time desc';} +if ($UidORname > 0) + { + if ($orderby=='userup') {$orderSQL='full_name,status,last_call_time';} + if ($orderby=='userdown') {$orderSQL='full_name desc,status desc,last_call_time desc';} + } +else + { + if ($orderby=='userup') {$orderSQL='vicidial_live_agents.user';} + if ($orderby=='userdown') {$orderSQL='vicidial_live_agents.user desc';} + } + +if ($group=='XXXX-ALL-ACTIVE-XXXX') {$groupSQL = '';} +else {$groupSQL = " and campaign_id='" . mysql_real_escape_string($group) . "'";} +if (strlen($usergroup)<1) {$usergroupSQL = '';} +else {$usergroupSQL = " and user_group='" . mysql_real_escape_string($usergroup) . "'";} + +$stmt="select extension,vicidial_live_agents.user,conf_exten,status,server_ip,UNIX_TIMESTAMP(last_call_time),UNIX_TIMESTAMP(last_call_finish),call_server_ip,campaign_id,vicidial_users.user_group,vicidial_users.full_name,vicidial_live_agents.comments,lead_id,vicidial_users.pass from vicidial_live_agents,vicidial_users where vicidial_live_agents.user=vicidial_users.user $groupSQL $usergroupSQL order by $orderSQL;"; + +#$stmt="select extension,vicidial_live_agents.user,conf_exten,status,server_ip,UNIX_TIMESTAMP(last_call_time),UNIX_TIMESTAMP(last_call_finish),call_server_ip,campaign_id,vicidial_users.user_group,vicidial_users.full_name from vicidial_live_agents,vicidial_users where vicidial_live_agents.user=vicidial_users.user and campaign_id='" . mysql_real_escape_string($group) . "' order by $orderSQL;"; + +if ($non_latin > 0) +{ +$rslt=mysql_query("SET NAMES 'UTF8'"); +} +if ($non_latin > 0) {$rslta=mysql_query("SET NAMES 'UTF8'");} $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[3])) + { + $row[5]=$row[6]; + } + if ($non_latin < 1) + { + $extension = eregi_replace('Local/',"",$row[0]); + $extension = eregi_replace('IAX2/',"",$row[0]); + $extension = sprintf("%-10s", $extension); + while(strlen($extension)>10) {$extension = substr("$extension", 0, -1);} + } + else + { + $extension = eregi_replace('Local/',"",$row[0]); + $extension = eregi_replace('IAX2/',"",$row[0]); + $extension = sprintf("%-40s", $extension); + while(mb_strlen($extension, 'utf-8')>10) {$extension = mb_substr("$extension", 0, -1,'utf8');} + } + + $Luser = $row[1]; + $user = sprintf("%-18s", $row[1]); + $Lsessionid = $row[2]; + $sessionid = sprintf("%-9s", $row[2]); + $Lstatus = $row[3]; + $status = sprintf("%-6s", $row[3]); + $Lserver_ip = $row[4]; + $server_ip = sprintf("%-15s", $row[4]); + $call_server_ip = sprintf("%-15s", $row[7]); + $campaign_id = sprintf("%-10s", $row[8]); + $comments= $row[11]; + + $lead_id = $row[12]; + $user_pass = $row[13]; + + + if (eregi("INCALL",$Lstatus)) + { + if ( (eregi("AUTO",$comments)) or (strlen($comments)<1) ) + {$CM='A';} + else + { + if (eregi("INBOUND",$comments)) + {$CM='I';} + else + {$CM='M';} + } + } + else {$CM=' ';} + + if ($UGdisplay > 0) + { + if ($non_latin < 1) + { + $user_group = sprintf("%-12s", $row[9]); + while(strlen($user_group)>12) {$user_group = substr("$user_group", 0, -1);} + } + else + { + $user_group = sprintf("%-40s", $row[9]); + while(mb_strlen($user_group, 'utf-8')>12) {$user_group = mb_substr("$user_group", 0, -1,'utf8');} + } + } + if ($UidORname > 0) + { + if ($non_latin < 1) + { + $user = sprintf("%-18s", $row[10]); + while(strlen($user)>18) {$user = substr("$user", 0, -1);} + } + else + { + $user = sprintf("%-40s", $row[10]); + while(mb_strlen($user, 'utf-8')>18) {$user = mb_substr("$user", 0, -1,'utf8');} + } + } + if (!eregi("INCALL|QUEUE",$row[3])) + {$call_time_S = ($STARTtime - $row[6]);} + else + {$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 ($Lstatus=='INCALL') + { + if ($call_time_S >= 10) {$G=''; $EG='';} + if ($call_time_M_int >= 1) {$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 >= 30) + {$i++; continue;} + else + { + $agent_paused++; $agent_total++; + $G=''; $EG=''; + if ($call_time_S >= 10) {$G=''; $EG='';} + if ($call_time_M_int >= 1) {$G=''; $EG='';} + if ($call_time_M_int >= 5) {$G=''; $EG='';} + } + } +# 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=''; + if ($call_time_M_int >= 1) {$G=''; $EG='';} + if ($call_time_M_int >= 5) {$G=''; $EG='';} + } + + $L=''; + $R=''; + $LL=''; + $EXTF='6'; + $servip= str_replace('.','',$Lserver_ip); + if ($SIPmonitorLINK>0) {$L=" LISTEN"; $R='';} + if ($IAXmonitorLINK>0) {$L=" LISTEN"; $R='';} + if ($SIPmonitorLINK>1) {$R=" | BARGE";} + if ($IAXmonitorLINK>1) {$R=" | BARGE";} + + + if ($RECmonitorLINK>0) + { + + $stmt="select session_name from web_client_sessions where server_ip ='$server_ip' and extension ='$extension' limit 1;"; + if ($non_latin > 0) {$rslta=mysql_query("SET NAMES 'UTF8'");} + $rslta=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $sess = mysql_num_rows($rslta); + + if ($sess > 0) + { + $row=mysql_fetch_row($rslta); + $sessionname = $row[0]; + } else + { + $sessionname = ""; + } + + + $stmt="select end_time,channel,extension,lead_id,user,server_ip,filename from recording_log where server_ip ='$server_ip' and user ='$Luser';"; + if ($non_latin > 0) {$rslta=mysql_query("SET NAMES 'UTF8'");} + $rslta=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $rec_channels = mysql_num_rows($rslta); + + if ($rec_channels > 0) + { + $ii=0; + while ($ii < $rec_channels) + { + $row=mysql_fetch_row($rslta); + $pos=strpos($row[1], $Lsessionid); + + if ($pos===false) + { + $LL=" Rec "; + } + else + { + if(is_null($row[0])) { + $LL=" Stop"; + } + else + { + $LL=" Rec "; + } + } + + $ii++; + } + } + else + { + $LL=" Rec "; + + } + } + + + if ($UGdisplay > 0) {$UGD = " $G$user_group$EG |";} + else {$UGD = "";} + + if ($SERVdisplay > 0) {$SVD = "$G$server_ip$EG | $G$call_server_ip$EG | ";} + else {$SVD = "";} + + $agentcount++; + + $Aecho .= "| $G$extension$EG | $G$user$EG |$UGD $G$sessionid$EG$L$R | $G$status$EG $CM | $LL | $SVD$G$call_time_MS$EG | $G$campaign_id$EG |\n"; + + $i++; + } + + $Aecho .= "$Aline"; + $Aecho .= " $agentcount agents logged in on all servers\n"; + $Aecho .= " System Load Average: $load_ave\n\n"; + + # $Aecho .= " - Balanced call\n"; + $Aecho .= " - Agent waiting for call\n"; + $Aecho .= " - Agent waiting for call > 1 minute\n"; + $Aecho .= " - Agent waiting for call > 5 minutes\n"; + $Aecho .= " - Agent on call > 10 seconds\n"; + $Aecho .= " - Agent on call > 1 minute\n"; + $Aecho .= " - Agent on call > 5 minutes\n"; + $Aecho .= " - Agent Paused > 10 seconds\n"; + $Aecho .= " - Agent Paused > 1 minute\n"; + $Aecho .= " - Agent Paused > 5 minutes\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_www/vicidial/AST_timeonVDADallSUMMARY.php b/agc_2-X/trunk/LANG_www/vicidial/AST_timeonVDADallSUMMARY.php index a14194f8..47e1d270 100644 --- a/agc_2-X/trunk/LANG_www/vicidial/AST_timeonVDADallSUMMARY.php +++ b/agc_2-X/trunk/LANG_www/vicidial/AST_timeonVDADallSUMMARY.php @@ -9,6 +9,8 @@ # # changes: # 61102-1616 - first build +# 61215-1131 - added answered calls and drop percent taken from answered calls +# 70111-1600 - added ability to use BLEND/INBND/*_C/*_B/*_I as closer campaigns # header ("Content-type: text/html; charset=utf-8"); @@ -35,7 +37,7 @@ if (!isset($RR)) {$gRRroup=4;} $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;"; + $stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 6 and view_reports='1';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); @@ -114,7 +116,7 @@ else { echo "- VIEW LESS SETTINGS"; } -echo "       REPORTS"; +echo "       REPORTS"; echo "

\n\n"; $k=0; @@ -128,7 +130,7 @@ $group = $groups[$k]; echo "$group   -   "; echo "Modify\n"; -$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,dial_method,adaptive_maximum_level,adaptive_dropped_percentage,adaptive_dl_diff_target,adaptive_intensity,available_only_ratio_tally,adaptive_latest_server_time,local_call_time,dial_timeout from vicidial_campaigns where campaign_id='" . mysql_real_escape_string($group) . "';"; +$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,dial_method,adaptive_maximum_level,adaptive_dropped_percentage,adaptive_dl_diff_target,adaptive_intensity,available_only_ratio_tally,adaptive_latest_server_time,local_call_time,dial_timeout,dial_statuses from vicidial_campaigns where campaign_id='" . mysql_real_escape_string($group) . "';"; $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $DIALlev = $row[0]; @@ -149,6 +151,9 @@ $ADAavailonly = $row[14]; $TAPERtime = $row[15]; $CALLtime = $row[16]; $DIALtimeout = $row[17]; +$DIALstatuses = $row[18]; + $DIALstatuses = (preg_replace("/ -$|^ /","",$DIALstatuses)); + $DIALstatuses = (ereg_replace(' ',', ',$DIALstatuses)); $stmt="select count(*) from vicidial_hopper where campaign_id='" . mysql_real_escape_string($group) . "';"; $rslt=mysql_query($stmt, $link); @@ -214,7 +219,7 @@ echo "
HOPPER LEVEL:  $HOPlev     DROPPED / ANSWERED:  $dropsTODAY / $answersTODAY   DL DIFF:  $diffONEMIN     STATUSES:  $DIALstatusA, $DIALstatusB, $DIALstatusC, $DIALstatusD, $DIALstatusE     STATUSES:  $DIALstatuses    
"; ################################################################################ ###### OUTBOUND CALLS ################################################################################ -if (eregi("CLOSER",$group)) +if (eregi("(CLOSER|BLEND|INBND|_C$|_B$|_I$)",$group)) { $stmt="select closer_campaigns from vicidial_campaigns where campaign_id='" . mysql_real_escape_string($group) . "';"; $rslt=mysql_query($stmt, $link); @@ -289,7 +294,7 @@ $parked_to_print = mysql_num_rows($rslt); if ($out_live > 9) {$F=''; $FG='';} if ($out_live > 14) {$F=''; $FG='';} - if (eregi("CLOSER",$group)) + if (eregi("(CLOSER|BLEND|INBND|_C$|_B$|_I$)",$group)) {echo "$NFB$out_total$NFE current active calls      \n";} else {echo "$NFB$out_total$NFE calls being placed       \n";} @@ -323,7 +328,7 @@ $talking_to_print = mysql_num_rows($rslt); while ($i < $talking_to_print) { $row=mysql_fetch_row($rslt); - if (eregi("READY|PAUSED",$row[4])) + if (eregi("READY|PAUSED",$row[3])) { $row[5]=$row[6]; } diff --git a/agc_2-X/trunk/LANG_www/vicidial/AST_timeonpark.php b/agc_2-X/trunk/LANG_www/vicidial/AST_timeonpark.php index 2bc03bb1..fd54a333 100644 --- a/agc_2-X/trunk/LANG_www/vicidial/AST_timeonpark.php +++ b/agc_2-X/trunk/LANG_www/vicidial/AST_timeonpark.php @@ -3,6 +3,11 @@ ### ### Copyright (C) 2006 Matt Florell 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"); @@ -18,6 +23,23 @@ if (isset($_GET["submit"])) {$submit=$_GET["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 and view_reports='1';"; + 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); @@ -62,12 +84,12 @@ if ($reset_counter > 7) \n"; +echo "\n"; echo"\n"; echo "VICIDIAL: Time On Park\n"; echo "
\n\n";
 
-echo "VICIDIAL: Time On Park                       $NOW_TIME\n\n";
+echo "VICIDIAL: Time On Park         $NOW_TIME    REPORTS\n\n";
 echo "+------------+-----------------+---------------------+---------+\n";
 echo "| CHANNEL    | GROUP           | START TIME          | MINUTES |\n";
 echo "+------------+-----------------+---------------------+---------+\n";
@@ -76,7 +98,7 @@ echo "+------------+-----------------+---------------------+---------+\n";
 # $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;";
+$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);
@@ -138,7 +160,7 @@ echo "| STATION    | USER   | CHANNEL    | GROUP           | START TIME
 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;";
+$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);
diff --git a/agc_2-X/trunk/LANG_www/vicidial/admin-old.php b/agc_2-X/trunk/LANG_www/vicidial/admin-old.php
deleted file mode 100644
index 2adf48f2..00000000
--- a/agc_2-X/trunk/LANG_www/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_www/vicidial/admin.php b/agc_2-X/trunk/LANG_www/vicidial/admin.php index 1867342b..f82ea5f8 100644 --- a/agc_2-X/trunk/LANG_www/vicidial/admin.php +++ b/agc_2-X/trunk/LANG_www/vicidial/admin.php @@ -1,9037 +1,10721 @@ - 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["active"])) {$active=$_GET["active"];} - elseif (isset($_POST["active"])) {$active=$_POST["active"];} -if (isset($_GET["adaptive_dl_diff_target"])) {$adaptive_dl_diff_target=$_GET["adaptive_dl_diff_target"];} - elseif (isset($_POST["adaptive_dl_diff_target"])) {$adaptive_dl_diff_target=$_POST["adaptive_dl_diff_target"];} -if (isset($_GET["adaptive_dropped_percentage"])) {$adaptive_dropped_percentage=$_GET["adaptive_dropped_percentage"];} - elseif (isset($_POST["adaptive_dropped_percentage"])){$adaptive_dropped_percentage=$_POST["adaptive_dropped_percentage"];} -if (isset($_GET["adaptive_intensity"])) {$adaptive_intensity=$_GET["adaptive_intensity"];} - elseif (isset($_POST["adaptive_intensity"])) {$adaptive_intensity=$_POST["adaptive_intensity"];} -if (isset($_GET["adaptive_latest_server_time"])) {$adaptive_latest_server_time=$_GET["adaptive_latest_server_time"];} - elseif (isset($_POST["adaptive_latest_server_time"])){$adaptive_latest_server_time=$_POST["adaptive_latest_server_time"];} -if (isset($_GET["adaptive_maximum_level"])) {$adaptive_maximum_level=$_GET["adaptive_maximum_level"];} - elseif (isset($_POST["adaptive_maximum_level"])) {$adaptive_maximum_level=$_POST["adaptive_maximum_level"];} -if (isset($_GET["ADD"])) {$ADD=$_GET["ADD"];} - elseif (isset($_POST["ADD"])) {$ADD=$_POST["ADD"];} -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["AFLogging_enabled"])) {$AFLogging_enabled=$_GET["AFLogging_enabled"];} - elseif (isset($_POST["AFLogging_enabled"])) {$AFLogging_enabled=$_POST["AFLogging_enabled"];} -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["agentcall_manual"])) {$agentcall_manual=$_GET["agentcall_manual"];} - elseif (isset($_POST["agentcall_manual"])) {$agentcall_manual=$_POST["agentcall_manual"];} -if (isset($_GET["agentonly_callbacks"])) {$agentonly_callbacks=$_GET["agentonly_callbacks"];} - elseif (isset($_POST["agentonly_callbacks"])) {$agentonly_callbacks=$_POST["agentonly_callbacks"];} -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["agi_output"])) {$agi_output=$_GET["agi_output"];} - elseif (isset($_POST["agi_output"])) {$agi_output=$_POST["agi_output"];} -if (isset($_GET["allcalls_delay"])) {$allcalls_delay=$_GET["allcalls_delay"];} - elseif (isset($_POST["allcalls_delay"])) {$allcalls_delay=$_POST["allcalls_delay"];} -if (isset($_GET["allow_closers"])) {$allow_closers=$_GET["allow_closers"];} - elseif (isset($_POST["allow_closers"])) {$allow_closers=$_POST["allow_closers"];} -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["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["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["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["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["asterisk_version"])) {$asterisk_version=$_GET["asterisk_version"];} - elseif (isset($_POST["asterisk_version"])) {$asterisk_version=$_POST["asterisk_version"];} -if (isset($_GET["ASTmgrSECRET"])) {$ASTmgrSECRET=$_GET["ASTmgrSECRET"];} - elseif (isset($_POST["ASTmgrSECRET"])) {$ASTmgrSECRET=$_POST["ASTmgrSECRET"];} -if (isset($_GET["ASTmgrUSERNAME"])) {$ASTmgrUSERNAME=$_GET["ASTmgrUSERNAME"];} - elseif (isset($_POST["ASTmgrUSERNAME"])) {$ASTmgrUSERNAME=$_POST["ASTmgrUSERNAME"];} -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["ASTmgrUSERNAMEupdate"])) {$ASTmgrUSERNAMEupdate=$_GET["ASTmgrUSERNAMEupdate"];} - elseif (isset($_POST["ASTmgrUSERNAMEupdate"])) {$ASTmgrUSERNAMEupdate=$_POST["ASTmgrUSERNAMEupdate"];} -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($_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["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["available_only_ratio_tally"])) {$available_only_ratio_tally=$_GET["available_only_ratio_tally"];} - elseif (isset($_POST["available_only_ratio_tally"])){$available_only_ratio_tally=$_POST["available_only_ratio_tally"];} -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["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["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["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["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["campaign_cid"])) {$campaign_cid=$_GET["campaign_cid"];} - elseif (isset($_POST["campaign_cid"])) {$campaign_cid=$_POST["campaign_cid"];} -if (isset($_GET["campaign_detail"])) {$campaign_detail=$_GET["campaign_detail"];} - elseif (isset($_POST["campaign_detail"])) {$campaign_detail=$_POST["campaign_detail"];} -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["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_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["campaign_recording"])) {$campaign_recording=$_GET["campaign_recording"];} - elseif (isset($_POST["campaign_recording"])) {$campaign_recording=$_POST["campaign_recording"];} -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["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["client_browser"])) {$client_browser=$_GET["client_browser"];} - elseif (isset($_POST["client_browser"])) {$client_browser=$_POST["client_browser"];} -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["company"])) {$company=$_GET["company"];} - elseif (isset($_POST["company"])) {$company=$_POST["company"];} -if (isset($_GET["computer_ip"])) {$computer_ip=$_GET["computer_ip"];} - elseif (isset($_POST["computer_ip"])) {$computer_ip=$_POST["computer_ip"];} -if (isset($_GET["conf_exten"])) {$conf_exten=$_GET["conf_exten"];} - elseif (isset($_POST["conf_exten"])) {$conf_exten=$_POST["conf_exten"];} -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["conferencing_enabled"])) {$conferencing_enabled=$_GET["conferencing_enabled"];} - elseif (isset($_POST["conferencing_enabled"])) {$conferencing_enabled=$_POST["conferencing_enabled"];} -if (isset($_GET["CoNfIrM"])) {$CoNfIrM=$_GET["CoNfIrM"];} - elseif (isset($_POST["CoNfIrM"])) {$CoNfIrM=$_POST["CoNfIrM"];} -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_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_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_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["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_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_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["DBX_database"])) {$DBX_database=$_GET["DBX_database"];} - elseif (isset($_POST["DBX_database"])) {$DBX_database=$_POST["DBX_database"];} -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["DBX_server"])) {$DBX_server=$_GET["DBX_server"];} - elseif (isset($_POST["DBX_server"])) {$DBX_server=$_POST["DBX_server"];} -if (isset($_GET["DBX_user"])) {$DBX_user=$_GET["DBX_user"];} - elseif (isset($_POST["DBX_user"])) {$DBX_user=$_POST["DBX_user"];} -if (isset($_GET["DBY_database"])) {$DBY_database=$_GET["DBY_database"];} - elseif (isset($_POST["DBY_database"])) {$DBY_database=$_POST["DBY_database"];} -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["DBY_server"])) {$DBY_server=$_GET["DBY_server"];} - elseif (isset($_POST["DBY_server"])) {$DBY_server=$_POST["DBY_server"];} -if (isset($_GET["DBY_user"])) {$DBY_user=$_GET["DBY_user"];} - elseif (isset($_POST["DBY_user"])) {$DBY_user=$_POST["DBY_user"];} -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["delete_campaigns"])) {$delete_campaigns=$_GET["delete_campaigns"];} - elseif (isset($_POST["delete_campaigns"])) {$delete_campaigns=$_POST["delete_campaigns"];} -if (isset($_GET["delete_filters"])) {$delete_filters=$_GET["delete_filters"];} - elseif (isset($_POST["delete_filters"])) {$delete_filters=$_POST["delete_filters"];} -if (isset($_GET["delete_ingroups"])) {$delete_ingroups=$_GET["delete_ingroups"];} - elseif (isset($_POST["delete_ingroups"])) {$delete_ingroups=$_POST["delete_ingroups"];} -if (isset($_GET["delete_lists"])) {$delete_lists=$_GET["delete_lists"];} - elseif (isset($_POST["delete_lists"])) {$delete_lists=$_POST["delete_lists"];} -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["delete_scripts"])) {$delete_scripts=$_GET["delete_scripts"];} - elseif (isset($_POST["delete_scripts"])) {$delete_scripts=$_POST["delete_scripts"];} -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_users"])) {$delete_users=$_GET["delete_users"];} - elseif (isset($_POST["delete_users"])) {$delete_users=$_POST["delete_users"];} -if (isset($_GET["dial_method"])) {$dial_method=$_GET["dial_method"];} - elseif (isset($_POST["dial_method"])) {$dial_method=$_POST["dial_method"];} -if (isset($_GET["dial_prefix"])) {$dial_prefix=$_GET["dial_prefix"];} - elseif (isset($_POST["dial_prefix"])) {$dial_prefix=$_POST["dial_prefix"];} -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["dial_timeout"])) {$dial_timeout=$_GET["dial_timeout"];} - elseif (isset($_POST["dial_timeout"])) {$dial_timeout=$_POST["dial_timeout"];} -if (isset($_GET["dialplan_number"])) {$dialplan_number=$_GET["dialplan_number"];} - elseif (isset($_POST["dialplan_number"])) {$dialplan_number=$_POST["dialplan_number"];} -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["drop_exten"])) {$drop_exten=$_GET["drop_exten"];} - elseif (isset($_POST["drop_exten"])) {$drop_exten=$_POST["drop_exten"];} -if (isset($_GET["drop_message"])) {$drop_message=$_GET["drop_message"];} - elseif (isset($_POST["drop_message"])) {$drop_message=$_POST["drop_message"];} -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["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["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["ext_context"])) {$ext_context=$_GET["ext_context"];} - elseif (isset($_POST["ext_context"])) {$ext_context=$_POST["ext_context"];} -if (isset($_GET["extension"])) {$extension=$_GET["extension"];} - elseif (isset($_POST["extension"])) {$extension=$_POST["extension"];} -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["force_logout"])) {$force_logout=$_GET["force_logout"];} - elseif (isset($_POST["force_logout"])) {$force_logout=$_POST["force_logout"];} -if (isset($_GET["fronter_display"])) {$fronter_display=$_GET["fronter_display"];} - elseif (isset($_POST["fronter_display"])) {$fronter_display=$_POST["fronter_display"];} -if (isset($_GET["full_name"])) {$full_name=$_GET["full_name"];} - elseif (isset($_POST["full_name"])) {$full_name=$_POST["full_name"];} -if (isset($_GET["fullname"])) {$fullname=$_GET["fullname"];} - elseif (isset($_POST["fullname"])) {$fullname=$_POST["fullname"];} -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["group_color"])) {$group_color=$_GET["group_color"];} - elseif (isset($_POST["group_color"])) {$group_color=$_POST["group_color"];} -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["groups"])) {$groups=$_GET["groups"];} - elseif (isset($_POST["groups"])) {$groups=$_POST["groups"];} -if (isset($_GET["HKstatus"])) {$HKstatus=$_GET["HKstatus"];} - elseif (isset($_POST["HKstatus"])) {$HKstatus=$_POST["HKstatus"];} -if (isset($_GET["hopper_level"])) {$hopper_level=$_GET["hopper_level"];} - elseif (isset($_POST["hopper_level"])) {$hopper_level=$_POST["hopper_level"];} -if (isset($_GET["hotkey"])) {$hotkey=$_GET["hotkey"];} - elseif (isset($_POST["hotkey"])) {$hotkey=$_POST["hotkey"];} -if (isset($_GET["hotkeys_active"])) {$hotkeys_active=$_GET["hotkeys_active"];} - elseif (isset($_POST["hotkeys_active"])) {$hotkeys_active=$_POST["hotkeys_active"];} -if (isset($_GET["install_directory"])) {$install_directory=$_GET["install_directory"];} - elseif (isset($_POST["install_directory"])) {$install_directory=$_POST["install_directory"];} -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_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_sql"])) {$lead_filter_sql=$_GET["lead_filter_sql"];} - elseif (isset($_POST["lead_filter_sql"])) {$lead_filter_sql=$_POST["lead_filter_sql"];} -if (isset($_GET["lead_order"])) {$lead_order=$_GET["lead_order"];} - elseif (isset($_POST["lead_order"])) {$lead_order=$_POST["lead_order"];} -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["load_leads"])) {$load_leads=$_GET["load_leads"];} - elseif (isset($_POST["load_leads"])) {$load_leads=$_POST["load_leads"];} -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["local_gmt"])) {$local_gmt=$_GET["local_gmt"];} - elseif (isset($_POST["local_gmt"])) {$local_gmt=$_POST["local_gmt"];} -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["login"])) {$login=$_GET["login"];} - elseif (isset($_POST["login"])) {$login=$_POST["login"];} -if (isset($_GET["login_campaign"])) {$login_campaign=$_GET["login_campaign"];} - elseif (isset($_POST["login_campaign"])) {$login_campaign=$_POST["login_campaign"];} -if (isset($_GET["login_pass"])) {$login_pass=$_GET["login_pass"];} - elseif (isset($_POST["login_pass"])) {$login_pass=$_POST["login_pass"];} -if (isset($_GET["login_user"])) {$login_user=$_GET["login_user"];} - elseif (isset($_POST["login_user"])) {$login_user=$_POST["login_user"];} -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["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["modify_leads"])) {$modify_leads=$_GET["modify_leads"];} - elseif (isset($_POST["modify_leads"])) {$modify_leads=$_POST["modify_leads"];} -if (isset($_GET["monitor_prefix"])) {$monitor_prefix=$_GET["monitor_prefix"];} - elseif (isset($_POST["monitor_prefix"])) {$monitor_prefix=$_POST["monitor_prefix"];} -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["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["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["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["old_extension"])) {$old_extension=$_GET["old_extension"];} - elseif (isset($_POST["old_extension"])) {$old_extension=$_POST["old_extension"];} -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["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["OLDuser_group"])) {$OLDuser_group=$_GET["OLDuser_group"];} - elseif (isset($_POST["OLDuser_group"])) {$OLDuser_group=$_POST["OLDuser_group"];} -if (isset($_GET["omit_phone_code"])) {$omit_phone_code=$_GET["omit_phone_code"];} - elseif (isset($_POST["omit_phone_code"])) {$omit_phone_code=$_POST["omit_phone_code"];} -if (isset($_GET["outbound_cid"])) {$outbound_cid=$_GET["outbound_cid"];} - elseif (isset($_POST["outbound_cid"])) {$outbound_cid=$_POST["outbound_cid"];} -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["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["pass"])) {$pass=$_GET["pass"];} - elseif (isset($_POST["pass"])) {$pass=$_POST["pass"];} -if (isset($_GET["phone_ip"])) {$phone_ip=$_GET["phone_ip"];} - elseif (isset($_POST["phone_ip"])) {$phone_ip=$_POST["phone_ip"];} -if (isset($_GET["phone_login"])) {$phone_login=$_GET["phone_login"];} - elseif (isset($_POST["phone_login"])) {$phone_login=$_POST["phone_login"];} -if (isset($_GET["phone_number"])) {$phone_number=$_GET["phone_number"];} - elseif (isset($_POST["phone_number"])) {$phone_number=$_POST["phone_number"];} -if (isset($_GET["phone_pass"])) {$phone_pass=$_GET["phone_pass"];} - elseif (isset($_POST["phone_pass"])) {$phone_pass=$_POST["phone_pass"];} -if (isset($_GET["phone_type"])) {$phone_type=$_GET["phone_type"];} - elseif (isset($_POST["phone_type"])) {$phone_type=$_POST["phone_type"];} -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["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["recording_exten"])) {$recording_exten=$_GET["recording_exten"];} - elseif (isset($_POST["recording_exten"])) {$recording_exten=$_POST["recording_exten"];} -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["reset_hopper"])) {$reset_hopper=$_GET["reset_hopper"];} - elseif (isset($_POST["reset_hopper"])) {$reset_hopper=$_POST["reset_hopper"];} -if (isset($_GET["reset_list"])) {$reset_list=$_GET["reset_list"];} - elseif (isset($_POST["reset_list"])) {$reset_list=$_POST["reset_list"];} -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["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["scheduled_callbacks"])) {$scheduled_callbacks=$_GET["scheduled_callbacks"];} - elseif (isset($_POST["scheduled_callbacks"])) {$scheduled_callbacks=$_POST["scheduled_callbacks"];} -if (isset($_GET["script_comments"])) {$script_comments=$_GET["script_comments"];} - elseif (isset($_POST["script_comments"])) {$script_comments=$_POST["script_comments"];} -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_text"])) {$script_text=$_GET["script_text"];} - elseif (isset($_POST["script_text"])) {$script_text=$_POST["script_text"];} -if (isset($_GET["selectable"])) {$selectable=$_GET["selectable"];} - elseif (isset($_POST["selectable"])) {$selectable=$_POST["selectable"];} -if (isset($_GET["server_description"])) {$server_description=$_GET["server_description"];} - elseif (isset($_POST["server_description"])) {$server_description=$_POST["server_description"];} -if (isset($_GET["server_id"])) {$server_id=$_GET["server_id"];} - elseif (isset($_POST["server_id"])) {$server_id=$_POST["server_id"];} -if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} - elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} -if (isset($_GET["stage"])) {$stage=$_GET["stage"];} - elseif (isset($_POST["stage"])) {$stage=$_POST["stage"];} -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["status"])) {$status=$_GET["status"];} - elseif (isset($_POST["status"])) {$status=$_POST["status"];} -if (isset($_GET["status_name"])) {$status_name=$_GET["status_name"];} - elseif (isset($_POST["status_name"])) {$status_name=$_POST["status_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"];} -if (isset($_GET["sys_perf_log"])) {$sys_perf_log=$_GET["sys_perf_log"];} - elseif (isset($_POST["sys_perf_log"])) {$sys_perf_log=$_POST["sys_perf_log"];} -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["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["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["user"])) {$user=$_GET["user"];} - elseif (isset($_POST["user"])) {$user=$_POST["user"];} -if (isset($_GET["user_group"])) {$user_group=$_GET["user_group"];} - elseif (isset($_POST["user_group"])) {$user_group=$_POST["user_group"];} -if (isset($_GET["user_level"])) {$user_level=$_GET["user_level"];} - elseif (isset($_POST["user_level"])) {$user_level=$_POST["user_level"];} -if (isset($_GET["user_start"])) {$user_start=$_GET["user_start"];} - elseif (isset($_POST["user_start"])) {$user_start=$_POST["user_start"];} -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["vd_server_logs"])) {$vd_server_logs=$_GET["vd_server_logs"];} - elseif (isset($_POST["vd_server_logs"])) {$vd_server_logs=$_POST["vd_server_logs"];} -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["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["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["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["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["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["voicemail_ext"])) {$voicemail_ext=$_GET["voicemail_ext"];} - elseif (isset($_POST["voicemail_ext"])) {$voicemail_ext=$_POST["voicemail_ext"];} -if (isset($_GET["voicemail_exten"])) {$voicemail_exten=$_GET["voicemail_exten"];} - elseif (isset($_POST["voicemail_exten"])) {$voicemail_exten=$_POST["voicemail_exten"];} -if (isset($_GET["voicemail_id"])) {$voicemail_id=$_GET["voicemail_id"];} - elseif (isset($_POST["voicemail_id"])) {$voicemail_id=$_POST["voicemail_id"];} -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["wrapup_message"])) {$wrapup_message=$_GET["wrapup_message"];} - elseif (isset($_POST["wrapup_message"])) {$wrapup_message=$_POST["wrapup_message"];} -if (isset($_GET["wrapup_seconds"])) {$wrapup_seconds=$_GET["wrapup_seconds"];} - elseif (isset($_POST["wrapup_seconds"])) {$wrapup_seconds=$_POST["wrapup_seconds"];} -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["vicidial_balance_active"])) {$vicidial_balance_active=$_GET["vicidial_balance_active"];} - elseif (isset($_POST["vicidial_balance_active"])) {$vicidial_balance_active=$_POST["vicidial_balance_active"];} -if (isset($_GET["balance_trunks_offlimits"])) {$balance_trunks_offlimits=$_GET["balance_trunks_offlimits"];} - elseif (isset($_POST["balance_trunks_offlimits"])) {$balance_trunks_offlimits=$_POST["balance_trunks_offlimits"];} -if (isset($_GET["dedicated_trunks"])) {$dedicated_trunks=$_GET["dedicated_trunks"];} - elseif (isset($_POST["dedicated_trunks"])) {$dedicated_trunks=$_POST["dedicated_trunks"];} -if (isset($_GET["trunk_restriction"])) {$trunk_restriction=$_GET["trunk_restriction"];} - elseif (isset($_POST["trunk_restriction"])) {$trunk_restriction=$_POST["trunk_restriction"];} -if (isset($_GET["campaigns"])) {$campaigns=$_GET["campaigns"];} - elseif (isset($_POST["campaigns"])) {$campaigns=$_POST["campaigns"];} - - - - - 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 ### -$adaptive_dropped_percentage = ereg_replace("[^0-9]","",$adaptive_dropped_percentage); -$adaptive_latest_server_time = ereg_replace("[^0-9]","",$adaptive_latest_server_time); -$admin_hangup_enabled = ereg_replace("[^0-9]","",$admin_hangup_enabled); -$admin_hijack_enabled = ereg_replace("[^0-9]","",$admin_hijack_enabled); -$admin_monitor_enabled = ereg_replace("[^0-9]","",$admin_monitor_enabled); -$AFLogging_enabled = ereg_replace("[^0-9]","",$AFLogging_enabled); -$agent_choose_ingroups = ereg_replace("[^0-9]","",$agent_choose_ingroups); -$agentcall_manual = ereg_replace("[^0-9]","",$agentcall_manual); -$agentonly_callbacks = ereg_replace("[^0-9]","",$agentonly_callbacks); -$AGI_call_logging_enabled = ereg_replace("[^0-9]","",$AGI_call_logging_enabled); -$allcalls_delay = ereg_replace("[^0-9]","",$allcalls_delay); -$alter_agent_interface_options = ereg_replace("[^0-9]","",$alter_agent_interface_options); -$am_message_exten = ereg_replace("[^0-9]","",$am_message_exten); -$answer_transfer_agent = ereg_replace("[^0-9]","",$answer_transfer_agent); -$ast_admin_access = ereg_replace("[^0-9]","",$ast_admin_access); -$ast_delete_phones = ereg_replace("[^0-9]","",$ast_delete_phones); -$attempt_delay = ereg_replace("[^0-9]","",$attempt_delay); -$attempt_maximum = ereg_replace("[^0-9]","",$attempt_maximum); -$auto_dial_next_number = ereg_replace("[^0-9]","",$auto_dial_next_number); -$balance_trunks_offlimits = ereg_replace("[^0-9]","",$balance_trunks_offlimits); -$call_parking_enabled = ereg_replace("[^0-9]","",$call_parking_enabled); -$CallerID_popup_enabled = ereg_replace("[^0-9]","",$CallerID_popup_enabled); -$campaign_detail = ereg_replace("[^0-9]","",$campaign_detail); -$campaign_rec_exten = ereg_replace("[^0-9]","",$campaign_rec_exten); -$campaign_vdad_exten = ereg_replace("[^0-9]","",$campaign_vdad_exten); -$change_agent_campaign = ereg_replace("[^0-9]","",$change_agent_campaign); -$closer_default_blended = ereg_replace("[^0-9]","",$closer_default_blended); -$conf_exten = ereg_replace("[^0-9]","",$conf_exten); -$conf_on_extension = ereg_replace("[^0-9]","",$conf_on_extension); -$conferencing_enabled = ereg_replace("[^0-9]","",$conferencing_enabled); -$ct_default_start = ereg_replace("[^0-9]","",$ct_default_start); -$ct_default_stop = ereg_replace("[^0-9]","",$ct_default_stop); -$ct_friday_start = ereg_replace("[^0-9]","",$ct_friday_start); -$ct_friday_stop = ereg_replace("[^0-9]","",$ct_friday_stop); -$ct_monday_start = ereg_replace("[^0-9]","",$ct_monday_start); -$ct_monday_stop = ereg_replace("[^0-9]","",$ct_monday_stop); -$ct_saturday_start = ereg_replace("[^0-9]","",$ct_saturday_start); -$ct_saturday_stop = ereg_replace("[^0-9]","",$ct_saturday_stop); -$ct_sunday_start = ereg_replace("[^0-9]","",$ct_sunday_start); -$ct_sunday_stop = ereg_replace("[^0-9]","",$ct_sunday_stop); -$ct_thursday_start = ereg_replace("[^0-9]","",$ct_thursday_start); -$ct_thursday_stop = ereg_replace("[^0-9]","",$ct_thursday_stop); -$ct_tuesday_start = ereg_replace("[^0-9]","",$ct_tuesday_start); -$ct_tuesday_stop = ereg_replace("[^0-9]","",$ct_tuesday_stop); -$ct_wednesday_start = ereg_replace("[^0-9]","",$ct_wednesday_start); -$ct_wednesday_stop = ereg_replace("[^0-9]","",$ct_wednesday_stop); -$DBX_port = ereg_replace("[^0-9]","",$DBX_port); -$DBY_port = ereg_replace("[^0-9]","",$DBY_port); -$dedicated_trunks = ereg_replace("[^0-9]","",$dedicated_trunks); -$delete_call_times = ereg_replace("[^0-9]","",$delete_call_times); -$delete_campaigns = ereg_replace("[^0-9]","",$delete_campaigns); -$delete_filters = ereg_replace("[^0-9]","",$delete_filters); -$delete_ingroups = ereg_replace("[^0-9]","",$delete_ingroups); -$delete_lists = ereg_replace("[^0-9]","",$delete_lists); -$delete_remote_agents = ereg_replace("[^0-9]","",$delete_remote_agents); -$delete_scripts = ereg_replace("[^0-9]","",$delete_scripts); -$delete_user_groups = ereg_replace("[^0-9]","",$delete_user_groups); -$delete_users = ereg_replace("[^0-9]","",$delete_users); -$dial_timeout = ereg_replace("[^0-9]","",$dial_timeout); -$dialplan_number = ereg_replace("[^0-9]","",$dialplan_number); -$drop_call_seconds = ereg_replace("[^0-9]","",$drop_call_seconds); -$drop_exten = ereg_replace("[^0-9]","",$drop_exten); -$enable_fast_refresh = ereg_replace("[^0-9]","",$enable_fast_refresh); -$enable_persistant_mysql = ereg_replace("[^0-9]","",$enable_persistant_mysql); -$fast_refresh_rate = ereg_replace("[^0-9]","",$fast_refresh_rate); -$hopper_level = ereg_replace("[^0-9]","",$hopper_level); -$hotkey = ereg_replace("[^0-9]","",$hotkey); -$hotkeys_active = ereg_replace("[^0-9]","",$hotkeys_active); -$list_id = ereg_replace("[^0-9]","",$list_id); -$load_leads = ereg_replace("[^0-9]","",$delete_call_times); -$max_vicidial_trunks = ereg_replace("[^0-9]","",$max_vicidial_trunks); -$modify_call_times = ereg_replace("[^0-9]","",$modify_call_times); -$modify_leads = ereg_replace("[^0-9]","",$modify_leads); -$monitor_prefix = ereg_replace("[^0-9]","",$monitor_prefix); -$number_of_lines = ereg_replace("[^0-9]","",$number_of_lines); -$old_conf_exten = ereg_replace("[^0-9]","",$old_conf_exten); -$outbound_cid = ereg_replace("[^0-9]","",$outbound_cid); -$park_ext = ereg_replace("[^0-9]","",$park_ext); -$park_on_extension = ereg_replace("[^0-9]","",$park_on_extension); -$phone_number = ereg_replace("[^0-9]","",$phone_number); -$QUEUE_ACTION_enabled = ereg_replace("[^0-9]","",$QUEUE_ACTION_enabled); -$recording_exten = ereg_replace("[^0-9]","",$recording_exten); -$remote_agent_id = ereg_replace("[^0-9]","",$remote_agent_id); -$safe_harbor_exten = ereg_replace("[^0-9]","",$safe_harbor_exten); -$telnet_port = ereg_replace("[^0-9]","",$telnet_port); -$updater_check_enabled = ereg_replace("[^0-9]","",$updater_check_enabled); -$user_level = ereg_replace("[^0-9]","",$user_level); -$user_start = ereg_replace("[^0-9]","",$user_start); -$user_switching_enabled = ereg_replace("[^0-9]","",$user_switching_enabled); -$VDstop_rec_after_each_call = ereg_replace("[^0-9]","",$VDstop_rec_after_each_call); -$VICIDIAL_park_on_extension = ereg_replace("[^0-9]","",$VICIDIAL_park_on_extension); -$vicidial_recording = ereg_replace("[^0-9]","",$vicidial_recording); -$vicidial_transfers = ereg_replace("[^0-9]","",$vicidial_transfers); -$voicemail_button_enabled = ereg_replace("[^0-9]","",$voicemail_button_enabled); -$voicemail_dump_exten = ereg_replace("[^0-9]","",$voicemail_dump_exten); -$voicemail_ext = ereg_replace("[^0-9]","",$voicemail_ext); -$voicemail_exten = ereg_replace("[^0-9]","",$voicemail_exten); -$voicemail_id = ereg_replace("[^0-9]","",$voicemail_id); -$wrapup_seconds = ereg_replace("[^0-9]","",$wrapup_seconds); - -### 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); -$omit_phone_code = ereg_replace("[^NY]","",$omit_phone_code); -$available_only_ratio_tally = ereg_replace("[^NY]","",$available_only_ratio_tally); -$sys_perf_log = ereg_replace("[^NY]","",$sys_perf_log); -$vicidial_balance_active = ereg_replace("[^NY]","",$vicidial_balance_active); -$vd_server_logs = ereg_replace("[^NY]","",$vd_server_logs); - -### ALPHA-NUMERIC ONLY ### -$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); -$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); -$adaptive_maximum_level = ereg_replace("[^\.0-9]","",$adaptive_maximum_level); -$phone_ip = ereg_replace("[^\.0-9]","",$phone_ip); -$old_server_ip = ereg_replace("[^\.0-9]","",$old_server_ip); -$computer_ip = ereg_replace("[^\.0-9]","",$computer_ip); - -### ALPHA-NUMERIC and spaces and hash and star and comma -$xferconf_a_dtmf = ereg_replace("[^ \,\*\#0-9a-zA-Z]","",$xferconf_a_dtmf); -$xferconf_b_dtmf = ereg_replace("[^ \,\*\#0-9a-zA-Z]","",$xferconf_b_dtmf); - -### ALPHACAPS-NUMERIC -$xferconf_a_number = ereg_replace("[^0-9A-Z]","",$xferconf_a_number); -$xferconf_b_number = ereg_replace("[^0-9A-Z]","",$xferconf_b_number); - -### ALPHA-NUMERIC and underscore and dash -$agi_output = ereg_replace("[^-\_0-9a-zA-Z]","",$agi_output); -$ASTmgrSECRET = ereg_replace("[^-\_0-9a-zA-Z]","",$ASTmgrSECRET); -$ASTmgrUSERNAME = ereg_replace("[^-\_0-9a-zA-Z]","",$ASTmgrUSERNAME); -$ASTmgrUSERNAMElisten = ereg_replace("[^-\_0-9a-zA-Z]","",$ASTmgrUSERNAMElisten); -$ASTmgrUSERNAMEsend = ereg_replace("[^-\_0-9a-zA-Z]","",$ASTmgrUSERNAMEsend); -$ASTmgrUSERNAMEupdate = ereg_replace("[^-\_0-9a-zA-Z]","",$ASTmgrUSERNAMEupdate); -$call_time_id = ereg_replace("[^-\_0-9a-zA-Z]","",$call_time_id); -$campaign_id = ereg_replace("[^-\_0-9a-zA-Z]","",$campaign_id); -$CoNfIrM = ereg_replace("[^-\_0-9a-zA-Z]","",$CoNfIrM); -$DBX_database = ereg_replace("[^-\_0-9a-zA-Z]","",$DBX_database); -$DBX_pass = ereg_replace("[^-\_0-9a-zA-Z]","",$DBX_pass); -$DBX_user = ereg_replace("[^-\_0-9a-zA-Z]","",$DBX_user); -$DBY_database = ereg_replace("[^-\_0-9a-zA-Z]","",$DBY_database); -$DBY_pass = ereg_replace("[^-\_0-9a-zA-Z]","",$DBY_pass); -$DBY_user = ereg_replace("[^-\_0-9a-zA-Z]","",$DBY_user); -$dial_method = ereg_replace("[^-\_0-9a-zA-Z]","",$dial_method); -$dial_status_a = ereg_replace("[^-\_0-9a-zA-Z]","",$dial_status_a); -$dial_status_b = ereg_replace("[^-\_0-9a-zA-Z]","",$dial_status_b); -$dial_status_c = ereg_replace("[^-\_0-9a-zA-Z]","",$dial_status_c); -$dial_status_d = ereg_replace("[^-\_0-9a-zA-Z]","",$dial_status_d); -$dial_status_e = ereg_replace("[^-\_0-9a-zA-Z]","",$dial_status_e); -$ext_context = ereg_replace("[^-\_0-9a-zA-Z]","",$ext_context); -$group_id = ereg_replace("[^-\_0-9a-zA-Z]","",$group_id); -$lead_filter_id = ereg_replace("[^-\_0-9a-zA-Z]","",$lead_filter_id); -$local_call_time = ereg_replace("[^-\_0-9a-zA-Z]","",$local_call_time); -$login = ereg_replace("[^-\_0-9a-zA-Z]","",$login); -$login_campaign = ereg_replace("[^-\_0-9a-zA-Z]","",$login_campaign); -$login_pass = ereg_replace("[^-\_0-9a-zA-Z]","",$login_pass); -$login_user = ereg_replace("[^-\_0-9a-zA-Z]","",$login_user); -$next_agent_call = ereg_replace("[^-\_0-9a-zA-Z]","",$next_agent_call); -$old_campaign_id = ereg_replace("[^-\_0-9a-zA-Z]","",$old_campaign_id); -$old_server_id = ereg_replace("[^-\_0-9a-zA-Z]","",$old_server_id); -$OLDuser_group = ereg_replace("[^-\_0-9a-zA-Z]","",$OLDuser_group); -$park_file_name = ereg_replace("[^-\_0-9a-zA-Z]","",$park_file_name); -$pass = ereg_replace("[^-\_0-9a-zA-Z]","",$pass); -$phone_login = ereg_replace("[^-\_0-9a-zA-Z]","",$phone_login); -$phone_pass = ereg_replace("[^-\_0-9a-zA-Z]","",$phone_pass); -$PHP_AUTH_PW = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_PW); -$PHP_AUTH_USER = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_USER); -$protocol = ereg_replace("[^-\_0-9a-zA-Z]","",$protocol); -$server_id = ereg_replace("[^-\_0-9a-zA-Z]","",$server_id); -$stage = ereg_replace("[^-\_0-9a-zA-Z]","",$stage); -$state_rule = ereg_replace("[^-\_0-9a-zA-Z]","",$state_rule); -$status = ereg_replace("[^-\_0-9a-zA-Z]","",$status); -$trunk_restriction = ereg_replace("[^-\_0-9a-zA-Z]","",$trunk_restriction); -$user = ereg_replace("[^-\_0-9a-zA-Z]","",$user); -$user_group = ereg_replace("[^-\_0-9a-zA-Z]","",$user_group); -$VICIDIAL_park_on_filename = ereg_replace("[^-\_0-9a-zA-Z]","",$VICIDIAL_park_on_filename); - -### 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 -$adaptive_dl_diff_target = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$adaptive_dl_diff_target); -$adaptive_intensity = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$adaptive_intensity); -$asterisk_version = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$asterisk_version); -$call_time_comments = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$call_time_comments); -$call_time_name = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$call_time_name); -$campaign_name = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$campaign_name); -$campaign_rec_filename = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$campaign_rec_filename); -$company = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$company); -$full_name = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$full_name); -$fullname = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$fullname); -$group_name = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$group_name); -$HKstatus = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$HKstatus); -$lead_filter_comments = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$lead_filter_comments); -$lead_filter_name = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$lead_filter_name); -$list_name = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$list_name); -$local_gmt = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$local_gmt); -$phone_type = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$phone_type); -$picture = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$picture); -$script_comments = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$script_comments); -$script_name = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$script_name); -$server_description = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$server_description); -$status = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$status); -$status_name = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$status_name); -$wrapup_message = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$wrapup_message); - -### ALPHA-NUMERIC and underscore and dash and slash and at and dot -$call_out_number_group = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$call_out_number_group); -$client_browser = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$client_browser); -$DBX_server = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$DBX_server); -$DBY_server = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$DBY_server); -$dtmf_send_extension = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$dtmf_send_extension); -$extension = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$extension); -$install_directory = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$install_directory); -$old_extension = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$old_extension); -$telnet_host = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$telnet_host); - -### remove semi-colons ### -$lead_filter_sql = ereg_replace(";","",$lead_filter_sql); - -### VARIABLES TO BE mysql_real_escape_string ### -# $web_form_address - -### VARIABLES not filtered at all ### -# $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 -# 60808-1147 - changed filtering for and added instructions for consutative transfers -# 60816-1552 - added allcalls_delay start delay for recordings in vicidial.php -# 60817-2226 - fixed bug that would not allow lead recycling of non-selectable statuses -# 60821-1543 - added option to Omit Phone Code while dialing in vicidial -# 60821-1625 - added ALLFORCE recording option for campaign_recording -# 60823-1154 - added fields for adaptive dialing -# 60824-1326 - added adaptive_latest_target_gmt for ADAPT_TAPERED dial method -# 60825-1205 - added adaptive_intensity for ADAPT_ dial methods -# 60828-1019 - changed adaptive_latest_target_gmt to adaptive_latest_server_time -# 60828-1115 - added adaptive_dl_diff_target and changed intensity dropdown -# 60927-1246 - added astguiclient/admin.php functions under SERVERS tab -# 61002-1402 - added fields for vicidial balance trunk controls -# 61003-1123 - added functions for vicidial_server_trunks records -# 61109-1022 - added Emergency VDAC Jam Clear function to Campaign Detail screen -# 61110-1502 - add ability to select NONE in dial statuses, new list_id must not be < 100 -# 61122-1228 - added user group campaign restrictions -# 61122-1535 - changed script_text to unfiltered and added more variables to SCRIPTS -# 61129-1028 - Added headers to Users and Phones with clickable order-by titles -# - -# 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 = '2.0.73'; -$build = '61129-1028'; - -$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]; - $LOGuser_group =$row[5]; - $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]; - $LOGast_admin_access =$row[16]; - $LOGast_delete_phones =$row[17]; - $LOGdelete_scripts =$row[18]; - $LOGdelete_filters =$row[29]; - $LOGalter_agent_interface =$row[30]; - $LOGdelete_call_times =$row[32]; - $LOGmodify_call_times =$row[33]; - - $stmt="SELECT allowed_campaigns from vicidial_user_groups where user_group='$LOGuser_group';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $LOGallowed_campaigns =$row[0]; - - 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==11111111111) {$hh='server'; echo "ADD NEW PHONE";} -if ($ADD==111111111111) {$hh='server'; echo "ADD NEW SERVER";} -if ($ADD==1111111111111) {$hh='server'; echo "ADD NEW CONFERENCE";} -if ($ADD==11111111111111) {$hh='server'; echo "ADD NEW VICIDIAL CONFERENCE";} -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==21111111111) {$hh='server'; echo "ADDING NEW PHONE";} -if ($ADD==211111111111) {$hh='server'; echo "ADDING NEW SERVER";} -if ($ADD==221111111111) {$hh='server'; echo "ADDING NEW SERVER VICIDIAL TRUNK RECORD";} -if ($ADD==2111111111111) {$hh='server'; echo "ADDING NEW CONFERENCE";} -if ($ADD==21111111111111) {$hh='server'; echo "ADDING NEW VICIDIAL CONFERENCE";} -if ($ADD==3) {$hh='users'; echo "Modify User";} -if ($ADD==30) {$hh='campaigns'; echo "Campaign Not Allowed";} -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==31111111111) {$hh='server'; echo "MODIFY PHONE";} -if ($ADD==311111111111) {$hh='server'; echo "MODIFY SERVER";} -if ($ADD==3111111111111) {$hh='server'; echo "MODIFY CONFERENCE";} -if ($ADD==31111111111111) {$hh='server'; echo "MODIFY VICIDIAL CONFERENCE";} -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==41111111111) {$hh='server'; echo "MODIFY PHONE";} -if ($ADD==411111111111) {$hh='server'; echo "MODIFY SERVER";} -if ($ADD==421111111111) {$hh='server'; echo "MODIFY SERVER VICIDIAL TRUNK RECORD";} -if ($ADD==4111111111111) {$hh='server'; echo "MODIFY CONFERENCE";} -if ($ADD==41111111111111) {$hh='server'; echo "MODIFY VICIDIAL CONFERENCE";} -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==53) {$hh='campaigns'; echo "Emergency VDAC Jam Clear";} -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==51111111111) {$hh='server'; echo "DELETE PHONE";} -if ($ADD==511111111111) {$hh='server'; echo "DELETE SERVER";} -if ($ADD==5111111111111) {$hh='server'; echo "DELETE CONFERENCE";} -if ($ADD==51111111111111) {$hh='server'; echo "DELETE VICIDIAL CONFERENCE";} -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==63) {$hh='campaigns'; echo "Emergency VDAC Jam Clear";} -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==61111111111) {$hh='server'; echo "DELETE PHONE";} -if ($ADD==611111111111) {$hh='server'; echo "DELETE SERVER";} -if ($ADD==621111111111) {$hh='server'; echo "DELETE SERVER VICIDIAL TRUNK RECORD";} -if ($ADD==6111111111111) {$hh='server'; echo "DELETE CONFERENCE";} -if ($ADD==61111111111111) {$hh='server'; echo "DELETE VICIDIAL CONFERENCE";} -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==10000000000) {$hh='server'; echo "PHONE LIST";} -if ($ADD==100000000000) {$hh='server'; echo "SERVER LIST";} -if ($ADD==1000000000000) {$hh='server'; echo "CONFERENCE LIST";} -if ($ADD==10000000000000) {$hh='server'; echo "VICIDIAL CONFERENCE LIST";} -if ($ADD==55) {$hh='users'; echo "Search Form";} -if ($ADD==551) {$hh='users'; echo "SEARCH PHONES";} -if ($ADD==66) {$hh='users'; echo "Search Results";} -if ($ADD==661) {$hh='users'; echo "SEARCH PHONES 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") or (strlen($ADD)==12) ) - { - ##### 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++; - } - - ##### BEGIN 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 .= " -";} - } - ##### END get inbound groups listing for checkboxes ##### - - - ##### BEGIN get campaigns listing for checkboxes ##### - if ( ($ADD==211111) or ($ADD==311111) or ($ADD==411111) or ($ADD==511111) or ($ADD==611111) ) - { - if ( ($ADD==211111) or ($ADD==311111) or ($ADD==511111) or ($ADD==611111) ) - { - $stmt="SELECT allowed_campaigns from vicidial_user_groups where user_group='$user_group';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $allowed_campaigns = $row[0]; - $allowed_campaigns = preg_replace("/ -$/","",$allowed_campaigns); - $campaigns = explode(" ", $allowed_campaigns); - echo "<!-- $allowed_campaigns -->"; - } - - $campaigns_value=''; - $campaigns_list='<B><input type="checkbox" name="campaigns[]" value="-ALL-CAMPAIGNS-"'; - $p=0; - while ($p<100) - { - if (eregi('ALL-CAMPAIGNS',$campaigns[$p])) - { - $campaigns_list.=" CHECKED"; - $campaigns_value .= " -ALL-CAMPAIGNS- -"; - } - $p++; - } - $campaigns_list.="> ALL-CAMPAIGNS - USERS CAN VIEW ANY CAMPAIGN</B><BR>\n"; - - $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); - - $o=0; - while ($campaigns_to_print > $o) - { - $rowx=mysql_fetch_row($rslt); - $campaign_id_value = $rowx[0]; - $campaign_name_value = $rowx[1]; - $campaigns_list .= "<input type=\"checkbox\" name=\"campaigns[]\" value=\"$campaign_id_value\""; - $p=0; - while ($p<100) - { - if ($campaign_id_value == $campaigns[$p]) - { - # echo "<!-- X $p|$campaign_id_value|$campaigns[$p]| -->"; - $campaigns_list .= " CHECKED"; - $campaigns_value .= " $campaign_id_value"; - } - # echo "<!-- O $p|$campaign_id_value|$campaigns[$p]| -->"; - $p++; - } - $campaigns_list .= "> $campaign_id_value - $campaign_name_value<BR>\n"; - $o++; - } - if (strlen($campaigns_value)>2) {$campaigns_value .= " -";} - } - ##### END get campaigns listing for checkboxes ##### - - - if ( (strlen($ADD)==11) or (strlen($ADD)>12) ) - { - ##### 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++; - } - } - - - -$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. - -
-
-
-Dial Method - This field is the way to define how dialing is to take place. If MANUAL then the auto_dial_level will be locked at 0 unless Dial Method is changed. If RATIO then the normal dialing a number of lines for Active agents. ADAPT_HARD_LIMIT will dial predictively up to the dropped percentage and then not allow aggressive dialing once the drop limit is reached until the percentage goes down again. ADAPT_TAPERED allows for running over the dropped percentage in the first half of the shift -as defined by call_time selected for campaign- and gets more strict as the shift goes on. ADAPT_AVERAGE tries to maintain an average or the dropped percentage not imposing hard limits as aggressively as the other two methods. You cannot change the Auto Dial Level if you are in any of the ADAPT dial methods. Only the Dialer can change the dial level when in predictive dialing mode. - -
-
-
-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. - -
-
-
-Available Only Tally - This field if set to Y will leave out INCALL and QUEUE status agents when calculating the number of calls to dial when not in MANUAL dial mode. Default is N. - -
-
-
-Drop Percentage Limit - This field is where you set the limit of the percentage of dropped calls you would like while using an adaptive-predictive dial method, not MANUAL or RATIO. - -
-
-
-Maximum Adapt Dial Level - This field is where you set the limit of the limit to the numbr of lines you would like dialed per agent while using an adaptive-predictive dial method, not MANUAL or RATIO. This number can be higher than the Auto Dial Level if your hardware will support it. Value must be a positive number greater than one and can have decimal places Default 3.0. - -
-
-
-Latest Server Time - This field is only used by the ADAPT_TAPERED dial method. You should enter in the hour and minute that you will stop calling on this campaign, 2100 would mean that you will stop dialing this campaign at 9PM server time. This allows the Tapered algorithm to decide how aggressively to dial by how long you have until you will be finished calling. - -
-
-
-Adapt Intensity Modifier - This field is used to adjust the predictive intensity either higher or lower. The higher a positive number you select, the greater the dialer will increase the call pacing when it goes up and the slower the dialer will decrease the call pacing when it goes down. The lower the negative number you select here, the slower the dialer will increase the call pacing and the faster the dialer will lower the call pacing when it goes down. Default is 0. This field is not used by the MANUAL or RATIO dial methods. - -
-
-
-Dial Level Difference Target - This field is used to define whether you want to target having a specific number of agents waiting for calls or calls waiting for agents. For example if you would always like to have on average one agent free to take calls immediately you would set this to -1, if you would like to target always having one call on hold waiting for an agent you would set this to 1. Default is 0. This field is not used by the MANUAL or RATIO dial methods. - -
-
-
-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. - -
-
-
-Omit Phone Code - This field allows you to leave out the phone_code field while dialing within VICIDIAL. For instance if you are dialing in the UK from the UK you would have 44 in as your phone_code field for all leads, but you just want to dial 10 digits in your dialplan extensions.conf to place calls instead of 44 then 10 digits. Default is N. - -
-
-
-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. ALLFORCE will start recording on the client whenever a call is sent to an agent giving the agent no option to stop recording. For ALLCALLS and ALLFORCE there is an option to use the Recording Delay to cut down on very short recordings and recude system load. - -
-
-
-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. - -
-
-
-Recording Delay - For ALLCALLS and ALLFORCE recording only. This setting will delay the starting of the recording on all calls for the number of seconds specified in this field. Default is 0. - -
-
-
-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. If you want to allow Consultative Transfers, a fronter to a closer, you can place CXFER as one of the number-to-dial presets and the proper dialstring will be sent to do a Local Consultative Transfer, then the agent can just LEAVE-3WAY-CALL and move on to their next call. If you want to allow Blind transfers of customers to a VICIDIAL AGI script for logging or an IVR, then place AXFER in the number-to-dial field. You can also specify an custom extension after the AXFER or CXFER, for instance if you want to do Internal Consultative transfers instead of Local you would put CXFER90009 in the number-to-dial field. - -
-
-
-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. Must be a number greater than 100. - -
-
-
-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. If you want to allow Consultative Transfers, a fronter to a closer, you can place CXFER as one of the number-to-dial presets and the proper dialstring will be sent to do a Local Consultative Transfer, then the agent can just LEAVE-3WAY-CALL and move on to their next call. If you want to allow Blind transfers of customers to a VICIDIAL AGI script for logging or an IVR, then place AXFER in the number-to-dial field. You can also specify an custom extension after the AXFER or CXFER, for instance if you want to do Internal Consultative transfers instead of Local you would put CXFER90009 in the number-to-dial field. - -
-
-
-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. - -
-
-
-Allowed Campaigns - This is a selectable list of Campaigns to which members of this user group can log in to. The ALL-CAMPAIGNS option allows the users in this group to see and log in to any campaign on the system. - - - - - -



- -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, lead_id, campaign, phone_login, group, channel_group, SQLdate, epoch, uniqueid, customer_zap_channel, server_ip, SIPexten, session_id. 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?

You can also use an iframe to load a separate window within the SCRIPT tab, here is an example with prepopulated variables: - -
-<iframe src="http://astguiclient.sf.net/test_VICIDIAL_output.php?lead_id=--A--lead_id--B--&vendor_id=--A--vendor_lead_code--B--&list_id=--A--list_id--B--&gmt_offset_now=--A--gmt_offset_now--B--&phone_code=--A--phone_code--B--&phone_number=--A--phone_number--B--&title=--A--title--B--&first_name=--A--first_name--B--&middle_initial=--A--middle_initial--B--&last_name=--A--last_name--B--&address1=--A--address1--B--&address2=--A--address2--B--&address3=--A--address3--B--&city=--A--city--B--&state=--A--state--B--&province=--A--province--B--&postal_code=--A--postal_code--B--&country_code=--A--country_code--B--&gender=--A--gender--B--&date_of_birth=--A--date_of_birth--B--&alt_phone=--A--alt_phone--B--&email=--A--email--B--&security_phrase=--A--security_phrase--B--&comments=--A--comments--B--&user=--A--user--B--&campaign=--A--campaign--B--&phone_login=--A--phone_login--B--&fronter=--A--fronter--B--&closer=--A--user--B--&group=--A--group--B--&channel_group=--A--group--B--&SQLdate=--A--SQLdate--B--&epoch=--A--epoch--B--&uniqueid=--A--uniqueid--B--&customer_zap_channel=--A--customer_zap_channel--B--&server_ip=--A--server_ip--B--&SIPexten=--A--SIPexten--B--&session_id=--A--session_id--B--&phone=--A--phone--B--" style="width:580;height:290;background-color:transparent;" scrolling="auto" frameborder="0" allowtransparency="true" id="popupFrame" name="popupFrame" width="460" height="290"> -</iframe> -
- -
-
-
-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 /etc/astguiclient.conf 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. - - - - -



- - - - - - -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' - -
-
-
-System Performance - Setting this option to Y will enable logging of system performance stats for the server machine including system load, system processes and Asterisk channels in use. Default is N. - -
-
-
-Server Logs - Setting this option to Y will enable logging of all VICIDIAL related scripts to their text log files. Setting this to N will stop writing logs to files for these processes, also the screen logging of asterisk will be disabled if this is set to N when Asterisk is started. Default is Y. - -
-
-
-AGI Output - Setting this option to NONE will disable output from all VICIDIAL related AGI scripts. Setting this to STDERR will send the AGI output to the Asterisk CLI. Setting this to FILE will send the output to a file in the logs directory. Setting this to BOTH will send output to both the Asterisk CLI and a log file. Default is FILE. - -
-
-
-VICIDIAL Balance Dialing - Setting this field to Y will allow the server to place balance calls for campaigns in VICIDIAL so that the defined dial level can be met even if there are no agents logged into that campaign on this server. Default is N. - -
-
-
-VICIDIAL Balance Offlimits - This setting defines the number of trunks to not allow VICIDIAL balance dialing to use. For example if you have 40 max vicidial trunks and balance offlimits is set to 10 you will only be able to use 30 trunk lines for VICIDIAL balance dialing. Default is 0. - - -



- -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. - - - - -



- -VICIDIAL_SERVER_TRUNKS TABLE

-
-
-VICIDIAL Server Trunks allows you to restrict the outgoing lines that are used on this server for campaign dialing on a per-campaign basis. You have the option to reserve a specific number of lines to be used by only one campaign as well as allowing that campaign to run over its reserved lines into whatever lines remain open, as long at the total lines used by vicidial on this server is less than the Max VICIDIAL Trunks setting. Not having any of these records will allow the campaign that dials the line first to have as many lines as it can get under the Max VICIDIAL Trunks setting. - - -







-







-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 = 'VENDOR:LEAD;CODE'; - $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'; - $RGlead_id = '1234'; - $RGcampaign = 'TESTCAMP'; - $RGphone_login = 'gs102'; - $RGgroup = 'TESTCAMP'; - $RGchannel_group = 'TESTCAMP'; - $RGSQLdate = date("Y-m-d H:i:s"); - $RGepoch = date("U"); - $RGuniqueid = '1163095830.4136'; - $RGcustomer_zap_channel = 'Zap/1-1'; - $RGserver_ip = '10.10.10.15'; - $RGSIPexten = 'SIP/gs102'; - $RGsession_id = '8600051'; - -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]; - -if (eregi("iframe src",$script_text)) - { - $vendor_lead_code = eregi_replace(' ','+',$vendor_lead_code); - $list_id = eregi_replace(' ','+',$list_id); - $gmt_offset_now = eregi_replace(' ','+',$gmt_offset_now); - $phone_code = eregi_replace(' ','+',$phone_code); - $phone_number = eregi_replace(' ','+',$phone_number); - $title = eregi_replace(' ','+',$title); - $first_name = eregi_replace(' ','+',$first_name); - $middle_initial = eregi_replace(' ','+',$middle_initial); - $last_name = eregi_replace(' ','+',$last_name); - $address1 = eregi_replace(' ','+',$address1); - $address2 = eregi_replace(' ','+',$address2); - $address3 = eregi_replace(' ','+',$address2); - $city = eregi_replace(' ','+',$city); - $state = eregi_replace(' ','+',$state); - $province = eregi_replace(' ','+',$province); - $postal_code = eregi_replace(' ','+',$postal_code); - $country_code = eregi_replace(' ','+',$country_code); - $gender = eregi_replace(' ','+',$gender); - $date_of_birth = eregi_replace(' ','+',$date_of_birth); - $alt_phone = eregi_replace(' ','+',$alt_phone); - $email = eregi_replace(' ','+',$email); - $security_phrase = eregi_replace(' ','+',$security_phrase); - $comments = eregi_replace(' ','+',$comments); - $RGfullname = eregi_replace(' ','+',$RGfullname); - $RGuser = eregi_replace(' ','+',$RGuser); - $RGlead_id = eregi_replace(' ','+',$RGlead_id); - $RGcampaign = eregi_replace(' ','+',$RGcampaign); - $RGphone_login = eregi_replace(' ','+',$RGphone_login); - $RGgroup = eregi_replace(' ','+',$RGgroup); - $RGchannel_group = eregi_replace(' ','+',$RGchannel_group); - $RGSQLdate = eregi_replace(' ','+',$RGSQLdate); - $RGepoch = eregi_replace(' ','+',$RGepoch); - $RGuniqueid = eregi_replace(' ','+',$RGuniqueid); - $RGcustomer_zap_channel = eregi_replace(' ','+',$RGcustomer_zap_channel); - $RGserver_ip = eregi_replace(' ','+',$RGserver_ip); - $RGSIPexten = eregi_replace(' ','+',$RGSIPexten); - $RGsession_id = eregi_replace(' ','+',$RGsession_id); - } - -$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--fronter--B--',"$RGuser",$script_text); -$script_text = eregi_replace('--A--user--B--',"$RGuser",$script_text); -$script_text = eregi_replace('--A--lead_id--B--',"$RGlead_id",$script_text); -$script_text = eregi_replace('--A--campaign--B--',"$RGcampaign",$script_text); -$script_text = eregi_replace('--A--phone_login--B--',"$RGphone_login",$script_text); -$script_text = eregi_replace('--A--group--B--',"$RGgroup",$script_text); -$script_text = eregi_replace('--A--channel_group--B--',"$RGchannel_group",$script_text); -$script_text = eregi_replace('--A--SQLdate--B--',"$RGSQLdate",$script_text); -$script_text = eregi_replace('--A--epoch--B--',"$RGepoch",$script_text); -$script_text = eregi_replace('--A--uniqueid--B--',"$RGuniqueid",$script_text); -$script_text = eregi_replace('--A--customer_zap_channel--B--',"$RGcustomer_zap_channel",$script_text); -$script_text = eregi_replace('--A--server_ip--B--',"$RGserver_ip",$script_text); -$script_text = eregi_replace('--A--SIPexten--B--',"$RGSIPexten",$script_text); -$script_text = eregi_replace('--A--session_id--B--',"$RGsession_id",$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';} -if ($hh=='server') {$server_hh='bgcolor ="#FF99FF"'; $server_fc='BLACK';} # pink - else {$server_hh=''; $server_fc='WHITE';} - -?> - - - - -\n"; -?> -
- - - - - - - - - - - - - - - - - - 1) { - ?> - - 1) { - ?> - - 1) { - ?> - - 1) { - ?> - - 1) { - ?> - - 1) { - ?> - - 1) { - ?> - - 1) { - ?> - - 1) { - ?> - - 1) { - ?> - -\n"; - echo "You are not authorized to view this page. Please go back.\n"; - } - -} -if (strlen($reports_hh) > 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 > SIZE=1> PHONES > REPORTS
  LIST USERS     |     ADD A NEW USER     |     SEARCH FOR A USER
  ADD CAMPAIGN     |     LIST CAMPAIGNS     |     REALTIME CAMPAIGNS SUMMARY
  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
  PHONES   |   ADD PHONE   |   SERVERS   |   ADD SERVER   |   CONFERENCES   |   ADD CONFERENCE   |   VD CONFERENCES   |   ADD VD CONFERENCE
 
-
\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"; -} - - -###################### -# ADD=11111111111 display the ADD NEW PHONE SCREEN -###################### - -if ($ADD==11111111111) -{ -echo "
\n"; -echo ""; - -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=111111111111 display the ADD NEW SERVER SCREEN -###################### - -if ($ADD==111111111111) -{ -echo "
\n"; -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=1111111111111 display the ADD NEW CONFERENCE SCREEN -###################### - -if ($ADD==1111111111111) -{ -echo "
\n"; -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=11111111111111 display the ADD NEW VICIDIAL CONFERENCE SCREEN -###################### - -if ($ADD==11111111111111) -{ -echo "
\n"; -echo ""; - -echo "
ADD A NEW VICIDIAL 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"; -} - - - -###################################################################################################### -###################################################################################################### -####### 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 ($list_id < 100) 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"; - echo "
List ID must be greater than 100\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(user_group,group_name,allowed_campaigns) values('$user_group','$group_name','-ALL-CAMPAIGNS-');"; - $rslt=mysql_query($stmt, $link); - - echo "
USER GROUP ADDED: $user_group\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|$stmt|\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','$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; -} - - -###################### -# ADD=21111111111 adds new phone to the system -###################### - -if ($ADD==21111111111) -{ -echo "
\n"; - 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=31111111111; -} - - -###################### -# ADD=211111111111 adds new server to the system -###################### - -if ($ADD==211111111111) -{ -echo "
\n"; - 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=311111111111; -} - - -###################### -# ADD=221111111111 adds the new vicidial server trunk record to the system -###################### - -if ($ADD==221111111111) -{ - echo ""; - $stmt="SELECT max_vicidial_trunks from servers where server_ip='$server_ip';"; - $rslt=mysql_query($stmt, $link); - $rowx=mysql_fetch_row($rslt); - $MAXvicidial_trunks = $rowx[0]; - - $stmt="SELECT sum(dedicated_trunks) from vicidial_server_trunks where server_ip='$server_ip' and campaign_id !='$campaign_id';"; - $rslt=mysql_query($stmt, $link); - $rowx=mysql_fetch_row($rslt); - $SUMvicidial_trunks = ($rowx[0] + $dedicated_trunks); - - if ($SUMvicidial_trunks > $MAXvicidial_trunks) - { - echo "
VICIDIAL SERVER TRUNK RECORD NOT ADDED - the number of vicidial trunks is too high: $SUMvicidial_trunks / $MAXvicidial_trunks\n"; - } - else - { - $stmt="SELECT count(*) from vicidial_server_trunks where campaign_id='$campaign_id' and server_ip='$server_ip';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0] > 0) - {echo "
VICIDIAL SERVER TRUNK RECORD NOT ADDED - there is already a server-trunk record for this campaign\n";} - else - { - if ( (strlen($campaign_id) < 2) or (strlen($server_ip) < 7) or (strlen($dedicated_trunks) < 1) or (strlen($trunk_restriction) < 1) ) - { - echo "
VICIDIAL SERVER TRUNK RECORD NOT ADDED - Please go back and look at the data you entered\n"; - echo "
campaign must be between 3 and 8 characters in length\n"; - echo "
server_ip delay must be at least 7 characters\n"; - echo "
trunks must be a digit from 0 to 9999\n"; - } - else - { - echo "
VICIDIAL SERVER TRUNK RECORD ADDED: $campaign_id - $server_ip - $dedicated_trunks - $trunk_restriction\n"; - - $stmt="INSERT INTO vicidial_server_trunks(server_ip,campaign_id,dedicated_trunks,trunk_restriction) values('$server_ip','$campaign_id','$dedicated_trunks','$trunk_restriction');"; - $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 VICIDIAL TRUNK |$PHP_AUTH_USER|$ip|$stmt|\n"); - fclose($fp); - } - } - } - } -$ADD=311111111111; -} - - -###################### -# ADD=2111111111111 adds new conference to the system -###################### - -if ($ADD==2111111111111) -{ -echo "
\n"; - 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=3111111111111; -} - - -###################### -# ADD=21111111111111 adds new vicidial conference to the system -###################### - -if ($ADD==21111111111111) -{ -echo "
\n"; - echo ""; - $stmt="SELECT count(*) from vicidial_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 "
VICIDIAL CONFERENCE NOT ADDED - there is already a vicidial conference in the system with this ID and server\n";} - else - { - if ( (strlen($conf_exten) < 1) or (strlen($server_ip) < 7) ) - {echo "
VICIDIAL CONFERENCE NOT ADDED - Please go back and look at the data you entered\n";} - else - { - echo "
VICIDIAL CONFERENCE ADDED\n"; - - $stmt="INSERT INTO vicidial_conferences (conf_exten,server_ip) values('$conf_exten','$server_ip');"; - $rslt=mysql_query($stmt, $link); - } - } -$ADD=31111111111111; -} - - - -###################################################################################################### -###################################################################################################### -####### 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"; - - if ($dial_method == 'RATIO') - { - if ($auto_dial_level < 1) {$auto_dial_level = "1.0";} - $adlSQL = "auto_dial_level='$auto_dial_level',"; - } - else - { - if ($dial_method == 'MANUAL') - { - $auto_dial_level='0'; - $adlSQL = "auto_dial_level='0',"; - } - else - { - $adlSQL = ""; - if ($auto_dial_level < 1) - { - $auto_dial_level = "1.0"; - $adlSQL = "auto_dial_level='$auto_dial_level',"; - } - } - } - $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', $adlSQL 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',allcalls_delay='$allcalls_delay',omit_phone_code='$omit_phone_code',dial_method='$dial_method',available_only_ratio_tally='$available_only_ratio_tally',adaptive_dropped_percentage='$adaptive_dropped_percentage',adaptive_maximum_level='$adaptive_maximum_level',adaptive_latest_server_time='$adaptive_latest_server_time',adaptive_intensity='$adaptive_intensity',adaptive_dl_diff_target='$adaptive_dl_diff_target' 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 IN('READY','QUEUE','DONE');"; - $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|$stmt|\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"; - - if ($dial_method == 'RATIO') - { - if ($auto_dial_level < 1) {$auto_dial_level = "1.0";} - $adlSQL = "auto_dial_level='$auto_dial_level',"; - } - else - { - if ($dial_method == 'MANUAL') - { - $auto_dial_level='0'; - $adlSQL = "auto_dial_level='0',"; - } - else - { - $adlSQL = ""; - if ($auto_dial_level < 1) - { - $auto_dial_level = "1.0"; - $adlSQL = "auto_dial_level='$auto_dial_level',"; - } - } - } - $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', $adlSQL lead_filter_id='$lead_filter_id',dial_method='$dial_method',adaptive_intensity='$adaptive_intensity' 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 IN('READY','QUEUE','DONE');;"; - $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|$stmt|\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',allowed_campaigns='$campaigns_value' 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|$stmt|\n"); - fclose($fp); - } - } - -$ADD=311111; # go to user group modification form below -} - -###################### -# ADD=4111111 modify script in the system -###################### - -if ($ADD==4111111) -{ - echo "\n"; - echo "\n"; - 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='$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 -} - - -###################### -# ADD=41111111111 modify phone record in the system -###################### - -if ($ADD==41111111111) -{ - 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); - } - } -$ADD=31111111111; # go to phone modification form below -} - - -###################### -# ADD=411111111111 modify server record in the system -###################### - -if ($ADD==411111111111) -{ - 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', sys_perf_log='$sys_perf_log', vd_server_logs='$vd_server_logs', agi_output='$agi_output', vicidial_balance_active='$vicidial_balance_active', balance_trunks_offlimits='$balance_trunks_offlimits' where server_id='$old_server_id';"; - $rslt=mysql_query($stmt, $link); - } - } - } -$ADD=311111111111; # go to server modification form below -} - - -###################### -# ADD=421111111111 modify vicidial server trunks record in the system -###################### - -if ($ADD==421111111111) -{ - echo ""; - $stmt="SELECT max_vicidial_trunks from servers where server_ip='$server_ip';"; - $rslt=mysql_query($stmt, $link); - $rowx=mysql_fetch_row($rslt); - $MAXvicidial_trunks = $rowx[0]; - - $stmt="SELECT sum(dedicated_trunks) from vicidial_server_trunks where server_ip='$server_ip' and campaign_id !='$campaign_id';"; - $rslt=mysql_query($stmt, $link); - $rowx=mysql_fetch_row($rslt); - $SUMvicidial_trunks = ($rowx[0] + $dedicated_trunks); - - if ($SUMvicidial_trunks > $MAXvicidial_trunks) - { - echo "
VICIDIAL SERVER TRUNK RECORD NOT ADDED - the number of vicidial trunks is too high: $SUMvicidial_trunks / $MAXvicidial_trunks\n"; - } - else - { - if ( (strlen($campaign_id) < 2) or (strlen($server_ip) < 7) or (strlen($dedicated_trunks) < 1) or (strlen($trunk_restriction) < 1) ) - { - echo "
VICIDIAL SERVER TRUNK RECORD NOT MODIFIED - Please go back and look at the data you entered\n"; - echo "
campaign must be between 3 and 8 characters in length\n"; - echo "
server_ip delay must be at least 7 characters\n"; - echo "
trunks must be a digit from 0 to 9999\n"; - } - else - { - echo "
VICIDIAL SERVER TRUNK RECORD MODIFIED: $campaign_id - $server_ip - $dedicated_trunks - $trunk_restriction\n"; - - $stmt="UPDATE vicidial_server_trunks SET dedicated_trunks='$dedicated_trunks',trunk_restriction='$trunk_restriction' where campaign_id='$campaign_id' and server_ip='$server_ip';"; - $rslt=mysql_query($stmt, $link); - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|MODIFY SERVER TRUNK |$PHP_AUTH_USER|$ip|$stmt|\n"); - fclose($fp); - } - } - } -$ADD=311111111111; # go to server modification form below -} - - -###################### -# ADD=4111111111111 modify conference record in the system -###################### - -if ($ADD==4111111111111) -{ - 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); - } - } -$ADD=3111111111111; # go to conference modification form below -} - - -###################### -# ADD=41111111111111 modify vicidial conference record in the system -###################### - -if ($ADD==41111111111111) -{ - echo ""; - - $stmt="SELECT count(*) from vicidial_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 "
VICIDIAL 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 "
VICIDIAL CONFERENCE NOT MODIFIED - Please go back and look at the data you entered\n";} - else - { - echo "
VICIDIAL CONFERENCE MODIFIED: $conf_exten\n"; - - $stmt="UPDATE vicidial_conferences set conf_exten='$conf_exten',server_ip='$server_ip',extension='$extension' where conf_exten='$old_conf_exten';"; - $rslt=mysql_query($stmt, $link); - } - } -$ADD=31111111111111; # go to vicidial conference 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=53 confirmation before Emergency VDAC Jam Clear - deletes oldest LIVE vicidial_auto_call record -###################### - -if ($ADD==53) -{ - if (eregi('IN',$stage)) - {$group_id=$campaign_id;} - echo ""; - - if (strlen($campaign_id) < 2) - { - echo "
VDAC NOT CLEARED FOR 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 "
VDAC CLEAR CONFIRMATION: $campaign_id\n"; - echo "

Click here to delete the oldest LIVE record in VDAC for $campaign_id


\n"; - } - -# go to campaign modification below -if (eregi('IN',$stage)) - {$ADD='3111';} -else - {$ADD='31';} -} - -###################### -# 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 state 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 -} - - -###################### -# ADD=51111111111 confirmation before deletion of phone record -###################### - -if ($ADD==51111111111) -{ - echo ""; - - if ( (strlen($extension) < 2) or (strlen($server_ip) < 7) or ($LOGast_delete_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='31111111111'; # go to phone modification below -} - - -###################### -# ADD=511111111111 confirmation before deletion of server record -###################### - -if ($ADD==511111111111) -{ - echo ""; - - if ( (strlen($server_id) < 2) or (strlen($server_ip) < 7) or ($LOGast_delete_phones < 1) ) - { - echo "
SERVER NOT DELETED - Please go back and look at the data you entered\n"; - echo "
Server ID be at least 2 characters in length\n"; - echo "
Server IP be at least 7 characters in length\n"; - } - else - { - echo "
SERVER DELETION CONFIRMATION: $server_id - $server_ip\n"; - echo "

Click here to delete phone $server_id - $server_ip


\n"; - } -$ADD='311111111111'; # go to server modification below -} - - -###################### -# ADD=5111111111111 confirmation before deletion of conference record -###################### - -if ($ADD==5111111111111) -{ - echo ""; - - if ( (strlen($conf_exten) < 2) or (strlen($server_ip) < 7) or ($LOGast_delete_phones < 1) ) - { - echo "
CONFERENCE NOT DELETED - Please go back and look at the data you entered\n"; - echo "
Conference must be at least 2 characters in length\n"; - echo "
Server IP be at least 7 characters in length\n"; - } - else - { - echo "
CONFERENCE DELETION CONFIRMATION: $conf_exten - $server_ip\n"; - echo "

Click here to delete phone $conf_exten - $server_ip


\n"; - } -$ADD='3111111111111'; # go to conference modification below -} - - -###################### -# ADD=51111111111111 confirmation before deletion of vicidial conference record -###################### - -if ($ADD==51111111111111) -{ - echo ""; - - if ( (strlen($conf_exten) < 2) or (strlen($server_ip) < 7) or ($LOGast_delete_phones < 1) ) - { - echo "
VICIDIAL CONFERENCE NOT DELETED - Please go back and look at the data you entered\n"; - echo "
Conference must be at least 2 characters in length\n"; - echo "
Server IP be at least 7 characters in length\n"; - } - else - { - echo "
VICIDIAL CONFERENCE DELETION CONFIRMATION: $conf_exten - $server_ip\n"; - echo "

Click here to delete phone $conf_exten - $server_ip


\n"; - } -$ADD='31111111111111'; # go to vicidial conference 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 from 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=63 Emergency VDAC Jam Clear -###################### - -if ($ADD==63) -{ - if (eregi('IN',$stage)) - {$group_id=$campaign_id;} - echo ""; - - if (strlen($campaign_id) < 2) - { - echo "
VDAC NOT CLEARED FOR 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_auto_calls where status='LIVE' and campaign_id='$campaign_id' order by call_time 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|EMERGENCY VDAC CLEAR|$PHP_AUTH_USER|$ip|campaign_id='$campaign_id'|\n"); - fclose($fp); - } - echo "
LAST VDAC RECORD CLEARED FOR CAMPAIGN: $campaign_id\n"; - echo "

\n"; - } - -# go to campaign modification below -if (eregi('IN',$stage)) - {$ADD='3111';} -else - {$ADD='31';} -} - - -###################### -# 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 -} - - -###################### -# ADD=61111111111 delete phone record -###################### - -if ($ADD==61111111111) -{ - echo ""; - - if ( (strlen($extension) < 2) or (strlen($server_ip) < 7) or ($CoNfIrM != 'YES') or ($LOGast_delete_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='10000000000'; # go to phone list -} - - -###################### -# ADD=611111111111 delete server record -###################### - -if ($ADD==611111111111) -{ - echo ""; - - if ( (strlen($server_id) < 2) or (strlen($server_ip) < 7) or ($CoNfIrM != 'YES') or ($LOGast_delete_phones < 1) ) - { - echo "
SERVER NOT DELETED - Please go back and look at the data you entered\n"; - echo "
Server ID be at least 2 characters in length\n"; - echo "
Server IP be at least 7 characters in length\n"; - } - else - { - $stmt="DELETE from servers where server_id='$server_id' 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 SERVER!!|$PHP_AUTH_USER|$ip|server_id='$server_id'|server_ip='$server_ip'|\n"); - fclose($fp); - } - echo "
SERVER DELETION COMPLETED: $server_id - $server_ip\n"; - echo "

\n"; - } -$ADD='100000000000'; # go to server list -} - - -###################### -# ADD=621111111111 delete vicidial server trunk record in the system -###################### - -if ($ADD==621111111111) -{ - echo ""; - - if ( (strlen($campaign_id) < 2) or (strlen($server_ip) < 7) ) - { - echo "
VICIDIAL SERVER TRUNK RECORD NOT DELETED - Please go back and look at the data you entered\n"; - echo "
campaign must be between 3 and 8 characters in length\n"; - echo "
server_ip delay must be at least 7 characters\n"; - } - else - { - echo "
VICIDIAL SERVER TRUNK RECORD DELETED: $campaign_id - $server_ip\n"; - - $stmt="DELETE FROM vicidial_server_trunks where campaign_id='$campaign_id' and server_ip='$server_ip';"; - $rslt=mysql_query($stmt, $link); - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|DELETE SERVER TRUNK |$PHP_AUTH_USER|$ip|$stmt|\n"); - fclose($fp); - } - } - -$ADD=311111111111; # go to server modification form below -} - - -###################### -# ADD=6111111111111 delete conference record -###################### - -if ($ADD==6111111111111) -{ - echo ""; - - if ( (strlen($conf_exten) < 2) or (strlen($server_ip) < 7) or ($CoNfIrM != 'YES') or ($LOGast_delete_phones < 1) ) - { - echo "
CONFERENCE NOT DELETED - Please go back and look at the data you entered\n"; - echo "
Conference be at least 2 characters in length\n"; - echo "
Server IP be at least 7 characters in length\n"; - } - else - { - $stmt="DELETE from conferences where conf_exten='$conf_exten' 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 CONF!!!!|$PHP_AUTH_USER|$ip|conf_exten='$conf_exten'|server_ip='$server_ip'|\n"); - fclose($fp); - } - echo "
CONFERENCE DELETION COMPLETED: $conf_exten - $server_ip\n"; - echo "

\n"; - } -$ADD='1000000000000'; # go to conference list -} - - -###################### -# ADD=61111111111111 delete vicidial conference record -###################### - -if ($ADD==61111111111111) -{ - echo ""; - - if ( (strlen($conf_exten) < 2) or (strlen($server_ip) < 7) or ($CoNfIrM != 'YES') or ($LOGast_delete_phones < 1) ) - { - echo "
VICIDIAL CONFERENCE NOT DELETED - Please go back and look at the data you entered\n"; - echo "
Conference be at least 2 characters in length\n"; - echo "
Server IP be at least 7 characters in length\n"; - } - else - { - $stmt="DELETE from vicidial_conferences where conf_exten='$conf_exten' 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 CONF!!!!|$PHP_AUTH_USER|$ip|conf_exten='$conf_exten'|server_ip='$server_ip'|\n"); - fclose($fp); - } - echo "
VICIDIAL CONFERENCE DELETION COMPLETED: $conf_exten - $server_ip\n"; - echo "

\n"; - } -$ADD='10000000000000'; # go to vicidial conference 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) and ( (!eregi("$campaign_id",$LOGallowed_campaigns)) and (!eregi("ALL-CAMPAIGNS",$LOGallowed_campaigns)) ) ) - {$ADD=30;} # send to not allowed screen if not in vicidial_user_groups allowed_campaigns list - -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]; - $allcalls_delay = $row[44]; - $omit_phone_code = $row[45]; - $dial_method = $row[46]; - $available_only_ratio_tally = $row[47]; - $adaptive_dropped_percentage = $row[48]; - $adaptive_maximum_level = $row[49]; - $adaptive_latest_server_time = $row[50]; - $adaptive_intensity = $row[51]; - $adaptive_dl_diff_target = $row[52]; - -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"; - -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
Dial Method: $NWB#vicidial_campaigns-dial_method$NWE
Auto Dial Level: (0 = off)$NWB#vicidial_campaigns-auto_dial_level$NWE
Available Only Tally: $NWB#vicidial_campaigns-available_only_ratio_tally$NWE
Drop Percentage Limit: % $NWB#vicidial_campaigns-adaptive_dropped_percentage$NWE
Maximum Adapt Dial Level: number only $NWB#vicidial_campaigns-adaptive_maximum_level$NWE
Latest Server Time: 4 digits only $NWB#vicidial_campaigns-adaptive_latest_server_time$NWE
Adapt Intensity Modifier: $NWB#vicidial_campaigns-adaptive_intensity$NWE
Dial Level Difference Target: $NWB#vicidial_campaigns-adaptive_dl_diff_target$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
Omit Phone Code: $NWB#vicidial_campaigns-omit_phone_code$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
Recording Delay: in seconds$NWB#vicidial_campaigns-allcalls_delay$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 "Click here to see a VDAD report for 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"; -echo "EMERGENCY VDAC CLEAR FOR 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) and ( (!eregi("$campaign_id",$LOGallowed_campaigns)) and (!eregi("ALL-CAMPAIGNS",$LOGallowed_campaigns)) ) ) - {$ADD=30;} # send to not allowed screen if not in vicidial_user_groups allowed_campaigns list - -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]; - $dial_method = $row[46]; - $adaptive_intensity = $row[51]; - -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 "\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
Dial Method: $NWB#vicidial_campaigns-dial_method$NWE
Auto Dial Level: (0 = off)$NWB#vicidial_campaigns-auto_dial_level$NWE
Adapt Intensity Modifier: $NWB#vicidial_campaigns-adaptive_intensity$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 "Click here to see a VDAD report for 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=31 campaign not allowed -###################### - -if ($ADD==30) -{ -echo "
\n"; - echo ""; -echo "You do not have permission to view campaign $campaign_id\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 "Click here to see a report for this campaign

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

EMERGENCY VDAC CLEAR FOR THIS IN-GROUP

\n"; - 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 "\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
Allowed Campaigns: \n"; -echo "$campaigns_list"; -echo "$NWB#vicidial_user_groups-allowed_campaigns$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=31111111111 modify phone record in the system -###################### - -if ($ADD==31111111111) -{ -echo "
\n"; - 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 ($LOGast_delete_phones > 0) - { - echo "

DELETE THIS PHONE\n"; - } -} - - -###################### -# ADD=311111111111 modify server record in the system -###################### - -if ($ADD==311111111111) -{ -echo "
\n"; - echo ""; - - $stmt="SELECT * from servers where server_id='$server_id' or server_ip='$server_ip';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $server_id = $row[0]; - $server_ip = $row[2]; - -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 "\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
VICIDIAL Balance Dialing: $NWB#servers-vicidial_balance_active$NWE
VICIDIAL Balance Offlimits: $NWB#servers-balance_trunks_offlimits$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
System Performance: $NWB#servers-sys_perf_log$NWE
Server Logs: $NWB#servers-vd_server_logs$NWE
AGI Output: $NWB#servers-agi_output$NWE
\n"; - - -### vicidial server trunk records for this server -echo "

VICIDIAL TRUNKS FOR THIS SERVER:   $NWB#vicidial_server_trunks$NWE
\n"; -echo "\n"; -echo "\n"; - - $stmt="SELECT * from vicidial_server_trunks where server_ip='$server_ip' order by campaign_id"; - $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 "
CAMPAIGN TRUNKS RESTRICTION DELETE
$rowx[1]
\n"; - echo "\n"; - echo "\n"; - echo "
DELETE
\n"; - -echo "
ADD NEW SERVER VICIDIAL TRUNK RECORD
\n"; -echo "\n"; -echo "\n"; -echo "TRUNKS:
\n"; -echo "CAMPAIGN:
\n"; -echo "RESTRICTION:
\n"; -echo "
\n"; - -echo "

\n"; - - -### list of phones on this server -echo "
\n"; -echo "
PHONES WITHIN THIS SERVER:
\n"; -echo "\n"; -echo "\n"; - - $active_phones = 0; - $inactive_phones = 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_phones++; $camp_lists .= "'$rowx[0]',";} - if (ereg("N", $rowx[1])) {$inactive_phones++;} - - 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"; - - -### list of conferences on this server -echo "
\n"; -echo "
CONFERENCES WITHIN THIS SERVER:
\n"; -echo "\n"; -echo "\n"; - - $active_confs = 0; - $stmt="SELECT conf_exten,extension from conferences 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++; - $active_confs++; - - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - - echo "\n"; - } - -echo "
CONFERENCEEXTENSION
$rowx[0]$rowx[2]

\n"; - - -### list of vicidial conferences on this server -echo "
\n"; -echo "
VICIDIAL CONFERENCES WITHIN THIS SERVER:
\n"; -echo "\n"; -echo "\n"; - - $active_vdconfs = 0; - $stmt="SELECT conf_exten,extension from vicidial_conferences 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++; - $active_vdconfs++; - - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - - echo "\n"; - } - -echo "
VD CONFERENCEEXTENSION
$rowx[0]$rowx[2]

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

\n"; -echo "This server has $active_confs active conferences

\n"; -echo "This server has $active_vdconfs active vicidial conferences

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

DELETE THIS SERVER\n"; - } -} - - -###################### -# ADD=3111111111111 modify conference record in the system -###################### - -if ($ADD==3111111111111) -{ -echo "
\n"; - 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); - $conf_exten = $row[0]; - $server_ip = $row[1]; - -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"; -if ($LOGast_delete_phones > 0) - { - echo "

DELETE THIS CONFERENCE\n"; - } -} - - -###################### -# ADD=31111111111111 modify vicidial conference record in the system -###################### - -if ($ADD==31111111111111) -{ -echo "
\n"; - echo ""; - - $stmt="SELECT * from vicidial_conferences where conf_exten='$conf_exten' and server_ip='$server_ip';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $conf_exten = $row[0]; - $server_ip = $row[1]; - -echo "
MODIFY A VICIDIAL 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"; -if ($LOGast_delete_phones > 0) - { - echo "

DELETE THIS VICIDIAL CONFERENCE\n"; - } -} - - - - - - - -###################### -# 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 "
LEADLIST CAMPAIGNENTRY 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 ""; - -$USERlink='stage=USERIDDOWN'; -$NAMElink='stage=NAMEDOWN'; -$LEVELlink='stage=LEVELDOWN'; -$GROUPlink='stage=GROUPDOWN'; -$SQLorder='order by full_name'; -if (eregi("USERIDUP",$stage)) {$SQLorder='order by user asc'; $USERlink='stage=USERIDDOWN';} -if (eregi("USERIDDOWN",$stage)) {$SQLorder='order by user desc'; $USERlink='stage=USERIDUP';} -if (eregi("NAMEUP",$stage)) {$SQLorder='order by full_name asc'; $NAMElink='stage=NAMEDOWN';} -if (eregi("NAMEDOWN",$stage)) {$SQLorder='order by full_name desc'; $NAMElink='stage=NAMEUP';} -if (eregi("LEVELUP",$stage)) {$SQLorder='order by user_level asc'; $LEVELlink='stage=LEVELDOWN';} -if (eregi("LEVELDOWN",$stage)) {$SQLorder='order by user_level desc'; $LEVELlink='stage=LEVELUP';} -if (eregi("GROUPUP",$stage)) {$SQLorder='order by user_group asc'; $GROUPlink='stage=GROUPDOWN';} -if (eregi("GROUPDOWN",$stage)) {$SQLorder='order by user_group desc'; $GROUPlink='stage=GROUPUP';} - $stmt="SELECT * from vicidial_users $SQLorder"; - $rslt=mysql_query($stmt, $link); - $people_to_print = mysql_num_rows($rslt); - -echo "
USER LISTINGS:\n"; -echo "
\n"; -echo ""; -echo ""; -echo ""; -echo ""; -echo ""; -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 "
USER IDFULL NAMELEVELGROUPLINKS
$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 ""; - - $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"; -} - -###################### -# ADD=10000000000 display all phones -###################### -if ($ADD==10000000000) -{ -echo "
\n"; -echo ""; - -$EXTENlink='stage=EXTENDOWN'; -$PROTOlink='stage=PROTODOWN'; -$SERVERlink='stage=SERVERDOWN'; -$STATUSlink='stage=STATUSDOWN'; -$SQLorder='order by extension,server_ip'; -if (eregi("EXTENUP",$stage)) {$SQLorder='order by extension asc'; $EXTENlink='stage=EXTENDOWN';} -if (eregi("EXTENDOWN",$stage)) {$SQLorder='order by extension desc'; $EXTENlink='stage=EXTENUP';} -if (eregi("PROTOUP",$stage)) {$SQLorder='order by protocol asc'; $PROTOlink='stage=PROTODOWN';} -if (eregi("PROTODOWN",$stage)) {$SQLorder='order by protocol desc'; $PROTOlink='stage=PROTOUP';} -if (eregi("SERVERUP",$stage)) {$SQLorder='order by server_ip asc'; $SERVERlink='stage=SERVERDOWN';} -if (eregi("SERVERDOWN",$stage)) {$SQLorder='order by server_ip desc'; $SERVERlink='stage=SERVERUP';} -if (eregi("STATUSUP",$stage)) {$SQLorder='order by status asc'; $STATUSlink='stage=STATUSDOWN';} -if (eregi("STATUSDOWN",$stage)) {$SQLorder='order by status desc'; $STATUSlink='stage=STATUSUP';} - $stmt="SELECT * from phones $SQLorder"; - $rslt=mysql_query($stmt, $link); - $phones_to_print = mysql_num_rows($rslt); - -echo "
PHONE LISTINGS:\n"; -echo "
\n"; -echo ""; -echo ""; -echo ""; -echo ""; -echo ""; -echo ""; -echo ""; -echo ""; -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 "
EXTENPROTOSERVERDIALPLANSTATUSNAMEVMAILLINKS
$row[0]$row[16]$row[5]$row[1]$row[2]$row[8]$row[11]$row[14]$row[15]MODIFY | STATS
\n"; -} - -###################### -# ADD=100000000000 display all servers -###################### -if ($ADD==100000000000) -{ -echo "
\n"; - 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=1000000000000 display all conferences -###################### -if ($ADD==1000000000000) -{ -echo "
\n"; - 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"; -} - -###################### -# ADD=10000000000000 display all vicidial conferences -###################### -if ($ADD==10000000000000) -{ -echo "
\n"; - echo ""; - - $stmt="SELECT * from vicidial_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"; -} - - - - -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 ### -} -?> + LICENSE: GPLv2 +# + + +require("dbconnect.php"); + +$page_width='750'; +$section_width='700'; +$header_font_size='3'; +$subheader_font_size='2'; +$header_selected_bold=''; +$header_nonselected_bold=''; +$users_color = '#FFFF99'; +$campaigns_color = '#FFCC99'; +$lists_color = '#FFCCCC'; +$ingroups_color = '#CC99FF'; +$remoteagent_color ='#CCFFCC'; +$usergroups_color = '#CCFFFF'; +$scripts_color = '#99FFCC'; +$filters_color = '#CCCCCC'; +$admin_color = '#FF99FF'; +$reports_color = '#99FF33'; +#$users_color = '#FFFF99'; +#$campaigns_color = '#FFFF99'; +#$lists_color = '#FFFF99'; +#$ingroups_color = '#FFFF99'; +#$remoteagent_color ='#FFFF99'; +#$usergroups_color = '#FFFF99'; +#$scripts_color = '#FFFF99'; +#$filters_color = '#FFFF99'; +#$admin_color = '#FFFF99'; +#$reports_color = '#FFFF99'; + $times_color = '#CCCC00'; + $phones_color = '#CCCC00'; + $conference_color = '#CCCC00'; + $server_color = '#CCCC00'; + $settings_color = '#CCCC00'; +$users_font = 'BLACK'; +$campaigns_font = 'BLACK'; +$lists_font = 'BLACK'; +$ingroups_font = 'BLACK'; +$remoteagent_font = 'BLACK'; +$usergroups_font = 'BLACK'; +$scripts_font = 'BLACK'; +$filters_font = 'BLACK'; +$admin_font = 'BLACK'; +$reports_font = 'BLACK'; + $times_font = 'BLACK'; + $phones_font = 'BLACK'; + $conference_font = 'BLACK'; + $server_font = 'BLACK'; + $settings_font = 'BLACK'; + +$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; +$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; +$PHP_SELF=$_SERVER['PHP_SELF']; + +if (isset($_GET["DB"])) {$DB=$_GET["DB"];} + elseif (isset($_POST["DB"])) {$DB=$_POST["DB"];} +if (isset($_GET["active"])) {$active=$_GET["active"];} + elseif (isset($_POST["active"])) {$active=$_POST["active"];} +if (isset($_GET["adaptive_dl_diff_target"])) {$adaptive_dl_diff_target=$_GET["adaptive_dl_diff_target"];} + elseif (isset($_POST["adaptive_dl_diff_target"])) {$adaptive_dl_diff_target=$_POST["adaptive_dl_diff_target"];} +if (isset($_GET["adaptive_dropped_percentage"])) {$adaptive_dropped_percentage=$_GET["adaptive_dropped_percentage"];} + elseif (isset($_POST["adaptive_dropped_percentage"])){$adaptive_dropped_percentage=$_POST["adaptive_dropped_percentage"];} +if (isset($_GET["adaptive_intensity"])) {$adaptive_intensity=$_GET["adaptive_intensity"];} + elseif (isset($_POST["adaptive_intensity"])) {$adaptive_intensity=$_POST["adaptive_intensity"];} +if (isset($_GET["adaptive_latest_server_time"])) {$adaptive_latest_server_time=$_GET["adaptive_latest_server_time"];} + elseif (isset($_POST["adaptive_latest_server_time"])){$adaptive_latest_server_time=$_POST["adaptive_latest_server_time"];} +if (isset($_GET["adaptive_maximum_level"])) {$adaptive_maximum_level=$_GET["adaptive_maximum_level"];} + elseif (isset($_POST["adaptive_maximum_level"])) {$adaptive_maximum_level=$_POST["adaptive_maximum_level"];} +if (isset($_GET["ADD"])) {$ADD=$_GET["ADD"];} + elseif (isset($_POST["ADD"])) {$ADD=$_POST["ADD"];} +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["AFLogging_enabled"])) {$AFLogging_enabled=$_GET["AFLogging_enabled"];} + elseif (isset($_POST["AFLogging_enabled"])) {$AFLogging_enabled=$_POST["AFLogging_enabled"];} +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["agentcall_manual"])) {$agentcall_manual=$_GET["agentcall_manual"];} + elseif (isset($_POST["agentcall_manual"])) {$agentcall_manual=$_POST["agentcall_manual"];} +if (isset($_GET["agentonly_callbacks"])) {$agentonly_callbacks=$_GET["agentonly_callbacks"];} + elseif (isset($_POST["agentonly_callbacks"])) {$agentonly_callbacks=$_POST["agentonly_callbacks"];} +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["agi_output"])) {$agi_output=$_GET["agi_output"];} + elseif (isset($_POST["agi_output"])) {$agi_output=$_POST["agi_output"];} +if (isset($_GET["allcalls_delay"])) {$allcalls_delay=$_GET["allcalls_delay"];} + elseif (isset($_POST["allcalls_delay"])) {$allcalls_delay=$_POST["allcalls_delay"];} +if (isset($_GET["allow_closers"])) {$allow_closers=$_GET["allow_closers"];} + elseif (isset($_POST["allow_closers"])) {$allow_closers=$_POST["allow_closers"];} +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["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["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["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["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["asterisk_version"])) {$asterisk_version=$_GET["asterisk_version"];} + elseif (isset($_POST["asterisk_version"])) {$asterisk_version=$_POST["asterisk_version"];} +if (isset($_GET["ASTmgrSECRET"])) {$ASTmgrSECRET=$_GET["ASTmgrSECRET"];} + elseif (isset($_POST["ASTmgrSECRET"])) {$ASTmgrSECRET=$_POST["ASTmgrSECRET"];} +if (isset($_GET["ASTmgrUSERNAME"])) {$ASTmgrUSERNAME=$_GET["ASTmgrUSERNAME"];} + elseif (isset($_POST["ASTmgrUSERNAME"])) {$ASTmgrUSERNAME=$_POST["ASTmgrUSERNAME"];} +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["ASTmgrUSERNAMEupdate"])) {$ASTmgrUSERNAMEupdate=$_GET["ASTmgrUSERNAMEupdate"];} + elseif (isset($_POST["ASTmgrUSERNAMEupdate"])) {$ASTmgrUSERNAMEupdate=$_POST["ASTmgrUSERNAMEupdate"];} +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($_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["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["available_only_ratio_tally"])) {$available_only_ratio_tally=$_GET["available_only_ratio_tally"];} + elseif (isset($_POST["available_only_ratio_tally"])){$available_only_ratio_tally=$_POST["available_only_ratio_tally"];} +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["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["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["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["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["campaign_cid"])) {$campaign_cid=$_GET["campaign_cid"];} + elseif (isset($_POST["campaign_cid"])) {$campaign_cid=$_POST["campaign_cid"];} +if (isset($_GET["campaign_detail"])) {$campaign_detail=$_GET["campaign_detail"];} + elseif (isset($_POST["campaign_detail"])) {$campaign_detail=$_POST["campaign_detail"];} +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["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_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["campaign_recording"])) {$campaign_recording=$_GET["campaign_recording"];} + elseif (isset($_POST["campaign_recording"])) {$campaign_recording=$_POST["campaign_recording"];} +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["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["client_browser"])) {$client_browser=$_GET["client_browser"];} + elseif (isset($_POST["client_browser"])) {$client_browser=$_POST["client_browser"];} +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["company"])) {$company=$_GET["company"];} + elseif (isset($_POST["company"])) {$company=$_POST["company"];} +if (isset($_GET["computer_ip"])) {$computer_ip=$_GET["computer_ip"];} + elseif (isset($_POST["computer_ip"])) {$computer_ip=$_POST["computer_ip"];} +if (isset($_GET["conf_exten"])) {$conf_exten=$_GET["conf_exten"];} + elseif (isset($_POST["conf_exten"])) {$conf_exten=$_POST["conf_exten"];} +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["conferencing_enabled"])) {$conferencing_enabled=$_GET["conferencing_enabled"];} + elseif (isset($_POST["conferencing_enabled"])) {$conferencing_enabled=$_POST["conferencing_enabled"];} +if (isset($_GET["CoNfIrM"])) {$CoNfIrM=$_GET["CoNfIrM"];} + elseif (isset($_POST["CoNfIrM"])) {$CoNfIrM=$_POST["CoNfIrM"];} +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_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_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_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["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_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_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["DBX_database"])) {$DBX_database=$_GET["DBX_database"];} + elseif (isset($_POST["DBX_database"])) {$DBX_database=$_POST["DBX_database"];} +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["DBX_server"])) {$DBX_server=$_GET["DBX_server"];} + elseif (isset($_POST["DBX_server"])) {$DBX_server=$_POST["DBX_server"];} +if (isset($_GET["DBX_user"])) {$DBX_user=$_GET["DBX_user"];} + elseif (isset($_POST["DBX_user"])) {$DBX_user=$_POST["DBX_user"];} +if (isset($_GET["DBY_database"])) {$DBY_database=$_GET["DBY_database"];} + elseif (isset($_POST["DBY_database"])) {$DBY_database=$_POST["DBY_database"];} +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["DBY_server"])) {$DBY_server=$_GET["DBY_server"];} + elseif (isset($_POST["DBY_server"])) {$DBY_server=$_POST["DBY_server"];} +if (isset($_GET["DBY_user"])) {$DBY_user=$_GET["DBY_user"];} + elseif (isset($_POST["DBY_user"])) {$DBY_user=$_POST["DBY_user"];} +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["delete_campaigns"])) {$delete_campaigns=$_GET["delete_campaigns"];} + elseif (isset($_POST["delete_campaigns"])) {$delete_campaigns=$_POST["delete_campaigns"];} +if (isset($_GET["delete_filters"])) {$delete_filters=$_GET["delete_filters"];} + elseif (isset($_POST["delete_filters"])) {$delete_filters=$_POST["delete_filters"];} +if (isset($_GET["delete_ingroups"])) {$delete_ingroups=$_GET["delete_ingroups"];} + elseif (isset($_POST["delete_ingroups"])) {$delete_ingroups=$_POST["delete_ingroups"];} +if (isset($_GET["delete_lists"])) {$delete_lists=$_GET["delete_lists"];} + elseif (isset($_POST["delete_lists"])) {$delete_lists=$_POST["delete_lists"];} +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["delete_scripts"])) {$delete_scripts=$_GET["delete_scripts"];} + elseif (isset($_POST["delete_scripts"])) {$delete_scripts=$_POST["delete_scripts"];} +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_users"])) {$delete_users=$_GET["delete_users"];} + elseif (isset($_POST["delete_users"])) {$delete_users=$_POST["delete_users"];} +if (isset($_GET["dial_method"])) {$dial_method=$_GET["dial_method"];} + elseif (isset($_POST["dial_method"])) {$dial_method=$_POST["dial_method"];} +if (isset($_GET["dial_prefix"])) {$dial_prefix=$_GET["dial_prefix"];} + elseif (isset($_POST["dial_prefix"])) {$dial_prefix=$_POST["dial_prefix"];} +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["dial_timeout"])) {$dial_timeout=$_GET["dial_timeout"];} + elseif (isset($_POST["dial_timeout"])) {$dial_timeout=$_POST["dial_timeout"];} +if (isset($_GET["dialplan_number"])) {$dialplan_number=$_GET["dialplan_number"];} + elseif (isset($_POST["dialplan_number"])) {$dialplan_number=$_POST["dialplan_number"];} +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["drop_exten"])) {$drop_exten=$_GET["drop_exten"];} + elseif (isset($_POST["drop_exten"])) {$drop_exten=$_POST["drop_exten"];} +if (isset($_GET["drop_message"])) {$drop_message=$_GET["drop_message"];} + elseif (isset($_POST["drop_message"])) {$drop_message=$_POST["drop_message"];} +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["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["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["ext_context"])) {$ext_context=$_GET["ext_context"];} + elseif (isset($_POST["ext_context"])) {$ext_context=$_POST["ext_context"];} +if (isset($_GET["extension"])) {$extension=$_GET["extension"];} + elseif (isset($_POST["extension"])) {$extension=$_POST["extension"];} +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["force_logout"])) {$force_logout=$_GET["force_logout"];} + elseif (isset($_POST["force_logout"])) {$force_logout=$_POST["force_logout"];} +if (isset($_GET["fronter_display"])) {$fronter_display=$_GET["fronter_display"];} + elseif (isset($_POST["fronter_display"])) {$fronter_display=$_POST["fronter_display"];} +if (isset($_GET["full_name"])) {$full_name=$_GET["full_name"];} + elseif (isset($_POST["full_name"])) {$full_name=$_POST["full_name"];} +if (isset($_GET["fullname"])) {$fullname=$_GET["fullname"];} + elseif (isset($_POST["fullname"])) {$fullname=$_POST["fullname"];} +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["group_color"])) {$group_color=$_GET["group_color"];} + elseif (isset($_POST["group_color"])) {$group_color=$_POST["group_color"];} +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["groups"])) {$groups=$_GET["groups"];} + elseif (isset($_POST["groups"])) {$groups=$_POST["groups"];} +if (isset($_GET["HKstatus"])) {$HKstatus=$_GET["HKstatus"];} + elseif (isset($_POST["HKstatus"])) {$HKstatus=$_POST["HKstatus"];} +if (isset($_GET["hopper_level"])) {$hopper_level=$_GET["hopper_level"];} + elseif (isset($_POST["hopper_level"])) {$hopper_level=$_POST["hopper_level"];} +if (isset($_GET["hotkey"])) {$hotkey=$_GET["hotkey"];} + elseif (isset($_POST["hotkey"])) {$hotkey=$_POST["hotkey"];} +if (isset($_GET["hotkeys_active"])) {$hotkeys_active=$_GET["hotkeys_active"];} + elseif (isset($_POST["hotkeys_active"])) {$hotkeys_active=$_POST["hotkeys_active"];} +if (isset($_GET["install_directory"])) {$install_directory=$_GET["install_directory"];} + elseif (isset($_POST["install_directory"])) {$install_directory=$_POST["install_directory"];} +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_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_sql"])) {$lead_filter_sql=$_GET["lead_filter_sql"];} + elseif (isset($_POST["lead_filter_sql"])) {$lead_filter_sql=$_POST["lead_filter_sql"];} +if (isset($_GET["lead_order"])) {$lead_order=$_GET["lead_order"];} + elseif (isset($_POST["lead_order"])) {$lead_order=$_POST["lead_order"];} +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["load_leads"])) {$load_leads=$_GET["load_leads"];} + elseif (isset($_POST["load_leads"])) {$load_leads=$_POST["load_leads"];} +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["local_gmt"])) {$local_gmt=$_GET["local_gmt"];} + elseif (isset($_POST["local_gmt"])) {$local_gmt=$_POST["local_gmt"];} +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["login"])) {$login=$_GET["login"];} + elseif (isset($_POST["login"])) {$login=$_POST["login"];} +if (isset($_GET["login_campaign"])) {$login_campaign=$_GET["login_campaign"];} + elseif (isset($_POST["login_campaign"])) {$login_campaign=$_POST["login_campaign"];} +if (isset($_GET["login_pass"])) {$login_pass=$_GET["login_pass"];} + elseif (isset($_POST["login_pass"])) {$login_pass=$_POST["login_pass"];} +if (isset($_GET["login_user"])) {$login_user=$_GET["login_user"];} + elseif (isset($_POST["login_user"])) {$login_user=$_POST["login_user"];} +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["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["modify_leads"])) {$modify_leads=$_GET["modify_leads"];} + elseif (isset($_POST["modify_leads"])) {$modify_leads=$_POST["modify_leads"];} +if (isset($_GET["monitor_prefix"])) {$monitor_prefix=$_GET["monitor_prefix"];} + elseif (isset($_POST["monitor_prefix"])) {$monitor_prefix=$_POST["monitor_prefix"];} +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["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["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["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["old_extension"])) {$old_extension=$_GET["old_extension"];} + elseif (isset($_POST["old_extension"])) {$old_extension=$_POST["old_extension"];} +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["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["OLDuser_group"])) {$OLDuser_group=$_GET["OLDuser_group"];} + elseif (isset($_POST["OLDuser_group"])) {$OLDuser_group=$_POST["OLDuser_group"];} +if (isset($_GET["omit_phone_code"])) {$omit_phone_code=$_GET["omit_phone_code"];} + elseif (isset($_POST["omit_phone_code"])) {$omit_phone_code=$_POST["omit_phone_code"];} +if (isset($_GET["outbound_cid"])) {$outbound_cid=$_GET["outbound_cid"];} + elseif (isset($_POST["outbound_cid"])) {$outbound_cid=$_POST["outbound_cid"];} +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["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["pass"])) {$pass=$_GET["pass"];} + elseif (isset($_POST["pass"])) {$pass=$_POST["pass"];} +if (isset($_GET["phone_ip"])) {$phone_ip=$_GET["phone_ip"];} + elseif (isset($_POST["phone_ip"])) {$phone_ip=$_POST["phone_ip"];} +if (isset($_GET["phone_login"])) {$phone_login=$_GET["phone_login"];} + elseif (isset($_POST["phone_login"])) {$phone_login=$_POST["phone_login"];} +if (isset($_GET["phone_number"])) {$phone_number=$_GET["phone_number"];} + elseif (isset($_POST["phone_number"])) {$phone_number=$_POST["phone_number"];} +if (isset($_GET["phone_pass"])) {$phone_pass=$_GET["phone_pass"];} + elseif (isset($_POST["phone_pass"])) {$phone_pass=$_POST["phone_pass"];} +if (isset($_GET["phone_type"])) {$phone_type=$_GET["phone_type"];} + elseif (isset($_POST["phone_type"])) {$phone_type=$_POST["phone_type"];} +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["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["recording_exten"])) {$recording_exten=$_GET["recording_exten"];} + elseif (isset($_POST["recording_exten"])) {$recording_exten=$_POST["recording_exten"];} +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["reset_hopper"])) {$reset_hopper=$_GET["reset_hopper"];} + elseif (isset($_POST["reset_hopper"])) {$reset_hopper=$_POST["reset_hopper"];} +if (isset($_GET["reset_list"])) {$reset_list=$_GET["reset_list"];} + elseif (isset($_POST["reset_list"])) {$reset_list=$_POST["reset_list"];} +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["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["scheduled_callbacks"])) {$scheduled_callbacks=$_GET["scheduled_callbacks"];} + elseif (isset($_POST["scheduled_callbacks"])) {$scheduled_callbacks=$_POST["scheduled_callbacks"];} +if (isset($_GET["script_comments"])) {$script_comments=$_GET["script_comments"];} + elseif (isset($_POST["script_comments"])) {$script_comments=$_POST["script_comments"];} +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_text"])) {$script_text=$_GET["script_text"];} + elseif (isset($_POST["script_text"])) {$script_text=$_POST["script_text"];} +if (isset($_GET["selectable"])) {$selectable=$_GET["selectable"];} + elseif (isset($_POST["selectable"])) {$selectable=$_POST["selectable"];} +if (isset($_GET["server_description"])) {$server_description=$_GET["server_description"];} + elseif (isset($_POST["server_description"])) {$server_description=$_POST["server_description"];} +if (isset($_GET["server_id"])) {$server_id=$_GET["server_id"];} + elseif (isset($_POST["server_id"])) {$server_id=$_POST["server_id"];} +if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} + elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} +if (isset($_GET["stage"])) {$stage=$_GET["stage"];} + elseif (isset($_POST["stage"])) {$stage=$_POST["stage"];} +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["status"])) {$status=$_GET["status"];} + elseif (isset($_POST["status"])) {$status=$_POST["status"];} +if (isset($_GET["status_name"])) {$status_name=$_GET["status_name"];} + elseif (isset($_POST["status_name"])) {$status_name=$_POST["status_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"];} +if (isset($_GET["sys_perf_log"])) {$sys_perf_log=$_GET["sys_perf_log"];} + elseif (isset($_POST["sys_perf_log"])) {$sys_perf_log=$_POST["sys_perf_log"];} +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["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["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["user"])) {$user=$_GET["user"];} + elseif (isset($_POST["user"])) {$user=$_POST["user"];} +if (isset($_GET["user_group"])) {$user_group=$_GET["user_group"];} + elseif (isset($_POST["user_group"])) {$user_group=$_POST["user_group"];} +if (isset($_GET["user_level"])) {$user_level=$_GET["user_level"];} + elseif (isset($_POST["user_level"])) {$user_level=$_POST["user_level"];} +if (isset($_GET["user_start"])) {$user_start=$_GET["user_start"];} + elseif (isset($_POST["user_start"])) {$user_start=$_POST["user_start"];} +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["vd_server_logs"])) {$vd_server_logs=$_GET["vd_server_logs"];} + elseif (isset($_POST["vd_server_logs"])) {$vd_server_logs=$_POST["vd_server_logs"];} +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["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["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["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["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["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["voicemail_ext"])) {$voicemail_ext=$_GET["voicemail_ext"];} + elseif (isset($_POST["voicemail_ext"])) {$voicemail_ext=$_POST["voicemail_ext"];} +if (isset($_GET["voicemail_exten"])) {$voicemail_exten=$_GET["voicemail_exten"];} + elseif (isset($_POST["voicemail_exten"])) {$voicemail_exten=$_POST["voicemail_exten"];} +if (isset($_GET["voicemail_id"])) {$voicemail_id=$_GET["voicemail_id"];} + elseif (isset($_POST["voicemail_id"])) {$voicemail_id=$_POST["voicemail_id"];} +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["wrapup_message"])) {$wrapup_message=$_GET["wrapup_message"];} + elseif (isset($_POST["wrapup_message"])) {$wrapup_message=$_POST["wrapup_message"];} +if (isset($_GET["wrapup_seconds"])) {$wrapup_seconds=$_GET["wrapup_seconds"];} + elseif (isset($_POST["wrapup_seconds"])) {$wrapup_seconds=$_POST["wrapup_seconds"];} +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["vicidial_balance_active"])) {$vicidial_balance_active=$_GET["vicidial_balance_active"];} + elseif (isset($_POST["vicidial_balance_active"])) {$vicidial_balance_active=$_POST["vicidial_balance_active"];} +if (isset($_GET["balance_trunks_offlimits"])) {$balance_trunks_offlimits=$_GET["balance_trunks_offlimits"];} + elseif (isset($_POST["balance_trunks_offlimits"])) {$balance_trunks_offlimits=$_POST["balance_trunks_offlimits"];} +if (isset($_GET["dedicated_trunks"])) {$dedicated_trunks=$_GET["dedicated_trunks"];} + elseif (isset($_POST["dedicated_trunks"])) {$dedicated_trunks=$_POST["dedicated_trunks"];} +if (isset($_GET["trunk_restriction"])) {$trunk_restriction=$_GET["trunk_restriction"];} + elseif (isset($_POST["trunk_restriction"])) {$trunk_restriction=$_POST["trunk_restriction"];} +if (isset($_GET["campaigns"])) {$campaigns=$_GET["campaigns"];} + elseif (isset($_POST["campaigns"])) {$campaigns=$_POST["campaigns"];} +if (isset($_GET["dial_level_override"])) {$dial_level_override=$_GET["dial_level_override"];} + elseif (isset($_POST["dial_level_override"])) {$dial_level_override=$_POST["dial_level_override"];} +if (isset($_GET["concurrent_transfers"])) {$concurrent_transfers=$_GET["concurrent_transfers"];} + elseif (isset($_POST["concurrent_transfers"])) {$concurrent_transfers=$_POST["concurrent_transfers"];} +if (isset($_GET["auto_alt_dial"])) {$auto_alt_dial=$_GET["auto_alt_dial"];} + elseif (isset($_POST["auto_alt_dial"])) {$auto_alt_dial=$_POST["auto_alt_dial"];} +if (isset($_GET["modify_users"])) {$modify_users=$_GET["modify_users"];} + elseif (isset($_POST["modify_users"])) {$modify_users=$_POST["modify_users"];} +if (isset($_GET["modify_campaigns"])) {$modify_campaigns=$_GET["modify_campaigns"];} + elseif (isset($_POST["modify_campaigns"])) {$modify_campaigns=$_POST["modify_campaigns"];} +if (isset($_GET["modify_lists"])) {$modify_lists=$_GET["modify_lists"];} + elseif (isset($_POST["modify_lists"])) {$modify_lists=$_POST["modify_lists"];} +if (isset($_GET["modify_scripts"])) {$modify_scripts=$_GET["modify_scripts"];} + elseif (isset($_POST["modify_scripts"])) {$modify_scripts=$_POST["modify_scripts"];} +if (isset($_GET["modify_filters"])) {$modify_filters=$_GET["modify_filters"];} + elseif (isset($_POST["modify_filters"])) {$modify_filters=$_POST["modify_filters"];} +if (isset($_GET["modify_ingroups"])) {$modify_ingroups=$_GET["modify_ingroups"];} + elseif (isset($_POST["modify_ingroups"])) {$modify_ingroups=$_POST["modify_ingroups"];} +if (isset($_GET["modify_usergroups"])) {$modify_usergroups=$_GET["modify_usergroups"];} + elseif (isset($_POST["modify_usergroups"])) {$modify_usergroups=$_POST["modify_usergroups"];} +if (isset($_GET["modify_remoteagents"])) {$modify_remoteagents=$_GET["modify_remoteagents"];} + elseif (isset($_POST["modify_remoteagents"])) {$modify_remoteagents=$_POST["modify_remoteagents"];} +if (isset($_GET["modify_servers"])) {$modify_servers=$_GET["modify_servers"];} + elseif (isset($_POST["modify_servers"])) {$modify_servers=$_POST["modify_servers"];} +if (isset($_GET["view_reports"])) {$view_reports=$_GET["view_reports"];} + elseif (isset($_POST["view_reports"])) {$view_reports=$_POST["view_reports"];} +if (isset($_GET["agent_pause_codes_active"])) {$agent_pause_codes_active=$_GET["agent_pause_codes_active"];} + elseif (isset($_POST["agent_pause_codes_active"])) {$agent_pause_codes_active=$_POST["agent_pause_codes_active"];} +if (isset($_GET["pause_code"])) {$pause_code=$_GET["pause_code"];} + elseif (isset($_POST["pause_code"])) {$pause_code=$_POST["pause_code"];} +if (isset($_GET["pause_code_name"])) {$pause_code_name=$_GET["pause_code_name"];} + elseif (isset($_POST["pause_code_name"])) {$pause_code_name=$_POST["pause_code_name"];} +if (isset($_GET["billable"])) {$billable=$_GET["billable"];} + elseif (isset($_POST["billable"])) {$billable=$_POST["billable"];} +if (isset($_GET["campaign_description"])) {$campaign_description=$_GET["campaign_description"];} + elseif (isset($_POST["campaign_description"])) {$campaign_description=$_POST["campaign_description"];} +if (isset($_GET["campaign_stats_refresh"])) {$campaign_stats_refresh=$_GET["campaign_stats_refresh"];} + elseif (isset($_POST["campaign_stats_refresh"])){$campaign_stats_refresh=$_POST["campaign_stats_refresh"];} +if (isset($_GET["list_description"])) {$list_description=$_GET["list_description"];} + elseif (isset($_POST["list_description"])) {$list_description=$_POST["list_description"];} +if (isset($_GET["vicidial_recording_override"])) {$vicidial_recording_override=$_GET["vicidial_recording_override"];} elseif (isset($_POST["vicidial_recording_override"])) {$vicidial_recording_override=$_POST["vicidial_recording_override"];} +if (isset($_GET["use_non_latin"])) {$use_non_latin=$_GET["use_non_latin"];} + elseif (isset($_POST["use_non_latin"])) {$use_non_latin=$_POST["use_non_latin"];} +if (isset($_GET["webroot_writable"])) {$webroot_writable=$_GET["webroot_writable"];} + elseif (isset($_POST["webroot_writable"])) {$webroot_writable=$_POST["webroot_writable"];} +if (isset($_GET["enable_queuemetrics_logging"])) {$enable_queuemetrics_logging=$_GET["enable_queuemetrics_logging"];} + elseif (isset($_POST["enable_queuemetrics_logging"])) {$enable_queuemetrics_logging=$_POST["enable_queuemetrics_logging"];} +if (isset($_GET["queuemetrics_server_ip"])) {$queuemetrics_server_ip=$_GET["queuemetrics_server_ip"];} + elseif (isset($_POST["queuemetrics_server_ip"])) {$queuemetrics_server_ip=$_POST["queuemetrics_server_ip"];} +if (isset($_GET["queuemetrics_dbname"])) {$queuemetrics_dbname=$_GET["queuemetrics_dbname"];} + elseif (isset($_POST["queuemetrics_dbname"])) {$queuemetrics_dbname=$_POST["queuemetrics_dbname"];} +if (isset($_GET["queuemetrics_login"])) {$queuemetrics_login=$_GET["queuemetrics_login"];} + elseif (isset($_POST["queuemetrics_login"])) {$queuemetrics_login=$_POST["queuemetrics_login"];} +if (isset($_GET["queuemetrics_pass"])) {$queuemetrics_pass=$_GET["queuemetrics_pass"];} + elseif (isset($_POST["queuemetrics_pass"])) {$queuemetrics_pass=$_POST["queuemetrics_pass"];} +if (isset($_GET["queuemetrics_url"])) {$queuemetrics_url=$_GET["queuemetrics_url"];} + elseif (isset($_POST["queuemetrics_url"])) {$queuemetrics_url=$_POST["queuemetrics_url"];} +if (isset($_GET["queuemetrics_log_id"])) {$queuemetrics_log_id=$_GET["queuemetrics_log_id"];} + elseif (isset($_POST["queuemetrics_log_id"])) {$queuemetrics_log_id=$_POST["queuemetrics_log_id"];} +if (isset($_GET["dial_status"])) {$dial_status=$_GET["dial_status"];} + elseif (isset($_POST["dial_status"])) {$dial_status=$_POST["dial_status"];} +if (isset($_GET["queuemetrics_eq_prepend"])) {$queuemetrics_eq_prepend=$_GET["queuemetrics_eq_prepend"];} + elseif (isset($_POST["queuemetrics_eq_prepend"])) {$queuemetrics_eq_prepend=$_POST["queuemetrics_eq_prepend"];} +if (isset($_GET["vicidial_agent_disable"])) {$vicidial_agent_disable=$_GET["vicidial_agent_disable"];} + elseif (isset($_POST["vicidial_agent_disable"])) {$vicidial_agent_disable=$_POST["vicidial_agent_disable"];} +if (isset($_GET["disable_alter_custdata"])) {$disable_alter_custdata=$_GET["disable_alter_custdata"];} + elseif (isset($_POST["disable_alter_custdata"])) {$disable_alter_custdata=$_POST["disable_alter_custdata"];} +if (isset($_GET["alter_custdata_override"])) {$alter_custdata_override=$_GET["alter_custdata_override"];} + elseif (isset($_POST["alter_custdata_override"])) {$alter_custdata_override=$_POST["alter_custdata_override"];} +if (isset($_GET["no_hopper_leads_logins"])) {$no_hopper_leads_logins=$_GET["no_hopper_leads_logins"];} + elseif (isset($_POST["no_hopper_leads_logins"])) {$no_hopper_leads_logins=$_POST["no_hopper_leads_logins"];} +if (isset($_GET["enable_sipsak_messages"])) {$enable_sipsak_messages=$_GET["enable_sipsak_messages"];} + elseif (isset($_POST["enable_sipsak_messages"])) {$enable_sipsak_messages=$_POST["enable_sipsak_messages"];} +if (isset($_GET["allow_sipsak_messages"])) {$allow_sipsak_messages=$_GET["allow_sipsak_messages"];} + elseif (isset($_POST["allow_sipsak_messages"])) {$allow_sipsak_messages=$_POST["allow_sipsak_messages"];} +if (isset($_GET["admin_home_url"])) {$admin_home_url=$_GET["admin_home_url"];} + elseif (isset($_POST["admin_home_url"])) {$admin_home_url=$_POST["admin_home_url"];} + + + if (isset($script_id)) {$script_id= strtoupper($script_id);} + if (isset($lead_filter_id)) {$lead_filter_id = strtoupper($lead_filter_id);} + +if (strlen($dial_status) > 0) + { + $ADD='28'; + $status = $dial_status; + } + +##### BEGIN VARIABLE FILTERING FOR SECURITY ##### + +if ($non_latin < 1) +{ +### DIGITS ONLY ### +$adaptive_dropped_percentage = ereg_replace("[^0-9]","",$adaptive_dropped_percentage); +$adaptive_latest_server_time = ereg_replace("[^0-9]","",$adaptive_latest_server_time); +$admin_hangup_enabled = ereg_replace("[^0-9]","",$admin_hangup_enabled); +$admin_hijack_enabled = ereg_replace("[^0-9]","",$admin_hijack_enabled); +$admin_monitor_enabled = ereg_replace("[^0-9]","",$admin_monitor_enabled); +$AFLogging_enabled = ereg_replace("[^0-9]","",$AFLogging_enabled); +$agent_choose_ingroups = ereg_replace("[^0-9]","",$agent_choose_ingroups); +$agentcall_manual = ereg_replace("[^0-9]","",$agentcall_manual); +$agentonly_callbacks = ereg_replace("[^0-9]","",$agentonly_callbacks); +$AGI_call_logging_enabled = ereg_replace("[^0-9]","",$AGI_call_logging_enabled); +$allcalls_delay = ereg_replace("[^0-9]","",$allcalls_delay); +$alter_agent_interface_options = ereg_replace("[^0-9]","",$alter_agent_interface_options); +$am_message_exten = ereg_replace("[^0-9]","",$am_message_exten); +$answer_transfer_agent = ereg_replace("[^0-9]","",$answer_transfer_agent); +$ast_admin_access = ereg_replace("[^0-9]","",$ast_admin_access); +$ast_delete_phones = ereg_replace("[^0-9]","",$ast_delete_phones); +$attempt_delay = ereg_replace("[^0-9]","",$attempt_delay); +$attempt_maximum = ereg_replace("[^0-9]","",$attempt_maximum); +$auto_dial_next_number = ereg_replace("[^0-9]","",$auto_dial_next_number); +$balance_trunks_offlimits = ereg_replace("[^0-9]","",$balance_trunks_offlimits); +$call_parking_enabled = ereg_replace("[^0-9]","",$call_parking_enabled); +$CallerID_popup_enabled = ereg_replace("[^0-9]","",$CallerID_popup_enabled); +$campaign_detail = ereg_replace("[^0-9]","",$campaign_detail); +$campaign_rec_exten = ereg_replace("[^0-9]","",$campaign_rec_exten); +$campaign_vdad_exten = ereg_replace("[^0-9]","",$campaign_vdad_exten); +$change_agent_campaign = ereg_replace("[^0-9]","",$change_agent_campaign); +$closer_default_blended = ereg_replace("[^0-9]","",$closer_default_blended); +$conf_exten = ereg_replace("[^0-9]","",$conf_exten); +$conf_on_extension = ereg_replace("[^0-9]","",$conf_on_extension); +$conferencing_enabled = ereg_replace("[^0-9]","",$conferencing_enabled); +$ct_default_start = ereg_replace("[^0-9]","",$ct_default_start); +$ct_default_stop = ereg_replace("[^0-9]","",$ct_default_stop); +$ct_friday_start = ereg_replace("[^0-9]","",$ct_friday_start); +$ct_friday_stop = ereg_replace("[^0-9]","",$ct_friday_stop); +$ct_monday_start = ereg_replace("[^0-9]","",$ct_monday_start); +$ct_monday_stop = ereg_replace("[^0-9]","",$ct_monday_stop); +$ct_saturday_start = ereg_replace("[^0-9]","",$ct_saturday_start); +$ct_saturday_stop = ereg_replace("[^0-9]","",$ct_saturday_stop); +$ct_sunday_start = ereg_replace("[^0-9]","",$ct_sunday_start); +$ct_sunday_stop = ereg_replace("[^0-9]","",$ct_sunday_stop); +$ct_thursday_start = ereg_replace("[^0-9]","",$ct_thursday_start); +$ct_thursday_stop = ereg_replace("[^0-9]","",$ct_thursday_stop); +$ct_tuesday_start = ereg_replace("[^0-9]","",$ct_tuesday_start); +$ct_tuesday_stop = ereg_replace("[^0-9]","",$ct_tuesday_stop); +$ct_wednesday_start = ereg_replace("[^0-9]","",$ct_wednesday_start); +$ct_wednesday_stop = ereg_replace("[^0-9]","",$ct_wednesday_stop); +$DBX_port = ereg_replace("[^0-9]","",$DBX_port); +$DBY_port = ereg_replace("[^0-9]","",$DBY_port); +$dedicated_trunks = ereg_replace("[^0-9]","",$dedicated_trunks); +$delete_call_times = ereg_replace("[^0-9]","",$delete_call_times); +$delete_campaigns = ereg_replace("[^0-9]","",$delete_campaigns); +$delete_filters = ereg_replace("[^0-9]","",$delete_filters); +$delete_ingroups = ereg_replace("[^0-9]","",$delete_ingroups); +$delete_lists = ereg_replace("[^0-9]","",$delete_lists); +$delete_remote_agents = ereg_replace("[^0-9]","",$delete_remote_agents); +$delete_scripts = ereg_replace("[^0-9]","",$delete_scripts); +$delete_user_groups = ereg_replace("[^0-9]","",$delete_user_groups); +$delete_users = ereg_replace("[^0-9]","",$delete_users); +$dial_timeout = ereg_replace("[^0-9]","",$dial_timeout); +$dialplan_number = ereg_replace("[^0-9]","",$dialplan_number); +$drop_call_seconds = ereg_replace("[^0-9]","",$drop_call_seconds); +$drop_exten = ereg_replace("[^0-9]","",$drop_exten); +$enable_fast_refresh = ereg_replace("[^0-9]","",$enable_fast_refresh); +$enable_persistant_mysql = ereg_replace("[^0-9]","",$enable_persistant_mysql); +$fast_refresh_rate = ereg_replace("[^0-9]","",$fast_refresh_rate); +$hopper_level = ereg_replace("[^0-9]","",$hopper_level); +$hotkey = ereg_replace("[^0-9]","",$hotkey); +$hotkeys_active = ereg_replace("[^0-9]","",$hotkeys_active); +$list_id = ereg_replace("[^0-9]","",$list_id); +$load_leads = ereg_replace("[^0-9]","",$load_leads); +$max_vicidial_trunks = ereg_replace("[^0-9]","",$max_vicidial_trunks); +$modify_call_times = ereg_replace("[^0-9]","",$modify_call_times); +$modify_users = ereg_replace("[^0-9]","",$modify_users); +$modify_campaigns = ereg_replace("[^0-9]","",$modify_campaigns); +$modify_lists = ereg_replace("[^0-9]","",$modify_lists); +$modify_scripts = ereg_replace("[^0-9]","",$modify_scripts); +$modify_filters = ereg_replace("[^0-9]","",$modify_filters); +$modify_ingroups = ereg_replace("[^0-9]","",$modify_ingroups); +$modify_usergroups = ereg_replace("[^0-9]","",$modify_usergroups); +$modify_remoteagents = ereg_replace("[^0-9]","",$modify_remoteagents); +$modify_servers = ereg_replace("[^0-9]","",$modify_servers); +$view_reports = ereg_replace("[^0-9]","",$view_reports); +$modify_leads = ereg_replace("[^0-9]","",$modify_leads); +$monitor_prefix = ereg_replace("[^0-9]","",$monitor_prefix); +$number_of_lines = ereg_replace("[^0-9]","",$number_of_lines); +$old_conf_exten = ereg_replace("[^0-9]","",$old_conf_exten); +$outbound_cid = ereg_replace("[^0-9]","",$outbound_cid); +$park_ext = ereg_replace("[^0-9]","",$park_ext); +$park_on_extension = ereg_replace("[^0-9]","",$park_on_extension); +$phone_number = ereg_replace("[^0-9]","",$phone_number); +$QUEUE_ACTION_enabled = ereg_replace("[^0-9]","",$QUEUE_ACTION_enabled); +$recording_exten = ereg_replace("[^0-9]","",$recording_exten); +$remote_agent_id = ereg_replace("[^0-9]","",$remote_agent_id); +$safe_harbor_exten = ereg_replace("[^0-9]","",$safe_harbor_exten); +$telnet_port = ereg_replace("[^0-9]","",$telnet_port); +$updater_check_enabled = ereg_replace("[^0-9]","",$updater_check_enabled); +$user_level = ereg_replace("[^0-9]","",$user_level); +$user_start = ereg_replace("[^0-9]","",$user_start); +$user_switching_enabled = ereg_replace("[^0-9]","",$user_switching_enabled); +$VDstop_rec_after_each_call = ereg_replace("[^0-9]","",$VDstop_rec_after_each_call); +$VICIDIAL_park_on_extension = ereg_replace("[^0-9]","",$VICIDIAL_park_on_extension); +$vicidial_recording = ereg_replace("[^0-9]","",$vicidial_recording); +$vicidial_transfers = ereg_replace("[^0-9]","",$vicidial_transfers); +$voicemail_button_enabled = ereg_replace("[^0-9]","",$voicemail_button_enabled); +$voicemail_dump_exten = ereg_replace("[^0-9]","",$voicemail_dump_exten); +$voicemail_ext = ereg_replace("[^0-9]","",$voicemail_ext); +$voicemail_exten = ereg_replace("[^0-9]","",$voicemail_exten); +$voicemail_id = ereg_replace("[^0-9]","",$voicemail_id); +$wrapup_seconds = ereg_replace("[^0-9]","",$wrapup_seconds); +$use_non_latin = ereg_replace("[^0-9]","",$use_non_latin); +$webroot_writable = ereg_replace("[^0-9]","",$webroot_writable); +$enable_queuemetrics_logging = ereg_replace("[^0-9]","",$enable_queuemetrics_logging); +$enable_sipsak_messages = ereg_replace("[^0-9]","",$enable_sipsak_messages); +$allow_sipsak_messages = ereg_replace("[^0-9]","",$allow_sipsak_messages); + +### 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); +$omit_phone_code = ereg_replace("[^NY]","",$omit_phone_code); +$available_only_ratio_tally = ereg_replace("[^NY]","",$available_only_ratio_tally); +$sys_perf_log = ereg_replace("[^NY]","",$sys_perf_log); +$vicidial_balance_active = ereg_replace("[^NY]","",$vicidial_balance_active); +$vd_server_logs = ereg_replace("[^NY]","",$vd_server_logs); +$agent_pause_codes_active = ereg_replace("[^NY]","",$agent_pause_codes_active); +$campaign_stats_refresh = ereg_replace("[^NY]","",$campaign_stats_refresh); +$disable_alter_custdata = ereg_replace("[^NY]","",$disable_alter_custdata); +$no_hopper_leads_logins = ereg_replace("[^NY]","",$no_hopper_leads_logins); + +### ALPHA-NUMERIC ONLY ### +$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); +$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); +$concurrent_transfers = ereg_replace("[^0-9a-zA-Z]","",$concurrent_transfers); +$billable = ereg_replace("[^0-9a-zA-Z]","",$billable); +$pause_code = ereg_replace("[^0-9a-zA-Z]","",$pause_code); +$vicidial_recording_override = ereg_replace("[^0-9a-zA-Z]","",$vicidial_recording_override); +$queuemetrics_log_id = ereg_replace("[^0-9a-zA-Z]","",$queuemetrics_log_id); + +### DIGITS and Dots +$server_ip = ereg_replace("[^\.0-9]","",$server_ip); +$auto_dial_level = ereg_replace("[^\.0-9]","",$auto_dial_level); +$adaptive_maximum_level = ereg_replace("[^\.0-9]","",$adaptive_maximum_level); +$phone_ip = ereg_replace("[^\.0-9]","",$phone_ip); +$old_server_ip = ereg_replace("[^\.0-9]","",$old_server_ip); +$computer_ip = ereg_replace("[^\.0-9]","",$computer_ip); +$queuemetrics_server_ip = ereg_replace("[^\.0-9]","",$queuemetrics_server_ip); + +### ALPHA-NUMERIC and spaces and hash and star and comma +$xferconf_a_dtmf = ereg_replace("[^ \,\*\#0-9a-zA-Z]","",$xferconf_a_dtmf); +$xferconf_b_dtmf = ereg_replace("[^ \,\*\#0-9a-zA-Z]","",$xferconf_b_dtmf); + +### ALPHACAPS-NUMERIC +$xferconf_a_number = ereg_replace("[^0-9A-Z]","",$xferconf_a_number); +$xferconf_b_number = ereg_replace("[^0-9A-Z]","",$xferconf_b_number); + +### ALPHA-NUMERIC and underscore and dash +$agi_output = ereg_replace("[^-\_0-9a-zA-Z]","",$agi_output); +$ASTmgrSECRET = ereg_replace("[^-\_0-9a-zA-Z]","",$ASTmgrSECRET); +$ASTmgrUSERNAME = ereg_replace("[^-\_0-9a-zA-Z]","",$ASTmgrUSERNAME); +$ASTmgrUSERNAMElisten = ereg_replace("[^-\_0-9a-zA-Z]","",$ASTmgrUSERNAMElisten); +$ASTmgrUSERNAMEsend = ereg_replace("[^-\_0-9a-zA-Z]","",$ASTmgrUSERNAMEsend); +$ASTmgrUSERNAMEupdate = ereg_replace("[^-\_0-9a-zA-Z]","",$ASTmgrUSERNAMEupdate); +$call_time_id = ereg_replace("[^-\_0-9a-zA-Z]","",$call_time_id); +$campaign_id = ereg_replace("[^-\_0-9a-zA-Z]","",$campaign_id); +$CoNfIrM = ereg_replace("[^-\_0-9a-zA-Z]","",$CoNfIrM); +$DBX_database = ereg_replace("[^-\_0-9a-zA-Z]","",$DBX_database); +$DBX_pass = ereg_replace("[^-\_0-9a-zA-Z]","",$DBX_pass); +$DBX_user = ereg_replace("[^-\_0-9a-zA-Z]","",$DBX_user); +$DBY_database = ereg_replace("[^-\_0-9a-zA-Z]","",$DBY_database); +$DBY_pass = ereg_replace("[^-\_0-9a-zA-Z]","",$DBY_pass); +$DBY_user = ereg_replace("[^-\_0-9a-zA-Z]","",$DBY_user); +$dial_method = ereg_replace("[^-\_0-9a-zA-Z]","",$dial_method); +$dial_status_a = ereg_replace("[^-\_0-9a-zA-Z]","",$dial_status_a); +$dial_status_b = ereg_replace("[^-\_0-9a-zA-Z]","",$dial_status_b); +$dial_status_c = ereg_replace("[^-\_0-9a-zA-Z]","",$dial_status_c); +$dial_status_d = ereg_replace("[^-\_0-9a-zA-Z]","",$dial_status_d); +$dial_status_e = ereg_replace("[^-\_0-9a-zA-Z]","",$dial_status_e); +$ext_context = ereg_replace("[^-\_0-9a-zA-Z]","",$ext_context); +$group_id = ereg_replace("[^-\_0-9a-zA-Z]","",$group_id); +$lead_filter_id = ereg_replace("[^-\_0-9a-zA-Z]","",$lead_filter_id); +$local_call_time = ereg_replace("[^-\_0-9a-zA-Z]","",$local_call_time); +$login = ereg_replace("[^-\_0-9a-zA-Z]","",$login); +$login_campaign = ereg_replace("[^-\_0-9a-zA-Z]","",$login_campaign); +$login_pass = ereg_replace("[^-\_0-9a-zA-Z]","",$login_pass); +$login_user = ereg_replace("[^-\_0-9a-zA-Z]","",$login_user); +$next_agent_call = ereg_replace("[^-\_0-9a-zA-Z]","",$next_agent_call); +$old_campaign_id = ereg_replace("[^-\_0-9a-zA-Z]","",$old_campaign_id); +$old_server_id = ereg_replace("[^-\_0-9a-zA-Z]","",$old_server_id); +$OLDuser_group = ereg_replace("[^-\_0-9a-zA-Z]","",$OLDuser_group); +$park_file_name = ereg_replace("[^-\_0-9a-zA-Z]","",$park_file_name); +$pass = ereg_replace("[^-\_0-9a-zA-Z]","",$pass); +$phone_login = ereg_replace("[^-\_0-9a-zA-Z]","",$phone_login); +$phone_pass = ereg_replace("[^-\_0-9a-zA-Z]","",$phone_pass); +$PHP_AUTH_PW = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_PW); +$PHP_AUTH_USER = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_USER); +$protocol = ereg_replace("[^-\_0-9a-zA-Z]","",$protocol); +$server_id = ereg_replace("[^-\_0-9a-zA-Z]","",$server_id); +$stage = ereg_replace("[^-\_0-9a-zA-Z]","",$stage); +$state_rule = ereg_replace("[^-\_0-9a-zA-Z]","",$state_rule); +$status = ereg_replace("[^-\_0-9a-zA-Z]","",$status); +$trunk_restriction = ereg_replace("[^-\_0-9a-zA-Z]","",$trunk_restriction); +$user = ereg_replace("[^-\_0-9a-zA-Z]","",$user); +$user_group = ereg_replace("[^-\_0-9a-zA-Z]","",$user_group); +$VICIDIAL_park_on_filename = ereg_replace("[^-\_0-9a-zA-Z]","",$VICIDIAL_park_on_filename); +$auto_alt_dial = ereg_replace("[^-\_0-9a-zA-Z]","",$auto_alt_dial); +$dial_status = ereg_replace("[^-\_0-9a-zA-Z]","",$dial_status); +$queuemetrics_eq_prepend = ereg_replace("[^-\_0-9a-zA-Z]","",$queuemetrics_eq_prepend); +$vicidial_agent_disable = ereg_replace("[^-\_0-9a-zA-Z]","",$vicidial_agent_disable); +$alter_custdata_override = ereg_replace("[^-\_0-9a-zA-Z]","",$alter_custdata_override); + +### 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 +$adaptive_dl_diff_target = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$adaptive_dl_diff_target); +$adaptive_intensity = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$adaptive_intensity); +$asterisk_version = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$asterisk_version); +$call_time_comments = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$call_time_comments); +$call_time_name = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$call_time_name); +$campaign_name = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$campaign_name); +$campaign_rec_filename = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$campaign_rec_filename); +$company = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$company); +$full_name = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$full_name); +$fullname = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$fullname); +$group_name = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$group_name); +$HKstatus = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$HKstatus); +$lead_filter_comments = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$lead_filter_comments); +$lead_filter_name = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$lead_filter_name); +$list_name = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$list_name); +$local_gmt = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$local_gmt); +$phone_type = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$phone_type); +$picture = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$picture); +$script_comments = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$script_comments); +$script_name = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$script_name); +$server_description = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$server_description); +$status = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$status); +$status_name = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$status_name); +$wrapup_message = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$wrapup_message); +$pause_code_name = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$pause_code_name); +$campaign_description = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$campaign_description); +$list_description = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$list_description); + +### ALPHA-NUMERIC and underscore and dash and slash and at and dot +$call_out_number_group = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$call_out_number_group); +$client_browser = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$client_browser); +$DBX_server = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$DBX_server); +$DBY_server = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$DBY_server); +$dtmf_send_extension = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$dtmf_send_extension); +$extension = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$extension); +$install_directory = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$install_directory); +$old_extension = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$old_extension); +$telnet_host = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$telnet_host); +$queuemetrics_dbname = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$queuemetrics_dbname); +$queuemetrics_login = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$queuemetrics_login); +$queuemetrics_pass = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$queuemetrics_pass); + +### remove semi-colons ### +$lead_filter_sql = ereg_replace(";","",$lead_filter_sql); + +### VARIABLES TO BE mysql_real_escape_string ### +# $web_form_address +# $queuemetrics_url +# $admin_home_url + +### VARIABLES not filtered at all ### +# $script_text + +} # end of non_latin + + +##### END VARIABLE FILTERING FOR SECURITY ##### + + +# AST GUI database administration +# admin.php +# +# CHANGELOG: +# 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 +# 60808-1147 - Changed filtering for and added instructions for consutative transfers +# 60816-1552 - Added allcalls_delay start delay for recordings in vicidial.php +# 60817-2226 - Fixed bug that would not allow lead recycling of non-selectable statuses +# 60821-1543 - Added option to Omit Phone Code while dialing in vicidial +# 60821-1625 - Added ALLFORCE recording option for campaign_recording +# 60823-1154 - Added fields for adaptive dialing +# 60824-1326 - Added adaptive_latest_target_gmt for ADAPT_TAPERED dial method +# 60825-1205 - Added adaptive_intensity for ADAPT_ dial methods +# 60828-1019 - Changed adaptive_latest_target_gmt to adaptive_latest_server_time +# 60828-1115 - Added adaptive_dl_diff_target and changed intensity dropdown +# 60927-1246 - Added astguiclient/admin.php functions under SERVERS tab +# 61002-1402 - Added fields for vicidial balance trunk controls +# 61003-1123 - Added functions for vicidial_server_trunks records +# 61109-1022 - Added Emergency VDAC Jam Clear function to Campaign Detail screen +# 61110-1502 - Add ability to select NONE in dial statuses, new list_id must not be < 100 +# 61122-1228 - Added user group campaign restrictions +# 61122-1535 - Changed script_text to unfiltered and added more variables to SCRIPTS +# 61129-1028 - Added headers to Users and Phones with clickable order-by titles +# 70108-1405 - Added ADAPT OVERRIDE to allow for forced dial_level changes in ADAPT dial methods +# - Screen width definable at top of script, merged server_stats into this script +# 70109-1638 - Added ALTPH2 and ADDR3 hotkey options for alt number dialing with HotKeys +# 70109-1716 - Added concurrent_transfers option to vicidial_campaigns +# 70115-1152 - Aded (CLOSER|BLEND|INBND|_C$|_B$|_I$) options for CLOSER-type campaigns +# 70115-1532 - Added auto_alt_dial field to campaign screen for auto-dialing of alt numbers +# 70116-1200 - Added auto_alt_dial_status functionality to campaign screen +# 70117-1235 - Added header formatting variables at top of script +# - Moved Call Times and Phones/Server functions to Admin section +# 70118-1706 - Added new user group displays and links +# 70123-1519 - Added user permission settings for all sections +# 70124-1346 - Fixed spelling errors and formatting consistency +# 70202-1120 - Added agent_pause_codes section to campaigns +# 70205-1204 - Added memo, last dialed, timestamp and stats-refresh fields to vicidial_campaigns/lists +# 70206-1323 - Added user setting for vicidial_recording_override +# 70212-1412 - Added system settings section +# 70214-1226 - Added QueueMetrics Log ID field to system settings section +# 70219-1102 - Changed campaign dial statuses to be one string allowing for high limit +# 70223-0957 - Added queuemetrics_eq_prepend for custom ENTERQUEUE prepending of a field +# 70302-1111 - Fixed small bug in dialable leads calculation +# 70314-1133 - Added insert selection on script forms +# 70319-1423 - Added Alter Customer Data and agent disable display functions +# 70319-1625 - Added option to allow agents to login to outbound campaigns with no leads in the hopper +# 70322-1455 - Added sipsak messages parameters +# 70402-1157 - Added HOME link and entry to system_settings table, added QM link on reports section + +# make sure you have added a user to the vicidial_users MySQL table with at least user_level 8 to access this page the first time + +$admin_version = '2.0.95'; +$build = '70402-1157'; + +$STARTtime = date("U"); +$SQLdate = date("Y-m-d H:i:s"); + + +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]; + $LOGuser_group =$row[5]; + $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]; + $LOGast_admin_access =$row[16]; + $LOGast_delete_phones =$row[17]; + $LOGdelete_scripts =$row[18]; + $LOGdelete_filters =$row[29]; + $LOGalter_agent_interface =$row[30]; + $LOGdelete_call_times =$row[32]; + $LOGmodify_call_times =$row[33]; + $LOGmodify_users =$row[34]; + $LOGmodify_campaigns =$row[35]; + $LOGmodify_lists =$row[36]; + $LOGmodify_scripts =$row[37]; + $LOGmodify_filters =$row[38]; + $LOGmodify_ingroups =$row[39]; + $LOGmodify_usergroups =$row[40]; + $LOGmodify_remoteagents =$row[41]; + $LOGmodify_servers =$row[42]; + $LOGview_reports =$row[43]; + + $stmt="SELECT allowed_campaigns from vicidial_user_groups where user_group='$LOGuser_group';"; + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + $LOGallowed_campaigns =$row[0]; + + 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='admin'; $sh='times'; echo "Add New Call Time";} +if ($ADD==1111111111) {$hh='admin'; $sh='times'; echo "Add New State Call Time";} +if ($ADD==11111111111) {$hh='admin'; $sh='phones'; echo "ADD NEW PHONE";} +if ($ADD==111111111111) {$hh='admin'; $sh='server'; echo "ADD NEW SERVER";} +if ($ADD==1111111111111) {$hh='admin'; $sh='conference'; echo "ADD NEW CONFERENCE";} +if ($ADD==11111111111111) {$hh='admin'; $sh='conference'; echo "ADD NEW VICIDIAL CONFERENCE";} +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==26) {$hh='campaigns'; echo "New Auto Alt Dial Status";} +if ($ADD==27) {$hh='campaigns'; echo "New Agent Pause Code";} +if ($ADD==28) {$hh='campaigns'; echo "Campaign Dial Status Added";} +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='admin'; $sh='times'; echo "New Call Time Addition";} +if ($ADD==2111111111) {$hh='admin'; $sh='times'; echo "New State Call Time Addition";} +if ($ADD==21111111111) {$hh='admin'; $sh='phones'; echo "ADDING NEW PHONE";} +if ($ADD==211111111111) {$hh='admin'; $sh='server'; echo "ADDING NEW SERVER";} +if ($ADD==221111111111) {$hh='admin'; $sh='server'; echo "ADDING NEW SERVER VICIDIAL TRUNK RECORD";} +if ($ADD==2111111111111) {$hh='admin'; $sh='conference'; echo "ADDING NEW CONFERENCE";} +if ($ADD==21111111111111) {$hh='admin'; $sh='conference'; echo "ADDING NEW VICIDIAL CONFERENCE";} +if ($ADD==3) {$hh='users'; echo "Modify User";} +if ($ADD==30) {$hh='campaigns'; echo "Campaign Not Allowed";} +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='admin'; $sh='times'; echo "Modify Call Time";} +if ($ADD==321111111) {$hh='admin'; $sh='times'; echo "Modify Call Time State Definitions List";} +if ($ADD==3111111111) {$hh='admin'; $sh='times'; echo "Modify State Call Time";} +if ($ADD==31111111111) {$hh='admin'; $sh='phones'; echo "MODIFY PHONE";} +if ($ADD==311111111111) {$hh='admin'; $sh='server'; echo "MODIFY SERVER";} +if ($ADD==3111111111111) {$hh='admin'; $sh='conference'; echo "MODIFY CONFERENCE";} +if ($ADD==31111111111111) {$hh='admin'; $sh='conference'; echo "MODIFY VICIDIAL CONFERENCE";} +if ($ADD==311111111111111) {$hh='admin'; $sh='settings'; echo "MODIFY VICIDIAL SYSTEM SETTINGS";} +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==47) {$hh='campaigns'; echo "Modify Agent Pause Code";} +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='admin'; $sh='times'; echo "Modify Call Time";} +if ($ADD==4111111111) {$hh='admin'; $sh='times'; echo "Modify State Call Time";} +if ($ADD==41111111111) {$hh='admin'; $sh='phones'; echo "MODIFY PHONE";} +if ($ADD==411111111111) {$hh='admin'; $sh='server'; echo "MODIFY SERVER";} +if ($ADD==421111111111) {$hh='admin'; $sh='server'; echo "MODIFY SERVER VICIDIAL TRUNK RECORD";} +if ($ADD==4111111111111) {$hh='admin'; $sh='conference'; echo "MODIFY CONFERENCE";} +if ($ADD==41111111111111) {$hh='admin'; $sh='conference'; echo "MODIFY VICIDIAL CONFERENCE";} +if ($ADD==411111111111111) {$hh='admin'; $sh='settings'; echo "MODIFY VICIDIAL SYSTEM SETTINGS";} +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==53) {$hh='campaigns'; echo "Emergency VDAC Jam Clear";} +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='admin'; $sh='times'; echo "Delete Call Time";} +if ($ADD==5111111111) {$hh='admin'; $sh='times'; echo "Delete State Call Time";} +if ($ADD==51111111111) {$hh='admin'; $sh='phones'; echo "DELETE PHONE";} +if ($ADD==511111111111) {$hh='admin'; $sh='server'; echo "DELETE SERVER";} +if ($ADD==5111111111111) {$hh='admin'; $sh='conference'; echo "DELETE CONFERENCE";} +if ($ADD==51111111111111) {$hh='admin'; $sh='conference'; echo "DELETE VICIDIAL CONFERENCE";} +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==63) {$hh='campaigns'; echo "Emergency VDAC Jam Clear";} +if ($ADD==65) {$hh='campaigns'; echo "Delete Lead Recycle";} +if ($ADD==66) {$hh='campaigns'; echo "Delete Auto Alt Dial Status";} +if ($ADD==67) {$hh='campaigns'; echo "Delete Agent Pause Code";} +if ($ADD==68) {$hh='campaigns'; echo "Campaign Dial Status Removed";} +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='admin'; $sh='times'; echo "Delete Call Time";} +if ($ADD==6111111111) {$hh='admin'; $sh='times'; echo "Delete State Call Time";} +if ($ADD==61111111111) {$hh='admin'; $sh='phones'; echo "DELETE PHONE";} +if ($ADD==611111111111) {$hh='admin'; $sh='server'; echo "DELETE SERVER";} +if ($ADD==621111111111) {$hh='admin'; $sh='server'; echo "DELETE SERVER VICIDIAL TRUNK RECORD";} +if ($ADD==6111111111111) {$hh='admin'; $sh='conference'; echo "DELETE CONFERENCE";} +if ($ADD==61111111111111) {$hh='admin'; $sh='conference'; echo "DELETE VICIDIAL CONFERENCE";} +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='lists'; echo "CallBacks Within List";} +if ($ADD==8111) {$hh='usergroups'; echo "CallBacks Within User Group";} +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='admin'; $sh='times'; echo "Call Times";} +if ($ADD==1000000000) {$hh='admin'; $sh='times'; echo "State Call Times";} +if ($ADD==10000000000) {$hh='admin'; $sh='phones'; echo "PHONE LIST";} +if ($ADD==100000000000) {$hh='admin'; $sh='server'; echo "SERVER LIST";} +if ($ADD==1000000000000) {$hh='admin'; $sh='conference'; echo "CONFERENCE LIST";} +if ($ADD==10000000000000) {$hh='admin'; $sh='conference'; echo "VICIDIAL CONFERENCE LIST";} +if ($ADD==550) {$hh='users'; echo "Search Form";} +if ($ADD==551) {$hh='users'; echo "SEARCH PHONES";} +if ($ADD==660) {$hh='users'; echo "Search Results";} +if ($ADD==661) {$hh='users'; echo "SEARCH PHONES RESULTS";} +if ($ADD==99999) {$hh='users'; echo "HELP";} +if ($ADD==999999) {$hh='reports'; echo "REPORTS";} + +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>20) and ($ADD<70)) or ($ADD=="4A") or ($ADD=="4B") or (strlen($ADD)==12) ) + { + ##### 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++; + } + + ##### BEGIN get inbound groups listing for checkboxes ##### + if ( (($ADD>20) and ($ADD<70)) and ($ADD!=41) ) + { + $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 .= " -";} + } + ##### END get inbound groups listing for checkboxes ##### + + + ##### BEGIN get campaigns listing for checkboxes ##### + if ( ($ADD==211111) or ($ADD==311111) or ($ADD==411111) or ($ADD==511111) or ($ADD==611111) ) + { + if ( ($ADD==211111) or ($ADD==311111) or ($ADD==511111) or ($ADD==611111) ) + { + $stmt="SELECT allowed_campaigns from vicidial_user_groups where user_group='$user_group';"; + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + $allowed_campaigns = $row[0]; + $allowed_campaigns = preg_replace("/ -$/","",$allowed_campaigns); + $campaigns = explode(" ", $allowed_campaigns); + echo "<!-- $allowed_campaigns -->"; + } + + $campaigns_value=''; + $campaigns_list='<B><input type="checkbox" name="campaigns[]" value="-ALL-CAMPAIGNS-"'; + $p=0; + while ($p<100) + { + if (eregi('ALL-CAMPAIGNS',$campaigns[$p])) + { + $campaigns_list.=" CHECKED"; + $campaigns_value .= " -ALL-CAMPAIGNS- -"; + } + $p++; + } + $campaigns_list.="> ALL-CAMPAIGNS - USERS CAN VIEW ANY CAMPAIGN</B><BR>\n"; + + $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); + + $o=0; + while ($campaigns_to_print > $o) + { + $rowx=mysql_fetch_row($rslt); + $campaign_id_value = $rowx[0]; + $campaign_name_value = $rowx[1]; + $campaigns_list .= "<input type=\"checkbox\" name=\"campaigns[]\" value=\"$campaign_id_value\""; + $p=0; + while ($p<100) + { + if ($campaign_id_value == $campaigns[$p]) + { + # echo "<!-- X $p|$campaign_id_value|$campaigns[$p]| -->"; + $campaigns_list .= " CHECKED"; + $campaigns_value .= " $campaign_id_value"; + } + # echo "<!-- O $p|$campaign_id_value|$campaigns[$p]| -->"; + $p++; + } + $campaigns_list .= "> $campaign_id_value - $campaign_name_value<BR>\n"; + $o++; + } + if (strlen($campaigns_value)>2) {$campaigns_value .= " -";} + } + ##### END get campaigns listing for checkboxes ##### + + + if ( (strlen($ADD)==11) or (strlen($ADD)>12) ) + { + ##### 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++; + } + } + + + +$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. + +
+
+
+Hot Keys Active - This option if set to 1 allows the user to use the Hot Keys 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. + +
+
+
+VICIDIAL Recording Override - This option will override whatever the option is in the campaign for recording. DISABLED will not override the campaign recording setting. 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. ALLFORCE will start recording on the client whenever a call is sent to an agent giving the agent no option to stop recording. For ALLCALLS and ALLFORCE there is an option to use the Recording Delay to cut down on very short recordings and recude system load. + +
+
+
+Agent Alter Customer Data Override - This option will override whatever the option is in the campaign for altering of customer data. NOT_ACTIVE will use whatever setting is present for the campaign. ALLOW_ALTER will always allow for the agent to alter the customer data, no matter what the campaign setting is. Default is NOT_ACTIVE. + +
+
+
+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. + +
+
+
+Modify Sections - These options allow the user to view and modify each sections records. If set to 0, the user will be able to see the section list, but not the detail or modification screen of a record in that section. + +
+
+
+View Reports - This option allows the user to view the VICIDIAL reports. + + + + +



+ +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. + +
+
+
+Campaign Description - This is a memo field for the campaign, it is optional and can be a maximum of 255 characters in length. + +
+
+
+Campaign Change Date - This is the last time that the settings for this campaign were modified in any way. + +
+
+
+Last Campaign Login Date - This is the last time that an agent was logged into this campaign. + +
+
+
+Campaign Stats Refresh - This checkbox will allow you to force a vicidial stats refresh, even if the campaign is not active. + +
+
+
+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. To add another status to dial, select it from the drop-down list and click ADD. To remove one of the dial statuses, click on the REMOVE link next to the status you want to remove. + +
+
+
+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. + +
+
+
+Dial Method - This field is the way to define how dialing is to take place. If MANUAL then the auto_dial_level will be locked at 0 unless Dial Method is changed. If RATIO then the normal dialing a number of lines for Active agents. ADAPT_HARD_LIMIT will dial predictively up to the dropped percentage and then not allow aggressive dialing once the drop limit is reached until the percentage goes down again. ADAPT_TAPERED allows for running over the dropped percentage in the first half of the shift -as defined by call_time selected for campaign- and gets more strict as the shift goes on. ADAPT_AVERAGE tries to maintain an average or the dropped percentage not imposing hard limits as aggressively as the other two methods. You cannot change the Auto Dial Level if you are in any of the ADAPT dial methods. Only the Dialer can change the dial level when in predictive dialing mode. + +
+
+
+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. The ADAPT OVERRIDE checkbox allows you to force a new dial level even though the dial method is in an ADAPT mode. This is useful if there is a dramatic shift in the quality of leads and you want to drastically change the dial_level manually. + +
+
+
+Available Only Tally - This field if set to Y will leave out INCALL and QUEUE status agents when calculating the number of calls to dial when not in MANUAL dial mode. Default is N. + +
+
+
+Drop Percentage Limit - This field is where you set the limit of the percentage of dropped calls you would like while using an adaptive-predictive dial method, not MANUAL or RATIO. + +
+
+
+Maximum Adapt Dial Level - This field is where you set the limit of the limit to the numbr of lines you would like dialed per agent while using an adaptive-predictive dial method, not MANUAL or RATIO. This number can be higher than the Auto Dial Level if your hardware will support it. Value must be a positive number greater than one and can have decimal places Default 3.0. + +
+
+
+Latest Server Time - This field is only used by the ADAPT_TAPERED dial method. You should enter in the hour and minute that you will stop calling on this campaign, 2100 would mean that you will stop dialing this campaign at 9PM server time. This allows the Tapered algorithm to decide how aggressively to dial by how long you have until you will be finished calling. + +
+
+
+Adapt Intensity Modifier - This field is used to adjust the predictive intensity either higher or lower. The higher a positive number you select, the greater the dialer will increase the call pacing when it goes up and the slower the dialer will decrease the call pacing when it goes down. The lower the negative number you select here, the slower the dialer will increase the call pacing and the faster the dialer will lower the call pacing when it goes down. Default is 0. This field is not used by the MANUAL or RATIO dial methods. + +
+
+
+Dial Level Difference Target - This field is used to define whether you want to target having a specific number of agents waiting for calls or calls waiting for agents. For example if you would always like to have on average one agent free to take calls immediately you would set this to -1, if you would like to target always having one call on hold waiting for an agent you would set this to 1. Default is 0. This field is not used by the MANUAL or RATIO dial methods. + +
+
+
+Concurrent Transfers - This setting is used to define the number of calls that can be sent to agents at the same time. It is recommended that this setting is left at AUTO. This field is not used by the MANUAL dial method. + +
+
+
+Auto Alt-Number Dialing - This setting is used to automatically dial alternate number fields while dialing in the RATIO and ADAPT dial methods when there is no contact at the main phone number for a lead, the NA, B, DC and N statuses. This setting is not used by the MANUAL dial method. + +
+
+
+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 hang up 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 dial plan - extensions.conf. + +
+
+
+Omit Phone Code - This field allows you to leave out the phone_code field while dialing within VICIDIAL. For instance if you are dialing in the UK from the UK you would have 44 in as your phone_code field for all leads, but you just want to dial 10 digits in your dial plan extensions.conf to place calls instead of 44 then 10 digits. Default is N. + +
+
+
+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. ALLFORCE will start recording on the client whenever a call is sent to an agent giving the agent no option to stop recording. For ALLCALLS and ALLFORCE there is an option to use the Recording Delay to cut down on very short recordings and recude system load. + +
+
+
+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. + +
+
+
+Recording Delay - For ALLCALLS and ALLFORCE recording only. This setting will delay the starting of the recording on all calls for the number of seconds specified in this field. Default is 0. + +
+
+
+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 dial plan - 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. If you want to allow Consultative Transfers, a fronter to a closer, you can place CXFER as one of the number-to-dial presets and the proper dial string will be sent to do a Local Consultative Transfer, then the agent can just LEAVE-3WAY-CALL and move on to their next call. If you want to allow Blind transfers of customers to a VICIDIAL AGI script for logging or an IVR, then place AXFER in the number-to-dial field. You can also specify an custom extension after the AXFER or CXFER, for instance if you want to do Internal Consultative transfers instead of Local you would put CXFER90009 in the number-to-dial field. + +
+
+
+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 dial plan extension that the desired Safe Harbor audio file is located at on your server. + +
+
+
+Wrap Up 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. + +
+
+
+Wrap Up Message - This is a campaign-specific message to be displayed on the wrap up screen if wrap up 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. + +
+
+
+Agent Pause Codes Active - Allows agents to select a pause code when they click on the PAUSE button in vicidial.php. Pause codes are definable per campaign at the bottom of the campaign view detail screen and they are stored in the vicidial_agent_log table. Default is N. + +
+
+
+Disable Alter Customer Data - If set to Y, does not change any of the customer data record when an agent dispositions the call. Default is N. + +
+
+
+Allow No-Hopper-Leads Logins - If set to Y, allows agents to login to the campaign even if there are no leads loaded into the hopper for that campaign. This function is not needed in CLOSER-type campaigns. Default is N. + + + +



+ +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. Must be a number greater than 100. + +
+
+
+List Name - This is the description of the list, it must be between 2 and 20 characters in length. + +
+
+
+List Description - This is the memo field for the list, it is optional. + +
+
+
+List Change Date - This is the last time that the settings for this list were modified in any way. + +
+
+
+List Last Call Date - This is the last time that lead was dialed from this list. + +
+
+
+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. If you want to allow Consultative Transfers, a fronter to a closer, you can place CXFER as one of the number-to-dial presets and the proper dial string will be sent to do a Local Consultative Transfer, then the agent can just LEAVE-3WAY-CALL and move on to their next call. If you want to allow Blind transfers of customers to a VICIDIAL AGI script for logging or an IVR, then place AXFER in the number-to-dial field. You can also specify an custom extension after the AXFER or CXFER, for instance if you want to do Internal Consultative transfers instead of Local you would put CXFER90009 in the number-to-dial field. + +
+
+
+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 dial plan 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 dial plan 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 hot keys, agents that use the vicidial web-client can hang up and disposition calls just by pressing a single key on their keyboard. There are two special HotKey options that you can use in conjunction with Alternate Phone number dialing, ALTPH2 - Alternate Phone Hot Dial and ADDR3-----Address3 Hot Dial allow an agent to use a hotkey to hang up their call, stay on the same lead, and dial another contact number from that lead. + + + + + +



+ +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. + + + + + +



+ +VICIDIAL AUTO ALT DIAL STATUSES

+
+
+If the Auto Alt-Number Dialing field is set, then the leads that are dispositioned under these auto alt dial statuses will have their alt_phone and-or address3 fields dialed after any of these no-answer statuses are set. + + + + + +



+ +VICIDIAL AGENT PAUSE CODES

+
+
+If the Agent Pause Codes Active field is set to active then the agents will be able to select from these pause codes when they click on the PAUSE button on their screens. This data is then stored in the vicidial agent log. The Pause code must contain only letters and numbers and be less than 7 characters long. The pause code name can be no longer than 30 characters. + + + + + +



+ +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. + +
+
+
+Allowed Campaigns - This is a selectable list of Campaigns to which members of this user group can log in to. The ALL-CAMPAIGNS option allows the users in this group to see and log in to any campaign on the system. + + + + + +



+ +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, lead_id, campaign, phone_login, group, channel_group, SQLdate, epoch, uniqueid, customer_zap_channel, server_ip, SIPexten, session_id. 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?

You can also use an iframe to load a separate window within the SCRIPT tab, here is an example with prepopulated variables: + +
+<iframe src="http://astguiclient.sf.net/test_VICIDIAL_output.php?lead_id=--A--lead_id--B--&vendor_id=--A--vendor_lead_code--B--&list_id=--A--list_id--B--&gmt_offset_now=--A--gmt_offset_now--B--&phone_code=--A--phone_code--B--&phone_number=--A--phone_number--B--&title=--A--title--B--&first_name=--A--first_name--B--&middle_initial=--A--middle_initial--B--&last_name=--A--last_name--B--&address1=--A--address1--B--&address2=--A--address2--B--&address3=--A--address3--B--&city=--A--city--B--&state=--A--state--B--&province=--A--province--B--&postal_code=--A--postal_code--B--&country_code=--A--country_code--B--&gender=--A--gender--B--&date_of_birth=--A--date_of_birth--B--&alt_phone=--A--alt_phone--B--&email=--A--email--B--&security_phrase=--A--security_phrase--B--&comments=--A--comments--B--&user=--A--user--B--&campaign=--A--campaign--B--&phone_login=--A--phone_login--B--&fronter=--A--fronter--B--&closer=--A--user--B--&group=--A--group--B--&channel_group=--A--group--B--&SQLdate=--A--SQLdate--B--&epoch=--A--epoch--B--&uniqueid=--A--uniqueid--B--&customer_zap_channel=--A--customer_zap_channel--B--&server_ip=--A--server_ip--B--&SIPexten=--A--SIPexten--B--&session_id=--A--session_id--B--&phone=--A--phone--B--" style="width:580;height:290;background-color:transparent;" scrolling="auto" frameborder="0" allowtransparency="true" id="popupFrame" name="popupFrame" width="460" height="290"> +</iframe> +
+ +
+
+
+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 /etc/astguiclient.conf 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. + + + + +



+ + + + + + +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. + +
+
+
+Dial Plan 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 dial plan 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 dial plan 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 dial plan extension going to check your voicemail. verify with extensions.conf file before changing. + +
+
+
+VMAIL Dump Exten - This is the dial plan 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 dial plan 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 hang up '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 Hang Up - Set to true to allow user to be able to hang up 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 hang up. 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. + +
+
+
+Enable SIPSAK Messages - If enabled the server will send messages to the SIP phone to display on the phone LCD display when logged into VICIDIAL. Feature only works with SIP phones and requires sipsak application to be installed on the web server. Default is 0. + +
+
+
+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 dial plan context used for scripts that operate for this server. Default is 'default' + +
+
+
+System Performance - Setting this option to Y will enable logging of system performance stats for the server machine including system load, system processes and Asterisk channels in use. Default is N. + +
+
+
+Server Logs - Setting this option to Y will enable logging of all VICIDIAL related scripts to their text log files. Setting this to N will stop writing logs to files for these processes, also the screen logging of asterisk will be disabled if this is set to N when Asterisk is started. Default is Y. + +
+
+
+AGI Output - Setting this option to NONE will disable output from all VICIDIAL related AGI scripts. Setting this to STDERR will send the AGI output to the Asterisk CLI. Setting this to FILE will send the output to a file in the logs directory. Setting this to BOTH will send output to both the Asterisk CLI and a log file. Default is FILE. + +
+
+
+VICIDIAL Balance Dialing - Setting this field to Y will allow the server to place balance calls for campaigns in VICIDIAL so that the defined dial level can be met even if there are no agents logged into that campaign on this server. Default is N. + +
+
+
+VICIDIAL Balance Offlimits - This setting defines the number of trunks to not allow VICIDIAL balance dialing to use. For example if you have 40 max vicidial trunks and balance offlimits is set to 10 you will only be able to use 30 trunk lines for VICIDIAL balance dialing. Default is 0. + + +



+ +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. + + + + +



+ +VICIDIAL_SERVER_TRUNKS TABLE

+
+
+VICIDIAL Server Trunks allows you to restrict the outgoing lines that are used on this server for campaign dialing on a per-campaign basis. You have the option to reserve a specific number of lines to be used by only one campaign as well as allowing that campaign to run over its reserved lines into whatever lines remain open, as long at the total lines used by vicidial on this server is less than the Max VICIDIAL Trunks setting. Not having any of these records will allow the campaign that dials the line first to have as many lines as it can get under the Max VICIDIAL Trunks setting. + + + + + +



+ +SYSTEM_SETTINGS TABLE

+
+
+Use Non-Latin - This option allows you to default the web display script to use UTF8 characters and not do any latin-character-family regular expression filtering or display formatting. Default is 0. + +
+
+
+Webroot Writable - This setting allows you to define whether temp files and authentication files should be placed in the webroot on your web server. Default is 1. + +
+
+
+Enable QueueMetrics Logging - This setting allows you to define whether VICIDIAL will insert log entries into the queue_log database table as Asterisk Queues activity does. QueueMetrics is a standalone, closed-source statistical analysis program. You must have QueueMetrics already installed and configured before enabling this feature. Default is 0. + +
+
+
+QueueMetrics Server IP - This is the IP address of the database for your QueueMetrics installation. + +
+
+
+QueueMetrics Database Name - This is the database name for your QueueMetrics database. + +
+
+
+QueueMetrics Database Login - This is the user name used to log in to your QueueMetrics database. + +
+
+
+QueueMetrics Database Password - This is the password used to log in to your QueueMetrics database. + +
+
+
+QueueMetrics URL - This is the URL or web site address used to get to your QueueMetrics installation. + +
+
+
+QueueMetrics Log ID - This is the server ID that all VICIDIAL logs going into the QueueMetrics database will use as an identifier for each record. + +
+
+
+QueueMetrics EnterQueue Prepend - This field is used to allow for prepending of one of the vicidial_list data fields in front of the phone number of the customer for customized QueueMetrics reports. Default is NONE to not populate anything. + +
+
+
+VICIDIAL Agent Disable Display - This field is used to select when to show an agent when their session has been disabled by the system, a manager action or by an external measure. The NOT_ACTIVE setting will disable the message on the agents screen. The LIVE_AGENT setting will only display the disabled message when the agents vicidial_auto_calls record has been removed, such as during a force logout or emergency logout. + +
+
+
+Allow SIPSAK Messages - If set to 1, this will allow the phones table setting to work properly, the server will send messages to the SIP phone to display on the phone LCD display when logged into VICIDIAL. This feature only works with SIP phones and requires sipsak application to be installed on the web server. Default is 0. + +
+
+
+Admin Home URL - This is the URL or web site address that you will go to if you click on the HOME link at the top of the admin.php page. + + + + +







+







+THE END +
+\n"; + echo "\n"; + echo "\n"; + echo ""; + + $stmt="SELECT dial_statuses,local_call_time,lead_filter_id from vicidial_campaigns where campaign_id='$campaign_id';"; + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + $dial_statuses = $row[0]; + $local_call_time = $row[1]; + if ($lead_filter_id=='') + { + $lead_filter_id = $row[2]; + 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_statuses
\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_statuses,$camp_lists,$fSQL); + + echo "

\n"; + echo "\n"; + + exit; + } + else + { + echo "You do not have permission to view this page\n"; + exit; + } +} + + +###################### +# ADD=7111111 view sample script with test variables +###################### + +if ($ADD==7111111) +{ + ##### TEST VARIABLES ##### + $vendor_lead_code = 'VENDOR:LEAD;CODE'; + $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'; + $RGlead_id = '1234'; + $RGcampaign = 'TESTCAMP'; + $RGphone_login = 'gs102'; + $RGgroup = 'TESTCAMP'; + $RGchannel_group = 'TESTCAMP'; + $RGSQLdate = date("Y-m-d H:i:s"); + $RGepoch = date("U"); + $RGuniqueid = '1163095830.4136'; + $RGcustomer_zap_channel = 'Zap/1-1'; + $RGserver_ip = '10.10.10.15'; + $RGSIPexten = 'SIP/gs102'; + $RGsession_id = '8600051'; + +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]; + +if (eregi("iframe src",$script_text)) + { + $vendor_lead_code = eregi_replace(' ','+',$vendor_lead_code); + $list_id = eregi_replace(' ','+',$list_id); + $gmt_offset_now = eregi_replace(' ','+',$gmt_offset_now); + $phone_code = eregi_replace(' ','+',$phone_code); + $phone_number = eregi_replace(' ','+',$phone_number); + $title = eregi_replace(' ','+',$title); + $first_name = eregi_replace(' ','+',$first_name); + $middle_initial = eregi_replace(' ','+',$middle_initial); + $last_name = eregi_replace(' ','+',$last_name); + $address1 = eregi_replace(' ','+',$address1); + $address2 = eregi_replace(' ','+',$address2); + $address3 = eregi_replace(' ','+',$address2); + $city = eregi_replace(' ','+',$city); + $state = eregi_replace(' ','+',$state); + $province = eregi_replace(' ','+',$province); + $postal_code = eregi_replace(' ','+',$postal_code); + $country_code = eregi_replace(' ','+',$country_code); + $gender = eregi_replace(' ','+',$gender); + $date_of_birth = eregi_replace(' ','+',$date_of_birth); + $alt_phone = eregi_replace(' ','+',$alt_phone); + $email = eregi_replace(' ','+',$email); + $security_phrase = eregi_replace(' ','+',$security_phrase); + $comments = eregi_replace(' ','+',$comments); + $RGfullname = eregi_replace(' ','+',$RGfullname); + $RGuser = eregi_replace(' ','+',$RGuser); + $RGlead_id = eregi_replace(' ','+',$RGlead_id); + $RGcampaign = eregi_replace(' ','+',$RGcampaign); + $RGphone_login = eregi_replace(' ','+',$RGphone_login); + $RGgroup = eregi_replace(' ','+',$RGgroup); + $RGchannel_group = eregi_replace(' ','+',$RGchannel_group); + $RGSQLdate = eregi_replace(' ','+',$RGSQLdate); + $RGepoch = eregi_replace(' ','+',$RGepoch); + $RGuniqueid = eregi_replace(' ','+',$RGuniqueid); + $RGcustomer_zap_channel = eregi_replace(' ','+',$RGcustomer_zap_channel); + $RGserver_ip = eregi_replace(' ','+',$RGserver_ip); + $RGSIPexten = eregi_replace(' ','+',$RGSIPexten); + $RGsession_id = eregi_replace(' ','+',$RGsession_id); + } + +$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--fronter--B--',"$RGuser",$script_text); +$script_text = eregi_replace('--A--user--B--',"$RGuser",$script_text); +$script_text = eregi_replace('--A--lead_id--B--',"$RGlead_id",$script_text); +$script_text = eregi_replace('--A--campaign--B--',"$RGcampaign",$script_text); +$script_text = eregi_replace('--A--phone_login--B--',"$RGphone_login",$script_text); +$script_text = eregi_replace('--A--group--B--',"$RGgroup",$script_text); +$script_text = eregi_replace('--A--channel_group--B--',"$RGchannel_group",$script_text); +$script_text = eregi_replace('--A--SQLdate--B--',"$RGSQLdate",$script_text); +$script_text = eregi_replace('--A--epoch--B--',"$RGepoch",$script_text); +$script_text = eregi_replace('--A--uniqueid--B--',"$RGuniqueid",$script_text); +$script_text = eregi_replace('--A--customer_zap_channel--B--',"$RGcustomer_zap_channel",$script_text); +$script_text = eregi_replace('--A--server_ip--B--',"$RGserver_ip",$script_text); +$script_text = eregi_replace('--A--SIPexten--B--',"$RGSIPexten",$script_text); +$script_text = eregi_replace('--A--session_id--B--',"$RGsession_id",$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 =\"$users_color\""; $users_fc="$users_font"; $users_bold="$header_selected_bold";} + else {$users_hh=''; $users_fc='WHITE'; $users_bold="$header_nonselected_bold";} +if ($hh=='campaigns') + {$campaigns_hh="bgcolor=\"$campaigns_color\""; $campaigns_fc="$campaigns_font"; $campaigns_bold="$header_selected_bold";} + else {$campaigns_hh=''; $campaigns_fc='WHITE'; $campaigns_bold="$header_nonselected_bold";} +if ($hh=='lists') + {$lists_hh="bgcolor=\"$lists_color\""; $lists_fc="$lists_font"; $lists_bold="$header_selected_bold";} + else {$lists_hh=''; $lists_fc='WHITE'; $lists_bold="$header_nonselected_bold";} +if ($hh=='ingroups') + {$ingroups_hh="bgcolor=\"$ingroups_color\""; $ingroups_fc="$ingroups_font"; $ingroups_bold="$header_selected_bold";} + else {$ingroups_hh=''; $ingroups_fc='WHITE'; $ingroups_bold="$header_nonselected_bold";} +if ($hh=='remoteagent') + {$remoteagent_hh="bgcolor=\"$remoteagent_color\""; $remoteagent_fc="$remoteagent_font"; $remoteagent_bold="$header_selected_bold";} + else {$remoteagent_hh=''; $remoteagent_fc='WHITE'; $remoteagent_bold="$header_nonselected_bold";} +if ($hh=='usergroups') + {$usergroups_hh="bgcolor=\"$usergroups_color\""; $usergroups_fc="$usergroups_font"; $usergroups_bold="$header_selected_bold";} + else {$usergroups_hh=''; $usergroups_fc='WHITE'; $usergroups_bold="$header_nonselected_bold";} +if ($hh=='scripts') + {$scripts_hh="bgcolor=\"$scripts_color\""; $scripts_fc="$scripts_font"; $scripts_bold="$header_selected_bold";} + else {$scripts_hh=''; $scripts_fc='WHITE'; $scripts_bold="$header_nonselected_bold";} +if ($hh=='filters') + {$filters_hh="bgcolor=\"$filters_color\""; $filters_fc="$filters_font"; $filters_bold="$header_selected_bold";} + else {$filters_hh=''; $filters_fc='WHITE'; $filters_bold="$header_nonselected_bold";} +if ($hh=='admin') + {$admin_hh="bgcolor=\"$admin_color\""; $admin_fc="$admin_font"; $admin_bold="$header_selected_bold";} + else {$admin_hh=''; $admin_fc='WHITE'; $admin_bold="$header_nonselected_bold";} +if ($hh=='reports') + {$reports_hh="bgcolor=\"$reports_color\""; $reports_fc="$reports_font"; $reports_bold="$header_selected_bold";} + else {$reports_hh=''; $reports_fc='WHITE'; $reports_bold="$header_nonselected_bold";} + +?> + + + + +\n"; + +$stmt="SELECT admin_home_url from system_settings;"; +$rslt=mysql_query($stmt, $link); +$row=mysql_fetch_row($rslt); +$admin_home_url_LU = $row[0]; + +?> +
+ BGCOLOR=#D9E6FE cellpadding=2 cellspacing=0> + + + + + + + + + + + + + + + 1) { + ?> +> + 1) { + ?> +> + 1) { + ?> +> + 1) { + ?> +> + 1) { + ?> +> + 1) { + ?> +> + 1) { + ?> +> + 1) { + ?> +> + 1) { + if ($sh=='times') {$times_sh="bgcolor=\"$times_color\""; $times_fc="$times_font";} # hard teal + else {$times_sh=''; $times_fc='BLACK';} + if ($sh=='phones') {$phones_sh="bgcolor=\"$server_color\""; $phones_fc="$phones_font";} # pink + else {$phones_sh=''; $phones_fc='BLACK';} + if ($sh=='server') {$server_sh="bgcolor=\"$server_color\""; $server_fc="$server_font";} # pink + else {$server_sh=''; $server_fc='BLACK';} + if ($sh=='conference') {$conference_sh="bgcolor=\"$server_color\""; $conference_fc="$server_font";} # pink + else {$conference_sh=''; $conference_fc='BLACK';} + if ($sh=='settings') {$settings_sh="bgcolor=\"$server_color\""; $settings_fc="$server_font";} # pink + else {$settings_sh=''; $settings_fc='BLACK';} + + ?> +> + + + + + + + 1) { + ?> + > + 1) { + ?> + > + 1) { + ?> + > + 1) { + ?> + > + 1) { + ?> + > + \n"; + echo "You are not authorized to view this page. Please go back.\n"; + } + +} +if (strlen($reports_hh) > 1) { + ?> +> + + + + +
  VICIDIAL ADMIN - HOME | Logout  
> SIZE=> Users > SIZE=> Campaigns > SIZE=> Lists > SIZE=> Scripts > SIZE=> Filters > SIZE=> In-Groups > SIZE=> User Groups > SIZE=> Remote Agents > SIZE=> Admin > SIZE=> Reports
>   > Show Users     |     > Add A New User     |     > Search For A User
>   > Show Campaigns     |     > Add A New Campaign     |     > Real-Time Campaigns Summary
>   > Show Lists     |     > Add A New List     |     > Search For A Lead     |     > Add Number To DNC     |     > Load New Leads
>   > Show Scripts     |     > Add A New Script
>   > Show Filters     |     > Add A New Filter
>   > Show In-Groups     |     > Add A New In-Group
>   > Show User Groups     |     > Add A New User Group     |     > Group Hourly Report
>   > Show Remote Agents     |     > Add New Remote Agents
COLSPAN=2> SIZE=> Call Times COLSPAN=2> SIZE=> Phones COLSPAN=2> SIZE=> Conferences COLSPAN=1> SIZE=> Servers COLSPAN=3> SIZE=> System Settings
>   > Show Call Times     |     > Add A New Call Time     |     > Show State Call Times     |     > Add A New State Call Time  
>   > Show Phones   |   > Add A New Phone
> Show Conferences   |   > Add A New Conference   |   > Show VICIDIAL Conferences   |   > Add A New VICIDIAL Conference
> Show Servers   |   > Add A New Server
> System Settings
>  
+
\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"; + } + else + { + echo "You do not have permission to view this page\n"; + exit; + } +} + + +###################### +# ADD=11 display the ADD NEW CAMPAIGN FORM SCREEN +###################### + +if ($ADD==11) +{ + if ($LOGmodify_campaigns==1) + { + 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 "\n"; + echo "
Campaign ID: $NWB#vicidial_campaigns-campaign_id$NWE
Campaign Name: $NWB#vicidial_campaigns-campaign_name$NWE
Campaign Description: $NWB#vicidial_campaigns-campaign_description$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"; + } + else + { + echo "You do not have permission to view this page\n"; + exit; + } +} + + +###################### +# ADD=111 display the ADD NEW LIST FORM SCREEN +###################### + +if ($ADD==111) +{ + if ($LOGmodify_lists==1) + { + echo "
\n"; + echo ""; + + echo "
ADD A NEW LIST\n"; + echo "\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
List Description: $NWB#vicidial_lists-list_description$NWE
Campaign: $NWB#vicidial_lists-campaign_id$NWE
Active: $NWB#vicidial_lists-active$NWE
\n"; + } + else + { + echo "You do not have permission to view this page\n"; + exit; + } +} + + +###################### +# 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) +{ + if ($LOGmodify_ingroups==1) + { + 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"; + } + else + { + echo "You do not have permission to view this page\n"; + exit; + } +} + + +###################### +# ADD=11111 display the ADD NEW REMOTE AGENTS SCREEN +###################### + +if ($ADD==11111) +{ + if ($LOGmodify_remoteagents==1) + { + 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: (dial plan 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"; + } + else + { + echo "You do not have permission to view this page\n"; + exit; + } +} + + +###################### +# ADD=111111 display the ADD NEW USERS GROUP SCREEN +###################### + +if ($ADD==111111) +{ + if ($LOGmodify_usergroups==1) + { + 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"; + } + else + { + echo "You do not have permission to view this page\n"; + exit; + } +} + + +###################### +# ADD=1111111 display the ADD NEW SCRIPT SCREEN +###################### + +if ($ADD==1111111) +{ + if ($LOGmodify_scripts==1) + { + 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: "; + # BEGIN Insert Field + echo ""; + echo "
"; + # END Insert Field + echo " $NWB#vicidial_scripts-script_text$NWE
\n"; + } + else + { + echo "You do not have permission to view this page\n"; + exit; + } +} + + +###################### +# ADD=11111111 display the ADD NEW FILTER SCREEN +###################### + +if ($ADD==11111111) +{ + if ($LOGmodify_filters==1) + { + 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"; + } + else + { + echo "You do not have permission to view this page\n"; + exit; + } +} + + +###################### +# ADD=111111111 display the ADD NEW CALL TIME SCREEN +###################### + +if ($ADD==111111111) +{ + if ($LOGmodify_call_times==1) + { + 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"; + } + else + { + echo "You do not have permission to view this page\n"; + exit; + } +} + + +###################### +# ADD=1111111111 display the ADD NEW STATE CALL TIME SCREEN +###################### + +if ($ADD==1111111111) +{ + if ($LOGmodify_call_times==1) + { + 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"; + } + else + { + echo "You do not have permission to view this page\n"; + exit; + } +} + + +###################### +# ADD=11111111111 display the ADD NEW PHONE SCREEN +###################### + +if ($ADD==11111111111) +{ + if ($LOGast_admin_access==1) + { + echo "
\n"; + echo ""; + + 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
Dial Plan 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"; + } + else + { + echo "You do not have permission to view this page\n"; + exit; + } +} + + +###################### +# ADD=111111111111 display the ADD NEW SERVER SCREEN +###################### + +if ($ADD==111111111111) +{ + if ($LOGmodify_servers==1) + { + echo "
\n"; + 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"; + } + else + { + echo "You do not have permission to view this page\n"; + exit; + } +} + + +###################### +# ADD=1111111111111 display the ADD NEW CONFERENCE SCREEN +###################### + +if ($ADD==1111111111111) +{ + if ($LOGast_admin_access==1) + { + echo "
\n"; + 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"; + } + else + { + echo "You do not have permission to view this page\n"; + exit; + } +} + + +###################### +# ADD=11111111111111 display the ADD NEW VICIDIAL CONFERENCE SCREEN +###################### + +if ($ADD==11111111111111) +{ + if ($LOGast_admin_access==1) + { + echo "
\n"; + echo ""; + + echo "
ADD A NEW VICIDIAL 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"; + } + else + { + echo "You do not have permission to view this page\n"; + exit; + } +} + + + +###################################################################################################### +###################################################################################################### +####### 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,campaign_description,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,campaign_changedate,campaign_stats_refresh) values('$campaign_id','$campaign_name','$campaign_description','$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','$SQLdate','Y');"; + $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 HOT KEY 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 HOT KEY 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 HOT KEY 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 HOT KEY |$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=26 adds the new auto alt dial status to the campaign +###################### + +if ($ADD==26) +{ + $status = eregi_replace("-----.*",'',$status); + echo ""; + $stmt="SELECT count(*) from vicidial_campaigns where campaign_id='$campaign_id' and auto_alt_dial_statuses LIKE \"% $status %\";"; + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + if ($row[0] > 0) + {echo "
AUTO ALT DIAL STATUS NOT ADDED - there is already an entry for this campaign with this status\n";} + else + { + if ( (strlen($campaign_id) < 2) or (strlen($status) < 1) ) + { + echo "
AUTO ALT DIAL STATUS 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"; + } + else + { + echo "
AUTO ALT DIAL STATUS ADDED: $campaign_id - $status\n"; + + $stmt="SELECT auto_alt_dial_statuses from vicidial_campaigns where campaign_id='$campaign_id';"; + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + + if (strlen($row[0])<2) {$row[0] = ' -';} + $auto_alt_dial_statuses = " $status$row[0]"; + $stmt="UPDATE vicidial_campaigns set auto_alt_dial_statuses='$auto_alt_dial_statuses' 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|ADD A AUTO-ALT-DIAL STATUS|$PHP_AUTH_USER|$ip|$stmt|\n"); + fclose($fp); + } + } + } +$ADD=31; +} + + +###################### +# ADD=27 adds the new campaign agent pause code entry to the system +###################### + +if ($ADD==27) +{ + echo ""; + $stmt="SELECT count(*) from vicidial_pause_codes where campaign_id='$campaign_id' and pause_code='$pause_code';"; + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + if ($row[0] > 0) + {echo "
AGENT PAUSE CODE NOT ADDED - there is already an entry for this campaign with this pause code\n";} + else + { + if ( (strlen($campaign_id) < 2) or (strlen($pause_code) < 1) or (strlen($pause_code) > 6) or (strlen($pause_code_name) < 2) ) + { + echo "
AGENT PAUSE CODE NOT ADDED - Please go back and look at the data you entered\n"; + echo "
pause code must be between 1 and 6 characters in length\n"; + echo "
pause code name must be between 2 and 30 characters in length\n"; + } + else + { + echo "
AGENT PAUSE CODE ADDED: $campaign_id - $pause_code - $pause_code_name\n"; + + $stmt="INSERT INTO vicidial_pause_codes(campaign_id,pause_code,pause_code_name,billable) values('$campaign_id','$pause_code','$pause_code_name','$billable');"; + $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 AGENT PAUSE CODE|$PHP_AUTH_USER|$ip|$stmt|\n"); + fclose($fp); + } + } + } +$ADD=31; +} + + +###################### +# ADD=28 adds new status to the campaign dial statuses +###################### + +if ($ADD==28) +{ + $status = eregi_replace("-----.*",'',$status); + echo ""; + $stmt="SELECT count(*) from vicidial_campaigns where campaign_id='$campaign_id' and dial_statuses LIKE \"% $status %\";"; + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + if ($row[0] > 0) + {echo "
CAMPAIGN DIAL STATUS NOT ADDED - there is already an entry for this campaign with this status\n";} + else + { + if ( (strlen($campaign_id) < 2) or (strlen($status) < 1) ) + { + echo "
CAMPAIGN DIAL STATUS 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"; + } + else + { + echo "
CAMPAIGN DIAL STATUS ADDED: $campaign_id - $status\n"; + + $stmt="SELECT dial_statuses from vicidial_campaigns where campaign_id='$campaign_id';"; + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + + if (strlen($row[0])<2) {$row[0] = ' -';} + $dial_statuses = " $status$row[0]"; + $stmt="UPDATE vicidial_campaigns set dial_statuses='$dial_statuses' 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|ADD CAMPAIGN DIAL STATUS |$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 ($list_id < 100) 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"; + echo "
List ID must be greater than 100\n"; + } + else + { + echo "
LIST ADDED: $list_id\n"; + + $stmt="INSERT INTO vicidial_lists (list_id,list_name,campaign_id,active,list_description,list_changedate) values('$list_id','$list_name','$campaign_id','$active','$list_description','$SQLdate');"; + $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|$stmt|\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(user_group,group_name,allowed_campaigns) values('$user_group','$group_name','-ALL-CAMPAIGNS-');"; + $rslt=mysql_query($stmt, $link); + + echo "
USER GROUP ADDED: $user_group\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|$stmt|\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','$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; +} + + +###################### +# ADD=21111111111 adds new phone to the system +###################### + +if ($ADD==21111111111) +{ +echo "
\n"; + 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=31111111111; +} + + +###################### +# ADD=211111111111 adds new server to the system +###################### + +if ($ADD==211111111111) +{ +echo "
\n"; + 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=311111111111; +} + + +###################### +# ADD=221111111111 adds the new vicidial server trunk record to the system +###################### + +if ($ADD==221111111111) +{ + echo ""; + $stmt="SELECT max_vicidial_trunks from servers where server_ip='$server_ip';"; + $rslt=mysql_query($stmt, $link); + $rowx=mysql_fetch_row($rslt); + $MAXvicidial_trunks = $rowx[0]; + + $stmt="SELECT sum(dedicated_trunks) from vicidial_server_trunks where server_ip='$server_ip' and campaign_id !='$campaign_id';"; + $rslt=mysql_query($stmt, $link); + $rowx=mysql_fetch_row($rslt); + $SUMvicidial_trunks = ($rowx[0] + $dedicated_trunks); + + if ($SUMvicidial_trunks > $MAXvicidial_trunks) + { + echo "
VICIDIAL SERVER TRUNK RECORD NOT ADDED - the number of vicidial trunks is too high: $SUMvicidial_trunks / $MAXvicidial_trunks\n"; + } + else + { + $stmt="SELECT count(*) from vicidial_server_trunks where campaign_id='$campaign_id' and server_ip='$server_ip';"; + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + if ($row[0] > 0) + {echo "
VICIDIAL SERVER TRUNK RECORD NOT ADDED - there is already a server-trunk record for this campaign\n";} + else + { + if ( (strlen($campaign_id) < 2) or (strlen($server_ip) < 7) or (strlen($dedicated_trunks) < 1) or (strlen($trunk_restriction) < 1) ) + { + echo "
VICIDIAL SERVER TRUNK RECORD NOT ADDED - Please go back and look at the data you entered\n"; + echo "
campaign must be between 3 and 8 characters in length\n"; + echo "
server_ip delay must be at least 7 characters\n"; + echo "
trunks must be a digit from 0 to 9999\n"; + } + else + { + echo "
VICIDIAL SERVER TRUNK RECORD ADDED: $campaign_id - $server_ip - $dedicated_trunks - $trunk_restriction\n"; + + $stmt="INSERT INTO vicidial_server_trunks(server_ip,campaign_id,dedicated_trunks,trunk_restriction) values('$server_ip','$campaign_id','$dedicated_trunks','$trunk_restriction');"; + $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 VICIDIAL TRUNK |$PHP_AUTH_USER|$ip|$stmt|\n"); + fclose($fp); + } + } + } + } +$ADD=311111111111; +} + + +###################### +# ADD=2111111111111 adds new conference to the system +###################### + +if ($ADD==2111111111111) +{ +echo "
\n"; + 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=3111111111111; +} + + +###################### +# ADD=21111111111111 adds new vicidial conference to the system +###################### + +if ($ADD==21111111111111) +{ +echo "
\n"; + echo ""; + $stmt="SELECT count(*) from vicidial_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 "
VICIDIAL CONFERENCE NOT ADDED - there is already a vicidial conference in the system with this ID and server\n";} + else + { + if ( (strlen($conf_exten) < 1) or (strlen($server_ip) < 7) ) + {echo "
VICIDIAL CONFERENCE NOT ADDED - Please go back and look at the data you entered\n";} + else + { + echo "
VICIDIAL CONFERENCE ADDED\n"; + + $stmt="INSERT INTO vicidial_conferences (conf_exten,server_ip) values('$conf_exten','$server_ip');"; + $rslt=mysql_query($stmt, $link); + } + } +$ADD=31111111111111; +} + + + +###################################################################################################### +###################################################################################################### +####### 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") +{ + if ($LOGmodify_users==1) + { + 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',modify_users='$modify_users',modify_campaigns='$modify_campaigns',modify_lists='$modify_lists',modify_scripts='$modify_scripts',modify_filters='$modify_filters',modify_ingroups='$modify_ingroups',modify_usergroups='$modify_usergroups',modify_remoteagents='$modify_remoteagents',modify_servers='$modify_servers',view_reports='$view_reports',vicidial_recording_override='$vicidial_recording_override',alter_custdata_override='$alter_custdata_override' 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); + } + } + } + else + { + echo "You do not have permission to view this page\n"; + exit; + } +$ADD=3; # go to user modification below +} + + +###################### +# ADD=4B submit user modifications to the system - ADMIN +###################### + +if ($ADD=="4B") +{ + if ($LOGmodify_users==1) + { + 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',vicidial_recording_override='$vicidial_recording_override',alter_custdata_override='$alter_custdata_override' 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); + } + } + } + else + { + echo "You do not have permission to view this page\n"; + exit; + } +$ADD=3; # go to user modification below +} + + + +###################### +# ADD=4 submit user modifications to the system +###################### + +if ($ADD==4) +{ + if ($LOGmodify_users==1) + { + 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); + } + } + } + else + { + echo "You do not have permission to view this page\n"; + exit; + } +$ADD=3; # go to user modification below +} + +###################### +# ADD=41 submit campaign modifications to the system +###################### + +if ($ADD==41) +{ + if ($LOGmodify_campaigns==1) + { + 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"; + echo "
|$campaign_name|$active|\n"; + } + else + { + echo "
CAMPAIGN MODIFIED: $campaign_id\n"; + + if ($dial_method == 'MANUAL') + { + $auto_dial_level='0'; + $adlSQL = "auto_dial_level='0',"; + } + else + { + if ($dial_level_override > 0) + { + $adlSQL = "auto_dial_level='$auto_dial_level',"; + } + else + { + if ($dial_method == 'RATIO') + { + if ($auto_dial_level < 1) {$auto_dial_level = "1.0";} + $adlSQL = "auto_dial_level='$auto_dial_level',"; + } + else + { + $adlSQL = ""; + if ($auto_dial_level < 1) + { + $auto_dial_level = "1.0"; + $adlSQL = "auto_dial_level='$auto_dial_level',"; + } + } + } + } + $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', $adlSQL 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',allcalls_delay='$allcalls_delay',omit_phone_code='$omit_phone_code',dial_method='$dial_method',available_only_ratio_tally='$available_only_ratio_tally',adaptive_dropped_percentage='$adaptive_dropped_percentage',adaptive_maximum_level='$adaptive_maximum_level',adaptive_latest_server_time='$adaptive_latest_server_time',adaptive_intensity='$adaptive_intensity',adaptive_dl_diff_target='$adaptive_dl_diff_target',concurrent_transfers='$concurrent_transfers',auto_alt_dial='$auto_alt_dial',agent_pause_codes_active='$agent_pause_codes_active',campaign_description='$campaign_description',campaign_changedate='$SQLdate',campaign_stats_refresh='$campaign_stats_refresh',disable_alter_custdata='$disable_alter_custdata',no_hopper_leads_logins='$no_hopper_leads_logins' 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 IN('READY','QUEUE','DONE');"; + $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|$stmt|\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); + } + } + } + else + { + echo "You do not have permission to view this page\n"; + exit; + } +$ADD=31; # go to campaign modification form below +} + +###################### +# ADD=42 delete campaign status in the system +###################### + +if ($ADD==42) +{ + if ($LOGmodify_campaigns==1) + { + 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); + } + } + } + else + { + echo "You do not have permission to view this page\n"; + exit; + } +$ADD=31; # go to campaign modification form below +} + +###################### +# ADD=43 delete campaign hotkey in the system +###################### + +if ($ADD==43) +{ + if ($LOGmodify_campaigns==1) + { + echo ""; + + if ( (strlen($campaign_id) < 2) or (strlen($status) < 1) or (strlen($hotkey) < 1) ) + { + echo "
CAMPAIGN HOT KEY 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 HOT KEY 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); + } + } + } + else + { + echo "You do not have permission to view this page\n"; + exit; + } +$ADD=31; # go to campaign modification form below +} + +###################### +# ADD=44 submit campaign modifications to the system - Basic View +###################### + +if ($ADD==44) +{ + if ($LOGmodify_campaigns==1) + { + 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"; + + if ($dial_method == 'RATIO') + { + if ($auto_dial_level < 1) {$auto_dial_level = "1.0";} + $adlSQL = "auto_dial_level='$auto_dial_level',"; + } + else + { + if ($dial_method == 'MANUAL') + { + $auto_dial_level='0'; + $adlSQL = "auto_dial_level='0',"; + } + else + { + $adlSQL = ""; + if ($auto_dial_level < 1) + { + $auto_dial_level = "1.0"; + $adlSQL = "auto_dial_level='$auto_dial_level',"; + } + } + } + $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', $adlSQL lead_filter_id='$lead_filter_id',dial_method='$dial_method',adaptive_intensity='$adaptive_intensity',campaign_description='$campaign_description',campaign_changedate='$SQLdate' 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 IN('READY','QUEUE','DONE');;"; + $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|$stmt|\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); + } + } + } + else + { + echo "You do not have permission to view this page\n"; + exit; + } +$ADD=34; # go to campaign modification form below +} + +###################### +# ADD=45 modify campaign lead recycle in the system +###################### + +if ($ADD==45) +{ + if ($LOGmodify_campaigns==1) + { + 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); + } + } + } + else + { + echo "You do not have permission to view this page\n"; + exit; + } +$ADD=31; # go to campaign modification form below +} + +###################### +# ADD=47 modify agent pause code in the system +###################### + +if ($ADD==47) +{ + if ($LOGmodify_campaigns==1) + { + echo ""; + + if ( (strlen($campaign_id) < 2) or (strlen($pause_code) < 1) or (strlen($pause_code) > 6) or (strlen($pause_code_name) < 2) ) + { + echo "
AGENT PAUSE CODE NOT MODIFIED - Please go back and look at the data you entered\n"; + echo "
pause_code must be between 1 and 6 characters in length\n"; + echo "
pause_code name must be between 2 and 30 characters in length\n"; + } + else + { + echo "
AGENT PAUSE CODE MODIFIED: $campaign_id - $pause_code - $pause_code_name\n"; + + $stmt="UPDATE vicidial_pause_codes SET pause_code_name='$pause_code_name',billable='$billable' where campaign_id='$campaign_id' and pause_code='$pause_code';"; + $rslt=mysql_query($stmt, $link); + + ### LOG CHANGES TO LOG FILE ### + if ($WeBRooTWritablE > 0) + { + $fp = fopen ("./admin_changes_log.txt", "a"); + fwrite ($fp, "$date|MODIFY AGENT PAUSECODE|$PHP_AUTH_USER|$ip|$stmt|\n"); + fclose($fp); + } + } + } + else + { + echo "You do not have permission to view this page\n"; + exit; + } +$ADD=31; # go to campaign modification form below +} + +###################### +# ADD=411 submit list modifications to the system +###################### + +if ($ADD==411) +{ + if ($LOGmodify_lists==1) + { + 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',list_description='$list_description',list_changedate='$SQLdate' 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',list_description='$list_description' where list_id='$list_id'|\n"); + fclose($fp); + } + } + } + else + { + echo "You do not have permission to view this page\n"; + exit; + } +$ADD=311; # go to list modification form below +} + + +###################### +# ADD=4111 modify in-group info in the system +###################### + +if ($ADD==4111) +{ + if ($LOGmodify_ingroups==1) + { + 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); + } + } + } + else + { + echo "You do not have permission to view this page\n"; + exit; + } +$ADD=3111; # go to in-group modification form below +} + + + +###################### +# ADD=41111 modify remote agents info in the system +###################### + +if ($ADD==41111) +{ + if ($LOGmodify_remoteagents==1) + { + 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); + } + } + } + else + { + echo "You do not have permission to view this page\n"; + exit; + } +$ADD=31111; # go to remote agents modification form below +} + + + +###################### +# ADD=411111 modify user group info in the system +###################### + +if ($ADD==411111) +{ + if ($LOGmodify_usergroups==1) + { + 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',allowed_campaigns='$campaigns_value' 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|$stmt|\n"); + fclose($fp); + } + } + } + else + { + echo "You do not have permission to view this page\n"; + exit; + } +$ADD=311111; # go to user group modification form below +} + +###################### +# ADD=4111111 modify script in the system +###################### + +if ($ADD==4111111) +{ + if ($LOGmodify_scripts==1) + { + echo "\n"; + echo "\n"; + 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='$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); + } + } + } + else + { + echo "You do not have permission to view this page\n"; + exit; + } +$ADD=3111111; # go to script modification form below +} + + +###################### +# ADD=41111111 modify filter in the system +###################### + +if ($ADD==41111111) +{ + if ($LOGmodify_filters==1) + { + 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); + } + } + } + else + { + echo "You do not have permission to view this page\n"; + exit; + } +$ADD=31111111; # go to filter modification form below +} + + +###################### +# ADD=411111111 modify call time in the system +###################### + +if ($ADD==411111111) +{ + if ($LOGmodify_call_times==1) + { + 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); + } + } + } + else + { + echo "You do not have permission to view this page\n"; + exit; + } +$ADD=311111111; # go to call time modification form below +} + + +###################### +# ADD=4111111111 modify state call time in the system +###################### + +if ($ADD==4111111111) +{ + if ($LOGmodify_call_times==1) + { + 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); + } + } + } + else + { + echo "You do not have permission to view this page\n"; + exit; + } +$ADD=3111111111; # go to state call time modification form below +} + + +###################### +# ADD=41111111111 modify phone record in the system +###################### + +if ($ADD==41111111111) +{ + if ($LOGast_admin_access==1) + { + 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', enable_sipsak_messages='$enable_sipsak_messages' where extension='$old_extension' and server_ip='$old_server_ip';"; + $rslt=mysql_query($stmt, $link); + } + } + } + else + { + echo "You do not have permission to view this page\n"; + exit; + } +$ADD=31111111111; # go to phone modification form below +} + + +###################### +# ADD=411111111111 modify server record in the system +###################### + +if ($ADD==411111111111) +{ + if ($LOGmodify_servers==1) + { + 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', sys_perf_log='$sys_perf_log', vd_server_logs='$vd_server_logs', agi_output='$agi_output', vicidial_balance_active='$vicidial_balance_active', balance_trunks_offlimits='$balance_trunks_offlimits' where server_id='$old_server_id';"; + $rslt=mysql_query($stmt, $link); + } + } + } + } + else + { + echo "You do not have permission to view this page\n"; + exit; + } +$ADD=311111111111; # go to server modification form below +} + + +###################### +# ADD=421111111111 modify vicidial server trunks record in the system +###################### + +if ($ADD==421111111111) +{ + if ($LOGmodify_servers==1) + { + echo ""; + $stmt="SELECT max_vicidial_trunks from servers where server_ip='$server_ip';"; + $rslt=mysql_query($stmt, $link); + $rowx=mysql_fetch_row($rslt); + $MAXvicidial_trunks = $rowx[0]; + + $stmt="SELECT sum(dedicated_trunks) from vicidial_server_trunks where server_ip='$server_ip' and campaign_id !='$campaign_id';"; + $rslt=mysql_query($stmt, $link); + $rowx=mysql_fetch_row($rslt); + $SUMvicidial_trunks = ($rowx[0] + $dedicated_trunks); + + if ($SUMvicidial_trunks > $MAXvicidial_trunks) + { + echo "
VICIDIAL SERVER TRUNK RECORD NOT ADDED - the number of vicidial trunks is too high: $SUMvicidial_trunks / $MAXvicidial_trunks\n"; + } + else + { + if ( (strlen($campaign_id) < 2) or (strlen($server_ip) < 7) or (strlen($dedicated_trunks) < 1) or (strlen($trunk_restriction) < 1) ) + { + echo "
VICIDIAL SERVER TRUNK RECORD NOT MODIFIED - Please go back and look at the data you entered\n"; + echo "
campaign must be between 3 and 8 characters in length\n"; + echo "
server_ip delay must be at least 7 characters\n"; + echo "
trunks must be a digit from 0 to 9999\n"; + } + else + { + echo "
VICIDIAL SERVER TRUNK RECORD MODIFIED: $campaign_id - $server_ip - $dedicated_trunks - $trunk_restriction\n"; + + $stmt="UPDATE vicidial_server_trunks SET dedicated_trunks='$dedicated_trunks',trunk_restriction='$trunk_restriction' where campaign_id='$campaign_id' and server_ip='$server_ip';"; + $rslt=mysql_query($stmt, $link); + + ### LOG CHANGES TO LOG FILE ### + if ($WeBRooTWritablE > 0) + { + $fp = fopen ("./admin_changes_log.txt", "a"); + fwrite ($fp, "$date|MODIFY SERVER TRUNK |$PHP_AUTH_USER|$ip|$stmt|\n"); + fclose($fp); + } + } + } + } + else + { + echo "You do not have permission to view this page\n"; + exit; + } +$ADD=311111111111; # go to server modification form below +} + + +###################### +# ADD=4111111111111 modify conference record in the system +###################### + +if ($ADD==4111111111111) +{ + if ($LOGast_admin_access==1) + { + 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); + } + } + } + else + { + echo "You do not have permission to view this page\n"; + exit; + } +$ADD=3111111111111; # go to conference modification form below +} + + +###################### +# ADD=41111111111111 modify vicidial conference record in the system +###################### + +if ($ADD==41111111111111) +{ + if ($LOGast_admin_access==1) + { + echo ""; + + $stmt="SELECT count(*) from vicidial_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 "
VICIDIAL 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 "
VICIDIAL CONFERENCE NOT MODIFIED - Please go back and look at the data you entered\n";} + else + { + echo "
VICIDIAL CONFERENCE MODIFIED: $conf_exten\n"; + + $stmt="UPDATE vicidial_conferences set conf_exten='$conf_exten',server_ip='$server_ip',extension='$extension' where conf_exten='$old_conf_exten';"; + $rslt=mysql_query($stmt, $link); + + } + } + } + else + { + echo "You do not have permission to view this page\n"; + exit; + } +$ADD=31111111111111; # go to vicidial conference modification form below +} + + + +###################### +# ADD=411111111111111 modify vicidial system settings +###################### + +if ($ADD==411111111111111) +{ + if ($LOGmodify_servers==1) + { + echo ""; + + echo "
VICIDIAL SYSTEM SETTINGS MODIFIED\n"; + + $stmt="UPDATE system_settings set use_non_latin='$use_non_latin',webroot_writable='$webroot_writable',enable_queuemetrics_logging='$enable_queuemetrics_logging',queuemetrics_server_ip='$queuemetrics_server_ip',queuemetrics_dbname='$queuemetrics_dbname',queuemetrics_login='$queuemetrics_login',queuemetrics_pass='$queuemetrics_pass',queuemetrics_url='$queuemetrics_url',queuemetrics_log_id='$queuemetrics_log_id',queuemetrics_eq_prepend='$queuemetrics_eq_prepend',vicidial_agent_disable='$vicidial_agent_disable',allow_sipsak_messages='$allow_sipsak_messages',admin_home_url='$admin_home_url';"; + $rslt=mysql_query($stmt, $link); + + ### LOG CHANGES TO LOG FILE ### + if ($WeBRooTWritablE > 0) + { + $fp = fopen ("./admin_changes_log.txt", "a"); + fwrite ($fp, "$date|MODIFY SYSTEM SETTINGS|$PHP_AUTH_USER|$ip|$stmt|\n"); + fclose($fp); + } + } + else + { + echo "You do not have permission to view this page\n"; + exit; + } +$ADD=311111111111111; # go to vicidial system settings 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=53 confirmation before Emergency VDAC Jam Clear - deletes oldest LIVE vicidial_auto_call record +###################### + +if ($ADD==53) +{ + if (eregi('IN',$stage)) + {$group_id=$campaign_id;} + echo ""; + + if (strlen($campaign_id) < 2) + { + echo "
VDAC NOT CLEARED FOR 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 "
VDAC CLEAR CONFIRMATION: $campaign_id\n"; + echo "

Click here to delete the oldest LIVE record in VDAC for $campaign_id


\n"; + } + +# go to campaign modification below +if (eregi('IN',$stage)) + {$ADD='3111';} +else + {$ADD='31';} +} + +###################### +# 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 state 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 +} + + +###################### +# ADD=51111111111 confirmation before deletion of phone record +###################### + +if ($ADD==51111111111) +{ + echo ""; + + if ( (strlen($extension) < 2) or (strlen($server_ip) < 7) or ($LOGast_delete_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='31111111111'; # go to phone modification below +} + + +###################### +# ADD=511111111111 confirmation before deletion of server record +###################### + +if ($ADD==511111111111) +{ + echo ""; + + if ( (strlen($server_id) < 2) or (strlen($server_ip) < 7) or ($LOGast_delete_phones < 1) ) + { + echo "
SERVER NOT DELETED - Please go back and look at the data you entered\n"; + echo "
Server ID be at least 2 characters in length\n"; + echo "
Server IP be at least 7 characters in length\n"; + } + else + { + echo "
SERVER DELETION CONFIRMATION: $server_id - $server_ip\n"; + echo "

Click here to delete phone $server_id - $server_ip


\n"; + } +$ADD='311111111111'; # go to server modification below +} + + +###################### +# ADD=5111111111111 confirmation before deletion of conference record +###################### + +if ($ADD==5111111111111) +{ + echo ""; + + if ( (strlen($conf_exten) < 2) or (strlen($server_ip) < 7) or ($LOGast_delete_phones < 1) ) + { + echo "
CONFERENCE NOT DELETED - Please go back and look at the data you entered\n"; + echo "
Conference must be at least 2 characters in length\n"; + echo "
Server IP be at least 7 characters in length\n"; + } + else + { + echo "
CONFERENCE DELETION CONFIRMATION: $conf_exten - $server_ip\n"; + echo "

Click here to delete phone $conf_exten - $server_ip


\n"; + } +$ADD='3111111111111'; # go to conference modification below +} + + +###################### +# ADD=51111111111111 confirmation before deletion of vicidial conference record +###################### + +if ($ADD==51111111111111) +{ + echo ""; + + if ( (strlen($conf_exten) < 2) or (strlen($server_ip) < 7) or ($LOGast_delete_phones < 1) ) + { + echo "
VICIDIAL CONFERENCE NOT DELETED - Please go back and look at the data you entered\n"; + echo "
Conference must be at least 2 characters in length\n"; + echo "
Server IP be at least 7 characters in length\n"; + } + else + { + echo "
VICIDIAL CONFERENCE DELETION CONFIRMATION: $conf_exten - $server_ip\n"; + echo "

Click here to delete phone $conf_exten - $server_ip


\n"; + } +$ADD='31111111111111'; # go to vicidial conference 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 from a campaign +###################### + +if ($ADD==62) +{ + if ($LOGmodify_campaigns==1) + { + 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"; + } + } + else + { + echo "You do not have permission to view this page\n"; + exit; + } +$ADD='31'; # go to campaign modification below +} + + +###################### +# ADD=63 Emergency VDAC Jam Clear +###################### + +if ($ADD==63) +{ + if ($LOGmodify_campaigns==1) + { + if (eregi('IN',$stage)) + {$group_id=$campaign_id;} + echo ""; + + if (strlen($campaign_id) < 2) + { + echo "
VDAC NOT CLEARED FOR 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_auto_calls where status='LIVE' and campaign_id='$campaign_id' order by call_time 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|EMERGENCY VDAC CLEAR|$PHP_AUTH_USER|$ip|campaign_id='$campaign_id'|\n"); + fclose($fp); + } + echo "
LAST VDAC RECORD CLEARED FOR CAMPAIGN: $campaign_id\n"; + echo "

\n"; + } + } + else + { + echo "You do not have permission to view this page\n"; + exit; + } +# go to campaign modification below +if (eregi('IN',$stage)) + {$ADD='3111';} +else + {$ADD='31';} +} + + +###################### +# ADD=65 delete campaign lead recycle in the system +###################### + +if ($ADD==65) +{ + if ($LOGmodify_campaigns==1) + { + 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); + } + } + } + else + { + echo "You do not have permission to view this page\n"; + exit; + } +$ADD=31; # go to campaign modification form below +} + + +###################### +# ADD=66 delete auto alt dial status from the campaign +###################### + +if ($ADD==66) +{ + if ($LOGmodify_campaigns==1) + { + echo ""; + $stmt="SELECT count(*) from vicidial_campaigns where campaign_id='$campaign_id' and auto_alt_dial_statuses LIKE \"% $status %\";"; + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + if ($row[0] < 1) + {echo "
AUTO ALT DIAL STATUS NOT DELETED - this auto alt dial status is not in this campaign\n";} + else + { + if ( (strlen($campaign_id) < 2) or (strlen($status) < 1) ) + { + echo "
AUTO ALT DIAL STATUS 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"; + } + else + { + echo "
AUTO ALT DIAL STATUS DELETED: $campaign_id - $status\n"; + + $stmt="SELECT auto_alt_dial_statuses from vicidial_campaigns where campaign_id='$campaign_id';"; + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + + $auto_alt_dial_statuses = eregi_replace(" $status "," ",$row[0]); + $stmt="UPDATE vicidial_campaigns set auto_alt_dial_statuses='$auto_alt_dial_statuses' 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|DELETE AUTALTDIALSTTUS|$PHP_AUTH_USER|$ip|$stmt|\n"); + fclose($fp); + } + } + } + } + else + { + echo "You do not have permission to view this page\n"; + exit; + } +$ADD=31; # go to campaign modification form below +} + +###################### +# ADD=67 delete agent pause code in the system +###################### + +if ($ADD==67) +{ + if ($LOGmodify_campaigns==1) + { + echo ""; + + if ( (strlen($campaign_id) < 2) or (strlen($pause_code) < 1) ) + { + echo "
CAMPAIGN PAUSE CODE NOT DELETED - Please go back and look at the data you entered\n"; + echo "
pause code must be between 1 and 6 characters in length\n"; + } + else + { + echo "
CAMPAIGN PAUSE CODE DELETED: $campaign_id - $pause_code\n"; + + $stmt="DELETE FROM vicidial_pause_codes where campaign_id='$campaign_id' and pause_code='$pause_code';"; + $rslt=mysql_query($stmt, $link); + + ### LOG CHANGES TO LOG FILE ### + if ($WeBRooTWritablE > 0) + { + $fp = fopen ("./admin_changes_log.txt", "a"); + fwrite ($fp, "$date|DELETE AGENT PAUSECODE|$PHP_AUTH_USER|$ip|$stmt|\n"); + fclose($fp); + } + } + } + else + { + echo "You do not have permission to view this page\n"; + exit; + } +$ADD=31; # go to campaign modification form below +} + + +###################### +# ADD=68 remove campaign dial status +###################### + +if ($ADD==68) +{ + if ($LOGmodify_campaigns==1) + { + echo ""; + $stmt="SELECT count(*) from vicidial_campaigns where campaign_id='$campaign_id' and dial_statuses LIKE \"% $status %\";"; + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + if ($row[0] < 1) + {echo "
CAMPAIGN DIAL STATUS NOT REMOVED - this dial status is not selected for this campaign\n";} + else + { + if ( (strlen($campaign_id) < 2) or (strlen($status) < 1) ) + { + echo "
CAMPAIGN DIAL STATUS NOT REMOVED - Please go back and look at the data you entered\n"; + echo "
status must be between 1 and 6 characters in length\n"; + } + else + { + echo "
CAMPAIGN DIAL STATUS REMOVED: $campaign_id - $status\n"; + + $stmt="SELECT dial_statuses from vicidial_campaigns where campaign_id='$campaign_id';"; + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + + $dial_statuses = eregi_replace(" $status "," ",$row[0]); + $stmt="UPDATE vicidial_campaigns set dial_statuses='$dial_statuses' 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|DIAL STATUS REMOVED |$PHP_AUTH_USER|$ip|$stmt|\n"); + fclose($fp); + } + } + } + } + else + { + echo "You do not have permission to view this page\n"; + exit; + } +$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 state 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 +} + + +###################### +# ADD=61111111111 delete phone record +###################### + +if ($ADD==61111111111) +{ + echo ""; + + if ( (strlen($extension) < 2) or (strlen($server_ip) < 7) or ($CoNfIrM != 'YES') or ($LOGast_delete_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='10000000000'; # go to phone list +} + + +###################### +# ADD=611111111111 delete server record +###################### + +if ($ADD==611111111111) +{ + echo ""; + + if ( (strlen($server_id) < 2) or (strlen($server_ip) < 7) or ($CoNfIrM != 'YES') or ($LOGast_delete_phones < 1) ) + { + echo "
SERVER NOT DELETED - Please go back and look at the data you entered\n"; + echo "
Server ID be at least 2 characters in length\n"; + echo "
Server IP be at least 7 characters in length\n"; + } + else + { + $stmt="DELETE from servers where server_id='$server_id' 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 SERVER!!|$PHP_AUTH_USER|$ip|server_id='$server_id'|server_ip='$server_ip'|\n"); + fclose($fp); + } + echo "
SERVER DELETION COMPLETED: $server_id - $server_ip\n"; + echo "

\n"; + } +$ADD='100000000000'; # go to server list +} + + +###################### +# ADD=621111111111 delete vicidial server trunk record in the system +###################### + +if ($ADD==621111111111) +{ + if ($LOGmodify_servers==1) + { + echo ""; + + if ( (strlen($campaign_id) < 2) or (strlen($server_ip) < 7) ) + { + echo "
VICIDIAL SERVER TRUNK RECORD NOT DELETED - Please go back and look at the data you entered\n"; + echo "
campaign must be between 3 and 8 characters in length\n"; + echo "
server_ip delay must be at least 7 characters\n"; + } + else + { + echo "
VICIDIAL SERVER TRUNK RECORD DELETED: $campaign_id - $server_ip\n"; + + $stmt="DELETE FROM vicidial_server_trunks where campaign_id='$campaign_id' and server_ip='$server_ip';"; + $rslt=mysql_query($stmt, $link); + + ### LOG CHANGES TO LOG FILE ### + if ($WeBRooTWritablE > 0) + { + $fp = fopen ("./admin_changes_log.txt", "a"); + fwrite ($fp, "$date|DELETE SERVER TRUNK |$PHP_AUTH_USER|$ip|$stmt|\n"); + fclose($fp); + } + } + } + else + { + echo "You do not have permission to view this page\n"; + exit; + } +$ADD=311111111111; # go to server modification form below +} + + +###################### +# ADD=6111111111111 delete conference record +###################### + +if ($ADD==6111111111111) +{ + echo ""; + + if ( (strlen($conf_exten) < 2) or (strlen($server_ip) < 7) or ($CoNfIrM != 'YES') or ($LOGast_delete_phones < 1) ) + { + echo "
CONFERENCE NOT DELETED - Please go back and look at the data you entered\n"; + echo "
Conference be at least 2 characters in length\n"; + echo "
Server IP be at least 7 characters in length\n"; + } + else + { + $stmt="DELETE from conferences where conf_exten='$conf_exten' 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 CONF!!!!|$PHP_AUTH_USER|$ip|conf_exten='$conf_exten'|server_ip='$server_ip'|\n"); + fclose($fp); + } + echo "
CONFERENCE DELETION COMPLETED: $conf_exten - $server_ip\n"; + echo "

\n"; + } +$ADD='1000000000000'; # go to conference list +} + + +###################### +# ADD=61111111111111 delete vicidial conference record +###################### + +if ($ADD==61111111111111) +{ + echo ""; + + if ( (strlen($conf_exten) < 2) or (strlen($server_ip) < 7) or ($CoNfIrM != 'YES') or ($LOGast_delete_phones < 1) ) + { + echo "
VICIDIAL CONFERENCE NOT DELETED - Please go back and look at the data you entered\n"; + echo "
Conference be at least 2 characters in length\n"; + echo "
Server IP be at least 7 characters in length\n"; + } + else + { + $stmt="DELETE from vicidial_conferences where conf_exten='$conf_exten' 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 CONF!!!!|$PHP_AUTH_USER|$ip|conf_exten='$conf_exten'|server_ip='$server_ip'|\n"); + fclose($fp); + } + echo "
VICIDIAL CONFERENCE DELETION COMPLETED: $conf_exten - $server_ip\n"; + echo "

\n"; + } +$ADD='10000000000000'; # go to vicidial conference list +} + + + + + +###################################################################################################### +###################################################################################################### +####### 3 series, record modification forms +###################################################################################################### +###################################################################################################### + + + + +###################### +# ADD=3 modify user info in the system +###################### + +if ($ADD==3) +{ + if ($LOGmodify_users==1) + { + 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]; + $modify_users = $row[34]; + $modify_campaigns = $row[35]; + $modify_lists = $row[36]; + $modify_scripts = $row[37]; + $modify_filters = $row[38]; + $modify_ingroups = $row[39]; + $modify_usergroups = $row[40]; + $modify_remoteagents = $row[41]; + $modify_servers = $row[42]; + $view_reports = $row[43]; + $vicidial_recording_override = $row[44]; + $alter_custdata_override = $row[45]; + + 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"; + 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"; + 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
Hot Keys 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
VICIDIAL Recording Override: $NWB#vicidial_users-vicidial_recording_override$NWE
Agent Alter Customer Data Override: $NWB#vicidial_users-alter_custdata_override$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
Modify Users: $NWB#vicidial_users-modify_sections$NWE
Modify Campaigns: $NWB#vicidial_users-modify_sections$NWE
Modify Lists: $NWB#vicidial_users-modify_sections$NWE
Modify Scripts: $NWB#vicidial_users-modify_sections$NWE
Modify Filters: $NWB#vicidial_users-modify_sections$NWE
Modify In-Groups: $NWB#vicidial_users-modify_sections$NWE
Modify User Groups: $NWB#vicidial_users-modify_sections$NWE
Modify Remote Agents: $NWB#vicidial_users-modify_sections$NWE
Modify Servers: $NWB#vicidial_users-modify_sections$NWE
View Reports: $NWB#vicidial_users-view_reports$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"; + } + } + else + { + echo "You do not have permission to view this page\n"; + exit; + } +} + + +###################### +# 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) and ( (!eregi("$campaign_id",$LOGallowed_campaigns)) and (!eregi("ALL-CAMPAIGNS",$LOGallowed_campaigns)) ) ) + {$ADD=30;} # send to not allowed screen if not in vicidial_user_groups allowed_campaigns list + +if ($ADD==31) +{ + if ($LOGmodify_users==1) + { + 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); + $campaign_name = $row[1]; + $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]; + $allcalls_delay = $row[44]; + $omit_phone_code = $row[45]; + $dial_method = $row[46]; + $available_only_ratio_tally = $row[47]; + $adaptive_dropped_percentage = $row[48]; + $adaptive_maximum_level = $row[49]; + $adaptive_latest_server_time = $row[50]; + $adaptive_intensity = $row[51]; + $adaptive_dl_diff_target = $row[52]; + $concurrent_transfers = $row[53]; + $auto_alt_dial = $row[54]; + $auto_alt_dial_statuses = $row[55]; + $agent_pause_codes_active = $row[56]; + $campaign_description = $row[57]; + $campaign_changedate = $row[58]; + $campaign_stats_refresh = $row[59]; + $campaign_logindate = $row[60]; + $dial_statuses = $row[61]; + $disable_alter_custdata = $row[62]; + $no_hopper_leads_logins = $row[63]; + + echo "
MODIFY A CAMPAIGNS RECORD: $row[0] - Basic View"; + echo " | Detail View | "; + echo "Real-Time 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"; + + $stmt="SELECT * from vicidial_statuses order by status"; + $rslt=mysql_query($stmt, $link); + $statuses_to_print = mysql_num_rows($rslt); + $statuses_list=''; + + $o=0; + while ($statuses_to_print > $o) + { + $rowx=mysql_fetch_row($rslt); + $statuses_list .= "\n"; + $statname_list["$rowx[0]"] = "$rowx[1]"; + $LRstatuses_list .= "\n"; + if (eregi("Y",$rowx[2])) + {$HKstatuses_list .= "\n";} + $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 .= "\n"; + $statname_list["$rowx[0]"] = "$rowx[1]"; + $LRstatuses_list .= "\n"; + if (eregi("Y",$rowx[2])) + {$HKstatuses_list .= "\n";} + $o++; + } + + $dial_statuses = preg_replace("/ -$/","",$dial_statuses); + $Dstatuses = explode(" ", $dial_statuses); + $Ds_to_print = (count($Dstatuses) -1); + + $o=0; + while ($Ds_to_print > $o) + { + $o++; + $Dstatus = $Dstatuses[$o]; + + echo "\n"; + } + + echo "\n"; + + echo "\n"; + + echo "\n"; + + echo "\n"; + + echo "\n"; + + echo "\n"; + + echo "\n"; + + echo "\n"; + + echo "\n"; + + echo "\n"; + + echo "\n"; + + echo "\n"; + + + + echo "\n"; + + echo "\n"; + + + echo "\n"; + + echo "\n"; + + echo "\n"; + + echo "\n"; + + echo "\n"; + + echo "\n"; + + echo "\n"; + + echo "\n"; + + echo "\n"; + + echo "\n"; + + echo "\n"; + + echo "\n"; + + echo "\n"; + + echo "\n"; + + echo "\n"; + + echo "\n"; + + echo "\n"; + + echo "\n"; + + echo "\n"; + + echo "\n"; + + echo "\n"; + + 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|BLEND|INBND|_C$|_B$|_I$)", $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
Campaign Description: $NWB#vicidial_campaigns-campaign_description$NWE
Campaign Change Date: $campaign_changedate   $NWB#vicidial_campaigns-campaign_changedate$NWE
Campaign Login Date: $campaign_logindate   $NWB#vicidial_campaigns-campaign_logindate$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 $o: \n"; + echo "$Dstatus - $statname_list[$Dstatus]         \n"; + echo "REMOVE
Add A Dial Status:   \n"; + echo "     $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
Dial Method: $NWB#vicidial_campaigns-dial_method$NWE
Auto Dial Level: (0 = off)$NWB#vicidial_campaigns-auto_dial_level$NWE       ADAPT OVERRIDE
Available Only Tally: $NWB#vicidial_campaigns-available_only_ratio_tally$NWE
Drop Percentage Limit: % $NWB#vicidial_campaigns-adaptive_dropped_percentage$NWE
Maximum Adapt Dial Level: number only $NWB#vicidial_campaigns-adaptive_maximum_level$NWE
Latest Server Time: 4 digits only $NWB#vicidial_campaigns-adaptive_latest_server_time$NWE
Adapt Intensity Modifier: $NWB#vicidial_campaigns-adaptive_intensity$NWE
Dial Level Difference Target: $NWB#vicidial_campaigns-adaptive_dl_diff_target$NWE
Concurrent Transfers: $NWB#vicidial_campaigns-concurrent_transfers$NWE
Auto Alt-Number Dialing: $NWB#vicidial_campaigns-auto_alt_dial$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
Omit Phone Code: $NWB#vicidial_campaigns-omit_phone_code$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
Recording Delay: in seconds$NWB#vicidial_campaigns-allcalls_delay$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
Wrap Up Seconds: $NWB#vicidial_campaigns-wrapup_seconds$NWE
Wrap Up Message: $NWB#vicidial_campaigns-wrapup_message$NWE
Use Internal DNC List: $NWB#vicidial_campaigns-use_internal_dnc$NWE
Agent Pause Codes Active: $NWB#vicidial_campaigns-agent_pause_codes_active$NWE
Campaign Stats Refresh: $NWB#vicidial_campaigns-campaign_stats_refresh$NWE
Disable Alter Customer Data: $NWB#vicidial_campaigns-disable_alter_custdata$NWE
Allow No-Hopper-Leads Logins: $NWB#vicidial_campaigns-no_hopper_leads_logins$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_statuses,$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 "Click here to see a VDAD report for 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 HOT KEYS 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 "
HOT KEYSTATUSDESCRIPTIONDELETE
$rowx[1]$rowx[0]$rowx[2]DELETE
\n"; + + echo "
ADD NEW CUSTOM CAMPAIGN HOT KEY
\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 "

AUTO ALT NUMBER DIALING FOR THIS CAMPAIGN:   $NWB#vicidial_auto_alt_dial_statuses$NWE
\n"; + echo "\n"; + echo "\n"; + + $auto_alt_dial_statuses = preg_replace("/ -$/","",$auto_alt_dial_statuses); + $AADstatuses = explode(" ", $auto_alt_dial_statuses); + $AADs_to_print = (count($AADstatuses) -1); + + $o=0; + while ($AADs_to_print > $o) + { + if (eregi("1$|3$|5$|7$|9$", $o)) + {$bgcolor='bgcolor="#B9CBFD"';} + else + {$bgcolor='bgcolor="#9BB9FB"';} + $o++; + + echo "\n"; + echo "\n"; + } + + echo "
STATUSESDELETE
$AADstatuses[$o]DELETE
\n"; + + echo "
ADD NEW AUTO ALT NUMBER DIALING STATUS
\n"; + echo "\n"; + echo "\n"; + echo "Status:   \n"; + echo "
\n"; + + echo "

\n"; + + + + echo "

AGENT PAUSE CODES FOR THIS CAMPAIGN:   $NWB#vicidial_pause_codes$NWE
\n"; + echo "\n"; + echo "\n"; + + $stmt="SELECT * from vicidial_pause_codes where campaign_id='$campaign_id' order by pause_code"; + $rslt=mysql_query($stmt, $link); + $pause_codes_to_print = mysql_num_rows($rslt); + $o=0; + while ($pause_codes_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 "
PAUSE CODESBILLABLEMODIFYDELETE
$rowx[0]\n"; + echo "\n"; + echo "\n"; + echo "  \n"; + echo "
DELETE
\n"; + + echo "
ADD NEW AGENT PAUSE CODE
\n"; + echo "\n"; + echo "\n"; + echo "Pause Code: \n"; + echo "Pause Code Name: \n"; + echo "   Billable: \n"; + echo "
\n"; + + echo "

\n"; + + + + + + + echo "

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

\n"; + echo "EMERGENCY VDAC CLEAR FOR THIS CAMPAIGN

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

DELETE THIS CAMPAIGN\n"; + } + } + else + { + echo "You do not have permission to view this page\n"; + exit; + } +} + + +###################### +# ADD=34 modify campaign info in the system - Basic View +###################### + +if ( ($ADD==34) and ( (!eregi("$campaign_id",$LOGallowed_campaigns)) and (!eregi("ALL-CAMPAIGNS",$LOGallowed_campaigns)) ) ) + {$ADD=30;} # send to not allowed screen if not in vicidial_user_groups allowed_campaigns list + +if ($ADD==34) +{ + if ($LOGmodify_campaigns==1) + { + 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]; + $dial_method = $row[46]; + $adaptive_intensity = $row[51]; + $campaign_description = $row[57]; + $campaign_changedate = $row[58]; + $campaign_stats_refresh = $row[59]; + $campaign_logindate = $row[60]; + $dial_statuses = $row[61]; + + echo "
MODIFY A CAMPAIGN'S RECORD: $row[0] - Basic View | "; + echo "Detail View | "; + echo "Real-Time 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"; + + $stmt="SELECT * from vicidial_statuses order by status"; + $rslt=mysql_query($stmt, $link); + $statuses_to_print = mysql_num_rows($rslt); + $statuses_list=''; + + $o=0; + while ($statuses_to_print > $o) + { + $rowx=mysql_fetch_row($rslt); + $statuses_list .= "\n"; + $statname_list["$rowx[0]"] = "$rowx[1]"; + $LRstatuses_list .= "\n"; + if (eregi("Y",$rowx[2])) + {$HKstatuses_list .= "\n";} + $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 .= "\n"; + $statname_list["$rowx[0]"] = "$rowx[1]"; + $LRstatuses_list .= "\n"; + if (eregi("Y",$rowx[2])) + {$HKstatuses_list .= "\n";} + $o++; + } + + $dial_statuses = preg_replace("/ -$/","",$dial_statuses); + $Dstatuses = explode(" ", $dial_statuses); + $Ds_to_print = (count($Dstatuses) -1); + + $o=0; + while ($Ds_to_print > $o) + { + $o++; + $Dstatus = $Dstatuses[$o]; + + echo "\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
Campaign Description: $NWB#vicidial_campaigns-campaign_description$NWE
Campaign Change Date: $campaign_changedate   $NWB#vicidial_campaigns-campaign_changedate$NWE
Campaign Login Date: $campaign_logindate   $NWB#vicidial_campaigns-campaign_logindate$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 $o: \n"; + echo "$Dstatus - $statname_list[$Dstatus]         \n"; + echo "REMOVE
Add A Dial Status:   \n"; + echo "     $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
Dial Method: $NWB#vicidial_campaigns-dial_method$NWE
Auto Dial Level: (0 = off)$NWB#vicidial_campaigns-auto_dial_level$NWE
Adapt Intensity Modifier: $NWB#vicidial_campaigns-adaptive_intensity$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_statuses,$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 "Click here to see a VDAD report for 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"; + } + } + else + { + echo "You do not have permission to view this page\n"; + exit; + } +} + + +###################### +# ADD=31 campaign not allowed +###################### + +if ($ADD==30) +{ +echo "
\n"; + echo ""; +echo "You do not have permission to view campaign $campaign_id\n"; +} + + + +###################### +# ADD=311 modify list info in the system +###################### + +if ($ADD==311) +{ + if ($LOGmodify_lists==1) + { + 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]; + $list_description = $row[4]; + $list_changedate = $row[5]; + $list_lastcalldate = $row[6]; + + # 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 "\n"; + echo "\n"; + echo "\n"; + echo "
List ID: $row[0]$NWB#vicidial_lists-list_id$NWE
List Name: $NWB#vicidial_lists-list_name$NWE
List Description: $NWB#vicidial_lists-list_description$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
List Change Date: $list_changedate   $NWB#vicidial_lists-list_changedate$NWE
List Last Call Date: $list_lastcalldate   $NWB#vicidial_lists-list_lastcalldate$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"; + + echo "

Click here to see all CallBack Holds in this list

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

DELETE THIS LIST\n"; + } + } + else + { + echo "You do not have permission to view this page\n"; + exit; + } +} + + + +###################### +# ADD=3111 modify in-group info in the system +###################### + +if ($ADD==3111) +{ + if ($LOGmodify_ingroups==1) + { + 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 "Click here to see a report for this campaign

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

EMERGENCY VDAC CLEAR FOR THIS IN-GROUP

\n"; + echo "

DELETE THIS IN-GROUP\n"; + } + } + else + { + echo "You do not have permission to view this page\n"; + exit; + } +} + + + +###################### +# ADD=31111 modify remote agents info in the system +###################### + +if ($ADD==31111) +{ + if ($LOGmodify_remoteagents==1) + { + 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: (dial plan 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"; + } + } + else + { + echo "You do not have permission to view this page\n"; + exit; + } +} + + +###################### +# ADD=311111 modify user group info in the system +###################### + +if ($ADD==311111) +{ + if ($LOGmodify_usergroups==1) + { + 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 "\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
Allowed Campaigns: \n"; + echo "$campaigns_list"; + echo "$NWB#vicidial_user_groups-allowed_campaigns$NWE
\n"; + + + ### list of users in this user group + + $active_confs = 0; + $stmt="SELECT user,full_name,user_level from vicidial_users where user_group='$user_group'"; + $rsltx=mysql_query($stmt, $link); + $users_to_print = mysql_num_rows($rsltx); + + echo "
\n"; + echo "
USERS WITHIN THIS USER GROUP: $users_to_print
\n"; + echo "\n"; + echo "\n"; + + $o=0; + while ($users_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 "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + } + + echo "
USERFULL NAMELEVEL
$rowx[0]$rowx[1]$rowx[2]

\n"; + + + + echo "

Click here to see all CallBack Holds in this user group

\n"; + + if ($LOGdelete_user_groups > 0) + { + echo "

DELETE THIS USER GROUP\n"; + } + } + else + { + echo "You do not have permission to view this page\n"; + exit; + } +} + + +###################### +# ADD=3111111 modify script info in the system +###################### + +if ($ADD==3111111) +{ + if ($LOGmodify_scripts==1) + { + 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
"; + # BEGIN Insert Field + echo ""; + echo "
"; + # END Insert Field + echo " $NWB#vicidial_scripts-script_text$NWE
\n"; + + if ($LOGdelete_scripts > 0) + { + echo "

DELETE THIS SCRIPT\n"; + } + } + else + { + echo "You do not have permission to view this page\n"; + exit; + } +} + + +###################### +# ADD=31111111 modify filter info in the system +###################### + +if ($ADD==31111111) +{ + if ($LOGmodify_filters==1) + { + 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"; + } + } + else + { + echo "You do not have permission to view this page\n"; + exit; + } +} + + +###################### +# 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=31111111111 modify phone record in the system +###################### + +if ($ADD==31111111111) +{ + if ($LOGast_admin_access==1) + { + echo "
\n"; + 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 "\n"; + echo "
Phone extension: $NWB#phones-extension$NWE
Dial Plan 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 Hang Up: $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
Enable SIPSAK Messages: $NWB#phones-enable_sipsak_messages$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 ($LOGast_delete_phones > 0) + { + echo "

DELETE THIS PHONE\n"; + } + } + else + { + echo "You do not have permission to view this page\n"; + exit; + } +} + + +###################### +# ADD=311111111111 modify server record in the system +###################### + +if ($ADD==311111111111) +{ + if ($LOGmodify_servers==1) + { + echo "
\n"; + echo ""; + + $stmt="SELECT * from servers where server_id='$server_id' or server_ip='$server_ip';"; + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + $server_id = $row[0]; + $server_ip = $row[2]; + + 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 "\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
VICIDIAL Balance Dialing: $NWB#servers-vicidial_balance_active$NWE
VICIDIAL Balance Offlimits: $NWB#servers-balance_trunks_offlimits$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
System Performance: $NWB#servers-sys_perf_log$NWE
Server Logs: $NWB#servers-vd_server_logs$NWE
AGI Output: $NWB#servers-agi_output$NWE
\n"; + + + ### vicidial server trunk records for this server + echo "

VICIDIAL TRUNKS FOR THIS SERVER:   $NWB#vicidial_server_trunks$NWE
\n"; + echo "\n"; + echo "\n"; + + $stmt="SELECT * from vicidial_server_trunks where server_ip='$server_ip' order by campaign_id"; + $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 "
CAMPAIGN TRUNKS RESTRICTION DELETE
$rowx[1]
\n"; + echo "\n"; + echo "\n"; + echo "
DELETE
\n"; + + echo "
ADD NEW SERVER VICIDIAL TRUNK RECORD
\n"; + echo "\n"; + echo "\n"; + echo "TRUNKS:
\n"; + echo "CAMPAIGN:
\n"; + echo "RESTRICTION:
\n"; + echo "
\n"; + + echo "

\n"; + + + ### list of phones on this server + echo "
\n"; + echo "
PHONES WITHIN THIS SERVER:
\n"; + echo "\n"; + echo "\n"; + + $active_phones = 0; + $inactive_phones = 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_phones++; $camp_lists .= "'$rowx[0]',";} + if (ereg("N", $rowx[1])) {$inactive_phones++;} + + 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"; + + + ### list of conferences on this server + echo "
\n"; + echo "
CONFERENCES WITHIN THIS SERVER:
\n"; + echo "\n"; + echo "\n"; + + $active_confs = 0; + $stmt="SELECT conf_exten,extension from conferences 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++; + $active_confs++; + + if (eregi("1$|3$|5$|7$|9$", $o)) + {$bgcolor='bgcolor="#B9CBFD"';} + else + {$bgcolor='bgcolor="#9BB9FB"';} + + echo "\n"; + } + + echo "
CONFERENCEEXTENSION
$rowx[0]$rowx[2]

\n"; + + + ### list of vicidial conferences on this server + echo "
\n"; + echo "
VICIDIAL CONFERENCES WITHIN THIS SERVER:
\n"; + echo "\n"; + echo "\n"; + + $active_vdconfs = 0; + $stmt="SELECT conf_exten,extension from vicidial_conferences 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++; + $active_vdconfs++; + + if (eregi("1$|3$|5$|7$|9$", $o)) + {$bgcolor='bgcolor="#B9CBFD"';} + else + {$bgcolor='bgcolor="#9BB9FB"';} + + echo "\n"; + } + + echo "
VD CONFERENCEEXTENSION
$rowx[0]$rowx[2]

\n"; + + + echo "
\n"; + + $camp_lists = eregi_replace(".$","",$camp_lists); + echo "This server has $active_phones active phones and $inactive_phones inactive phones

\n"; + echo "This server has $active_confs active conferences

\n"; + echo "This server has $active_vdconfs active vicidial conferences

\n"; + echo "
\n"; + if ($LOGast_delete_phones > 0) + { + echo "

DELETE THIS SERVER\n"; + } + } + else + { + echo "You do not have permission to view this page\n"; + exit; + } +} + + +###################### +# ADD=3111111111111 modify conference record in the system +###################### + +if ($ADD==3111111111111) +{ + if ($LOGast_admin_access==1) + { + echo "
\n"; + 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); + $conf_exten = $row[0]; + $server_ip = $row[1]; + + 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"; + if ($LOGast_delete_phones > 0) + { + echo "

DELETE THIS CONFERENCE\n"; + } + } + else + { + echo "You do not have permission to view this page\n"; + exit; + } +} + + +###################### +# ADD=31111111111111 modify vicidial conference record in the system +###################### + +if ($ADD==31111111111111) +{ + if ($LOGast_admin_access==1) + { + echo "
\n"; + echo ""; + + $stmt="SELECT * from vicidial_conferences where conf_exten='$conf_exten' and server_ip='$server_ip';"; + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + $conf_exten = $row[0]; + $server_ip = $row[1]; + + echo "
MODIFY A VICIDIAL 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"; + if ($LOGast_delete_phones > 0) + { + echo "

DELETE THIS VICIDIAL CONFERENCE\n"; + } + } + else + { + echo "You do not have permission to view this page\n"; + exit; + } +} + + + +###################### +# ADD=311111111111111 modify vicidial system settings +###################### + +if ($ADD==311111111111111) +{ + if ($LOGmodify_servers==1) + { + echo "
\n"; + echo ""; + + $stmt="SELECT version,install_date,use_non_latin,webroot_writable,enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_url,queuemetrics_log_id,queuemetrics_eq_prepend,vicidial_agent_disable,allow_sipsak_messages,admin_home_url from system_settings;"; + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + $version = $row[0]; + $install_date = $row[1]; + $use_non_latin = $row[2]; + $webroot_writable = $row[3]; + $enable_queuemetrics_logging = $row[4]; + $queuemetrics_server_ip = $row[5]; + $queuemetrics_dbname = $row[6]; + $queuemetrics_login = $row[7]; + $queuemetrics_pass = $row[8]; + $queuemetrics_url = $row[9]; + $queuemetrics_log_id = $row[10]; + $queuemetrics_eq_prepend = $row[11]; + $vicidial_agent_disable = $row[12]; + $allow_sipsak_messages = $row[13]; + $admin_home_url = $row[14]; + + echo "
MODIFY VICIDIAL SYSTEM SETTINGS\n"; + echo "\n"; + echo "
\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + + echo "\n"; + echo "
Version: $version
Install Date: $install_date
Use Non-Latin: $NWB#settings-use_non_latin$NWE
Webroot Writable: $NWB#settings-webroot_writable$NWE
Enable QueueMetrics Logging: $NWB#settings-enable_queuemetrics_logging$NWE
QueueMetrics Server IP: $NWB#settings-queuemetrics_server_ip$NWE
QueueMetrics DB Name: $NWB#settings-queuemetrics_dbname$NWE
QueueMetrics DB Login: $NWB#settings-queuemetrics_login$NWE
QueueMetrics DB Password: $NWB#settings-queuemetrics_pass$NWE
QueueMetrics URL: $NWB#settings-queuemetrics_url$NWE
QueueMetrics Log ID: $NWB#settings-queuemetrics_log_id$NWE
QueueMetrics EnterQueue Prepend: $NWB#settings-queuemetrics_eq_prepend$NWE
VICIDIAL Agent Disable Display: $NWB#settings-vicidial_agent_disable$NWE
Allow SIPSAK Messages: $NWB#settings-allow_sipsak_messages$NWE
Admin Home URL: $NWB#settings-admin_home_url$NWE
\n"; + + echo "
\n"; + } + else + { + echo "You do not have permission to view this page\n"; + exit; + } +} + + + + + + + +###################### +# ADD=550 search form +###################### + +if ($ADD==550) +{ +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=660 user search results +###################### + +if ($ADD==660) +{ +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=8111 find all callbacks on hold within a user group +###################### +if ($ADD==8111) +{ + echo ""; + + $stmt="SELECT * from vicidial_callbacks where status IN('ACTIVE','LIVE') and user_group='$user_group' order by recipient,status desc,callback_time"; + $rslt=mysql_query($stmt, $link); + $cb_to_print = mysql_num_rows($rslt); + +echo "
USER GROUP 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 ""; + echo "\n"; + $o++; + } + +echo "
LEADLIST CAMPAIGNENTRY DATECALLBACK DATEUSERRECIPIENTSTATUSGROUP
$row[1]$row[2]$row[3]$row[5]$row[6]$row[8]$row[9]$row[4]$row[11]
\n"; +} + + + +###################################################################################################### +###################################################################################################### +####### 0 series, displays and searches +###################################################################################################### +###################################################################################################### + +###################### +# ADD=0 display all active users +###################### +if ($ADD==0) +{ +echo "
\n"; +echo ""; + +$USERlink='stage=USERIDDOWN'; +$NAMElink='stage=NAMEDOWN'; +$LEVELlink='stage=LEVELDOWN'; +$GROUPlink='stage=GROUPDOWN'; +$SQLorder='order by full_name'; +if (eregi("USERIDUP",$stage)) {$SQLorder='order by user asc'; $USERlink='stage=USERIDDOWN';} +if (eregi("USERIDDOWN",$stage)) {$SQLorder='order by user desc'; $USERlink='stage=USERIDUP';} +if (eregi("NAMEUP",$stage)) {$SQLorder='order by full_name asc'; $NAMElink='stage=NAMEDOWN';} +if (eregi("NAMEDOWN",$stage)) {$SQLorder='order by full_name desc'; $NAMElink='stage=NAMEUP';} +if (eregi("LEVELUP",$stage)) {$SQLorder='order by user_level asc'; $LEVELlink='stage=LEVELDOWN';} +if (eregi("LEVELDOWN",$stage)) {$SQLorder='order by user_level desc'; $LEVELlink='stage=LEVELUP';} +if (eregi("GROUPUP",$stage)) {$SQLorder='order by user_group asc'; $GROUPlink='stage=GROUPDOWN';} +if (eregi("GROUPDOWN",$stage)) {$SQLorder='order by user_group desc'; $GROUPlink='stage=GROUPUP';} + $stmt="SELECT * from vicidial_users $SQLorder"; + $rslt=mysql_query($stmt, $link); + $people_to_print = mysql_num_rows($rslt); + +echo "
USER LISTINGS:\n"; +echo "
\n"; +echo ""; +echo ""; +echo ""; +echo ""; +echo ""; +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 "
USER IDFULL NAMELEVELGROUPLINKS
$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 ""; + + $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"; +} + +###################### +# ADD=10000000000 display all phones +###################### +if ($ADD==10000000000) +{ +echo "
\n"; +echo ""; + +$EXTENlink='stage=EXTENDOWN'; +$PROTOlink='stage=PROTODOWN'; +$SERVERlink='stage=SERVERDOWN'; +$STATUSlink='stage=STATUSDOWN'; +$SQLorder='order by extension,server_ip'; +if (eregi("EXTENUP",$stage)) {$SQLorder='order by extension asc'; $EXTENlink='stage=EXTENDOWN';} +if (eregi("EXTENDOWN",$stage)) {$SQLorder='order by extension desc'; $EXTENlink='stage=EXTENUP';} +if (eregi("PROTOUP",$stage)) {$SQLorder='order by protocol asc'; $PROTOlink='stage=PROTODOWN';} +if (eregi("PROTODOWN",$stage)) {$SQLorder='order by protocol desc'; $PROTOlink='stage=PROTOUP';} +if (eregi("SERVERUP",$stage)) {$SQLorder='order by server_ip asc'; $SERVERlink='stage=SERVERDOWN';} +if (eregi("SERVERDOWN",$stage)) {$SQLorder='order by server_ip desc'; $SERVERlink='stage=SERVERUP';} +if (eregi("STATUSUP",$stage)) {$SQLorder='order by status asc'; $STATUSlink='stage=STATUSDOWN';} +if (eregi("STATUSDOWN",$stage)) {$SQLorder='order by status desc'; $STATUSlink='stage=STATUSUP';} + $stmt="SELECT * from phones $SQLorder"; + $rslt=mysql_query($stmt, $link); + $phones_to_print = mysql_num_rows($rslt); + +echo "
PHONE LISTINGS:\n"; +echo "
\n"; +echo ""; +echo ""; +echo ""; +echo ""; +echo ""; +echo ""; +echo ""; +echo ""; +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 "
EXTENPROTOSERVERDIAL PLANSTATUSNAMEVMAILLINKS
$row[0]$row[16]$row[5]$row[1]$row[2]$row[8]$row[11]$row[14]$row[15]MODIFY | STATS
\n"; +} + +###################### +# ADD=100000000000 display all servers +###################### +if ($ADD==100000000000) +{ +echo "\n"; echo ""; echo ""; echo ""; echo ""; -echo ""; +echo ""; echo ""; echo ""; @@ -401,9 +436,13 @@ echo "\n\n"; ################################################################################### ###### OUTBOUND CALLS ################################################################################### -if (eregi("CLOSER",$group)) +if (eregi("(CLOSER|BLEND|INBND|_C$|_B$|_I$)",$group)) { $stmt="select closer_campaigns from vicidial_campaigns where campaign_id='" . mysql_real_escape_string($group) . "';"; +if ($non_latin > 0) +{ +$rslt=mysql_query("SET NAMES 'UTF8'"); +} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $closer_campaigns = preg_replace("/^ | -$/","",$row[0]); @@ -419,6 +458,10 @@ else $stmt="select status from vicidial_auto_calls where status NOT IN('XFER') $groupSQL;"; } +if ($non_latin > 0) +{ +$rslt=mysql_query("SET NAMES 'UTF8'"); +} $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $parked_to_print = mysql_num_rows($rslt); @@ -450,7 +493,7 @@ $parked_to_print = mysql_num_rows($rslt); if ($out_live > 9) {$F=''; $FG='';} if ($out_live > 14) {$F=''; $FG='';} - if (eregi("CLOSER",$group)) + if (eregi("(CLOSER|BLEND|INBND|_C$|_B$|_I$)",$group)) {echo "$NFB$out_total$NFE current active calls      \n";} else {echo "$NFB$out_total$NFE calls being placed       \n";} @@ -489,8 +532,8 @@ $HDsessionid = "------------------+"; $HTsessionid = " SESSIONID |"; $HDbarge = "-------+"; $HTbarge = " BARGE |"; -$HDstatus = "--------+"; -$HTstatus = " STATUS |"; +$HDstatus = "----------+"; +$HTstatus = " STATUS |"; $HDserver_ip = "-----------------+"; $HTserver_ip = " BEDIENERIP |"; $HDcall_server_ip = "-----------------+"; @@ -553,10 +596,14 @@ else {$groupSQL = " and campaign_id='" . mysql_real_escape_string($group) . "'"; if (strlen($usergroup)<1) {$usergroupSQL = '';} else {$usergroupSQL = " and user_group='" . mysql_real_escape_string($usergroup) . "'";} -$stmt="select extension,vicidial_live_agents.user,conf_exten,status,server_ip,UNIX_TIMESTAMP(last_call_time),UNIX_TIMESTAMP(last_call_finish),call_server_ip,campaign_id,vicidial_users.user_group,vicidial_users.full_name from vicidial_live_agents,vicidial_users where vicidial_live_agents.user=vicidial_users.user $groupSQL $usergroupSQL order by $orderSQL;"; +$stmt="select extension,vicidial_live_agents.user,conf_exten,status,server_ip,UNIX_TIMESTAMP(last_call_time),UNIX_TIMESTAMP(last_call_finish),call_server_ip,campaign_id,vicidial_users.user_group,vicidial_users.full_name,vicidial_live_agents.comments from vicidial_live_agents,vicidial_users where vicidial_live_agents.user=vicidial_users.user $groupSQL $usergroupSQL order by $orderSQL;"; #$stmt="select extension,vicidial_live_agents.user,conf_exten,status,server_ip,UNIX_TIMESTAMP(last_call_time),UNIX_TIMESTAMP(last_call_finish),call_server_ip,campaign_id,vicidial_users.user_group,vicidial_users.full_name from vicidial_live_agents,vicidial_users where vicidial_live_agents.user=vicidial_users.user and campaign_id='" . mysql_real_escape_string($group) . "' order by $orderSQL;"; +if ($non_latin > 0) +{ +$rslt=mysql_query("SET NAMES 'UTF8'"); +} $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $talking_to_print = mysql_num_rows($rslt); @@ -571,9 +618,18 @@ $talking_to_print = mysql_num_rows($rslt); { $row[5]=$row[6]; } - $extension = eregi_replace('Local/',"",$row[0]); - $extension = sprintf("%-10s", $extension); + if ($non_latin < 1) + { + $extension = eregi_replace('Local/',"",$row[0]); + $extension = sprintf("%-10s", $extension); while(strlen($extension)>10) {$extension = substr("$extension", 0, -1);} + } + else + { + $extension = eregi_replace('Local/',"",$row[0]); + $extension = sprintf("%-40s", $extension); + while(mb_strlen($extension, 'utf-8')>10) {$extension = mb_substr("$extension", 0, -1,'utf8');} + } $Luser = $row[1]; $user = sprintf("%-18s", $row[1]); $Lsessionid = $row[2]; @@ -582,16 +638,48 @@ $talking_to_print = mysql_num_rows($rslt); $status = sprintf("%-6s", $row[3]); $server_ip = sprintf("%-15s", $row[4]); $call_server_ip = sprintf("%-15s", $row[7]); - $campaign_id = sprintf("%-10s", $row[8]); + $campaign_id = sprintf("%-10s", $row[8]); + $comments= $row[11]; + + if (eregi("INCALL",$Lstatus)) + { + if ( (eregi("AUTO",$comments)) or (strlen($comments)<1) ) + {$CM='A';} + else + { + if (eregi("INBOUND",$comments)) + {$CM='I';} + else + {$CM='M';} + } + } + else {$CM=' ';} + if ($UGdisplay > 0) { - $user_group = sprintf("%-12s", $row[9]); + if ($non_latin < 1) + { + $user_group = sprintf("%-12s", $row[9]); while(strlen($user_group)>12) {$user_group = substr("$user_group", 0, -1);} + } + else + { + $user_group = sprintf("%-40s", $row[9]); + while(mb_strlen($user_group, 'utf-8')>12) {$user_group = mb_substr("$user_group", 0, -1,'utf8');} + } } if ($UidORname > 0) { - $user = sprintf("%-18s", $row[10]); + if ($non_latin < 1) + { + $user = sprintf("%-18s", $row[10]); while(strlen($user)>18) {$user = substr("$user", 0, -1);} + } + else + { + $user = sprintf("%-40s", $row[10]); + while(mb_strlen($user, 'utf-8')>18) {$user = mb_substr("$user", 0, -1,'utf8');} + } } if (!eregi("INCALL|QUEUE",$row[3])) {$call_time_S = ($STARTtime - $row[6]);} @@ -655,7 +743,7 @@ $talking_to_print = mysql_num_rows($rslt); $agentcount++; - $Aecho .= "| $G$extension$EG | $G$user$EG |$UGD $G$sessionid$EG$L$R | $G$status$EG | $SVD$G$call_time_MS$EG | $G$campaign_id$EG |\n"; + $Aecho .= "| $G$extension$EG | $G$user$EG |$UGD $G$sessionid$EG$L$R | $G$status$EG $CM | $SVD$G$call_time_MS$EG | $G$campaign_id$EG |\n"; $i++; } diff --git a/agc_2-X/trunk/LANG_www/vicidial_de/AST_timeonVDADallSUMMARY.php b/agc_2-X/trunk/LANG_www/vicidial_de/AST_timeonVDADallSUMMARY.php index dcae6abd..7c675ea6 100644 --- a/agc_2-X/trunk/LANG_www/vicidial_de/AST_timeonVDADallSUMMARY.php +++ b/agc_2-X/trunk/LANG_www/vicidial_de/AST_timeonVDADallSUMMARY.php @@ -9,6 +9,8 @@ # # changes: # 61102-1616 - first build +# 61215-1131 - added answered calls and drop percent taken from answered calls +# 70111-1600 - added ability to use BLEND/INBND/*_C/*_B/*_I as closer campaigns # header ("Content-type: text/html; charset=utf-8"); @@ -35,7 +37,7 @@ if (!isset($RR)) {$gRRroup=4;} $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;"; + $stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 6 and view_reports='1';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); @@ -114,7 +116,7 @@ else { echo "- VIEW LESS SETTINGS"; } -echo "       REPORTS"; +echo "       REPORTS"; echo "

\n\n"; $k=0; @@ -128,7 +130,7 @@ $group = $groups[$k]; echo "$group   -   "; echo "Modify\n"; -$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,dial_method,adaptive_maximum_level,adaptive_dropped_percentage,adaptive_dl_diff_target,adaptive_intensity,available_only_ratio_tally,adaptive_latest_server_time,local_call_time,dial_timeout from vicidial_campaigns where campaign_id='" . mysql_real_escape_string($group) . "';"; +$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,dial_method,adaptive_maximum_level,adaptive_dropped_percentage,adaptive_dl_diff_target,adaptive_intensity,available_only_ratio_tally,adaptive_latest_server_time,local_call_time,dial_timeout,dial_statuses from vicidial_campaigns where campaign_id='" . mysql_real_escape_string($group) . "';"; $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $DIALlev = $row[0]; @@ -149,6 +151,9 @@ $ADAavailonly = $row[14]; $TAPERtime = $row[15]; $CALLtime = $row[16]; $DIALtimeout = $row[17]; +$DIALstatuses = $row[18]; + $DIALstatuses = (preg_replace("/ -$|^ /","",$DIALstatuses)); + $DIALstatuses = (ereg_replace(' ',', ',$DIALstatuses)); $stmt="select count(*) from vicidial_hopper where campaign_id='" . mysql_real_escape_string($group) . "';"; $rslt=mysql_query($stmt, $link); @@ -214,7 +219,7 @@ echo ""; echo ""; echo ""; echo ""; -echo ""; +echo ""; echo ""; echo ""; @@ -240,7 +245,7 @@ echo "\n";echo "\n";?> -
-
\n"; + 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=1000000000000 display all conferences +###################### +if ($ADD==1000000000000) +{ +echo " - + @@ -872,6 +873,7 @@ if ($leadfile and filesize($LF_path)<=8388608) { } + if (strlen($phone_code)<1) {$phone_code = '1';} 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);"; diff --git a/agc_2-X/trunk/LANG_www/vicidial/listloader.pl b/agc_2-X/trunk/LANG_www/vicidial/listloader.pl index b15bfbb8..f93b4520 100644 --- a/agc_2-X/trunk/LANG_www/vicidial/listloader.pl +++ b/agc_2-X/trunk/LANG_www/vicidial/listloader.pl @@ -15,6 +15,7 @@ # 60906-1058 - added filter of non-digits in alt_phone field # 61110-1229 - added new USA-Canada DST scheme and Brazil DST scheme # 61128-1215 - added postal code GMT lookup and duplicate check options +# 70205-1703 - Defaulted phone_code to 1 if not populated # ### begin parsing run-time options ### @@ -434,6 +435,7 @@ foreach $oWkS (@{$oBook->{Worksheet}}) { $AC_processed++; } + if (length($phone_code)<1) {$phone_code = '1';} 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);"; @@ -454,7 +456,7 @@ foreach $oWkS (@{$oBook->{Worksheet}}) { } $total++; if ($total%100==0) { - print ""; + print ""; sleep(1); # flush(); } diff --git a/agc_2-X/trunk/LANG_www/vicidial/listloader_super.pl b/agc_2-X/trunk/LANG_www/vicidial/listloader_super.pl index 704e06b7..bbf353ce 100644 --- a/agc_2-X/trunk/LANG_www/vicidial/listloader_super.pl +++ b/agc_2-X/trunk/LANG_www/vicidial/listloader_super.pl @@ -14,6 +14,7 @@ # 60906-1056 - added filter of non-digits in alt_phone field # 61110-1229 - added new USA-Canada DST scheme and Brazil DST scheme # 61128-1207 - added postal code GMT lookup and duplicate check options +# 70205-1703 - Defaulted phone_code to 1 if not populated # ### begin parsing run-time options ### @@ -436,6 +437,7 @@ foreach $oWkS (@{$oBook->{Worksheet}}) { $AC_processed++; } + if (length($phone_code)<1) {$phone_code = '1';} 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);"; @@ -456,7 +458,7 @@ foreach $oWkS (@{$oBook->{Worksheet}}) { } $total++; if ($total%100==0) { - print ""; + print ""; sleep(1); # flush(); } diff --git a/agc_2-X/trunk/LANG_www/vicidial/new_listloader_superL.php b/agc_2-X/trunk/LANG_www/vicidial/new_listloader_superL.php index 1f8b74aa..deecb128 100644 --- a/agc_2-X/trunk/LANG_www/vicidial/new_listloader_superL.php +++ b/agc_2-X/trunk/LANG_www/vicidial/new_listloader_superL.php @@ -307,7 +307,7 @@ function ParseFileName() { - + diff --git a/agc_2-X/trunk/LANG_www/vicidial/phone_stats.php b/agc_2-X/trunk/LANG_www/vicidial/phone_stats.php index fca796f2..0daaf2fd 100644 --- a/agc_2-X/trunk/LANG_www/vicidial/phone_stats.php +++ b/agc_2-X/trunk/LANG_www/vicidial/phone_stats.php @@ -46,7 +46,7 @@ $admin_page = './admin.php'; 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;"; + $stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 7 and view_reports='1';"; $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $auth=$row[0]; diff --git a/agc_2-X/trunk/LANG_www/vicidial/record_conf_1_hour.php b/agc_2-X/trunk/LANG_www/vicidial/record_conf_1_hour.php index 59ae1f09..d184e457 100644 --- a/agc_2-X/trunk/LANG_www/vicidial/record_conf_1_hour.php +++ b/agc_2-X/trunk/LANG_www/vicidial/record_conf_1_hour.php @@ -32,7 +32,7 @@ if (isset($_GET["SUBMIT"])) {$SUBMIT=$_GET["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;"; + $stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 6 and view_reports='1';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); diff --git a/agc_2-X/trunk/LANG_www/vicidial/user_stats.php b/agc_2-X/trunk/LANG_www/vicidial/user_stats.php index f753c9d2..eb6ee8da 100644 --- a/agc_2-X/trunk/LANG_www/vicidial/user_stats.php +++ b/agc_2-X/trunk/LANG_www/vicidial/user_stats.php @@ -7,6 +7,7 @@ # # 60619-1743 - Added variable filtering to eliminate SQL injection attack threat # 61201-1136 - Added recordings display and changed calls to time range with 10000 limit +# 70118-1605 - Added user group column to login/out and calls lists # header ("Content-type: text/html; charset=utf-8"); @@ -38,7 +39,7 @@ $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;"; + $stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 7 and view_reports='1';"; $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $auth=$row[0]; @@ -111,6 +112,11 @@ echo "\n"; echo "           $user - $full_name\n"; +echo " - VICIDIAL Time Sheet\n"; +echo " - User Status\n"; +echo " - Modify User\n"; + + echo "\n"; echo "
\n"; + 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"; +} + +###################### +# ADD=10000000000000 display all vicidial conferences +###################### +if ($ADD==10000000000000) +{ +echo "
\n"; + echo ""; + + $stmt="SELECT * from vicidial_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"; +} + +###################### +# ADD=999999 display reports section +###################### +if ($ADD==999999) +{ + if ($LOGview_reports==1) + { + echo "
\n"; + echo ""; + + $stmt="SELECT * from vicidial_conferences order by conf_exten"; + $rslt=mysql_query($stmt, $link); + $phones_to_print = mysql_num_rows($rslt); + + $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++; + } + + $stmt="SELECT enable_queuemetrics_logging,queuemetrics_url from system_settings;"; + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + $enable_queuemetrics_logging_LU = $row[0]; + $queuemetrics_url_LU = $row[1]; + + ?> + + + + + + VICIDIAL: Server Stats and Reports + VICIDIAL: Server Stats and Reports

+ +

+	
+	 $o)
+		{
+		echo "\n";
+		echo "\n";
+		echo "\n";
+		echo "\n";
+		echo "\n";
+		echo "\n";
+		echo "\n";
+		echo "\n";
+		echo "\n";
+		$o++;
+		}
+
+	echo "
SERVERDESCRIPTIONIP ADDRESSACTIVEVDAD timePARK timeCLOSER/INBOUND time
$server_id[$o]$server_description[$o]$server_ip[$o]$active[$o]LINKLINKLINK
\n"; + } + else + { + echo "You do not have permission to view this page\n"; + exit; + } +} + + + + + +echo "
\n"; + +$ENDtime = date("U"); + +$RUNtime = ($ENDtime - $STARTtime); + +echo "\n\n\n


\n\n"; + + +echo "\n\n\n


\nscript runtime: $RUNtime seconds"; +echo "             VERSION: $admin_version"; +echo "             BUILD: $build
\n"; + + +?> + + +
+ + + +1) + { + if (strlen($dial_statuses)>2) + { + $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"; + + + $dial_statuses = preg_replace("/ -$/","",$dial_statuses); + $Dstatuses = explode(" ", $dial_statuses); + $Ds_to_print = (count($Dstatuses) - 0); + $Dsql = ''; + $o=0; + while ($Ds_to_print > $o) + { + $o++; + $Dsql .= "'$Dstatuses[$o]',"; + } + $Dsql = preg_replace("/,$/","",$Dsql); + + $stmt="SELECT count(*) FROM vicidial_list where called_since_last_reset='N' and status IN($Dsql) 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 "|$DB|\n"; + echo "This campaign has $active_leads leads to be dialed in those lists\n"; + } + else + { + echo "no dial statuses selected for this campaign\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_www/vicidial/admin_modify_lead.php b/agc_2-X/trunk/LANG_www/vicidial/admin_modify_lead.php index 34016b29..fd51a12b 100644 --- a/agc_2-X/trunk/LANG_www/vicidial/admin_modify_lead.php +++ b/agc_2-X/trunk/LANG_www/vicidial/admin_modify_lead.php @@ -85,6 +85,8 @@ 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"];} +if (isset($_GET["modify_logs"])) {$modify_logs=$_GET["modify_logs"];} + elseif (isset($_POST["modify_logs"])) {$modify_logs=$_POST["modify_logs"];} $PHP_AUTH_USER = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_USER); @@ -105,6 +107,7 @@ $PHP_AUTH_PW = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_PW); # 60619-1539 - Added variable filtering to eliminate SQL injection attack threat # 61130-1639 - Added recording_log lookup and list for this lead_id # 61201-1136 - Added recording_log user(TSR) display and link +# 70305-1133 - Changed to default CHECKED modify logs upon status change # $STARTtime = date("U"); @@ -112,7 +115,7 @@ $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;"; + $stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 7 and modify_leads='1';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); @@ -216,6 +219,17 @@ $call_length = ($STARTtime - $call_began); echo "
Lead added to DNC List: $lead_id - $phone_number
\n"; } + ### update last record in vicidial_agent_log and vicidial_log tables + if (($dispo != $status) and ($modify_logs > 0)) + { + $stmt="UPDATE vicidial_log set status='" . mysql_real_escape_string($status) . "' where lead_id='" . mysql_real_escape_string($lead_id) . "' order by call_date desc limit 1"; + if ($DB) {echo "|$stmt|\n";} + $rslt=mysql_query($stmt, $link); + + $stmt="UPDATE vicidial_agent_log set status='" . mysql_real_escape_string($status) . "' where lead_id='" . mysql_real_escape_string($lead_id) . "' order by agent_log_id desc limit 1"; + if ($DB) {echo "|$stmt|\n";} + $rslt=mysql_query($stmt, $link); + } } else @@ -346,7 +360,9 @@ else echo "\n"; - echo "\n"; + echo "\n"; + + echo "\n"; echo "
Modify agent and vicidial logs
\n"; echo "


\n"; diff --git a/agc_2-X/trunk/LANG_www/vicidial/admin_search_lead.php b/agc_2-X/trunk/LANG_www/vicidial/admin_search_lead.php index 6b8b0b69..ff814159 100644 --- a/agc_2-X/trunk/LANG_www/vicidial/admin_search_lead.php +++ b/agc_2-X/trunk/LANG_www/vicidial/admin_search_lead.php @@ -40,7 +40,7 @@ $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;"; + $stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 7 and modify_leads='1';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); diff --git a/agc_2-X/trunk/LANG_www/vicidial/closer-fronter_popup.php b/agc_2-X/trunk/LANG_www/vicidial/closer-fronter_popup.php index 53a1a41d..98a58eca 100644 --- a/agc_2-X/trunk/LANG_www/vicidial/closer-fronter_popup.php +++ b/agc_2-X/trunk/LANG_www/vicidial/closer-fronter_popup.php @@ -4,6 +4,11 @@ ### Copyright (C) 2006 Matt Florell 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 +# 61201-1114 - Added lead_id and user to recording_log entry +# require("dbconnect.php"); @@ -91,6 +96,8 @@ if (isset($_GET["submit"])) {$submit=$_GET["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 = '_'; @@ -161,6 +168,7 @@ $browser = getenv("HTTP_USER_AGENT"); echo "\n"; echo "\n"; echo "VICIDIAL FRONTER-CLOSER: Popup\n"; +echo "\n"; if (eregi('CL_UNIV',$channel_group)) { @@ -234,15 +242,15 @@ if ($parked_count > 0) # 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','','','','','')"; + $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/$channel','$server_ip','SIP/$SIPexten','$NOW_TIME','$STARTtime','$filename')"; + $stmt = "INSERT INTO recording_log (channel,server_ip,extension,start_time,start_epoch,filename,lead_id,user) 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) . "','$lead_id','$user')"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_query($stmt, $link); - $stmt="SELECT recording_id FROM recording_log where filename='$filename'"; + $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); @@ -250,7 +258,7 @@ if ($parked_count > 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'"; + $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); @@ -278,7 +286,7 @@ 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';"; + $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); @@ -313,7 +321,7 @@ if ( (eregi('CL_MWCOF',$channel_group)) or (eregi('MWCOF',$group)) or (eregi('TE { echo "BUYERS EDGE INTERNAL CLOSER GROUP: $channel_group\n"; - $stmt="SELECT user,phone_number from vicidial_list where lead_id='$parked_by';"; + $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); diff --git a/agc_2-X/trunk/LANG_www/vicidial/closer-fronter_popup2.php b/agc_2-X/trunk/LANG_www/vicidial/closer-fronter_popup2.php index 2cbadf1a..1c98063d 100644 --- a/agc_2-X/trunk/LANG_www/vicidial/closer-fronter_popup2.php +++ b/agc_2-X/trunk/LANG_www/vicidial/closer-fronter_popup2.php @@ -4,6 +4,11 @@ ### Copyright (C) 2006 Matt Florell 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 +# 61201-1114 - Added lead_id and user to recording_log entry +# require("dbconnect.php"); @@ -91,6 +96,8 @@ if (isset($_GET["submit"])) {$submit=$_GET["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 = '_'; @@ -175,6 +182,7 @@ $browser = getenv("HTTP_USER_AGENT"); echo "\n"; echo "\n"; echo "VICIDIAL FRONTER-CLOSER: Popup\n"; +echo "\n"; if (eregi('CL_UNIV',$channel_group)) { @@ -220,7 +228,7 @@ else 0) # 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','','','','','')"; + $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','$server_ip','SIP/$SIPexten','$NOW_TIME','$STARTtime','$filename')"; + $stmt = "INSERT INTO recording_log (channel,server_ip,extension,start_time,start_epoch,filename,lead_id,user) values('$channel','" . mysql_real_escape_string($server_ip) . "','SIP/" . mysql_real_escape_string($SIPexten) . "','$NOW_TIME','$STARTtime','" . mysql_real_escape_string($filename) . "','$lead_id','$user')"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_query($stmt, $link); - $stmt="SELECT recording_id FROM recording_log where filename='$filename'"; + $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); @@ -264,7 +272,7 @@ if ($parked_count > 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'"; + $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); @@ -277,7 +285,7 @@ if ($parked_count > 0) echo "View Customer Info and Disposition Call\n

\n"; - $stmt="SELECT group_name,group_color from vicidial_inbound_groups where group_id='$channel_group'"; + $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); diff --git a/agc_2-X/trunk/LANG_www/vicidial/closer.php b/agc_2-X/trunk/LANG_www/vicidial/closer.php index dbd9efe7..59599edb 100644 --- a/agc_2-X/trunk/LANG_www/vicidial/closer.php +++ b/agc_2-X/trunk/LANG_www/vicidial/closer.php @@ -4,6 +4,11 @@ ### Copyright (C) 2006 Matt Florell 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"); @@ -43,6 +48,9 @@ if (isset($_GET["submit"])) {$submit=$_GET["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"); @@ -128,13 +136,13 @@ if (!$dialplan_number) if ($extension) { - $stmt="SELECT count(*) from phones where extension='$extension';"; + $stmt="SELECT count(*) from phones where extension='" . mysql_real_escape_string($extension) . "';"; $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $ext_found=$row[0]; if ($ext_found > 0) { - $stmt="SELECT dialplan_number,server_ip from phones where extension='$extension';"; + $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]; @@ -181,10 +189,10 @@ if (!$dialplan_number) $o++; } - $stmt="INSERT INTO vicidial_user_log values('','$user','LOGIN','CLOSER','$NOW_TIME','$STARTtime');"; + $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"\n"; echo "extension found, forwarding you to closer page, please wait 3 seconds...
\n"; @@ -224,7 +232,7 @@ while($o < $group_selected) } -echo"\n"; +echo "\n"; echo"\n"; #CHANNEL SERVER CHANNEL_GROUP EXTENSION PARKED_BY PARKED_TIME @@ -245,14 +253,14 @@ echo "-------------------------------------------------------------------------- -$stmt="SELECT count(*) from parked_channels where server_ip='$server_ip'"; +$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='$server_ip' and channel_group LIKE \"CL_%\" order by channel_group,parked_time"; + $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); diff --git a/agc_2-X/trunk/LANG_www/vicidial/closer_popup.php b/agc_2-X/trunk/LANG_www/vicidial/closer_popup.php index 6c1db90e..e12f02c3 100644 --- a/agc_2-X/trunk/LANG_www/vicidial/closer_popup.php +++ b/agc_2-X/trunk/LANG_www/vicidial/closer_popup.php @@ -4,6 +4,10 @@ ### Copyright (C) 2006 Matt Florell 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"); @@ -43,6 +47,9 @@ if (isset($_GET["submit"])) {$submit=$_GET["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 = '_'; @@ -99,6 +106,7 @@ $browser = getenv("HTTP_USER_AGENT"); echo "\n"; echo "\n"; echo "VICIDIAL CLOSER: Popup\n"; +echo "\n"; if (eregi('CL_UNIV',$channel_group)) { @@ -152,7 +160,7 @@ $parked_count = $row[0]; if ($parked_count > 0) { - $stmt="DELETE from parked_channels where server_ip='$server_ip' and parked_time='$parked_time' and channel='$channel' LIMIT 1"; + $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); @@ -180,13 +188,13 @@ if ($parked_count > 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','','','','','')"; + $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='$parked_by'"; + $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); @@ -200,7 +208,7 @@ if ($parked_count > 0) - $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'"; + $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"); @@ -216,7 +224,7 @@ 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';"; + $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); @@ -251,7 +259,7 @@ if (eregi('CL_MWCOF',$channel_group)) { echo "GALLERIA INTERNAL CLOSER GROUP: $channel_group\n"; - $stmt="SELECT user,phone_number from vicidial_list where lead_id='$parked_by';"; + $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); diff --git a/agc_2-X/trunk/LANG_www/vicidial/dbconnect.php b/agc_2-X/trunk/LANG_www/vicidial/dbconnect.php index 7221b35e..5247e166 100644 --- a/agc_2-X/trunk/LANG_www/vicidial/dbconnect.php +++ b/agc_2-X/trunk/LANG_www/vicidial/dbconnect.php @@ -44,5 +44,6 @@ $local_AMP = '@'; $ext_context = 'demo'; $recording_exten = '8309'; $WeBRooTWritablE = '1'; +$non_latin = '0'; # set to 1 for UTF rules ?> diff --git a/agc_2-X/trunk/LANG_www/vicidial/group_hourly_stats.php b/agc_2-X/trunk/LANG_www/vicidial/group_hourly_stats.php index 3f8e4fb9..607f2fd7 100644 --- a/agc_2-X/trunk/LANG_www/vicidial/group_hourly_stats.php +++ b/agc_2-X/trunk/LANG_www/vicidial/group_hourly_stats.php @@ -28,7 +28,7 @@ if (isset($_GET["SUBMIT"])) {$SUBMIT=$_GET["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;"; + $stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 6 and view_reports='1';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); diff --git a/agc_2-X/trunk/LANG_www/vicidial/listloader.php b/agc_2-X/trunk/LANG_www/vicidial/listloader.php index c6512ba0..272d94a7 100644 --- a/agc_2-X/trunk/LANG_www/vicidial/listloader.php +++ b/agc_2-X/trunk/LANG_www/vicidial/listloader.php @@ -15,12 +15,13 @@ # 60906-1059 - added filter of non-digits in alt_phone field # 61110-1222 - added new USA-Canada DST scheme and Brazil DST scheme # 61128-1046 - added postal code GMT lookup and duplicate check options +# 70205-1703 - Defaulted phone_code to 1 if not populated # # make sure vicidial_list exists and that your file follows the formatting correctly. This page does not dedupe or do any other lead filtering actions yet at this time. # -$version = '2.0.2'; -$build = '61128-1046'; +$version = '2.0.3'; +$build = '70205-1703'; header ("Content-type: text/html; charset=utf-8"); @@ -141,7 +142,7 @@ function ShowProgress(good, bad, total, dup, post) {
Lead Timezone Lookup: Lead Time Zone Lookup:
Lead Timezone Lookup: Lead Time Zone Lookup:
\n"; @@ -173,10 +179,10 @@ echo "

\n"; echo "
\n"; echo "LOGIN/LOGOUT TIME:\n"; -echo "\n"; -echo "\n"; +echo "
EVENT DATE CAMPAIGNHOURS:MINUTES
\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'"; + $stmt="SELECT event,event_epoch,event_date,campaign_id,user_group 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); @@ -197,6 +203,7 @@ echo ""; echo "\n"; echo "\n"; + echo "\n"; echo "\n"; } if (ereg("LOGOUT", $row[0])) @@ -216,6 +223,7 @@ echo ""; echo "\n"; echo "\n"; + echo "\n"; echo "\n"; $event_start_seconds=''; $event_stop_seconds=''; @@ -256,8 +264,8 @@ echo "

\n"; echo "
\n"; echo "CALLS FOR THIS TIME PERIOD: (10000 record limit)\n"; -echo "
EVENT DATE CAMPAIGN GROUPHOURS:MINUTES
EVENT DATE$row[0] $row[2] $row[3] $row[4]
EVENT DATE$row[0] $row[2] $row[3] $row[4] $event_hours_int:$event_minutes_int
\n"; -echo "\n"; +echo "
# DATE/TIME LENGTH STATUS PHONE CAMPAIGN LIST LEAD
\n"; +echo "\n"; $stmt="select * 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' order by call_date desc limit 10000;"; $rslt=mysql_query($stmt, $link); @@ -279,13 +287,14 @@ echo "\n"; echo "\n"; echo "\n"; + echo "\n"; echo "\n"; echo "\n"; } -echo "
# DATE/TIME LENGTH STATUS PHONE CAMPAIGN GROUP LIST LEAD
# DATE/TIME $row[8] $row[10] $row[3] $row[14] $row[2] $row[1]
\n"; +echo "


\n"; diff --git a/agc_2-X/trunk/LANG_www/vicidial/user_status.php b/agc_2-X/trunk/LANG_www/vicidial/user_status.php index 91d106ab..ecffbc5c 100644 --- a/agc_2-X/trunk/LANG_www/vicidial/user_status.php +++ b/agc_2-X/trunk/LANG_www/vicidial/user_status.php @@ -39,7 +39,7 @@ $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;"; + $stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 7 and view_reports='1';"; $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $auth=$row[0]; @@ -75,10 +75,11 @@ $browser = getenv("HTTP_USER_AGENT"); fclose($fp); } - $stmt="SELECT full_name from vicidial_users where user='" . mysql_real_escape_string($user) . "';"; + $stmt="SELECT full_name,user_group from vicidial_users where user='" . mysql_real_escape_string($user) . "';"; $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $full_name = $row[0]; + $user_group = $row[1]; $stmt="SELECT * from vicidial_live_agents where user='" . mysql_real_escape_string($user) . "';"; $rslt=mysql_query($stmt, $link); @@ -198,9 +199,12 @@ else } -echo "           $user - $full_name - \n"; +echo "           $user - $full_name \n"; +echo "       GROUP: $user_group

\n"; echo "VICIDIAL Time Sheet\n"; +echo " - User Stats\n"; +echo " - Modify User\n"; echo "
\n"; diff --git a/agc_2-X/trunk/LANG_www/vicidial/voice_lab.php b/agc_2-X/trunk/LANG_www/vicidial/voice_lab.php index 0fc209d3..2ce3a2a9 100644 --- a/agc_2-X/trunk/LANG_www/vicidial/voice_lab.php +++ b/agc_2-X/trunk/LANG_www/vicidial/voice_lab.php @@ -1,12 +1,16 @@ LICENSE: GPLv2 ### # # CHANGES # # 61220-1050 - First Build +# 70115-1246 - Added ability to define an exten to play # require("dbconnect.php"); @@ -16,18 +20,22 @@ $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["message"])) {$message=$_GET["message"];} + elseif (isset($_POST["message"])) {$message=$_POST["message"];} if (isset($_GET["session_id"])) {$session_id=$_GET["session_id"];} elseif (isset($_POST["session_id"])) {$session_id=$_POST["session_id"];} if (isset($_GET["campaign_id"])) {$campaign_id=$_GET["campaign_id"];} elseif (isset($_POST["campaign_id"])) {$campaign_id=$_POST["campaign_id"];} -if (isset($_GET["NEW_VOICE_LAB"])) {$NEW_VOICE_LAB=$_GET["NEW_VOICE_LAB"];} - elseif (isset($_POST["NEW_VOICE_LAB"])) {$NEW_VOICE_LAB=$_POST["NEW_VOICE_LAB"];} +if (isset($_GET["NEW_VOICE_LAB"])) {$NEW_VOICE_LAB=$_GET["NEW_VOICE_LAB"];} + elseif (isset($_POST["NEW_VOICE_LAB"])) {$NEW_VOICE_LAB=$_POST["NEW_VOICE_LAB"];} if (isset($_GET["KILL_VOICE_LAB"])) {$KILL_VOICE_LAB=$_GET["KILL_VOICE_LAB"];} elseif (isset($_POST["KILL_VOICE_LAB"])) {$KILL_VOICE_LAB=$_POST["KILL_VOICE_LAB"];} +if (isset($_GET["PLAY_MESSAGE"])) {$PLAY_MESSAGE=$_GET["PLAY_MESSAGE"];} + elseif (isset($_POST["PLAY_MESSAGE"])) {$PLAY_MESSAGE=$_POST["PLAY_MESSAGE"];} if (isset($_GET["submit"])) {$submit=$_GET["submit"];} - elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];} + elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];} if (isset($_GET["SUBMIT"])) {$SUBMIT=$_GET["SUBMIT"];} - elseif (isset($_POST["SUBMIT"])) {$SUBMIT=$_POST["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); @@ -134,8 +142,16 @@ if ($NEW_VOICE_LAB > 0) { if ( (strlen($server_ip) > 6) && (strlen($session_id) > 6) && (strlen($campaign_id) > 2) ) { - echo "


TO START YOUR VOICE LAB, DIAL $session_id ON YOUR PHONE NOW


\n"; + echo "


TO START YOUR VOICE LAB, DIAL 9$session_id ON YOUR PHONE NOW
\n"; + echo "
or, you can enter an extension that you want played below
\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "Message Extension\n"; + echo "\n"; + echo "



\n"; $S='*'; $D_s_ip = explode('.', $server_ip); @@ -205,27 +221,68 @@ if ($NEW_VOICE_LAB > 0) } else { -echo "
Start a Voice Lab Session: 8600900
\n"; -echo "\n"; -echo "\n"; -echo "Your Server: \n"; -echo "
\n"; -echo "Campaign: "; -echo "
\n"; -echo "\n"; -echo "



\n"; + if ($PLAY_MESSAGE > 0) + { + if ( (strlen($server_ip) > 6) && (strlen($session_id) > 6) && (strlen($campaign_id) > 2) && (strlen($message) > 0) ) + { + echo "


TO START YOUR VOICE LAB, DIAL 9$session_id ON YOUR PHONE NOW
\n"; + + echo "
or, you can enter an extension that you want played below
\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "Message Extension\n"; + echo "\n"; + echo "



\n"; + + $nn='99'; + $n='9'; + + $stmt="INSERT INTO vicidial_manager values('','','$MYSQL_datetime','NEW','N','$server_ip','','Originate','VL$FILE_datetime$nn','Channel: $local_DEF$n$session_id$local_AMP$ext_context','Context: $ext_context','Exten: $message','Priority: 1','Callerid: VL$FILE_datetime$nn','','','','','')"; + echo "|$stmt|\n

\n"; + $rslt=mysql_query($stmt, $link); + + echo "MESSAGE $message played at session $session_id on server $server_ip\n"; + + echo "
Kill a Voice Lab Session: 8600900
\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "



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

\n"; + echo "|$server_ip| |$session_id| |$campaign_id|\n

\n"; + echo "Back to main voicelab screen\n

\n"; + } + } +else + { + echo "
Start a Voice Lab Session: 8600900
\n"; + echo "\n"; + echo "\n"; + echo "Your Server: \n"; + echo "
\n"; + echo "Campaign: "; + echo "
\n"; + echo "\n"; + echo "



\n"; -echo "
Kill a Voice Lab Session: 8600900
\n"; -echo "\n"; -echo "\n"; -echo "Your Server: \n"; -echo "
\n"; -echo "Campaign: "; -echo "
\n"; -echo "\n"; -echo "



\n"; - + echo "
Kill a Voice Lab Session: 8600900
\n"; + echo "\n"; + echo "\n"; + echo "Your Server: \n"; + echo "
\n"; + echo "Campaign: "; + echo "
\n"; + echo "\n"; + echo "



\n"; + } } diff --git a/agc_2-X/trunk/LANG_www/vicidial/welcome.php b/agc_2-X/trunk/LANG_www/vicidial/welcome.php new file mode 100644 index 00000000..f0bad6d9 --- /dev/null +++ b/agc_2-X/trunk/LANG_www/vicidial/welcome.php @@ -0,0 +1,25 @@ + LICENSE: GPLv2 +# + +echo "VICIDIAL Welcome\n"; +echo "\n"; +echo "\n"; +echo "




"; +echo ""; +echo ""; +echo "\n"; +echo "\n"; +echo "\n"; +echo "\n"; +echo "\n"; +echo "\n"; +echo "
Welcome
 
Agent Login
 
Administration
 
\n"; +echo "\n\n"; +echo "\n\n"; +echo "\n\n"; + +?> \ No newline at end of file diff --git a/agc_2-X/trunk/LANG_www/vicidial_de/AST_CLOSERstats.php b/agc_2-X/trunk/LANG_www/vicidial_de/AST_CLOSERstats.php index cb96da49..60611f3f 100644 --- a/agc_2-X/trunk/LANG_www/vicidial_de/AST_CLOSERstats.php +++ b/agc_2-X/trunk/LANG_www/vicidial_de/AST_CLOSERstats.php @@ -27,7 +27,7 @@ if (isset($_GET["SUBMIT"])) {$SUBMIT=$_GET["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;"; + $stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 6 and view_reports='1';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); @@ -86,7 +86,7 @@ echo "\n"; echo "\n"; -echo "           ÄNDERN Sie | REPORTS \n"; +echo "           ÄNDERN Sie | REPORTS \n"; echo "\n\n"; echo "
\n\n";
diff --git a/agc_2-X/trunk/LANG_www/vicidial_de/AST_VDADstats.php b/agc_2-X/trunk/LANG_www/vicidial_de/AST_VDADstats.php
index 957b6c61..52374695 100644
--- a/agc_2-X/trunk/LANG_www/vicidial_de/AST_VDADstats.php
+++ b/agc_2-X/trunk/LANG_www/vicidial_de/AST_VDADstats.php
@@ -29,7 +29,7 @@ if (isset($_GET["SUBMIT"]))				{$SUBMIT=$_GET["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;";
+	$stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 6 and view_reports='1';";
 	if ($DB) {echo "|$stmt|\n";}
 	$rslt=mysql_query($stmt, $link);
 	$row=mysql_fetch_row($rslt);
@@ -88,7 +88,7 @@ echo "\n";
 echo "\n";
-echo "           ÄNDERN Sie | REPORTS \n";
+echo "           ÄNDERN Sie | REPORTS \n";
 echo "\n\n";
 
 echo "
\n\n";
@@ -202,6 +202,82 @@ echo "Total NA calls -Busy,Disconnect,RingNoAnswer: $NAcalls  $NApercent%\n";
 echo "Durchschnittliche Anruf-Länge für Na benennt in den Sekunden:   $average_na_seconds\n";
 
 
+##############################
+#########  CALL STATUS STATS
+
+$TOTALcalls = 0;
+
+echo "\n";
+echo "---------- CALL STATUS STATS\n";
+echo "+--------+----------------------+------------+\n";
+echo "| STATUS | DESCRIPTION          | CALLS      |\n";
+echo "+--------+----------------------+------------+\n";
+
+$stmt="SELECT * from vicidial_statuses order by status";
+$rslt=mysql_query($stmt, $link);
+$statuses_to_print = mysql_num_rows($rslt);
+$statuses_list='';
+
+$o=0;
+while ($statuses_to_print > $o) 
+	{
+	$rowx=mysql_fetch_row($rslt);
+	$statname_list["$rowx[0]"] = "$rowx[1]";
+	$o++;
+	}
+
+$stmt="SELECT * from vicidial_campaign_statuses where campaign_id='" . mysql_real_escape_string($group) . "' 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);
+	$statname_list["$rowx[0]"] = "$rowx[1]";
+	$o++;
+	}
+
+$stmt="select count(*),status 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) . "' group by status;";
+if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");}
+$rslt=mysql_query($stmt, $link);
+if ($DB) {echo "$stmt\n";}
+$statuses_to_print = mysql_num_rows($rslt);
+$i=0;
+while ($i < $statuses_to_print)
+	{
+	$row=mysql_fetch_row($rslt);
+
+	$TOTALcalls = ($TOTALcalls + $row[0]);
+
+	$STATUScount =	sprintf("%10s", $row[0]);while(strlen($STATUScount)>10) {$STATUScount = substr("$STATUScount", 0, -1);}
+	$RAWstatus = $row[1];
+	$status =	sprintf("%-6s", $row[1]);while(strlen($status)>6) {$status = substr("$status", 0, -1);}
+
+	if ($non_latin < 1)
+		{
+		 $status_name =	sprintf("%-20s", $statname_list[$RAWstatus]); 
+		 while(strlen($status_name)>20) {$status_name = substr("$status_name", 0, -1);}	
+		}
+	else
+		{
+		 $status_name =	sprintf("%-60s", $statname_list[$RAWstatus]); 
+		 while(mb_strlen($status_name,'utf-8')>20) {$status_name = mb_substr("$status_name", 0, -1,'utf-8');}	
+		}
+
+
+	echo "| $status | $status_name | $STATUScount |\n";
+
+	$i++;
+	}
+
+$TOTALcalls =		sprintf("%10s", $TOTALcalls);
+
+echo "+--------+----------------------+------------+\n";
+echo "| TOTAL:                        | $TOTALcalls |\n";
+echo "+-------------------------------+------------+\n";
+
+
 ##############################
 #########  USER STATS
 
@@ -217,6 +293,7 @@ echo "| MITTEL                   | 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;";
+if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");}
 $rslt=mysql_query($stmt, $link);
 if ($DB) {echo "$stmt\n";}
 $users_to_print = mysql_num_rows($rslt);
@@ -228,8 +305,15 @@ while ($i < $users_to_print)
 	$TOTcalls = ($TOTcalls + $row[2]);
 	$TOTtime = ($TOTtime + $row[3]);
 
-	$user =			sprintf("%-6s", $row[0]);
-	$full_name =	sprintf("%-15s", $row[1]); while(strlen($full_name)>15) {$full_name = substr("$full_name", 0, -1);}
+	$user =	sprintf("%-6s", $row[0]);while(strlen($user)>6) {$user = substr("$user", 0, -1);}
+	if ($non_latin < 1)
+	{
+ 	 $full_name =	sprintf("%-15s", $row[1]); while(strlen($full_name)>15) {$full_name = substr("$full_name", 0, -1);}	
+	}
+	else
+	{
+	 $full_name =	sprintf("%-45s", $row[1]); while(mb_strlen($full_name,'utf-8')>15) {$full_name = mb_substr("$full_name", 0, -1,'utf-8');}	
+	}
 	$USERcalls =	sprintf("%10s", $row[2]);
 	$USERtotTALK =	$row[3];
 	$USERavgTALK =	$row[4];
diff --git a/agc_2-X/trunk/LANG_www/vicidial_de/AST_VICIDIAL_hopperlist.php b/agc_2-X/trunk/LANG_www/vicidial_de/AST_VICIDIAL_hopperlist.php
index ca98907a..d0a73e6b 100644
--- a/agc_2-X/trunk/LANG_www/vicidial_de/AST_VICIDIAL_hopperlist.php
+++ b/agc_2-X/trunk/LANG_www/vicidial_de/AST_VICIDIAL_hopperlist.php
@@ -7,7 +7,8 @@
 #
 # 60619-1654 - Added variable filtering to eliminate SQL injection attack threat
 #            - Added required user/pass to gain access to this page
-#
+# 70115-1614 - Added ALT field for vicidial_hopper alt_dial column
+# 
 
 require("dbconnect.php");
 
@@ -24,7 +25,7 @@ if (isset($_GET["SUBMIT"]))				{$SUBMIT=$_GET["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;";
+	$stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 6 and view_reports='1' and modify_campaigns='1';";
 	if ($DB) {echo "|$stmt|\n";}
 	$rslt=mysql_query($stmt, $link);
 	$row=mysql_fetch_row($rslt);
@@ -122,11 +123,11 @@ echo "Gesamtleitungen im Zufuhrbehälter im Augenblick:       $TOTALcalls\n";
 
 echo "\n";
 echo "---------- LEADS IN HOPPER\n";
-echo "+------+-----------+------------+-------+--------+-------+--------+\n";
-echo "|      | LEAD_ID   | PHONE NUM  | STATE | STATUS | COUNT | GMT    |\n";
-echo "+------+-----------+------------+-------+--------+-------+--------+\n";
+echo "+------+-----------+------------+-------+--------+-------+--------+-------+\n";
+echo "|      | LEAD_ID   | PHONE NUM  | STATE | STATUS | COUNT | GMT    | ALT   |\n";
+echo "+------+-----------+------------+-------+--------+-------+--------+-------+\n";
 
-$stmt="select vicidial_hopper.lead_id,phone_number,vicidial_hopper.state,vicidial_list.status,called_count,vicidial_hopper.gmt_offset_now,hopper_id 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;";
+$stmt="select vicidial_hopper.lead_id,phone_number,vicidial_hopper.state,vicidial_list.status,called_count,vicidial_hopper.gmt_offset_now,hopper_id,alt_dial 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);
@@ -143,14 +144,15 @@ while ($i < $users_to_print)
 	$count =		sprintf("%-5s", $row[4]);
 	$gmt =			sprintf("%-6s", $row[5]);
 	$hopper_id =	sprintf("%-6s", $row[6]);
+	$alt_dial =		sprintf("%-5s", $row[7]);
 
 if ($DB) {echo "| $FMT_i | $lead_id | $phone_number | $state | $status | $count | $gmt | $hopper_id |\n";}
-else {echo "| $FMT_i | $lead_id | $phone_number | $state | $status | $count | $gmt |\n";}
+else {echo "| $FMT_i | $lead_id | $phone_number | $state | $status | $count | $gmt | $alt_dial |\n";}
 
 	$i++;
 	}
 
-echo "+------+-----------+------------+-------+--------+-------+--------+\n";
+echo "+------+-----------+------------+-------+--------+-------+--------+-------+\n";
 
 
 }
diff --git a/agc_2-X/trunk/LANG_www/vicidial_de/AST_admin_log_display.php b/agc_2-X/trunk/LANG_www/vicidial_de/AST_admin_log_display.php
index c9fad01a..77371200 100644
--- a/agc_2-X/trunk/LANG_www/vicidial_de/AST_admin_log_display.php
+++ b/agc_2-X/trunk/LANG_www/vicidial_de/AST_admin_log_display.php
@@ -35,7 +35,7 @@ $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;";
+	$stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 8 and view_reports='1';";
 	if ($DB) {echo "|$stmt|\n";}
 	$rslt=mysql_query($stmt, $link);
 	$row=mysql_fetch_row($rslt);
diff --git a/agc_2-X/trunk/LANG_www/vicidial_de/AST_agent_time_sheet.php b/agc_2-X/trunk/LANG_www/vicidial_de/AST_agent_time_sheet.php
index 317925f9..5bf7c948 100644
--- a/agc_2-X/trunk/LANG_www/vicidial_de/AST_agent_time_sheet.php
+++ b/agc_2-X/trunk/LANG_www/vicidial_de/AST_agent_time_sheet.php
@@ -28,7 +28,7 @@ if (isset($_GET["SUBMIT"]))				{$SUBMIT=$_GET["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;";
+	$stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 6 and view_reports='1';";
 	if ($DB) {echo "|$stmt|\n";}
 	$rslt=mysql_query($stmt, $link);
 	$row=mysql_fetch_row($rslt);
@@ -63,7 +63,11 @@ if (!isset($query_date)) {$query_date = $NOW_DATE;}
 \n";
 echo "VICIDIAL: Agent Time Sheet\n";
-echo "VICIDIAL ADMIN: Agent Time Sheet
\n"; +echo "VICIDIAL ADMIN: Agent Time Sheet\n"; +echo " - User Stats\n"; +echo " - User Status\n"; +echo " - Ändern Sie Benutzer\n"; +echo "
\n"; echo "
  \n"; echo "Date: \n"; echo "User ID: \n"; diff --git a/agc_2-X/trunk/LANG_www/vicidial_de/AST_inboundEXTstats.php b/agc_2-X/trunk/LANG_www/vicidial_de/AST_inboundEXTstats.php new file mode 100644 index 00000000..bf046253 --- /dev/null +++ b/agc_2-X/trunk/LANG_www/vicidial_de/AST_inboundEXTstats.php @@ -0,0 +1,400 @@ + 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 and view_reports='1';"; + 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_www/vicidial_de/AST_server_performance.php b/agc_2-X/trunk/LANG_www/vicidial_de/AST_server_performance.php index 73b67937..399fe619 100644 --- a/agc_2-X/trunk/LANG_www/vicidial_de/AST_server_performance.php +++ b/agc_2-X/trunk/LANG_www/vicidial_de/AST_server_performance.php @@ -28,7 +28,7 @@ if (isset($_GET["SUBMIT"])) {$SUBMIT=$_GET["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;"; + $stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 6 and view_reports='1' and modify_servers='1';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); @@ -96,7 +96,7 @@ echo "\n"; echo "\n"; echo "\n"; echo "\n"; -echo "             REPORTS \n"; +echo "             REPORTS \n"; echo "\n\n"; echo "
\n";
diff --git a/agc_2-X/trunk/LANG_www/vicidial_de/AST_timeonVDAD.php b/agc_2-X/trunk/LANG_www/vicidial_de/AST_timeonVDAD.php
index 6216c641..5c3948f6 100644
--- a/agc_2-X/trunk/LANG_www/vicidial_de/AST_timeonVDAD.php
+++ b/agc_2-X/trunk/LANG_www/vicidial_de/AST_timeonVDAD.php
@@ -33,7 +33,7 @@ if (isset($_GET["closer_display"]))				{$closer_display=$_GET["closer_display"];
 $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;";
+	$stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 6 and view_reports='1';";
 	if ($DB) {echo "|$stmt|\n";}
 	$rslt=mysql_query($stmt, $link);
 	$row=mysql_fetch_row($rslt);
@@ -133,7 +133,7 @@ echo "SERVER: $server_ip\n";
 if ($closer_display>0) {$closer_display_reverse=0;   $closer_reverse_link='DEFAULT';}
 else {$closer_display_reverse=1;   $closer_reverse_link='CLOSER';}
 
-echo "VICIDIAL: Agents Time On Calls           $NOW_TIME    $closer_reverse_link | REPORTS\n\n";
+echo "VICIDIAL: Agents Time On Calls           $NOW_TIME    $closer_reverse_link | REPORTS\n\n";
 
 if ($closer_display>0)
 {
diff --git a/agc_2-X/trunk/LANG_www/vicidial_de/AST_timeonVDADall.php b/agc_2-X/trunk/LANG_www/vicidial_de/AST_timeonVDADall.php
index f554a5f1..964306c8 100644
--- a/agc_2-X/trunk/LANG_www/vicidial_de/AST_timeonVDADall.php
+++ b/agc_2-X/trunk/LANG_www/vicidial_de/AST_timeonVDADall.php
@@ -7,7 +7,7 @@
 #
 # STOP=4000, SLOW=40, GO=4 seconds refresh interval
 # 
-# changes:
+# CHANGELOG:
 # 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
@@ -21,7 +21,11 @@
 # 61002-1642 - Added TRUNK SHORT/FILL stats
 # 61101-1318 - Added SIP and IAX Listen and Barge links option
 # 61101-1647 - Added Usergroup column and user name option as well as sorting
-# 61102-1155 - made display of columns more modular, added ability to hide server info
+# 61102-1155 - Made display of columns more modular, added ability to hide server info
+# 61215-1131 - Added answered calls and drop percent taken from answered calls
+# 70111-1600 - Added ability to use BLEND/INBND/*_C/*_B/*_I as closer campaigns
+# 70123-1151 - Added non_latin options for substr in display variables, thanks Marin Blu
+# 70206-1140 - Added call-type statuses to display(A-Auto, M-Manual, I-Inbound/Closer)
 #
 
 header ("Content-type: text/html; charset=utf-8");
@@ -113,8 +117,12 @@ $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;";
+	$stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 6 and view_reports='1';";
 	if ($DB) {echo "|$stmt|\n";}
+if ($non_latin > 0)
+{
+$rslt=mysql_query("SET NAMES 'UTF8'");
+}
 	$rslt=mysql_query($stmt, $link);
 	$row=mysql_fetch_row($rslt);
 	$auth=$row[0];
@@ -135,6 +143,10 @@ $epochSIXhoursAGO = ($STARTtime - 21600);
 $timeSIXhoursAGO = date("Y-m-d H:i:s",$epochSIXhoursAGO);
 
 $stmt="select campaign_id from vicidial_campaigns where active='Y';";
+if ($non_latin > 0)
+{
+$rslt=mysql_query("SET NAMES 'UTF8'");
+}
 $rslt=mysql_query($stmt, $link);
 if (!isset($DB))   {$DB=0;}
 if ($DB) {echo "$stmt\n";}
@@ -148,6 +160,10 @@ while ($i < $groups_to_print)
 	}
 
 $stmt="select * from vicidial_user_groups;";
+if ($non_latin > 0)
+{
+$rslt=mysql_query("SET NAMES 'UTF8'");
+}
 $rslt=mysql_query($stmt, $link);
 if (!isset($DB))   {$DB=0;}
 if ($DB) {echo "$stmt\n";}
@@ -242,18 +258,22 @@ echo "GO";
 echo "       ÄNDERN Sie | \n";
 echo "SUMMARY | \n";
-echo "REPORTS \n";
+echo "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,dial_method,adaptive_maximum_level,adaptive_dropped_percentage,adaptive_dl_diff_target,adaptive_intensity,available_only_ratio_tally,adaptive_latest_server_time,local_call_time,dial_timeout from vicidial_campaigns where campaign_id='" . mysql_real_escape_string($group) . "';"; +$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,dial_method,adaptive_maximum_level,adaptive_dropped_percentage,adaptive_dl_diff_target,adaptive_intensity,available_only_ratio_tally,adaptive_latest_server_time,local_call_time,dial_timeout,dial_statuses from vicidial_campaigns where campaign_id='" . mysql_real_escape_string($group) . "';"; if ($group=='XXXX-ALL-ACTIVE-XXXX') { - $stmt="select avg(auto_dial_level),min(dial_status_a),min(dial_status_b),min(dial_status_c),min(dial_status_d),min(dial_status_e),min(lead_order),min(lead_filter_id),sum(hopper_level),min(dial_method),avg(adaptive_maximum_level),avg(adaptive_dropped_percentage),avg(adaptive_dl_diff_target),avg(adaptive_intensity),min(available_only_ratio_tally),min(adaptive_latest_server_time),min(local_call_time),avg(dial_timeout) from vicidial_campaigns;"; + $stmt="select avg(auto_dial_level),min(dial_status_a),min(dial_status_b),min(dial_status_c),min(dial_status_d),min(dial_status_e),min(lead_order),min(lead_filter_id),sum(hopper_level),min(dial_method),avg(adaptive_maximum_level),avg(adaptive_dropped_percentage),avg(adaptive_dl_diff_target),avg(adaptive_intensity),min(available_only_ratio_tally),min(adaptive_latest_server_time),min(local_call_time),avg(dial_timeout),min(dial_statuses) from vicidial_campaigns;"; } +if ($non_latin > 0) +{ +$rslt=mysql_query("SET NAMES 'UTF8'"); +} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $DIALlev = $row[0]; @@ -274,12 +294,19 @@ $ADAavailonly = $row[14]; $TAPERtime = $row[15]; $CALLtime = $row[16]; $DIALtimeout = $row[17]; +$DIALstatuses = $row[18]; + $DIALstatuses = (preg_replace("/ -$|^ /","",$DIALstatuses)); + $DIALstatuses = (ereg_replace(' ',', ',$DIALstatuses)); $stmt="select count(*) from vicidial_hopper where campaign_id='" . mysql_real_escape_string($group) . "';"; if ($group=='XXXX-ALL-ACTIVE-XXXX') { $stmt="select count(*) from vicidial_hopper;"; } +if ($non_latin > 0) +{ +$rslt=mysql_query("SET NAMES 'UTF8'"); +} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $VDhop = $row[0]; @@ -289,6 +316,10 @@ if ($group=='XXXX-ALL-ACTIVE-XXXX') { $stmt="select sum(dialable_leads),sum(calls_today),sum(drops_today),avg(drops_answers_today_pct),avg(differential_onemin),avg(agents_average_onemin),sum(balance_trunk_fill),sum(answers_today) from vicidial_campaign_stats;"; } +if ($non_latin > 0) +{ +$rslt=mysql_query("SET NAMES 'UTF8'"); +} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $DAleads = $row[0]; @@ -311,6 +342,10 @@ if ($group=='XXXX-ALL-ACTIVE-XXXX') { $stmt="select sum(local_trunk_shortage) from vicidial_campaign_server_stats;"; } +if ($non_latin > 0) +{ +$rslt=mysql_query("SET NAMES 'UTF8'"); +} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $balanceSHORT = $row[0]; @@ -351,7 +386,7 @@ echo "
HOPPER LEVEL:  $HOPlev     DROPPED / ANSWERED:  $dropsTODAY / $answersTODAY   DL DIFF:  $diffONEMIN     STATUSES:  $DIALstatusA, $DIALstatusB, $DIALstatusC, $DIALstatusD, $DIALstatusE     STATUSES:  $DIALstatuses    
HOPPER LEVEL:  $HOPlev     DROPPED / ANSWERED:  $dropsTODAY / $answersTODAY   DL DIFF:  $diffONEMIN     STATUSES:  $DIALstatusA, $DIALstatusB, $DIALstatusC, $DIALstatusD, $DIALstatusE     STATUSES:  $DIALstatuses    
"; ################################################################################ ###### OUTBOUND CALLS ################################################################################ -if (eregi("CLOSER",$group)) +if (eregi("(CLOSER|BLEND|INBND|_C$|_B$|_I$)",$group)) { $stmt="select closer_campaigns from vicidial_campaigns where campaign_id='" . mysql_real_escape_string($group) . "';"; $rslt=mysql_query($stmt, $link); @@ -289,7 +294,7 @@ $parked_to_print = mysql_num_rows($rslt); if ($out_live > 9) {$F=''; $FG='';} if ($out_live > 14) {$F=''; $FG='';} - if (eregi("CLOSER",$group)) + if (eregi("(CLOSER|BLEND|INBND|_C$|_B$|_I$)",$group)) {echo "$NFB$out_total$NFE current active calls      \n";} else {echo "$NFB$out_total$NFE calls being placed       \n";} diff --git a/agc_2-X/trunk/LANG_www/vicidial_de/AST_timeonpark.php b/agc_2-X/trunk/LANG_www/vicidial_de/AST_timeonpark.php index 46aee71b..91ba6e0f 100644 --- a/agc_2-X/trunk/LANG_www/vicidial_de/AST_timeonpark.php +++ b/agc_2-X/trunk/LANG_www/vicidial_de/AST_timeonpark.php @@ -3,6 +3,11 @@ ### ### Copyright (C) 2006 Matt Florell 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"); @@ -18,6 +23,23 @@ if (isset($_GET["submit"])) {$submit=$_GET["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 and view_reports='1';"; + 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"); $timeONEhoursAGO = ($STARTtime - 3600); @@ -67,7 +89,7 @@ echo"VICIDIAL: Time On Park\n"; echo "
\n\n";
 
-echo "VICIDIAL: Time On Park                       $NOW_TIME\n\n";
+echo "VICIDIAL: Time On Park         $NOW_TIME    REPORTS\n\n";
 echo "+------------+-----------------+---------------------+---------+\n";
 echo "| CHANNEL    | GROUP           | START TIME          | MINUTES |\n";
 echo "+------------+-----------------+---------------------+---------+\n";
@@ -76,7 +98,7 @@ echo "+------------+-----------------+---------------------+---------+\n";
 # $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;";
+$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);
@@ -138,7 +160,7 @@ echo "| STATION    | USER   | CHANNEL    | GROUP           | START TIME
 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;";
+$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);
diff --git a/agc_2-X/trunk/LANG_www/vicidial_de/admin.php b/agc_2-X/trunk/LANG_www/vicidial_de/admin.php
index 271b4155..6e223821 100644
--- a/agc_2-X/trunk/LANG_www/vicidial_de/admin.php
+++ b/agc_2-X/trunk/LANG_www/vicidial_de/admin.php
@@ -1,9037 +1,10721 @@
-    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["active"]))	{$active=$_GET["active"];}
-	elseif (isset($_POST["active"]))	{$active=$_POST["active"];}
-if (isset($_GET["adaptive_dl_diff_target"]))	{$adaptive_dl_diff_target=$_GET["adaptive_dl_diff_target"];}
-	elseif (isset($_POST["adaptive_dl_diff_target"]))	{$adaptive_dl_diff_target=$_POST["adaptive_dl_diff_target"];}
-if (isset($_GET["adaptive_dropped_percentage"]))	{$adaptive_dropped_percentage=$_GET["adaptive_dropped_percentage"];}
-	elseif (isset($_POST["adaptive_dropped_percentage"])){$adaptive_dropped_percentage=$_POST["adaptive_dropped_percentage"];}
-if (isset($_GET["adaptive_intensity"]))	{$adaptive_intensity=$_GET["adaptive_intensity"];}
-	elseif (isset($_POST["adaptive_intensity"]))	{$adaptive_intensity=$_POST["adaptive_intensity"];}
-if (isset($_GET["adaptive_latest_server_time"]))	{$adaptive_latest_server_time=$_GET["adaptive_latest_server_time"];}
-	elseif (isset($_POST["adaptive_latest_server_time"])){$adaptive_latest_server_time=$_POST["adaptive_latest_server_time"];}
-if (isset($_GET["adaptive_maximum_level"]))	{$adaptive_maximum_level=$_GET["adaptive_maximum_level"];}
-	elseif (isset($_POST["adaptive_maximum_level"]))	{$adaptive_maximum_level=$_POST["adaptive_maximum_level"];}
-if (isset($_GET["ADD"]))	{$ADD=$_GET["ADD"];}
-	elseif (isset($_POST["ADD"]))	{$ADD=$_POST["ADD"];}
-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["AFLogging_enabled"]))	{$AFLogging_enabled=$_GET["AFLogging_enabled"];}
-	elseif (isset($_POST["AFLogging_enabled"]))	{$AFLogging_enabled=$_POST["AFLogging_enabled"];}
-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["agentcall_manual"]))	{$agentcall_manual=$_GET["agentcall_manual"];}
-	elseif (isset($_POST["agentcall_manual"]))	{$agentcall_manual=$_POST["agentcall_manual"];}
-if (isset($_GET["agentonly_callbacks"]))	{$agentonly_callbacks=$_GET["agentonly_callbacks"];}
-	elseif (isset($_POST["agentonly_callbacks"]))	{$agentonly_callbacks=$_POST["agentonly_callbacks"];}
-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["agi_output"]))	{$agi_output=$_GET["agi_output"];}
-	elseif (isset($_POST["agi_output"]))	{$agi_output=$_POST["agi_output"];}
-if (isset($_GET["allcalls_delay"]))	{$allcalls_delay=$_GET["allcalls_delay"];}
-	elseif (isset($_POST["allcalls_delay"]))	{$allcalls_delay=$_POST["allcalls_delay"];}
-if (isset($_GET["allow_closers"]))	{$allow_closers=$_GET["allow_closers"];}
-	elseif (isset($_POST["allow_closers"]))	{$allow_closers=$_POST["allow_closers"];}
-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["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["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["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["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["asterisk_version"]))	{$asterisk_version=$_GET["asterisk_version"];}
-	elseif (isset($_POST["asterisk_version"]))	{$asterisk_version=$_POST["asterisk_version"];}
-if (isset($_GET["ASTmgrSECRET"]))	{$ASTmgrSECRET=$_GET["ASTmgrSECRET"];}
-	elseif (isset($_POST["ASTmgrSECRET"]))	{$ASTmgrSECRET=$_POST["ASTmgrSECRET"];}
-if (isset($_GET["ASTmgrUSERNAME"]))	{$ASTmgrUSERNAME=$_GET["ASTmgrUSERNAME"];}
-	elseif (isset($_POST["ASTmgrUSERNAME"]))	{$ASTmgrUSERNAME=$_POST["ASTmgrUSERNAME"];}
-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["ASTmgrUSERNAMEupdate"]))	{$ASTmgrUSERNAMEupdate=$_GET["ASTmgrUSERNAMEupdate"];}
-	elseif (isset($_POST["ASTmgrUSERNAMEupdate"]))	{$ASTmgrUSERNAMEupdate=$_POST["ASTmgrUSERNAMEupdate"];}
-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($_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["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["available_only_ratio_tally"]))	{$available_only_ratio_tally=$_GET["available_only_ratio_tally"];}
-	elseif (isset($_POST["available_only_ratio_tally"])){$available_only_ratio_tally=$_POST["available_only_ratio_tally"];}
-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["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["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["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["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["campaign_cid"]))	{$campaign_cid=$_GET["campaign_cid"];}
-	elseif (isset($_POST["campaign_cid"]))	{$campaign_cid=$_POST["campaign_cid"];}
-if (isset($_GET["campaign_detail"]))	{$campaign_detail=$_GET["campaign_detail"];}
-	elseif (isset($_POST["campaign_detail"]))	{$campaign_detail=$_POST["campaign_detail"];}
-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["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_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["campaign_recording"]))	{$campaign_recording=$_GET["campaign_recording"];}
-	elseif (isset($_POST["campaign_recording"]))	{$campaign_recording=$_POST["campaign_recording"];}
-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["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["client_browser"]))	{$client_browser=$_GET["client_browser"];}
-	elseif (isset($_POST["client_browser"]))	{$client_browser=$_POST["client_browser"];}
-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["company"]))	{$company=$_GET["company"];}
-	elseif (isset($_POST["company"]))	{$company=$_POST["company"];}
-if (isset($_GET["computer_ip"]))	{$computer_ip=$_GET["computer_ip"];}
-	elseif (isset($_POST["computer_ip"]))	{$computer_ip=$_POST["computer_ip"];}
-if (isset($_GET["conf_exten"]))	{$conf_exten=$_GET["conf_exten"];}
-	elseif (isset($_POST["conf_exten"]))	{$conf_exten=$_POST["conf_exten"];}
-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["conferencing_enabled"]))	{$conferencing_enabled=$_GET["conferencing_enabled"];}
-	elseif (isset($_POST["conferencing_enabled"]))	{$conferencing_enabled=$_POST["conferencing_enabled"];}
-if (isset($_GET["CoNfIrM"]))	{$CoNfIrM=$_GET["CoNfIrM"];}
-	elseif (isset($_POST["CoNfIrM"]))	{$CoNfIrM=$_POST["CoNfIrM"];}
-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_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_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_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["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_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_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["DBX_database"]))	{$DBX_database=$_GET["DBX_database"];}
-	elseif (isset($_POST["DBX_database"]))	{$DBX_database=$_POST["DBX_database"];}
-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["DBX_server"]))	{$DBX_server=$_GET["DBX_server"];}
-	elseif (isset($_POST["DBX_server"]))	{$DBX_server=$_POST["DBX_server"];}
-if (isset($_GET["DBX_user"]))	{$DBX_user=$_GET["DBX_user"];}
-	elseif (isset($_POST["DBX_user"]))	{$DBX_user=$_POST["DBX_user"];}
-if (isset($_GET["DBY_database"]))	{$DBY_database=$_GET["DBY_database"];}
-	elseif (isset($_POST["DBY_database"]))	{$DBY_database=$_POST["DBY_database"];}
-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["DBY_server"]))	{$DBY_server=$_GET["DBY_server"];}
-	elseif (isset($_POST["DBY_server"]))	{$DBY_server=$_POST["DBY_server"];}
-if (isset($_GET["DBY_user"]))	{$DBY_user=$_GET["DBY_user"];}
-	elseif (isset($_POST["DBY_user"]))	{$DBY_user=$_POST["DBY_user"];}
-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["delete_campaigns"]))	{$delete_campaigns=$_GET["delete_campaigns"];}
-	elseif (isset($_POST["delete_campaigns"]))	{$delete_campaigns=$_POST["delete_campaigns"];}
-if (isset($_GET["delete_filters"]))	{$delete_filters=$_GET["delete_filters"];}
-	elseif (isset($_POST["delete_filters"]))	{$delete_filters=$_POST["delete_filters"];}
-if (isset($_GET["delete_ingroups"]))	{$delete_ingroups=$_GET["delete_ingroups"];}
-	elseif (isset($_POST["delete_ingroups"]))	{$delete_ingroups=$_POST["delete_ingroups"];}
-if (isset($_GET["delete_lists"]))	{$delete_lists=$_GET["delete_lists"];}
-	elseif (isset($_POST["delete_lists"]))	{$delete_lists=$_POST["delete_lists"];}
-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["delete_scripts"]))	{$delete_scripts=$_GET["delete_scripts"];}
-	elseif (isset($_POST["delete_scripts"]))	{$delete_scripts=$_POST["delete_scripts"];}
-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_users"]))	{$delete_users=$_GET["delete_users"];}
-	elseif (isset($_POST["delete_users"]))	{$delete_users=$_POST["delete_users"];}
-if (isset($_GET["dial_method"]))	{$dial_method=$_GET["dial_method"];}
-	elseif (isset($_POST["dial_method"]))	{$dial_method=$_POST["dial_method"];}
-if (isset($_GET["dial_prefix"]))	{$dial_prefix=$_GET["dial_prefix"];}
-	elseif (isset($_POST["dial_prefix"]))	{$dial_prefix=$_POST["dial_prefix"];}
-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["dial_timeout"]))	{$dial_timeout=$_GET["dial_timeout"];}
-	elseif (isset($_POST["dial_timeout"]))	{$dial_timeout=$_POST["dial_timeout"];}
-if (isset($_GET["dialplan_number"]))	{$dialplan_number=$_GET["dialplan_number"];}
-	elseif (isset($_POST["dialplan_number"]))	{$dialplan_number=$_POST["dialplan_number"];}
-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["drop_exten"]))	{$drop_exten=$_GET["drop_exten"];}
-	elseif (isset($_POST["drop_exten"]))	{$drop_exten=$_POST["drop_exten"];}
-if (isset($_GET["drop_message"]))	{$drop_message=$_GET["drop_message"];}
-	elseif (isset($_POST["drop_message"]))	{$drop_message=$_POST["drop_message"];}
-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["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["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["ext_context"]))	{$ext_context=$_GET["ext_context"];}
-	elseif (isset($_POST["ext_context"]))	{$ext_context=$_POST["ext_context"];}
-if (isset($_GET["extension"]))	{$extension=$_GET["extension"];}
-	elseif (isset($_POST["extension"]))	{$extension=$_POST["extension"];}
-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["force_logout"]))	{$force_logout=$_GET["force_logout"];}
-	elseif (isset($_POST["force_logout"]))	{$force_logout=$_POST["force_logout"];}
-if (isset($_GET["fronter_display"]))	{$fronter_display=$_GET["fronter_display"];}
-	elseif (isset($_POST["fronter_display"]))	{$fronter_display=$_POST["fronter_display"];}
-if (isset($_GET["full_name"]))	{$full_name=$_GET["full_name"];}
-	elseif (isset($_POST["full_name"]))	{$full_name=$_POST["full_name"];}
-if (isset($_GET["fullname"]))	{$fullname=$_GET["fullname"];}
-	elseif (isset($_POST["fullname"]))	{$fullname=$_POST["fullname"];}
-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["group_color"]))	{$group_color=$_GET["group_color"];}
-	elseif (isset($_POST["group_color"]))	{$group_color=$_POST["group_color"];}
-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["groups"]))	{$groups=$_GET["groups"];}
-	elseif (isset($_POST["groups"]))	{$groups=$_POST["groups"];}
-if (isset($_GET["HKstatus"]))	{$HKstatus=$_GET["HKstatus"];}
-	elseif (isset($_POST["HKstatus"]))	{$HKstatus=$_POST["HKstatus"];}
-if (isset($_GET["hopper_level"]))	{$hopper_level=$_GET["hopper_level"];}
-	elseif (isset($_POST["hopper_level"]))	{$hopper_level=$_POST["hopper_level"];}
-if (isset($_GET["hotkey"]))	{$hotkey=$_GET["hotkey"];}
-	elseif (isset($_POST["hotkey"]))	{$hotkey=$_POST["hotkey"];}
-if (isset($_GET["hotkeys_active"]))	{$hotkeys_active=$_GET["hotkeys_active"];}
-	elseif (isset($_POST["hotkeys_active"]))	{$hotkeys_active=$_POST["hotkeys_active"];}
-if (isset($_GET["install_directory"]))	{$install_directory=$_GET["install_directory"];}
-	elseif (isset($_POST["install_directory"]))	{$install_directory=$_POST["install_directory"];}
-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_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_sql"]))	{$lead_filter_sql=$_GET["lead_filter_sql"];}
-	elseif (isset($_POST["lead_filter_sql"]))	{$lead_filter_sql=$_POST["lead_filter_sql"];}
-if (isset($_GET["lead_order"]))	{$lead_order=$_GET["lead_order"];}
-	elseif (isset($_POST["lead_order"]))	{$lead_order=$_POST["lead_order"];}
-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["load_leads"]))	{$load_leads=$_GET["load_leads"];}
-	elseif (isset($_POST["load_leads"]))	{$load_leads=$_POST["load_leads"];}
-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["local_gmt"]))	{$local_gmt=$_GET["local_gmt"];}
-	elseif (isset($_POST["local_gmt"]))	{$local_gmt=$_POST["local_gmt"];}
-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["login"]))	{$login=$_GET["login"];}
-	elseif (isset($_POST["login"]))	{$login=$_POST["login"];}
-if (isset($_GET["login_campaign"]))	{$login_campaign=$_GET["login_campaign"];}
-	elseif (isset($_POST["login_campaign"]))	{$login_campaign=$_POST["login_campaign"];}
-if (isset($_GET["login_pass"]))	{$login_pass=$_GET["login_pass"];}
-	elseif (isset($_POST["login_pass"]))	{$login_pass=$_POST["login_pass"];}
-if (isset($_GET["login_user"]))	{$login_user=$_GET["login_user"];}
-	elseif (isset($_POST["login_user"]))	{$login_user=$_POST["login_user"];}
-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["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["modify_leads"]))	{$modify_leads=$_GET["modify_leads"];}
-	elseif (isset($_POST["modify_leads"]))	{$modify_leads=$_POST["modify_leads"];}
-if (isset($_GET["monitor_prefix"]))	{$monitor_prefix=$_GET["monitor_prefix"];}
-	elseif (isset($_POST["monitor_prefix"]))	{$monitor_prefix=$_POST["monitor_prefix"];}
-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["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["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["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["old_extension"]))	{$old_extension=$_GET["old_extension"];}
-	elseif (isset($_POST["old_extension"]))	{$old_extension=$_POST["old_extension"];}
-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["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["OLDuser_group"]))	{$OLDuser_group=$_GET["OLDuser_group"];}
-	elseif (isset($_POST["OLDuser_group"]))	{$OLDuser_group=$_POST["OLDuser_group"];}
-if (isset($_GET["omit_phone_code"]))	{$omit_phone_code=$_GET["omit_phone_code"];}
-	elseif (isset($_POST["omit_phone_code"]))	{$omit_phone_code=$_POST["omit_phone_code"];}
-if (isset($_GET["outbound_cid"]))	{$outbound_cid=$_GET["outbound_cid"];}
-	elseif (isset($_POST["outbound_cid"]))	{$outbound_cid=$_POST["outbound_cid"];}
-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["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["pass"]))	{$pass=$_GET["pass"];}
-	elseif (isset($_POST["pass"]))	{$pass=$_POST["pass"];}
-if (isset($_GET["phone_ip"]))	{$phone_ip=$_GET["phone_ip"];}
-	elseif (isset($_POST["phone_ip"]))	{$phone_ip=$_POST["phone_ip"];}
-if (isset($_GET["phone_login"]))	{$phone_login=$_GET["phone_login"];}
-	elseif (isset($_POST["phone_login"]))	{$phone_login=$_POST["phone_login"];}
-if (isset($_GET["phone_number"]))	{$phone_number=$_GET["phone_number"];}
-	elseif (isset($_POST["phone_number"]))	{$phone_number=$_POST["phone_number"];}
-if (isset($_GET["phone_pass"]))	{$phone_pass=$_GET["phone_pass"];}
-	elseif (isset($_POST["phone_pass"]))	{$phone_pass=$_POST["phone_pass"];}
-if (isset($_GET["phone_type"]))	{$phone_type=$_GET["phone_type"];}
-	elseif (isset($_POST["phone_type"]))	{$phone_type=$_POST["phone_type"];}
-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["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["recording_exten"]))	{$recording_exten=$_GET["recording_exten"];}
-	elseif (isset($_POST["recording_exten"]))	{$recording_exten=$_POST["recording_exten"];}
-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["reset_hopper"]))	{$reset_hopper=$_GET["reset_hopper"];}
-	elseif (isset($_POST["reset_hopper"]))	{$reset_hopper=$_POST["reset_hopper"];}
-if (isset($_GET["reset_list"]))	{$reset_list=$_GET["reset_list"];}
-	elseif (isset($_POST["reset_list"]))	{$reset_list=$_POST["reset_list"];}
-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["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["scheduled_callbacks"]))	{$scheduled_callbacks=$_GET["scheduled_callbacks"];}
-	elseif (isset($_POST["scheduled_callbacks"]))	{$scheduled_callbacks=$_POST["scheduled_callbacks"];}
-if (isset($_GET["script_comments"]))	{$script_comments=$_GET["script_comments"];}
-	elseif (isset($_POST["script_comments"]))	{$script_comments=$_POST["script_comments"];}
-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_text"]))	{$script_text=$_GET["script_text"];}
-	elseif (isset($_POST["script_text"]))	{$script_text=$_POST["script_text"];}
-if (isset($_GET["selectable"]))	{$selectable=$_GET["selectable"];}
-	elseif (isset($_POST["selectable"]))	{$selectable=$_POST["selectable"];}
-if (isset($_GET["server_description"]))	{$server_description=$_GET["server_description"];}
-	elseif (isset($_POST["server_description"]))	{$server_description=$_POST["server_description"];}
-if (isset($_GET["server_id"]))	{$server_id=$_GET["server_id"];}
-	elseif (isset($_POST["server_id"]))	{$server_id=$_POST["server_id"];}
-if (isset($_GET["server_ip"]))	{$server_ip=$_GET["server_ip"];}
-	elseif (isset($_POST["server_ip"]))	{$server_ip=$_POST["server_ip"];}
-if (isset($_GET["stage"]))	{$stage=$_GET["stage"];}
-	elseif (isset($_POST["stage"]))	{$stage=$_POST["stage"];}
-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["status"]))	{$status=$_GET["status"];}
-	elseif (isset($_POST["status"]))	{$status=$_POST["status"];}
-if (isset($_GET["status_name"]))	{$status_name=$_GET["status_name"];}
-	elseif (isset($_POST["status_name"]))	{$status_name=$_POST["status_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"];}
-if (isset($_GET["sys_perf_log"]))	{$sys_perf_log=$_GET["sys_perf_log"];}
-	elseif (isset($_POST["sys_perf_log"]))	{$sys_perf_log=$_POST["sys_perf_log"];}
-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["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["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["user"]))	{$user=$_GET["user"];}
-	elseif (isset($_POST["user"]))	{$user=$_POST["user"];}
-if (isset($_GET["user_group"]))	{$user_group=$_GET["user_group"];}
-	elseif (isset($_POST["user_group"]))	{$user_group=$_POST["user_group"];}
-if (isset($_GET["user_level"]))	{$user_level=$_GET["user_level"];}
-	elseif (isset($_POST["user_level"]))	{$user_level=$_POST["user_level"];}
-if (isset($_GET["user_start"]))	{$user_start=$_GET["user_start"];}
-	elseif (isset($_POST["user_start"]))	{$user_start=$_POST["user_start"];}
-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["vd_server_logs"]))	{$vd_server_logs=$_GET["vd_server_logs"];}
-	elseif (isset($_POST["vd_server_logs"]))	{$vd_server_logs=$_POST["vd_server_logs"];}
-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["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["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["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["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["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["voicemail_ext"]))	{$voicemail_ext=$_GET["voicemail_ext"];}
-	elseif (isset($_POST["voicemail_ext"]))	{$voicemail_ext=$_POST["voicemail_ext"];}
-if (isset($_GET["voicemail_exten"]))	{$voicemail_exten=$_GET["voicemail_exten"];}
-	elseif (isset($_POST["voicemail_exten"]))	{$voicemail_exten=$_POST["voicemail_exten"];}
-if (isset($_GET["voicemail_id"]))	{$voicemail_id=$_GET["voicemail_id"];}
-	elseif (isset($_POST["voicemail_id"]))	{$voicemail_id=$_POST["voicemail_id"];}
-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["wrapup_message"]))	{$wrapup_message=$_GET["wrapup_message"];}
-	elseif (isset($_POST["wrapup_message"]))	{$wrapup_message=$_POST["wrapup_message"];}
-if (isset($_GET["wrapup_seconds"]))	{$wrapup_seconds=$_GET["wrapup_seconds"];}
-	elseif (isset($_POST["wrapup_seconds"]))	{$wrapup_seconds=$_POST["wrapup_seconds"];}
-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["vicidial_balance_active"]))	{$vicidial_balance_active=$_GET["vicidial_balance_active"];}
-	elseif (isset($_POST["vicidial_balance_active"]))	{$vicidial_balance_active=$_POST["vicidial_balance_active"];}
-if (isset($_GET["balance_trunks_offlimits"]))	{$balance_trunks_offlimits=$_GET["balance_trunks_offlimits"];}
-	elseif (isset($_POST["balance_trunks_offlimits"]))	{$balance_trunks_offlimits=$_POST["balance_trunks_offlimits"];}
-if (isset($_GET["dedicated_trunks"]))	{$dedicated_trunks=$_GET["dedicated_trunks"];}
-	elseif (isset($_POST["dedicated_trunks"]))	{$dedicated_trunks=$_POST["dedicated_trunks"];}
-if (isset($_GET["trunk_restriction"]))	{$trunk_restriction=$_GET["trunk_restriction"];}
-	elseif (isset($_POST["trunk_restriction"]))	{$trunk_restriction=$_POST["trunk_restriction"];}
-if (isset($_GET["campaigns"]))	{$campaigns=$_GET["campaigns"];}
-	elseif (isset($_POST["campaigns"]))	{$campaigns=$_POST["campaigns"];}
-
-
-
-
-	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 ###
-$adaptive_dropped_percentage = ereg_replace("[^0-9]","",$adaptive_dropped_percentage);
-$adaptive_latest_server_time = ereg_replace("[^0-9]","",$adaptive_latest_server_time);
-$admin_hangup_enabled = ereg_replace("[^0-9]","",$admin_hangup_enabled);
-$admin_hijack_enabled = ereg_replace("[^0-9]","",$admin_hijack_enabled);
-$admin_monitor_enabled = ereg_replace("[^0-9]","",$admin_monitor_enabled);
-$AFLogging_enabled = ereg_replace("[^0-9]","",$AFLogging_enabled);
-$agent_choose_ingroups = ereg_replace("[^0-9]","",$agent_choose_ingroups);
-$agentcall_manual = ereg_replace("[^0-9]","",$agentcall_manual);
-$agentonly_callbacks = ereg_replace("[^0-9]","",$agentonly_callbacks);
-$AGI_call_logging_enabled = ereg_replace("[^0-9]","",$AGI_call_logging_enabled);
-$allcalls_delay = ereg_replace("[^0-9]","",$allcalls_delay);
-$alter_agent_interface_options = ereg_replace("[^0-9]","",$alter_agent_interface_options);
-$am_message_exten = ereg_replace("[^0-9]","",$am_message_exten);
-$answer_transfer_agent = ereg_replace("[^0-9]","",$answer_transfer_agent);
-$ast_admin_access = ereg_replace("[^0-9]","",$ast_admin_access);
-$ast_delete_phones = ereg_replace("[^0-9]","",$ast_delete_phones);
-$attempt_delay = ereg_replace("[^0-9]","",$attempt_delay);
-$attempt_maximum = ereg_replace("[^0-9]","",$attempt_maximum);
-$auto_dial_next_number = ereg_replace("[^0-9]","",$auto_dial_next_number);
-$balance_trunks_offlimits = ereg_replace("[^0-9]","",$balance_trunks_offlimits);
-$call_parking_enabled = ereg_replace("[^0-9]","",$call_parking_enabled);
-$CallerID_popup_enabled = ereg_replace("[^0-9]","",$CallerID_popup_enabled);
-$campaign_detail = ereg_replace("[^0-9]","",$campaign_detail);
-$campaign_rec_exten = ereg_replace("[^0-9]","",$campaign_rec_exten);
-$campaign_vdad_exten = ereg_replace("[^0-9]","",$campaign_vdad_exten);
-$change_agent_campaign = ereg_replace("[^0-9]","",$change_agent_campaign);
-$closer_default_blended = ereg_replace("[^0-9]","",$closer_default_blended);
-$conf_exten = ereg_replace("[^0-9]","",$conf_exten);
-$conf_on_extension = ereg_replace("[^0-9]","",$conf_on_extension);
-$conferencing_enabled = ereg_replace("[^0-9]","",$conferencing_enabled);
-$ct_default_start = ereg_replace("[^0-9]","",$ct_default_start);
-$ct_default_stop = ereg_replace("[^0-9]","",$ct_default_stop);
-$ct_friday_start = ereg_replace("[^0-9]","",$ct_friday_start);
-$ct_friday_stop = ereg_replace("[^0-9]","",$ct_friday_stop);
-$ct_monday_start = ereg_replace("[^0-9]","",$ct_monday_start);
-$ct_monday_stop = ereg_replace("[^0-9]","",$ct_monday_stop);
-$ct_saturday_start = ereg_replace("[^0-9]","",$ct_saturday_start);
-$ct_saturday_stop = ereg_replace("[^0-9]","",$ct_saturday_stop);
-$ct_sunday_start = ereg_replace("[^0-9]","",$ct_sunday_start);
-$ct_sunday_stop = ereg_replace("[^0-9]","",$ct_sunday_stop);
-$ct_thursday_start = ereg_replace("[^0-9]","",$ct_thursday_start);
-$ct_thursday_stop = ereg_replace("[^0-9]","",$ct_thursday_stop);
-$ct_tuesday_start = ereg_replace("[^0-9]","",$ct_tuesday_start);
-$ct_tuesday_stop = ereg_replace("[^0-9]","",$ct_tuesday_stop);
-$ct_wednesday_start = ereg_replace("[^0-9]","",$ct_wednesday_start);
-$ct_wednesday_stop = ereg_replace("[^0-9]","",$ct_wednesday_stop);
-$DBX_port = ereg_replace("[^0-9]","",$DBX_port);
-$DBY_port = ereg_replace("[^0-9]","",$DBY_port);
-$dedicated_trunks = ereg_replace("[^0-9]","",$dedicated_trunks);
-$delete_call_times = ereg_replace("[^0-9]","",$delete_call_times);
-$delete_campaigns = ereg_replace("[^0-9]","",$delete_campaigns);
-$delete_filters = ereg_replace("[^0-9]","",$delete_filters);
-$delete_ingroups = ereg_replace("[^0-9]","",$delete_ingroups);
-$delete_lists = ereg_replace("[^0-9]","",$delete_lists);
-$delete_remote_agents = ereg_replace("[^0-9]","",$delete_remote_agents);
-$delete_scripts = ereg_replace("[^0-9]","",$delete_scripts);
-$delete_user_groups = ereg_replace("[^0-9]","",$delete_user_groups);
-$delete_users = ereg_replace("[^0-9]","",$delete_users);
-$dial_timeout = ereg_replace("[^0-9]","",$dial_timeout);
-$dialplan_number = ereg_replace("[^0-9]","",$dialplan_number);
-$drop_call_seconds = ereg_replace("[^0-9]","",$drop_call_seconds);
-$drop_exten = ereg_replace("[^0-9]","",$drop_exten);
-$enable_fast_refresh = ereg_replace("[^0-9]","",$enable_fast_refresh);
-$enable_persistant_mysql = ereg_replace("[^0-9]","",$enable_persistant_mysql);
-$fast_refresh_rate = ereg_replace("[^0-9]","",$fast_refresh_rate);
-$hopper_level = ereg_replace("[^0-9]","",$hopper_level);
-$hotkey = ereg_replace("[^0-9]","",$hotkey);
-$hotkeys_active = ereg_replace("[^0-9]","",$hotkeys_active);
-$list_id = ereg_replace("[^0-9]","",$list_id);
-$load_leads = ereg_replace("[^0-9]","",$delete_call_times);
-$max_vicidial_trunks = ereg_replace("[^0-9]","",$max_vicidial_trunks);
-$modify_call_times = ereg_replace("[^0-9]","",$modify_call_times);
-$modify_leads = ereg_replace("[^0-9]","",$modify_leads);
-$monitor_prefix = ereg_replace("[^0-9]","",$monitor_prefix);
-$number_of_lines = ereg_replace("[^0-9]","",$number_of_lines);
-$old_conf_exten = ereg_replace("[^0-9]","",$old_conf_exten);
-$outbound_cid = ereg_replace("[^0-9]","",$outbound_cid);
-$park_ext = ereg_replace("[^0-9]","",$park_ext);
-$park_on_extension = ereg_replace("[^0-9]","",$park_on_extension);
-$phone_number = ereg_replace("[^0-9]","",$phone_number);
-$QUEUE_ACTION_enabled = ereg_replace("[^0-9]","",$QUEUE_ACTION_enabled);
-$recording_exten = ereg_replace("[^0-9]","",$recording_exten);
-$remote_agent_id = ereg_replace("[^0-9]","",$remote_agent_id);
-$safe_harbor_exten = ereg_replace("[^0-9]","",$safe_harbor_exten);
-$telnet_port = ereg_replace("[^0-9]","",$telnet_port);
-$updater_check_enabled = ereg_replace("[^0-9]","",$updater_check_enabled);
-$user_level = ereg_replace("[^0-9]","",$user_level);
-$user_start = ereg_replace("[^0-9]","",$user_start);
-$user_switching_enabled = ereg_replace("[^0-9]","",$user_switching_enabled);
-$VDstop_rec_after_each_call = ereg_replace("[^0-9]","",$VDstop_rec_after_each_call);
-$VICIDIAL_park_on_extension = ereg_replace("[^0-9]","",$VICIDIAL_park_on_extension);
-$vicidial_recording = ereg_replace("[^0-9]","",$vicidial_recording);
-$vicidial_transfers = ereg_replace("[^0-9]","",$vicidial_transfers);
-$voicemail_button_enabled = ereg_replace("[^0-9]","",$voicemail_button_enabled);
-$voicemail_dump_exten = ereg_replace("[^0-9]","",$voicemail_dump_exten);
-$voicemail_ext = ereg_replace("[^0-9]","",$voicemail_ext);
-$voicemail_exten = ereg_replace("[^0-9]","",$voicemail_exten);
-$voicemail_id = ereg_replace("[^0-9]","",$voicemail_id);
-$wrapup_seconds = ereg_replace("[^0-9]","",$wrapup_seconds);
-
-### 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);
-$omit_phone_code = ereg_replace("[^NY]","",$omit_phone_code);
-$available_only_ratio_tally = ereg_replace("[^NY]","",$available_only_ratio_tally);
-$sys_perf_log = ereg_replace("[^NY]","",$sys_perf_log);
-$vicidial_balance_active = ereg_replace("[^NY]","",$vicidial_balance_active);
-$vd_server_logs = ereg_replace("[^NY]","",$vd_server_logs);
-
-### ALPHA-NUMERIC ONLY ###
-$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);
-$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);
-$adaptive_maximum_level = ereg_replace("[^\.0-9]","",$adaptive_maximum_level);
-$phone_ip = ereg_replace("[^\.0-9]","",$phone_ip);
-$old_server_ip = ereg_replace("[^\.0-9]","",$old_server_ip);
-$computer_ip = ereg_replace("[^\.0-9]","",$computer_ip);
-
-### ALPHA-NUMERIC and spaces and hash and star and comma
-$xferconf_a_dtmf = ereg_replace("[^ \,\*\#0-9a-zA-Z]","",$xferconf_a_dtmf);
-$xferconf_b_dtmf = ereg_replace("[^ \,\*\#0-9a-zA-Z]","",$xferconf_b_dtmf);
-
-### ALPHACAPS-NUMERIC
-$xferconf_a_number = ereg_replace("[^0-9A-Z]","",$xferconf_a_number);
-$xferconf_b_number = ereg_replace("[^0-9A-Z]","",$xferconf_b_number);
-
-### ALPHA-NUMERIC and underscore and dash
-$agi_output = ereg_replace("[^-\_0-9a-zA-Z]","",$agi_output);
-$ASTmgrSECRET = ereg_replace("[^-\_0-9a-zA-Z]","",$ASTmgrSECRET);
-$ASTmgrUSERNAME = ereg_replace("[^-\_0-9a-zA-Z]","",$ASTmgrUSERNAME);
-$ASTmgrUSERNAMElisten = ereg_replace("[^-\_0-9a-zA-Z]","",$ASTmgrUSERNAMElisten);
-$ASTmgrUSERNAMEsend = ereg_replace("[^-\_0-9a-zA-Z]","",$ASTmgrUSERNAMEsend);
-$ASTmgrUSERNAMEupdate = ereg_replace("[^-\_0-9a-zA-Z]","",$ASTmgrUSERNAMEupdate);
-$call_time_id = ereg_replace("[^-\_0-9a-zA-Z]","",$call_time_id);
-$campaign_id = ereg_replace("[^-\_0-9a-zA-Z]","",$campaign_id);
-$CoNfIrM = ereg_replace("[^-\_0-9a-zA-Z]","",$CoNfIrM);
-$DBX_database = ereg_replace("[^-\_0-9a-zA-Z]","",$DBX_database);
-$DBX_pass = ereg_replace("[^-\_0-9a-zA-Z]","",$DBX_pass);
-$DBX_user = ereg_replace("[^-\_0-9a-zA-Z]","",$DBX_user);
-$DBY_database = ereg_replace("[^-\_0-9a-zA-Z]","",$DBY_database);
-$DBY_pass = ereg_replace("[^-\_0-9a-zA-Z]","",$DBY_pass);
-$DBY_user = ereg_replace("[^-\_0-9a-zA-Z]","",$DBY_user);
-$dial_method = ereg_replace("[^-\_0-9a-zA-Z]","",$dial_method);
-$dial_status_a = ereg_replace("[^-\_0-9a-zA-Z]","",$dial_status_a);
-$dial_status_b = ereg_replace("[^-\_0-9a-zA-Z]","",$dial_status_b);
-$dial_status_c = ereg_replace("[^-\_0-9a-zA-Z]","",$dial_status_c);
-$dial_status_d = ereg_replace("[^-\_0-9a-zA-Z]","",$dial_status_d);
-$dial_status_e = ereg_replace("[^-\_0-9a-zA-Z]","",$dial_status_e);
-$ext_context = ereg_replace("[^-\_0-9a-zA-Z]","",$ext_context);
-$group_id = ereg_replace("[^-\_0-9a-zA-Z]","",$group_id);
-$lead_filter_id = ereg_replace("[^-\_0-9a-zA-Z]","",$lead_filter_id);
-$local_call_time = ereg_replace("[^-\_0-9a-zA-Z]","",$local_call_time);
-$login = ereg_replace("[^-\_0-9a-zA-Z]","",$login);
-$login_campaign = ereg_replace("[^-\_0-9a-zA-Z]","",$login_campaign);
-$login_pass = ereg_replace("[^-\_0-9a-zA-Z]","",$login_pass);
-$login_user = ereg_replace("[^-\_0-9a-zA-Z]","",$login_user);
-$next_agent_call = ereg_replace("[^-\_0-9a-zA-Z]","",$next_agent_call);
-$old_campaign_id = ereg_replace("[^-\_0-9a-zA-Z]","",$old_campaign_id);
-$old_server_id = ereg_replace("[^-\_0-9a-zA-Z]","",$old_server_id);
-$OLDuser_group = ereg_replace("[^-\_0-9a-zA-Z]","",$OLDuser_group);
-$park_file_name = ereg_replace("[^-\_0-9a-zA-Z]","",$park_file_name);
-$pass = ereg_replace("[^-\_0-9a-zA-Z]","",$pass);
-$phone_login = ereg_replace("[^-\_0-9a-zA-Z]","",$phone_login);
-$phone_pass = ereg_replace("[^-\_0-9a-zA-Z]","",$phone_pass);
-$PHP_AUTH_PW = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_PW);
-$PHP_AUTH_USER = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_USER);
-$protocol = ereg_replace("[^-\_0-9a-zA-Z]","",$protocol);
-$server_id = ereg_replace("[^-\_0-9a-zA-Z]","",$server_id);
-$stage = ereg_replace("[^-\_0-9a-zA-Z]","",$stage);
-$state_rule = ereg_replace("[^-\_0-9a-zA-Z]","",$state_rule);
-$status = ereg_replace("[^-\_0-9a-zA-Z]","",$status);
-$trunk_restriction = ereg_replace("[^-\_0-9a-zA-Z]","",$trunk_restriction);
-$user = ereg_replace("[^-\_0-9a-zA-Z]","",$user);
-$user_group = ereg_replace("[^-\_0-9a-zA-Z]","",$user_group);
-$VICIDIAL_park_on_filename = ereg_replace("[^-\_0-9a-zA-Z]","",$VICIDIAL_park_on_filename);
-
-### 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
-$adaptive_dl_diff_target = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$adaptive_dl_diff_target);
-$adaptive_intensity = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$adaptive_intensity);
-$asterisk_version = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$asterisk_version);
-$call_time_comments = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$call_time_comments);
-$call_time_name = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$call_time_name);
-$campaign_name = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$campaign_name);
-$campaign_rec_filename = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$campaign_rec_filename);
-$company = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$company);
-$full_name = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$full_name);
-$fullname = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$fullname);
-$group_name = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$group_name);
-$HKstatus = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$HKstatus);
-$lead_filter_comments = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$lead_filter_comments);
-$lead_filter_name = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$lead_filter_name);
-$list_name = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$list_name);
-$local_gmt = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$local_gmt);
-$phone_type = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$phone_type);
-$picture = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$picture);
-$script_comments = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$script_comments);
-$script_name = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$script_name);
-$server_description = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$server_description);
-$status = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$status);
-$status_name = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$status_name);
-$wrapup_message = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$wrapup_message);
-
-### ALPHA-NUMERIC and underscore and dash and slash and at and dot
-$call_out_number_group = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$call_out_number_group);
-$client_browser = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$client_browser);
-$DBX_server = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$DBX_server);
-$DBY_server = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$DBY_server);
-$dtmf_send_extension = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$dtmf_send_extension);
-$extension = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$extension);
-$install_directory = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$install_directory);
-$old_extension = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$old_extension);
-$telnet_host = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$telnet_host);
-
-### remove semi-colons ###
-$lead_filter_sql = ereg_replace(";","",$lead_filter_sql);
-
-### VARIABLES TO BE mysql_real_escape_string ###
-# $web_form_address
-
-### VARIABLES not filtered at all ###
-# $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
-# 60808-1147 - changed filtering for and added instructions for consutative transfers
-# 60816-1552 - added allcalls_delay start delay for recordings in vicidial.php
-# 60817-2226 - fixed bug that would not allow lead recycling of non-selectable statuses
-# 60821-1543 - added option to Omit Phone Code while dialing in vicidial
-# 60821-1625 - added ALLFORCE recording option for campaign_recording
-# 60823-1154 - added fields for adaptive dialing
-# 60824-1326 - added adaptive_latest_target_gmt for ADAPT_TAPERED dial method
-# 60825-1205 - added adaptive_intensity for ADAPT_ dial methods
-# 60828-1019 - changed adaptive_latest_target_gmt to adaptive_latest_server_time
-# 60828-1115 - added adaptive_dl_diff_target and changed intensity dropdown
-# 60927-1246 - added astguiclient/admin.php functions under SERVERS tab
-# 61002-1402 - added fields for vicidial balance trunk controls
-# 61003-1123 - added functions for vicidial_server_trunks records
-# 61109-1022 - added Emergency VDAC Jam Clear function to Campaign Detail screen
-# 61110-1502 - add ability to select NONE in dial statuses, new list_id must not be < 100
-# 61122-1228 - added user group campaign restrictions
-# 61122-1535 - changed script_text to unfiltered and added more variables to SCRIPTS
-# 61129-1028 - Added headers to Users and Phones with clickable order-by titles
-#
-
-# 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 = '2.0.73';
-$build = '61129-1028';
-
-$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];
-			$LOGuser_group				=$row[5];
-			$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];
-			$LOGast_admin_access		=$row[16];
-			$LOGast_delete_phones		=$row[17];
-			$LOGdelete_scripts			=$row[18];
-			$LOGdelete_filters			=$row[29];
-			$LOGalter_agent_interface	=$row[30];
-			$LOGdelete_call_times		=$row[32];
-			$LOGmodify_call_times		=$row[33];
-
-			$stmt="SELECT allowed_campaigns from vicidial_user_groups where user_group='$LOGuser_group';";
-			$rslt=mysql_query($stmt, $link);
-			$row=mysql_fetch_row($rslt);
-			$LOGallowed_campaigns		=$row[0];
-
-		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==11111111111)	{$hh='server';		echo "ADDIEREN SIE NEUES TELEFON";}
-if ($ADD==111111111111)	{$hh='server';		echo "ADDIEREN SIE NEUEN BEDIENER";}
-if ($ADD==1111111111111)	{$hh='server';		echo "ADDIEREN SIE NEUE KONFERENZ";}
-if ($ADD==11111111111111)	{$hh='server';		echo "ADD NEW VICIDIAL CONFERENCE";}
-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==21111111111)	{$hh='server';		echo "ADDIEREN DES NEUEN TELEFONS";}
-if ($ADD==211111111111)	{$hh='server';		echo "ADDIEREN DES NEUEN BEDIENERS";}
-if ($ADD==221111111111)	{$hh='server';		echo "ADDIEREN DES NEUEN STAMM-SATZES DES BEDIENER-VICIDIAL";}
-if ($ADD==2111111111111)	{$hh='server';		echo "ADDIEREN DER NEUEN KONFERENZ";}
-if ($ADD==21111111111111)	{$hh='server';		echo "ADDING NEW VICIDIAL CONFERENCE";}
-if ($ADD==3)			{$hh='users';		echo "Ändern Sie Benutzer";}
-if ($ADD==30)			{$hh='campaigns';	echo "Kampagne Nicht Erlaubt";}
-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==31111111111)	{$hh='server';		echo "ÄNDERN SIE TELEFON";}
-if ($ADD==311111111111)	{$hh='server';		echo "ÄNDERN SIE BEDIENER";}
-if ($ADD==3111111111111)	{$hh='server';		echo "ÄNDERN SIE KONFERENZ";}
-if ($ADD==31111111111111)	{$hh='server';		echo "MODIFY VICIDIAL CONFERENCE";}
-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==41111111111)	{$hh='server';		echo "ÄNDERN SIE TELEFON";}
-if ($ADD==411111111111)	{$hh='server';		echo "ÄNDERN SIE BEDIENER";}
-if ($ADD==421111111111)	{$hh='server';		echo "ÄNDERN SIE STAMM-SATZ DES BEDIENER-VICIDIAL";}
-if ($ADD==4111111111111)	{$hh='server';		echo "ÄNDERN SIE KONFERENZ";}
-if ($ADD==41111111111111)	{$hh='server';		echo "MODIFY VICIDIAL CONFERENCE";}
-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==53)			{$hh='campaigns';	echo "Dringlichkeits-VDAC Stau-Freier Raum";}
-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==51111111111)	{$hh='server';		echo "DELETE PHONE";}
-if ($ADD==511111111111)	{$hh='server';		echo "DELETE SERVER";}
-if ($ADD==5111111111111)	{$hh='server';		echo "DELETE CONFERENCE";}
-if ($ADD==51111111111111)	{$hh='server';		echo "DELETE VICIDIAL CONFERENCE";}
-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==63)			{$hh='campaigns';	echo "Dringlichkeits-VDAC Stau-Freier Raum";}
-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==61111111111)	{$hh='server';		echo "DELETE PHONE";}
-if ($ADD==611111111111)	{$hh='server';		echo "DELETE SERVER";}
-if ($ADD==621111111111)	{$hh='server';		echo "STAMM-SATZ DES LÖSCHUNG-BEDIENER-VICIDIAL";}
-if ($ADD==6111111111111)	{$hh='server';		echo "DELETE CONFERENCE";}
-if ($ADD==61111111111111)	{$hh='server';		echo "DELETE VICIDIAL CONFERENCE";}
-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==10000000000)	{$hh='server';		echo "TELEFON-LISTE";}
-if ($ADD==100000000000)	{$hh='server';		echo "BEDIENER-LISTE";}
-if ($ADD==1000000000000)	{$hh='server';		echo "KONFERENZ-LISTE";}
-if ($ADD==10000000000000)	{$hh='server';		echo "VICIDIAL KONFERENZ-LISTE";}
-if ($ADD==55)			{$hh='users';		echo "Suchform";}
-if ($ADD==551)			{$hh='users';		echo "SUCHTELEFONE";}
-if ($ADD==66)			{$hh='users';		echo "Suchresultate";}
-if ($ADD==661)			{$hh='users';		echo "SUCHE RUFT RESULTATE AN";}
-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") or (strlen($ADD)==12) )
-	{
-	##### 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++;
-		}
-
-	##### BEGIN 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 .= " -";}
-	}
-	##### END get inbound groups listing for checkboxes #####
-
-
-	##### BEGIN get campaigns listing for checkboxes #####
-	if ( ($ADD==211111) or ($ADD==311111) or ($ADD==411111) or ($ADD==511111) or ($ADD==611111) )
-	{
-		if ( ($ADD==211111) or ($ADD==311111) or ($ADD==511111) or ($ADD==611111) )
-		{
-		$stmt="SELECT allowed_campaigns from vicidial_user_groups where user_group='$user_group';";
-		$rslt=mysql_query($stmt, $link);
-		$row=mysql_fetch_row($rslt);
-		$allowed_campaigns =	$row[0];
-		$allowed_campaigns = preg_replace("/ -$/","",$allowed_campaigns);
-		$campaigns = explode(" ", $allowed_campaigns);
-		echo "<!--  $allowed_campaigns -->";
-		}
-
-	$campaigns_value='';
-	$campaigns_list='<B><input type="checkbox" name="campaigns[]" value="-ALL-CAMPAIGNS-"';
-		$p=0;
-		while ($p<100)
-			{
-			if (eregi('ALL-CAMPAIGNS',$campaigns[$p])) 
-				{
-				$campaigns_list.=" CHECKED";
-				$campaigns_value .= " -ALL-CAMPAIGNS- -";
-				}
-			$p++;
-			}
-	$campaigns_list.="> ALL-CAMPAIGNS - BENUTZER KÖNNEN JEDE MÖGLICHE KAMPAGNE ANSEHEN</B><BR>\n";
-
-	$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);
-
-	$o=0;
-	while ($campaigns_to_print > $o)
-		{
-		$rowx=mysql_fetch_row($rslt);
-		$campaign_id_value = $rowx[0];
-		$campaign_name_value = $rowx[1];
-		$campaigns_list .= "<input type=\"checkbox\" name=\"campaigns[]\" value=\"$campaign_id_value\"";
-		$p=0;
-		while ($p<100)
-			{
-			if ($campaign_id_value == $campaigns[$p]) 
-				{
-			#	echo "<!--  X $p|$campaign_id_value|$campaigns[$p]| -->";
-				$campaigns_list .= " CHECKED";
-				$campaigns_value .= " $campaign_id_value";
-				}
-		#	echo "<!--  O $p|$campaign_id_value|$campaigns[$p]| -->";
-			$p++;
-			}
-		$campaigns_list .= "> $campaign_id_value - $campaign_name_value<BR>\n";
-		$o++;
-		}
-	if (strlen($campaigns_value)>2) {$campaigns_value .= " -";}
-	}
-	##### END get campaigns listing for checkboxes #####
-
-
-	if ( (strlen($ADD)==11) or (strlen($ADD)>12) )
-	{
-	##### 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++;
-		}
-	}
-
-
-
-$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_CAMPAIGNSTABELLE

-
-
-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. - -
-
-
-Vorwahlknopf-Methode - Dieses fangen ist die Weise, wie auf das Wählen zu definieren, stattfinden soll. Wenn HANDBUCH dann das auto_dial_level bei 0 verschlossen ist, es sei denn Vorwahlknopf-Methode geändert wird. Wenn VERHÄLTNIS dann der Normal, der eine Zeilenzahl für aktive Mittel wählt. ADAPT_HARD_LIMIT wählt predictively bis zum fallengelassenen Prozentsatz und dann erlaubt nicht das konkurrenzfähige Wählen, sobald die Tropfenbegrenzung erreicht wird, bis der Prozentsatz unten wieder geht. ADAPT_TAPERED läßt laufenden Überschuß den fallengelassenen Prozentsatz zur Hälfte erste der Verschiebung zu - wie durch das call_time definiert, das für Kampagne vorgewählt wird und erhält strenger, während die Verschiebung weitergeht. ADAPT_AVERAGE versucht, einen Durchschnitt oder den fallengelassenen Prozentsatz beizubehalten so, die konkurrenzfähig harte Begrenzungen nicht wie die anderen zwei Methoden auferlegen. Sie können nicht das Selbstvorwahlknopf-Niveau ändern, wenn Sie in irgendwelchen der ANPASSENVORWAHLKNOPFMETHODEN sind. Nur der Dialer kann das Vorwahlknopfniveau ändern wenn im vorbestimmten wählenden Modus. - -
-
-
-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. - -
-
-
-Vorhandenes nur Tally - dieses fangen auf, wenn Satz zu YINCALL und WARTESCHLANGE Statusmittel ausläßt, wenn er die ZahlAnrufen zum Vorwahlknopf wenn nicht in MANUELLEN Vorwahlknopfmoduserrechnet. Rückstellung ist N. - -
-
-
-Tropfen-Prozentsatz-Begrenzung - dieses fangen ist auf, wohinSie die Begrenzung auf den Prozentsatz der fallengelassenen Anrufe,die einstellten Sie beim Verwenden eineranpassungsfähig-vorbestimmten Vorwahlknopfmethode möchten, nichtMANUELL oder des VERHÄLTNISSES. - -
-
-
-Maximum paßt den waagerecht ausgerichteten Vorwahlknopf an - diesesfangen ist auf, wohin Sie die Begrenzung auf die Begrenzungauf das numbr der Linien, die einstellten Sie gewählt pro Mittel beimVerwenden einer anpassungsfähig-vorbestimmten Vorwahlknopfmethodemöchten, nicht MANUELL oder des VERHÄLTNISSES. Diese Zahl kann alsdas Selbstvorwahlknopf-Niveau höher sein, wenn Ihre Kleinteile esstützen. Wert muß eine positive Nr. grösser als eine sein und kannDezimalstellen Rückstellung 3.0 haben. - -
-
-
-Neueste Bediener-Zeit - dieses fangen wird verwendet nurdurch die ADAPT_TAPERED Vorwahlknopfmethode auf. Sie sollten in dieStunde hereinkommen und Minute, um der Sie stoppen, diese Kampagne zuersuchen, 2100 würde bedeuten, daß Sie stoppen, diese Kampagne bei9PM Bedienerzeit zu wählen. Dieses läßt den sich verjüngendenAlgorithmus entscheiden wie konkurrenzfähig zum Vorwahlknopf durch,wie lang Sie haben, bis Sie fertiges Benennen sind. - -
-
-
-Passen Sie Intensität Modifizierfaktor an - dieses fangenwird verwendet, die vorbestimmte höhere oder niedrigere Intensitätzu justieren entweder auf. Das höhere eine positive Zahl, die Sievorwählen, grösser der Dialer den schreitenen Anruf erhöht, wenn esgeht oben und langsam der Dialer den schreitenen Anruf verringert,wenn es geht unten. Das niedriger die negative Zahl, Sie vorwählenhier, langsam erhöht der Dialer den schreitenen Anruf und schnellersenkt der Dialer den schreitenen Anruf, wenn es geht unten.Rückstellung ist 0. Dieses fangen wird verwendet nicht durchden HANDBUCH- oder VERHÄLTNIS-Vorwahlknopf Methoden auf. - -
-
-
-Vorwahlknopf-waagerecht ausgerichtetes Unterschied-Ziel - diesesfangen wird verwendet zu definieren auf, ob Sie Haben einerspezifischen Anzahl von den Mitteln zielen möchten, die Anruf- oderAnklopfenmittel warten. Z.B. wenn Sie immer auf Durchschnitt einerMittel haben möchten frei, Anrufe sofort zu nehmen, würden Siedieses bis -1 einstellen, wenn Sie ein immer haben zielen möchtenersuchen um den Einfluß, der ein Mittel wartet, das Sie dieses bis 1einstellen würden. Rückstellung ist 0. Dieses fangen wirdverwendet nicht durch den HANDBUCH- oder VERHÄLTNIS-VorwahlknopfMethoden auf. - -
-
-
-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. - -
-
-
-Lassen Sie Telefon-Code aus - dieses fangen erlaubt Ihnen,das phone_code auszulassen auffangen beim Wählen innerhalbVICIDIAL auf. Zum Beispiel wenn Sie in Großbritannien vonGroßbritannien wählen, würden Sie 44 innen haben, wie Ihrphone_code für alle Leitungen auffangen, aber Sie gerade 10Stellen in Ihrem dialplan extensions.conf wählen möchten, um Anrufeanstelle von 44 dann 10 Stellen zu setzen. Rückstellung ist N. - -
-
-
-Kampagne CallerID - Dieses fangen zuläßt das Senden einer kundenspezifischen callerid Zahl bei den outbound Anrufen auf. Dieses ist die Zahl, die oben auf dem callerid der Person darstellen würde, die, Sie anrufen. Die Rückstellung ist UNBEKANNT. Wenn Sie T1 benutzen, oder Eß, zum dieser Wahl heraus zu wählen nur vorhanden ist, wenn Sie PRIs verwenden - ISDN Tß oder Eß - die die kundenspezifische callerid Eigenschaft haben, die eingeschaltet wird, arbeitet dieses nicht mit Berauben-Spitze Service - RBS- Stromkreise. Dieses arbeitet auch durch das meiste VOIP - SIP oder IAX Stammversorger, die dynamisches outbound callerID erlauben. Das kundenspezifische callerID trifft nur auf die Anrufe zu, die direkt für die VICIDIAL Kampagne gesetzt werden, benennt jede mögliche 3. Partei, oder Übertragungen senden nicht das kundenspezifische callerID. ANMERKUNG: UNBEKANNT oder PRIVAT in auffangen manchmal sich setzen erbringt das Senden Ihrer Rückstellung callerID Zahl durch Ihre Fördermaschine mit den Anrufen. Sie können dieses prüfen wünschen und fangen 0000000000 in das callerid sich zu setzen anstatt auf, wenn Sie nicht Ihnen CallerID schicken möchten. - -
-
-
-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, welchesNiveau der Aufnahme auf dieser Kampagne erlaubt wird. NIE sperrtAufnahme auf dem Klienten. ONDEMAND ist die Rückstellung und erlaubtdem Vertreter zu notieren zu beginnen und, zu stoppen, wie gebraucht.ALLCALLS beginnt Aufnahme auf dem Klienten, wann immer ein Anruf zueinem Mittel geschickt wird. ALLFORCE beginnt Aufnahme auf demKlienten, wann immer ein Anruf zu einem Mittel geschickt wird, das demMittel keine Wahl gibt, um zu notieren zu stoppen. Für ALLCALLS undALLFORCE gibt es eine Wahl, zum der Aufnahme zu benutzen verzögert,um unten auf sehr kurze Aufnahmen und recude Anlagen-Belastung zuschneiden. - -
-
-
-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. - -
-
-
-Das Notieren verzögert - für ALLCALLS und ALLFORCE nur Aufnahme.Dieser Einstellung Wille verzögert das Beginnen der Aufnahme beiallen Anrufen für die Zahl den Sekunden, die diesbezüglichspezifiziert werden, auffangen. Rückstellung ist 0. - -
-
-
-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. Wenn Sie beratende Übertragungen erlauben möchten, ein fronter zueinem genauerem, können Sie CXFER setzen, da eins derZahl-zu-Vorwahlknopf Voreinstellungen und des korrekten Dialstringsgesendet wird, um eine lokale beratende Übertragung, dann dieMitteldose gerechtes LEAVE-3WAY-CALL und Bewegung an zu tun zu ihremfolgenden Anruf. Wenn Sie blinde Übertragungen der Kunden auf einenVICIDIAL AGI Index für die Protokollierung oder ein IVR erlaubenmöchten, legen Sie dann AXFER in den Zahl-zu-Vorwahlknopfauffangen. Sie können eine kundenspezifische Verlängerungnach dem AXFER oder dem CXFER auch spezifizieren, zum Beispiel wennSie interne beratende Übertragungen anstelle vom Einheimischen tunmöchten, würden Sie CXFER90009 in den Zahl-zu-Vorwahlknopfauffangen einsetzen. - -
-
-
-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. Must be a number greater than 100. - -
-
-
-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. Wenn Sie beratende Übertragungen erlauben möchten, ein fronter zueinem genauerem, können Sie CXFER setzen, da eins derZahl-zu-Vorwahlknopf Voreinstellungen und des korrekten Dialstringsgesendet wird, um eine lokale beratende Übertragung, dann dieMitteldose gerechtes LEAVE-3WAY-CALL und Bewegung an zu tun zu ihremfolgenden Anruf. Wenn Sie blinde Übertragungen der Kunden auf einenVICIDIAL AGI Index für die Protokollierung oder ein IVR erlaubenmöchten, legen Sie dann AXFER in den Zahl-zu-Vorwahlknopfauffangen. Sie können eine kundenspezifische Verlängerungnach dem AXFER oder dem CXFER auch spezifizieren, zum Beispiel wennSie interne beratende Übertragungen anstelle vom Einheimischen tunmöchten, würden Sie CXFER90009 in den Zahl-zu-Vorwahlknopfauffangen einsetzen. - -
-
-
-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. - -
-
-
-Erlaubte Kampagnen - dieses ist eine auswählbare Liste der Kampagnen,zu denen Mitglieder dieser Benutzergruppe innen protokollieren könnenin. Die ALL-CAMPAIGNS Wahl erlaubt den Benutzern in dieser Gruppe, injeder möglicher Kampagne auf dem System innen zu sehen und zuprotokollieren. - - - - - -



- -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, lead_id, campaign, phone_login, group, channel_group, SQLdate, epoch, uniqueid, customer_zap_channel, server_ip, SIPexten, session_id. 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?

You can also use an iframe to load a separate window within the SCRIPT tab, here is an example with prepopulated variables: - -
-<iframe src="http://astguiclient.sf.net/test_VICIDIAL_output.php?lead_id=--A--lead_id--B--&vendor_id=--A--vendor_lead_code--B--&list_id=--A--list_id--B--&gmt_offset_now=--A--gmt_offset_now--B--&phone_code=--A--phone_code--B--&phone_number=--A--phone_number--B--&title=--A--title--B--&first_name=--A--first_name--B--&middle_initial=--A--middle_initial--B--&last_name=--A--last_name--B--&address1=--A--address1--B--&address2=--A--address2--B--&address3=--A--address3--B--&city=--A--city--B--&state=--A--state--B--&province=--A--province--B--&postal_code=--A--postal_code--B--&country_code=--A--country_code--B--&gender=--A--gender--B--&date_of_birth=--A--date_of_birth--B--&alt_phone=--A--alt_phone--B--&email=--A--email--B--&security_phrase=--A--security_phrase--B--&comments=--A--comments--B--&user=--A--user--B--&campaign=--A--campaign--B--&phone_login=--A--phone_login--B--&fronter=--A--fronter--B--&closer=--A--user--B--&group=--A--group--B--&channel_group=--A--group--B--&SQLdate=--A--SQLdate--B--&epoch=--A--epoch--B--&uniqueid=--A--uniqueid--B--&customer_zap_channel=--A--customer_zap_channel--B--&server_ip=--A--server_ip--B--&SIPexten=--A--SIPexten--B--&session_id=--A--session_id--B--&phone=--A--phone--B--" style="width:580;height:290;background-color:transparent;" scrolling="auto" frameborder="0" allowtransparency="true" id="popupFrame" name="popupFrame" width="460" height="290"> -</iframe> -
- -
-
-
-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 -
- -
NOTES: The Excel Lead loader functionality is enabled by a series of perl scripts and needs to have a properly configured /etc/astguiclient.conf 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. - - - - -



- - - - - - -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 ' - -
-
-
-System Leistung - die Einstellung dieser Wahl auf Y ermöglicht derProtokollierung von System Leistung Notfall für die Bedienermaschineeinschließlich Anlagen-Belastung, System Prozesse undSternchenführungen im Gebrauch. Rückstellung ist N. - -
-
-
-Bediener-Maschinenbordbücher - die Einstellung dieser Wahl auf Yermöglicht der Protokollierung aller VICIDIAL bezogenen Indexe zuihren Textmaschinenbordbuchakten. Die Einstellung dieses auf N stopptSchreiben Maschinenbordbücher zu den Akten für diese Prozesse, auchdie Schirmprotokollierung des Sternchens ist untauglich, wenn diesesauf N eingestellt wird, wenn Sternchen begonnen wird. Rückstellungist Y. - -
-
-
-AGI ausgegeben - die Einstellung dieser Wahl auf KEINE sperrt Ausgangvon allen VICIDIAL bezogenen AGI Indexen. Die Einstellung dieses aufSTDERR schickt das AGI, das zum Sternchen CLI ausgegeben wird. DieEinstellung dieses auf AKTE schickt den Ausgang zu einer Akte imMaschinenbordbuchverzeichnis. Die Einstellung dieses auf BEIDE schicktAusgang zum Sternchen CLI und zu einer Maschinenbordbuchakte.Rückstellung ist AKTE. - -
-
-
-VICIDIAL Balance Wählen - dieses einstellend, fangen Sie zuY läßt den Bediener Balance Anrufe für Kampagnen in VICIDIAL legenauf, damit das definierte Vorwahlknopfniveau getroffen werden kann,selbst wenn es keine Mittel gibt, die in diese Kampagne auf diesemBediener geloggt werden. Rückstellung ist N. - -
-
-
-VICIDIAL Balance Offlimits - diese Einstellung definiert die ZahlStämmen, um die VICIDIAL Balance nicht zu erlauben, die wählt, um zuverwenden. Z.B. wenn Sie haben, wird 40 maximale vicidial Stämme undBalance offlimits bis 10 eingestellt, die Sie nur in der LageSIND, 30Hauptluftlinien für VICIDIAL Balance das Wählen zu benutzen.Rückstellung ist 0. - - -



- -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. - - - - -



- -VICIDIAL_SERVER_TRUNKSTABELLE

-
-
-VICIDIAL Bediener-Stämme erlaubt Ihnen, die gehenden Leitungeneinzuschränken, die auf diesem Bediener für die Kampagne benutztwerden, die auf einer Prokampagne Grundlage wählt. Sie haben dieWahl, zum einer spezifischen Zeilenzahl durch nur eine Kampagneverwendet zu werden aufzuheben,, sowie das Lassen dieser Kampagneüber seine reservierten Linien laufen in was Linien geöffnetbleiben, wie, lang an den Gruppenzeilen, die durch vicidial auf diesemBediener benutzt werden, sind kleiner als die Maximum VICIDIALStammeinstellung. Erlaubt Haben nicht irgendwelche dieserAufzeichnungen die Kampagne, die die Linie zuerst wählt, um da vieleLinien zu haben, während sie unter der Maximum VICIDIAL erhalten kannStammeinstellung. - - -







-







-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 = 'VENDOR:LEAD;CODE'; - $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'; - $RGlead_id = '1234'; - $RGcampaign = 'TESTCAMP'; - $RGphone_login = 'gs102'; - $RGgroup = 'TESTCAMP'; - $RGchannel_group = 'TESTCAMP'; - $RGSQLdate = date("Y-m-d H:i:s"); - $RGepoch = date("U"); - $RGuniqueid = '1163095830.4136'; - $RGcustomer_zap_channel = 'Zap/1-1'; - $RGserver_ip = '10.10.10.15'; - $RGSIPexten = 'SIP/gs102'; - $RGsession_id = '8600051'; - -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]; - -if (eregi("iframe src",$script_text)) - { - $vendor_lead_code = eregi_replace(' ','+',$vendor_lead_code); - $list_id = eregi_replace(' ','+',$list_id); - $gmt_offset_now = eregi_replace(' ','+',$gmt_offset_now); - $phone_code = eregi_replace(' ','+',$phone_code); - $phone_number = eregi_replace(' ','+',$phone_number); - $title = eregi_replace(' ','+',$title); - $first_name = eregi_replace(' ','+',$first_name); - $middle_initial = eregi_replace(' ','+',$middle_initial); - $last_name = eregi_replace(' ','+',$last_name); - $address1 = eregi_replace(' ','+',$address1); - $address2 = eregi_replace(' ','+',$address2); - $address3 = eregi_replace(' ','+',$address2); - $city = eregi_replace(' ','+',$city); - $state = eregi_replace(' ','+',$state); - $province = eregi_replace(' ','+',$province); - $postal_code = eregi_replace(' ','+',$postal_code); - $country_code = eregi_replace(' ','+',$country_code); - $gender = eregi_replace(' ','+',$gender); - $date_of_birth = eregi_replace(' ','+',$date_of_birth); - $alt_phone = eregi_replace(' ','+',$alt_phone); - $email = eregi_replace(' ','+',$email); - $security_phrase = eregi_replace(' ','+',$security_phrase); - $comments = eregi_replace(' ','+',$comments); - $RGfullname = eregi_replace(' ','+',$RGfullname); - $RGuser = eregi_replace(' ','+',$RGuser); - $RGlead_id = eregi_replace(' ','+',$RGlead_id); - $RGcampaign = eregi_replace(' ','+',$RGcampaign); - $RGphone_login = eregi_replace(' ','+',$RGphone_login); - $RGgroup = eregi_replace(' ','+',$RGgroup); - $RGchannel_group = eregi_replace(' ','+',$RGchannel_group); - $RGSQLdate = eregi_replace(' ','+',$RGSQLdate); - $RGepoch = eregi_replace(' ','+',$RGepoch); - $RGuniqueid = eregi_replace(' ','+',$RGuniqueid); - $RGcustomer_zap_channel = eregi_replace(' ','+',$RGcustomer_zap_channel); - $RGserver_ip = eregi_replace(' ','+',$RGserver_ip); - $RGSIPexten = eregi_replace(' ','+',$RGSIPexten); - $RGsession_id = eregi_replace(' ','+',$RGsession_id); - } - -$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--fronter--B--',"$RGuser",$script_text); -$script_text = eregi_replace('--A--user--B--',"$RGuser",$script_text); -$script_text = eregi_replace('--A--lead_id--B--',"$RGlead_id",$script_text); -$script_text = eregi_replace('--A--campaign--B--',"$RGcampaign",$script_text); -$script_text = eregi_replace('--A--phone_login--B--',"$RGphone_login",$script_text); -$script_text = eregi_replace('--A--group--B--',"$RGgroup",$script_text); -$script_text = eregi_replace('--A--channel_group--B--',"$RGchannel_group",$script_text); -$script_text = eregi_replace('--A--SQLdate--B--',"$RGSQLdate",$script_text); -$script_text = eregi_replace('--A--epoch--B--',"$RGepoch",$script_text); -$script_text = eregi_replace('--A--uniqueid--B--',"$RGuniqueid",$script_text); -$script_text = eregi_replace('--A--customer_zap_channel--B--',"$RGcustomer_zap_channel",$script_text); -$script_text = eregi_replace('--A--server_ip--B--',"$RGserver_ip",$script_text); -$script_text = eregi_replace('--A--SIPexten--B--',"$RGSIPexten",$script_text); -$script_text = eregi_replace('--A--session_id--B--',"$RGsession_id",$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';} -if ($hh=='server') {$server_hh='bgcolor ="#FF99FF"'; $server_fc='BLACK';} # pink - else {$server_hh=''; $server_fc='WHITE';} - -?> - - - - -\n"; -echo "
English Deutsch
- - - - - - - - - - - - - - - - - 1) { - ?> - - 1) { - ?> - - 1) { - ?> - - 1) { - ?> - - 1) { - ?> - - 1) { - ?> - - 1) { - ?> - - 1) { - ?> - - 1) { - ?> - - 1) { - ?> - -\n"; - echo "Sie haben nicht die Rechte, um diese Seite anzusehen. Bitte zurück gehen.\n"; - } - -} -if (strlen($reports_hh) > 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 > SIZE=1> PHONES > REPORTS
  LISTE BENUTZER     |     ADDIEREN Sie Einen NEUEN BENUTZER     |     SUCHE NACH Einem BENUTZER
  ADDIEREN SIE KAMPAGNE     |     LISTE KAMPAGNEN     |     REALTIME KAMPAGNEN SUMMARY
  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
  PHONES   |   ADD PHONE   |   SERVERS   |   ADD SERVER   |   CONFERENCES   |   ADD CONFERENCE   |   VD CONFERENCES   |   ADD VD CONFERENCE
 
-
\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"; -} - - -###################### -# ADD=11111111111 display the ADD NEW PHONE SCREEN -###################### - -if ($ADD==11111111111) -{ -echo "
\n"; -echo ""; - -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=111111111111 display the ADD NEW SERVER SCREEN -###################### - -if ($ADD==111111111111) -{ -echo "
\n"; -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=1111111111111 display the ADD NEW CONFERENCE SCREEN -###################### - -if ($ADD==1111111111111) -{ -echo "
\n"; -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=11111111111111 display the ADD NEW VICIDIAL CONFERENCE SCREEN -###################### - -if ($ADD==11111111111111) -{ -echo "
\n"; -echo ""; - -echo "
ADD A NEW VICIDIAL CONFERENCE\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"; -} - - - -###################################################################################################### -###################################################################################################### -####### 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 ($list_id < 100) 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"; - echo "
Liste Identifikation must be greater than 100\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(user_group,group_name,allowed_campaigns) values('$user_group','$group_name','-ALL-CAMPAIGNS-');"; - $rslt=mysql_query($stmt, $link); - - echo "
BENUTZER-GRUPPE ADDIERT: $user_group\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|$stmt|\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','$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; -} - - -###################### -# ADD=21111111111 adds new phone to the system -###################### - -if ($ADD==21111111111) -{ -echo "
\n"; - 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=31111111111; -} - - -###################### -# ADD=211111111111 adds new server to the system -###################### - -if ($ADD==211111111111) -{ -echo "
\n"; - 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=311111111111; -} - - -###################### -# ADD=221111111111 adds the new vicidial server trunk record to the system -###################### - -if ($ADD==221111111111) -{ - echo ""; - $stmt="SELECT max_vicidial_trunks from servers where server_ip='$server_ip';"; - $rslt=mysql_query($stmt, $link); - $rowx=mysql_fetch_row($rslt); - $MAXvicidial_trunks = $rowx[0]; - - $stmt="SELECT sum(dedicated_trunks) from vicidial_server_trunks where server_ip='$server_ip' and campaign_id !='$campaign_id';"; - $rslt=mysql_query($stmt, $link); - $rowx=mysql_fetch_row($rslt); - $SUMvicidial_trunks = ($rowx[0] + $dedicated_trunks); - - if ($SUMvicidial_trunks > $MAXvicidial_trunks) - { - echo "
VICIDIAL BEDIENER-STAMM-SATZ NICHT ADDIERT - die Zahl vicidial Stämmen ist zu hoch: $SUMvicidial_trunks / $MAXvicidial_trunks\n"; - } - else - { - $stmt="SELECT count(*) from vicidial_server_trunks where campaign_id='$campaign_id' and server_ip='$server_ip';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0] > 0) - {echo "
VICIDIAL BEDIENER-STAMM-SATZ NICHT ADDIERT - es gibt bereits eine Bediener-Stamm Aufzeichnung für diese Kampagne\n";} - else - { - if ( (strlen($campaign_id) < 2) or (strlen($server_ip) < 7) or (strlen($dedicated_trunks) < 1) or (strlen($trunk_restriction) < 1) ) - { - echo "
VICIDIAL BEDIENER-STAMM-SATZ NICHT ADDIERT - Gehen Sie bitte zurück und betrachten Sie die Daten, die Sieeingaben\n"; - echo "
Kampagne muß zwischen 3 und 8 Buchstaben lang sein\n"; - echo "
server_ip verzögert muß mindestens 7 Buchstaben sein\n"; - echo "
Stämme müssen eine Stelle von 0 bis 9999 sein\n"; - } - else - { - echo "
VICIDIAL BEDIENER-STAMM-SATZ ADDIERT: $campaign_id - $server_ip - $dedicated_trunks - $trunk_restriction\n"; - - $stmt="INSERT INTO vicidial_server_trunks(server_ip,campaign_id,dedicated_trunks,trunk_restriction) values('$server_ip','$campaign_id','$dedicated_trunks','$trunk_restriction');"; - $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 VICIDIAL TRUNK |$PHP_AUTH_USER|$ip|$stmt|\n"); - fclose($fp); - } - } - } - } -$ADD=311111111111; -} - - -###################### -# ADD=2111111111111 adds new conference to the system -###################### - -if ($ADD==2111111111111) -{ -echo "
\n"; - 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=3111111111111; -} - - -###################### -# ADD=21111111111111 adds new vicidial conference to the system -###################### - -if ($ADD==21111111111111) -{ -echo "
\n"; - echo ""; - $stmt="SELECT count(*) from vicidial_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 "
VICIDIAL CONFERENCE NOT ADDED - there is already a vicidial conference in the system with this ID and server\n";} - else - { - if ( (strlen($conf_exten) < 1) or (strlen($server_ip) < 7) ) - {echo "
VICIDIAL KONFERENZ NICHT ADDIERT - gehen Sie bitte zurück und betrachten Siedie Daten, die Sie eingaben\n";} - else - { - echo "
VICIDIAL KONFERENZ FÜGTE HINZU\n"; - - $stmt="INSERT INTO vicidial_conferences (conf_exten,server_ip) values('$conf_exten','$server_ip');"; - $rslt=mysql_query($stmt, $link); - } - } -$ADD=31111111111111; -} - - - -###################################################################################################### -###################################################################################################### -####### 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"; - - if ($dial_method == 'RATIO') - { - if ($auto_dial_level < 1) {$auto_dial_level = "1.0";} - $adlSQL = "auto_dial_level='$auto_dial_level',"; - } - else - { - if ($dial_method == 'MANUAL') - { - $auto_dial_level='0'; - $adlSQL = "auto_dial_level='0',"; - } - else - { - $adlSQL = ""; - if ($auto_dial_level < 1) - { - $auto_dial_level = "1.0"; - $adlSQL = "auto_dial_level='$auto_dial_level',"; - } - } - } - $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', $adlSQL 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',allcalls_delay='$allcalls_delay',omit_phone_code='$omit_phone_code',dial_method='$dial_method',available_only_ratio_tally='$available_only_ratio_tally',adaptive_dropped_percentage='$adaptive_dropped_percentage',adaptive_maximum_level='$adaptive_maximum_level',adaptive_latest_server_time='$adaptive_latest_server_time',adaptive_intensity='$adaptive_intensity',adaptive_dl_diff_target='$adaptive_dl_diff_target' 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 IN('READY','QUEUE','DONE');"; - $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|$stmt|\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"; - - if ($dial_method == 'RATIO') - { - if ($auto_dial_level < 1) {$auto_dial_level = "1.0";} - $adlSQL = "auto_dial_level='$auto_dial_level',"; - } - else - { - if ($dial_method == 'MANUAL') - { - $auto_dial_level='0'; - $adlSQL = "auto_dial_level='0',"; - } - else - { - $adlSQL = ""; - if ($auto_dial_level < 1) - { - $auto_dial_level = "1.0"; - $adlSQL = "auto_dial_level='$auto_dial_level',"; - } - } - } - $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', $adlSQL lead_filter_id='$lead_filter_id',dial_method='$dial_method',adaptive_intensity='$adaptive_intensity' 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 IN('READY','QUEUE','DONE');;"; - $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|$stmt|\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',allowed_campaigns='$campaigns_value' 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|$stmt|\n"); - fclose($fp); - } - } - -$ADD=311111; # go to user group modification form below -} - -###################### -# ADD=4111111 modify script in the system -###################### - -if ($ADD==4111111) -{ - echo "\n"; - echo "\n"; - 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='$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 -} - - -###################### -# ADD=41111111111 modify phone record in the system -###################### - -if ($ADD==41111111111) -{ - 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); - } - } -$ADD=31111111111; # go to phone modification form below -} - - -###################### -# ADD=411111111111 modify server record in the system -###################### - -if ($ADD==411111111111) -{ - 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', sys_perf_log='$sys_perf_log', vd_server_logs='$vd_server_logs', agi_output='$agi_output', vicidial_balance_active='$vicidial_balance_active', balance_trunks_offlimits='$balance_trunks_offlimits' where server_id='$old_server_id';"; - $rslt=mysql_query($stmt, $link); - } - } - } -$ADD=311111111111; # go to server modification form below -} - - -###################### -# ADD=421111111111 modify vicidial server trunks record in the system -###################### - -if ($ADD==421111111111) -{ - echo ""; - $stmt="SELECT max_vicidial_trunks from servers where server_ip='$server_ip';"; - $rslt=mysql_query($stmt, $link); - $rowx=mysql_fetch_row($rslt); - $MAXvicidial_trunks = $rowx[0]; - - $stmt="SELECT sum(dedicated_trunks) from vicidial_server_trunks where server_ip='$server_ip' and campaign_id !='$campaign_id';"; - $rslt=mysql_query($stmt, $link); - $rowx=mysql_fetch_row($rslt); - $SUMvicidial_trunks = ($rowx[0] + $dedicated_trunks); - - if ($SUMvicidial_trunks > $MAXvicidial_trunks) - { - echo "
VICIDIAL BEDIENER-STAMM-SATZ NICHT ADDIERT - die Zahl vicidial Stämmen ist zu hoch: $SUMvicidial_trunks / $MAXvicidial_trunks\n"; - } - else - { - if ( (strlen($campaign_id) < 2) or (strlen($server_ip) < 7) or (strlen($dedicated_trunks) < 1) or (strlen($trunk_restriction) < 1) ) - { - echo "
VICIDIAL BEDIENER-STAMM-SATZ NICHT GEÄNDERT - Gehen Sie bitte zurück und betrachten Sie die Daten, die Sieeingaben\n"; - echo "
Kampagne muß zwischen 3 und 8 Buchstaben lang sein\n"; - echo "
server_ip verzögert muß mindestens 7 Buchstaben sein\n"; - echo "
Stämme müssen eine Stelle von 0 bis 9999 sein\n"; - } - else - { - echo "
VICIDIAL BEDIENER-STAMM-SATZ ÄNDERTE: $campaign_id - $server_ip - $dedicated_trunks - $trunk_restriction\n"; - - $stmt="UPDATE vicidial_server_trunks SET dedicated_trunks='$dedicated_trunks',trunk_restriction='$trunk_restriction' where campaign_id='$campaign_id' and server_ip='$server_ip';"; - $rslt=mysql_query($stmt, $link); - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|ÄNDERN SIE BEDIENER TRUNK |$PHP_AUTH_USER|$ip|$stmt|\n"); - fclose($fp); - } - } - } -$ADD=311111111111; # go to server modification form below -} - - -###################### -# ADD=4111111111111 modify conference record in the system -###################### - -if ($ADD==4111111111111) -{ - 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); - } - } -$ADD=3111111111111; # go to conference modification form below -} - - -###################### -# ADD=41111111111111 modify vicidial conference record in the system -###################### - -if ($ADD==41111111111111) -{ - echo ""; - - $stmt="SELECT count(*) from vicidial_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 "
VICIDIAL 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 "
VICIDIAL KONFERENZ NICHT GEÄNDERT - gehen Sie bitte zurück und betrachten Siedie Daten, die Sie eingaben\n";} - else - { - echo "
VICIDIAL KONFERENZ ÄNDERTE: $conf_exten\n"; - - $stmt="UPDATE vicidial_conferences set conf_exten='$conf_exten',server_ip='$server_ip',extension='$extension' where conf_exten='$old_conf_exten';"; - $rslt=mysql_query($stmt, $link); - } - } -$ADD=31111111111111; # go to vicidial conference 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=53 confirmation before Emergency VDAC Jam Clear - deletes oldest LIVE vicidial_auto_call record -###################### - -if ($ADD==53) -{ - if (eregi('IN',$stage)) - {$group_id=$campaign_id;} - echo ""; - - if (strlen($campaign_id) < 2) - { - echo "
VDAC NICHT LÖSCHTE FÜR KAMPAGNE - 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 "
VDAC AUSLÖSEBESTÄTIGUNG: $campaign_id\n"; - echo "

Klicken Sie hier, um das älteste zu löschen LEBEN Aufzeichnung inVDAC für $campaign_id


\n"; - } - -# go to campaign modification below -if (eregi('IN',$stage)) - {$ADD='3111';} -else - {$ADD='31';} -} - -###################### -# 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 state 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 -} - - -###################### -# ADD=51111111111 confirmation before deletion of phone record -###################### - -if ($ADD==51111111111) -{ - echo ""; - - if ( (strlen($extension) < 2) or (strlen($server_ip) < 7) or ($LOGast_delete_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='31111111111'; # go to phone modification below -} - - -###################### -# ADD=511111111111 confirmation before deletion of server record -###################### - -if ($ADD==511111111111) -{ - echo ""; - - if ( (strlen($server_id) < 2) or (strlen($server_ip) < 7) or ($LOGast_delete_phones < 1) ) - { - echo "
BEDIENERNOT DELETED - Gehen Sie bitte zurück und betrachten Sie die Daten, die Sieeingaben\n"; - echo "
Bediener Identifikation be at least 2 characters in length\n"; - echo "
Bediener IP be at least 7 characters in length\n"; - } - else - { - echo "
BEDIENERDELETION CONFIRMATION: $server_id - $server_ip\n"; - echo "

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


\n"; - } -$ADD='311111111111'; # go to server modification below -} - - -###################### -# ADD=5111111111111 confirmation before deletion of conference record -###################### - -if ($ADD==5111111111111) -{ - echo ""; - - if ( (strlen($conf_exten) < 2) or (strlen($server_ip) < 7) or ($LOGast_delete_phones < 1) ) - { - echo "
CONFERENCE NOT DELETED - Gehen Sie bitte zurück und betrachten Sie die Daten, die Sieeingaben\n"; - echo "
Conference must be at least 2 characters in length\n"; - echo "
Bediener IP be at least 7 characters in length\n"; - } - else - { - echo "
CONFERENCE DELETION CONFIRMATION: $conf_exten - $server_ip\n"; - echo "

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


\n"; - } -$ADD='3111111111111'; # go to conference modification below -} - - -###################### -# ADD=51111111111111 confirmation before deletion of vicidial conference record -###################### - -if ($ADD==51111111111111) -{ - echo ""; - - if ( (strlen($conf_exten) < 2) or (strlen($server_ip) < 7) or ($LOGast_delete_phones < 1) ) - { - echo "
VICIDIAL CONFERENCE NOT DELETED - Gehen Sie bitte zurück und betrachten Sie die Daten, die Sieeingaben\n"; - echo "
Conference must be at least 2 characters in length\n"; - echo "
Bediener IP be at least 7 characters in length\n"; - } - else - { - echo "
VICIDIAL CONFERENCE DELETION CONFIRMATION: $conf_exten - $server_ip\n"; - echo "

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


\n"; - } -$ADD='31111111111111'; # go to vicidial conference 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 from 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=63 Emergency VDAC Jam Clear -###################### - -if ($ADD==63) -{ - if (eregi('IN',$stage)) - {$group_id=$campaign_id;} - echo ""; - - if (strlen($campaign_id) < 2) - { - echo "
VDAC NICHT LÖSCHTE FÜR KAMPAGNE - 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_auto_calls where status='LIVE' and campaign_id='$campaign_id' order by call_time 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|EMERGENCY VDAC CLEAR|$PHP_AUTH_USER|$ip|campaign_id='$campaign_id'|\n"); - fclose($fp); - } - echo "
LETZTES VDAC SATZ GELÖSCHT FÜR KAMPAGNE: $campaign_id\n"; - echo "

\n"; - } - -# go to campaign modification below -if (eregi('IN',$stage)) - {$ADD='3111';} -else - {$ADD='31';} -} - - -###################### -# 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 -} - - -###################### -# ADD=61111111111 delete phone record -###################### - -if ($ADD==61111111111) -{ - echo ""; - - if ( (strlen($extension) < 2) or (strlen($server_ip) < 7) or ($CoNfIrM != 'YES') or ($LOGast_delete_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='10000000000'; # go to phone list -} - - -###################### -# ADD=611111111111 delete server record -###################### - -if ($ADD==611111111111) -{ - echo ""; - - if ( (strlen($server_id) < 2) or (strlen($server_ip) < 7) or ($CoNfIrM != 'YES') or ($LOGast_delete_phones < 1) ) - { - echo "
BEDIENERNOT DELETED - Gehen Sie bitte zurück und betrachten Sie die Daten, die Sieeingaben\n"; - echo "
Bediener Identifikation be at least 2 characters in length\n"; - echo "
Bediener IP be at least 7 characters in length\n"; - } - else - { - $stmt="DELETE from servers where server_id='$server_id' 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 SERVER!!|$PHP_AUTH_USER|$ip|server_id='$server_id'|server_ip='$server_ip'|\n"); - fclose($fp); - } - echo "
BEDIENERDELETION COMPLETED: $server_id - $server_ip\n"; - echo "

\n"; - } -$ADD='100000000000'; # go to server list -} - - -###################### -# ADD=621111111111 delete vicidial server trunk record in the system -###################### - -if ($ADD==621111111111) -{ - echo ""; - - if ( (strlen($campaign_id) < 2) or (strlen($server_ip) < 7) ) - { - echo "
VICIDIAL BEDIENER-STAMM-SATZ NICHT GELÖSCHT - Gehen Sie bitte zurück und betrachten Sie die Daten, die Sieeingaben\n"; - echo "
Kampagne muß zwischen 3 und 8 Buchstaben lang sein\n"; - echo "
server_ip verzögert muß mindestens 7 Buchstaben sein\n"; - } - else - { - echo "
VICIDIAL BEDIENER-STAMM-SATZ GELÖSCHT: $campaign_id - $server_ip\n"; - - $stmt="DELETE FROM vicidial_server_trunks where campaign_id='$campaign_id' and server_ip='$server_ip';"; - $rslt=mysql_query($stmt, $link); - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|DELETE BEDIENERTRUNK |$PHP_AUTH_USER|$ip|$stmt|\n"); - fclose($fp); - } - } - -$ADD=311111111111; # go to server modification form below -} - - -###################### -# ADD=6111111111111 delete conference record -###################### - -if ($ADD==6111111111111) -{ - echo ""; - - if ( (strlen($conf_exten) < 2) or (strlen($server_ip) < 7) or ($CoNfIrM != 'YES') or ($LOGast_delete_phones < 1) ) - { - echo "
CONFERENCE NOT DELETED - Gehen Sie bitte zurück und betrachten Sie die Daten, die Sieeingaben\n"; - echo "
Conference be at least 2 characters in length\n"; - echo "
Bediener IP be at least 7 characters in length\n"; - } - else - { - $stmt="DELETE from conferences where conf_exten='$conf_exten' 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 CONF!!!!|$PHP_AUTH_USER|$ip|conf_exten='$conf_exten'|server_ip='$server_ip'|\n"); - fclose($fp); - } - echo "
CONFERENCE DELETION COMPLETED: $conf_exten - $server_ip\n"; - echo "

\n"; - } -$ADD='1000000000000'; # go to conference list -} - - -###################### -# ADD=61111111111111 delete vicidial conference record -###################### - -if ($ADD==61111111111111) -{ - echo ""; - - if ( (strlen($conf_exten) < 2) or (strlen($server_ip) < 7) or ($CoNfIrM != 'YES') or ($LOGast_delete_phones < 1) ) - { - echo "
VICIDIAL CONFERENCE NOT DELETED - Gehen Sie bitte zurück und betrachten Sie die Daten, die Sieeingaben\n"; - echo "
Conference be at least 2 characters in length\n"; - echo "
Bediener IP be at least 7 characters in length\n"; - } - else - { - $stmt="DELETE from vicidial_conferences where conf_exten='$conf_exten' 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 CONF!!!!|$PHP_AUTH_USER|$ip|conf_exten='$conf_exten'|server_ip='$server_ip'|\n"); - fclose($fp); - } - echo "
VICIDIAL CONFERENCE DELETION COMPLETED: $conf_exten - $server_ip\n"; - echo "

\n"; - } -$ADD='10000000000000'; # go to vicidial conference 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) and ( (!eregi("$campaign_id",$LOGallowed_campaigns)) and (!eregi("ALL-CAMPAIGNS",$LOGallowed_campaigns)) ) ) - {$ADD=30;} # send to not allowed screen if not in vicidial_user_groups allowed_campaigns list - -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]; - $allcalls_delay = $row[44]; - $omit_phone_code = $row[45]; - $dial_method = $row[46]; - $available_only_ratio_tally = $row[47]; - $adaptive_dropped_percentage = $row[48]; - $adaptive_maximum_level = $row[49]; - $adaptive_latest_server_time = $row[50]; - $adaptive_intensity = $row[51]; - $adaptive_dl_diff_target = $row[52]; - -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"; - -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
Vorwahlknopf-Methode: $NWB#vicidial_campaigns-dial_method$NWE
Selbstvorwahlknopf-Niveau: (0 = off)$NWB#vicidial_campaigns-auto_dial_level$NWE
Vorhandenes Nur Tally: $NWB#vicidial_campaigns-available_only_ratio_tally$NWE
Tropfen-Prozentsatz-Begrenzung: % $NWB#vicidial_campaigns-adaptive_dropped_percentage$NWE
Maximum Paßt Vorwahlknopf-Niveau An: number only $NWB#vicidial_campaigns-adaptive_maximum_level$NWE
Neueste Bediener-Zeit: 4 nur Stellen $NWB#vicidial_campaigns-adaptive_latest_server_time$NWE
Passen Sie Intensität Modifizierfaktor An: $NWB#vicidial_campaigns-adaptive_intensity$NWE
Vorwahlknopf-Waagerecht ausgerichtetes Unterschied-Ziel: $NWB#vicidial_campaigns-adaptive_dl_diff_target$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
Lassen Sie Telefon-Code Aus: $NWB#vicidial_campaigns-omit_phone_code$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
Das Notieren Verzögert: in seconds$NWB#vicidial_campaigns-allcalls_delay$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 "Click here to see a VDAD report for this campaign

\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"; -echo "EMERGENCY VDAC CLEAR FOR THIS CAMPAIGN

\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) and ( (!eregi("$campaign_id",$LOGallowed_campaigns)) and (!eregi("ALL-CAMPAIGNS",$LOGallowed_campaigns)) ) ) - {$ADD=30;} # send to not allowed screen if not in vicidial_user_groups allowed_campaigns list - -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]; - $dial_method = $row[46]; - $adaptive_intensity = $row[51]; - -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 "\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
Vorwahlknopf-Methode: $NWB#vicidial_campaigns-dial_method$NWE
Selbstvorwahlknopf-Niveau: (0 = off)$NWB#vicidial_campaigns-auto_dial_level$NWE
Passen Sie Intensität Modifizierfaktor An: $NWB#vicidial_campaigns-adaptive_intensity$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 "Click here to see a VDAD report for this campaign

\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=31 campaign not allowed -###################### - -if ($ADD==30) -{ -echo "
\n"; - echo ""; -echo "You do not have permission to view campaign $campaign_id\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 "Click here to see a report for this campaign

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

EMERGENCY VDAC CLEAR FOR THIS IN-GROUP

\n"; - 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 "\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
Erlaubte Kampagnen: \n"; -echo "$campaigns_list"; -echo "$NWB#vicidial_user_groups-allowed_campaigns$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=31111111111 modify phone record in the system -###################### - -if ($ADD==31111111111) -{ -echo "
\n"; - 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 ($LOGast_delete_phones > 0) - { - echo "

LÖSCHEN SIE DIESES TELEFON\n"; - } -} - - -###################### -# ADD=311111111111 modify server record in the system -###################### - -if ($ADD==311111111111) -{ -echo "
\n"; - echo ""; - - $stmt="SELECT * from servers where server_id='$server_id' or server_ip='$server_ip';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $server_id = $row[0]; - $server_ip = $row[2]; - -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 "\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
VICIDIAL Balance Wählen: $NWB#servers-vicidial_balance_active$NWE
VICIDIAL Balance Offlimits: $NWB#servers-balance_trunks_offlimits$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
System Leistung: $NWB#servers-sys_perf_log$NWE
Bediener-Maschinenbordbücher: $NWB#servers-vd_server_logs$NWE
AGI Ausgang: $NWB#servers-agi_output$NWE
\n"; - - -### vicidial server trunk records for this server -echo "

VICIDIAL STÄMME FÜR DIESEN BEDIENER:   $NWB#vicidial_server_trunks$NWE
\n"; -echo "\n"; -echo "\n"; - - $stmt="SELECT * from vicidial_server_trunks where server_ip='$server_ip' order by campaign_id"; - $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 "
KAMPAGNE STÄMME BESCHRÄNKUNG DELETE
$rowx[1]
\n"; - echo "\n"; - echo "\n"; - echo "
LÖSCHUNG
\n"; - -echo "
ADDIEREN SIE NEUEN STAMM-SATZ DES BEDIENER-VICIDIAL
\n"; -echo "\n"; -echo "\n"; -echo "TRUNKS:
\n"; -echo "KAMPAGNE:
\n"; -echo "RESTRICTION:
\n"; -echo "
\n"; - -echo "

\n"; - - -### list of phones on this server -echo "
\n"; -echo "
TELEFONE INNERHALB DIESES BEDIENERS:
\n"; -echo "\n"; -echo "\n"; - - $active_phones = 0; - $inactive_phones = 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_phones++; $camp_lists .= "'$rowx[0]',";} - if (ereg("N", $rowx[1])) {$inactive_phones++;} - - 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"; - - -### list of conferences on this server -echo "
\n"; -echo "
CONFERENCES WITHIN THIS SERVER:
\n"; -echo "\n"; -echo "\n"; - - $active_confs = 0; - $stmt="SELECT conf_exten,extension from conferences 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++; - $active_confs++; - - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - - echo "\n"; - } - -echo "
CONFERENCEVERLÄNGERUNG
$rowx[0]$rowx[2]

\n"; - - -### list of vicidial conferences on this server -echo "
\n"; -echo "
VICIDIAL CONFERENCES WITHIN THIS SERVER:
\n"; -echo "\n"; -echo "\n"; - - $active_vdconfs = 0; - $stmt="SELECT conf_exten,extension from vicidial_conferences 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++; - $active_vdconfs++; - - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - - echo "\n"; - } - -echo "
VD CONFERENCEVERLÄNGERUNG
$rowx[0]$rowx[2]

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

\n"; -echo "Dieser Bediener hat $active_confs active conferences

\n"; -echo "Dieser Bediener hat $active_vdconfs active vicidial conferences

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

DELETE THIS SERVER\n"; - } -} - - -###################### -# ADD=3111111111111 modify conference record in the system -###################### - -if ($ADD==3111111111111) -{ -echo "
\n"; - 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); - $conf_exten = $row[0]; - $server_ip = $row[1]; - -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"; -if ($LOGast_delete_phones > 0) - { - echo "

DELETE THIS CONFERENCE\n"; - } -} - - -###################### -# ADD=31111111111111 modify vicidial conference record in the system -###################### - -if ($ADD==31111111111111) -{ -echo "
\n"; - echo ""; - - $stmt="SELECT * from vicidial_conferences where conf_exten='$conf_exten' and server_ip='$server_ip';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $conf_exten = $row[0]; - $server_ip = $row[1]; - -echo "
MODIFY A VICIDIAL CONFERENCE RECORD: $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"; -if ($LOGast_delete_phones > 0) - { - echo "

DELETE THIS VICIDIAL CONFERENCE\n"; - } -} - - - - - - - -###################### -# 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 "
LEADLIST KAMPAGNEENTRYDATUMCALLBACKDATUMUSERRECIPIENTSTATUS
$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 ""; - -$USERlink='stage=USERIDDOWN'; -$NAMElink='stage=NAMEDOWN'; -$LEVELlink='stage=LEVELDOWN'; -$GROUPlink='stage=GROUPDOWN'; -$SQLorder='order by full_name'; -if (eregi("USERIDUP",$stage)) {$SQLorder='order by user asc'; $USERlink='stage=USERIDDOWN';} -if (eregi("USERIDDOWN",$stage)) {$SQLorder='order by user desc'; $USERlink='stage=USERIDUP';} -if (eregi("NAMEUP",$stage)) {$SQLorder='order by full_name asc'; $NAMElink='stage=NAMEDOWN';} -if (eregi("NAMEDOWN",$stage)) {$SQLorder='order by full_name desc'; $NAMElink='stage=NAMEUP';} -if (eregi("LEVELUP",$stage)) {$SQLorder='order by user_level asc'; $LEVELlink='stage=LEVELDOWN';} -if (eregi("LEVELDOWN",$stage)) {$SQLorder='order by user_level desc'; $LEVELlink='stage=LEVELUP';} -if (eregi("GROUPUP",$stage)) {$SQLorder='order by user_group asc'; $GROUPlink='stage=GROUPDOWN';} -if (eregi("GROUPDOWN",$stage)) {$SQLorder='order by user_group desc'; $GROUPlink='stage=GROUPUP';} - $stmt="SELECT * from vicidial_users $SQLorder"; - $rslt=mysql_query($stmt, $link); - $people_to_print = mysql_num_rows($rslt); - -echo "
BENUTZER-AUFLISTUNGEN:\n"; -echo "
\n"; -echo ""; -echo ""; -echo ""; -echo ""; -echo ""; -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 "
USER IDFULL NAMELEVELGROUPLINKS
$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 ""; - - $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"; -} - -###################### -# ADD=10000000000 display all phones -###################### -if ($ADD==10000000000) -{ -echo "
\n"; -echo ""; - -$EXTENlink='stage=EXTENDOWN'; -$PROTOlink='stage=PROTODOWN'; -$SERVERlink='stage=SERVERDOWN'; -$STATUSlink='stage=STATUSDOWN'; -$SQLorder='order by extension,server_ip'; -if (eregi("EXTENUP",$stage)) {$SQLorder='order by extension asc'; $EXTENlink='stage=EXTENDOWN';} -if (eregi("EXTENDOWN",$stage)) {$SQLorder='order by extension desc'; $EXTENlink='stage=EXTENUP';} -if (eregi("PROTOUP",$stage)) {$SQLorder='order by protocol asc'; $PROTOlink='stage=PROTODOWN';} -if (eregi("PROTODOWN",$stage)) {$SQLorder='order by protocol desc'; $PROTOlink='stage=PROTOUP';} -if (eregi("SERVERUP",$stage)) {$SQLorder='order by server_ip asc'; $SERVERlink='stage=SERVERDOWN';} -if (eregi("SERVERDOWN",$stage)) {$SQLorder='order by server_ip desc'; $SERVERlink='stage=SERVERUP';} -if (eregi("STATUSUP",$stage)) {$SQLorder='order by status asc'; $STATUSlink='stage=STATUSDOWN';} -if (eregi("STATUSDOWN",$stage)) {$SQLorder='order by status desc'; $STATUSlink='stage=STATUSUP';} - $stmt="SELECT * from phones $SQLorder"; - $rslt=mysql_query($stmt, $link); - $phones_to_print = mysql_num_rows($rslt); - -echo "
TELEFON-AUFLISTUNGEN:\n"; -echo "
\n"; -echo ""; -echo ""; -echo ""; -echo ""; -echo ""; -echo ""; -echo ""; -echo ""; -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 "
EXTENPROTOSERVERDIALPLANSTATUSNAMEVMAILLINKS
$row[0]$row[16]$row[5]$row[1]$row[2]$row[8]$row[11]$row[14]$row[15]ÄNDERN Sie | Notfall
\n"; -} - -###################### -# ADD=100000000000 display all servers -###################### -if ($ADD==100000000000) -{ -echo "\n";echo "\n"; +$stmt="SELECT admin_home_url from system_settings;"; +$rslt=mysql_query($stmt, $link); +$row=mysql_fetch_row($rslt); +$admin_home_url_LU = $row[0]; + +?> +
+
\n"; - 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=1000000000000 display all conferences -###################### -if ($ADD==1000000000000) -{ -echo "
\n"; - 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"; -} - -###################### -# ADD=10000000000000 display all vicidial conferences -###################### -if ($ADD==10000000000000) -{ -echo "
\n"; - echo ""; - - $stmt="SELECT * from vicidial_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"; -} - - - - -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 ### -} -?> + LICENSE: GPLv2 +# + + +require("dbconnect.php"); + +$page_width='750'; +$section_width='700'; +$header_font_size='3'; +$subheader_font_size='2'; +$header_selected_bold=''; +$header_nonselected_bold=''; +$users_color = '#FFFF99'; +$campaigns_color = '#FFCC99'; +$lists_color = '#FFCCCC'; +$ingroups_color = '#CC99FF'; +$remoteagent_color ='#CCFFCC'; +$usergroups_color = '#CCFFFF'; +$scripts_color = '#99FFCC'; +$filters_color = '#CCCCCC'; +$admin_color = '#FF99FF'; +$reports_color = '#99FF33'; +#$users_color = '#FFFF99'; +#$campaigns_color = '#FFFF99'; +#$lists_color = '#FFFF99'; +#$ingroups_color = '#FFFF99'; +#$remoteagent_color ='#FFFF99'; +#$usergroups_color = '#FFFF99'; +#$scripts_color = '#FFFF99'; +#$filters_color = '#FFFF99'; +#$admin_color = '#FFFF99'; +#$reports_color = '#FFFF99'; + $times_color = '#CCCC00'; + $phones_color = '#CCCC00'; + $conference_color = '#CCCC00'; + $server_color = '#CCCC00'; + $settings_color = '#CCCC00'; +$users_font = 'BLACK'; +$campaigns_font = 'BLACK'; +$lists_font = 'BLACK'; +$ingroups_font = 'BLACK'; +$remoteagent_font = 'BLACK'; +$usergroups_font = 'BLACK'; +$scripts_font = 'BLACK'; +$filters_font = 'BLACK'; +$admin_font = 'BLACK'; +$reports_font = 'BLACK'; + $times_font = 'BLACK'; + $phones_font = 'BLACK'; + $conference_font = 'BLACK'; + $server_font = 'BLACK'; + $settings_font = 'BLACK'; + +$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; +$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; +$PHP_SELF=$_SERVER['PHP_SELF']; + +if (isset($_GET["DB"])) {$DB=$_GET["DB"];} + elseif (isset($_POST["DB"])) {$DB=$_POST["DB"];} +if (isset($_GET["active"])) {$active=$_GET["active"];} + elseif (isset($_POST["active"])) {$active=$_POST["active"];} +if (isset($_GET["adaptive_dl_diff_target"])) {$adaptive_dl_diff_target=$_GET["adaptive_dl_diff_target"];} + elseif (isset($_POST["adaptive_dl_diff_target"])) {$adaptive_dl_diff_target=$_POST["adaptive_dl_diff_target"];} +if (isset($_GET["adaptive_dropped_percentage"])) {$adaptive_dropped_percentage=$_GET["adaptive_dropped_percentage"];} + elseif (isset($_POST["adaptive_dropped_percentage"])){$adaptive_dropped_percentage=$_POST["adaptive_dropped_percentage"];} +if (isset($_GET["adaptive_intensity"])) {$adaptive_intensity=$_GET["adaptive_intensity"];} + elseif (isset($_POST["adaptive_intensity"])) {$adaptive_intensity=$_POST["adaptive_intensity"];} +if (isset($_GET["adaptive_latest_server_time"])) {$adaptive_latest_server_time=$_GET["adaptive_latest_server_time"];} + elseif (isset($_POST["adaptive_latest_server_time"])){$adaptive_latest_server_time=$_POST["adaptive_latest_server_time"];} +if (isset($_GET["adaptive_maximum_level"])) {$adaptive_maximum_level=$_GET["adaptive_maximum_level"];} + elseif (isset($_POST["adaptive_maximum_level"])) {$adaptive_maximum_level=$_POST["adaptive_maximum_level"];} +if (isset($_GET["ADD"])) {$ADD=$_GET["ADD"];} + elseif (isset($_POST["ADD"])) {$ADD=$_POST["ADD"];} +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["AFLogging_enabled"])) {$AFLogging_enabled=$_GET["AFLogging_enabled"];} + elseif (isset($_POST["AFLogging_enabled"])) {$AFLogging_enabled=$_POST["AFLogging_enabled"];} +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["agentcall_manual"])) {$agentcall_manual=$_GET["agentcall_manual"];} + elseif (isset($_POST["agentcall_manual"])) {$agentcall_manual=$_POST["agentcall_manual"];} +if (isset($_GET["agentonly_callbacks"])) {$agentonly_callbacks=$_GET["agentonly_callbacks"];} + elseif (isset($_POST["agentonly_callbacks"])) {$agentonly_callbacks=$_POST["agentonly_callbacks"];} +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["agi_output"])) {$agi_output=$_GET["agi_output"];} + elseif (isset($_POST["agi_output"])) {$agi_output=$_POST["agi_output"];} +if (isset($_GET["allcalls_delay"])) {$allcalls_delay=$_GET["allcalls_delay"];} + elseif (isset($_POST["allcalls_delay"])) {$allcalls_delay=$_POST["allcalls_delay"];} +if (isset($_GET["allow_closers"])) {$allow_closers=$_GET["allow_closers"];} + elseif (isset($_POST["allow_closers"])) {$allow_closers=$_POST["allow_closers"];} +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["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["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["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["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["asterisk_version"])) {$asterisk_version=$_GET["asterisk_version"];} + elseif (isset($_POST["asterisk_version"])) {$asterisk_version=$_POST["asterisk_version"];} +if (isset($_GET["ASTmgrSECRET"])) {$ASTmgrSECRET=$_GET["ASTmgrSECRET"];} + elseif (isset($_POST["ASTmgrSECRET"])) {$ASTmgrSECRET=$_POST["ASTmgrSECRET"];} +if (isset($_GET["ASTmgrUSERNAME"])) {$ASTmgrUSERNAME=$_GET["ASTmgrUSERNAME"];} + elseif (isset($_POST["ASTmgrUSERNAME"])) {$ASTmgrUSERNAME=$_POST["ASTmgrUSERNAME"];} +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["ASTmgrUSERNAMEupdate"])) {$ASTmgrUSERNAMEupdate=$_GET["ASTmgrUSERNAMEupdate"];} + elseif (isset($_POST["ASTmgrUSERNAMEupdate"])) {$ASTmgrUSERNAMEupdate=$_POST["ASTmgrUSERNAMEupdate"];} +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($_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["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["available_only_ratio_tally"])) {$available_only_ratio_tally=$_GET["available_only_ratio_tally"];} + elseif (isset($_POST["available_only_ratio_tally"])){$available_only_ratio_tally=$_POST["available_only_ratio_tally"];} +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["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["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["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["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["campaign_cid"])) {$campaign_cid=$_GET["campaign_cid"];} + elseif (isset($_POST["campaign_cid"])) {$campaign_cid=$_POST["campaign_cid"];} +if (isset($_GET["campaign_detail"])) {$campaign_detail=$_GET["campaign_detail"];} + elseif (isset($_POST["campaign_detail"])) {$campaign_detail=$_POST["campaign_detail"];} +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["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_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["campaign_recording"])) {$campaign_recording=$_GET["campaign_recording"];} + elseif (isset($_POST["campaign_recording"])) {$campaign_recording=$_POST["campaign_recording"];} +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["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["client_browser"])) {$client_browser=$_GET["client_browser"];} + elseif (isset($_POST["client_browser"])) {$client_browser=$_POST["client_browser"];} +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["company"])) {$company=$_GET["company"];} + elseif (isset($_POST["company"])) {$company=$_POST["company"];} +if (isset($_GET["computer_ip"])) {$computer_ip=$_GET["computer_ip"];} + elseif (isset($_POST["computer_ip"])) {$computer_ip=$_POST["computer_ip"];} +if (isset($_GET["conf_exten"])) {$conf_exten=$_GET["conf_exten"];} + elseif (isset($_POST["conf_exten"])) {$conf_exten=$_POST["conf_exten"];} +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["conferencing_enabled"])) {$conferencing_enabled=$_GET["conferencing_enabled"];} + elseif (isset($_POST["conferencing_enabled"])) {$conferencing_enabled=$_POST["conferencing_enabled"];} +if (isset($_GET["CoNfIrM"])) {$CoNfIrM=$_GET["CoNfIrM"];} + elseif (isset($_POST["CoNfIrM"])) {$CoNfIrM=$_POST["CoNfIrM"];} +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_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_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_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["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_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_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["DBX_database"])) {$DBX_database=$_GET["DBX_database"];} + elseif (isset($_POST["DBX_database"])) {$DBX_database=$_POST["DBX_database"];} +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["DBX_server"])) {$DBX_server=$_GET["DBX_server"];} + elseif (isset($_POST["DBX_server"])) {$DBX_server=$_POST["DBX_server"];} +if (isset($_GET["DBX_user"])) {$DBX_user=$_GET["DBX_user"];} + elseif (isset($_POST["DBX_user"])) {$DBX_user=$_POST["DBX_user"];} +if (isset($_GET["DBY_database"])) {$DBY_database=$_GET["DBY_database"];} + elseif (isset($_POST["DBY_database"])) {$DBY_database=$_POST["DBY_database"];} +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["DBY_server"])) {$DBY_server=$_GET["DBY_server"];} + elseif (isset($_POST["DBY_server"])) {$DBY_server=$_POST["DBY_server"];} +if (isset($_GET["DBY_user"])) {$DBY_user=$_GET["DBY_user"];} + elseif (isset($_POST["DBY_user"])) {$DBY_user=$_POST["DBY_user"];} +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["delete_campaigns"])) {$delete_campaigns=$_GET["delete_campaigns"];} + elseif (isset($_POST["delete_campaigns"])) {$delete_campaigns=$_POST["delete_campaigns"];} +if (isset($_GET["delete_filters"])) {$delete_filters=$_GET["delete_filters"];} + elseif (isset($_POST["delete_filters"])) {$delete_filters=$_POST["delete_filters"];} +if (isset($_GET["delete_ingroups"])) {$delete_ingroups=$_GET["delete_ingroups"];} + elseif (isset($_POST["delete_ingroups"])) {$delete_ingroups=$_POST["delete_ingroups"];} +if (isset($_GET["delete_lists"])) {$delete_lists=$_GET["delete_lists"];} + elseif (isset($_POST["delete_lists"])) {$delete_lists=$_POST["delete_lists"];} +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["delete_scripts"])) {$delete_scripts=$_GET["delete_scripts"];} + elseif (isset($_POST["delete_scripts"])) {$delete_scripts=$_POST["delete_scripts"];} +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_users"])) {$delete_users=$_GET["delete_users"];} + elseif (isset($_POST["delete_users"])) {$delete_users=$_POST["delete_users"];} +if (isset($_GET["dial_method"])) {$dial_method=$_GET["dial_method"];} + elseif (isset($_POST["dial_method"])) {$dial_method=$_POST["dial_method"];} +if (isset($_GET["dial_prefix"])) {$dial_prefix=$_GET["dial_prefix"];} + elseif (isset($_POST["dial_prefix"])) {$dial_prefix=$_POST["dial_prefix"];} +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["dial_timeout"])) {$dial_timeout=$_GET["dial_timeout"];} + elseif (isset($_POST["dial_timeout"])) {$dial_timeout=$_POST["dial_timeout"];} +if (isset($_GET["dialplan_number"])) {$dialplan_number=$_GET["dialplan_number"];} + elseif (isset($_POST["dialplan_number"])) {$dialplan_number=$_POST["dialplan_number"];} +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["drop_exten"])) {$drop_exten=$_GET["drop_exten"];} + elseif (isset($_POST["drop_exten"])) {$drop_exten=$_POST["drop_exten"];} +if (isset($_GET["drop_message"])) {$drop_message=$_GET["drop_message"];} + elseif (isset($_POST["drop_message"])) {$drop_message=$_POST["drop_message"];} +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["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["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["ext_context"])) {$ext_context=$_GET["ext_context"];} + elseif (isset($_POST["ext_context"])) {$ext_context=$_POST["ext_context"];} +if (isset($_GET["extension"])) {$extension=$_GET["extension"];} + elseif (isset($_POST["extension"])) {$extension=$_POST["extension"];} +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["force_logout"])) {$force_logout=$_GET["force_logout"];} + elseif (isset($_POST["force_logout"])) {$force_logout=$_POST["force_logout"];} +if (isset($_GET["fronter_display"])) {$fronter_display=$_GET["fronter_display"];} + elseif (isset($_POST["fronter_display"])) {$fronter_display=$_POST["fronter_display"];} +if (isset($_GET["full_name"])) {$full_name=$_GET["full_name"];} + elseif (isset($_POST["full_name"])) {$full_name=$_POST["full_name"];} +if (isset($_GET["fullname"])) {$fullname=$_GET["fullname"];} + elseif (isset($_POST["fullname"])) {$fullname=$_POST["fullname"];} +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["group_color"])) {$group_color=$_GET["group_color"];} + elseif (isset($_POST["group_color"])) {$group_color=$_POST["group_color"];} +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["groups"])) {$groups=$_GET["groups"];} + elseif (isset($_POST["groups"])) {$groups=$_POST["groups"];} +if (isset($_GET["HKstatus"])) {$HKstatus=$_GET["HKstatus"];} + elseif (isset($_POST["HKstatus"])) {$HKstatus=$_POST["HKstatus"];} +if (isset($_GET["hopper_level"])) {$hopper_level=$_GET["hopper_level"];} + elseif (isset($_POST["hopper_level"])) {$hopper_level=$_POST["hopper_level"];} +if (isset($_GET["hotkey"])) {$hotkey=$_GET["hotkey"];} + elseif (isset($_POST["hotkey"])) {$hotkey=$_POST["hotkey"];} +if (isset($_GET["hotkeys_active"])) {$hotkeys_active=$_GET["hotkeys_active"];} + elseif (isset($_POST["hotkeys_active"])) {$hotkeys_active=$_POST["hotkeys_active"];} +if (isset($_GET["install_directory"])) {$install_directory=$_GET["install_directory"];} + elseif (isset($_POST["install_directory"])) {$install_directory=$_POST["install_directory"];} +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_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_sql"])) {$lead_filter_sql=$_GET["lead_filter_sql"];} + elseif (isset($_POST["lead_filter_sql"])) {$lead_filter_sql=$_POST["lead_filter_sql"];} +if (isset($_GET["lead_order"])) {$lead_order=$_GET["lead_order"];} + elseif (isset($_POST["lead_order"])) {$lead_order=$_POST["lead_order"];} +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["load_leads"])) {$load_leads=$_GET["load_leads"];} + elseif (isset($_POST["load_leads"])) {$load_leads=$_POST["load_leads"];} +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["local_gmt"])) {$local_gmt=$_GET["local_gmt"];} + elseif (isset($_POST["local_gmt"])) {$local_gmt=$_POST["local_gmt"];} +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["login"])) {$login=$_GET["login"];} + elseif (isset($_POST["login"])) {$login=$_POST["login"];} +if (isset($_GET["login_campaign"])) {$login_campaign=$_GET["login_campaign"];} + elseif (isset($_POST["login_campaign"])) {$login_campaign=$_POST["login_campaign"];} +if (isset($_GET["login_pass"])) {$login_pass=$_GET["login_pass"];} + elseif (isset($_POST["login_pass"])) {$login_pass=$_POST["login_pass"];} +if (isset($_GET["login_user"])) {$login_user=$_GET["login_user"];} + elseif (isset($_POST["login_user"])) {$login_user=$_POST["login_user"];} +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["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["modify_leads"])) {$modify_leads=$_GET["modify_leads"];} + elseif (isset($_POST["modify_leads"])) {$modify_leads=$_POST["modify_leads"];} +if (isset($_GET["monitor_prefix"])) {$monitor_prefix=$_GET["monitor_prefix"];} + elseif (isset($_POST["monitor_prefix"])) {$monitor_prefix=$_POST["monitor_prefix"];} +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["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["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["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["old_extension"])) {$old_extension=$_GET["old_extension"];} + elseif (isset($_POST["old_extension"])) {$old_extension=$_POST["old_extension"];} +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["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["OLDuser_group"])) {$OLDuser_group=$_GET["OLDuser_group"];} + elseif (isset($_POST["OLDuser_group"])) {$OLDuser_group=$_POST["OLDuser_group"];} +if (isset($_GET["omit_phone_code"])) {$omit_phone_code=$_GET["omit_phone_code"];} + elseif (isset($_POST["omit_phone_code"])) {$omit_phone_code=$_POST["omit_phone_code"];} +if (isset($_GET["outbound_cid"])) {$outbound_cid=$_GET["outbound_cid"];} + elseif (isset($_POST["outbound_cid"])) {$outbound_cid=$_POST["outbound_cid"];} +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["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["pass"])) {$pass=$_GET["pass"];} + elseif (isset($_POST["pass"])) {$pass=$_POST["pass"];} +if (isset($_GET["phone_ip"])) {$phone_ip=$_GET["phone_ip"];} + elseif (isset($_POST["phone_ip"])) {$phone_ip=$_POST["phone_ip"];} +if (isset($_GET["phone_login"])) {$phone_login=$_GET["phone_login"];} + elseif (isset($_POST["phone_login"])) {$phone_login=$_POST["phone_login"];} +if (isset($_GET["phone_number"])) {$phone_number=$_GET["phone_number"];} + elseif (isset($_POST["phone_number"])) {$phone_number=$_POST["phone_number"];} +if (isset($_GET["phone_pass"])) {$phone_pass=$_GET["phone_pass"];} + elseif (isset($_POST["phone_pass"])) {$phone_pass=$_POST["phone_pass"];} +if (isset($_GET["phone_type"])) {$phone_type=$_GET["phone_type"];} + elseif (isset($_POST["phone_type"])) {$phone_type=$_POST["phone_type"];} +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["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["recording_exten"])) {$recording_exten=$_GET["recording_exten"];} + elseif (isset($_POST["recording_exten"])) {$recording_exten=$_POST["recording_exten"];} +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["reset_hopper"])) {$reset_hopper=$_GET["reset_hopper"];} + elseif (isset($_POST["reset_hopper"])) {$reset_hopper=$_POST["reset_hopper"];} +if (isset($_GET["reset_list"])) {$reset_list=$_GET["reset_list"];} + elseif (isset($_POST["reset_list"])) {$reset_list=$_POST["reset_list"];} +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["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["scheduled_callbacks"])) {$scheduled_callbacks=$_GET["scheduled_callbacks"];} + elseif (isset($_POST["scheduled_callbacks"])) {$scheduled_callbacks=$_POST["scheduled_callbacks"];} +if (isset($_GET["script_comments"])) {$script_comments=$_GET["script_comments"];} + elseif (isset($_POST["script_comments"])) {$script_comments=$_POST["script_comments"];} +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_text"])) {$script_text=$_GET["script_text"];} + elseif (isset($_POST["script_text"])) {$script_text=$_POST["script_text"];} +if (isset($_GET["selectable"])) {$selectable=$_GET["selectable"];} + elseif (isset($_POST["selectable"])) {$selectable=$_POST["selectable"];} +if (isset($_GET["server_description"])) {$server_description=$_GET["server_description"];} + elseif (isset($_POST["server_description"])) {$server_description=$_POST["server_description"];} +if (isset($_GET["server_id"])) {$server_id=$_GET["server_id"];} + elseif (isset($_POST["server_id"])) {$server_id=$_POST["server_id"];} +if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} + elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} +if (isset($_GET["stage"])) {$stage=$_GET["stage"];} + elseif (isset($_POST["stage"])) {$stage=$_POST["stage"];} +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["status"])) {$status=$_GET["status"];} + elseif (isset($_POST["status"])) {$status=$_POST["status"];} +if (isset($_GET["status_name"])) {$status_name=$_GET["status_name"];} + elseif (isset($_POST["status_name"])) {$status_name=$_POST["status_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"];} +if (isset($_GET["sys_perf_log"])) {$sys_perf_log=$_GET["sys_perf_log"];} + elseif (isset($_POST["sys_perf_log"])) {$sys_perf_log=$_POST["sys_perf_log"];} +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["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["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["user"])) {$user=$_GET["user"];} + elseif (isset($_POST["user"])) {$user=$_POST["user"];} +if (isset($_GET["user_group"])) {$user_group=$_GET["user_group"];} + elseif (isset($_POST["user_group"])) {$user_group=$_POST["user_group"];} +if (isset($_GET["user_level"])) {$user_level=$_GET["user_level"];} + elseif (isset($_POST["user_level"])) {$user_level=$_POST["user_level"];} +if (isset($_GET["user_start"])) {$user_start=$_GET["user_start"];} + elseif (isset($_POST["user_start"])) {$user_start=$_POST["user_start"];} +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["vd_server_logs"])) {$vd_server_logs=$_GET["vd_server_logs"];} + elseif (isset($_POST["vd_server_logs"])) {$vd_server_logs=$_POST["vd_server_logs"];} +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["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["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["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["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["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["voicemail_ext"])) {$voicemail_ext=$_GET["voicemail_ext"];} + elseif (isset($_POST["voicemail_ext"])) {$voicemail_ext=$_POST["voicemail_ext"];} +if (isset($_GET["voicemail_exten"])) {$voicemail_exten=$_GET["voicemail_exten"];} + elseif (isset($_POST["voicemail_exten"])) {$voicemail_exten=$_POST["voicemail_exten"];} +if (isset($_GET["voicemail_id"])) {$voicemail_id=$_GET["voicemail_id"];} + elseif (isset($_POST["voicemail_id"])) {$voicemail_id=$_POST["voicemail_id"];} +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["wrapup_message"])) {$wrapup_message=$_GET["wrapup_message"];} + elseif (isset($_POST["wrapup_message"])) {$wrapup_message=$_POST["wrapup_message"];} +if (isset($_GET["wrapup_seconds"])) {$wrapup_seconds=$_GET["wrapup_seconds"];} + elseif (isset($_POST["wrapup_seconds"])) {$wrapup_seconds=$_POST["wrapup_seconds"];} +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["vicidial_balance_active"])) {$vicidial_balance_active=$_GET["vicidial_balance_active"];} + elseif (isset($_POST["vicidial_balance_active"])) {$vicidial_balance_active=$_POST["vicidial_balance_active"];} +if (isset($_GET["balance_trunks_offlimits"])) {$balance_trunks_offlimits=$_GET["balance_trunks_offlimits"];} + elseif (isset($_POST["balance_trunks_offlimits"])) {$balance_trunks_offlimits=$_POST["balance_trunks_offlimits"];} +if (isset($_GET["dedicated_trunks"])) {$dedicated_trunks=$_GET["dedicated_trunks"];} + elseif (isset($_POST["dedicated_trunks"])) {$dedicated_trunks=$_POST["dedicated_trunks"];} +if (isset($_GET["trunk_restriction"])) {$trunk_restriction=$_GET["trunk_restriction"];} + elseif (isset($_POST["trunk_restriction"])) {$trunk_restriction=$_POST["trunk_restriction"];} +if (isset($_GET["campaigns"])) {$campaigns=$_GET["campaigns"];} + elseif (isset($_POST["campaigns"])) {$campaigns=$_POST["campaigns"];} +if (isset($_GET["dial_level_override"])) {$dial_level_override=$_GET["dial_level_override"];} + elseif (isset($_POST["dial_level_override"])) {$dial_level_override=$_POST["dial_level_override"];} +if (isset($_GET["concurrent_transfers"])) {$concurrent_transfers=$_GET["concurrent_transfers"];} + elseif (isset($_POST["concurrent_transfers"])) {$concurrent_transfers=$_POST["concurrent_transfers"];} +if (isset($_GET["auto_alt_dial"])) {$auto_alt_dial=$_GET["auto_alt_dial"];} + elseif (isset($_POST["auto_alt_dial"])) {$auto_alt_dial=$_POST["auto_alt_dial"];} +if (isset($_GET["modify_users"])) {$modify_users=$_GET["modify_users"];} + elseif (isset($_POST["modify_users"])) {$modify_users=$_POST["modify_users"];} +if (isset($_GET["modify_campaigns"])) {$modify_campaigns=$_GET["modify_campaigns"];} + elseif (isset($_POST["modify_campaigns"])) {$modify_campaigns=$_POST["modify_campaigns"];} +if (isset($_GET["modify_lists"])) {$modify_lists=$_GET["modify_lists"];} + elseif (isset($_POST["modify_lists"])) {$modify_lists=$_POST["modify_lists"];} +if (isset($_GET["modify_scripts"])) {$modify_scripts=$_GET["modify_scripts"];} + elseif (isset($_POST["modify_scripts"])) {$modify_scripts=$_POST["modify_scripts"];} +if (isset($_GET["modify_filters"])) {$modify_filters=$_GET["modify_filters"];} + elseif (isset($_POST["modify_filters"])) {$modify_filters=$_POST["modify_filters"];} +if (isset($_GET["modify_ingroups"])) {$modify_ingroups=$_GET["modify_ingroups"];} + elseif (isset($_POST["modify_ingroups"])) {$modify_ingroups=$_POST["modify_ingroups"];} +if (isset($_GET["modify_usergroups"])) {$modify_usergroups=$_GET["modify_usergroups"];} + elseif (isset($_POST["modify_usergroups"])) {$modify_usergroups=$_POST["modify_usergroups"];} +if (isset($_GET["modify_remoteagents"])) {$modify_remoteagents=$_GET["modify_remoteagents"];} + elseif (isset($_POST["modify_remoteagents"])) {$modify_remoteagents=$_POST["modify_remoteagents"];} +if (isset($_GET["modify_servers"])) {$modify_servers=$_GET["modify_servers"];} + elseif (isset($_POST["modify_servers"])) {$modify_servers=$_POST["modify_servers"];} +if (isset($_GET["view_reports"])) {$view_reports=$_GET["view_reports"];} + elseif (isset($_POST["view_reports"])) {$view_reports=$_POST["view_reports"];} +if (isset($_GET["agent_pause_codes_active"])) {$agent_pause_codes_active=$_GET["agent_pause_codes_active"];} + elseif (isset($_POST["agent_pause_codes_active"])) {$agent_pause_codes_active=$_POST["agent_pause_codes_active"];} +if (isset($_GET["pause_code"])) {$pause_code=$_GET["pause_code"];} + elseif (isset($_POST["pause_code"])) {$pause_code=$_POST["pause_code"];} +if (isset($_GET["pause_code_name"])) {$pause_code_name=$_GET["pause_code_name"];} + elseif (isset($_POST["pause_code_name"])) {$pause_code_name=$_POST["pause_code_name"];} +if (isset($_GET["billable"])) {$billable=$_GET["billable"];} + elseif (isset($_POST["billable"])) {$billable=$_POST["billable"];} +if (isset($_GET["campaign_description"])) {$campaign_description=$_GET["campaign_description"];} + elseif (isset($_POST["campaign_description"])) {$campaign_description=$_POST["campaign_description"];} +if (isset($_GET["campaign_stats_refresh"])) {$campaign_stats_refresh=$_GET["campaign_stats_refresh"];} + elseif (isset($_POST["campaign_stats_refresh"])){$campaign_stats_refresh=$_POST["campaign_stats_refresh"];} +if (isset($_GET["list_description"])) {$list_description=$_GET["list_description"];} + elseif (isset($_POST["list_description"])) {$list_description=$_POST["list_description"];} +if (isset($_GET["vicidial_recording_override"])) {$vicidial_recording_override=$_GET["vicidial_recording_override"];} elseif (isset($_POST["vicidial_recording_override"])) {$vicidial_recording_override=$_POST["vicidial_recording_override"];} +if (isset($_GET["use_non_latin"])) {$use_non_latin=$_GET["use_non_latin"];} + elseif (isset($_POST["use_non_latin"])) {$use_non_latin=$_POST["use_non_latin"];} +if (isset($_GET["webroot_writable"])) {$webroot_writable=$_GET["webroot_writable"];} + elseif (isset($_POST["webroot_writable"])) {$webroot_writable=$_POST["webroot_writable"];} +if (isset($_GET["enable_queuemetrics_logging"])) {$enable_queuemetrics_logging=$_GET["enable_queuemetrics_logging"];} + elseif (isset($_POST["enable_queuemetrics_logging"])) {$enable_queuemetrics_logging=$_POST["enable_queuemetrics_logging"];} +if (isset($_GET["queuemetrics_server_ip"])) {$queuemetrics_server_ip=$_GET["queuemetrics_server_ip"];} + elseif (isset($_POST["queuemetrics_server_ip"])) {$queuemetrics_server_ip=$_POST["queuemetrics_server_ip"];} +if (isset($_GET["queuemetrics_dbname"])) {$queuemetrics_dbname=$_GET["queuemetrics_dbname"];} + elseif (isset($_POST["queuemetrics_dbname"])) {$queuemetrics_dbname=$_POST["queuemetrics_dbname"];} +if (isset($_GET["queuemetrics_login"])) {$queuemetrics_login=$_GET["queuemetrics_login"];} + elseif (isset($_POST["queuemetrics_login"])) {$queuemetrics_login=$_POST["queuemetrics_login"];} +if (isset($_GET["queuemetrics_pass"])) {$queuemetrics_pass=$_GET["queuemetrics_pass"];} + elseif (isset($_POST["queuemetrics_pass"])) {$queuemetrics_pass=$_POST["queuemetrics_pass"];} +if (isset($_GET["queuemetrics_url"])) {$queuemetrics_url=$_GET["queuemetrics_url"];} + elseif (isset($_POST["queuemetrics_url"])) {$queuemetrics_url=$_POST["queuemetrics_url"];} +if (isset($_GET["queuemetrics_log_id"])) {$queuemetrics_log_id=$_GET["queuemetrics_log_id"];} + elseif (isset($_POST["queuemetrics_log_id"])) {$queuemetrics_log_id=$_POST["queuemetrics_log_id"];} +if (isset($_GET["dial_status"])) {$dial_status=$_GET["dial_status"];} + elseif (isset($_POST["dial_status"])) {$dial_status=$_POST["dial_status"];} +if (isset($_GET["queuemetrics_eq_prepend"])) {$queuemetrics_eq_prepend=$_GET["queuemetrics_eq_prepend"];} + elseif (isset($_POST["queuemetrics_eq_prepend"])) {$queuemetrics_eq_prepend=$_POST["queuemetrics_eq_prepend"];} +if (isset($_GET["vicidial_agent_disable"])) {$vicidial_agent_disable=$_GET["vicidial_agent_disable"];} + elseif (isset($_POST["vicidial_agent_disable"])) {$vicidial_agent_disable=$_POST["vicidial_agent_disable"];} +if (isset($_GET["disable_alter_custdata"])) {$disable_alter_custdata=$_GET["disable_alter_custdata"];} + elseif (isset($_POST["disable_alter_custdata"])) {$disable_alter_custdata=$_POST["disable_alter_custdata"];} +if (isset($_GET["alter_custdata_override"])) {$alter_custdata_override=$_GET["alter_custdata_override"];} + elseif (isset($_POST["alter_custdata_override"])) {$alter_custdata_override=$_POST["alter_custdata_override"];} +if (isset($_GET["no_hopper_leads_logins"])) {$no_hopper_leads_logins=$_GET["no_hopper_leads_logins"];} + elseif (isset($_POST["no_hopper_leads_logins"])) {$no_hopper_leads_logins=$_POST["no_hopper_leads_logins"];} +if (isset($_GET["enable_sipsak_messages"])) {$enable_sipsak_messages=$_GET["enable_sipsak_messages"];} + elseif (isset($_POST["enable_sipsak_messages"])) {$enable_sipsak_messages=$_POST["enable_sipsak_messages"];} +if (isset($_GET["allow_sipsak_messages"])) {$allow_sipsak_messages=$_GET["allow_sipsak_messages"];} + elseif (isset($_POST["allow_sipsak_messages"])) {$allow_sipsak_messages=$_POST["allow_sipsak_messages"];} +if (isset($_GET["admin_home_url"])) {$admin_home_url=$_GET["admin_home_url"];} + elseif (isset($_POST["admin_home_url"])) {$admin_home_url=$_POST["admin_home_url"];} + + + if (isset($script_id)) {$script_id= strtoupper($script_id);} + if (isset($lead_filter_id)) {$lead_filter_id = strtoupper($lead_filter_id);} + +if (strlen($dial_status) > 0) + { + $ADD='28'; + $status = $dial_status; + } + +##### BEGIN VARIABLE FILTERING FOR SECURITY ##### + +if ($non_latin < 1) +{ +### DIGITS ONLY ### +$adaptive_dropped_percentage = ereg_replace("[^0-9]","",$adaptive_dropped_percentage); +$adaptive_latest_server_time = ereg_replace("[^0-9]","",$adaptive_latest_server_time); +$admin_hangup_enabled = ereg_replace("[^0-9]","",$admin_hangup_enabled); +$admin_hijack_enabled = ereg_replace("[^0-9]","",$admin_hijack_enabled); +$admin_monitor_enabled = ereg_replace("[^0-9]","",$admin_monitor_enabled); +$AFLogging_enabled = ereg_replace("[^0-9]","",$AFLogging_enabled); +$agent_choose_ingroups = ereg_replace("[^0-9]","",$agent_choose_ingroups); +$agentcall_manual = ereg_replace("[^0-9]","",$agentcall_manual); +$agentonly_callbacks = ereg_replace("[^0-9]","",$agentonly_callbacks); +$AGI_call_logging_enabled = ereg_replace("[^0-9]","",$AGI_call_logging_enabled); +$allcalls_delay = ereg_replace("[^0-9]","",$allcalls_delay); +$alter_agent_interface_options = ereg_replace("[^0-9]","",$alter_agent_interface_options); +$am_message_exten = ereg_replace("[^0-9]","",$am_message_exten); +$answer_transfer_agent = ereg_replace("[^0-9]","",$answer_transfer_agent); +$ast_admin_access = ereg_replace("[^0-9]","",$ast_admin_access); +$ast_delete_phones = ereg_replace("[^0-9]","",$ast_delete_phones); +$attempt_delay = ereg_replace("[^0-9]","",$attempt_delay); +$attempt_maximum = ereg_replace("[^0-9]","",$attempt_maximum); +$auto_dial_next_number = ereg_replace("[^0-9]","",$auto_dial_next_number); +$balance_trunks_offlimits = ereg_replace("[^0-9]","",$balance_trunks_offlimits); +$call_parking_enabled = ereg_replace("[^0-9]","",$call_parking_enabled); +$CallerID_popup_enabled = ereg_replace("[^0-9]","",$CallerID_popup_enabled); +$campaign_detail = ereg_replace("[^0-9]","",$campaign_detail); +$campaign_rec_exten = ereg_replace("[^0-9]","",$campaign_rec_exten); +$campaign_vdad_exten = ereg_replace("[^0-9]","",$campaign_vdad_exten); +$change_agent_campaign = ereg_replace("[^0-9]","",$change_agent_campaign); +$closer_default_blended = ereg_replace("[^0-9]","",$closer_default_blended); +$conf_exten = ereg_replace("[^0-9]","",$conf_exten); +$conf_on_extension = ereg_replace("[^0-9]","",$conf_on_extension); +$conferencing_enabled = ereg_replace("[^0-9]","",$conferencing_enabled); +$ct_default_start = ereg_replace("[^0-9]","",$ct_default_start); +$ct_default_stop = ereg_replace("[^0-9]","",$ct_default_stop); +$ct_friday_start = ereg_replace("[^0-9]","",$ct_friday_start); +$ct_friday_stop = ereg_replace("[^0-9]","",$ct_friday_stop); +$ct_monday_start = ereg_replace("[^0-9]","",$ct_monday_start); +$ct_monday_stop = ereg_replace("[^0-9]","",$ct_monday_stop); +$ct_saturday_start = ereg_replace("[^0-9]","",$ct_saturday_start); +$ct_saturday_stop = ereg_replace("[^0-9]","",$ct_saturday_stop); +$ct_sunday_start = ereg_replace("[^0-9]","",$ct_sunday_start); +$ct_sunday_stop = ereg_replace("[^0-9]","",$ct_sunday_stop); +$ct_thursday_start = ereg_replace("[^0-9]","",$ct_thursday_start); +$ct_thursday_stop = ereg_replace("[^0-9]","",$ct_thursday_stop); +$ct_tuesday_start = ereg_replace("[^0-9]","",$ct_tuesday_start); +$ct_tuesday_stop = ereg_replace("[^0-9]","",$ct_tuesday_stop); +$ct_wednesday_start = ereg_replace("[^0-9]","",$ct_wednesday_start); +$ct_wednesday_stop = ereg_replace("[^0-9]","",$ct_wednesday_stop); +$DBX_port = ereg_replace("[^0-9]","",$DBX_port); +$DBY_port = ereg_replace("[^0-9]","",$DBY_port); +$dedicated_trunks = ereg_replace("[^0-9]","",$dedicated_trunks); +$delete_call_times = ereg_replace("[^0-9]","",$delete_call_times); +$delete_campaigns = ereg_replace("[^0-9]","",$delete_campaigns); +$delete_filters = ereg_replace("[^0-9]","",$delete_filters); +$delete_ingroups = ereg_replace("[^0-9]","",$delete_ingroups); +$delete_lists = ereg_replace("[^0-9]","",$delete_lists); +$delete_remote_agents = ereg_replace("[^0-9]","",$delete_remote_agents); +$delete_scripts = ereg_replace("[^0-9]","",$delete_scripts); +$delete_user_groups = ereg_replace("[^0-9]","",$delete_user_groups); +$delete_users = ereg_replace("[^0-9]","",$delete_users); +$dial_timeout = ereg_replace("[^0-9]","",$dial_timeout); +$dialplan_number = ereg_replace("[^0-9]","",$dialplan_number); +$drop_call_seconds = ereg_replace("[^0-9]","",$drop_call_seconds); +$drop_exten = ereg_replace("[^0-9]","",$drop_exten); +$enable_fast_refresh = ereg_replace("[^0-9]","",$enable_fast_refresh); +$enable_persistant_mysql = ereg_replace("[^0-9]","",$enable_persistant_mysql); +$fast_refresh_rate = ereg_replace("[^0-9]","",$fast_refresh_rate); +$hopper_level = ereg_replace("[^0-9]","",$hopper_level); +$hotkey = ereg_replace("[^0-9]","",$hotkey); +$hotkeys_active = ereg_replace("[^0-9]","",$hotkeys_active); +$list_id = ereg_replace("[^0-9]","",$list_id); +$load_leads = ereg_replace("[^0-9]","",$load_leads); +$max_vicidial_trunks = ereg_replace("[^0-9]","",$max_vicidial_trunks); +$modify_call_times = ereg_replace("[^0-9]","",$modify_call_times); +$modify_users = ereg_replace("[^0-9]","",$modify_users); +$modify_campaigns = ereg_replace("[^0-9]","",$modify_campaigns); +$modify_lists = ereg_replace("[^0-9]","",$modify_lists); +$modify_scripts = ereg_replace("[^0-9]","",$modify_scripts); +$modify_filters = ereg_replace("[^0-9]","",$modify_filters); +$modify_ingroups = ereg_replace("[^0-9]","",$modify_ingroups); +$modify_usergroups = ereg_replace("[^0-9]","",$modify_usergroups); +$modify_remoteagents = ereg_replace("[^0-9]","",$modify_remoteagents); +$modify_servers = ereg_replace("[^0-9]","",$modify_servers); +$view_reports = ereg_replace("[^0-9]","",$view_reports); +$modify_leads = ereg_replace("[^0-9]","",$modify_leads); +$monitor_prefix = ereg_replace("[^0-9]","",$monitor_prefix); +$number_of_lines = ereg_replace("[^0-9]","",$number_of_lines); +$old_conf_exten = ereg_replace("[^0-9]","",$old_conf_exten); +$outbound_cid = ereg_replace("[^0-9]","",$outbound_cid); +$park_ext = ereg_replace("[^0-9]","",$park_ext); +$park_on_extension = ereg_replace("[^0-9]","",$park_on_extension); +$phone_number = ereg_replace("[^0-9]","",$phone_number); +$QUEUE_ACTION_enabled = ereg_replace("[^0-9]","",$QUEUE_ACTION_enabled); +$recording_exten = ereg_replace("[^0-9]","",$recording_exten); +$remote_agent_id = ereg_replace("[^0-9]","",$remote_agent_id); +$safe_harbor_exten = ereg_replace("[^0-9]","",$safe_harbor_exten); +$telnet_port = ereg_replace("[^0-9]","",$telnet_port); +$updater_check_enabled = ereg_replace("[^0-9]","",$updater_check_enabled); +$user_level = ereg_replace("[^0-9]","",$user_level); +$user_start = ereg_replace("[^0-9]","",$user_start); +$user_switching_enabled = ereg_replace("[^0-9]","",$user_switching_enabled); +$VDstop_rec_after_each_call = ereg_replace("[^0-9]","",$VDstop_rec_after_each_call); +$VICIDIAL_park_on_extension = ereg_replace("[^0-9]","",$VICIDIAL_park_on_extension); +$vicidial_recording = ereg_replace("[^0-9]","",$vicidial_recording); +$vicidial_transfers = ereg_replace("[^0-9]","",$vicidial_transfers); +$voicemail_button_enabled = ereg_replace("[^0-9]","",$voicemail_button_enabled); +$voicemail_dump_exten = ereg_replace("[^0-9]","",$voicemail_dump_exten); +$voicemail_ext = ereg_replace("[^0-9]","",$voicemail_ext); +$voicemail_exten = ereg_replace("[^0-9]","",$voicemail_exten); +$voicemail_id = ereg_replace("[^0-9]","",$voicemail_id); +$wrapup_seconds = ereg_replace("[^0-9]","",$wrapup_seconds); +$use_non_latin = ereg_replace("[^0-9]","",$use_non_latin); +$webroot_writable = ereg_replace("[^0-9]","",$webroot_writable); +$enable_queuemetrics_logging = ereg_replace("[^0-9]","",$enable_queuemetrics_logging); +$enable_sipsak_messages = ereg_replace("[^0-9]","",$enable_sipsak_messages); +$allow_sipsak_messages = ereg_replace("[^0-9]","",$allow_sipsak_messages); + +### 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); +$omit_phone_code = ereg_replace("[^NY]","",$omit_phone_code); +$available_only_ratio_tally = ereg_replace("[^NY]","",$available_only_ratio_tally); +$sys_perf_log = ereg_replace("[^NY]","",$sys_perf_log); +$vicidial_balance_active = ereg_replace("[^NY]","",$vicidial_balance_active); +$vd_server_logs = ereg_replace("[^NY]","",$vd_server_logs); +$agent_pause_codes_active = ereg_replace("[^NY]","",$agent_pause_codes_active); +$campaign_stats_refresh = ereg_replace("[^NY]","",$campaign_stats_refresh); +$disable_alter_custdata = ereg_replace("[^NY]","",$disable_alter_custdata); +$no_hopper_leads_logins = ereg_replace("[^NY]","",$no_hopper_leads_logins); + +### ALPHA-NUMERIC ONLY ### +$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); +$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); +$concurrent_transfers = ereg_replace("[^0-9a-zA-Z]","",$concurrent_transfers); +$billable = ereg_replace("[^0-9a-zA-Z]","",$billable); +$pause_code = ereg_replace("[^0-9a-zA-Z]","",$pause_code); +$vicidial_recording_override = ereg_replace("[^0-9a-zA-Z]","",$vicidial_recording_override); +$queuemetrics_log_id = ereg_replace("[^0-9a-zA-Z]","",$queuemetrics_log_id); + +### DIGITS and Dots +$server_ip = ereg_replace("[^\.0-9]","",$server_ip); +$auto_dial_level = ereg_replace("[^\.0-9]","",$auto_dial_level); +$adaptive_maximum_level = ereg_replace("[^\.0-9]","",$adaptive_maximum_level); +$phone_ip = ereg_replace("[^\.0-9]","",$phone_ip); +$old_server_ip = ereg_replace("[^\.0-9]","",$old_server_ip); +$computer_ip = ereg_replace("[^\.0-9]","",$computer_ip); +$queuemetrics_server_ip = ereg_replace("[^\.0-9]","",$queuemetrics_server_ip); + +### ALPHA-NUMERIC and spaces and hash and star and comma +$xferconf_a_dtmf = ereg_replace("[^ \,\*\#0-9a-zA-Z]","",$xferconf_a_dtmf); +$xferconf_b_dtmf = ereg_replace("[^ \,\*\#0-9a-zA-Z]","",$xferconf_b_dtmf); + +### ALPHACAPS-NUMERIC +$xferconf_a_number = ereg_replace("[^0-9A-Z]","",$xferconf_a_number); +$xferconf_b_number = ereg_replace("[^0-9A-Z]","",$xferconf_b_number); + +### ALPHA-NUMERIC and underscore and dash +$agi_output = ereg_replace("[^-\_0-9a-zA-Z]","",$agi_output); +$ASTmgrSECRET = ereg_replace("[^-\_0-9a-zA-Z]","",$ASTmgrSECRET); +$ASTmgrUSERNAME = ereg_replace("[^-\_0-9a-zA-Z]","",$ASTmgrUSERNAME); +$ASTmgrUSERNAMElisten = ereg_replace("[^-\_0-9a-zA-Z]","",$ASTmgrUSERNAMElisten); +$ASTmgrUSERNAMEsend = ereg_replace("[^-\_0-9a-zA-Z]","",$ASTmgrUSERNAMEsend); +$ASTmgrUSERNAMEupdate = ereg_replace("[^-\_0-9a-zA-Z]","",$ASTmgrUSERNAMEupdate); +$call_time_id = ereg_replace("[^-\_0-9a-zA-Z]","",$call_time_id); +$campaign_id = ereg_replace("[^-\_0-9a-zA-Z]","",$campaign_id); +$CoNfIrM = ereg_replace("[^-\_0-9a-zA-Z]","",$CoNfIrM); +$DBX_database = ereg_replace("[^-\_0-9a-zA-Z]","",$DBX_database); +$DBX_pass = ereg_replace("[^-\_0-9a-zA-Z]","",$DBX_pass); +$DBX_user = ereg_replace("[^-\_0-9a-zA-Z]","",$DBX_user); +$DBY_database = ereg_replace("[^-\_0-9a-zA-Z]","",$DBY_database); +$DBY_pass = ereg_replace("[^-\_0-9a-zA-Z]","",$DBY_pass); +$DBY_user = ereg_replace("[^-\_0-9a-zA-Z]","",$DBY_user); +$dial_method = ereg_replace("[^-\_0-9a-zA-Z]","",$dial_method); +$dial_status_a = ereg_replace("[^-\_0-9a-zA-Z]","",$dial_status_a); +$dial_status_b = ereg_replace("[^-\_0-9a-zA-Z]","",$dial_status_b); +$dial_status_c = ereg_replace("[^-\_0-9a-zA-Z]","",$dial_status_c); +$dial_status_d = ereg_replace("[^-\_0-9a-zA-Z]","",$dial_status_d); +$dial_status_e = ereg_replace("[^-\_0-9a-zA-Z]","",$dial_status_e); +$ext_context = ereg_replace("[^-\_0-9a-zA-Z]","",$ext_context); +$group_id = ereg_replace("[^-\_0-9a-zA-Z]","",$group_id); +$lead_filter_id = ereg_replace("[^-\_0-9a-zA-Z]","",$lead_filter_id); +$local_call_time = ereg_replace("[^-\_0-9a-zA-Z]","",$local_call_time); +$login = ereg_replace("[^-\_0-9a-zA-Z]","",$login); +$login_campaign = ereg_replace("[^-\_0-9a-zA-Z]","",$login_campaign); +$login_pass = ereg_replace("[^-\_0-9a-zA-Z]","",$login_pass); +$login_user = ereg_replace("[^-\_0-9a-zA-Z]","",$login_user); +$next_agent_call = ereg_replace("[^-\_0-9a-zA-Z]","",$next_agent_call); +$old_campaign_id = ereg_replace("[^-\_0-9a-zA-Z]","",$old_campaign_id); +$old_server_id = ereg_replace("[^-\_0-9a-zA-Z]","",$old_server_id); +$OLDuser_group = ereg_replace("[^-\_0-9a-zA-Z]","",$OLDuser_group); +$park_file_name = ereg_replace("[^-\_0-9a-zA-Z]","",$park_file_name); +$pass = ereg_replace("[^-\_0-9a-zA-Z]","",$pass); +$phone_login = ereg_replace("[^-\_0-9a-zA-Z]","",$phone_login); +$phone_pass = ereg_replace("[^-\_0-9a-zA-Z]","",$phone_pass); +$PHP_AUTH_PW = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_PW); +$PHP_AUTH_USER = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_USER); +$protocol = ereg_replace("[^-\_0-9a-zA-Z]","",$protocol); +$server_id = ereg_replace("[^-\_0-9a-zA-Z]","",$server_id); +$stage = ereg_replace("[^-\_0-9a-zA-Z]","",$stage); +$state_rule = ereg_replace("[^-\_0-9a-zA-Z]","",$state_rule); +$status = ereg_replace("[^-\_0-9a-zA-Z]","",$status); +$trunk_restriction = ereg_replace("[^-\_0-9a-zA-Z]","",$trunk_restriction); +$user = ereg_replace("[^-\_0-9a-zA-Z]","",$user); +$user_group = ereg_replace("[^-\_0-9a-zA-Z]","",$user_group); +$VICIDIAL_park_on_filename = ereg_replace("[^-\_0-9a-zA-Z]","",$VICIDIAL_park_on_filename); +$auto_alt_dial = ereg_replace("[^-\_0-9a-zA-Z]","",$auto_alt_dial); +$dial_status = ereg_replace("[^-\_0-9a-zA-Z]","",$dial_status); +$queuemetrics_eq_prepend = ereg_replace("[^-\_0-9a-zA-Z]","",$queuemetrics_eq_prepend); +$vicidial_agent_disable = ereg_replace("[^-\_0-9a-zA-Z]","",$vicidial_agent_disable); +$alter_custdata_override = ereg_replace("[^-\_0-9a-zA-Z]","",$alter_custdata_override); + +### 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 +$adaptive_dl_diff_target = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$adaptive_dl_diff_target); +$adaptive_intensity = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$adaptive_intensity); +$asterisk_version = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$asterisk_version); +$call_time_comments = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$call_time_comments); +$call_time_name = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$call_time_name); +$campaign_name = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$campaign_name); +$campaign_rec_filename = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$campaign_rec_filename); +$company = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$company); +$full_name = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$full_name); +$fullname = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$fullname); +$group_name = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$group_name); +$HKstatus = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$HKstatus); +$lead_filter_comments = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$lead_filter_comments); +$lead_filter_name = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$lead_filter_name); +$list_name = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$list_name); +$local_gmt = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$local_gmt); +$phone_type = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$phone_type); +$picture = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$picture); +$script_comments = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$script_comments); +$script_name = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$script_name); +$server_description = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$server_description); +$status = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$status); +$status_name = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$status_name); +$wrapup_message = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$wrapup_message); +$pause_code_name = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$pause_code_name); +$campaign_description = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$campaign_description); +$list_description = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$list_description); + +### ALPHA-NUMERIC and underscore and dash and slash and at and dot +$call_out_number_group = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$call_out_number_group); +$client_browser = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$client_browser); +$DBX_server = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$DBX_server); +$DBY_server = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$DBY_server); +$dtmf_send_extension = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$dtmf_send_extension); +$extension = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$extension); +$install_directory = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$install_directory); +$old_extension = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$old_extension); +$telnet_host = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$telnet_host); +$queuemetrics_dbname = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$queuemetrics_dbname); +$queuemetrics_login = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$queuemetrics_login); +$queuemetrics_pass = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$queuemetrics_pass); + +### remove semi-colons ### +$lead_filter_sql = ereg_replace(";","",$lead_filter_sql); + +### VARIABLES TO BE mysql_real_escape_string ### +# $web_form_address +# $queuemetrics_url +# $admin_home_url + +### VARIABLES not filtered at all ### +# $script_text + +} # end of non_latin + + +##### END VARIABLE FILTERING FOR SECURITY ##### + + +# AST GUI database administration +# admin.php +# +# CHANGELOG: +# 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 +# 60808-1147 - Changed filtering for and added instructions for consutative transfers +# 60816-1552 - Added allcalls_delay start delay for recordings in vicidial.php +# 60817-2226 - Fixed bug that would not allow lead recycling of non-selectable statuses +# 60821-1543 - Added option to Omit Phone Code while dialing in vicidial +# 60821-1625 - Added ALLFORCE recording option for campaign_recording +# 60823-1154 - Added fields for adaptive dialing +# 60824-1326 - Added adaptive_latest_target_gmt for ADAPT_TAPERED dial method +# 60825-1205 - Added adaptive_intensity for ADAPT_ dial methods +# 60828-1019 - Changed adaptive_latest_target_gmt to adaptive_latest_server_time +# 60828-1115 - Added adaptive_dl_diff_target and changed intensity dropdown +# 60927-1246 - Added astguiclient/admin.php functions under SERVERS tab +# 61002-1402 - Added fields for vicidial balance trunk controls +# 61003-1123 - Added functions for vicidial_server_trunks records +# 61109-1022 - Added Emergency VDAC Jam Clear function to Campaign Detail screen +# 61110-1502 - Add ability to select NONE in dial statuses, new list_id must not be < 100 +# 61122-1228 - Added user group campaign restrictions +# 61122-1535 - Changed script_text to unfiltered and added more variables to SCRIPTS +# 61129-1028 - Added headers to Users and Phones with clickable order-by titles +# 70108-1405 - Added ADAPT OVERRIDE to allow for forced dial_level changes in ADAPT dial methods +# - Screen width definable at top of script, merged server_stats into this script +# 70109-1638 - Added ALTPH2 and ADDR3 hotkey options for alt number dialing with HotKeys +# 70109-1716 - Added concurrent_transfers option to vicidial_campaigns +# 70115-1152 - Aded (CLOSER|BLEND|INBND|_C$|_B$|_I$) options for CLOSER-type campaigns +# 70115-1532 - Added auto_alt_dial field to campaign screen for auto-dialing of alt numbers +# 70116-1200 - Added auto_alt_dial_status functionality to campaign screen +# 70117-1235 - Added header formatting variables at top of script +# - Moved Call Times and Phones/Server functions to Admin section +# 70118-1706 - Added new user group displays and links +# 70123-1519 - Added user permission settings for all sections +# 70124-1346 - Fixed spelling errors and formatting consistency +# 70202-1120 - Added agent_pause_codes section to campaigns +# 70205-1204 - Added memo, last dialed, timestamp and stats-refresh fields to vicidial_campaigns/lists +# 70206-1323 - Added user setting for vicidial_recording_override +# 70212-1412 - Added system settings section +# 70214-1226 - Added QueueMetrics Log ID field to system settings section +# 70219-1102 - Changed campaign dial statuses to be one string allowing for high limit +# 70223-0957 - Added queuemetrics_eq_prepend for custom ENTERQUEUE prepending of a field +# 70302-1111 - Fixed small bug in dialable leads calculation +# 70314-1133 - Added insert selection on script forms +# 70319-1423 - Added Alter Customer Data and agent disable display functions +# 70319-1625 - Added option to allow agents to login to outbound campaigns with no leads in the hopper +# 70322-1455 - Added sipsak messages parameters +# 70402-1157 - Added HOME link and entry to system_settings table, added QM link on reports section + +# make sure you have added a user to the vicidial_users MySQL table with at least user_level 8 to access this page the first time + +$admin_version = '2.0.95'; +$build = '70402-1157'; + +$STARTtime = date("U"); +$SQLdate = date("Y-m-d H:i:s"); + + +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]; + $LOGuser_group =$row[5]; + $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]; + $LOGast_admin_access =$row[16]; + $LOGast_delete_phones =$row[17]; + $LOGdelete_scripts =$row[18]; + $LOGdelete_filters =$row[29]; + $LOGalter_agent_interface =$row[30]; + $LOGdelete_call_times =$row[32]; + $LOGmodify_call_times =$row[33]; + $LOGmodify_users =$row[34]; + $LOGmodify_campaigns =$row[35]; + $LOGmodify_lists =$row[36]; + $LOGmodify_scripts =$row[37]; + $LOGmodify_filters =$row[38]; + $LOGmodify_ingroups =$row[39]; + $LOGmodify_usergroups =$row[40]; + $LOGmodify_remoteagents =$row[41]; + $LOGmodify_servers =$row[42]; + $LOGview_reports =$row[43]; + + $stmt="SELECT allowed_campaigns from vicidial_user_groups where user_group='$LOGuser_group';"; + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + $LOGallowed_campaigns =$row[0]; + + 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='admin'; $sh='times'; echo "Füge neue Anrufzeit hinzu";} +if ($ADD==1111111111) {$hh='admin'; $sh='times'; echo "Füge neue landesspezifische Anrufzeit hinzu";} +if ($ADD==11111111111) {$hh='admin'; $sh='phones'; echo "ADDIEREN SIE NEUES TELEFON";} +if ($ADD==111111111111) {$hh='admin'; $sh='server'; echo "ADDIEREN SIE NEUEN BEDIENER";} +if ($ADD==1111111111111) {$hh='admin'; $sh='conference'; echo "ADDIEREN SIE NEUE KONFERENZ";} +if ($ADD==11111111111111) {$hh='admin'; $sh='conference'; echo "ADD NEW VICIDIAL CONFERENCE";} +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 "New Kampagne HotKey Addition";} +if ($ADD==25) {$hh='campaigns'; echo "Neue Kampagne Leitung Bereiten Hinzufügung Auf";} +if ($ADD==26) {$hh='campaigns'; echo "Neuer Vorwahlknopf-Status Des Automobil-Alt";} +if ($ADD==27) {$hh='campaigns'; echo "Neuer Mittel-Pause Code";} +if ($ADD==28) {$hh='campaigns'; echo "Kampagne Vorwahlknopf-Status Addiert";} +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='admin'; $sh='times'; echo "Neue Anrufzeit hinzufügen";} +if ($ADD==2111111111) {$hh='admin'; $sh='times'; echo "Neue landesspezifische Anrufzeit hinzufügen";} +if ($ADD==21111111111) {$hh='admin'; $sh='phones'; echo "ADDIEREN DES NEUEN TELEFONS";} +if ($ADD==211111111111) {$hh='admin'; $sh='server'; echo "ADDIEREN DES NEUEN BEDIENERS";} +if ($ADD==221111111111) {$hh='admin'; $sh='server'; echo "ADDIEREN DES NEUEN STAMM-SATZES DES BEDIENER-VICIDIAL";} +if ($ADD==2111111111111) {$hh='admin'; $sh='conference'; echo "ADDIEREN DER NEUEN KONFERENZ";} +if ($ADD==21111111111111) {$hh='admin'; $sh='conference'; echo "ADDING NEW VICIDIAL CONFERENCE";} +if ($ADD==3) {$hh='users'; echo "Ändern Sie Benutzer";} +if ($ADD==30) {$hh='campaigns'; echo "Kampagne Nicht Erlaubt";} +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='admin'; $sh='times'; echo "Bearbeite Anrufzeit";} +if ($ADD==321111111) {$hh='admin'; $sh='times'; echo "Bearbeite Anrufzeit Landdefinitions-Liste";} +if ($ADD==3111111111) {$hh='admin'; $sh='times'; echo "Bearbeite landesspezifische Anrufzeit";} +if ($ADD==31111111111) {$hh='admin'; $sh='phones'; echo "ÄNDERN SIE TELEFON";} +if ($ADD==311111111111) {$hh='admin'; $sh='server'; echo "ÄNDERN SIE BEDIENER";} +if ($ADD==3111111111111) {$hh='admin'; $sh='conference'; echo "ÄNDERN SIE KONFERENZ";} +if ($ADD==31111111111111) {$hh='admin'; $sh='conference'; echo "MODIFY VICIDIAL CONFERENCE";} +if ($ADD==311111111111111) {$hh='admin'; $sh='settings'; echo "ÄNDERN SIE VICIDIAL SYSTEM EINSTELLUNGEN";} +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==47) {$hh='campaigns'; echo "Ändern Sie Mittel-Pause Code";} +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='admin'; $sh='times'; echo "Bearbeite Anrufzeit";} +if ($ADD==4111111111) {$hh='admin'; $sh='times'; echo "Bearbeite landesspezifische Anrufzeit";} +if ($ADD==41111111111) {$hh='admin'; $sh='phones'; echo "ÄNDERN SIE TELEFON";} +if ($ADD==411111111111) {$hh='admin'; $sh='server'; echo "ÄNDERN SIE BEDIENER";} +if ($ADD==421111111111) {$hh='admin'; $sh='server'; echo "ÄNDERN SIE STAMM-SATZ DES BEDIENER-VICIDIAL";} +if ($ADD==4111111111111) {$hh='admin'; $sh='conference'; echo "ÄNDERN SIE KONFERENZ";} +if ($ADD==41111111111111) {$hh='admin'; $sh='conference'; echo "MODIFY VICIDIAL CONFERENCE";} +if ($ADD==411111111111111) {$hh='admin'; $sh='settings'; echo "ÄNDERN SIE VICIDIAL SYSTEM EINSTELLUNGEN";} +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==53) {$hh='campaigns'; echo "Dringlichkeits-VDAC Stau-Freier Raum";} +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='admin'; $sh='times'; echo "Lösche Anrufzeit";} +if ($ADD==5111111111) {$hh='admin'; $sh='times'; echo "Lösche landesspezifische Anrufzeit";} +if ($ADD==51111111111) {$hh='admin'; $sh='phones'; echo "DELETE PHONE";} +if ($ADD==511111111111) {$hh='admin'; $sh='server'; echo "DELETE SERVER";} +if ($ADD==5111111111111) {$hh='admin'; $sh='conference'; echo "DELETE CONFERENCE";} +if ($ADD==51111111111111) {$hh='admin'; $sh='conference'; echo "DELETE VICIDIAL CONFERENCE";} +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==63) {$hh='campaigns'; echo "Dringlichkeits-VDAC Stau-Freier Raum";} +if ($ADD==65) {$hh='campaigns'; echo "Löschung-Leitung Bereiten Auf";} +if ($ADD==66) {$hh='campaigns'; echo "Selbstalt Vorwahlknopf-Status Der Löschung-";} +if ($ADD==67) {$hh='campaigns'; echo "Löschung-Mittel-Pause Code";} +if ($ADD==68) {$hh='campaigns'; echo "Kampagne Vorwahlknopf-Status Entfernt";} +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='admin'; $sh='times'; echo "Lösche Anrufzeit";} +if ($ADD==6111111111) {$hh='admin'; $sh='times'; echo "Lösche landesspezifische Anrufzeit";} +if ($ADD==61111111111) {$hh='admin'; $sh='phones'; echo "DELETE PHONE";} +if ($ADD==611111111111) {$hh='admin'; $sh='server'; echo "DELETE SERVER";} +if ($ADD==621111111111) {$hh='admin'; $sh='server'; echo "STAMM-SATZ DES LÖSCHUNG-BEDIENER-VICIDIAL";} +if ($ADD==6111111111111) {$hh='admin'; $sh='conference'; echo "DELETE CONFERENCE";} +if ($ADD==61111111111111) {$hh='admin'; $sh='conference'; echo "DELETE VICIDIAL CONFERENCE";} +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='lists'; echo "Wiederholungsbesuche Innerhalb Der Liste";} +if ($ADD==8111) {$hh='usergroups'; echo "Wiederholungsbesuche Innerhalb Der Benutzer-Gruppe";} +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='admin'; $sh='times'; echo "Anrufzeiten";} +if ($ADD==1000000000) {$hh='admin'; $sh='times'; echo "Landesspezische Anrufzeiten";} +if ($ADD==10000000000) {$hh='admin'; $sh='phones'; echo "TELEFON-LISTE";} +if ($ADD==100000000000) {$hh='admin'; $sh='server'; echo "BEDIENER-LISTE";} +if ($ADD==1000000000000) {$hh='admin'; $sh='conference'; echo "KONFERENZ-LISTE";} +if ($ADD==10000000000000) {$hh='admin'; $sh='conference'; echo "VICIDIAL KONFERENZ-LISTE";} +if ($ADD==550) {$hh='users'; echo "Suchform";} +if ($ADD==551) {$hh='users'; echo "SUCHTELEFONE";} +if ($ADD==660) {$hh='users'; echo "Suchresultate";} +if ($ADD==661) {$hh='users'; echo "SUCHE RUFT RESULTATE AN";} +if ($ADD==99999) {$hh='users'; echo "HILFE";} +if ($ADD==999999) {$hh='reports'; echo "REPORTS";} + +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>20) and ($ADD<70)) or ($ADD=="4A") or ($ADD=="4B") or (strlen($ADD)==12) ) + { + ##### 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++; + } + + ##### BEGIN get inbound groups listing for checkboxes ##### + if ( (($ADD>20) and ($ADD<70)) and ($ADD!=41) ) + { + $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 .= " -";} + } + ##### END get inbound groups listing for checkboxes ##### + + + ##### BEGIN get campaigns listing for checkboxes ##### + if ( ($ADD==211111) or ($ADD==311111) or ($ADD==411111) or ($ADD==511111) or ($ADD==611111) ) + { + if ( ($ADD==211111) or ($ADD==311111) or ($ADD==511111) or ($ADD==611111) ) + { + $stmt="SELECT allowed_campaigns from vicidial_user_groups where user_group='$user_group';"; + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + $allowed_campaigns = $row[0]; + $allowed_campaigns = preg_replace("/ -$/","",$allowed_campaigns); + $campaigns = explode(" ", $allowed_campaigns); + echo "<!-- $allowed_campaigns -->"; + } + + $campaigns_value=''; + $campaigns_list='<B><input type="checkbox" name="campaigns[]" value="-ALL-CAMPAIGNS-"'; + $p=0; + while ($p<100) + { + if (eregi('ALL-CAMPAIGNS',$campaigns[$p])) + { + $campaigns_list.=" CHECKED"; + $campaigns_value .= " -ALL-CAMPAIGNS- -"; + } + $p++; + } + $campaigns_list.="> ALL-CAMPAIGNS - BENUTZER KÖNNEN JEDE MÖGLICHE KAMPAGNE ANSEHEN</B><BR>\n"; + + $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); + + $o=0; + while ($campaigns_to_print > $o) + { + $rowx=mysql_fetch_row($rslt); + $campaign_id_value = $rowx[0]; + $campaign_name_value = $rowx[1]; + $campaigns_list .= "<input type=\"checkbox\" name=\"campaigns[]\" value=\"$campaign_id_value\""; + $p=0; + while ($p<100) + { + if ($campaign_id_value == $campaigns[$p]) + { + # echo "<!-- X $p|$campaign_id_value|$campaigns[$p]| -->"; + $campaigns_list .= " CHECKED"; + $campaigns_value .= " $campaign_id_value"; + } + # echo "<!-- O $p|$campaign_id_value|$campaigns[$p]| -->"; + $p++; + } + $campaigns_list .= "> $campaign_id_value - $campaign_name_value<BR>\n"; + $o++; + } + if (strlen($campaigns_value)>2) {$campaigns_value .= " -";} + } + ##### END get campaigns listing for checkboxes ##### + + + if ( (strlen($ADD)==11) or (strlen($ADD)>12) ) + { + ##### 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++; + } + } + + + +$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. + +
+
+
+Hot Keys aktiv - Diese Wahl, wenn Satz bis 1 dem Benutzer erlaubt,die Hot Keys 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. + +
+
+
+VICIDIAL Aufnahme-Übersteuerung - diese Wahl läuft über, was auchimmer die Wahl in der Kampagne für Aufnahme ist. UNTAUGLICH läuftnicht die Kampagne Aufnahmeeinstellung über. NIE sperrt Aufnahme aufdem Klienten. ONDEMAND ist die Rückstellung und erlaubt dem Vertreterzu notieren zu beginnen und, zu stoppen, wie gebraucht. ALLCALLSbeginnt Aufnahme auf dem Klienten, wann immer ein Anruf zu einemMittel geschickt wird. ALLFORCE beginnt Aufnahme auf dem Klienten,wann immer ein Anruf zu einem Mittel geschickt wird, das dem Mittelkeine Wahl gibt, um zu notieren zu stoppen. Für ALLCALLS und ALLFORCEgibt es eine Wahl, zum der Aufnahme zu benutzen verzögert, um untenauf sehr kurze Aufnahmen und recude Anlagen-Belastung zu schneiden. + +
+
+
+Mittel ändern Kunde Daten-Übersteuerung - diese Wahl läuft über,was auch immer die Wahl in der Kampagne für das Ändern von KundeDaten ist. NOT_ACTIVE verwendet, was auch immer Einstellung für dieKampagne anwesend ist. ALLOW_ALTER darf immer, damit das Mittel dieKunde Daten ändert, egal was die Kampagne Einstellung ist.Rückstellung ist NOT_ACTIVE. + +
+
+
+Ä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. + +
+
+
+Ändern Sie Abschnitte - diese Wahlen erlauben dem Benutzer, jedesanzusehen und zu ändern Abschnittaufzeichnungen. Wenn Satz bis 0, derBenutzer in der LageIST, die Abschnittliste, aber nicht das Detailoder den Änderung Schirm einer Aufzeichnung in diesem Abschnitt zusehen. + +
+
+
+Ansicht berichtet - diese Wahl erlaubt dem Benutzer, die VICIDIALReports anzusehen. + + + + +



+ +VICIDIAL_CAMPAIGNSTABELLE

+
+
+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. + +
+
+
+Kampagne Beschreibung - dieses ist ein Protokoll auffangenfür die Kampagne, ist es wahlweise freigestellt und kann ein Maximumvon 255 Buchstaben lang sein. + +
+
+
+Kampagne Änderung Datum - dieses ist das letzte Mal, daß dieEinstellungen für diese Kampagne in jeder Hinsicht geändert wurden. + +
+
+
+Letztes Kampagne LOGON-Datum - dieses ist das letzte Mal, daß einMittel in diese Kampagne geloggt wurde. + +
+
+
+Kampagne Notfall erneuern - dieses checkbox erlaubt Ihnen, einenvicidial Notfall zu zwingen erneuern, selbst wenn die Kampagne nichtaktiv ist. + +
+
+
+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. Um einen anderen Status Vorwahlknopf hinzuzufügen, wählen Sie ihnvon der Drop-Down-Liste vor und Klicken FÜGT hinzu. Um einen derVorwahlknopfstatus zu entfernen, klicken Sie an dieENTFERNENVERBINDUNG nahe bei dem Status, den Sie entfernen möchten. + +
+
+
+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. + +
+
+
+Vorwahlknopf-Methode - Dieses fangen ist die Weise, wie auf das Wählen zu definieren, stattfinden soll. Wenn HANDBUCH dann das auto_dial_level bei 0 verschlossen ist, es sei denn Vorwahlknopf-Methode geändert wird. Wenn VERHÄLTNIS dann der Normal, der eine Zeilenzahl für aktive Mittel wählt. ADAPT_HARD_LIMIT wählt predictively bis zum fallengelassenen Prozentsatz und dann erlaubt nicht das konkurrenzfähige Wählen, sobald die Tropfenbegrenzung erreicht wird, bis der Prozentsatz unten wieder geht. ADAPT_TAPERED läßt laufenden Überschuß den fallengelassenen Prozentsatz zur Hälfte erste der Verschiebung zu - wie durch das call_time definiert, das für Kampagne vorgewählt wird und erhält strenger, während die Verschiebung weitergeht. ADAPT_AVERAGE versucht, einen Durchschnitt oder den fallengelassenen Prozentsatz beizubehalten so, die konkurrenzfähig harte Begrenzungen nicht wie die anderen zwei Methoden auferlegen. Sie können nicht das Selbstvorwahlknopf-Niveau ändern, wenn Sie in irgendwelchen der ANPASSENVORWAHLKNOPFMETHODEN sind. Nur der Dialer kann das Vorwahlknopfniveau ändern wenn im vorbestimmten wählenden Modus. + +
+
+
+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. Das ANPASSENÜBERSTEUERUNG checkbox erlaubt Ihnen, ein neuesVorwahlknopfniveau zu zwingen, obwohl die Vorwahlknopfmethode in einemANPASSENMODUS ist. Dieses ist nützlich, wenn es eine drastischeVerschiebung in der Qualität der Leitungen gibt und Sie dasdial_level drastisch manuell ändern möchten. + +
+
+
+Vorhandenes nur Tally - dieses fangen auf, wenn Satz zu YINCALL und WARTESCHLANGE Statusmittel ausläßt, wenn er die ZahlAnrufen zum Vorwahlknopf wenn nicht in MANUELLEN Vorwahlknopfmoduserrechnet. Rückstellung ist N. + +
+
+
+Tropfen-Prozentsatz-Begrenzung - dieses fangen ist auf, wohinSie die Begrenzung auf den Prozentsatz der fallengelassenen Anrufe,die einstellten Sie beim Verwenden eineranpassungsfähig-vorbestimmten Vorwahlknopfmethode möchten, nichtMANUELL oder des VERHÄLTNISSES. + +
+
+
+Maximum paßt den waagerecht ausgerichteten Vorwahlknopf an - diesesfangen ist auf, wohin Sie die Begrenzung auf die Begrenzungauf das numbr der Linien, die einstellten Sie gewählt pro Mittel beimVerwenden einer anpassungsfähig-vorbestimmten Vorwahlknopfmethodemöchten, nicht MANUELL oder des VERHÄLTNISSES. Diese Zahl kann alsdas Selbstvorwahlknopf-Niveau höher sein, wenn Ihre Kleinteile esstützen. Wert muß eine positive Nr. grösser als eine sein und kannDezimalstellen Rückstellung 3.0 haben. + +
+
+
+Neueste Bediener-Zeit - dieses fangen wird verwendet nurdurch die ADAPT_TAPERED Vorwahlknopfmethode auf. Sie sollten in dieStunde hereinkommen und Minute, um der Sie stoppen, diese Kampagne zuersuchen, 2100 würde bedeuten, daß Sie stoppen, diese Kampagne bei9PM Bedienerzeit zu wählen. Dieses läßt den sich verjüngendenAlgorithmus entscheiden wie konkurrenzfähig zum Vorwahlknopf durch,wie lang Sie haben, bis Sie fertiges Benennen sind. + +
+
+
+Passen Sie Intensität Modifizierfaktor an - dieses fangenwird verwendet, die vorbestimmte höhere oder niedrigere Intensitätzu justieren entweder auf. Das höhere eine positive Zahl, die Sievorwählen, grösser der Dialer den schreitenen Anruf erhöht, wenn esgeht oben und langsam der Dialer den schreitenen Anruf verringert,wenn es geht unten. Das niedriger die negative Zahl, Sie vorwählenhier, langsam erhöht der Dialer den schreitenen Anruf und schnellersenkt der Dialer den schreitenen Anruf, wenn es geht unten.Rückstellung ist 0. Dieses fangen wird verwendet nicht durchden HANDBUCH- oder VERHÄLTNIS-Vorwahlknopf Methoden auf. + +
+
+
+Vorwahlknopf-waagerecht ausgerichtetes Unterschied-Ziel - diesesfangen wird verwendet zu definieren auf, ob Sie Haben einerspezifischen Anzahl von den Mitteln zielen möchten, die Anruf- oderAnklopfenmittel warten. Z.B. wenn Sie immer auf Durchschnitt einerMittel haben möchten frei, Anrufe sofort zu nehmen, würden Siedieses bis -1 einstellen, wenn Sie ein immer haben zielen möchtenersuchen um den Einfluß, der ein Mittel wartet, das Sie dieses bis 1einstellen würden. Rückstellung ist 0. Dieses fangen wirdverwendet nicht durch den HANDBUCH- oder VERHÄLTNIS-VorwahlknopfMethoden auf. + +
+
+
+Gleichzeitige Übertragungen - diese Einstellung wird benutzt, um dieZahl Anrufen zu definieren, die zu den Mitteln gleichzeitig geschicktwerden können. Es wird empfohlen, daß diese Einstellung am AUTOMOBILgelassen wird. Dieses fangen wird verwendet nicht durch dieMANUELLE Vorwahlknopfmethode auf. + +
+
+
+Wählende SelbstAlt-zahl - diese Einstellung wird benutzt, umwechselnde Nummer automatisch zu wählen auffängt, beimWählen im VERHÄLTNIS und ANPASST Vorwahlknopfmethoden, wenn eskeinen Kontakt an der Haupttelefonnummer für eine Leitung, die Na, B,DC und N Status gibt. Diese Einstellung wird nicht durch die MANUELLEVorwahlknopfmethode benutzt. + +
+
+
+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 dial plan - extensions.conf. + +
+
+
+Lassen Sie Telefon-Code aus - dieses fangen erlaubt Ihnen,das phone_code auszulassen auffangen beim Wählen innerhalbVICIDIAL auf. Zum Beispiel wenn Sie in Großbritannien vonGroßbritannien wählen, würden Sie 44 innen haben, wie Ihrphone_code für alle Leitungen auffangen, aber Sie gerade 10Stellen in Ihrem dial plan extensions.conf wählen möchten, um Anrufeanstelle von 44 dann 10 Stellen zu setzen. Rückstellung ist N. + +
+
+
+Kampagne CallerID - Dieses fangen zuläßt das Senden einer kundenspezifischen callerid Zahl bei den outbound Anrufen auf. Dieses ist die Zahl, die oben auf dem callerid der Person darstellen würde, die, Sie anrufen. Die Rückstellung ist UNBEKANNT. Wenn Sie T1 benutzen, oder Eß, zum dieser Wahl heraus zu wählen nur vorhanden ist, wenn Sie PRIs verwenden - ISDN Tß oder Eß - die die kundenspezifische callerid Eigenschaft haben, die eingeschaltet wird, arbeitet dieses nicht mit Berauben-Spitze Service - RBS- Stromkreise. Dieses arbeitet auch durch das meiste VOIP - SIP oder IAX Stammversorger, die dynamisches outbound callerID erlauben. Das kundenspezifische callerID trifft nur auf die Anrufe zu, die direkt für die VICIDIAL Kampagne gesetzt werden, benennt jede mögliche 3. Partei, oder Übertragungen senden nicht das kundenspezifische callerID. ANMERKUNG: UNBEKANNT oder PRIVAT in auffangen manchmal sich setzen erbringt das Senden Ihrer Rückstellung callerID Zahl durch Ihre Fördermaschine mit den Anrufen. Sie können dieses prüfen wünschen und fangen 0000000000 in das callerid sich zu setzen anstatt auf, wenn Sie nicht Ihnen CallerID schicken möchten. + +
+
+
+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, welchesNiveau der Aufnahme auf dieser Kampagne erlaubt wird. NIE sperrtAufnahme auf dem Klienten. ONDEMAND ist die Rückstellung und erlaubtdem Vertreter zu notieren zu beginnen und, zu stoppen, wie gebraucht.ALLCALLS beginnt Aufnahme auf dem Klienten, wann immer ein Anruf zueinem Mittel geschickt wird. ALLFORCE beginnt Aufnahme auf demKlienten, wann immer ein Anruf zu einem Mittel geschickt wird, das demMittel keine Wahl gibt, um zu notieren zu stoppen. Für ALLCALLS undALLFORCE gibt es eine Wahl, zum der Aufnahme zu benutzen verzögert,um unten auf sehr kurze Aufnahmen und recude Anlagen-Belastung zuschneiden. + +
+
+
+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. + +
+
+
+Das Notieren verzögert - für ALLCALLS und ALLFORCE nur Aufnahme.Dieser Einstellung Wille verzögert das Beginnen der Aufnahme beiallen Anrufen für die Zahl den Sekunden, die diesbezüglichspezifiziert werden, auffangen. Rückstellung ist 0. + +
+
+
+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 dial plan - 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. Wenn Sie beratende Übertragungen erlauben möchten, ein fronter zueinem genauerem, können Sie CXFER setzen, da eins derZahl-zu-Vorwahlknopf Voreinstellungen und des korrekten dial stringsgesendet wird, um eine lokale beratende Übertragung, dann dieMitteldose gerechtes LEAVE-3WAY-CALL und Bewegung an zu tun zu ihremfolgenden Anruf. Wenn Sie blinde Übertragungen der Kunden auf einenVICIDIAL AGI Index für die Protokollierung oder ein IVR erlaubenmöchten, legen Sie dann AXFER in den Zahl-zu-Vorwahlknopfauffangen. Sie können eine kundenspezifische Verlängerungnach dem AXFER oder dem CXFER auch spezifizieren, zum Beispiel wennSie interne beratende Übertragungen anstelle vom Einheimischen tunmöchten, würden Sie CXFER90009 in den Zahl-zu-Vorwahlknopfauffangen einsetzen. + +
+
+
+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. + +
+
+
+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. + +
+
+
+Mittel-Pause kodiert aktives - läßt Mittel einen Pause Codevorwählen, wenn sie an die PAUSE Taste in vicidial.php klicken. PauseCodes sind pro Kampagne am unteren Bildschirmrand KampagneAnsichtdetail definierbar und sie werden in der vicidial_agent_logTabelle gespeichert. Rückstellung ist N. + +
+
+
+Sperren Sie ändern Kunde Daten - wenn Satz zu Y, nicht irgendwelchedes Kunde Datensatzes wenn Einteilungen eines Mittels der Anrufändert. Rückstellung ist N. + +
+
+
+Gewähren Sie Kein-Zufuhrbehälter-Führt LOGON - wenn Satz zu Y,Mittel zum LOGON zur Kampagne erlaubt, selbst wenn es keine Leitungengibt, die in den Zufuhrbehälter für diese Kampagne geladen werden.Diese Funktion wird nicht in den CLOSER-type Kampagnen benötigt.Rückstellung ist N. + + + +



+ +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. Must be a number greater than 100. + +
+
+
+Liste Name - This is the description of the list, it must be between 2 and 20 characters in length. + +
+
+
+Liste Beschreibung - dieses ist das Protokoll auffangen fürdie Liste, es ist wahlweise freigestellt. + +
+
+
+Liste Änderung Datum - dieses ist das letzte Mal, daß dieEinstellungen für diese Liste in jeder Hinsicht geändert wurden. + +
+
+
+Liste Letzt-Anruf-Datum - dieses ist das letzte Mal, das wurdegewählt von dieser Liste führen. + +
+
+
+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. Wenn Sie beratende Übertragungen erlauben möchten, ein fronter zueinem genauerem, können Sie CXFER setzen, da eins derZahl-zu-Vorwahlknopf Voreinstellungen und des korrekten dial stringsgesendet wird, um eine lokale beratende Übertragung, dann dieMitteldose gerechtes LEAVE-3WAY-CALL und Bewegung an zu tun zu ihremfolgenden Anruf. Wenn Sie blinde Übertragungen der Kunden auf einenVICIDIAL AGI Index für die Protokollierung oder ein IVR erlaubenmöchten, legen Sie dann AXFER in den Zahl-zu-Vorwahlknopfauffangen. Sie können eine kundenspezifische Verlängerungnach dem AXFER oder dem CXFER auch spezifizieren, zum Beispiel wennSie interne beratende Übertragungen anstelle vom Einheimischen tunmöchten, würden Sie CXFER90009 in den Zahl-zu-Vorwahlknopfauffangen einsetzen. + +
+
+
+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 dial plan 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 hot keys, benenntVertreter, die verwenden, der vicidial Netz-Klient Dose Hängezustandund Einteilung, gerade indem sie einen einzelnen Schlüssel auf ihrerTastatur betätigen. There are two special HotKey options that you can use in conjunction with Alternate Phone number dialing, ALTPH2 - Alternate Phone Hot Dial and ADDR3-----Address3 Hot Dial allow an agent to use a hotkey to hang up their call, stay on the same lead, and dial another contact number from that lead. + + + + + +



+ +VICIDIAL_LEAD_RECYCLETABELLE

+
+
+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. + + + + + +



+ +VICIDIAL SELBSTALT VORWAHLKNOPF-STATUS

+
+
+Wenn das SelbstAlt-zahl Wählen wird eingestellt auffangen,dann die Leitungen, die sind, unter diesen Vorwahlknopfstatus desAutomobils Alt haben ihr alt_phone dispositioned, und-oder address3gewählt, nachdem irgendwelche von diesen Status kein-antworten,werden eingestellt auffängt. + + + + + +



+ +VICIDIAL MITTEL-PAUSE CODES

+
+
+Wenn die Mittel-Pause aktives kodiert, fangen Sie wirdeingestellt auf aktives dann die Mittel in der LageIST, von diesenPause Codes vorzuwählen auf, wenn sie an die PAUSE Taste auf ihrenSchirmen klicken. Diese Daten werden dann im vicidialMittelmaschinenbordbuch gespeichert. Der Pause Code muß nurBuchstaben und Zahlen lang enthalten und kleiner als 7 Buchstabensein. Der Pause Codename kann nicht mehr als 30 Buchstaben sein. + + + + + +



+ +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. + +
+
+
+Erlaubte Kampagnen - dieses ist eine auswählbare Liste der Kampagnen,zu denen Mitglieder dieser Benutzergruppe innen protokollieren könnenin. Die ALL-CAMPAIGNS Wahl erlaubt den Benutzern in dieser Gruppe, injeder möglicher Kampagne auf dem System innen zu sehen und zuprotokollieren. + + + + + +



+ +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, lead_id, campaign, phone_login, group, channel_group, SQLdate, epoch, uniqueid, customer_zap_channel, server_ip, SIPexten, session_id. 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?

You can also use an iframe to load a separate window within the SCRIPT tab, here is an example with prepopulated variables: + +
+<iframe src="http://astguiclient.sf.net/test_VICIDIAL_output.php?lead_id=--A--lead_id--B--&vendor_id=--A--vendor_lead_code--B--&list_id=--A--list_id--B--&gmt_offset_now=--A--gmt_offset_now--B--&phone_code=--A--phone_code--B--&phone_number=--A--phone_number--B--&title=--A--title--B--&first_name=--A--first_name--B--&middle_initial=--A--middle_initial--B--&last_name=--A--last_name--B--&address1=--A--address1--B--&address2=--A--address2--B--&address3=--A--address3--B--&city=--A--city--B--&state=--A--state--B--&province=--A--province--B--&postal_code=--A--postal_code--B--&country_code=--A--country_code--B--&gender=--A--gender--B--&date_of_birth=--A--date_of_birth--B--&alt_phone=--A--alt_phone--B--&email=--A--email--B--&security_phrase=--A--security_phrase--B--&comments=--A--comments--B--&user=--A--user--B--&campaign=--A--campaign--B--&phone_login=--A--phone_login--B--&fronter=--A--fronter--B--&closer=--A--user--B--&group=--A--group--B--&channel_group=--A--group--B--&SQLdate=--A--SQLdate--B--&epoch=--A--epoch--B--&uniqueid=--A--uniqueid--B--&customer_zap_channel=--A--customer_zap_channel--B--&server_ip=--A--server_ip--B--&SIPexten=--A--SIPexten--B--&session_id=--A--session_id--B--&phone=--A--phone--B--" style="width:580;height:290;background-color:transparent;" scrolling="auto" frameborder="0" allowtransparency="true" id="popupFrame" name="popupFrame" width="460" height="290"> +</iframe> +
+ +
+
+
+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 +
+ +
NOTES: The Excel Lead loader functionality is enabled by a series of perl scripts and needs to have a properly configured /etc/astguiclient.conf 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. + + + + +



+ + + + + + +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. + +
+
+
+Dial Plan Zahl - 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 dial plan 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 dial plan 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 dial plan Verlängerung, diegeht, Ihr voicemail. zu überprüfen, überprüfen mit extensions.confAkte, bevor es ändert. + +
+
+
+VMAIL Dump Exten - Dieses ist das dial plan 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 dial plan 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. + +
+
+
+Ermöglichen Sie SIPSAK Anzeigen - wenn er ermöglicht wird, schicktder Bediener Anzeigen zum SIP Telefon zur Anzeige auf der Telefon LCDAnzeige, wenn er in VICIDIAL geloggt wird. Eigenschaft arbeitet nurmit SIP Telefonen und erfordert sipsak Anwendung, auf das web serverangebracht zu werden. Rückstellung ist 0. + +
+
+
+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 dial plan Kontextverwendet für Indexe, die für diesen Bediener funktionieren.Rückstellung ist ' Rückstellung ' + +
+
+
+System Leistung - die Einstellung dieser Wahl auf Y ermöglicht derProtokollierung von System Leistung Notfall für die Bedienermaschineeinschließlich Anlagen-Belastung, System Prozesse undSternchenführungen im Gebrauch. Rückstellung ist N. + +
+
+
+Bediener-Maschinenbordbücher - die Einstellung dieser Wahl auf Yermöglicht der Protokollierung aller VICIDIAL bezogenen Indexe zuihren Textmaschinenbordbuchakten. Die Einstellung dieses auf N stopptSchreiben Maschinenbordbücher zu den Akten für diese Prozesse, auchdie Schirmprotokollierung des Sternchens ist untauglich, wenn diesesauf N eingestellt wird, wenn Sternchen begonnen wird. Rückstellungist Y. + +
+
+
+AGI ausgegeben - die Einstellung dieser Wahl auf KEINE sperrt Ausgangvon allen VICIDIAL bezogenen AGI Indexen. Die Einstellung dieses aufSTDERR schickt das AGI, das zum Sternchen CLI ausgegeben wird. DieEinstellung dieses auf AKTE schickt den Ausgang zu einer Akte imMaschinenbordbuchverzeichnis. Die Einstellung dieses auf BEIDE schicktAusgang zum Sternchen CLI und zu einer Maschinenbordbuchakte.Rückstellung ist AKTE. + +
+
+
+VICIDIAL Balance Wählen - dieses einstellend, fangen Sie zuY läßt den Bediener Balance Anrufe für Kampagnen in VICIDIAL legenauf, damit das definierte Vorwahlknopfniveau getroffen werden kann,selbst wenn es keine Mittel gibt, die in diese Kampagne auf diesemBediener geloggt werden. Rückstellung ist N. + +
+
+
+VICIDIAL Balance Offlimits - diese Einstellung definiert die ZahlStämmen, um die VICIDIAL Balance nicht zu erlauben, die wählt, um zuverwenden. Z.B. wenn Sie haben, wird 40 maximale vicidial Stämme undBalance offlimits bis 10 eingestellt, die Sie nur in der LageSIND, 30Hauptluftlinien für VICIDIAL Balance das Wählen zu benutzen.Rückstellung ist 0. + + +



+ +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. + + + + +



+ +VICIDIAL_SERVER_TRUNKSTABELLE

+
+
+VICIDIAL Bediener-Stämme erlaubt Ihnen, die gehenden Leitungeneinzuschränken, die auf diesem Bediener für die Kampagne benutztwerden, die auf einer Prokampagne Grundlage wählt. Sie haben dieWahl, zum einer spezifischen Zeilenzahl durch nur eine Kampagneverwendet zu werden aufzuheben,, sowie das Lassen dieser Kampagneüber seine reservierten Linien laufen in was Linien geöffnetbleiben, wie, lang an den Gruppenzeilen, die durch vicidial auf diesemBediener benutzt werden, sind kleiner als die Maximum VICIDIALStammeinstellung. Erlaubt Haben nicht irgendwelche dieserAufzeichnungen die Kampagne, die die Linie zuerst wählt, um da vieleLinien zu haben, während sie unter der Maximum VICIDIAL erhalten kannStammeinstellung. + + + + + +



+ +SYSTEM_SETTINGSTABELLE

+
+
+Gebrauch Nicht-Lateinisch - diese Wahl erlaubt Ihnen, den NetzanzeigeIndex auf Buchstaben des Gebrauches UTF8 zurückzufallen und keinenfilternden Lateinisch-Buchstabefamilie regelmäßigen Ausdruck zu tunoder Formatierung anzuzeigen. Rückstellung ist 0. + +
+
+
+Webroot schreibbar - diese Einstellung erlaubt Ihnen zu definieren, obTemperatur Akten und Authentisierung Akten in das webroot auf Ihr webserver gelegt werden sollten. Rückstellung ist 1. + +
+
+
+Ermöglichen Sie der QueueMetrics Protokollierung - diese Einstellungerlaubt Ihnen zu definieren, ob VICIDIAL Maschinenbordbucheintragungenin die queue_log Datenbanktabelle einsetzt, wieSternchen-Warteschlangen Tätigkeit. QueueMetrics ist,Geschlossenquellenstatistische Analyse Programm ein alleinstehendes.Sie müssen QueueMetrics haben bereits angebracht und zusammengebaut,bevor Sie dieser Eigenschaft ermöglichen. Rückstellung ist 0. + +
+
+
+QueueMetrics Bediener IP - dieses ist das IP address der Datenbankfür Ihre QueueMetrics Installation. + +
+
+
+QueueMetrics Datenbank-Name - dieses ist der Datenbankname für IhreQueueMetrics Datenbank. + +
+
+
+QueueMetrics Datenbank-LOGON - dieses ist der Benutzername, derverwendet wird, um in Ihrer QueueMetrics Datenbank innen zuprotokollieren. + +
+
+
+QueueMetrics Datenbank-Kennwort - dieses ist das Kennwort, dasverwendet wird, um in Ihrer QueueMetrics Datenbank innen zuprotokollieren. + +
+
+
+QueueMetrics URL - Dieses ist die URL oder Web site Adresse, dieverwendet wird, um zu Ihrer QueueMetrics Installation zu kommen. + +
+
+
+QueueMetrics Maschinenbordbuch Identifikation - dieses ist derBediener Identifikation, den alle VICIDIAL Maschinenbordbücher, diein die QueueMetrics Datenbank einsteigen, als Bezeichner für jedeAufzeichnung benutzen. + +
+
+
+QueueMetrics EnterQueue stellen voran - dieses fangen wirdverwendet, das Voranstellen von einer der vicidial_list Datenzuzulassen auffängt vor der Telefonnummer des Kunden fürkundengebundene QueueMetrics Reports auf. Rückstellung ist KEINE,alles nicht zu bevölkern. + +
+
+
+VICIDIAL Mittel sperren Anzeige - diese fangen wirdverwendet, vorzuwählen auf, wann man einem Mittel zeigt, wann ihrLernabschnitt durch das System, eine Managertätigkeit oder durch einexternes Maß gesperrt worden ist. Die NOT_ACTIVE Einstellung sperrtdie Anzeige auf dem Mittelschirm. Die LIVE_MITTELEinstellung zeigt nurdie untaugliche Anzeige, wenn die Mittel vicidial_auto_callsAufzeichnung entfernt worden ist, wie während ein Kraft Logout oderDringlichkeitslogout an. + +
+
+
+Erlauben Sie SIPSAK Anzeigen - wenn Satz bis 1, dieses dieTelefontabelle Einstellung richtig arbeiten läßt, schickt derBediener Anzeigen zum SIP Telefon zur Anzeige auf der Telefon LCDAnzeige, wenn er in VICIDIAL geloggt wird. Diese Eigenschaft arbeitetnur mit SIP Telefonen und erfordert sipsak Anwendung, auf das webserver angebracht zu werden. Rückstellung ist 0. + +
+
+
+Admin Haupt-URL - dieses ist die URL oder Web site Adresse, daß Siegehen, wenn Sie an die HAUPTVERBINDUNG an der Oberseite der admin.phpSeite klicken. + + + + +







+







+DAS ENDE +
+\n"; + echo "\n"; + echo "\n"; + echo ""; + + $stmt="SELECT dial_statuses,local_call_time,lead_filter_id from vicidial_campaigns where campaign_id='$campaign_id';"; + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + $dial_statuses = $row[0]; + $local_call_time = $row[1]; + if ($lead_filter_id=='') + { + $lead_filter_id = $row[2]; + 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_statuses
\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_statuses,$camp_lists,$fSQL); + + echo "

\n"; + echo "\n"; + + exit; + } + else + { + echo "Sie haben nicht Erlaubnis, diese Seite anzusehen\n"; + exit; + } +} + + +###################### +# ADD=7111111 view sample script with test variables +###################### + +if ($ADD==7111111) +{ + ##### TEST VARIABLES ##### + $vendor_lead_code = 'VENDOR:LEAD;CODE'; + $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'; + $RGlead_id = '1234'; + $RGcampaign = 'TESTCAMP'; + $RGphone_login = 'gs102'; + $RGgroup = 'TESTCAMP'; + $RGchannel_group = 'TESTCAMP'; + $RGSQLdate = date("Y-m-d H:i:s"); + $RGepoch = date("U"); + $RGuniqueid = '1163095830.4136'; + $RGcustomer_zap_channel = 'Zap/1-1'; + $RGserver_ip = '10.10.10.15'; + $RGSIPexten = 'SIP/gs102'; + $RGsession_id = '8600051'; + +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]; + +if (eregi("iframe src",$script_text)) + { + $vendor_lead_code = eregi_replace(' ','+',$vendor_lead_code); + $list_id = eregi_replace(' ','+',$list_id); + $gmt_offset_now = eregi_replace(' ','+',$gmt_offset_now); + $phone_code = eregi_replace(' ','+',$phone_code); + $phone_number = eregi_replace(' ','+',$phone_number); + $title = eregi_replace(' ','+',$title); + $first_name = eregi_replace(' ','+',$first_name); + $middle_initial = eregi_replace(' ','+',$middle_initial); + $last_name = eregi_replace(' ','+',$last_name); + $address1 = eregi_replace(' ','+',$address1); + $address2 = eregi_replace(' ','+',$address2); + $address3 = eregi_replace(' ','+',$address2); + $city = eregi_replace(' ','+',$city); + $state = eregi_replace(' ','+',$state); + $province = eregi_replace(' ','+',$province); + $postal_code = eregi_replace(' ','+',$postal_code); + $country_code = eregi_replace(' ','+',$country_code); + $gender = eregi_replace(' ','+',$gender); + $date_of_birth = eregi_replace(' ','+',$date_of_birth); + $alt_phone = eregi_replace(' ','+',$alt_phone); + $email = eregi_replace(' ','+',$email); + $security_phrase = eregi_replace(' ','+',$security_phrase); + $comments = eregi_replace(' ','+',$comments); + $RGfullname = eregi_replace(' ','+',$RGfullname); + $RGuser = eregi_replace(' ','+',$RGuser); + $RGlead_id = eregi_replace(' ','+',$RGlead_id); + $RGcampaign = eregi_replace(' ','+',$RGcampaign); + $RGphone_login = eregi_replace(' ','+',$RGphone_login); + $RGgroup = eregi_replace(' ','+',$RGgroup); + $RGchannel_group = eregi_replace(' ','+',$RGchannel_group); + $RGSQLdate = eregi_replace(' ','+',$RGSQLdate); + $RGepoch = eregi_replace(' ','+',$RGepoch); + $RGuniqueid = eregi_replace(' ','+',$RGuniqueid); + $RGcustomer_zap_channel = eregi_replace(' ','+',$RGcustomer_zap_channel); + $RGserver_ip = eregi_replace(' ','+',$RGserver_ip); + $RGSIPexten = eregi_replace(' ','+',$RGSIPexten); + $RGsession_id = eregi_replace(' ','+',$RGsession_id); + } + +$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--fronter--B--',"$RGuser",$script_text); +$script_text = eregi_replace('--A--user--B--',"$RGuser",$script_text); +$script_text = eregi_replace('--A--lead_id--B--',"$RGlead_id",$script_text); +$script_text = eregi_replace('--A--campaign--B--',"$RGcampaign",$script_text); +$script_text = eregi_replace('--A--phone_login--B--',"$RGphone_login",$script_text); +$script_text = eregi_replace('--A--group--B--',"$RGgroup",$script_text); +$script_text = eregi_replace('--A--channel_group--B--',"$RGchannel_group",$script_text); +$script_text = eregi_replace('--A--SQLdate--B--',"$RGSQLdate",$script_text); +$script_text = eregi_replace('--A--epoch--B--',"$RGepoch",$script_text); +$script_text = eregi_replace('--A--uniqueid--B--',"$RGuniqueid",$script_text); +$script_text = eregi_replace('--A--customer_zap_channel--B--',"$RGcustomer_zap_channel",$script_text); +$script_text = eregi_replace('--A--server_ip--B--',"$RGserver_ip",$script_text); +$script_text = eregi_replace('--A--SIPexten--B--',"$RGSIPexten",$script_text); +$script_text = eregi_replace('--A--session_id--B--',"$RGsession_id",$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 =\"$users_color\""; $users_fc="$users_font"; $users_bold="$header_selected_bold";} + else {$users_hh=''; $users_fc='WHITE'; $users_bold="$header_nonselected_bold";} +if ($hh=='campaigns') + {$campaigns_hh="bgcolor=\"$campaigns_color\""; $campaigns_fc="$campaigns_font"; $campaigns_bold="$header_selected_bold";} + else {$campaigns_hh=''; $campaigns_fc='WHITE'; $campaigns_bold="$header_nonselected_bold";} +if ($hh=='lists') + {$lists_hh="bgcolor=\"$lists_color\""; $lists_fc="$lists_font"; $lists_bold="$header_selected_bold";} + else {$lists_hh=''; $lists_fc='WHITE'; $lists_bold="$header_nonselected_bold";} +if ($hh=='ingroups') + {$ingroups_hh="bgcolor=\"$ingroups_color\""; $ingroups_fc="$ingroups_font"; $ingroups_bold="$header_selected_bold";} + else {$ingroups_hh=''; $ingroups_fc='WHITE'; $ingroups_bold="$header_nonselected_bold";} +if ($hh=='remoteagent') + {$remoteagent_hh="bgcolor=\"$remoteagent_color\""; $remoteagent_fc="$remoteagent_font"; $remoteagent_bold="$header_selected_bold";} + else {$remoteagent_hh=''; $remoteagent_fc='WHITE'; $remoteagent_bold="$header_nonselected_bold";} +if ($hh=='usergroups') + {$usergroups_hh="bgcolor=\"$usergroups_color\""; $usergroups_fc="$usergroups_font"; $usergroups_bold="$header_selected_bold";} + else {$usergroups_hh=''; $usergroups_fc='WHITE'; $usergroups_bold="$header_nonselected_bold";} +if ($hh=='scripts') + {$scripts_hh="bgcolor=\"$scripts_color\""; $scripts_fc="$scripts_font"; $scripts_bold="$header_selected_bold";} + else {$scripts_hh=''; $scripts_fc='WHITE'; $scripts_bold="$header_nonselected_bold";} +if ($hh=='filters') + {$filters_hh="bgcolor=\"$filters_color\""; $filters_fc="$filters_font"; $filters_bold="$header_selected_bold";} + else {$filters_hh=''; $filters_fc='WHITE'; $filters_bold="$header_nonselected_bold";} +if ($hh=='admin') + {$admin_hh="bgcolor=\"$admin_color\""; $admin_fc="$admin_font"; $admin_bold="$header_selected_bold";} + else {$admin_hh=''; $admin_fc='WHITE'; $admin_bold="$header_nonselected_bold";} +if ($hh=='reports') + {$reports_hh="bgcolor=\"$reports_color\""; $reports_fc="$reports_font"; $reports_bold="$header_selected_bold";} + else {$reports_hh=''; $reports_fc='WHITE'; $reports_bold="$header_nonselected_bold";} + +?> + + + + +\n"; +echo "
English Deutsch
BGCOLOR=#D9E6FE cellpadding=2 cellspacing=0> + + + + + + + + + + + + + + + 1) { + ?> +> + 1) { + ?> +> + 1) { + ?> +> + 1) { + ?> +> + 1) { + ?> +> + 1) { + ?> +> + 1) { + ?> +> + 1) { + ?> +> + 1) { + if ($sh=='times') {$times_sh="bgcolor=\"$times_color\""; $times_fc="$times_font";} # hard teal + else {$times_sh=''; $times_fc='BLACK';} + if ($sh=='phones') {$phones_sh="bgcolor=\"$server_color\""; $phones_fc="$phones_font";} # pink + else {$phones_sh=''; $phones_fc='BLACK';} + if ($sh=='server') {$server_sh="bgcolor=\"$server_color\""; $server_fc="$server_font";} # pink + else {$server_sh=''; $server_fc='BLACK';} + if ($sh=='conference') {$conference_sh="bgcolor=\"$server_color\""; $conference_fc="$server_font";} # pink + else {$conference_sh=''; $conference_fc='BLACK';} + if ($sh=='settings') {$settings_sh="bgcolor=\"$server_color\""; $settings_fc="$server_font";} # pink + else {$settings_sh=''; $settings_fc='BLACK';} + + ?> +> + + + + + + + 1) { + ?> + > + 1) { + ?> + > + 1) { + ?> + > + 1) { + ?> + > + 1) { + ?> + > + \n"; + echo "Sie haben nicht die Rechte, um diese Seite anzusehen. Bitte zurück gehen.\n"; + } + +} +if (strlen($reports_hh) > 1) { + ?> +> + + + + +
  VICIDIAL ADMIN - HAUPT | Logout  
> SIZE=> Benutzer > SIZE=> Kampagnen > SIZE=> Listen > SIZE=> Indexe > SIZE=> Filter > SIZE=> In-Gruppen > SIZE=> Benutzer-Gruppen > SIZE=> Remotemittel > SIZE=> Admin > SIZE=> Reports
>   > Zeigen Sie Benutzer     |     > Addieren Sie Einen Neuen Benutzer     |     > Suche Nach Einem Benutzer
>   > Zeigen Sie Kampagnen     |     > Addieren Sie Eine Neue Kampagne     |     > Realzeitkampagnen Zusammenfassend
>   > Zeigen Sie Listen     |     > Addieren Sie Eine Neue Liste     |     > Suche Nach Einer Leitung     |     > Fügen Sie Zahl DNC Hinzu     |     > Last Neue Leitungen
>   > Zeigen Sie Indexe     |     > Addieren Sie Einen Neuen Index
>   > Zeigen Sie Filter     |     > Addieren Sie Einen Neuen Filter
>   > Zeigen Sie In-Gruppen     |     > Addieren Sie Eine Neue In-Gruppe
>   > Zeigen Sie Benutzer-Gruppen     |     > Addieren Sie Eine Neue Benutzer-Gruppe     |     > Gruppe Stündlicher Report
>   > Zeigen Sie Remotemittel     |     > Addieren Sie Neue Remotemittel
COLSPAN=2> SIZE=> Anruf-Zeiten COLSPAN=2> SIZE=> Telefone COLSPAN=2> SIZE=> Konferenzen COLSPAN=1> SIZE=> Bediener COLSPAN=3> SIZE=> System Einstellungen
>   > Zeigen Sie Anruf-Zeiten     |     > Addieren Sie Eine Neue Anruf-Zeit     |     > Zeigen Sie Zustand-Anruf-Zeiten     |     > Addieren Sie Eine Neue Zustand-Anruf-Zeit  
>   > Zeigen Sie Telefone   |   > Addieren Sie Ein Neues Telefon
> Zeigen Sie Konferenzen   |   > Addieren Sie Eine Neue Konferenz   |   > Zeigen Sie VICIDIAL Konferenzen   |   > Addieren Sie Eine Neue VICIDIAL Konferenz
> Zeigen Sie Bediener   |   > Addieren Sie Einen Neuen Bediener
> System Einstellungen
>  
+
\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"; + } + else + { + echo "Sie haben nicht Erlaubnis, diese Seite anzusehen\n"; + exit; + } +} + + +###################### +# ADD=11 display the ADD NEW CAMPAIGN FORM SCREEN +###################### + +if ($ADD==11) +{ + if ($LOGmodify_campaigns==1) + { + 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 "\n"; + echo "
Kampagne Identifikation: $NWB#vicidial_campaigns-campaign_id$NWE
Kampagne Name: $NWB#vicidial_campaigns-campaign_name$NWE
Kampagne Beschreibung: $NWB#vicidial_campaigns-campaign_description$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"; + } + else + { + echo "Sie haben nicht Erlaubnis, diese Seite anzusehen\n"; + exit; + } +} + + +###################### +# ADD=111 display the ADD NEW LIST FORM SCREEN +###################### + +if ($ADD==111) +{ + if ($LOGmodify_lists==1) + { + echo "
\n"; + echo ""; + + echo "
ADD A NEW LIST\n"; + echo "\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
Liste Beschreibung: $NWB#vicidial_lists-list_description$NWE
Kampagne: $NWB#vicidial_lists-campaign_id$NWE
Aktiv:$NWB#vicidial_lists-active$NWE
\n"; + } + else + { + echo "Sie haben nicht Erlaubnis, diese Seite anzusehen\n"; + exit; + } +} + + +###################### +# 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) +{ + if ($LOGmodify_ingroups==1) + { + 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"; + } + else + { + echo "Sie haben nicht Erlaubnis, diese Seite anzusehen\n"; + exit; + } +} + + +###################### +# ADD=11111 display the ADD NEW REMOTE AGENTS SCREEN +###################### + +if ($ADD==11111) +{ + if ($LOGmodify_remoteagents==1) + { + 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: (dial plan 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"; + } + else + { + echo "Sie haben nicht Erlaubnis, diese Seite anzusehen\n"; + exit; + } +} + + +###################### +# ADD=111111 display the ADD NEW USERS GROUP SCREEN +###################### + +if ($ADD==111111) +{ + if ($LOGmodify_usergroups==1) + { + 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"; + } + else + { + echo "Sie haben nicht Erlaubnis, diese Seite anzusehen\n"; + exit; + } +} + + +###################### +# ADD=1111111 display the ADD NEW SCRIPT SCREEN +###################### + +if ($ADD==1111111) +{ + if ($LOGmodify_scripts==1) + { + 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: "; + # BEGIN Insert Field + echo ""; + echo "
"; + # END Insert Field + echo " $NWB#vicidial_scripts-script_text$NWE
\n"; + } + else + { + echo "Sie haben nicht Erlaubnis, diese Seite anzusehen\n"; + exit; + } +} + + +###################### +# ADD=11111111 display the ADD NEW FILTER SCREEN +###################### + +if ($ADD==11111111) +{ + if ($LOGmodify_filters==1) + { + 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"; + } + else + { + echo "Sie haben nicht Erlaubnis, diese Seite anzusehen\n"; + exit; + } +} + + +###################### +# ADD=111111111 display the ADD NEW CALL TIME SCREEN +###################### + +if ($ADD==111111111) +{ + if ($LOGmodify_call_times==1) + { + 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"; + } + else + { + echo "Sie haben nicht Erlaubnis, diese Seite anzusehen\n"; + exit; + } +} + + +###################### +# ADD=1111111111 display the ADD NEW STATE CALL TIME SCREEN +###################### + +if ($ADD==1111111111) +{ + if ($LOGmodify_call_times==1) + { + 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"; + } + else + { + echo "Sie haben nicht Erlaubnis, diese Seite anzusehen\n"; + exit; + } +} + + +###################### +# ADD=11111111111 display the ADD NEW PHONE SCREEN +###################### + +if ($ADD==11111111111) +{ + if ($LOGast_admin_access==1) + { + echo "
\n"; + echo ""; + + 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
Dial Plan 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"; + } + else + { + echo "Sie haben nicht Erlaubnis, diese Seite anzusehen\n"; + exit; + } +} + + +###################### +# ADD=111111111111 display the ADD NEW SERVER SCREEN +###################### + +if ($ADD==111111111111) +{ + if ($LOGmodify_servers==1) + { + echo "
\n"; + 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"; + } + else + { + echo "Sie haben nicht Erlaubnis, diese Seite anzusehen\n"; + exit; + } +} + + +###################### +# ADD=1111111111111 display the ADD NEW CONFERENCE SCREEN +###################### + +if ($ADD==1111111111111) +{ + if ($LOGast_admin_access==1) + { + echo "
\n"; + 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"; + } + else + { + echo "Sie haben nicht Erlaubnis, diese Seite anzusehen\n"; + exit; + } +} + + +###################### +# ADD=11111111111111 display the ADD NEW VICIDIAL CONFERENCE SCREEN +###################### + +if ($ADD==11111111111111) +{ + if ($LOGast_admin_access==1) + { + echo "
\n"; + echo ""; + + echo "
ADD A NEW VICIDIAL CONFERENCE\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"; + } + else + { + echo "Sie haben nicht Erlaubnis, diese Seite anzusehen\n"; + exit; + } +} + + + +###################################################################################################### +###################################################################################################### +####### 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,campaign_description,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,campaign_changedate,campaign_stats_refresh) values('$campaign_id','$campaign_name','$campaign_description','$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','$SQLdate','Y');"; + $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 "
CAMPAIGN HOT KEY 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 "
KAMPAGNE HOT KEY NICHT ADDIERT - gehen Sie bitte zurück und betrachtenSie die Daten, die Sie eingaben\n"; + echo "
hotkey must be a single character between 1 and 9 \n"; + echo "
Status muß zwischen 1 und 8 Buchstaben lang sein\n"; + } + else + { + echo "
KAMPAGNE HOT KEY 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 HOT KEY |$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=26 adds the new auto alt dial status to the campaign +###################### + +if ($ADD==26) +{ + $status = eregi_replace("-----.*",'',$status); + echo ""; + $stmt="SELECT count(*) from vicidial_campaigns where campaign_id='$campaign_id' and auto_alt_dial_statuses LIKE \"% $status %\";"; + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + if ($row[0] > 0) + {echo "
SELBSTALT VORWAHLKNOPF-STATUS NICHT ADDIERT - es gibt bereits eine Eintragung für diese Kampagne mit diesem Status\n";} + else + { + if ( (strlen($campaign_id) < 2) or (strlen($status) < 1) ) + { + echo "
SELBSTALT VORWAHLKNOPF-STATUS NICHT ADDIERT - Gehen Sie bitte zurück und betrachten Sie die Daten, die Sieeingaben\n"; + echo "
Status muß zwischen 1 und 6 Buchstaben lang sein\n"; + } + else + { + echo "
SELBSTALT VORWAHLKNOPF-STATUS FÜGTE HINZU: $campaign_id - $status\n"; + + $stmt="SELECT auto_alt_dial_statuses from vicidial_campaigns where campaign_id='$campaign_id';"; + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + + if (strlen($row[0])<2) {$row[0] = ' -';} + $auto_alt_dial_statuses = " $status$row[0]"; + $stmt="UPDATE vicidial_campaigns set auto_alt_dial_statuses='$auto_alt_dial_statuses' 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|ADD A AUTO-ALT-DIAL STATUS|$PHP_AUTH_USER|$ip|$stmt|\n"); + fclose($fp); + } + } + } +$ADD=31; +} + + +###################### +# ADD=27 adds the new campaign agent pause code entry to the system +###################### + +if ($ADD==27) +{ + echo ""; + $stmt="SELECT count(*) from vicidial_pause_codes where campaign_id='$campaign_id' and pause_code='$pause_code';"; + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + if ($row[0] > 0) + {echo "
MITTEL-PAUSE CODE NICHT ADDIERT - es gibt bereits eine Eintragung für diese Kampagne mit diesem PauseCode\n";} + else + { + if ( (strlen($campaign_id) < 2) or (strlen($pause_code) < 1) or (strlen($pause_code) > 6) or (strlen($pause_code_name) < 2) ) + { + echo "
MITTEL-PAUSE CODE NICHT ADDIERT - Gehen Sie bitte zurück und betrachten Sie die Daten, die Sieeingaben\n"; + echo "
pause code must be between 1 and 6 characters in length\n"; + echo "
pause code name must be between 2 and 30 characters in length\n"; + } + else + { + echo "
MITTEL-PAUSE CODE FÜGTE HINZU: $campaign_id - $pause_code - $pause_code_name\n"; + + $stmt="INSERT INTO vicidial_pause_codes(campaign_id,pause_code,pause_code_name,billable) values('$campaign_id','$pause_code','$pause_code_name','$billable');"; + $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 MITTELPAUSE CODE|$PHP_AUTH_USER|$ip|$stmt|\n"); + fclose($fp); + } + } + } +$ADD=31; +} + + +###################### +# ADD=28 adds new status to the campaign dial statuses +###################### + +if ($ADD==28) +{ + $status = eregi_replace("-----.*",'',$status); + echo ""; + $stmt="SELECT count(*) from vicidial_campaigns where campaign_id='$campaign_id' and dial_statuses LIKE \"% $status %\";"; + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + if ($row[0] > 0) + {echo "
KAMPAGNE VORWAHLKNOPF-STATUS NICHT ADDIERT - es gibt bereits eine Eintragung für diese Kampagne mit diesem Status\n";} + else + { + if ( (strlen($campaign_id) < 2) or (strlen($status) < 1) ) + { + echo "
KAMPAGNE VORWAHLKNOPF-STATUS NICHT ADDIERT - Gehen Sie bitte zurück und betrachten Sie die Daten, die Sieeingaben\n"; + echo "
Status muß zwischen 1 und 6 Buchstaben lang sein\n"; + } + else + { + echo "
KAMPAGNE VORWAHLKNOPF-STATUS ADDIERT: $campaign_id - $status\n"; + + $stmt="SELECT dial_statuses from vicidial_campaigns where campaign_id='$campaign_id';"; + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + + if (strlen($row[0])<2) {$row[0] = ' -';} + $dial_statuses = " $status$row[0]"; + $stmt="UPDATE vicidial_campaigns set dial_statuses='$dial_statuses' 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|ADDIEREN SIE KAMPAGNE DIAL STATUS |$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 ($list_id < 100) 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"; + echo "
Liste Identifikation must be greater than 100\n"; + } + else + { + echo "
LISTE ADDIERT: $list_id\n"; + + $stmt="INSERT INTO vicidial_lists (list_id,list_name,campaign_id,active,list_description,list_changedate) values('$list_id','$list_name','$campaign_id','$active','$list_description','$SQLdate');"; + $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|$stmt|\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(user_group,group_name,allowed_campaigns) values('$user_group','$group_name','-ALL-CAMPAIGNS-');"; + $rslt=mysql_query($stmt, $link); + + echo "
BENUTZER-GRUPPE ADDIERT: $user_group\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|$stmt|\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','$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; +} + + +###################### +# ADD=21111111111 adds new phone to the system +###################### + +if ($ADD==21111111111) +{ +echo "
\n"; + 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=31111111111; +} + + +###################### +# ADD=211111111111 adds new server to the system +###################### + +if ($ADD==211111111111) +{ +echo "
\n"; + 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=311111111111; +} + + +###################### +# ADD=221111111111 adds the new vicidial server trunk record to the system +###################### + +if ($ADD==221111111111) +{ + echo ""; + $stmt="SELECT max_vicidial_trunks from servers where server_ip='$server_ip';"; + $rslt=mysql_query($stmt, $link); + $rowx=mysql_fetch_row($rslt); + $MAXvicidial_trunks = $rowx[0]; + + $stmt="SELECT sum(dedicated_trunks) from vicidial_server_trunks where server_ip='$server_ip' and campaign_id !='$campaign_id';"; + $rslt=mysql_query($stmt, $link); + $rowx=mysql_fetch_row($rslt); + $SUMvicidial_trunks = ($rowx[0] + $dedicated_trunks); + + if ($SUMvicidial_trunks > $MAXvicidial_trunks) + { + echo "
VICIDIAL BEDIENER-STAMM-SATZ NICHT ADDIERT - die Zahl vicidial Stämmen ist zu hoch: $SUMvicidial_trunks / $MAXvicidial_trunks\n"; + } + else + { + $stmt="SELECT count(*) from vicidial_server_trunks where campaign_id='$campaign_id' and server_ip='$server_ip';"; + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + if ($row[0] > 0) + {echo "
VICIDIAL BEDIENER-STAMM-SATZ NICHT ADDIERT - es gibt bereits eine Bediener-Stamm Aufzeichnung für diese Kampagne\n";} + else + { + if ( (strlen($campaign_id) < 2) or (strlen($server_ip) < 7) or (strlen($dedicated_trunks) < 1) or (strlen($trunk_restriction) < 1) ) + { + echo "
VICIDIAL BEDIENER-STAMM-SATZ NICHT ADDIERT - Gehen Sie bitte zurück und betrachten Sie die Daten, die Sieeingaben\n"; + echo "
Kampagne muß zwischen 3 und 8 Buchstaben lang sein\n"; + echo "
server_ip verzögert muß mindestens 7 Buchstaben sein\n"; + echo "
Stämme müssen eine Stelle von 0 bis 9999 sein\n"; + } + else + { + echo "
VICIDIAL BEDIENER-STAMM-SATZ ADDIERT: $campaign_id - $server_ip - $dedicated_trunks - $trunk_restriction\n"; + + $stmt="INSERT INTO vicidial_server_trunks(server_ip,campaign_id,dedicated_trunks,trunk_restriction) values('$server_ip','$campaign_id','$dedicated_trunks','$trunk_restriction');"; + $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 VICIDIAL TRUNK |$PHP_AUTH_USER|$ip|$stmt|\n"); + fclose($fp); + } + } + } + } +$ADD=311111111111; +} + + +###################### +# ADD=2111111111111 adds new conference to the system +###################### + +if ($ADD==2111111111111) +{ +echo "
\n"; + 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=3111111111111; +} + + +###################### +# ADD=21111111111111 adds new vicidial conference to the system +###################### + +if ($ADD==21111111111111) +{ +echo "
\n"; + echo ""; + $stmt="SELECT count(*) from vicidial_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 "
VICIDIAL CONFERENCE NOT ADDED - there is already a vicidial conference in the system with this ID and server\n";} + else + { + if ( (strlen($conf_exten) < 1) or (strlen($server_ip) < 7) ) + {echo "
VICIDIAL KONFERENZ NICHT ADDIERT - gehen Sie bitte zurück und betrachten Siedie Daten, die Sie eingaben\n";} + else + { + echo "
VICIDIAL KONFERENZ FÜGTE HINZU\n"; + + $stmt="INSERT INTO vicidial_conferences (conf_exten,server_ip) values('$conf_exten','$server_ip');"; + $rslt=mysql_query($stmt, $link); + } + } +$ADD=31111111111111; +} + + + +###################################################################################################### +###################################################################################################### +####### 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") +{ + if ($LOGmodify_users==1) + { + 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',modify_users='$modify_users',modify_campaigns='$modify_campaigns',modify_lists='$modify_lists',modify_scripts='$modify_scripts',modify_filters='$modify_filters',modify_ingroups='$modify_ingroups',modify_usergroups='$modify_usergroups',modify_remoteagents='$modify_remoteagents',modify_servers='$modify_servers',view_reports='$view_reports',vicidial_recording_override='$vicidial_recording_override',alter_custdata_override='$alter_custdata_override' 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); + } + } + } + else + { + echo "Sie haben nicht Erlaubnis, diese Seite anzusehen\n"; + exit; + } +$ADD=3; # go to user modification below +} + + +###################### +# ADD=4B submit user modifications to the system - ADMIN +###################### + +if ($ADD=="4B") +{ + if ($LOGmodify_users==1) + { + 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',vicidial_recording_override='$vicidial_recording_override',alter_custdata_override='$alter_custdata_override' 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); + } + } + } + else + { + echo "Sie haben nicht Erlaubnis, diese Seite anzusehen\n"; + exit; + } +$ADD=3; # go to user modification below +} + + + +###################### +# ADD=4 submit user modifications to the system +###################### + +if ($ADD==4) +{ + if ($LOGmodify_users==1) + { + 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); + } + } + } + else + { + echo "Sie haben nicht Erlaubnis, diese Seite anzusehen\n"; + exit; + } +$ADD=3; # go to user modification below +} + +###################### +# ADD=41 submit campaign modifications to the system +###################### + +if ($ADD==41) +{ + if ($LOGmodify_campaigns==1) + { + 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"; + echo "
|$campaign_name|$active|\n"; + } + else + { + echo "
KAMPAGNE ÄNDERTE: $campaign_id\n"; + + if ($dial_method == 'MANUAL') + { + $auto_dial_level='0'; + $adlSQL = "auto_dial_level='0',"; + } + else + { + if ($dial_level_override > 0) + { + $adlSQL = "auto_dial_level='$auto_dial_level',"; + } + else + { + if ($dial_method == 'RATIO') + { + if ($auto_dial_level < 1) {$auto_dial_level = "1.0";} + $adlSQL = "auto_dial_level='$auto_dial_level',"; + } + else + { + $adlSQL = ""; + if ($auto_dial_level < 1) + { + $auto_dial_level = "1.0"; + $adlSQL = "auto_dial_level='$auto_dial_level',"; + } + } + } + } + $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', $adlSQL 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',allcalls_delay='$allcalls_delay',omit_phone_code='$omit_phone_code',dial_method='$dial_method',available_only_ratio_tally='$available_only_ratio_tally',adaptive_dropped_percentage='$adaptive_dropped_percentage',adaptive_maximum_level='$adaptive_maximum_level',adaptive_latest_server_time='$adaptive_latest_server_time',adaptive_intensity='$adaptive_intensity',adaptive_dl_diff_target='$adaptive_dl_diff_target',concurrent_transfers='$concurrent_transfers',auto_alt_dial='$auto_alt_dial',agent_pause_codes_active='$agent_pause_codes_active',campaign_description='$campaign_description',campaign_changedate='$SQLdate',campaign_stats_refresh='$campaign_stats_refresh',disable_alter_custdata='$disable_alter_custdata',no_hopper_leads_logins='$no_hopper_leads_logins' 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 IN('READY','QUEUE','DONE');"; + $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|$stmt|\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); + } + } + } + else + { + echo "Sie haben nicht Erlaubnis, diese Seite anzusehen\n"; + exit; + } +$ADD=31; # go to campaign modification form below +} + +###################### +# ADD=42 delete campaign status in the system +###################### + +if ($ADD==42) +{ + if ($LOGmodify_campaigns==1) + { + 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); + } + } + } + else + { + echo "Sie haben nicht Erlaubnis, diese Seite anzusehen\n"; + exit; + } +$ADD=31; # go to campaign modification form below +} + +###################### +# ADD=43 delete campaign hotkey in the system +###################### + +if ($ADD==43) +{ + if ($LOGmodify_campaigns==1) + { + echo ""; + + if ( (strlen($campaign_id) < 2) or (strlen($status) < 1) or (strlen($hotkey) < 1) ) + { + echo "
KAMPAGNE HOT KEY 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 "
the campaign hotkey needs to be at least 1 characters in length\n"; + } + else + { + echo "
KUNDENSPEZIFISCHE KAMPAGNE HOT KEY 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); + } + } + } + else + { + echo "Sie haben nicht Erlaubnis, diese Seite anzusehen\n"; + exit; + } +$ADD=31; # go to campaign modification form below +} + +###################### +# ADD=44 submit campaign modifications to the system - Basic View +###################### + +if ($ADD==44) +{ + if ($LOGmodify_campaigns==1) + { + 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"; + + if ($dial_method == 'RATIO') + { + if ($auto_dial_level < 1) {$auto_dial_level = "1.0";} + $adlSQL = "auto_dial_level='$auto_dial_level',"; + } + else + { + if ($dial_method == 'MANUAL') + { + $auto_dial_level='0'; + $adlSQL = "auto_dial_level='0',"; + } + else + { + $adlSQL = ""; + if ($auto_dial_level < 1) + { + $auto_dial_level = "1.0"; + $adlSQL = "auto_dial_level='$auto_dial_level',"; + } + } + } + $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', $adlSQL lead_filter_id='$lead_filter_id',dial_method='$dial_method',adaptive_intensity='$adaptive_intensity',campaign_description='$campaign_description',campaign_changedate='$SQLdate' 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 IN('READY','QUEUE','DONE');;"; + $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|$stmt|\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); + } + } + } + else + { + echo "Sie haben nicht Erlaubnis, diese Seite anzusehen\n"; + exit; + } +$ADD=34; # go to campaign modification form below +} + +###################### +# ADD=45 modify campaign lead recycle in the system +###################### + +if ($ADD==45) +{ + if ($LOGmodify_campaigns==1) + { + 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); + } + } + } + else + { + echo "Sie haben nicht Erlaubnis, diese Seite anzusehen\n"; + exit; + } +$ADD=31; # go to campaign modification form below +} + +###################### +# ADD=47 modify agent pause code in the system +###################### + +if ($ADD==47) +{ + if ($LOGmodify_campaigns==1) + { + echo ""; + + if ( (strlen($campaign_id) < 2) or (strlen($pause_code) < 1) or (strlen($pause_code) > 6) or (strlen($pause_code_name) < 2) ) + { + echo "
MITTEL-PAUSE CODE NICHT GEÄNDERT - Gehen Sie bitte zurück und betrachten Sie die Daten, die Sieeingaben\n"; + echo "
pause_code must be between 1 and 6 characters in length\n"; + echo "
pause_code name must be between 2 and 30 characters in length\n"; + } + else + { + echo "
MITTELPAUSE CODE MODIFIED: $campaign_id - $pause_code - $pause_code_name\n"; + + $stmt="UPDATE vicidial_pause_codes SET pause_code_name='$pause_code_name',billable='$billable' where campaign_id='$campaign_id' and pause_code='$pause_code';"; + $rslt=mysql_query($stmt, $link); + + ### LOG CHANGES TO LOG FILE ### + if ($WeBRooTWritablE > 0) + { + $fp = fopen ("./admin_changes_log.txt", "a"); + fwrite ($fp, "$date|MODIFY MITTELPAUSECODE|$PHP_AUTH_USER|$ip|$stmt|\n"); + fclose($fp); + } + } + } + else + { + echo "Sie haben nicht Erlaubnis, diese Seite anzusehen\n"; + exit; + } +$ADD=31; # go to campaign modification form below +} + +###################### +# ADD=411 submit list modifications to the system +###################### + +if ($ADD==411) +{ + if ($LOGmodify_lists==1) + { + 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',list_description='$list_description',list_changedate='$SQLdate' 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',list_description='$list_description' where list_id='$list_id'|\n"); + fclose($fp); + } + } + } + else + { + echo "Sie haben nicht Erlaubnis, diese Seite anzusehen\n"; + exit; + } +$ADD=311; # go to list modification form below +} + + +###################### +# ADD=4111 modify in-group info in the system +###################### + +if ($ADD==4111) +{ + if ($LOGmodify_ingroups==1) + { + 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); + } + } + } + else + { + echo "Sie haben nicht Erlaubnis, diese Seite anzusehen\n"; + exit; + } +$ADD=3111; # go to in-group modification form below +} + + + +###################### +# ADD=41111 modify remote agents info in the system +###################### + +if ($ADD==41111) +{ + if ($LOGmodify_remoteagents==1) + { + 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); + } + } + } + else + { + echo "Sie haben nicht Erlaubnis, diese Seite anzusehen\n"; + exit; + } +$ADD=31111; # go to remote agents modification form below +} + + + +###################### +# ADD=411111 modify user group info in the system +###################### + +if ($ADD==411111) +{ + if ($LOGmodify_usergroups==1) + { + 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',allowed_campaigns='$campaigns_value' 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|$stmt|\n"); + fclose($fp); + } + } + } + else + { + echo "Sie haben nicht Erlaubnis, diese Seite anzusehen\n"; + exit; + } +$ADD=311111; # go to user group modification form below +} + +###################### +# ADD=4111111 modify script in the system +###################### + +if ($ADD==4111111) +{ + if ($LOGmodify_scripts==1) + { + echo "\n"; + echo "\n"; + 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='$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); + } + } + } + else + { + echo "Sie haben nicht Erlaubnis, diese Seite anzusehen\n"; + exit; + } +$ADD=3111111; # go to script modification form below +} + + +###################### +# ADD=41111111 modify filter in the system +###################### + +if ($ADD==41111111) +{ + if ($LOGmodify_filters==1) + { + 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); + } + } + } + else + { + echo "Sie haben nicht Erlaubnis, diese Seite anzusehen\n"; + exit; + } +$ADD=31111111; # go to filter modification form below +} + + +###################### +# ADD=411111111 modify call time in the system +###################### + +if ($ADD==411111111) +{ + if ($LOGmodify_call_times==1) + { + 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); + } + } + } + else + { + echo "Sie haben nicht Erlaubnis, diese Seite anzusehen\n"; + exit; + } +$ADD=311111111; # go to call time modification form below +} + + +###################### +# ADD=4111111111 modify state call time in the system +###################### + +if ($ADD==4111111111) +{ + if ($LOGmodify_call_times==1) + { + 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); + } + } + } + else + { + echo "Sie haben nicht Erlaubnis, diese Seite anzusehen\n"; + exit; + } +$ADD=3111111111; # go to state call time modification form below +} + + +###################### +# ADD=41111111111 modify phone record in the system +###################### + +if ($ADD==41111111111) +{ + if ($LOGast_admin_access==1) + { + 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', enable_sipsak_messages='$enable_sipsak_messages' where extension='$old_extension' and server_ip='$old_server_ip';"; + $rslt=mysql_query($stmt, $link); + } + } + } + else + { + echo "Sie haben nicht Erlaubnis, diese Seite anzusehen\n"; + exit; + } +$ADD=31111111111; # go to phone modification form below +} + + +###################### +# ADD=411111111111 modify server record in the system +###################### + +if ($ADD==411111111111) +{ + if ($LOGmodify_servers==1) + { + 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', sys_perf_log='$sys_perf_log', vd_server_logs='$vd_server_logs', agi_output='$agi_output', vicidial_balance_active='$vicidial_balance_active', balance_trunks_offlimits='$balance_trunks_offlimits' where server_id='$old_server_id';"; + $rslt=mysql_query($stmt, $link); + } + } + } + } + else + { + echo "Sie haben nicht Erlaubnis, diese Seite anzusehen\n"; + exit; + } +$ADD=311111111111; # go to server modification form below +} + + +###################### +# ADD=421111111111 modify vicidial server trunks record in the system +###################### + +if ($ADD==421111111111) +{ + if ($LOGmodify_servers==1) + { + echo ""; + $stmt="SELECT max_vicidial_trunks from servers where server_ip='$server_ip';"; + $rslt=mysql_query($stmt, $link); + $rowx=mysql_fetch_row($rslt); + $MAXvicidial_trunks = $rowx[0]; + + $stmt="SELECT sum(dedicated_trunks) from vicidial_server_trunks where server_ip='$server_ip' and campaign_id !='$campaign_id';"; + $rslt=mysql_query($stmt, $link); + $rowx=mysql_fetch_row($rslt); + $SUMvicidial_trunks = ($rowx[0] + $dedicated_trunks); + + if ($SUMvicidial_trunks > $MAXvicidial_trunks) + { + echo "
VICIDIAL BEDIENER-STAMM-SATZ NICHT ADDIERT - die Zahl vicidial Stämmen ist zu hoch: $SUMvicidial_trunks / $MAXvicidial_trunks\n"; + } + else + { + if ( (strlen($campaign_id) < 2) or (strlen($server_ip) < 7) or (strlen($dedicated_trunks) < 1) or (strlen($trunk_restriction) < 1) ) + { + echo "
VICIDIAL BEDIENER-STAMM-SATZ NICHT GEÄNDERT - Gehen Sie bitte zurück und betrachten Sie die Daten, die Sieeingaben\n"; + echo "
Kampagne muß zwischen 3 und 8 Buchstaben lang sein\n"; + echo "
server_ip verzögert muß mindestens 7 Buchstaben sein\n"; + echo "
Stämme müssen eine Stelle von 0 bis 9999 sein\n"; + } + else + { + echo "
VICIDIAL BEDIENER-STAMM-SATZ ÄNDERTE: $campaign_id - $server_ip - $dedicated_trunks - $trunk_restriction\n"; + + $stmt="UPDATE vicidial_server_trunks SET dedicated_trunks='$dedicated_trunks',trunk_restriction='$trunk_restriction' where campaign_id='$campaign_id' and server_ip='$server_ip';"; + $rslt=mysql_query($stmt, $link); + + ### LOG CHANGES TO LOG FILE ### + if ($WeBRooTWritablE > 0) + { + $fp = fopen ("./admin_changes_log.txt", "a"); + fwrite ($fp, "$date|ÄNDERN SIE BEDIENER TRUNK |$PHP_AUTH_USER|$ip|$stmt|\n"); + fclose($fp); + } + } + } + } + else + { + echo "Sie haben nicht Erlaubnis, diese Seite anzusehen\n"; + exit; + } +$ADD=311111111111; # go to server modification form below +} + + +###################### +# ADD=4111111111111 modify conference record in the system +###################### + +if ($ADD==4111111111111) +{ + if ($LOGast_admin_access==1) + { + 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); + } + } + } + else + { + echo "Sie haben nicht Erlaubnis, diese Seite anzusehen\n"; + exit; + } +$ADD=3111111111111; # go to conference modification form below +} + + +###################### +# ADD=41111111111111 modify vicidial conference record in the system +###################### + +if ($ADD==41111111111111) +{ + if ($LOGast_admin_access==1) + { + echo ""; + + $stmt="SELECT count(*) from vicidial_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 "
VICIDIAL 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 "
VICIDIAL KONFERENZ NICHT GEÄNDERT - gehen Sie bitte zurück und betrachten Siedie Daten, die Sie eingaben\n";} + else + { + echo "
VICIDIAL KONFERENZ ÄNDERTE: $conf_exten\n"; + + $stmt="UPDATE vicidial_conferences set conf_exten='$conf_exten',server_ip='$server_ip',extension='$extension' where conf_exten='$old_conf_exten';"; + $rslt=mysql_query($stmt, $link); + + } + } + } + else + { + echo "Sie haben nicht Erlaubnis, diese Seite anzusehen\n"; + exit; + } +$ADD=31111111111111; # go to vicidial conference modification form below +} + + + +###################### +# ADD=411111111111111 modify vicidial system settings +###################### + +if ($ADD==411111111111111) +{ + if ($LOGmodify_servers==1) + { + echo ""; + + echo "
VICIDIAL SYSTEM EINSTELLUNGEN GEÄNDERT WORDEN\n"; + + $stmt="UPDATE system_settings set use_non_latin='$use_non_latin',webroot_writable='$webroot_writable',enable_queuemetrics_logging='$enable_queuemetrics_logging',queuemetrics_server_ip='$queuemetrics_server_ip',queuemetrics_dbname='$queuemetrics_dbname',queuemetrics_login='$queuemetrics_login',queuemetrics_pass='$queuemetrics_pass',queuemetrics_url='$queuemetrics_url',queuemetrics_log_id='$queuemetrics_log_id',queuemetrics_eq_prepend='$queuemetrics_eq_prepend',vicidial_agent_disable='$vicidial_agent_disable',allow_sipsak_messages='$allow_sipsak_messages',admin_home_url='$admin_home_url';"; + $rslt=mysql_query($stmt, $link); + + ### LOG CHANGES TO LOG FILE ### + if ($WeBRooTWritablE > 0) + { + $fp = fopen ("./admin_changes_log.txt", "a"); + fwrite ($fp, "$date|MODIFY SYSTEM SETTINGS|$PHP_AUTH_USER|$ip|$stmt|\n"); + fclose($fp); + } + } + else + { + echo "Sie haben nicht Erlaubnis, diese Seite anzusehen\n"; + exit; + } +$ADD=311111111111111; # go to vicidial system settings 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=53 confirmation before Emergency VDAC Jam Clear - deletes oldest LIVE vicidial_auto_call record +###################### + +if ($ADD==53) +{ + if (eregi('IN',$stage)) + {$group_id=$campaign_id;} + echo ""; + + if (strlen($campaign_id) < 2) + { + echo "
VDAC NICHT LÖSCHTE FÜR KAMPAGNE - 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 "
VDAC AUSLÖSEBESTÄTIGUNG: $campaign_id\n"; + echo "

Klicken Sie hier, um das älteste zu löschen LEBEN Aufzeichnung inVDAC für $campaign_id


\n"; + } + +# go to campaign modification below +if (eregi('IN',$stage)) + {$ADD='3111';} +else + {$ADD='31';} +} + +###################### +# 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 state 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 +} + + +###################### +# ADD=51111111111 confirmation before deletion of phone record +###################### + +if ($ADD==51111111111) +{ + echo ""; + + if ( (strlen($extension) < 2) or (strlen($server_ip) < 7) or ($LOGast_delete_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='31111111111'; # go to phone modification below +} + + +###################### +# ADD=511111111111 confirmation before deletion of server record +###################### + +if ($ADD==511111111111) +{ + echo ""; + + if ( (strlen($server_id) < 2) or (strlen($server_ip) < 7) or ($LOGast_delete_phones < 1) ) + { + echo "
BEDIENERNOT DELETED - Gehen Sie bitte zurück und betrachten Sie die Daten, die Sieeingaben\n"; + echo "
Bediener Identifikation be at least 2 characters in length\n"; + echo "
Bediener IP be at least 7 characters in length\n"; + } + else + { + echo "
BEDIENERDELETION CONFIRMATION: $server_id - $server_ip\n"; + echo "

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


\n"; + } +$ADD='311111111111'; # go to server modification below +} + + +###################### +# ADD=5111111111111 confirmation before deletion of conference record +###################### + +if ($ADD==5111111111111) +{ + echo ""; + + if ( (strlen($conf_exten) < 2) or (strlen($server_ip) < 7) or ($LOGast_delete_phones < 1) ) + { + echo "
CONFERENCE NOT DELETED - Gehen Sie bitte zurück und betrachten Sie die Daten, die Sieeingaben\n"; + echo "
Conference must be at least 2 characters in length\n"; + echo "
Bediener IP be at least 7 characters in length\n"; + } + else + { + echo "
CONFERENCE DELETION CONFIRMATION: $conf_exten - $server_ip\n"; + echo "

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


\n"; + } +$ADD='3111111111111'; # go to conference modification below +} + + +###################### +# ADD=51111111111111 confirmation before deletion of vicidial conference record +###################### + +if ($ADD==51111111111111) +{ + echo ""; + + if ( (strlen($conf_exten) < 2) or (strlen($server_ip) < 7) or ($LOGast_delete_phones < 1) ) + { + echo "
VICIDIAL CONFERENCE NOT DELETED - Gehen Sie bitte zurück und betrachten Sie die Daten, die Sieeingaben\n"; + echo "
Conference must be at least 2 characters in length\n"; + echo "
Bediener IP be at least 7 characters in length\n"; + } + else + { + echo "
VICIDIAL CONFERENCE DELETION CONFIRMATION: $conf_exten - $server_ip\n"; + echo "

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


\n"; + } +$ADD='31111111111111'; # go to vicidial conference 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 from a campaign +###################### + +if ($ADD==62) +{ + if ($LOGmodify_campaigns==1) + { + 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"; + } + } + else + { + echo "Sie haben nicht Erlaubnis, diese Seite anzusehen\n"; + exit; + } +$ADD='31'; # go to campaign modification below +} + + +###################### +# ADD=63 Emergency VDAC Jam Clear +###################### + +if ($ADD==63) +{ + if ($LOGmodify_campaigns==1) + { + if (eregi('IN',$stage)) + {$group_id=$campaign_id;} + echo ""; + + if (strlen($campaign_id) < 2) + { + echo "
VDAC NICHT LÖSCHTE FÜR KAMPAGNE - 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_auto_calls where status='LIVE' and campaign_id='$campaign_id' order by call_time 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|EMERGENCY VDAC CLEAR|$PHP_AUTH_USER|$ip|campaign_id='$campaign_id'|\n"); + fclose($fp); + } + echo "
LETZTES VDAC SATZ GELÖSCHT FÜR KAMPAGNE: $campaign_id\n"; + echo "

\n"; + } + } + else + { + echo "Sie haben nicht Erlaubnis, diese Seite anzusehen\n"; + exit; + } +# go to campaign modification below +if (eregi('IN',$stage)) + {$ADD='3111';} +else + {$ADD='31';} +} + + +###################### +# ADD=65 delete campaign lead recycle in the system +###################### + +if ($ADD==65) +{ + if ($LOGmodify_campaigns==1) + { + 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); + } + } + } + else + { + echo "Sie haben nicht Erlaubnis, diese Seite anzusehen\n"; + exit; + } +$ADD=31; # go to campaign modification form below +} + + +###################### +# ADD=66 delete auto alt dial status from the campaign +###################### + +if ($ADD==66) +{ + if ($LOGmodify_campaigns==1) + { + echo ""; + $stmt="SELECT count(*) from vicidial_campaigns where campaign_id='$campaign_id' and auto_alt_dial_statuses LIKE \"% $status %\";"; + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + if ($row[0] < 1) + {echo "
SELBSTALT VORWAHLKNOPF-STATUS NICHT GELÖSCHT - dieser Vorwahlknopfstatus des Automobils Alt ist nicht in dieserKampagne\n";} + else + { + if ( (strlen($campaign_id) < 2) or (strlen($status) < 1) ) + { + echo "
SELBSTALT VORWAHLKNOPF-STATUS NICHT GELÖSCHT - Gehen Sie bitte zurück und betrachten Sie die Daten, die Sieeingaben\n"; + echo "
Status muß zwischen 1 und 6 Buchstaben lang sein\n"; + } + else + { + echo "
SELBSTALT VORWAHLKNOPF-STATUS GELÖSCHT: $campaign_id - $status\n"; + + $stmt="SELECT auto_alt_dial_statuses from vicidial_campaigns where campaign_id='$campaign_id';"; + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + + $auto_alt_dial_statuses = eregi_replace(" $status "," ",$row[0]); + $stmt="UPDATE vicidial_campaigns set auto_alt_dial_statuses='$auto_alt_dial_statuses' 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|DELETE AUTALTDIALSTTUS|$PHP_AUTH_USER|$ip|$stmt|\n"); + fclose($fp); + } + } + } + } + else + { + echo "Sie haben nicht Erlaubnis, diese Seite anzusehen\n"; + exit; + } +$ADD=31; # go to campaign modification form below +} + +###################### +# ADD=67 delete agent pause code in the system +###################### + +if ($ADD==67) +{ + if ($LOGmodify_campaigns==1) + { + echo ""; + + if ( (strlen($campaign_id) < 2) or (strlen($pause_code) < 1) ) + { + echo "
KAMPAGNE PAUSE CODE NICHT GELÖSCHT - Gehen Sie bitte zurück und betrachten Sie die Daten, die Sieeingaben\n"; + echo "
pause code must be between 1 and 6 characters in length\n"; + } + else + { + echo "
CAMPAIGN PAUSE CODE DELETED: $campaign_id - $pause_code\n"; + + $stmt="DELETE FROM vicidial_pause_codes where campaign_id='$campaign_id' and pause_code='$pause_code';"; + $rslt=mysql_query($stmt, $link); + + ### LOG CHANGES TO LOG FILE ### + if ($WeBRooTWritablE > 0) + { + $fp = fopen ("./admin_changes_log.txt", "a"); + fwrite ($fp, "$date|DELETE MITTELPAUSECODE|$PHP_AUTH_USER|$ip|$stmt|\n"); + fclose($fp); + } + } + } + else + { + echo "Sie haben nicht Erlaubnis, diese Seite anzusehen\n"; + exit; + } +$ADD=31; # go to campaign modification form below +} + + +###################### +# ADD=68 remove campaign dial status +###################### + +if ($ADD==68) +{ + if ($LOGmodify_campaigns==1) + { + echo ""; + $stmt="SELECT count(*) from vicidial_campaigns where campaign_id='$campaign_id' and dial_statuses LIKE \"% $status %\";"; + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + if ($row[0] < 1) + {echo "
KAMPAGNE VORWAHLKNOPF-STATUS NICHT ENTFERNT - dieser Vorwahlknopfstatus wird nicht für diese Kampagne vorgewählt\n";} + else + { + if ( (strlen($campaign_id) < 2) or (strlen($status) < 1) ) + { + echo "
KAMPAGNE VORWAHLKNOPF-STATUS NICHT ENTFERNT - Gehen Sie bitte zurück und betrachten Sie die Daten, die Sieeingaben\n"; + echo "
Status muß zwischen 1 und 6 Buchstaben lang sein\n"; + } + else + { + echo "
KAMPAGNE VORWAHLKNOPF-STATUS ENTFERNT: $campaign_id - $status\n"; + + $stmt="SELECT dial_statuses from vicidial_campaigns where campaign_id='$campaign_id';"; + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + + $dial_statuses = eregi_replace(" $status "," ",$row[0]); + $stmt="UPDATE vicidial_campaigns set dial_statuses='$dial_statuses' 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|DIAL STATUS REMOVED |$PHP_AUTH_USER|$ip|$stmt|\n"); + fclose($fp); + } + } + } + } + else + { + echo "Sie haben nicht Erlaubnis, diese Seite anzusehen\n"; + exit; + } +$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 state 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 +} + + +###################### +# ADD=61111111111 delete phone record +###################### + +if ($ADD==61111111111) +{ + echo ""; + + if ( (strlen($extension) < 2) or (strlen($server_ip) < 7) or ($CoNfIrM != 'YES') or ($LOGast_delete_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='10000000000'; # go to phone list +} + + +###################### +# ADD=611111111111 delete server record +###################### + +if ($ADD==611111111111) +{ + echo ""; + + if ( (strlen($server_id) < 2) or (strlen($server_ip) < 7) or ($CoNfIrM != 'YES') or ($LOGast_delete_phones < 1) ) + { + echo "
BEDIENERNOT DELETED - Gehen Sie bitte zurück und betrachten Sie die Daten, die Sieeingaben\n"; + echo "
Bediener Identifikation be at least 2 characters in length\n"; + echo "
Bediener IP be at least 7 characters in length\n"; + } + else + { + $stmt="DELETE from servers where server_id='$server_id' 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 SERVER!!|$PHP_AUTH_USER|$ip|server_id='$server_id'|server_ip='$server_ip'|\n"); + fclose($fp); + } + echo "
BEDIENERDELETION COMPLETED: $server_id - $server_ip\n"; + echo "

\n"; + } +$ADD='100000000000'; # go to server list +} + + +###################### +# ADD=621111111111 delete vicidial server trunk record in the system +###################### + +if ($ADD==621111111111) +{ + if ($LOGmodify_servers==1) + { + echo ""; + + if ( (strlen($campaign_id) < 2) or (strlen($server_ip) < 7) ) + { + echo "
VICIDIAL BEDIENER-STAMM-SATZ NICHT GELÖSCHT - Gehen Sie bitte zurück und betrachten Sie die Daten, die Sieeingaben\n"; + echo "
Kampagne muß zwischen 3 und 8 Buchstaben lang sein\n"; + echo "
server_ip verzögert muß mindestens 7 Buchstaben sein\n"; + } + else + { + echo "
VICIDIAL BEDIENER-STAMM-SATZ GELÖSCHT: $campaign_id - $server_ip\n"; + + $stmt="DELETE FROM vicidial_server_trunks where campaign_id='$campaign_id' and server_ip='$server_ip';"; + $rslt=mysql_query($stmt, $link); + + ### LOG CHANGES TO LOG FILE ### + if ($WeBRooTWritablE > 0) + { + $fp = fopen ("./admin_changes_log.txt", "a"); + fwrite ($fp, "$date|DELETE BEDIENERTRUNK |$PHP_AUTH_USER|$ip|$stmt|\n"); + fclose($fp); + } + } + } + else + { + echo "Sie haben nicht Erlaubnis, diese Seite anzusehen\n"; + exit; + } +$ADD=311111111111; # go to server modification form below +} + + +###################### +# ADD=6111111111111 delete conference record +###################### + +if ($ADD==6111111111111) +{ + echo ""; + + if ( (strlen($conf_exten) < 2) or (strlen($server_ip) < 7) or ($CoNfIrM != 'YES') or ($LOGast_delete_phones < 1) ) + { + echo "
CONFERENCE NOT DELETED - Gehen Sie bitte zurück und betrachten Sie die Daten, die Sieeingaben\n"; + echo "
Conference be at least 2 characters in length\n"; + echo "
Bediener IP be at least 7 characters in length\n"; + } + else + { + $stmt="DELETE from conferences where conf_exten='$conf_exten' 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 CONF!!!!|$PHP_AUTH_USER|$ip|conf_exten='$conf_exten'|server_ip='$server_ip'|\n"); + fclose($fp); + } + echo "
CONFERENCE DELETION COMPLETED: $conf_exten - $server_ip\n"; + echo "

\n"; + } +$ADD='1000000000000'; # go to conference list +} + + +###################### +# ADD=61111111111111 delete vicidial conference record +###################### + +if ($ADD==61111111111111) +{ + echo ""; + + if ( (strlen($conf_exten) < 2) or (strlen($server_ip) < 7) or ($CoNfIrM != 'YES') or ($LOGast_delete_phones < 1) ) + { + echo "
VICIDIAL CONFERENCE NOT DELETED - Gehen Sie bitte zurück und betrachten Sie die Daten, die Sieeingaben\n"; + echo "
Conference be at least 2 characters in length\n"; + echo "
Bediener IP be at least 7 characters in length\n"; + } + else + { + $stmt="DELETE from vicidial_conferences where conf_exten='$conf_exten' 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 CONF!!!!|$PHP_AUTH_USER|$ip|conf_exten='$conf_exten'|server_ip='$server_ip'|\n"); + fclose($fp); + } + echo "
VICIDIAL CONFERENCE DELETION COMPLETED: $conf_exten - $server_ip\n"; + echo "

\n"; + } +$ADD='10000000000000'; # go to vicidial conference list +} + + + + + +###################################################################################################### +###################################################################################################### +####### 3 series, record modification forms +###################################################################################################### +###################################################################################################### + + + + +###################### +# ADD=3 modify user info in the system +###################### + +if ($ADD==3) +{ + if ($LOGmodify_users==1) + { + 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]; + $modify_users = $row[34]; + $modify_campaigns = $row[35]; + $modify_lists = $row[36]; + $modify_scripts = $row[37]; + $modify_filters = $row[38]; + $modify_ingroups = $row[39]; + $modify_usergroups = $row[40]; + $modify_remoteagents = $row[41]; + $modify_servers = $row[42]; + $view_reports = $row[43]; + $vicidial_recording_override = $row[44]; + $alter_custdata_override = $row[45]; + + 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"; + 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"; + 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
Hot Keys 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
VICIDIAL Aufnahme-Übersteuerung: $NWB#vicidial_users-vicidial_recording_override$NWE
Mittel Ändern Kunde Daten-Übersteuerung: $NWB#vicidial_users-alter_custdata_override$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
Ändern Sie Benutzer: $NWB#vicidial_users-modify_sections$NWE
Ändern Sie Kampagnen: $NWB#vicidial_users-modify_sections$NWE
Ändern Sie Listen: $NWB#vicidial_users-modify_sections$NWE
Ändern Sie Indexe: $NWB#vicidial_users-modify_sections$NWE
Ändern Sie Filter: $NWB#vicidial_users-modify_sections$NWE
Ändern Sie In-Gruppen: $NWB#vicidial_users-modify_sections$NWE
Ändern Sie Benutzer-Gruppen: $NWB#vicidial_users-modify_sections$NWE
Ändern Sie Remotemittel: $NWB#vicidial_users-modify_sections$NWE
Ändern Sie Bediener: $NWB#vicidial_users-modify_sections$NWE
Ansicht-Reports: $NWB#vicidial_users-view_reports$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"; + } + } + else + { + echo "Sie haben nicht Erlaubnis, diese Seite anzusehen\n"; + exit; + } +} + + +###################### +# 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) and ( (!eregi("$campaign_id",$LOGallowed_campaigns)) and (!eregi("ALL-CAMPAIGNS",$LOGallowed_campaigns)) ) ) + {$ADD=30;} # send to not allowed screen if not in vicidial_user_groups allowed_campaigns list + +if ($ADD==31) +{ + if ($LOGmodify_users==1) + { + 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); + $campaign_name = $row[1]; + $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]; + $allcalls_delay = $row[44]; + $omit_phone_code = $row[45]; + $dial_method = $row[46]; + $available_only_ratio_tally = $row[47]; + $adaptive_dropped_percentage = $row[48]; + $adaptive_maximum_level = $row[49]; + $adaptive_latest_server_time = $row[50]; + $adaptive_intensity = $row[51]; + $adaptive_dl_diff_target = $row[52]; + $concurrent_transfers = $row[53]; + $auto_alt_dial = $row[54]; + $auto_alt_dial_statuses = $row[55]; + $agent_pause_codes_active = $row[56]; + $campaign_description = $row[57]; + $campaign_changedate = $row[58]; + $campaign_stats_refresh = $row[59]; + $campaign_logindate = $row[60]; + $dial_statuses = $row[61]; + $disable_alter_custdata = $row[62]; + $no_hopper_leads_logins = $row[63]; + + 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"; + + $stmt="SELECT * from vicidial_statuses order by status"; + $rslt=mysql_query($stmt, $link); + $statuses_to_print = mysql_num_rows($rslt); + $statuses_list=''; + + $o=0; + while ($statuses_to_print > $o) + { + $rowx=mysql_fetch_row($rslt); + $statuses_list .= "\n"; + $statname_list["$rowx[0]"] = "$rowx[1]"; + $LRstatuses_list .= "\n"; + if (eregi("Y",$rowx[2])) + {$HKstatuses_list .= "\n";} + $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 .= "\n"; + $statname_list["$rowx[0]"] = "$rowx[1]"; + $LRstatuses_list .= "\n"; + if (eregi("Y",$rowx[2])) + {$HKstatuses_list .= "\n";} + $o++; + } + + $dial_statuses = preg_replace("/ -$/","",$dial_statuses); + $Dstatuses = explode(" ", $dial_statuses); + $Ds_to_print = (count($Dstatuses) -1); + + $o=0; + while ($Ds_to_print > $o) + { + $o++; + $Dstatus = $Dstatuses[$o]; + + echo "\n"; + } + + echo "\n"; + + echo "\n"; + + echo "\n"; + + echo "\n"; + + echo "\n"; + + echo "\n"; + + echo "\n"; + + echo "\n"; + + echo "\n"; + + echo "\n"; + + echo "\n"; + + echo "\n"; + + + + echo "\n"; + + echo "\n"; + + + echo "\n"; + + echo "\n"; + + echo "\n"; + + echo "\n"; + + echo "\n"; + + echo "\n"; + + echo "\n"; + + echo "\n"; + + echo "\n"; + + echo "\n"; + + echo "\n"; + + echo "\n"; + + echo "\n"; + + echo "\n"; + + echo "\n"; + + echo "\n"; + + echo "\n"; + + echo "\n"; + + echo "\n"; + + echo "\n"; + + echo "\n"; + + 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|BLEND|INBND|_C$|_B$|_I$)", $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
Kampagne Beschreibung: $NWB#vicidial_campaigns-campaign_description$NWE
Kampagne Change Date: $campaign_changedate   $NWB#vicidial_campaigns-campaign_changedate$NWE
Kampagne Login Date: $campaign_logindate   $NWB#vicidial_campaigns-campaign_logindate$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
Vorwahlknopf-Status$o: \n"; + echo "$Dstatus - $statname_list[$Dstatus]         \n"; + echo "ENTFERNEN Sie
Add A Dial Status:   \n"; + echo "     $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
Vorwahlknopf-Methode: $NWB#vicidial_campaigns-dial_method$NWE
Selbstvorwahlknopf-Niveau: (0 = off)$NWB#vicidial_campaigns-auto_dial_level$NWE       PASSEN SIE ÜBERSTEUERUNG AN
Vorhandenes Nur Tally: $NWB#vicidial_campaigns-available_only_ratio_tally$NWE
Tropfen-Prozentsatz-Begrenzung: % $NWB#vicidial_campaigns-adaptive_dropped_percentage$NWE
Maximum Paßt Vorwahlknopf-Niveau An: number only $NWB#vicidial_campaigns-adaptive_maximum_level$NWE
Neueste Bediener-Zeit: 4 nur Stellen $NWB#vicidial_campaigns-adaptive_latest_server_time$NWE
Passen Sie Intensität Modifizierfaktor An: $NWB#vicidial_campaigns-adaptive_intensity$NWE
Vorwahlknopf-Waagerecht ausgerichtetes Unterschied-Ziel: $NWB#vicidial_campaigns-adaptive_dl_diff_target$NWE
Gleichzeitige Übertragungen: $NWB#vicidial_campaigns-concurrent_transfers$NWE
SelbstAlt-zahl Wählen: $NWB#vicidial_campaigns-auto_alt_dial$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
Lassen Sie Telefon-Code Aus: $NWB#vicidial_campaigns-omit_phone_code$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
Das Notieren Verzögert: in seconds$NWB#vicidial_campaigns-allcalls_delay$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
Agent Pause Codes Aktiv:$NWB#vicidial_campaigns-agent_pause_codes_active$NWE
Kampagne Stats Refresh: $NWB#vicidial_campaigns-campaign_stats_refresh$NWE
Sperren Sie Ändern Kunde Daten: $NWB#vicidial_campaigns-disable_alter_custdata$NWE
Gewähren Sie Kein-Zufuhrbehälter-Führt LOGON: $NWB#vicidial_campaigns-no_hopper_leads_logins$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_statuses,$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 "Click here to see a VDAD report for this campaign

\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 HOT KEYS 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 "
HOT KEYSTATUSBESCHREIBUNGLÖSCHUNG
$rowx[1]$rowx[0]$rowx[2]LÖSCHUNG
\n"; + + echo "
ADDIEREN SIE NEUE KUNDENSPEZIFISCHE KAMPAGNE HOT KEY
\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 "

SELBSTALT ZAHL, DIE FÜR DIESE KAMPAGNE WÄHLT:   $NWB#vicidial_auto_alt_dial_statuses$NWE
\n"; + echo "\n"; + echo "\n"; + + $auto_alt_dial_statuses = preg_replace("/ -$/","",$auto_alt_dial_statuses); + $AADstatuses = explode(" ", $auto_alt_dial_statuses); + $AADs_to_print = (count($AADstatuses) -1); + + $o=0; + while ($AADs_to_print > $o) + { + if (eregi("1$|3$|5$|7$|9$", $o)) + {$bgcolor='bgcolor="#B9CBFD"';} + else + {$bgcolor='bgcolor="#9BB9FB"';} + $o++; + + echo "\n"; + echo "\n"; + } + + echo "
STATUSESLÖSCHUNG
$AADstatuses[$o]LÖSCHUNG
\n"; + + echo "
ADDIEREN SIE NEUE ZAHL-WÄHLENDEN STATUS DES AUTOMOBIL-ALT
\n"; + echo "\n"; + echo "\n"; + echo "Status:   \n"; + echo "
\n"; + + echo "

\n"; + + + + echo "

MITTEL-PAUSE CODES FÜR DIESE KAMPAGNE:   $NWB#vicidial_pause_codes$NWE
\n"; + echo "\n"; + echo "\n"; + + $stmt="SELECT * from vicidial_pause_codes where campaign_id='$campaign_id' order by pause_code"; + $rslt=mysql_query($stmt, $link); + $pause_codes_to_print = mysql_num_rows($rslt); + $o=0; + while ($pause_codes_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 "
PAUSE CODESVERRECHENBARÄNDERN SieLÖSCHUNG
$rowx[0]\n"; + echo "\n"; + echo "\n"; + echo "  \n"; + echo "
LÖSCHUNG
\n"; + + echo "
ADDIEREN SIE NEUEN MITTEL-PAUSE CODE
\n"; + echo "\n"; + echo "\n"; + echo "Pause Code: \n"; + echo "Pause Code-Name: \n"; + echo "   Verrechenbar: \n"; + echo "
\n"; + + echo "

\n"; + + + + + + + echo "

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

\n"; + echo "EMERGENCY VDAC CLEAR FOR THIS CAMPAIGN

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

LÖSCHEN SIE DIESE KAMPAGNE\n"; + } + } + else + { + echo "Sie haben nicht Erlaubnis, diese Seite anzusehen\n"; + exit; + } +} + + +###################### +# ADD=34 modify campaign info in the system - Basic View +###################### + +if ( ($ADD==34) and ( (!eregi("$campaign_id",$LOGallowed_campaigns)) and (!eregi("ALL-CAMPAIGNS",$LOGallowed_campaigns)) ) ) + {$ADD=30;} # send to not allowed screen if not in vicidial_user_groups allowed_campaigns list + +if ($ADD==34) +{ + if ($LOGmodify_campaigns==1) + { + 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]; + $dial_method = $row[46]; + $adaptive_intensity = $row[51]; + $campaign_description = $row[57]; + $campaign_changedate = $row[58]; + $campaign_stats_refresh = $row[59]; + $campaign_logindate = $row[60]; + $dial_statuses = $row[61]; + + 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"; + + $stmt="SELECT * from vicidial_statuses order by status"; + $rslt=mysql_query($stmt, $link); + $statuses_to_print = mysql_num_rows($rslt); + $statuses_list=''; + + $o=0; + while ($statuses_to_print > $o) + { + $rowx=mysql_fetch_row($rslt); + $statuses_list .= "\n"; + $statname_list["$rowx[0]"] = "$rowx[1]"; + $LRstatuses_list .= "\n"; + if (eregi("Y",$rowx[2])) + {$HKstatuses_list .= "\n";} + $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 .= "\n"; + $statname_list["$rowx[0]"] = "$rowx[1]"; + $LRstatuses_list .= "\n"; + if (eregi("Y",$rowx[2])) + {$HKstatuses_list .= "\n";} + $o++; + } + + $dial_statuses = preg_replace("/ -$/","",$dial_statuses); + $Dstatuses = explode(" ", $dial_statuses); + $Ds_to_print = (count($Dstatuses) -1); + + $o=0; + while ($Ds_to_print > $o) + { + $o++; + $Dstatus = $Dstatuses[$o]; + + echo "\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
Kampagne Beschreibung: $NWB#vicidial_campaigns-campaign_description$NWE
Kampagne Change Date: $campaign_changedate   $NWB#vicidial_campaigns-campaign_changedate$NWE
Kampagne Login Date: $campaign_logindate   $NWB#vicidial_campaigns-campaign_logindate$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
Vorwahlknopf-Status$o: \n"; + echo "$Dstatus - $statname_list[$Dstatus]         \n"; + echo "ENTFERNEN Sie
Add A Dial Status:   \n"; + echo "     $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
Vorwahlknopf-Methode: $NWB#vicidial_campaigns-dial_method$NWE
Selbstvorwahlknopf-Niveau: (0 = off)$NWB#vicidial_campaigns-auto_dial_level$NWE
Passen Sie Intensität Modifizierfaktor An: $NWB#vicidial_campaigns-adaptive_intensity$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_statuses,$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 "Click here to see a VDAD report for this campaign

\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"; + } + } + else + { + echo "Sie haben nicht Erlaubnis, diese Seite anzusehen\n"; + exit; + } +} + + +###################### +# ADD=31 campaign not allowed +###################### + +if ($ADD==30) +{ +echo "
\n"; + echo ""; +echo "You do not have permission to view campaign $campaign_id\n"; +} + + + +###################### +# ADD=311 modify list info in the system +###################### + +if ($ADD==311) +{ + if ($LOGmodify_lists==1) + { + 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]; + $list_description = $row[4]; + $list_changedate = $row[5]; + $list_lastcalldate = $row[6]; + + # 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 "\n"; + echo "\n"; + echo "\n"; + echo "
Liste Identifikation: $row[0]$NWB#vicidial_lists-list_id$NWE
Liste Name: $NWB#vicidial_lists-list_name$NWE
Liste Beschreibung: $NWB#vicidial_lists-list_description$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
Liste Änderung Datum: $list_changedate   $NWB#vicidial_lists-list_changedate$NWE
List Last Call Date: $list_lastcalldate   $NWB#vicidial_lists-list_lastcalldate$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"; + + echo "

Click here to see all CallBack Holds in this list

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

LÖSCHEN SIE DIESE LISTE\n"; + } + } + else + { + echo "Sie haben nicht Erlaubnis, diese Seite anzusehen\n"; + exit; + } +} + + + +###################### +# ADD=3111 modify in-group info in the system +###################### + +if ($ADD==3111) +{ + if ($LOGmodify_ingroups==1) + { + 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 "Click here to see a report for this campaign

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

EMERGENCY VDAC CLEAR FOR THIS IN-GROUP

\n"; + echo "

LÖSCHEN SIE DIESES IN-GROUP\n"; + } + } + else + { + echo "Sie haben nicht Erlaubnis, diese Seite anzusehen\n"; + exit; + } +} + + + +###################### +# ADD=31111 modify remote agents info in the system +###################### + +if ($ADD==31111) +{ + if ($LOGmodify_remoteagents==1) + { + 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: (dial plan 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"; + } + } + else + { + echo "Sie haben nicht Erlaubnis, diese Seite anzusehen\n"; + exit; + } +} + + +###################### +# ADD=311111 modify user group info in the system +###################### + +if ($ADD==311111) +{ + if ($LOGmodify_usergroups==1) + { + 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 "\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
Erlaubte Kampagnen: \n"; + echo "$campaigns_list"; + echo "$NWB#vicidial_user_groups-allowed_campaigns$NWE
\n"; + + + ### list of users in this user group + + $active_confs = 0; + $stmt="SELECT user,full_name,user_level from vicidial_users where user_group='$user_group'"; + $rsltx=mysql_query($stmt, $link); + $users_to_print = mysql_num_rows($rsltx); + + echo "
\n"; + echo "
BENUTZER INNERHALB DIESER BENUTZER-GRUPPE: $users_to_print
\n"; + echo "\n"; + echo "\n"; + + $o=0; + while ($users_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 "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + } + + echo "
USERFULL NAMELEVEL
$rowx[0]$rowx[1]$rowx[2]

\n"; + + + + echo "

Click here to see all CallBack Holds in this user group

\n"; + + if ($LOGdelete_user_groups > 0) + { + echo "

LÖSCHEN SIE DIESE BENUTZER-GRUPPE\n"; + } + } + else + { + echo "Sie haben nicht Erlaubnis, diese Seite anzusehen\n"; + exit; + } +} + + +###################### +# ADD=3111111 modify script info in the system +###################### + +if ($ADD==3111111) +{ + if ($LOGmodify_scripts==1) + { + 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
"; + # BEGIN Insert Field + echo ""; + echo "
"; + # END Insert Field + echo " $NWB#vicidial_scripts-script_text$NWE
\n"; + + if ($LOGdelete_scripts > 0) + { + echo "

LÖSCHEN SIE DIESEN INDEX\n"; + } + } + else + { + echo "Sie haben nicht Erlaubnis, diese Seite anzusehen\n"; + exit; + } +} + + +###################### +# ADD=31111111 modify filter info in the system +###################### + +if ($ADD==31111111) +{ + if ($LOGmodify_filters==1) + { + 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"; + } + } + else + { + echo "Sie haben nicht Erlaubnis, diese Seite anzusehen\n"; + exit; + } +} + + +###################### +# 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=31111111111 modify phone record in the system +###################### + +if ($ADD==31111111111) +{ + if ($LOGast_admin_access==1) + { + echo "
\n"; + 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 "\n"; + echo "
Telefonverlängerung: $NWB#phones-extension$NWE
Dial Plan 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
Ermöglichen Sie SIPSAK Anzeigen: $NWB#phones-enable_sipsak_messages$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 ($LOGast_delete_phones > 0) + { + echo "

LÖSCHEN SIE DIESES TELEFON\n"; + } + } + else + { + echo "Sie haben nicht Erlaubnis, diese Seite anzusehen\n"; + exit; + } +} + + +###################### +# ADD=311111111111 modify server record in the system +###################### + +if ($ADD==311111111111) +{ + if ($LOGmodify_servers==1) + { + echo "
\n"; + echo ""; + + $stmt="SELECT * from servers where server_id='$server_id' or server_ip='$server_ip';"; + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + $server_id = $row[0]; + $server_ip = $row[2]; + + 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 "\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
VICIDIAL Balance Wählen: $NWB#servers-vicidial_balance_active$NWE
VICIDIAL Balance Offlimits: $NWB#servers-balance_trunks_offlimits$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
System Leistung: $NWB#servers-sys_perf_log$NWE
Bediener-Maschinenbordbücher: $NWB#servers-vd_server_logs$NWE
AGI Ausgang: $NWB#servers-agi_output$NWE
\n"; + + + ### vicidial server trunk records for this server + echo "

VICIDIAL STÄMME FÜR DIESEN BEDIENER:   $NWB#vicidial_server_trunks$NWE
\n"; + echo "\n"; + echo "\n"; + + $stmt="SELECT * from vicidial_server_trunks where server_ip='$server_ip' order by campaign_id"; + $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 "
KAMPAGNE STÄMME BESCHRÄNKUNG DELETE
$rowx[1]
\n"; + echo "\n"; + echo "\n"; + echo "
LÖSCHUNG
\n"; + + echo "
ADDIEREN SIE NEUEN STAMM-SATZ DES BEDIENER-VICIDIAL
\n"; + echo "\n"; + echo "\n"; + echo "TRUNKS:
\n"; + echo "KAMPAGNE:
\n"; + echo "RESTRICTION:
\n"; + echo "
\n"; + + echo "

\n"; + + + ### list of phones on this server + echo "
\n"; + echo "
TELEFONE INNERHALB DIESES BEDIENERS:
\n"; + echo "\n"; + echo "\n"; + + $active_phones = 0; + $inactive_phones = 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_phones++; $camp_lists .= "'$rowx[0]',";} + if (ereg("N", $rowx[1])) {$inactive_phones++;} + + 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"; + + + ### list of conferences on this server + echo "
\n"; + echo "
CONFERENCES WITHIN THIS SERVER:
\n"; + echo "\n"; + echo "\n"; + + $active_confs = 0; + $stmt="SELECT conf_exten,extension from conferences 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++; + $active_confs++; + + if (eregi("1$|3$|5$|7$|9$", $o)) + {$bgcolor='bgcolor="#B9CBFD"';} + else + {$bgcolor='bgcolor="#9BB9FB"';} + + echo "\n"; + } + + echo "
CONFERENCEVERLÄNGERUNG
$rowx[0]$rowx[2]

\n"; + + + ### list of vicidial conferences on this server + echo "
\n"; + echo "
VICIDIAL CONFERENCES WITHIN THIS SERVER:
\n"; + echo "\n"; + echo "\n"; + + $active_vdconfs = 0; + $stmt="SELECT conf_exten,extension from vicidial_conferences 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++; + $active_vdconfs++; + + if (eregi("1$|3$|5$|7$|9$", $o)) + {$bgcolor='bgcolor="#B9CBFD"';} + else + {$bgcolor='bgcolor="#9BB9FB"';} + + echo "\n"; + } + + echo "
VD CONFERENCEVERLÄNGERUNG
$rowx[0]$rowx[2]

\n"; + + + echo "
\n"; + + $camp_lists = eregi_replace(".$","",$camp_lists); + echo "Dieser Bediener hat $active_phones aktive Telefone und $inactive_phones unaktivierte Telefone

\n"; + echo "Dieser Bediener hat $active_confs active conferences

\n"; + echo "Dieser Bediener hat $active_vdconfs active vicidial conferences

\n"; + echo "
\n"; + if ($LOGast_delete_phones > 0) + { + echo "

DELETE THIS SERVER\n"; + } + } + else + { + echo "Sie haben nicht Erlaubnis, diese Seite anzusehen\n"; + exit; + } +} + + +###################### +# ADD=3111111111111 modify conference record in the system +###################### + +if ($ADD==3111111111111) +{ + if ($LOGast_admin_access==1) + { + echo "
\n"; + 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); + $conf_exten = $row[0]; + $server_ip = $row[1]; + + 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"; + if ($LOGast_delete_phones > 0) + { + echo "

DELETE THIS CONFERENCE\n"; + } + } + else + { + echo "Sie haben nicht Erlaubnis, diese Seite anzusehen\n"; + exit; + } +} + + +###################### +# ADD=31111111111111 modify vicidial conference record in the system +###################### + +if ($ADD==31111111111111) +{ + if ($LOGast_admin_access==1) + { + echo "
\n"; + echo ""; + + $stmt="SELECT * from vicidial_conferences where conf_exten='$conf_exten' and server_ip='$server_ip';"; + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + $conf_exten = $row[0]; + $server_ip = $row[1]; + + echo "
MODIFY A VICIDIAL CONFERENCE RECORD: $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"; + if ($LOGast_delete_phones > 0) + { + echo "

DELETE THIS VICIDIAL CONFERENCE\n"; + } + } + else + { + echo "Sie haben nicht Erlaubnis, diese Seite anzusehen\n"; + exit; + } +} + + + +###################### +# ADD=311111111111111 modify vicidial system settings +###################### + +if ($ADD==311111111111111) +{ + if ($LOGmodify_servers==1) + { + echo "
\n"; + echo ""; + + $stmt="SELECT version,install_date,use_non_latin,webroot_writable,enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_url,queuemetrics_log_id,queuemetrics_eq_prepend,vicidial_agent_disable,allow_sipsak_messages,admin_home_url from system_settings;"; + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + $version = $row[0]; + $install_date = $row[1]; + $use_non_latin = $row[2]; + $webroot_writable = $row[3]; + $enable_queuemetrics_logging = $row[4]; + $queuemetrics_server_ip = $row[5]; + $queuemetrics_dbname = $row[6]; + $queuemetrics_login = $row[7]; + $queuemetrics_pass = $row[8]; + $queuemetrics_url = $row[9]; + $queuemetrics_log_id = $row[10]; + $queuemetrics_eq_prepend = $row[11]; + $vicidial_agent_disable = $row[12]; + $allow_sipsak_messages = $row[13]; + $admin_home_url = $row[14]; + + echo "
ÄNDERN SIE VICIDIAL SYSTEM EINSTELLUNGEN\n"; + echo "\n"; + echo "
\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + + echo "\n"; + echo "
Version: $version
Install Date: $install_date
Gebrauch Nicht-Lateinisch: $NWB#settings-use_non_latin$NWE
Webroot Schreibbar: $NWB#settings-webroot_writable$NWE
Ermöglichen Sie Der QueueMetrics Protokollierung: $NWB#settings-enable_queuemetrics_logging$NWE
QueueMetrics Bediener IP: $NWB#settings-queuemetrics_server_ip$NWE
QueueMetrics DB Name: $NWB#settings-queuemetrics_dbname$NWE
QueueMetrics DB LOGON: $NWB#settings-queuemetrics_login$NWE
QueueMetrics DB Kennwort: $NWB#settings-queuemetrics_pass$NWE
QueueMetrics URL: $NWB#settings-queuemetrics_url$NWE
QueueMetrics Maschinenbordbuch Identifikation:$NWB#settings-queuemetrics_log_id$NWE
QueueMetrics EnterQueue Stellen Voran: $NWB#settings-queuemetrics_eq_prepend$NWE
VICIDIAL Mittel Sperren Anzeige: $NWB#settings-vicidial_agent_disable$NWE
Erlauben Sie SIPSAK Anzeigen: $NWB#settings-allow_sipsak_messages$NWE
Admin Haupt-URL: $NWB#settings-admin_home_url$NWE
\n"; + + echo "
\n"; + } + else + { + echo "Sie haben nicht Erlaubnis, diese Seite anzusehen\n"; + exit; + } +} + + + + + + + +###################### +# ADD=550 search form +###################### + +if ($ADD==550) +{ +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=660 user search results +###################### + +if ($ADD==660) +{ +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=8111 find all callbacks on hold within a user group +###################### +if ($ADD==8111) +{ + echo ""; + + $stmt="SELECT * from vicidial_callbacks where status IN('ACTIVE','LIVE') and user_group='$user_group' order by recipient,status desc,callback_time"; + $rslt=mysql_query($stmt, $link); + $cb_to_print = mysql_num_rows($rslt); + +echo "
USER GROUP 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 ""; + echo "\n"; + $o++; + } + +echo "
LEADLIST KAMPAGNEENTRYDATUMCALLBACKDATUMUSERRECIPIENTSTATUSGROUP
$row[1]$row[2]$row[3]$row[5]$row[6]$row[8]$row[9]$row[4]$row[11]
\n"; +} + + + +###################################################################################################### +###################################################################################################### +####### 0 series, displays and searches +###################################################################################################### +###################################################################################################### + +###################### +# ADD=0 display all active users +###################### +if ($ADD==0) +{ +echo "
\n"; +echo ""; + +$USERlink='stage=USERIDDOWN'; +$NAMElink='stage=NAMEDOWN'; +$LEVELlink='stage=LEVELDOWN'; +$GROUPlink='stage=GROUPDOWN'; +$SQLorder='order by full_name'; +if (eregi("USERIDUP",$stage)) {$SQLorder='order by user asc'; $USERlink='stage=USERIDDOWN';} +if (eregi("USERIDDOWN",$stage)) {$SQLorder='order by user desc'; $USERlink='stage=USERIDUP';} +if (eregi("NAMEUP",$stage)) {$SQLorder='order by full_name asc'; $NAMElink='stage=NAMEDOWN';} +if (eregi("NAMEDOWN",$stage)) {$SQLorder='order by full_name desc'; $NAMElink='stage=NAMEUP';} +if (eregi("LEVELUP",$stage)) {$SQLorder='order by user_level asc'; $LEVELlink='stage=LEVELDOWN';} +if (eregi("LEVELDOWN",$stage)) {$SQLorder='order by user_level desc'; $LEVELlink='stage=LEVELUP';} +if (eregi("GROUPUP",$stage)) {$SQLorder='order by user_group asc'; $GROUPlink='stage=GROUPDOWN';} +if (eregi("GROUPDOWN",$stage)) {$SQLorder='order by user_group desc'; $GROUPlink='stage=GROUPUP';} + $stmt="SELECT * from vicidial_users $SQLorder"; + $rslt=mysql_query($stmt, $link); + $people_to_print = mysql_num_rows($rslt); + +echo "
BENUTZER-AUFLISTUNGEN:\n"; +echo "
\n"; +echo ""; +echo ""; +echo ""; +echo ""; +echo ""; +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 "
USER IDFULL NAMELEVELGROUPLINKS
$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 ""; + + $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"; +} + +###################### +# ADD=10000000000 display all phones +###################### +if ($ADD==10000000000) +{ +echo "
\n"; +echo ""; + +$EXTENlink='stage=EXTENDOWN'; +$PROTOlink='stage=PROTODOWN'; +$SERVERlink='stage=SERVERDOWN'; +$STATUSlink='stage=STATUSDOWN'; +$SQLorder='order by extension,server_ip'; +if (eregi("EXTENUP",$stage)) {$SQLorder='order by extension asc'; $EXTENlink='stage=EXTENDOWN';} +if (eregi("EXTENDOWN",$stage)) {$SQLorder='order by extension desc'; $EXTENlink='stage=EXTENUP';} +if (eregi("PROTOUP",$stage)) {$SQLorder='order by protocol asc'; $PROTOlink='stage=PROTODOWN';} +if (eregi("PROTODOWN",$stage)) {$SQLorder='order by protocol desc'; $PROTOlink='stage=PROTOUP';} +if (eregi("SERVERUP",$stage)) {$SQLorder='order by server_ip asc'; $SERVERlink='stage=SERVERDOWN';} +if (eregi("SERVERDOWN",$stage)) {$SQLorder='order by server_ip desc'; $SERVERlink='stage=SERVERUP';} +if (eregi("STATUSUP",$stage)) {$SQLorder='order by status asc'; $STATUSlink='stage=STATUSDOWN';} +if (eregi("STATUSDOWN",$stage)) {$SQLorder='order by status desc'; $STATUSlink='stage=STATUSUP';} + $stmt="SELECT * from phones $SQLorder"; + $rslt=mysql_query($stmt, $link); + $phones_to_print = mysql_num_rows($rslt); + +echo "
TELEFON-AUFLISTUNGEN:\n"; +echo "
\n"; +echo ""; +echo ""; +echo ""; +echo ""; +echo ""; +echo ""; +echo ""; +echo ""; +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 "
EXTENPROTOSERVERDIAL PLANSTATUSNAMEVMAILLINKS
$row[0]$row[16]$row[5]$row[1]$row[2]$row[8]$row[11]$row[14]$row[15]ÄNDERN Sie | Notfall
\n"; +} + +###################### +# ADD=100000000000 display all servers +###################### +if ($ADD==100000000000) +{ +echo "\n"; echo ""; echo ""; echo ""; echo ""; -echo ""; +echo ""; echo ""; echo ""; @@ -401,9 +436,13 @@ echo "\n\n"; ################################################################################### ###### OUTBOUND CALLS ################################################################################### -if (eregi("CLOSER",$group)) +if (eregi("(CLOSER|BLEND|INBND|_C$|_B$|_I$)",$group)) { $stmt="select closer_campaigns from vicidial_campaigns where campaign_id='" . mysql_real_escape_string($group) . "';"; +if ($non_latin > 0) +{ +$rslt=mysql_query("SET NAMES 'UTF8'"); +} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $closer_campaigns = preg_replace("/^ | -$/","",$row[0]); @@ -419,6 +458,10 @@ else $stmt="select status from vicidial_auto_calls where status NOT IN('XFER') $groupSQL;"; } +if ($non_latin > 0) +{ +$rslt=mysql_query("SET NAMES 'UTF8'"); +} $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $parked_to_print = mysql_num_rows($rslt); @@ -450,7 +493,7 @@ $parked_to_print = mysql_num_rows($rslt); if ($out_live > 9) {$F=''; $FG='';} if ($out_live > 14) {$F=''; $FG='';} - if (eregi("CLOSER",$group)) + if (eregi("(CLOSER|BLEND|INBND|_C$|_B$|_I$)",$group)) {echo "$NFB$out_total$NFE current active calls      \n";} else {echo "$NFB$out_total$NFE calls being placed       \n";} @@ -489,8 +532,8 @@ $HDsessionid = "------------------+"; $HTsessionid = " SESSIONID |"; $HDbarge = "-------+"; $HTbarge = " BARGE |"; -$HDstatus = "--------+"; -$HTstatus = " STATUS |"; +$HDstatus = "----------+"; +$HTstatus = " STATUS |"; $HDserver_ip = "-----------------+"; $HTserver_ip = " ΔΙΑΚΟΜΙΣΤΗΣ IP |"; $HDcall_server_ip = "-----------------+"; @@ -553,10 +596,14 @@ else {$groupSQL = " and campaign_id='" . mysql_real_escape_string($group) . "'"; if (strlen($usergroup)<1) {$usergroupSQL = '';} else {$usergroupSQL = " and user_group='" . mysql_real_escape_string($usergroup) . "'";} -$stmt="select extension,vicidial_live_agents.user,conf_exten,status,server_ip,UNIX_TIMESTAMP(last_call_time),UNIX_TIMESTAMP(last_call_finish),call_server_ip,campaign_id,vicidial_users.user_group,vicidial_users.full_name from vicidial_live_agents,vicidial_users where vicidial_live_agents.user=vicidial_users.user $groupSQL $usergroupSQL order by $orderSQL;"; +$stmt="select extension,vicidial_live_agents.user,conf_exten,status,server_ip,UNIX_TIMESTAMP(last_call_time),UNIX_TIMESTAMP(last_call_finish),call_server_ip,campaign_id,vicidial_users.user_group,vicidial_users.full_name,vicidial_live_agents.comments from vicidial_live_agents,vicidial_users where vicidial_live_agents.user=vicidial_users.user $groupSQL $usergroupSQL order by $orderSQL;"; #$stmt="select extension,vicidial_live_agents.user,conf_exten,status,server_ip,UNIX_TIMESTAMP(last_call_time),UNIX_TIMESTAMP(last_call_finish),call_server_ip,campaign_id,vicidial_users.user_group,vicidial_users.full_name from vicidial_live_agents,vicidial_users where vicidial_live_agents.user=vicidial_users.user and campaign_id='" . mysql_real_escape_string($group) . "' order by $orderSQL;"; +if ($non_latin > 0) +{ +$rslt=mysql_query("SET NAMES 'UTF8'"); +} $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $talking_to_print = mysql_num_rows($rslt); @@ -571,9 +618,18 @@ $talking_to_print = mysql_num_rows($rslt); { $row[5]=$row[6]; } - $extension = eregi_replace('Local/',"",$row[0]); - $extension = sprintf("%-10s", $extension); + if ($non_latin < 1) + { + $extension = eregi_replace('Local/',"",$row[0]); + $extension = sprintf("%-10s", $extension); while(strlen($extension)>10) {$extension = substr("$extension", 0, -1);} + } + else + { + $extension = eregi_replace('Local/',"",$row[0]); + $extension = sprintf("%-40s", $extension); + while(mb_strlen($extension, 'utf-8')>10) {$extension = mb_substr("$extension", 0, -1,'utf8');} + } $Luser = $row[1]; $user = sprintf("%-18s", $row[1]); $Lsessionid = $row[2]; @@ -582,16 +638,48 @@ $talking_to_print = mysql_num_rows($rslt); $status = sprintf("%-6s", $row[3]); $server_ip = sprintf("%-15s", $row[4]); $call_server_ip = sprintf("%-15s", $row[7]); - $campaign_id = sprintf("%-10s", $row[8]); + $campaign_id = sprintf("%-10s", $row[8]); + $comments= $row[11]; + + if (eregi("INCALL",$Lstatus)) + { + if ( (eregi("AUTO",$comments)) or (strlen($comments)<1) ) + {$CM='A';} + else + { + if (eregi("INBOUND",$comments)) + {$CM='I';} + else + {$CM='M';} + } + } + else {$CM=' ';} + if ($UGdisplay > 0) { - $user_group = sprintf("%-12s", $row[9]); + if ($non_latin < 1) + { + $user_group = sprintf("%-12s", $row[9]); while(strlen($user_group)>12) {$user_group = substr("$user_group", 0, -1);} + } + else + { + $user_group = sprintf("%-40s", $row[9]); + while(mb_strlen($user_group, 'utf-8')>12) {$user_group = mb_substr("$user_group", 0, -1,'utf8');} + } } if ($UidORname > 0) { - $user = sprintf("%-18s", $row[10]); + if ($non_latin < 1) + { + $user = sprintf("%-18s", $row[10]); while(strlen($user)>18) {$user = substr("$user", 0, -1);} + } + else + { + $user = sprintf("%-40s", $row[10]); + while(mb_strlen($user, 'utf-8')>18) {$user = mb_substr("$user", 0, -1,'utf8');} + } } if (!eregi("INCALL|QUEUE",$row[3])) {$call_time_S = ($STARTtime - $row[6]);} @@ -655,7 +743,7 @@ $talking_to_print = mysql_num_rows($rslt); $agentcount++; - $Aecho .= "| $G$extension$EG | $G$user$EG |$UGD $G$sessionid$EG$L$R | $G$status$EG | $SVD$G$call_time_MS$EG | $G$campaign_id$EG |\n"; + $Aecho .= "| $G$extension$EG | $G$user$EG |$UGD $G$sessionid$EG$L$R | $G$status$EG $CM | $SVD$G$call_time_MS$EG | $G$campaign_id$EG |\n"; $i++; } diff --git a/agc_2-X/trunk/LANG_www/vicidial_el/AST_timeonVDADallSUMMARY.php b/agc_2-X/trunk/LANG_www/vicidial_el/AST_timeonVDADallSUMMARY.php index a4611397..7d4a6c02 100644 --- a/agc_2-X/trunk/LANG_www/vicidial_el/AST_timeonVDADallSUMMARY.php +++ b/agc_2-X/trunk/LANG_www/vicidial_el/AST_timeonVDADallSUMMARY.php @@ -9,6 +9,8 @@ # # changes: # 61102-1616 - first build +# 61215-1131 - added answered calls and drop percent taken from answered calls +# 70111-1600 - added ability to use BLEND/INBND/*_C/*_B/*_I as closer campaigns # header ("Content-type: text/html; charset=utf-8"); @@ -35,7 +37,7 @@ if (!isset($RR)) {$gRRroup=4;} $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;"; + $stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 6 and view_reports='1';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); @@ -114,7 +116,7 @@ else { echo "- VIEW LESS SETTINGS"; } -echo "       ΑΝΑΦΟΡΕΣ"; +echo "       ΑΝΑΦΟΡΕΣ"; echo "

\n\n"; $k=0; @@ -128,7 +130,7 @@ $group = $groups[$k]; echo "$group   -   "; echo "Modify\n"; -$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,dial_method,adaptive_maximum_level,adaptive_dropped_percentage,adaptive_dl_diff_target,adaptive_intensity,available_only_ratio_tally,adaptive_latest_server_time,local_call_time,dial_timeout from vicidial_campaigns where campaign_id='" . mysql_real_escape_string($group) . "';"; +$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,dial_method,adaptive_maximum_level,adaptive_dropped_percentage,adaptive_dl_diff_target,adaptive_intensity,available_only_ratio_tally,adaptive_latest_server_time,local_call_time,dial_timeout,dial_statuses from vicidial_campaigns where campaign_id='" . mysql_real_escape_string($group) . "';"; $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $DIALlev = $row[0]; @@ -149,6 +151,9 @@ $ADAavailonly = $row[14]; $TAPERtime = $row[15]; $CALLtime = $row[16]; $DIALtimeout = $row[17]; +$DIALstatuses = $row[18]; + $DIALstatuses = (preg_replace("/ -$|^ /","",$DIALstatuses)); + $DIALstatuses = (ereg_replace(' ',', ',$DIALstatuses)); $stmt="select count(*) from vicidial_hopper where campaign_id='" . mysql_real_escape_string($group) . "';"; $rslt=mysql_query($stmt, $link); @@ -214,7 +219,7 @@ echo ""; echo ""; echo ""; echo ""; -echo ""; +echo ""; echo ""; echo ""; @@ -240,7 +245,7 @@ echo "
\n"; + 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=1000000000000 display all conferences +###################### +if ($ADD==1000000000000) +{ +echo " - + - + diff --git a/agc_2-X/trunk/LANG_www/vicidial_de/new_listloader_superL.php b/agc_2-X/trunk/LANG_www/vicidial_de/new_listloader_superL.php index 0b313e9b..e3ac5b64 100644 --- a/agc_2-X/trunk/LANG_www/vicidial_de/new_listloader_superL.php +++ b/agc_2-X/trunk/LANG_www/vicidial_de/new_listloader_superL.php @@ -303,11 +303,11 @@ function ParseFileName() { - + - + diff --git a/agc_2-X/trunk/LANG_www/vicidial_de/user_stats.php b/agc_2-X/trunk/LANG_www/vicidial_de/user_stats.php index 60174978..5f4a8e7e 100644 --- a/agc_2-X/trunk/LANG_www/vicidial_de/user_stats.php +++ b/agc_2-X/trunk/LANG_www/vicidial_de/user_stats.php @@ -7,6 +7,7 @@ # # 60619-1743 - Added variable filtering to eliminate SQL injection attack threat # 61201-1136 - Added recordings display and changed calls to time range with 10000 limit +# 70118-1605 - Added user group column to login/out and calls lists # header ("Content-type: text/html; charset=utf-8"); @@ -38,7 +39,7 @@ $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;"; + $stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 7 and view_reports='1';"; $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $auth=$row[0]; @@ -111,6 +112,11 @@ echo "\n"; echo "           $user - $full_name\n"; +echo " - VICIDIAL Time Sheet\n"; +echo " - User Status\n"; +echo " - Ändern Sie Benutzer\n"; + + echo "\n"; echo "
\n"; + 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"; +} + +###################### +# ADD=10000000000000 display all vicidial conferences +###################### +if ($ADD==10000000000000) +{ +echo "
\n"; + echo ""; + + $stmt="SELECT * from vicidial_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"; +} + +###################### +# ADD=999999 display reports section +###################### +if ($ADD==999999) +{ + if ($LOGview_reports==1) + { + echo "
\n"; + echo ""; + + $stmt="SELECT * from vicidial_conferences order by conf_exten"; + $rslt=mysql_query($stmt, $link); + $phones_to_print = mysql_num_rows($rslt); + + $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++; + } + + $stmt="SELECT enable_queuemetrics_logging,queuemetrics_url from system_settings;"; + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + $enable_queuemetrics_logging_LU = $row[0]; + $queuemetrics_url_LU = $row[1]; + + ?> + + + + + + VICIDIAL: Bediener-Notfall and Reports + VICIDIAL: Bediener-Notfall and Reports

+ +

+	
+	 $o)
+		{
+		echo "\n";
+		echo "\n";
+		echo "\n";
+		echo "\n";
+		echo "\n";
+		echo "\n";
+		echo "\n";
+		echo "\n";
+		echo "\n";
+		$o++;
+		}
+
+	echo "
SERVERBESCHREIBUNGIP ADDRESSAKTIVVDAD timePARK timeCLOSER/INBOUND time
$server_id[$o]$server_description[$o]$server_ip[$o]$active[$o]LINKLINKLINK
\n"; + } + else + { + echo "Sie haben nicht Erlaubnis, diese Seite anzusehen\n"; + exit; + } +} + + + + + +echo "
\n"; + +$ENDtime = date("U"); + +$RUNtime = ($ENDtime - $STARTtime); + +echo "\n\n\n


\n\n"; + + +echo "\n\n\n


\nIndexlaufzeit: $RUNtime seconds"; +echo "             VERSION: $admin_version"; +echo "             BAU: $build
\n"; + + +?> + + +
+ + + +1) + { + if (strlen($dial_statuses)>2) + { + $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"; + + + $dial_statuses = preg_replace("/ -$/","",$dial_statuses); + $Dstatuses = explode(" ", $dial_statuses); + $Ds_to_print = (count($Dstatuses) - 0); + $Dsql = ''; + $o=0; + while ($Ds_to_print > $o) + { + $o++; + $Dsql .= "'$Dstatuses[$o]',"; + } + $Dsql = preg_replace("/,$/","",$Dsql); + + $stmt="SELECT count(*) FROM vicidial_list where called_since_last_reset='N' and status IN($Dsql) 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 "|$DB|\n"; + echo "Diese Kampagne hat$active_leads führt, in jenen Listen gewählt zu werden\n"; + } + else + { + echo "keine Vorwahlknopfstatus vorgewählt für diese Kampagne\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_www/vicidial_de/admin_modify_lead.php b/agc_2-X/trunk/LANG_www/vicidial_de/admin_modify_lead.php index 9f502050..9c53c9e7 100644 --- a/agc_2-X/trunk/LANG_www/vicidial_de/admin_modify_lead.php +++ b/agc_2-X/trunk/LANG_www/vicidial_de/admin_modify_lead.php @@ -85,6 +85,8 @@ 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"];} +if (isset($_GET["modify_logs"])) {$modify_logs=$_GET["modify_logs"];} + elseif (isset($_POST["modify_logs"])) {$modify_logs=$_POST["modify_logs"];} $PHP_AUTH_USER = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_USER); @@ -112,7 +114,7 @@ $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;"; + $stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 7 and modify_leads='1';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); @@ -216,6 +218,17 @@ $call_length = ($STARTtime - $call_began); echo "
Lead added to DNC List: $lead_id - $phone_number
\n"; } + ### update last record in vicidial_agent_log and vicidial_log tables + if (($dispo != $status) and ($modify_logs > 0)) + { + $stmt="UPDATE vicidial_log set status='" . mysql_real_escape_string($status) . "' where lead_id='" . mysql_real_escape_string($lead_id) . "' order by call_date desc limit 1"; + if ($DB) {echo "|$stmt|\n";} + $rslt=mysql_query($stmt, $link); + + $stmt="UPDATE vicidial_agent_log set status='" . mysql_real_escape_string($status) . "' where lead_id='" . mysql_real_escape_string($lead_id) . "' order by agent_log_id desc limit 1"; + if ($DB) {echo "|$stmt|\n";} + $rslt=mysql_query($stmt, $link); + } } else @@ -346,7 +359,9 @@ else echo "\n"; - echo "\n"; + echo "\n"; + + echo "\n"; echo "
Modify agent and vicidial logs
\n"; echo "


\n"; diff --git a/agc_2-X/trunk/LANG_www/vicidial_de/admin_search_lead.php b/agc_2-X/trunk/LANG_www/vicidial_de/admin_search_lead.php index 8ab91e83..689579d0 100644 --- a/agc_2-X/trunk/LANG_www/vicidial_de/admin_search_lead.php +++ b/agc_2-X/trunk/LANG_www/vicidial_de/admin_search_lead.php @@ -40,7 +40,7 @@ $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;"; + $stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 7 and modify_leads='1';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); diff --git a/agc_2-X/trunk/LANG_www/vicidial_de/dbconnect.php b/agc_2-X/trunk/LANG_www/vicidial_de/dbconnect.php index 7221b35e..5247e166 100644 --- a/agc_2-X/trunk/LANG_www/vicidial_de/dbconnect.php +++ b/agc_2-X/trunk/LANG_www/vicidial_de/dbconnect.php @@ -44,5 +44,6 @@ $local_AMP = '@'; $ext_context = 'demo'; $recording_exten = '8309'; $WeBRooTWritablE = '1'; +$non_latin = '0'; # set to 1 for UTF rules ?> diff --git a/agc_2-X/trunk/LANG_www/vicidial_de/group_hourly_stats.php b/agc_2-X/trunk/LANG_www/vicidial_de/group_hourly_stats.php index a8c3d7da..467d685d 100644 --- a/agc_2-X/trunk/LANG_www/vicidial_de/group_hourly_stats.php +++ b/agc_2-X/trunk/LANG_www/vicidial_de/group_hourly_stats.php @@ -28,7 +28,7 @@ if (isset($_GET["SUBMIT"])) {$SUBMIT=$_GET["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;"; + $stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 6 and view_reports='1';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); diff --git a/agc_2-X/trunk/LANG_www/vicidial_de/listloader.php b/agc_2-X/trunk/LANG_www/vicidial_de/listloader.php index e9056855..5552d889 100644 --- a/agc_2-X/trunk/LANG_www/vicidial_de/listloader.php +++ b/agc_2-X/trunk/LANG_www/vicidial_de/listloader.php @@ -137,11 +137,11 @@ function ShowProgress(good, bad, total, dup, post) {
(nur Zahlen or leave blank for values in the file)
Lead Duplicate Check: Leitung Duplikat-Überprüfung:
Lead Timezone Lookup: Vorbereitungs- und Anlaufzeit Zone Nachschlagen:
Standard-VICIDIAL    Kundenspezifischer Plan
Lead Duplicate Check: Leitung Duplikat-Überprüfung:
Lead Timezone Lookup: Vorbereitungs- und Anlaufzeit Zone Nachschlagen:
\n"; @@ -173,10 +179,10 @@ echo "

\n"; echo "
\n"; echo "LOGIN/LOGOUT ZEIT:\n"; -echo "\n"; -echo "\n"; +echo "
FALL DATUM KAMPAGNEHOURS:MINUTES
\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'"; + $stmt="SELECT event,event_epoch,event_date,campaign_id,user_group 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); @@ -197,6 +203,7 @@ echo ""; echo "\n"; echo "\n"; + echo "\n"; echo "\n"; } if (ereg("LOGOUT", $row[0])) @@ -216,6 +223,7 @@ echo ""; echo "\n"; echo "\n"; + echo "\n"; echo "\n"; $event_start_seconds=''; $event_stop_seconds=''; @@ -256,8 +264,8 @@ echo "

\n"; echo "
\n"; echo "CALLS FOR THIS TIME PERIOD: (10000 record limit)\n"; -echo "
FALL DATUM KAMPAGNE GROUPHOURS:MINUTES
FALL DATUM$row[0] $row[2] $row[3] $row[4]
FALL DATUM$row[0] $row[2] $row[3] $row[4] $event_hours_int:$event_minutes_int
\n"; -echo "\n"; +echo "
# DATE/TIME LENGTH STATUS PHONE KAMPAGNE LIST LEAD
\n"; +echo "\n"; $stmt="select * 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' order by call_date desc limit 10000;"; $rslt=mysql_query($stmt, $link); @@ -279,13 +287,14 @@ echo "\n"; echo "\n"; echo "\n"; + echo "\n"; echo "\n"; echo "\n"; } -echo "
# DATE/TIME LENGTH STATUS PHONE KAMPAGNE GROUP LIST LEAD
# DATE/TIME $row[8] $row[10] $row[3] $row[14] $row[2] $row[1]
\n"; +echo "


\n"; diff --git a/agc_2-X/trunk/LANG_www/vicidial_de/user_status.php b/agc_2-X/trunk/LANG_www/vicidial_de/user_status.php index f27a6ab8..cfd46c20 100644 --- a/agc_2-X/trunk/LANG_www/vicidial_de/user_status.php +++ b/agc_2-X/trunk/LANG_www/vicidial_de/user_status.php @@ -39,7 +39,7 @@ $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;"; + $stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 7 and view_reports='1';"; $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $auth=$row[0]; @@ -75,10 +75,11 @@ $browser = getenv("HTTP_USER_AGENT"); fclose($fp); } - $stmt="SELECT full_name from vicidial_users where user='" . mysql_real_escape_string($user) . "';"; + $stmt="SELECT full_name,user_group from vicidial_users where user='" . mysql_real_escape_string($user) . "';"; $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $full_name = $row[0]; + $user_group = $row[1]; $stmt="SELECT * from vicidial_live_agents where user='" . mysql_real_escape_string($user) . "';"; $rslt=mysql_query($stmt, $link); @@ -198,9 +199,12 @@ else } -echo "           $user - $full_name - \n"; +echo "           $user - $full_name \n"; +echo "       GROUP: $user_group

\n"; echo "VICIDIAL Time Sheet\n"; +echo " - User Stats\n"; +echo " - Ändern Sie Benutzer\n"; echo "
\n"; diff --git a/agc_2-X/trunk/LANG_www/vicidial_de/welcome.php b/agc_2-X/trunk/LANG_www/vicidial_de/welcome.php new file mode 100644 index 00000000..d4f31e18 --- /dev/null +++ b/agc_2-X/trunk/LANG_www/vicidial_de/welcome.php @@ -0,0 +1,25 @@ + LICENSE: GPLv2 +# + +echo "VICIDIAL Willkommen\n"; +echo "\n"; +echo "\n"; +echo "




"; +echo ""; +echo ""; +echo "\n"; +echo "\n"; +echo "\n"; +echo "\n"; +echo "\n"; +echo "\n"; +echo "
Willkommen
 
Agent Login
 
Administration
 
\n"; +echo "\n\n"; +echo "\n\n"; +echo "\n\n"; + +?> \ No newline at end of file diff --git a/agc_2-X/trunk/LANG_www/vicidial_el/AST_CLOSERstats.php b/agc_2-X/trunk/LANG_www/vicidial_el/AST_CLOSERstats.php index 276ca985..5dbd7fbb 100644 --- a/agc_2-X/trunk/LANG_www/vicidial_el/AST_CLOSERstats.php +++ b/agc_2-X/trunk/LANG_www/vicidial_el/AST_CLOSERstats.php @@ -27,7 +27,7 @@ if (isset($_GET["ΕΠΙΒΕΒΑΙΩΣΗ"])) {$ΕΠΙΒΕΒΑΙΩΣΗ=$_GET[" $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;"; + $stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 6 and view_reports='1';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); @@ -86,7 +86,7 @@ echo "\n"; echo "\n"; -echo "           ΤΡΟΠΟΠΟΙΗΣΗ | ΑΝΑΦΟΡΕΣ \n"; +echo "           ΤΡΟΠΟΠΟΙΗΣΗ | ΑΝΑΦΟΡΕΣ \n"; echo "\n\n"; echo "
\n\n";
diff --git a/agc_2-X/trunk/LANG_www/vicidial_el/AST_VDADstats.php b/agc_2-X/trunk/LANG_www/vicidial_el/AST_VDADstats.php
index 4a7e5b42..6ccf69b1 100644
--- a/agc_2-X/trunk/LANG_www/vicidial_el/AST_VDADstats.php
+++ b/agc_2-X/trunk/LANG_www/vicidial_el/AST_VDADstats.php
@@ -29,7 +29,7 @@ if (isset($_GET["ΕΠΙΒΕΒΑΙΩΣΗ"]))				{$ΕΠΙΒΕΒΑΙΩΣΗ=$_GET["
 $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;";
+	$stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 6 and view_reports='1';";
 	if ($DB) {echo "|$stmt|\n";}
 	$rslt=mysql_query($stmt, $link);
 	$row=mysql_fetch_row($rslt);
@@ -88,7 +88,7 @@ echo "\n";
 echo "\n";
-echo "           ΤΡΟΠΟΠΟΙΗΣΗ | ΑΝΑΦΟΡΕΣ \n";
+echo "           ΤΡΟΠΟΠΟΙΗΣΗ | ΑΝΑΦΟΡΕΣ \n";
 echo "\n\n";
 
 echo "
\n\n";
@@ -202,6 +202,82 @@ echo "Total NA calls -Busy,Disconnect,RingNoAnswer: $NAcalls  $NApercent%\n";
 echo "Μέσος όρος σε δευτερόλεπτα για ΝΑ κλήσεις: $average_na_seconds\n";
 
 
+##############################
+#########  CALL STATUS STATS
+
+$TOTALcalls = 0;
+
+echo "\n";
+echo "---------- CALL STATUS STATS\n";
+echo "+--------+----------------------+------------+\n";
+echo "| STATUS | DESCRIPTION          | CALLS      |\n";
+echo "+--------+----------------------+------------+\n";
+
+$stmt="SELECT * from vicidial_statuses order by status";
+$rslt=mysql_query($stmt, $link);
+$statuses_to_print = mysql_num_rows($rslt);
+$statuses_list='';
+
+$o=0;
+while ($statuses_to_print > $o) 
+	{
+	$rowx=mysql_fetch_row($rslt);
+	$statname_list["$rowx[0]"] = "$rowx[1]";
+	$o++;
+	}
+
+$stmt="SELECT * from vicidial_campaign_statuses where campaign_id='" . mysql_real_escape_string($group) . "' 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);
+	$statname_list["$rowx[0]"] = "$rowx[1]";
+	$o++;
+	}
+
+$stmt="select count(*),status 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) . "' group by status;";
+if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");}
+$rslt=mysql_query($stmt, $link);
+if ($DB) {echo "$stmt\n";}
+$statuses_to_print = mysql_num_rows($rslt);
+$i=0;
+while ($i < $statuses_to_print)
+	{
+	$row=mysql_fetch_row($rslt);
+
+	$TOTALcalls = ($TOTALcalls + $row[0]);
+
+	$STATUScount =	sprintf("%10s", $row[0]);while(strlen($STATUScount)>10) {$STATUScount = substr("$STATUScount", 0, -1);}
+	$RAWstatus = $row[1];
+	$status =	sprintf("%-6s", $row[1]);while(strlen($status)>6) {$status = substr("$status", 0, -1);}
+
+	if ($non_latin < 1)
+		{
+		 $status_name =	sprintf("%-20s", $statname_list[$RAWstatus]); 
+		 while(strlen($status_name)>20) {$status_name = substr("$status_name", 0, -1);}	
+		}
+	else
+		{
+		 $status_name =	sprintf("%-60s", $statname_list[$RAWstatus]); 
+		 while(mb_strlen($status_name,'utf-8')>20) {$status_name = mb_substr("$status_name", 0, -1,'utf-8');}	
+		}
+
+
+	echo "| $status | $status_name | $STATUScount |\n";
+
+	$i++;
+	}
+
+$TOTALcalls =		sprintf("%10s", $TOTALcalls);
+
+echo "+--------+----------------------+------------+\n";
+echo "| TOTAL:                        | $TOTALcalls |\n";
+echo "+-------------------------------+------------+\n";
+
+
 ##############################
 #########  USER STATS
 
@@ -217,6 +293,7 @@ echo "| ΧΕΙΡΙΣΤΗΣ                   | CALLS      | TIME M   | AVRG M |\
 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;";
+if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");}
 $rslt=mysql_query($stmt, $link);
 if ($DB) {echo "$stmt\n";}
 $users_to_print = mysql_num_rows($rslt);
@@ -228,8 +305,15 @@ while ($i < $users_to_print)
 	$TOTcalls = ($TOTcalls + $row[2]);
 	$TOTtime = ($TOTtime + $row[3]);
 
-	$user =			sprintf("%-6s", $row[0]);
-	$full_name =	sprintf("%-15s", $row[1]); while(strlen($full_name)>15) {$full_name = substr("$full_name", 0, -1);}
+	$user =	sprintf("%-6s", $row[0]);while(strlen($user)>6) {$user = substr("$user", 0, -1);}
+	if ($non_latin < 1)
+	{
+ 	 $full_name =	sprintf("%-15s", $row[1]); while(strlen($full_name)>15) {$full_name = substr("$full_name", 0, -1);}	
+	}
+	else
+	{
+	 $full_name =	sprintf("%-45s", $row[1]); while(mb_strlen($full_name,'utf-8')>15) {$full_name = mb_substr("$full_name", 0, -1,'utf-8');}	
+	}
 	$USERcalls =	sprintf("%10s", $row[2]);
 	$USERtotTALK =	$row[3];
 	$USERavgTALK =	$row[4];
diff --git a/agc_2-X/trunk/LANG_www/vicidial_el/AST_VICIDIAL_hopperlist.php b/agc_2-X/trunk/LANG_www/vicidial_el/AST_VICIDIAL_hopperlist.php
index 69ae99eb..2356614a 100644
--- a/agc_2-X/trunk/LANG_www/vicidial_el/AST_VICIDIAL_hopperlist.php
+++ b/agc_2-X/trunk/LANG_www/vicidial_el/AST_VICIDIAL_hopperlist.php
@@ -7,7 +7,8 @@
 #
 # 60619-1654 - Added variable filtering to eliminate SQL injection attack threat
 #            - Added required user/pass to gain access to this page
-#
+# 70115-1614 - Added ALT field for vicidial_hopper alt_dial column
+# 
 
 require("dbconnect.php");
 
@@ -24,7 +25,7 @@ if (isset($_GET["ΕΠΙΒΕΒΑΙΩΣΗ"]))				{$ΕΠΙΒΕΒΑΙΩΣΗ=$_GET["
 $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;";
+	$stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 6 and view_reports='1' and modify_campaigns='1';";
 	if ($DB) {echo "|$stmt|\n";}
 	$rslt=mysql_query($stmt, $link);
 	$row=mysql_fetch_row($rslt);
@@ -122,11 +123,11 @@ echo "Αριθμός οδηγών στον hopper τώρα::       $TOTALcalls\n
 
 echo "\n";
 echo "---------- LEADS IN HOPPER\n";
-echo "+------+-----------+------------+-------+--------+-------+--------+\n";
-echo "|      | LEAD_ID   | PHONE NUM  | STATE | STATUS | COUNT | GMT    |\n";
-echo "+------+-----------+------------+-------+--------+-------+--------+\n";
+echo "+------+-----------+------------+-------+--------+-------+--------+-------+\n";
+echo "|      | LEAD_ID   | PHONE NUM  | STATE | STATUS | COUNT | GMT    | ALT   |\n";
+echo "+------+-----------+------------+-------+--------+-------+--------+-------+\n";
 
-$stmt="select vicidial_hopper.lead_id,phone_number,vicidial_hopper.state,vicidial_list.status,called_count,vicidial_hopper.gmt_offset_now,hopper_id 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;";
+$stmt="select vicidial_hopper.lead_id,phone_number,vicidial_hopper.state,vicidial_list.status,called_count,vicidial_hopper.gmt_offset_now,hopper_id,alt_dial 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);
@@ -143,14 +144,15 @@ while ($i < $users_to_print)
 	$count =		sprintf("%-5s", $row[4]);
 	$gmt =			sprintf("%-6s", $row[5]);
 	$hopper_id =	sprintf("%-6s", $row[6]);
+	$alt_dial =		sprintf("%-5s", $row[7]);
 
 if ($DB) {echo "| $FMT_i | $lead_id | $phone_number | $state | $status | $count | $gmt | $hopper_id |\n";}
-else {echo "| $FMT_i | $lead_id | $phone_number | $state | $status | $count | $gmt |\n";}
+else {echo "| $FMT_i | $lead_id | $phone_number | $state | $status | $count | $gmt | $alt_dial |\n";}
 
 	$i++;
 	}
 
-echo "+------+-----------+------------+-------+--------+-------+--------+\n";
+echo "+------+-----------+------------+-------+--------+-------+--------+-------+\n";
 
 
 }
diff --git a/agc_2-X/trunk/LANG_www/vicidial_el/AST_admin_log_display.php b/agc_2-X/trunk/LANG_www/vicidial_el/AST_admin_log_display.php
index aab85960..a26ee60f 100644
--- a/agc_2-X/trunk/LANG_www/vicidial_el/AST_admin_log_display.php
+++ b/agc_2-X/trunk/LANG_www/vicidial_el/AST_admin_log_display.php
@@ -35,7 +35,7 @@ $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;";
+	$stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 8 and view_reports='1';";
 	if ($DB) {echo "|$stmt|\n";}
 	$rslt=mysql_query($stmt, $link);
 	$row=mysql_fetch_row($rslt);
diff --git a/agc_2-X/trunk/LANG_www/vicidial_el/AST_agent_time_sheet.php b/agc_2-X/trunk/LANG_www/vicidial_el/AST_agent_time_sheet.php
index 454248c6..00985781 100644
--- a/agc_2-X/trunk/LANG_www/vicidial_el/AST_agent_time_sheet.php
+++ b/agc_2-X/trunk/LANG_www/vicidial_el/AST_agent_time_sheet.php
@@ -28,7 +28,7 @@ if (isset($_GET["ΕΠΙΒΕΒΑΙΩΣΗ"]))				{$ΕΠΙΒΕΒΑΙΩΣΗ=$_GET["
 $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;";
+	$stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 6 and view_reports='1';";
 	if ($DB) {echo "|$stmt|\n";}
 	$rslt=mysql_query($stmt, $link);
 	$row=mysql_fetch_row($rslt);
@@ -63,7 +63,11 @@ if (!isset($query_date)) {$query_date = $NOW_DATE;}
 \n";
 echo "VICIDIAL: Agent Time Sheet\n";
-echo "ΔΙΑΧΕΙΡΙΣΗ: Agent Time Sheet
\n"; +echo "ΔΙΑΧΕΙΡΙΣΗ: Agent Time Sheet\n"; +echo " - User Stats\n"; +echo " - User Status\n"; +echo " - Τροποποίηση Χρήστη\n"; +echo "
\n"; echo "
  \n"; echo "Date: \n"; echo "User ID: \n"; diff --git a/agc_2-X/trunk/LANG_www/vicidial_el/AST_inboundEXTstats.php b/agc_2-X/trunk/LANG_www/vicidial_el/AST_inboundEXTstats.php new file mode 100644 index 00000000..0181b547 --- /dev/null +++ b/agc_2-X/trunk/LANG_www/vicidial_el/AST_inboundEXTstats.php @@ -0,0 +1,400 @@ + 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 and view_reports='1';"; + 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_www/vicidial_el/AST_server_performance.php b/agc_2-X/trunk/LANG_www/vicidial_el/AST_server_performance.php index bbe0019e..d055cf2e 100644 --- a/agc_2-X/trunk/LANG_www/vicidial_el/AST_server_performance.php +++ b/agc_2-X/trunk/LANG_www/vicidial_el/AST_server_performance.php @@ -28,7 +28,7 @@ if (isset($_GET["ΕΠΙΒΕΒΑΙΩΣΗ"])) {$ΕΠΙΒΕΒΑΙΩΣΗ=$_GET[" $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;"; + $stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 6 and view_reports='1' and modify_servers='1';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); @@ -96,7 +96,7 @@ echo "\n"; echo "\n"; echo "\n"; echo "\n"; -echo "             ΑΝΑΦΟΡΕΣ \n"; +echo "             ΑΝΑΦΟΡΕΣ \n"; echo "\n\n"; echo "
\n";
diff --git a/agc_2-X/trunk/LANG_www/vicidial_el/AST_timeonVDAD.php b/agc_2-X/trunk/LANG_www/vicidial_el/AST_timeonVDAD.php
index 6dfadc7f..a0f5f64d 100644
--- a/agc_2-X/trunk/LANG_www/vicidial_el/AST_timeonVDAD.php
+++ b/agc_2-X/trunk/LANG_www/vicidial_el/AST_timeonVDAD.php
@@ -33,7 +33,7 @@ if (isset($_GET["closer_display"]))				{$closer_display=$_GET["closer_display"];
 $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;";
+	$stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 6 and view_reports='1';";
 	if ($DB) {echo "|$stmt|\n";}
 	$rslt=mysql_query($stmt, $link);
 	$row=mysql_fetch_row($rslt);
@@ -133,7 +133,7 @@ echo "SERVER: $server_ip\n";
 if ($closer_display>0) {$closer_display_reverse=0;   $closer_reverse_link='DEFAULT';}
 else {$closer_display_reverse=1;   $closer_reverse_link='CLOSER';}
 
-echo "VICIDIAL: Agents Time On Calls           $NOW_TIME    $closer_reverse_link | ΑΝΑΦΟΡΕΣ\n\n";
+echo "VICIDIAL: Agents Time On Calls           $NOW_TIME    $closer_reverse_link | ΑΝΑΦΟΡΕΣ\n\n";
 
 if ($closer_display>0)
 {
diff --git a/agc_2-X/trunk/LANG_www/vicidial_el/AST_timeonVDADall.php b/agc_2-X/trunk/LANG_www/vicidial_el/AST_timeonVDADall.php
index 1d3b472d..9137c9e5 100644
--- a/agc_2-X/trunk/LANG_www/vicidial_el/AST_timeonVDADall.php
+++ b/agc_2-X/trunk/LANG_www/vicidial_el/AST_timeonVDADall.php
@@ -7,7 +7,7 @@
 #
 # STOP=4000, SLOW=40, GO=4 seconds refresh interval
 # 
-# changes:
+# CHANGELOG:
 # 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
@@ -21,7 +21,11 @@
 # 61002-1642 - Added TRUNK SHORT/FILL stats
 # 61101-1318 - Added SIP and IAX Listen and Barge links option
 # 61101-1647 - Added Usergroup column and user name option as well as sorting
-# 61102-1155 - made display of columns more modular, added ability to hide server info
+# 61102-1155 - Made display of columns more modular, added ability to hide server info
+# 61215-1131 - Added answered calls and drop percent taken from answered calls
+# 70111-1600 - Added ability to use BLEND/INBND/*_C/*_B/*_I as closer campaigns
+# 70123-1151 - Added non_latin options for substr in display variables, thanks Marin Blu
+# 70206-1140 - Added call-type statuses to display(A-Auto, M-Manual, I-Inbound/Closer)
 #
 
 header ("Content-type: text/html; charset=utf-8");
@@ -113,8 +117,12 @@ $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;";
+	$stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 6 and view_reports='1';";
 	if ($DB) {echo "|$stmt|\n";}
+if ($non_latin > 0)
+{
+$rslt=mysql_query("SET NAMES 'UTF8'");
+}
 	$rslt=mysql_query($stmt, $link);
 	$row=mysql_fetch_row($rslt);
 	$auth=$row[0];
@@ -135,6 +143,10 @@ $epochSIXhoursAGO = ($STARTtime - 21600);
 $timeSIXhoursAGO = date("Y-m-d H:i:s",$epochSIXhoursAGO);
 
 $stmt="select campaign_id from vicidial_campaigns where active='Y';";
+if ($non_latin > 0)
+{
+$rslt=mysql_query("SET NAMES 'UTF8'");
+}
 $rslt=mysql_query($stmt, $link);
 if (!isset($DB))   {$DB=0;}
 if ($DB) {echo "$stmt\n";}
@@ -148,6 +160,10 @@ while ($i < $groups_to_print)
 	}
 
 $stmt="select * from vicidial_user_groups;";
+if ($non_latin > 0)
+{
+$rslt=mysql_query("SET NAMES 'UTF8'");
+}
 $rslt=mysql_query($stmt, $link);
 if (!isset($DB))   {$DB=0;}
 if ($DB) {echo "$stmt\n";}
@@ -242,18 +258,22 @@ echo "GO";
 echo "       ΤΡΟΠΟΠΟΙΗΣΗ | \n";
 echo "SUMMARY | \n";
-echo "ΑΝΑΦΟΡΕΣ \n";
+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,dial_method,adaptive_maximum_level,adaptive_dropped_percentage,adaptive_dl_diff_target,adaptive_intensity,available_only_ratio_tally,adaptive_latest_server_time,local_call_time,dial_timeout from vicidial_campaigns where campaign_id='" . mysql_real_escape_string($group) . "';"; +$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,dial_method,adaptive_maximum_level,adaptive_dropped_percentage,adaptive_dl_diff_target,adaptive_intensity,available_only_ratio_tally,adaptive_latest_server_time,local_call_time,dial_timeout,dial_statuses from vicidial_campaigns where campaign_id='" . mysql_real_escape_string($group) . "';"; if ($group=='XXXX-ALL-ACTIVE-XXXX') { - $stmt="select avg(auto_dial_level),min(dial_status_a),min(dial_status_b),min(dial_status_c),min(dial_status_d),min(dial_status_e),min(lead_order),min(lead_filter_id),sum(hopper_level),min(dial_method),avg(adaptive_maximum_level),avg(adaptive_dropped_percentage),avg(adaptive_dl_diff_target),avg(adaptive_intensity),min(available_only_ratio_tally),min(adaptive_latest_server_time),min(local_call_time),avg(dial_timeout) from vicidial_campaigns;"; + $stmt="select avg(auto_dial_level),min(dial_status_a),min(dial_status_b),min(dial_status_c),min(dial_status_d),min(dial_status_e),min(lead_order),min(lead_filter_id),sum(hopper_level),min(dial_method),avg(adaptive_maximum_level),avg(adaptive_dropped_percentage),avg(adaptive_dl_diff_target),avg(adaptive_intensity),min(available_only_ratio_tally),min(adaptive_latest_server_time),min(local_call_time),avg(dial_timeout),min(dial_statuses) from vicidial_campaigns;"; } +if ($non_latin > 0) +{ +$rslt=mysql_query("SET NAMES 'UTF8'"); +} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $DIALlev = $row[0]; @@ -274,12 +294,19 @@ $ADAavailonly = $row[14]; $TAPERtime = $row[15]; $CALLtime = $row[16]; $DIALtimeout = $row[17]; +$DIALstatuses = $row[18]; + $DIALstatuses = (preg_replace("/ -$|^ /","",$DIALstatuses)); + $DIALstatuses = (ereg_replace(' ',', ',$DIALstatuses)); $stmt="select count(*) from vicidial_hopper where campaign_id='" . mysql_real_escape_string($group) . "';"; if ($group=='XXXX-ALL-ACTIVE-XXXX') { $stmt="select count(*) from vicidial_hopper;"; } +if ($non_latin > 0) +{ +$rslt=mysql_query("SET NAMES 'UTF8'"); +} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $VDhop = $row[0]; @@ -289,6 +316,10 @@ if ($group=='XXXX-ALL-ACTIVE-XXXX') { $stmt="select sum(dialable_leads),sum(calls_today),sum(drops_today),avg(drops_answers_today_pct),avg(differential_onemin),avg(agents_average_onemin),sum(balance_trunk_fill),sum(answers_today) from vicidial_campaign_stats;"; } +if ($non_latin > 0) +{ +$rslt=mysql_query("SET NAMES 'UTF8'"); +} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $DAleads = $row[0]; @@ -311,6 +342,10 @@ if ($group=='XXXX-ALL-ACTIVE-XXXX') { $stmt="select sum(local_trunk_shortage) from vicidial_campaign_server_stats;"; } +if ($non_latin > 0) +{ +$rslt=mysql_query("SET NAMES 'UTF8'"); +} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $balanceSHORT = $row[0]; @@ -351,7 +386,7 @@ echo "
HOPPER LEVEL:  $HOPlev     DROPPED / ANSWERED:  $dropsTODAY / $answersTODAY   DL DIFF:  $diffONEMIN     STATUSES:  $DIALstatusA, $DIALstatusB, $DIALstatusC, $DIALstatusD, $DIALstatusE     STATUSES:  $DIALstatuses    
HOPPER LEVEL:  $HOPlev     DROPPED / ANSWERED:  $dropsTODAY / $answersTODAY   DL DIFF:  $diffONEMIN     STATUSES:  $DIALstatusA, $DIALstatusB, $DIALstatusC, $DIALstatusD, $DIALstatusE     STATUSES:  $DIALstatuses    
"; ################################################################################ ###### OUTBOUND CALLS ################################################################################ -if (eregi("CLOSER",$group)) +if (eregi("(CLOSER|BLEND|INBND|_C$|_B$|_I$)",$group)) { $stmt="select closer_campaigns from vicidial_campaigns where campaign_id='" . mysql_real_escape_string($group) . "';"; $rslt=mysql_query($stmt, $link); @@ -289,7 +294,7 @@ $parked_to_print = mysql_num_rows($rslt); if ($out_live > 9) {$F=''; $FG='';} if ($out_live > 14) {$F=''; $FG='';} - if (eregi("CLOSER",$group)) + if (eregi("(CLOSER|BLEND|INBND|_C$|_B$|_I$)",$group)) {echo "$NFB$out_total$NFE current active calls      \n";} else {echo "$NFB$out_total$NFE calls being placed       \n";} diff --git a/agc_2-X/trunk/LANG_www/vicidial_el/AST_timeonpark.php b/agc_2-X/trunk/LANG_www/vicidial_el/AST_timeonpark.php index 7cdfc802..aa79106a 100644 --- a/agc_2-X/trunk/LANG_www/vicidial_el/AST_timeonpark.php +++ b/agc_2-X/trunk/LANG_www/vicidial_el/AST_timeonpark.php @@ -3,6 +3,11 @@ ### ### Copyright (C) 2006 Matt Florell 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"); @@ -18,6 +23,23 @@ if (isset($_GET["submit"])) {$submit=$_GET["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 and view_reports='1';"; + 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"); $timeONEhoursAGO = ($STARTtime - 3600); @@ -67,7 +89,7 @@ echo"VICIDIAL: Time On Park\n"; echo "
\n\n";
 
-echo "VICIDIAL: Time On Park                       $NOW_TIME\n\n";
+echo "VICIDIAL: Time On Park         $NOW_TIME    ΑΝΑΦΟΡΕΣ\n\n";
 echo "+------------+-----------------+---------------------+---------+\n";
 echo "| CHANNEL    | GROUP           | START TIME          | MINUTES |\n";
 echo "+------------+-----------------+---------------------+---------+\n";
@@ -76,7 +98,7 @@ echo "+------------+-----------------+---------------------+---------+\n";
 # $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;";
+$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);
@@ -138,7 +160,7 @@ echo "| STATION    | USER   | CHANNEL    | GROUP           | START TIME
 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;";
+$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);
diff --git a/agc_2-X/trunk/LANG_www/vicidial_el/admin.php b/agc_2-X/trunk/LANG_www/vicidial_el/admin.php
index 64c433bc..a998556d 100644
--- a/agc_2-X/trunk/LANG_www/vicidial_el/admin.php
+++ b/agc_2-X/trunk/LANG_www/vicidial_el/admin.php
@@ -1,9055 +1,10739 @@
-    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["active"]))	{$active=$_GET["active"];}
-	elseif (isset($_POST["active"]))	{$active=$_POST["active"];}
-if (isset($_GET["adaptive_dl_diff_target"]))	{$adaptive_dl_diff_target=$_GET["adaptive_dl_diff_target"];}
-	elseif (isset($_POST["adaptive_dl_diff_target"]))	{$adaptive_dl_diff_target=$_POST["adaptive_dl_diff_target"];}
-if (isset($_GET["adaptive_dropped_percentage"]))	{$adaptive_dropped_percentage=$_GET["adaptive_dropped_percentage"];}
-	elseif (isset($_POST["adaptive_dropped_percentage"])){$adaptive_dropped_percentage=$_POST["adaptive_dropped_percentage"];}
-if (isset($_GET["adaptive_intensity"]))	{$adaptive_intensity=$_GET["adaptive_intensity"];}
-	elseif (isset($_POST["adaptive_intensity"]))	{$adaptive_intensity=$_POST["adaptive_intensity"];}
-if (isset($_GET["adaptive_latest_server_time"]))	{$adaptive_latest_server_time=$_GET["adaptive_latest_server_time"];}
-	elseif (isset($_POST["adaptive_latest_server_time"])){$adaptive_latest_server_time=$_POST["adaptive_latest_server_time"];}
-if (isset($_GET["adaptive_maximum_level"]))	{$adaptive_maximum_level=$_GET["adaptive_maximum_level"];}
-	elseif (isset($_POST["adaptive_maximum_level"]))	{$adaptive_maximum_level=$_POST["adaptive_maximum_level"];}
-if (isset($_GET["ADD"]))	{$ADD=$_GET["ADD"];}
-	elseif (isset($_POST["ADD"]))	{$ADD=$_POST["ADD"];}
-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["AFLogging_enabled"]))	{$AFLogging_enabled=$_GET["AFLogging_enabled"];}
-	elseif (isset($_POST["AFLogging_enabled"]))	{$AFLogging_enabled=$_POST["AFLogging_enabled"];}
-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["agentcall_manual"]))	{$agentcall_manual=$_GET["agentcall_manual"];}
-	elseif (isset($_POST["agentcall_manual"]))	{$agentcall_manual=$_POST["agentcall_manual"];}
-if (isset($_GET["agentonly_callbacks"]))	{$agentonly_callbacks=$_GET["agentonly_callbacks"];}
-	elseif (isset($_POST["agentonly_callbacks"]))	{$agentonly_callbacks=$_POST["agentonly_callbacks"];}
-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["agi_output"]))	{$agi_output=$_GET["agi_output"];}
-	elseif (isset($_POST["agi_output"]))	{$agi_output=$_POST["agi_output"];}
-if (isset($_GET["allcalls_delay"]))	{$allcalls_delay=$_GET["allcalls_delay"];}
-	elseif (isset($_POST["allcalls_delay"]))	{$allcalls_delay=$_POST["allcalls_delay"];}
-if (isset($_GET["allow_closers"]))	{$allow_closers=$_GET["allow_closers"];}
-	elseif (isset($_POST["allow_closers"]))	{$allow_closers=$_POST["allow_closers"];}
-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["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["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["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["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["asterisk_version"]))	{$asterisk_version=$_GET["asterisk_version"];}
-	elseif (isset($_POST["asterisk_version"]))	{$asterisk_version=$_POST["asterisk_version"];}
-if (isset($_GET["ASTmgrSECRET"]))	{$ASTmgrSECRET=$_GET["ASTmgrSECRET"];}
-	elseif (isset($_POST["ASTmgrSECRET"]))	{$ASTmgrSECRET=$_POST["ASTmgrSECRET"];}
-if (isset($_GET["ASTmgrUSERNAME"]))	{$ASTmgrUSERNAME=$_GET["ASTmgrUSERNAME"];}
-	elseif (isset($_POST["ASTmgrUSERNAME"]))	{$ASTmgrUSERNAME=$_POST["ASTmgrUSERNAME"];}
-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["ASTmgrUSERNAMEupdate"]))	{$ASTmgrUSERNAMEupdate=$_GET["ASTmgrUSERNAMEupdate"];}
-	elseif (isset($_POST["ASTmgrUSERNAMEupdate"]))	{$ASTmgrUSERNAMEupdate=$_POST["ASTmgrUSERNAMEupdate"];}
-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($_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["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["available_only_ratio_tally"]))	{$available_only_ratio_tally=$_GET["available_only_ratio_tally"];}
-	elseif (isset($_POST["available_only_ratio_tally"])){$available_only_ratio_tally=$_POST["available_only_ratio_tally"];}
-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["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["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["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["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["campaign_cid"]))	{$campaign_cid=$_GET["campaign_cid"];}
-	elseif (isset($_POST["campaign_cid"]))	{$campaign_cid=$_POST["campaign_cid"];}
-if (isset($_GET["campaign_detail"]))	{$campaign_detail=$_GET["campaign_detail"];}
-	elseif (isset($_POST["campaign_detail"]))	{$campaign_detail=$_POST["campaign_detail"];}
-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["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_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["campaign_recording"]))	{$campaign_recording=$_GET["campaign_recording"];}
-	elseif (isset($_POST["campaign_recording"]))	{$campaign_recording=$_POST["campaign_recording"];}
-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["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["client_browser"]))	{$client_browser=$_GET["client_browser"];}
-	elseif (isset($_POST["client_browser"]))	{$client_browser=$_POST["client_browser"];}
-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["company"]))	{$company=$_GET["company"];}
-	elseif (isset($_POST["company"]))	{$company=$_POST["company"];}
-if (isset($_GET["computer_ip"]))	{$computer_ip=$_GET["computer_ip"];}
-	elseif (isset($_POST["computer_ip"]))	{$computer_ip=$_POST["computer_ip"];}
-if (isset($_GET["conf_exten"]))	{$conf_exten=$_GET["conf_exten"];}
-	elseif (isset($_POST["conf_exten"]))	{$conf_exten=$_POST["conf_exten"];}
-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["conferencing_enabled"]))	{$conferencing_enabled=$_GET["conferencing_enabled"];}
-	elseif (isset($_POST["conferencing_enabled"]))	{$conferencing_enabled=$_POST["conferencing_enabled"];}
-if (isset($_GET["CoNfIrM"]))	{$CoNfIrM=$_GET["CoNfIrM"];}
-	elseif (isset($_POST["CoNfIrM"]))	{$CoNfIrM=$_POST["CoNfIrM"];}
-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_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_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_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["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_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_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["DBX_database"]))	{$DBX_database=$_GET["DBX_database"];}
-	elseif (isset($_POST["DBX_database"]))	{$DBX_database=$_POST["DBX_database"];}
-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["DBX_server"]))	{$DBX_server=$_GET["DBX_server"];}
-	elseif (isset($_POST["DBX_server"]))	{$DBX_server=$_POST["DBX_server"];}
-if (isset($_GET["DBX_user"]))	{$DBX_user=$_GET["DBX_user"];}
-	elseif (isset($_POST["DBX_user"]))	{$DBX_user=$_POST["DBX_user"];}
-if (isset($_GET["DBY_database"]))	{$DBY_database=$_GET["DBY_database"];}
-	elseif (isset($_POST["DBY_database"]))	{$DBY_database=$_POST["DBY_database"];}
-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["DBY_server"]))	{$DBY_server=$_GET["DBY_server"];}
-	elseif (isset($_POST["DBY_server"]))	{$DBY_server=$_POST["DBY_server"];}
-if (isset($_GET["DBY_user"]))	{$DBY_user=$_GET["DBY_user"];}
-	elseif (isset($_POST["DBY_user"]))	{$DBY_user=$_POST["DBY_user"];}
-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["delete_campaigns"]))	{$delete_campaigns=$_GET["delete_campaigns"];}
-	elseif (isset($_POST["delete_campaigns"]))	{$delete_campaigns=$_POST["delete_campaigns"];}
-if (isset($_GET["delete_filters"]))	{$delete_filters=$_GET["delete_filters"];}
-	elseif (isset($_POST["delete_filters"]))	{$delete_filters=$_POST["delete_filters"];}
-if (isset($_GET["delete_ingroups"]))	{$delete_ingroups=$_GET["delete_ingroups"];}
-	elseif (isset($_POST["delete_ingroups"]))	{$delete_ingroups=$_POST["delete_ingroups"];}
-if (isset($_GET["delete_lists"]))	{$delete_lists=$_GET["delete_lists"];}
-	elseif (isset($_POST["delete_lists"]))	{$delete_lists=$_POST["delete_lists"];}
-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["delete_scripts"]))	{$delete_scripts=$_GET["delete_scripts"];}
-	elseif (isset($_POST["delete_scripts"]))	{$delete_scripts=$_POST["delete_scripts"];}
-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_users"]))	{$delete_users=$_GET["delete_users"];}
-	elseif (isset($_POST["delete_users"]))	{$delete_users=$_POST["delete_users"];}
-if (isset($_GET["dial_method"]))	{$dial_method=$_GET["dial_method"];}
-	elseif (isset($_POST["dial_method"]))	{$dial_method=$_POST["dial_method"];}
-if (isset($_GET["dial_prefix"]))	{$dial_prefix=$_GET["dial_prefix"];}
-	elseif (isset($_POST["dial_prefix"]))	{$dial_prefix=$_POST["dial_prefix"];}
-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["dial_timeout"]))	{$dial_timeout=$_GET["dial_timeout"];}
-	elseif (isset($_POST["dial_timeout"]))	{$dial_timeout=$_POST["dial_timeout"];}
-if (isset($_GET["dialplan_number"]))	{$dialplan_number=$_GET["dialplan_number"];}
-	elseif (isset($_POST["dialplan_number"]))	{$dialplan_number=$_POST["dialplan_number"];}
-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["drop_exten"]))	{$drop_exten=$_GET["drop_exten"];}
-	elseif (isset($_POST["drop_exten"]))	{$drop_exten=$_POST["drop_exten"];}
-if (isset($_GET["drop_message"]))	{$drop_message=$_GET["drop_message"];}
-	elseif (isset($_POST["drop_message"]))	{$drop_message=$_POST["drop_message"];}
-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["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["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["ext_context"]))	{$ext_context=$_GET["ext_context"];}
-	elseif (isset($_POST["ext_context"]))	{$ext_context=$_POST["ext_context"];}
-if (isset($_GET["extension"]))	{$extension=$_GET["extension"];}
-	elseif (isset($_POST["extension"]))	{$extension=$_POST["extension"];}
-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["force_logout"]))	{$force_logout=$_GET["force_logout"];}
-	elseif (isset($_POST["force_logout"]))	{$force_logout=$_POST["force_logout"];}
-if (isset($_GET["fronter_display"]))	{$fronter_display=$_GET["fronter_display"];}
-	elseif (isset($_POST["fronter_display"]))	{$fronter_display=$_POST["fronter_display"];}
-if (isset($_GET["full_name"]))	{$full_name=$_GET["full_name"];}
-	elseif (isset($_POST["full_name"]))	{$full_name=$_POST["full_name"];}
-if (isset($_GET["fullname"]))	{$fullname=$_GET["fullname"];}
-	elseif (isset($_POST["fullname"]))	{$fullname=$_POST["fullname"];}
-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["group_color"]))	{$group_color=$_GET["group_color"];}
-	elseif (isset($_POST["group_color"]))	{$group_color=$_POST["group_color"];}
-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["groups"]))	{$groups=$_GET["groups"];}
-	elseif (isset($_POST["groups"]))	{$groups=$_POST["groups"];}
-if (isset($_GET["HKstatus"]))	{$HKstatus=$_GET["HKstatus"];}
-	elseif (isset($_POST["HKstatus"]))	{$HKstatus=$_POST["HKstatus"];}
-if (isset($_GET["hopper_level"]))	{$hopper_level=$_GET["hopper_level"];}
-	elseif (isset($_POST["hopper_level"]))	{$hopper_level=$_POST["hopper_level"];}
-if (isset($_GET["hotkey"]))	{$hotkey=$_GET["hotkey"];}
-	elseif (isset($_POST["hotkey"]))	{$hotkey=$_POST["hotkey"];}
-if (isset($_GET["hotkeys_active"]))	{$hotkeys_active=$_GET["hotkeys_active"];}
-	elseif (isset($_POST["hotkeys_active"]))	{$hotkeys_active=$_POST["hotkeys_active"];}
-if (isset($_GET["install_directory"]))	{$install_directory=$_GET["install_directory"];}
-	elseif (isset($_POST["install_directory"]))	{$install_directory=$_POST["install_directory"];}
-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_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_sql"]))	{$lead_filter_sql=$_GET["lead_filter_sql"];}
-	elseif (isset($_POST["lead_filter_sql"]))	{$lead_filter_sql=$_POST["lead_filter_sql"];}
-if (isset($_GET["lead_order"]))	{$lead_order=$_GET["lead_order"];}
-	elseif (isset($_POST["lead_order"]))	{$lead_order=$_POST["lead_order"];}
-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["load_leads"]))	{$load_leads=$_GET["load_leads"];}
-	elseif (isset($_POST["load_leads"]))	{$load_leads=$_POST["load_leads"];}
-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["local_gmt"]))	{$local_gmt=$_GET["local_gmt"];}
-	elseif (isset($_POST["local_gmt"]))	{$local_gmt=$_POST["local_gmt"];}
-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["login"]))	{$login=$_GET["login"];}
-	elseif (isset($_POST["login"]))	{$login=$_POST["login"];}
-if (isset($_GET["login_campaign"]))	{$login_campaign=$_GET["login_campaign"];}
-	elseif (isset($_POST["login_campaign"]))	{$login_campaign=$_POST["login_campaign"];}
-if (isset($_GET["login_pass"]))	{$login_pass=$_GET["login_pass"];}
-	elseif (isset($_POST["login_pass"]))	{$login_pass=$_POST["login_pass"];}
-if (isset($_GET["login_user"]))	{$login_user=$_GET["login_user"];}
-	elseif (isset($_POST["login_user"]))	{$login_user=$_POST["login_user"];}
-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["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["modify_leads"]))	{$modify_leads=$_GET["modify_leads"];}
-	elseif (isset($_POST["modify_leads"]))	{$modify_leads=$_POST["modify_leads"];}
-if (isset($_GET["monitor_prefix"]))	{$monitor_prefix=$_GET["monitor_prefix"];}
-	elseif (isset($_POST["monitor_prefix"]))	{$monitor_prefix=$_POST["monitor_prefix"];}
-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["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["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["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["old_extension"]))	{$old_extension=$_GET["old_extension"];}
-	elseif (isset($_POST["old_extension"]))	{$old_extension=$_POST["old_extension"];}
-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["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["OLDuser_group"]))	{$OLDuser_group=$_GET["OLDuser_group"];}
-	elseif (isset($_POST["OLDuser_group"]))	{$OLDuser_group=$_POST["OLDuser_group"];}
-if (isset($_GET["omit_phone_code"]))	{$omit_phone_code=$_GET["omit_phone_code"];}
-	elseif (isset($_POST["omit_phone_code"]))	{$omit_phone_code=$_POST["omit_phone_code"];}
-if (isset($_GET["outbound_cid"]))	{$outbound_cid=$_GET["outbound_cid"];}
-	elseif (isset($_POST["outbound_cid"]))	{$outbound_cid=$_POST["outbound_cid"];}
-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["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["pass"]))	{$pass=$_GET["pass"];}
-	elseif (isset($_POST["pass"]))	{$pass=$_POST["pass"];}
-if (isset($_GET["phone_ip"]))	{$phone_ip=$_GET["phone_ip"];}
-	elseif (isset($_POST["phone_ip"]))	{$phone_ip=$_POST["phone_ip"];}
-if (isset($_GET["phone_login"]))	{$phone_login=$_GET["phone_login"];}
-	elseif (isset($_POST["phone_login"]))	{$phone_login=$_POST["phone_login"];}
-if (isset($_GET["phone_number"]))	{$phone_number=$_GET["phone_number"];}
-	elseif (isset($_POST["phone_number"]))	{$phone_number=$_POST["phone_number"];}
-if (isset($_GET["phone_pass"]))	{$phone_pass=$_GET["phone_pass"];}
-	elseif (isset($_POST["phone_pass"]))	{$phone_pass=$_POST["phone_pass"];}
-if (isset($_GET["phone_type"]))	{$phone_type=$_GET["phone_type"];}
-	elseif (isset($_POST["phone_type"]))	{$phone_type=$_POST["phone_type"];}
-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["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["recording_exten"]))	{$recording_exten=$_GET["recording_exten"];}
-	elseif (isset($_POST["recording_exten"]))	{$recording_exten=$_POST["recording_exten"];}
-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["reset_hopper"]))	{$reset_hopper=$_GET["reset_hopper"];}
-	elseif (isset($_POST["reset_hopper"]))	{$reset_hopper=$_POST["reset_hopper"];}
-if (isset($_GET["reset_list"]))	{$reset_list=$_GET["reset_list"];}
-	elseif (isset($_POST["reset_list"]))	{$reset_list=$_POST["reset_list"];}
-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["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["scheduled_callbacks"]))	{$scheduled_callbacks=$_GET["scheduled_callbacks"];}
-	elseif (isset($_POST["scheduled_callbacks"]))	{$scheduled_callbacks=$_POST["scheduled_callbacks"];}
-if (isset($_GET["script_comments"]))	{$script_comments=$_GET["script_comments"];}
-	elseif (isset($_POST["script_comments"]))	{$script_comments=$_POST["script_comments"];}
-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_text"]))	{$script_text=$_GET["script_text"];}
-	elseif (isset($_POST["script_text"]))	{$script_text=$_POST["script_text"];}
-if (isset($_GET["selectable"]))	{$selectable=$_GET["selectable"];}
-	elseif (isset($_POST["selectable"]))	{$selectable=$_POST["selectable"];}
-if (isset($_GET["server_description"]))	{$server_description=$_GET["server_description"];}
-	elseif (isset($_POST["server_description"]))	{$server_description=$_POST["server_description"];}
-if (isset($_GET["server_id"]))	{$server_id=$_GET["server_id"];}
-	elseif (isset($_POST["server_id"]))	{$server_id=$_POST["server_id"];}
-if (isset($_GET["server_ip"]))	{$server_ip=$_GET["server_ip"];}
-	elseif (isset($_POST["server_ip"]))	{$server_ip=$_POST["server_ip"];}
-if (isset($_GET["stage"]))	{$stage=$_GET["stage"];}
-	elseif (isset($_POST["stage"]))	{$stage=$_POST["stage"];}
-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["status"]))	{$status=$_GET["status"];}
-	elseif (isset($_POST["status"]))	{$status=$_POST["status"];}
-if (isset($_GET["status_name"]))	{$status_name=$_GET["status_name"];}
-	elseif (isset($_POST["status_name"]))	{$status_name=$_POST["status_name"];}
-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["sys_perf_log"]))	{$sys_perf_log=$_GET["sys_perf_log"];}
-	elseif (isset($_POST["sys_perf_log"]))	{$sys_perf_log=$_POST["sys_perf_log"];}
-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["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["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["user"]))	{$user=$_GET["user"];}
-	elseif (isset($_POST["user"]))	{$user=$_POST["user"];}
-if (isset($_GET["user_group"]))	{$user_group=$_GET["user_group"];}
-	elseif (isset($_POST["user_group"]))	{$user_group=$_POST["user_group"];}
-if (isset($_GET["user_level"]))	{$user_level=$_GET["user_level"];}
-	elseif (isset($_POST["user_level"]))	{$user_level=$_POST["user_level"];}
-if (isset($_GET["user_start"]))	{$user_start=$_GET["user_start"];}
-	elseif (isset($_POST["user_start"]))	{$user_start=$_POST["user_start"];}
-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["vd_server_logs"]))	{$vd_server_logs=$_GET["vd_server_logs"];}
-	elseif (isset($_POST["vd_server_logs"]))	{$vd_server_logs=$_POST["vd_server_logs"];}
-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["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["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["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["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["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["voicemail_ext"]))	{$voicemail_ext=$_GET["voicemail_ext"];}
-	elseif (isset($_POST["voicemail_ext"]))	{$voicemail_ext=$_POST["voicemail_ext"];}
-if (isset($_GET["voicemail_exten"]))	{$voicemail_exten=$_GET["voicemail_exten"];}
-	elseif (isset($_POST["voicemail_exten"]))	{$voicemail_exten=$_POST["voicemail_exten"];}
-if (isset($_GET["voicemail_id"]))	{$voicemail_id=$_GET["voicemail_id"];}
-	elseif (isset($_POST["voicemail_id"]))	{$voicemail_id=$_POST["voicemail_id"];}
-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["wrapup_message"]))	{$wrapup_message=$_GET["wrapup_message"];}
-	elseif (isset($_POST["wrapup_message"]))	{$wrapup_message=$_POST["wrapup_message"];}
-if (isset($_GET["wrapup_seconds"]))	{$wrapup_seconds=$_GET["wrapup_seconds"];}
-	elseif (isset($_POST["wrapup_seconds"]))	{$wrapup_seconds=$_POST["wrapup_seconds"];}
-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["vicidial_balance_active"]))	{$vicidial_balance_active=$_GET["vicidial_balance_active"];}
-	elseif (isset($_POST["vicidial_balance_active"]))	{$vicidial_balance_active=$_POST["vicidial_balance_active"];}
-if (isset($_GET["balance_trunks_offlimits"]))	{$balance_trunks_offlimits=$_GET["balance_trunks_offlimits"];}
-	elseif (isset($_POST["balance_trunks_offlimits"]))	{$balance_trunks_offlimits=$_POST["balance_trunks_offlimits"];}
-if (isset($_GET["dedicated_trunks"]))	{$dedicated_trunks=$_GET["dedicated_trunks"];}
-	elseif (isset($_POST["dedicated_trunks"]))	{$dedicated_trunks=$_POST["dedicated_trunks"];}
-if (isset($_GET["trunk_restriction"]))	{$trunk_restriction=$_GET["trunk_restriction"];}
-	elseif (isset($_POST["trunk_restriction"]))	{$trunk_restriction=$_POST["trunk_restriction"];}
-if (isset($_GET["campaigns"]))	{$campaigns=$_GET["campaigns"];}
-	elseif (isset($_POST["campaigns"]))	{$campaigns=$_POST["campaigns"];}
-
-
-
-
-	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 ###
-$adaptive_dropped_percentage = ereg_replace("[^0-9]","",$adaptive_dropped_percentage);
-$adaptive_latest_server_time = ereg_replace("[^0-9]","",$adaptive_latest_server_time);
-$admin_hangup_enabled = ereg_replace("[^0-9]","",$admin_hangup_enabled);
-$admin_hijack_enabled = ereg_replace("[^0-9]","",$admin_hijack_enabled);
-$admin_monitor_enabled = ereg_replace("[^0-9]","",$admin_monitor_enabled);
-$AFLogging_enabled = ereg_replace("[^0-9]","",$AFLogging_enabled);
-$agent_choose_ingroups = ereg_replace("[^0-9]","",$agent_choose_ingroups);
-$agentcall_manual = ereg_replace("[^0-9]","",$agentcall_manual);
-$agentonly_callbacks = ereg_replace("[^0-9]","",$agentonly_callbacks);
-$AGI_call_logging_enabled = ereg_replace("[^0-9]","",$AGI_call_logging_enabled);
-$allcalls_delay = ereg_replace("[^0-9]","",$allcalls_delay);
-$alter_agent_interface_options = ereg_replace("[^0-9]","",$alter_agent_interface_options);
-$am_message_exten = ereg_replace("[^0-9]","",$am_message_exten);
-$answer_transfer_agent = ereg_replace("[^0-9]","",$answer_transfer_agent);
-$ast_admin_access = ereg_replace("[^0-9]","",$ast_admin_access);
-$ast_delete_phones = ereg_replace("[^0-9]","",$ast_delete_phones);
-$attempt_delay = ereg_replace("[^0-9]","",$attempt_delay);
-$attempt_maximum = ereg_replace("[^0-9]","",$attempt_maximum);
-$auto_dial_next_number = ereg_replace("[^0-9]","",$auto_dial_next_number);
-$balance_trunks_offlimits = ereg_replace("[^0-9]","",$balance_trunks_offlimits);
-$call_parking_enabled = ereg_replace("[^0-9]","",$call_parking_enabled);
-$CallerID_popup_enabled = ereg_replace("[^0-9]","",$CallerID_popup_enabled);
-$campaign_detail = ereg_replace("[^0-9]","",$campaign_detail);
-$campaign_rec_exten = ereg_replace("[^0-9]","",$campaign_rec_exten);
-$campaign_vdad_exten = ereg_replace("[^0-9]","",$campaign_vdad_exten);
-$change_agent_campaign = ereg_replace("[^0-9]","",$change_agent_campaign);
-$closer_default_blended = ereg_replace("[^0-9]","",$closer_default_blended);
-$conf_exten = ereg_replace("[^0-9]","",$conf_exten);
-$conf_on_extension = ereg_replace("[^0-9]","",$conf_on_extension);
-$conferencing_enabled = ereg_replace("[^0-9]","",$conferencing_enabled);
-$ct_default_start = ereg_replace("[^0-9]","",$ct_default_start);
-$ct_default_stop = ereg_replace("[^0-9]","",$ct_default_stop);
-$ct_friday_start = ereg_replace("[^0-9]","",$ct_friday_start);
-$ct_friday_stop = ereg_replace("[^0-9]","",$ct_friday_stop);
-$ct_monday_start = ereg_replace("[^0-9]","",$ct_monday_start);
-$ct_monday_stop = ereg_replace("[^0-9]","",$ct_monday_stop);
-$ct_saturday_start = ereg_replace("[^0-9]","",$ct_saturday_start);
-$ct_saturday_stop = ereg_replace("[^0-9]","",$ct_saturday_stop);
-$ct_sunday_start = ereg_replace("[^0-9]","",$ct_sunday_start);
-$ct_sunday_stop = ereg_replace("[^0-9]","",$ct_sunday_stop);
-$ct_thursday_start = ereg_replace("[^0-9]","",$ct_thursday_start);
-$ct_thursday_stop = ereg_replace("[^0-9]","",$ct_thursday_stop);
-$ct_tuesday_start = ereg_replace("[^0-9]","",$ct_tuesday_start);
-$ct_tuesday_stop = ereg_replace("[^0-9]","",$ct_tuesday_stop);
-$ct_wednesday_start = ereg_replace("[^0-9]","",$ct_wednesday_start);
-$ct_wednesday_stop = ereg_replace("[^0-9]","",$ct_wednesday_stop);
-$DBX_port = ereg_replace("[^0-9]","",$DBX_port);
-$DBY_port = ereg_replace("[^0-9]","",$DBY_port);
-$dedicated_trunks = ereg_replace("[^0-9]","",$dedicated_trunks);
-$delete_call_times = ereg_replace("[^0-9]","",$delete_call_times);
-$delete_campaigns = ereg_replace("[^0-9]","",$delete_campaigns);
-$delete_filters = ereg_replace("[^0-9]","",$delete_filters);
-$delete_ingroups = ereg_replace("[^0-9]","",$delete_ingroups);
-$delete_lists = ereg_replace("[^0-9]","",$delete_lists);
-$delete_remote_agents = ereg_replace("[^0-9]","",$delete_remote_agents);
-$delete_scripts = ereg_replace("[^0-9]","",$delete_scripts);
-$delete_user_groups = ereg_replace("[^0-9]","",$delete_user_groups);
-$delete_users = ereg_replace("[^0-9]","",$delete_users);
-$dial_timeout = ereg_replace("[^0-9]","",$dial_timeout);
-$dialplan_number = ereg_replace("[^0-9]","",$dialplan_number);
-$drop_call_seconds = ereg_replace("[^0-9]","",$drop_call_seconds);
-$drop_exten = ereg_replace("[^0-9]","",$drop_exten);
-$enable_fast_refresh = ereg_replace("[^0-9]","",$enable_fast_refresh);
-$enable_persistant_mysql = ereg_replace("[^0-9]","",$enable_persistant_mysql);
-$fast_refresh_rate = ereg_replace("[^0-9]","",$fast_refresh_rate);
-$hopper_level = ereg_replace("[^0-9]","",$hopper_level);
-$hotkey = ereg_replace("[^0-9]","",$hotkey);
-$hotkeys_active = ereg_replace("[^0-9]","",$hotkeys_active);
-$list_id = ereg_replace("[^0-9]","",$list_id);
-$load_leads = ereg_replace("[^0-9]","",$delete_call_times);
-$max_vicidial_trunks = ereg_replace("[^0-9]","",$max_vicidial_trunks);
-$modify_call_times = ereg_replace("[^0-9]","",$modify_call_times);
-$modify_leads = ereg_replace("[^0-9]","",$modify_leads);
-$monitor_prefix = ereg_replace("[^0-9]","",$monitor_prefix);
-$number_of_lines = ereg_replace("[^0-9]","",$number_of_lines);
-$old_conf_exten = ereg_replace("[^0-9]","",$old_conf_exten);
-$outbound_cid = ereg_replace("[^0-9]","",$outbound_cid);
-$park_ext = ereg_replace("[^0-9]","",$park_ext);
-$park_on_extension = ereg_replace("[^0-9]","",$park_on_extension);
-$phone_number = ereg_replace("[^0-9]","",$phone_number);
-$QUEUE_ACTION_enabled = ereg_replace("[^0-9]","",$QUEUE_ACTION_enabled);
-$recording_exten = ereg_replace("[^0-9]","",$recording_exten);
-$remote_agent_id = ereg_replace("[^0-9]","",$remote_agent_id);
-$safe_harbor_exten = ereg_replace("[^0-9]","",$safe_harbor_exten);
-$telnet_port = ereg_replace("[^0-9]","",$telnet_port);
-$updater_check_enabled = ereg_replace("[^0-9]","",$updater_check_enabled);
-$user_level = ereg_replace("[^0-9]","",$user_level);
-$user_start = ereg_replace("[^0-9]","",$user_start);
-$user_switching_enabled = ereg_replace("[^0-9]","",$user_switching_enabled);
-$VDstop_rec_after_each_call = ereg_replace("[^0-9]","",$VDstop_rec_after_each_call);
-$VICIDIAL_park_on_extension = ereg_replace("[^0-9]","",$VICIDIAL_park_on_extension);
-$vicidial_recording = ereg_replace("[^0-9]","",$vicidial_recording);
-$vicidial_transfers = ereg_replace("[^0-9]","",$vicidial_transfers);
-$voicemail_button_enabled = ereg_replace("[^0-9]","",$voicemail_button_enabled);
-$voicemail_dump_exten = ereg_replace("[^0-9]","",$voicemail_dump_exten);
-$voicemail_ext = ereg_replace("[^0-9]","",$voicemail_ext);
-$voicemail_exten = ereg_replace("[^0-9]","",$voicemail_exten);
-$voicemail_id = ereg_replace("[^0-9]","",$voicemail_id);
-$wrapup_seconds = ereg_replace("[^0-9]","",$wrapup_seconds);
-
-### 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);
-$omit_phone_code = ereg_replace("[^NY]","",$omit_phone_code);
-$available_only_ratio_tally = ereg_replace("[^NY]","",$available_only_ratio_tally);
-$sys_perf_log = ereg_replace("[^NY]","",$sys_perf_log);
-$vicidial_balance_active = ereg_replace("[^NY]","",$vicidial_balance_active);
-$vd_server_logs = ereg_replace("[^NY]","",$vd_server_logs);
-
-### ALPHA-NUMERIC ONLY ###
-$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);
-$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);
-$adaptive_maximum_level = ereg_replace("[^\.0-9]","",$adaptive_maximum_level);
-$phone_ip = ereg_replace("[^\.0-9]","",$phone_ip);
-$old_server_ip = ereg_replace("[^\.0-9]","",$old_server_ip);
-$computer_ip = ereg_replace("[^\.0-9]","",$computer_ip);
-
-### ALPHA-NUMERIC and spaces and hash and star and comma
-$xferconf_a_dtmf = ereg_replace("[^ \,\*\#0-9a-zA-Z]","",$xferconf_a_dtmf);
-$xferconf_b_dtmf = ereg_replace("[^ \,\*\#0-9a-zA-Z]","",$xferconf_b_dtmf);
-
-### ALPHACAPS-NUMERIC
-$xferconf_a_number = ereg_replace("[^0-9A-Z]","",$xferconf_a_number);
-$xferconf_b_number = ereg_replace("[^0-9A-Z]","",$xferconf_b_number);
-
-### ALPHA-NUMERIC and underscore and dash
-$agi_output = ereg_replace("[^-\_0-9a-zA-Z]","",$agi_output);
-$ASTmgrSECRET = ereg_replace("[^-\_0-9a-zA-Z]","",$ASTmgrSECRET);
-$ASTmgrUSERNAME = ereg_replace("[^-\_0-9a-zA-Z]","",$ASTmgrUSERNAME);
-$ASTmgrUSERNAMElisten = ereg_replace("[^-\_0-9a-zA-Z]","",$ASTmgrUSERNAMElisten);
-$ASTmgrUSERNAMEsend = ereg_replace("[^-\_0-9a-zA-Z]","",$ASTmgrUSERNAMEsend);
-$ASTmgrUSERNAMEupdate = ereg_replace("[^-\_0-9a-zA-Z]","",$ASTmgrUSERNAMEupdate);
-$call_time_id = ereg_replace("[^-\_0-9a-zA-Z]","",$call_time_id);
-$campaign_id = ereg_replace("[^-\_0-9a-zA-Z]","",$campaign_id);
-$CoNfIrM = ereg_replace("[^-\_0-9a-zA-Z]","",$CoNfIrM);
-$DBX_database = ereg_replace("[^-\_0-9a-zA-Z]","",$DBX_database);
-$DBX_pass = ereg_replace("[^-\_0-9a-zA-Z]","",$DBX_pass);
-$DBX_user = ereg_replace("[^-\_0-9a-zA-Z]","",$DBX_user);
-$DBY_database = ereg_replace("[^-\_0-9a-zA-Z]","",$DBY_database);
-$DBY_pass = ereg_replace("[^-\_0-9a-zA-Z]","",$DBY_pass);
-$DBY_user = ereg_replace("[^-\_0-9a-zA-Z]","",$DBY_user);
-$dial_method = ereg_replace("[^-\_0-9a-zA-Z]","",$dial_method);
-$dial_status_a = ereg_replace("[^-\_0-9a-zA-Z]","",$dial_status_a);
-$dial_status_b = ereg_replace("[^-\_0-9a-zA-Z]","",$dial_status_b);
-$dial_status_c = ereg_replace("[^-\_0-9a-zA-Z]","",$dial_status_c);
-$dial_status_d = ereg_replace("[^-\_0-9a-zA-Z]","",$dial_status_d);
-$dial_status_e = ereg_replace("[^-\_0-9a-zA-Z]","",$dial_status_e);
-$ext_context = ereg_replace("[^-\_0-9a-zA-Z]","",$ext_context);
-$group_id = ereg_replace("[^-\_0-9a-zA-Z]","",$group_id);
-$lead_filter_id = ereg_replace("[^-\_0-9a-zA-Z]","",$lead_filter_id);
-$local_call_time = ereg_replace("[^-\_0-9a-zA-Z]","",$local_call_time);
-$login = ereg_replace("[^-\_0-9a-zA-Z]","",$login);
-$login_campaign = ereg_replace("[^-\_0-9a-zA-Z]","",$login_campaign);
-$login_pass = ereg_replace("[^-\_0-9a-zA-Z]","",$login_pass);
-$login_user = ereg_replace("[^-\_0-9a-zA-Z]","",$login_user);
-$next_agent_call = ereg_replace("[^-\_0-9a-zA-Z]","",$next_agent_call);
-$old_campaign_id = ereg_replace("[^-\_0-9a-zA-Z]","",$old_campaign_id);
-$old_server_id = ereg_replace("[^-\_0-9a-zA-Z]","",$old_server_id);
-$OLDuser_group = ereg_replace("[^-\_0-9a-zA-Z]","",$OLDuser_group);
-$park_file_name = ereg_replace("[^-\_0-9a-zA-Z]","",$park_file_name);
-$pass = ereg_replace("[^-\_0-9a-zA-Z]","",$pass);
-$phone_login = ereg_replace("[^-\_0-9a-zA-Z]","",$phone_login);
-$phone_pass = ereg_replace("[^-\_0-9a-zA-Z]","",$phone_pass);
-$PHP_AUTH_PW = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_PW);
-$PHP_AUTH_USER = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_USER);
-$protocol = ereg_replace("[^-\_0-9a-zA-Z]","",$protocol);
-$server_id = ereg_replace("[^-\_0-9a-zA-Z]","",$server_id);
-$stage = ereg_replace("[^-\_0-9a-zA-Z]","",$stage);
-$state_rule = ereg_replace("[^-\_0-9a-zA-Z]","",$state_rule);
-$status = ereg_replace("[^-\_0-9a-zA-Z]","",$status);
-$trunk_restriction = ereg_replace("[^-\_0-9a-zA-Z]","",$trunk_restriction);
-$user = ereg_replace("[^-\_0-9a-zA-Z]","",$user);
-$user_group = ereg_replace("[^-\_0-9a-zA-Z]","",$user_group);
-$VICIDIAL_park_on_filename = ereg_replace("[^-\_0-9a-zA-Z]","",$VICIDIAL_park_on_filename);
-
-### 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
-$adaptive_dl_diff_target = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$adaptive_dl_diff_target);
-$adaptive_intensity = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$adaptive_intensity);
-$asterisk_version = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$asterisk_version);
-$call_time_comments = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$call_time_comments);
-$call_time_name = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$call_time_name);
-$campaign_name = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$campaign_name);
-$campaign_rec_filename = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$campaign_rec_filename);
-$company = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$company);
-$full_name = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$full_name);
-$fullname = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$fullname);
-$group_name = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$group_name);
-$HKstatus = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$HKstatus);
-$lead_filter_comments = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$lead_filter_comments);
-$lead_filter_name = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$lead_filter_name);
-$list_name = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$list_name);
-$local_gmt = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$local_gmt);
-$phone_type = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$phone_type);
-$picture = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$picture);
-$script_comments = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$script_comments);
-$script_name = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$script_name);
-$server_description = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$server_description);
-$status = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$status);
-$status_name = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$status_name);
-$wrapup_message = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$wrapup_message);
-
-### ALPHA-NUMERIC and underscore and dash and slash and at and dot
-$call_out_number_group = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$call_out_number_group);
-$client_browser = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$client_browser);
-$DBX_server = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$DBX_server);
-$DBY_server = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$DBY_server);
-$dtmf_send_extension = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$dtmf_send_extension);
-$extension = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$extension);
-$install_directory = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$install_directory);
-$old_extension = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$old_extension);
-$telnet_host = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$telnet_host);
-
-### remove semi-colons ###
-$lead_filter_sql = ereg_replace(";","",$lead_filter_sql);
-
-### VARIABLES TO BE mysql_real_escape_string ###
-# $web_form_address
-
-### VARIABLES not filtered at all ###
-# $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
-# 60808-1147 - changed filtering for and added instructions for consutative transfers
-# 60816-1552 - added allcalls_delay start delay for recordings in vicidial.php
-# 60817-2226 - fixed bug that would not allow lead recycling of non-selectable statuses
-# 60821-1543 - added option to Omit Phone Code while dialing in vicidial
-# 60821-1625 - added ALLFORCE recording option for campaign_recording
-# 60823-1154 - added fields for adaptive dialing
-# 60824-1326 - added adaptive_latest_target_gmt for ADAPT_TAPERED dial method
-# 60825-1205 - added adaptive_intensity for ADAPT_ dial methods
-# 60828-1019 - changed adaptive_latest_target_gmt to adaptive_latest_server_time
-# 60828-1115 - added adaptive_dl_diff_target and changed intensity dropdown
-# 60927-1246 - added astguiclient/admin.php functions under SERVERS tab
-# 61002-1402 - added fields for vicidial balance trunk controls
-# 61003-1123 - added functions for vicidial_server_trunks records
-# 61109-1022 - added Emergency VDAC Jam Clear function to Campaign Detail screen
-# 61110-1502 - add ability to select NONE in dial statuses, new list_id must not be < 100
-# 61122-1228 - added user group campaign restrictions
-# 61122-1535 - changed script_text to unfiltered and added more variables to SCRIPTS
-# 61129-1028 - Added headers to Users and Phones with clickable order-by titles
-#
-
-# 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 = '2.0.73';
-$build = '61129-1028';
-
-$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];
-			$LOGuser_group				=$row[5];
-			$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];
-			$LOGast_admin_access		=$row[16];
-			$LOGast_delete_phones		=$row[17];
-			$LOGdelete_scripts			=$row[18];
-			$LOGdelete_filters			=$row[29];
-			$LOGalter_agent_interface	=$row[30];
-			$LOGdelete_call_times		=$row[32];
-			$LOGmodify_call_times		=$row[33];
-
-			$stmt="SELECT allowed_campaigns from vicidial_user_groups where user_group='$LOGuser_group';";
-			$rslt=mysql_query($stmt, $link);
-			$row=mysql_fetch_row($rslt);
-			$LOGallowed_campaigns		=$row[0];
-
-		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==11111111111)	{$hh='server';		echo "ΠΡΟΣΘΕΣΕ ΝΕΟ ΤΗΛΕΦΩΝΟ";}
-if ($ADD==111111111111)	{$hh='server';		echo "ΠΡΟΣΘΕΣΕ ΝΕΟ ΔΙΑΚΟΜΙΣΤΗ";}
-if ($ADD==1111111111111)	{$hh='server';		echo "ΠΡΟΣΘΕΣΕ ΝΕΑ ΣΥΝΔΙΑΛΕΞΗ";}
-if ($ADD==11111111111111)	{$hh='server';		echo "ADD NEW VICIDIAL CONFERENCE";}
-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==21111111111)	{$hh='server';		echo "ΠΡΟΣΘΗΚΗ ΝΕΟΥ ΤΗΛΕΦΩΝΟΥ";}
-if ($ADD==211111111111)	{$hh='server';		echo "ΠΡΟΣΘΗΚΗ ΝΕΟΥ ΔΙΑΚΟΜΙΣΤΗ";}
-if ($ADD==221111111111)	{$hh='server';		echo "ΠΡΟΣΘΕΤΕΙ ΝΕΑ ΕΓΓΡΑΦΗ ΕΞΥΠΗΡΕΤΗΤΗ ΚΟΡΜΟΥ";}
-if ($ADD==2111111111111)	{$hh='server';		echo "ΠΡΟΣΘΗΚΗ ΝΕΑΣ ΣΥΝΔΙΑΛΕΞΗΣ";}
-if ($ADD==21111111111111)	{$hh='server';		echo "ADDING NEW VICIDIAL CONFERENCE";}
-if ($ADD==3)			{$hh='users';		echo "Τροποποίηση Χρήστη";}
-if ($ADD==30)			{$hh='campaigns';	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==31111111111)	{$hh='server';		echo "ΤΡΟΠΟΠΟΙΗΣΕ ΤΗΛΕΦΩΝΟ";}
-if ($ADD==311111111111)	{$hh='server';		echo "ΤΡΟΠΟΠΟΙΗΣΕ ΔΙΑΚΟΜΙΣΤΗ";}
-if ($ADD==3111111111111)	{$hh='server';		echo "ΤΡΟΠΟΠΟΙΗΣΕ ΣΥΝΔΙΑΛΕΞΗ";}
-if ($ADD==31111111111111)	{$hh='server';		echo "MODIFY VICIDIAL CONFERENCE";}
-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==41111111111)	{$hh='server';		echo "ΤΡΟΠΟΠΟΙΗΣΕ ΤΗΛΕΦΩΝΟ";}
-if ($ADD==411111111111)	{$hh='server';		echo "ΤΡΟΠΟΠΟΙΗΣΕ ΔΙΑΚΟΜΙΣΤΗ";}
-if ($ADD==421111111111)	{$hh='server';		echo "ΤΡΟΠΟΠΟΙΗΣΗ ΕΓΓΡΑΦΗΣ ΕΞΥΠΗΡΕΤΗΤΗ ΚΟΡΜΟΥ";}
-if ($ADD==4111111111111)	{$hh='server';		echo "ΤΡΟΠΟΠΟΙΗΣΕ ΣΥΝΔΙΑΛΕΞΗ";}
-if ($ADD==41111111111111)	{$hh='server';		echo "MODIFY VICIDIAL CONFERENCE";}
-if ($ADD==5)			{$hh='users';		echo "Delete User";}
-if ($ADD==51)			{$hh='campaigns';	echo "Delete Εκστρατεία";}
-if ($ADD==52)			{$hh='campaigns';	echo "Αποσυνδεμένοι Χειριστές";}
-if ($ADD==53)			{$hh='campaigns';	echo "έκτακτης ανάγκης καθαρισμού VDAC";}
-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==51111111111)	{$hh='server';		echo "DELETE PHONE";}
-if ($ADD==511111111111)	{$hh='server';		echo "DELETE SERVER";}
-if ($ADD==5111111111111)	{$hh='server';		echo "DELETE CONFERENCE";}
-if ($ADD==51111111111111)	{$hh='server';		echo "DELETE VICIDIAL CONFERENCE";}
-if ($ADD==6)			{$hh='users';		echo "Delete User";}
-if ($ADD==61)			{$hh='campaigns';	echo "Delete Εκστρατεία";}
-if ($ADD==62)			{$hh='campaigns';	echo "Αποσυνδεμένοι Χειριστές";}
-if ($ADD==63)			{$hh='campaigns';	echo "έκτακτης ανάγκης καθαρισμού VDAC";}
-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==61111111111)	{$hh='server';		echo "DELETE PHONE";}
-if ($ADD==611111111111)	{$hh='server';		echo "DELETE SERVER";}
-if ($ADD==621111111111)	{$hh='server';		echo "ΔΙΑΓΡΑΦΗ ΕΓΓΡΑΦΗΣ ΕΞΥΠΗΡΕΤΗΤΗ ΚΟΡΜΟΥ";}
-if ($ADD==6111111111111)	{$hh='server';		echo "DELETE CONFERENCE";}
-if ($ADD==61111111111111)	{$hh='server';		echo "DELETE VICIDIAL CONFERENCE";}
-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==10000000000)	{$hh='server';		echo "ΛΙΣΤΑ ΤΗΛΕΦΩΝΟΥ";}
-if ($ADD==100000000000)	{$hh='server';		echo "ΛΙΣΤΑ ΔΙΑΚΟΜΙΣΤΗ";}
-if ($ADD==1000000000000)	{$hh='server';		echo "ΛΙΣΤΑ ΣΥΝΔΙΑΛΕΞΕΩΝ";}
-if ($ADD==10000000000000)	{$hh='server';		echo "VICIDIAL ΛΙΣΤΑ ΣΥΝΔΙΑΛΕΞΕΩΝ";}
-if ($ADD==55)			{$hh='users';		echo "Φόρμα Αναζήτησης";}
-if ($ADD==551)			{$hh='users';		echo "ΑΝΑΖΗΤΗΣΗ ΤΗΛΕΦΩΝΩΝ";}
-if ($ADD==66)			{$hh='users';		echo "Αποτελέσματα Αναζήτησης";}
-if ($ADD==661)			{$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") or (strlen($ADD)==12) )
-	{
-	##### 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++;
-		}
-
-	##### BEGIN 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 .= " -";}
-	}
-	##### END get inbound groups listing for checkboxes #####
-
-
-	##### BEGIN get campaigns listing for checkboxes #####
-	if ( ($ADD==211111) or ($ADD==311111) or ($ADD==411111) or ($ADD==511111) or ($ADD==611111) )
-	{
-		if ( ($ADD==211111) or ($ADD==311111) or ($ADD==511111) or ($ADD==611111) )
-		{
-		$stmt="SELECT allowed_campaigns from vicidial_user_groups where user_group='$user_group';";
-		$rslt=mysql_query($stmt, $link);
-		$row=mysql_fetch_row($rslt);
-		$allowed_campaigns =	$row[0];
-		$allowed_campaigns = preg_replace("/ -$/","",$allowed_campaigns);
-		$campaigns = explode(" ", $allowed_campaigns);
-		echo "<!--  $allowed_campaigns -->";
-		}
-
-	$campaigns_value='';
-	$campaigns_list='<B><input type="checkbox" name="campaigns[]" value="-ALL-CAMPAIGNS-"';
-		$p=0;
-		while ($p<100)
-			{
-			if (eregi('ALL-CAMPAIGNS',$campaigns[$p])) 
-				{
-				$campaigns_list.=" CHECKED";
-				$campaigns_value .= " -ALL-CAMPAIGNS- -";
-				}
-			$p++;
-			}
-	$campaigns_list.="> ALL-CAMPAIGNS - ΟΙ ΧΡΗΣΤΕΣ ΜΠΟΡΟΥΝ ΝΑ ΔΟΥΝ ΟΠΟΙΑΔΗΠΟΤΕ ΕΚΣΤΡΑΤΕΙΑ</B><BR>\n";
-
-	$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);
-
-	$o=0;
-	while ($campaigns_to_print > $o)
-		{
-		$rowx=mysql_fetch_row($rslt);
-		$campaign_id_value = $rowx[0];
-		$campaign_name_value = $rowx[1];
-		$campaigns_list .= "<input type=\"checkbox\" name=\"campaigns[]\" value=\"$campaign_id_value\"";
-		$p=0;
-		while ($p<100)
-			{
-			if ($campaign_id_value == $campaigns[$p]) 
-				{
-			#	echo "<!--  X $p|$campaign_id_value|$campaigns[$p]| -->";
-				$campaigns_list .= " CHECKED";
-				$campaigns_value .= " $campaign_id_value";
-				}
-		#	echo "<!--  O $p|$campaign_id_value|$campaigns[$p]| -->";
-			$p++;
-			}
-		$campaigns_list .= "> $campaign_id_value - $campaign_name_value<BR>\n";
-		$o++;
-		}
-	if (strlen($campaigns_value)>2) {$campaigns_value .= " -";}
-	}
-	##### END get campaigns listing for checkboxes #####
-
-
-	if ( (strlen($ADD)==11) or (strlen($ADD)>12) )
-	{
-	##### 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++;
-		}
-	}
-
-
-
-$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";echo "\n";?> -
-
ΔΙΑΧΕΙΡΙΣΗ: ΒΟΗΘΕΙΑ


\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_CAMPAIGNS ΠΙΝΑΚΑΣ

-
-
-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 θα τρέξει. - -
-
-
+ LICENSE: GPLv2 +# + + +require("dbconnect.php"); + +$page_width='750'; +$section_width='700'; +$header_font_size='3'; +$subheader_font_size='2'; +$header_selected_bold=''; +$header_nonselected_bold=''; +$users_color = '#FFFF99'; +$campaigns_color = '#FFCC99'; +$lists_color = '#FFCCCC'; +$ingroups_color = '#CC99FF'; +$remoteagent_color ='#CCFFCC'; +$usergroups_color = '#CCFFFF'; +$scripts_color = '#99FFCC'; +$filters_color = '#CCCCCC'; +$admin_color = '#FF99FF'; +$reports_color = '#99FF33'; +#$users_color = '#FFFF99'; +#$campaigns_color = '#FFFF99'; +#$lists_color = '#FFFF99'; +#$ingroups_color = '#FFFF99'; +#$remoteagent_color ='#FFFF99'; +#$usergroups_color = '#FFFF99'; +#$scripts_color = '#FFFF99'; +#$filters_color = '#FFFF99'; +#$admin_color = '#FFFF99'; +#$reports_color = '#FFFF99'; + $times_color = '#CCCC00'; + $phones_color = '#CCCC00'; + $conference_color = '#CCCC00'; + $server_color = '#CCCC00'; + $settings_color = '#CCCC00'; +$users_font = 'BLACK'; +$campaigns_font = 'BLACK'; +$lists_font = 'BLACK'; +$ingroups_font = 'BLACK'; +$remoteagent_font = 'BLACK'; +$usergroups_font = 'BLACK'; +$scripts_font = 'BLACK'; +$filters_font = 'BLACK'; +$admin_font = 'BLACK'; +$reports_font = 'BLACK'; + $times_font = 'BLACK'; + $phones_font = 'BLACK'; + $conference_font = 'BLACK'; + $server_font = 'BLACK'; + $settings_font = 'BLACK'; + +$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; +$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; +$PHP_SELF=$_SERVER['PHP_SELF']; + +if (isset($_GET["DB"])) {$DB=$_GET["DB"];} + elseif (isset($_POST["DB"])) {$DB=$_POST["DB"];} +if (isset($_GET["active"])) {$active=$_GET["active"];} + elseif (isset($_POST["active"])) {$active=$_POST["active"];} +if (isset($_GET["adaptive_dl_diff_target"])) {$adaptive_dl_diff_target=$_GET["adaptive_dl_diff_target"];} + elseif (isset($_POST["adaptive_dl_diff_target"])) {$adaptive_dl_diff_target=$_POST["adaptive_dl_diff_target"];} +if (isset($_GET["adaptive_dropped_percentage"])) {$adaptive_dropped_percentage=$_GET["adaptive_dropped_percentage"];} + elseif (isset($_POST["adaptive_dropped_percentage"])){$adaptive_dropped_percentage=$_POST["adaptive_dropped_percentage"];} +if (isset($_GET["adaptive_intensity"])) {$adaptive_intensity=$_GET["adaptive_intensity"];} + elseif (isset($_POST["adaptive_intensity"])) {$adaptive_intensity=$_POST["adaptive_intensity"];} +if (isset($_GET["adaptive_latest_server_time"])) {$adaptive_latest_server_time=$_GET["adaptive_latest_server_time"];} + elseif (isset($_POST["adaptive_latest_server_time"])){$adaptive_latest_server_time=$_POST["adaptive_latest_server_time"];} +if (isset($_GET["adaptive_maximum_level"])) {$adaptive_maximum_level=$_GET["adaptive_maximum_level"];} + elseif (isset($_POST["adaptive_maximum_level"])) {$adaptive_maximum_level=$_POST["adaptive_maximum_level"];} +if (isset($_GET["ADD"])) {$ADD=$_GET["ADD"];} + elseif (isset($_POST["ADD"])) {$ADD=$_POST["ADD"];} +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["AFLogging_enabled"])) {$AFLogging_enabled=$_GET["AFLogging_enabled"];} + elseif (isset($_POST["AFLogging_enabled"])) {$AFLogging_enabled=$_POST["AFLogging_enabled"];} +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["agentcall_manual"])) {$agentcall_manual=$_GET["agentcall_manual"];} + elseif (isset($_POST["agentcall_manual"])) {$agentcall_manual=$_POST["agentcall_manual"];} +if (isset($_GET["agentonly_callbacks"])) {$agentonly_callbacks=$_GET["agentonly_callbacks"];} + elseif (isset($_POST["agentonly_callbacks"])) {$agentonly_callbacks=$_POST["agentonly_callbacks"];} +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["agi_output"])) {$agi_output=$_GET["agi_output"];} + elseif (isset($_POST["agi_output"])) {$agi_output=$_POST["agi_output"];} +if (isset($_GET["allcalls_delay"])) {$allcalls_delay=$_GET["allcalls_delay"];} + elseif (isset($_POST["allcalls_delay"])) {$allcalls_delay=$_POST["allcalls_delay"];} +if (isset($_GET["allow_closers"])) {$allow_closers=$_GET["allow_closers"];} + elseif (isset($_POST["allow_closers"])) {$allow_closers=$_POST["allow_closers"];} +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["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["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["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["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["asterisk_version"])) {$asterisk_version=$_GET["asterisk_version"];} + elseif (isset($_POST["asterisk_version"])) {$asterisk_version=$_POST["asterisk_version"];} +if (isset($_GET["ASTmgrSECRET"])) {$ASTmgrSECRET=$_GET["ASTmgrSECRET"];} + elseif (isset($_POST["ASTmgrSECRET"])) {$ASTmgrSECRET=$_POST["ASTmgrSECRET"];} +if (isset($_GET["ASTmgrUSERNAME"])) {$ASTmgrUSERNAME=$_GET["ASTmgrUSERNAME"];} + elseif (isset($_POST["ASTmgrUSERNAME"])) {$ASTmgrUSERNAME=$_POST["ASTmgrUSERNAME"];} +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["ASTmgrUSERNAMEupdate"])) {$ASTmgrUSERNAMEupdate=$_GET["ASTmgrUSERNAMEupdate"];} + elseif (isset($_POST["ASTmgrUSERNAMEupdate"])) {$ASTmgrUSERNAMEupdate=$_POST["ASTmgrUSERNAMEupdate"];} +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($_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["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["available_only_ratio_tally"])) {$available_only_ratio_tally=$_GET["available_only_ratio_tally"];} + elseif (isset($_POST["available_only_ratio_tally"])){$available_only_ratio_tally=$_POST["available_only_ratio_tally"];} +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["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["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["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["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["campaign_cid"])) {$campaign_cid=$_GET["campaign_cid"];} + elseif (isset($_POST["campaign_cid"])) {$campaign_cid=$_POST["campaign_cid"];} +if (isset($_GET["campaign_detail"])) {$campaign_detail=$_GET["campaign_detail"];} + elseif (isset($_POST["campaign_detail"])) {$campaign_detail=$_POST["campaign_detail"];} +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["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_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["campaign_recording"])) {$campaign_recording=$_GET["campaign_recording"];} + elseif (isset($_POST["campaign_recording"])) {$campaign_recording=$_POST["campaign_recording"];} +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["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["client_browser"])) {$client_browser=$_GET["client_browser"];} + elseif (isset($_POST["client_browser"])) {$client_browser=$_POST["client_browser"];} +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["company"])) {$company=$_GET["company"];} + elseif (isset($_POST["company"])) {$company=$_POST["company"];} +if (isset($_GET["computer_ip"])) {$computer_ip=$_GET["computer_ip"];} + elseif (isset($_POST["computer_ip"])) {$computer_ip=$_POST["computer_ip"];} +if (isset($_GET["conf_exten"])) {$conf_exten=$_GET["conf_exten"];} + elseif (isset($_POST["conf_exten"])) {$conf_exten=$_POST["conf_exten"];} +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["conferencing_enabled"])) {$conferencing_enabled=$_GET["conferencing_enabled"];} + elseif (isset($_POST["conferencing_enabled"])) {$conferencing_enabled=$_POST["conferencing_enabled"];} +if (isset($_GET["CoNfIrM"])) {$CoNfIrM=$_GET["CoNfIrM"];} + elseif (isset($_POST["CoNfIrM"])) {$CoNfIrM=$_POST["CoNfIrM"];} +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_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_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_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["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_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_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["DBX_database"])) {$DBX_database=$_GET["DBX_database"];} + elseif (isset($_POST["DBX_database"])) {$DBX_database=$_POST["DBX_database"];} +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["DBX_server"])) {$DBX_server=$_GET["DBX_server"];} + elseif (isset($_POST["DBX_server"])) {$DBX_server=$_POST["DBX_server"];} +if (isset($_GET["DBX_user"])) {$DBX_user=$_GET["DBX_user"];} + elseif (isset($_POST["DBX_user"])) {$DBX_user=$_POST["DBX_user"];} +if (isset($_GET["DBY_database"])) {$DBY_database=$_GET["DBY_database"];} + elseif (isset($_POST["DBY_database"])) {$DBY_database=$_POST["DBY_database"];} +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["DBY_server"])) {$DBY_server=$_GET["DBY_server"];} + elseif (isset($_POST["DBY_server"])) {$DBY_server=$_POST["DBY_server"];} +if (isset($_GET["DBY_user"])) {$DBY_user=$_GET["DBY_user"];} + elseif (isset($_POST["DBY_user"])) {$DBY_user=$_POST["DBY_user"];} +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["delete_campaigns"])) {$delete_campaigns=$_GET["delete_campaigns"];} + elseif (isset($_POST["delete_campaigns"])) {$delete_campaigns=$_POST["delete_campaigns"];} +if (isset($_GET["delete_filters"])) {$delete_filters=$_GET["delete_filters"];} + elseif (isset($_POST["delete_filters"])) {$delete_filters=$_POST["delete_filters"];} +if (isset($_GET["delete_ingroups"])) {$delete_ingroups=$_GET["delete_ingroups"];} + elseif (isset($_POST["delete_ingroups"])) {$delete_ingroups=$_POST["delete_ingroups"];} +if (isset($_GET["delete_lists"])) {$delete_lists=$_GET["delete_lists"];} + elseif (isset($_POST["delete_lists"])) {$delete_lists=$_POST["delete_lists"];} +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["delete_scripts"])) {$delete_scripts=$_GET["delete_scripts"];} + elseif (isset($_POST["delete_scripts"])) {$delete_scripts=$_POST["delete_scripts"];} +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_users"])) {$delete_users=$_GET["delete_users"];} + elseif (isset($_POST["delete_users"])) {$delete_users=$_POST["delete_users"];} +if (isset($_GET["dial_method"])) {$dial_method=$_GET["dial_method"];} + elseif (isset($_POST["dial_method"])) {$dial_method=$_POST["dial_method"];} +if (isset($_GET["dial_prefix"])) {$dial_prefix=$_GET["dial_prefix"];} + elseif (isset($_POST["dial_prefix"])) {$dial_prefix=$_POST["dial_prefix"];} +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["dial_timeout"])) {$dial_timeout=$_GET["dial_timeout"];} + elseif (isset($_POST["dial_timeout"])) {$dial_timeout=$_POST["dial_timeout"];} +if (isset($_GET["dialplan_number"])) {$dialplan_number=$_GET["dialplan_number"];} + elseif (isset($_POST["dialplan_number"])) {$dialplan_number=$_POST["dialplan_number"];} +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["drop_exten"])) {$drop_exten=$_GET["drop_exten"];} + elseif (isset($_POST["drop_exten"])) {$drop_exten=$_POST["drop_exten"];} +if (isset($_GET["drop_message"])) {$drop_message=$_GET["drop_message"];} + elseif (isset($_POST["drop_message"])) {$drop_message=$_POST["drop_message"];} +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["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["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["ext_context"])) {$ext_context=$_GET["ext_context"];} + elseif (isset($_POST["ext_context"])) {$ext_context=$_POST["ext_context"];} +if (isset($_GET["extension"])) {$extension=$_GET["extension"];} + elseif (isset($_POST["extension"])) {$extension=$_POST["extension"];} +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["force_logout"])) {$force_logout=$_GET["force_logout"];} + elseif (isset($_POST["force_logout"])) {$force_logout=$_POST["force_logout"];} +if (isset($_GET["fronter_display"])) {$fronter_display=$_GET["fronter_display"];} + elseif (isset($_POST["fronter_display"])) {$fronter_display=$_POST["fronter_display"];} +if (isset($_GET["full_name"])) {$full_name=$_GET["full_name"];} + elseif (isset($_POST["full_name"])) {$full_name=$_POST["full_name"];} +if (isset($_GET["fullname"])) {$fullname=$_GET["fullname"];} + elseif (isset($_POST["fullname"])) {$fullname=$_POST["fullname"];} +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["group_color"])) {$group_color=$_GET["group_color"];} + elseif (isset($_POST["group_color"])) {$group_color=$_POST["group_color"];} +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["groups"])) {$groups=$_GET["groups"];} + elseif (isset($_POST["groups"])) {$groups=$_POST["groups"];} +if (isset($_GET["HKstatus"])) {$HKstatus=$_GET["HKstatus"];} + elseif (isset($_POST["HKstatus"])) {$HKstatus=$_POST["HKstatus"];} +if (isset($_GET["hopper_level"])) {$hopper_level=$_GET["hopper_level"];} + elseif (isset($_POST["hopper_level"])) {$hopper_level=$_POST["hopper_level"];} +if (isset($_GET["hotkey"])) {$hotkey=$_GET["hotkey"];} + elseif (isset($_POST["hotkey"])) {$hotkey=$_POST["hotkey"];} +if (isset($_GET["hotkeys_active"])) {$hotkeys_active=$_GET["hotkeys_active"];} + elseif (isset($_POST["hotkeys_active"])) {$hotkeys_active=$_POST["hotkeys_active"];} +if (isset($_GET["install_directory"])) {$install_directory=$_GET["install_directory"];} + elseif (isset($_POST["install_directory"])) {$install_directory=$_POST["install_directory"];} +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_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_sql"])) {$lead_filter_sql=$_GET["lead_filter_sql"];} + elseif (isset($_POST["lead_filter_sql"])) {$lead_filter_sql=$_POST["lead_filter_sql"];} +if (isset($_GET["lead_order"])) {$lead_order=$_GET["lead_order"];} + elseif (isset($_POST["lead_order"])) {$lead_order=$_POST["lead_order"];} +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["load_leads"])) {$load_leads=$_GET["load_leads"];} + elseif (isset($_POST["load_leads"])) {$load_leads=$_POST["load_leads"];} +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["local_gmt"])) {$local_gmt=$_GET["local_gmt"];} + elseif (isset($_POST["local_gmt"])) {$local_gmt=$_POST["local_gmt"];} +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["login"])) {$login=$_GET["login"];} + elseif (isset($_POST["login"])) {$login=$_POST["login"];} +if (isset($_GET["login_campaign"])) {$login_campaign=$_GET["login_campaign"];} + elseif (isset($_POST["login_campaign"])) {$login_campaign=$_POST["login_campaign"];} +if (isset($_GET["login_pass"])) {$login_pass=$_GET["login_pass"];} + elseif (isset($_POST["login_pass"])) {$login_pass=$_POST["login_pass"];} +if (isset($_GET["login_user"])) {$login_user=$_GET["login_user"];} + elseif (isset($_POST["login_user"])) {$login_user=$_POST["login_user"];} +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["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["modify_leads"])) {$modify_leads=$_GET["modify_leads"];} + elseif (isset($_POST["modify_leads"])) {$modify_leads=$_POST["modify_leads"];} +if (isset($_GET["monitor_prefix"])) {$monitor_prefix=$_GET["monitor_prefix"];} + elseif (isset($_POST["monitor_prefix"])) {$monitor_prefix=$_POST["monitor_prefix"];} +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["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["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["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["old_extension"])) {$old_extension=$_GET["old_extension"];} + elseif (isset($_POST["old_extension"])) {$old_extension=$_POST["old_extension"];} +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["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["OLDuser_group"])) {$OLDuser_group=$_GET["OLDuser_group"];} + elseif (isset($_POST["OLDuser_group"])) {$OLDuser_group=$_POST["OLDuser_group"];} +if (isset($_GET["omit_phone_code"])) {$omit_phone_code=$_GET["omit_phone_code"];} + elseif (isset($_POST["omit_phone_code"])) {$omit_phone_code=$_POST["omit_phone_code"];} +if (isset($_GET["outbound_cid"])) {$outbound_cid=$_GET["outbound_cid"];} + elseif (isset($_POST["outbound_cid"])) {$outbound_cid=$_POST["outbound_cid"];} +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["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["pass"])) {$pass=$_GET["pass"];} + elseif (isset($_POST["pass"])) {$pass=$_POST["pass"];} +if (isset($_GET["phone_ip"])) {$phone_ip=$_GET["phone_ip"];} + elseif (isset($_POST["phone_ip"])) {$phone_ip=$_POST["phone_ip"];} +if (isset($_GET["phone_login"])) {$phone_login=$_GET["phone_login"];} + elseif (isset($_POST["phone_login"])) {$phone_login=$_POST["phone_login"];} +if (isset($_GET["phone_number"])) {$phone_number=$_GET["phone_number"];} + elseif (isset($_POST["phone_number"])) {$phone_number=$_POST["phone_number"];} +if (isset($_GET["phone_pass"])) {$phone_pass=$_GET["phone_pass"];} + elseif (isset($_POST["phone_pass"])) {$phone_pass=$_POST["phone_pass"];} +if (isset($_GET["phone_type"])) {$phone_type=$_GET["phone_type"];} + elseif (isset($_POST["phone_type"])) {$phone_type=$_POST["phone_type"];} +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["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["recording_exten"])) {$recording_exten=$_GET["recording_exten"];} + elseif (isset($_POST["recording_exten"])) {$recording_exten=$_POST["recording_exten"];} +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["reset_hopper"])) {$reset_hopper=$_GET["reset_hopper"];} + elseif (isset($_POST["reset_hopper"])) {$reset_hopper=$_POST["reset_hopper"];} +if (isset($_GET["reset_list"])) {$reset_list=$_GET["reset_list"];} + elseif (isset($_POST["reset_list"])) {$reset_list=$_POST["reset_list"];} +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["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["scheduled_callbacks"])) {$scheduled_callbacks=$_GET["scheduled_callbacks"];} + elseif (isset($_POST["scheduled_callbacks"])) {$scheduled_callbacks=$_POST["scheduled_callbacks"];} +if (isset($_GET["script_comments"])) {$script_comments=$_GET["script_comments"];} + elseif (isset($_POST["script_comments"])) {$script_comments=$_POST["script_comments"];} +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_text"])) {$script_text=$_GET["script_text"];} + elseif (isset($_POST["script_text"])) {$script_text=$_POST["script_text"];} +if (isset($_GET["selectable"])) {$selectable=$_GET["selectable"];} + elseif (isset($_POST["selectable"])) {$selectable=$_POST["selectable"];} +if (isset($_GET["server_description"])) {$server_description=$_GET["server_description"];} + elseif (isset($_POST["server_description"])) {$server_description=$_POST["server_description"];} +if (isset($_GET["server_id"])) {$server_id=$_GET["server_id"];} + elseif (isset($_POST["server_id"])) {$server_id=$_POST["server_id"];} +if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} + elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} +if (isset($_GET["stage"])) {$stage=$_GET["stage"];} + elseif (isset($_POST["stage"])) {$stage=$_POST["stage"];} +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["status"])) {$status=$_GET["status"];} + elseif (isset($_POST["status"])) {$status=$_POST["status"];} +if (isset($_GET["status_name"])) {$status_name=$_GET["status_name"];} + elseif (isset($_POST["status_name"])) {$status_name=$_POST["status_name"];} +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["sys_perf_log"])) {$sys_perf_log=$_GET["sys_perf_log"];} + elseif (isset($_POST["sys_perf_log"])) {$sys_perf_log=$_POST["sys_perf_log"];} +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["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["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["user"])) {$user=$_GET["user"];} + elseif (isset($_POST["user"])) {$user=$_POST["user"];} +if (isset($_GET["user_group"])) {$user_group=$_GET["user_group"];} + elseif (isset($_POST["user_group"])) {$user_group=$_POST["user_group"];} +if (isset($_GET["user_level"])) {$user_level=$_GET["user_level"];} + elseif (isset($_POST["user_level"])) {$user_level=$_POST["user_level"];} +if (isset($_GET["user_start"])) {$user_start=$_GET["user_start"];} + elseif (isset($_POST["user_start"])) {$user_start=$_POST["user_start"];} +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["vd_server_logs"])) {$vd_server_logs=$_GET["vd_server_logs"];} + elseif (isset($_POST["vd_server_logs"])) {$vd_server_logs=$_POST["vd_server_logs"];} +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["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["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["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["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["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["voicemail_ext"])) {$voicemail_ext=$_GET["voicemail_ext"];} + elseif (isset($_POST["voicemail_ext"])) {$voicemail_ext=$_POST["voicemail_ext"];} +if (isset($_GET["voicemail_exten"])) {$voicemail_exten=$_GET["voicemail_exten"];} + elseif (isset($_POST["voicemail_exten"])) {$voicemail_exten=$_POST["voicemail_exten"];} +if (isset($_GET["voicemail_id"])) {$voicemail_id=$_GET["voicemail_id"];} + elseif (isset($_POST["voicemail_id"])) {$voicemail_id=$_POST["voicemail_id"];} +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["wrapup_message"])) {$wrapup_message=$_GET["wrapup_message"];} + elseif (isset($_POST["wrapup_message"])) {$wrapup_message=$_POST["wrapup_message"];} +if (isset($_GET["wrapup_seconds"])) {$wrapup_seconds=$_GET["wrapup_seconds"];} + elseif (isset($_POST["wrapup_seconds"])) {$wrapup_seconds=$_POST["wrapup_seconds"];} +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["vicidial_balance_active"])) {$vicidial_balance_active=$_GET["vicidial_balance_active"];} + elseif (isset($_POST["vicidial_balance_active"])) {$vicidial_balance_active=$_POST["vicidial_balance_active"];} +if (isset($_GET["balance_trunks_offlimits"])) {$balance_trunks_offlimits=$_GET["balance_trunks_offlimits"];} + elseif (isset($_POST["balance_trunks_offlimits"])) {$balance_trunks_offlimits=$_POST["balance_trunks_offlimits"];} +if (isset($_GET["dedicated_trunks"])) {$dedicated_trunks=$_GET["dedicated_trunks"];} + elseif (isset($_POST["dedicated_trunks"])) {$dedicated_trunks=$_POST["dedicated_trunks"];} +if (isset($_GET["trunk_restriction"])) {$trunk_restriction=$_GET["trunk_restriction"];} + elseif (isset($_POST["trunk_restriction"])) {$trunk_restriction=$_POST["trunk_restriction"];} +if (isset($_GET["campaigns"])) {$campaigns=$_GET["campaigns"];} + elseif (isset($_POST["campaigns"])) {$campaigns=$_POST["campaigns"];} +if (isset($_GET["dial_level_override"])) {$dial_level_override=$_GET["dial_level_override"];} + elseif (isset($_POST["dial_level_override"])) {$dial_level_override=$_POST["dial_level_override"];} +if (isset($_GET["concurrent_transfers"])) {$concurrent_transfers=$_GET["concurrent_transfers"];} + elseif (isset($_POST["concurrent_transfers"])) {$concurrent_transfers=$_POST["concurrent_transfers"];} +if (isset($_GET["auto_alt_dial"])) {$auto_alt_dial=$_GET["auto_alt_dial"];} + elseif (isset($_POST["auto_alt_dial"])) {$auto_alt_dial=$_POST["auto_alt_dial"];} +if (isset($_GET["modify_users"])) {$modify_users=$_GET["modify_users"];} + elseif (isset($_POST["modify_users"])) {$modify_users=$_POST["modify_users"];} +if (isset($_GET["modify_campaigns"])) {$modify_campaigns=$_GET["modify_campaigns"];} + elseif (isset($_POST["modify_campaigns"])) {$modify_campaigns=$_POST["modify_campaigns"];} +if (isset($_GET["modify_lists"])) {$modify_lists=$_GET["modify_lists"];} + elseif (isset($_POST["modify_lists"])) {$modify_lists=$_POST["modify_lists"];} +if (isset($_GET["modify_scripts"])) {$modify_scripts=$_GET["modify_scripts"];} + elseif (isset($_POST["modify_scripts"])) {$modify_scripts=$_POST["modify_scripts"];} +if (isset($_GET["modify_filters"])) {$modify_filters=$_GET["modify_filters"];} + elseif (isset($_POST["modify_filters"])) {$modify_filters=$_POST["modify_filters"];} +if (isset($_GET["modify_ingroups"])) {$modify_ingroups=$_GET["modify_ingroups"];} + elseif (isset($_POST["modify_ingroups"])) {$modify_ingroups=$_POST["modify_ingroups"];} +if (isset($_GET["modify_usergroups"])) {$modify_usergroups=$_GET["modify_usergroups"];} + elseif (isset($_POST["modify_usergroups"])) {$modify_usergroups=$_POST["modify_usergroups"];} +if (isset($_GET["modify_remoteagents"])) {$modify_remoteagents=$_GET["modify_remoteagents"];} + elseif (isset($_POST["modify_remoteagents"])) {$modify_remoteagents=$_POST["modify_remoteagents"];} +if (isset($_GET["modify_servers"])) {$modify_servers=$_GET["modify_servers"];} + elseif (isset($_POST["modify_servers"])) {$modify_servers=$_POST["modify_servers"];} +if (isset($_GET["view_reports"])) {$view_reports=$_GET["view_reports"];} + elseif (isset($_POST["view_reports"])) {$view_reports=$_POST["view_reports"];} +if (isset($_GET["agent_pause_codes_active"])) {$agent_pause_codes_active=$_GET["agent_pause_codes_active"];} + elseif (isset($_POST["agent_pause_codes_active"])) {$agent_pause_codes_active=$_POST["agent_pause_codes_active"];} +if (isset($_GET["pause_code"])) {$pause_code=$_GET["pause_code"];} + elseif (isset($_POST["pause_code"])) {$pause_code=$_POST["pause_code"];} +if (isset($_GET["pause_code_name"])) {$pause_code_name=$_GET["pause_code_name"];} + elseif (isset($_POST["pause_code_name"])) {$pause_code_name=$_POST["pause_code_name"];} +if (isset($_GET["billable"])) {$billable=$_GET["billable"];} + elseif (isset($_POST["billable"])) {$billable=$_POST["billable"];} +if (isset($_GET["campaign_description"])) {$campaign_description=$_GET["campaign_description"];} + elseif (isset($_POST["campaign_description"])) {$campaign_description=$_POST["campaign_description"];} +if (isset($_GET["campaign_stats_refresh"])) {$campaign_stats_refresh=$_GET["campaign_stats_refresh"];} + elseif (isset($_POST["campaign_stats_refresh"])){$campaign_stats_refresh=$_POST["campaign_stats_refresh"];} +if (isset($_GET["list_description"])) {$list_description=$_GET["list_description"];} + elseif (isset($_POST["list_description"])) {$list_description=$_POST["list_description"];} +if (isset($_GET["vicidial_recording_override"])) {$vicidial_recording_override=$_GET["vicidial_recording_override"];} elseif (isset($_POST["vicidial_recording_override"])) {$vicidial_recording_override=$_POST["vicidial_recording_override"];} +if (isset($_GET["use_non_latin"])) {$use_non_latin=$_GET["use_non_latin"];} + elseif (isset($_POST["use_non_latin"])) {$use_non_latin=$_POST["use_non_latin"];} +if (isset($_GET["webroot_writable"])) {$webroot_writable=$_GET["webroot_writable"];} + elseif (isset($_POST["webroot_writable"])) {$webroot_writable=$_POST["webroot_writable"];} +if (isset($_GET["enable_queuemetrics_logging"])) {$enable_queuemetrics_logging=$_GET["enable_queuemetrics_logging"];} + elseif (isset($_POST["enable_queuemetrics_logging"])) {$enable_queuemetrics_logging=$_POST["enable_queuemetrics_logging"];} +if (isset($_GET["queuemetrics_server_ip"])) {$queuemetrics_server_ip=$_GET["queuemetrics_server_ip"];} + elseif (isset($_POST["queuemetrics_server_ip"])) {$queuemetrics_server_ip=$_POST["queuemetrics_server_ip"];} +if (isset($_GET["queuemetrics_dbname"])) {$queuemetrics_dbname=$_GET["queuemetrics_dbname"];} + elseif (isset($_POST["queuemetrics_dbname"])) {$queuemetrics_dbname=$_POST["queuemetrics_dbname"];} +if (isset($_GET["queuemetrics_login"])) {$queuemetrics_login=$_GET["queuemetrics_login"];} + elseif (isset($_POST["queuemetrics_login"])) {$queuemetrics_login=$_POST["queuemetrics_login"];} +if (isset($_GET["queuemetrics_pass"])) {$queuemetrics_pass=$_GET["queuemetrics_pass"];} + elseif (isset($_POST["queuemetrics_pass"])) {$queuemetrics_pass=$_POST["queuemetrics_pass"];} +if (isset($_GET["queuemetrics_url"])) {$queuemetrics_url=$_GET["queuemetrics_url"];} + elseif (isset($_POST["queuemetrics_url"])) {$queuemetrics_url=$_POST["queuemetrics_url"];} +if (isset($_GET["queuemetrics_log_id"])) {$queuemetrics_log_id=$_GET["queuemetrics_log_id"];} + elseif (isset($_POST["queuemetrics_log_id"])) {$queuemetrics_log_id=$_POST["queuemetrics_log_id"];} +if (isset($_GET["dial_status"])) {$dial_status=$_GET["dial_status"];} + elseif (isset($_POST["dial_status"])) {$dial_status=$_POST["dial_status"];} +if (isset($_GET["queuemetrics_eq_prepend"])) {$queuemetrics_eq_prepend=$_GET["queuemetrics_eq_prepend"];} + elseif (isset($_POST["queuemetrics_eq_prepend"])) {$queuemetrics_eq_prepend=$_POST["queuemetrics_eq_prepend"];} +if (isset($_GET["vicidial_agent_disable"])) {$vicidial_agent_disable=$_GET["vicidial_agent_disable"];} + elseif (isset($_POST["vicidial_agent_disable"])) {$vicidial_agent_disable=$_POST["vicidial_agent_disable"];} +if (isset($_GET["disable_alter_custdata"])) {$disable_alter_custdata=$_GET["disable_alter_custdata"];} + elseif (isset($_POST["disable_alter_custdata"])) {$disable_alter_custdata=$_POST["disable_alter_custdata"];} +if (isset($_GET["alter_custdata_override"])) {$alter_custdata_override=$_GET["alter_custdata_override"];} + elseif (isset($_POST["alter_custdata_override"])) {$alter_custdata_override=$_POST["alter_custdata_override"];} +if (isset($_GET["no_hopper_leads_logins"])) {$no_hopper_leads_logins=$_GET["no_hopper_leads_logins"];} + elseif (isset($_POST["no_hopper_leads_logins"])) {$no_hopper_leads_logins=$_POST["no_hopper_leads_logins"];} +if (isset($_GET["enable_sipsak_messages"])) {$enable_sipsak_messages=$_GET["enable_sipsak_messages"];} + elseif (isset($_POST["enable_sipsak_messages"])) {$enable_sipsak_messages=$_POST["enable_sipsak_messages"];} +if (isset($_GET["allow_sipsak_messages"])) {$allow_sipsak_messages=$_GET["allow_sipsak_messages"];} + elseif (isset($_POST["allow_sipsak_messages"])) {$allow_sipsak_messages=$_POST["allow_sipsak_messages"];} +if (isset($_GET["admin_home_url"])) {$admin_home_url=$_GET["admin_home_url"];} + elseif (isset($_POST["admin_home_url"])) {$admin_home_url=$_POST["admin_home_url"];} + + + if (isset($script_id)) {$script_id= strtoupper($script_id);} + if (isset($lead_filter_id)) {$lead_filter_id = strtoupper($lead_filter_id);} + +if (strlen($dial_status) > 0) + { + $ADD='28'; + $status = $dial_status; + } + +##### BEGIN VARIABLE FILTERING FOR SECURITY ##### + +if ($non_latin < 1) +{ +### DIGITS ONLY ### +$adaptive_dropped_percentage = ereg_replace("[^0-9]","",$adaptive_dropped_percentage); +$adaptive_latest_server_time = ereg_replace("[^0-9]","",$adaptive_latest_server_time); +$admin_hangup_enabled = ereg_replace("[^0-9]","",$admin_hangup_enabled); +$admin_hijack_enabled = ereg_replace("[^0-9]","",$admin_hijack_enabled); +$admin_monitor_enabled = ereg_replace("[^0-9]","",$admin_monitor_enabled); +$AFLogging_enabled = ereg_replace("[^0-9]","",$AFLogging_enabled); +$agent_choose_ingroups = ereg_replace("[^0-9]","",$agent_choose_ingroups); +$agentcall_manual = ereg_replace("[^0-9]","",$agentcall_manual); +$agentonly_callbacks = ereg_replace("[^0-9]","",$agentonly_callbacks); +$AGI_call_logging_enabled = ereg_replace("[^0-9]","",$AGI_call_logging_enabled); +$allcalls_delay = ereg_replace("[^0-9]","",$allcalls_delay); +$alter_agent_interface_options = ereg_replace("[^0-9]","",$alter_agent_interface_options); +$am_message_exten = ereg_replace("[^0-9]","",$am_message_exten); +$answer_transfer_agent = ereg_replace("[^0-9]","",$answer_transfer_agent); +$ast_admin_access = ereg_replace("[^0-9]","",$ast_admin_access); +$ast_delete_phones = ereg_replace("[^0-9]","",$ast_delete_phones); +$attempt_delay = ereg_replace("[^0-9]","",$attempt_delay); +$attempt_maximum = ereg_replace("[^0-9]","",$attempt_maximum); +$auto_dial_next_number = ereg_replace("[^0-9]","",$auto_dial_next_number); +$balance_trunks_offlimits = ereg_replace("[^0-9]","",$balance_trunks_offlimits); +$call_parking_enabled = ereg_replace("[^0-9]","",$call_parking_enabled); +$CallerID_popup_enabled = ereg_replace("[^0-9]","",$CallerID_popup_enabled); +$campaign_detail = ereg_replace("[^0-9]","",$campaign_detail); +$campaign_rec_exten = ereg_replace("[^0-9]","",$campaign_rec_exten); +$campaign_vdad_exten = ereg_replace("[^0-9]","",$campaign_vdad_exten); +$change_agent_campaign = ereg_replace("[^0-9]","",$change_agent_campaign); +$closer_default_blended = ereg_replace("[^0-9]","",$closer_default_blended); +$conf_exten = ereg_replace("[^0-9]","",$conf_exten); +$conf_on_extension = ereg_replace("[^0-9]","",$conf_on_extension); +$conferencing_enabled = ereg_replace("[^0-9]","",$conferencing_enabled); +$ct_default_start = ereg_replace("[^0-9]","",$ct_default_start); +$ct_default_stop = ereg_replace("[^0-9]","",$ct_default_stop); +$ct_friday_start = ereg_replace("[^0-9]","",$ct_friday_start); +$ct_friday_stop = ereg_replace("[^0-9]","",$ct_friday_stop); +$ct_monday_start = ereg_replace("[^0-9]","",$ct_monday_start); +$ct_monday_stop = ereg_replace("[^0-9]","",$ct_monday_stop); +$ct_saturday_start = ereg_replace("[^0-9]","",$ct_saturday_start); +$ct_saturday_stop = ereg_replace("[^0-9]","",$ct_saturday_stop); +$ct_sunday_start = ereg_replace("[^0-9]","",$ct_sunday_start); +$ct_sunday_stop = ereg_replace("[^0-9]","",$ct_sunday_stop); +$ct_thursday_start = ereg_replace("[^0-9]","",$ct_thursday_start); +$ct_thursday_stop = ereg_replace("[^0-9]","",$ct_thursday_stop); +$ct_tuesday_start = ereg_replace("[^0-9]","",$ct_tuesday_start); +$ct_tuesday_stop = ereg_replace("[^0-9]","",$ct_tuesday_stop); +$ct_wednesday_start = ereg_replace("[^0-9]","",$ct_wednesday_start); +$ct_wednesday_stop = ereg_replace("[^0-9]","",$ct_wednesday_stop); +$DBX_port = ereg_replace("[^0-9]","",$DBX_port); +$DBY_port = ereg_replace("[^0-9]","",$DBY_port); +$dedicated_trunks = ereg_replace("[^0-9]","",$dedicated_trunks); +$delete_call_times = ereg_replace("[^0-9]","",$delete_call_times); +$delete_campaigns = ereg_replace("[^0-9]","",$delete_campaigns); +$delete_filters = ereg_replace("[^0-9]","",$delete_filters); +$delete_ingroups = ereg_replace("[^0-9]","",$delete_ingroups); +$delete_lists = ereg_replace("[^0-9]","",$delete_lists); +$delete_remote_agents = ereg_replace("[^0-9]","",$delete_remote_agents); +$delete_scripts = ereg_replace("[^0-9]","",$delete_scripts); +$delete_user_groups = ereg_replace("[^0-9]","",$delete_user_groups); +$delete_users = ereg_replace("[^0-9]","",$delete_users); +$dial_timeout = ereg_replace("[^0-9]","",$dial_timeout); +$dialplan_number = ereg_replace("[^0-9]","",$dialplan_number); +$drop_call_seconds = ereg_replace("[^0-9]","",$drop_call_seconds); +$drop_exten = ereg_replace("[^0-9]","",$drop_exten); +$enable_fast_refresh = ereg_replace("[^0-9]","",$enable_fast_refresh); +$enable_persistant_mysql = ereg_replace("[^0-9]","",$enable_persistant_mysql); +$fast_refresh_rate = ereg_replace("[^0-9]","",$fast_refresh_rate); +$hopper_level = ereg_replace("[^0-9]","",$hopper_level); +$hotkey = ereg_replace("[^0-9]","",$hotkey); +$hotkeys_active = ereg_replace("[^0-9]","",$hotkeys_active); +$list_id = ereg_replace("[^0-9]","",$list_id); +$load_leads = ereg_replace("[^0-9]","",$load_leads); +$max_vicidial_trunks = ereg_replace("[^0-9]","",$max_vicidial_trunks); +$modify_call_times = ereg_replace("[^0-9]","",$modify_call_times); +$modify_users = ereg_replace("[^0-9]","",$modify_users); +$modify_campaigns = ereg_replace("[^0-9]","",$modify_campaigns); +$modify_lists = ereg_replace("[^0-9]","",$modify_lists); +$modify_scripts = ereg_replace("[^0-9]","",$modify_scripts); +$modify_filters = ereg_replace("[^0-9]","",$modify_filters); +$modify_ingroups = ereg_replace("[^0-9]","",$modify_ingroups); +$modify_usergroups = ereg_replace("[^0-9]","",$modify_usergroups); +$modify_remoteagents = ereg_replace("[^0-9]","",$modify_remoteagents); +$modify_servers = ereg_replace("[^0-9]","",$modify_servers); +$view_reports = ereg_replace("[^0-9]","",$view_reports); +$modify_leads = ereg_replace("[^0-9]","",$modify_leads); +$monitor_prefix = ereg_replace("[^0-9]","",$monitor_prefix); +$number_of_lines = ereg_replace("[^0-9]","",$number_of_lines); +$old_conf_exten = ereg_replace("[^0-9]","",$old_conf_exten); +$outbound_cid = ereg_replace("[^0-9]","",$outbound_cid); +$park_ext = ereg_replace("[^0-9]","",$park_ext); +$park_on_extension = ereg_replace("[^0-9]","",$park_on_extension); +$phone_number = ereg_replace("[^0-9]","",$phone_number); +$QUEUE_ACTION_enabled = ereg_replace("[^0-9]","",$QUEUE_ACTION_enabled); +$recording_exten = ereg_replace("[^0-9]","",$recording_exten); +$remote_agent_id = ereg_replace("[^0-9]","",$remote_agent_id); +$safe_harbor_exten = ereg_replace("[^0-9]","",$safe_harbor_exten); +$telnet_port = ereg_replace("[^0-9]","",$telnet_port); +$updater_check_enabled = ereg_replace("[^0-9]","",$updater_check_enabled); +$user_level = ereg_replace("[^0-9]","",$user_level); +$user_start = ereg_replace("[^0-9]","",$user_start); +$user_switching_enabled = ereg_replace("[^0-9]","",$user_switching_enabled); +$VDstop_rec_after_each_call = ereg_replace("[^0-9]","",$VDstop_rec_after_each_call); +$VICIDIAL_park_on_extension = ereg_replace("[^0-9]","",$VICIDIAL_park_on_extension); +$vicidial_recording = ereg_replace("[^0-9]","",$vicidial_recording); +$vicidial_transfers = ereg_replace("[^0-9]","",$vicidial_transfers); +$voicemail_button_enabled = ereg_replace("[^0-9]","",$voicemail_button_enabled); +$voicemail_dump_exten = ereg_replace("[^0-9]","",$voicemail_dump_exten); +$voicemail_ext = ereg_replace("[^0-9]","",$voicemail_ext); +$voicemail_exten = ereg_replace("[^0-9]","",$voicemail_exten); +$voicemail_id = ereg_replace("[^0-9]","",$voicemail_id); +$wrapup_seconds = ereg_replace("[^0-9]","",$wrapup_seconds); +$use_non_latin = ereg_replace("[^0-9]","",$use_non_latin); +$webroot_writable = ereg_replace("[^0-9]","",$webroot_writable); +$enable_queuemetrics_logging = ereg_replace("[^0-9]","",$enable_queuemetrics_logging); +$enable_sipsak_messages = ereg_replace("[^0-9]","",$enable_sipsak_messages); +$allow_sipsak_messages = ereg_replace("[^0-9]","",$allow_sipsak_messages); + +### 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); +$omit_phone_code = ereg_replace("[^NY]","",$omit_phone_code); +$available_only_ratio_tally = ereg_replace("[^NY]","",$available_only_ratio_tally); +$sys_perf_log = ereg_replace("[^NY]","",$sys_perf_log); +$vicidial_balance_active = ereg_replace("[^NY]","",$vicidial_balance_active); +$vd_server_logs = ereg_replace("[^NY]","",$vd_server_logs); +$agent_pause_codes_active = ereg_replace("[^NY]","",$agent_pause_codes_active); +$campaign_stats_refresh = ereg_replace("[^NY]","",$campaign_stats_refresh); +$disable_alter_custdata = ereg_replace("[^NY]","",$disable_alter_custdata); +$no_hopper_leads_logins = ereg_replace("[^NY]","",$no_hopper_leads_logins); + +### ALPHA-NUMERIC ONLY ### +$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); +$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); +$concurrent_transfers = ereg_replace("[^0-9a-zA-Z]","",$concurrent_transfers); +$billable = ereg_replace("[^0-9a-zA-Z]","",$billable); +$pause_code = ereg_replace("[^0-9a-zA-Z]","",$pause_code); +$vicidial_recording_override = ereg_replace("[^0-9a-zA-Z]","",$vicidial_recording_override); +$queuemetrics_log_id = ereg_replace("[^0-9a-zA-Z]","",$queuemetrics_log_id); + +### DIGITS and Dots +$server_ip = ereg_replace("[^\.0-9]","",$server_ip); +$auto_dial_level = ereg_replace("[^\.0-9]","",$auto_dial_level); +$adaptive_maximum_level = ereg_replace("[^\.0-9]","",$adaptive_maximum_level); +$phone_ip = ereg_replace("[^\.0-9]","",$phone_ip); +$old_server_ip = ereg_replace("[^\.0-9]","",$old_server_ip); +$computer_ip = ereg_replace("[^\.0-9]","",$computer_ip); +$queuemetrics_server_ip = ereg_replace("[^\.0-9]","",$queuemetrics_server_ip); + +### ALPHA-NUMERIC and spaces and hash and star and comma +$xferconf_a_dtmf = ereg_replace("[^ \,\*\#0-9a-zA-Z]","",$xferconf_a_dtmf); +$xferconf_b_dtmf = ereg_replace("[^ \,\*\#0-9a-zA-Z]","",$xferconf_b_dtmf); + +### ALPHACAPS-NUMERIC +$xferconf_a_number = ereg_replace("[^0-9A-Z]","",$xferconf_a_number); +$xferconf_b_number = ereg_replace("[^0-9A-Z]","",$xferconf_b_number); + +### ALPHA-NUMERIC and underscore and dash +$agi_output = ereg_replace("[^-\_0-9a-zA-Z]","",$agi_output); +$ASTmgrSECRET = ereg_replace("[^-\_0-9a-zA-Z]","",$ASTmgrSECRET); +$ASTmgrUSERNAME = ereg_replace("[^-\_0-9a-zA-Z]","",$ASTmgrUSERNAME); +$ASTmgrUSERNAMElisten = ereg_replace("[^-\_0-9a-zA-Z]","",$ASTmgrUSERNAMElisten); +$ASTmgrUSERNAMEsend = ereg_replace("[^-\_0-9a-zA-Z]","",$ASTmgrUSERNAMEsend); +$ASTmgrUSERNAMEupdate = ereg_replace("[^-\_0-9a-zA-Z]","",$ASTmgrUSERNAMEupdate); +$call_time_id = ereg_replace("[^-\_0-9a-zA-Z]","",$call_time_id); +$campaign_id = ereg_replace("[^-\_0-9a-zA-Z]","",$campaign_id); +$CoNfIrM = ereg_replace("[^-\_0-9a-zA-Z]","",$CoNfIrM); +$DBX_database = ereg_replace("[^-\_0-9a-zA-Z]","",$DBX_database); +$DBX_pass = ereg_replace("[^-\_0-9a-zA-Z]","",$DBX_pass); +$DBX_user = ereg_replace("[^-\_0-9a-zA-Z]","",$DBX_user); +$DBY_database = ereg_replace("[^-\_0-9a-zA-Z]","",$DBY_database); +$DBY_pass = ereg_replace("[^-\_0-9a-zA-Z]","",$DBY_pass); +$DBY_user = ereg_replace("[^-\_0-9a-zA-Z]","",$DBY_user); +$dial_method = ereg_replace("[^-\_0-9a-zA-Z]","",$dial_method); +$dial_status_a = ereg_replace("[^-\_0-9a-zA-Z]","",$dial_status_a); +$dial_status_b = ereg_replace("[^-\_0-9a-zA-Z]","",$dial_status_b); +$dial_status_c = ereg_replace("[^-\_0-9a-zA-Z]","",$dial_status_c); +$dial_status_d = ereg_replace("[^-\_0-9a-zA-Z]","",$dial_status_d); +$dial_status_e = ereg_replace("[^-\_0-9a-zA-Z]","",$dial_status_e); +$ext_context = ereg_replace("[^-\_0-9a-zA-Z]","",$ext_context); +$group_id = ereg_replace("[^-\_0-9a-zA-Z]","",$group_id); +$lead_filter_id = ereg_replace("[^-\_0-9a-zA-Z]","",$lead_filter_id); +$local_call_time = ereg_replace("[^-\_0-9a-zA-Z]","",$local_call_time); +$login = ereg_replace("[^-\_0-9a-zA-Z]","",$login); +$login_campaign = ereg_replace("[^-\_0-9a-zA-Z]","",$login_campaign); +$login_pass = ereg_replace("[^-\_0-9a-zA-Z]","",$login_pass); +$login_user = ereg_replace("[^-\_0-9a-zA-Z]","",$login_user); +$next_agent_call = ereg_replace("[^-\_0-9a-zA-Z]","",$next_agent_call); +$old_campaign_id = ereg_replace("[^-\_0-9a-zA-Z]","",$old_campaign_id); +$old_server_id = ereg_replace("[^-\_0-9a-zA-Z]","",$old_server_id); +$OLDuser_group = ereg_replace("[^-\_0-9a-zA-Z]","",$OLDuser_group); +$park_file_name = ereg_replace("[^-\_0-9a-zA-Z]","",$park_file_name); +$pass = ereg_replace("[^-\_0-9a-zA-Z]","",$pass); +$phone_login = ereg_replace("[^-\_0-9a-zA-Z]","",$phone_login); +$phone_pass = ereg_replace("[^-\_0-9a-zA-Z]","",$phone_pass); +$PHP_AUTH_PW = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_PW); +$PHP_AUTH_USER = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_USER); +$protocol = ereg_replace("[^-\_0-9a-zA-Z]","",$protocol); +$server_id = ereg_replace("[^-\_0-9a-zA-Z]","",$server_id); +$stage = ereg_replace("[^-\_0-9a-zA-Z]","",$stage); +$state_rule = ereg_replace("[^-\_0-9a-zA-Z]","",$state_rule); +$status = ereg_replace("[^-\_0-9a-zA-Z]","",$status); +$trunk_restriction = ereg_replace("[^-\_0-9a-zA-Z]","",$trunk_restriction); +$user = ereg_replace("[^-\_0-9a-zA-Z]","",$user); +$user_group = ereg_replace("[^-\_0-9a-zA-Z]","",$user_group); +$VICIDIAL_park_on_filename = ereg_replace("[^-\_0-9a-zA-Z]","",$VICIDIAL_park_on_filename); +$auto_alt_dial = ereg_replace("[^-\_0-9a-zA-Z]","",$auto_alt_dial); +$dial_status = ereg_replace("[^-\_0-9a-zA-Z]","",$dial_status); +$queuemetrics_eq_prepend = ereg_replace("[^-\_0-9a-zA-Z]","",$queuemetrics_eq_prepend); +$vicidial_agent_disable = ereg_replace("[^-\_0-9a-zA-Z]","",$vicidial_agent_disable); +$alter_custdata_override = ereg_replace("[^-\_0-9a-zA-Z]","",$alter_custdata_override); + +### 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 +$adaptive_dl_diff_target = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$adaptive_dl_diff_target); +$adaptive_intensity = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$adaptive_intensity); +$asterisk_version = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$asterisk_version); +$call_time_comments = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$call_time_comments); +$call_time_name = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$call_time_name); +$campaign_name = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$campaign_name); +$campaign_rec_filename = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$campaign_rec_filename); +$company = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$company); +$full_name = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$full_name); +$fullname = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$fullname); +$group_name = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$group_name); +$HKstatus = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$HKstatus); +$lead_filter_comments = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$lead_filter_comments); +$lead_filter_name = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$lead_filter_name); +$list_name = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$list_name); +$local_gmt = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$local_gmt); +$phone_type = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$phone_type); +$picture = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$picture); +$script_comments = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$script_comments); +$script_name = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$script_name); +$server_description = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$server_description); +$status = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$status); +$status_name = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$status_name); +$wrapup_message = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$wrapup_message); +$pause_code_name = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$pause_code_name); +$campaign_description = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$campaign_description); +$list_description = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$list_description); + +### ALPHA-NUMERIC and underscore and dash and slash and at and dot +$call_out_number_group = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$call_out_number_group); +$client_browser = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$client_browser); +$DBX_server = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$DBX_server); +$DBY_server = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$DBY_server); +$dtmf_send_extension = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$dtmf_send_extension); +$extension = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$extension); +$install_directory = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$install_directory); +$old_extension = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$old_extension); +$telnet_host = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$telnet_host); +$queuemetrics_dbname = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$queuemetrics_dbname); +$queuemetrics_login = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$queuemetrics_login); +$queuemetrics_pass = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$queuemetrics_pass); + +### remove semi-colons ### +$lead_filter_sql = ereg_replace(";","",$lead_filter_sql); + +### VARIABLES TO BE mysql_real_escape_string ### +# $web_form_address +# $queuemetrics_url +# $admin_home_url + +### VARIABLES not filtered at all ### +# $script_text + +} # end of non_latin + + +##### END VARIABLE FILTERING FOR SECURITY ##### + + +# AST GUI database administration +# admin.php +# +# CHANGELOG: +# 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 +# 60808-1147 - Changed filtering for and added instructions for consutative transfers +# 60816-1552 - Added allcalls_delay start delay for recordings in vicidial.php +# 60817-2226 - Fixed bug that would not allow lead recycling of non-selectable statuses +# 60821-1543 - Added option to Omit Phone Code while dialing in vicidial +# 60821-1625 - Added ALLFORCE recording option for campaign_recording +# 60823-1154 - Added fields for adaptive dialing +# 60824-1326 - Added adaptive_latest_target_gmt for ADAPT_TAPERED dial method +# 60825-1205 - Added adaptive_intensity for ADAPT_ dial methods +# 60828-1019 - Changed adaptive_latest_target_gmt to adaptive_latest_server_time +# 60828-1115 - Added adaptive_dl_diff_target and changed intensity dropdown +# 60927-1246 - Added astguiclient/admin.php functions under SERVERS tab +# 61002-1402 - Added fields for vicidial balance trunk controls +# 61003-1123 - Added functions for vicidial_server_trunks records +# 61109-1022 - Added Emergency VDAC Jam Clear function to Campaign Detail screen +# 61110-1502 - Add ability to select NONE in dial statuses, new list_id must not be < 100 +# 61122-1228 - Added user group campaign restrictions +# 61122-1535 - Changed script_text to unfiltered and added more variables to SCRIPTS +# 61129-1028 - Added headers to Users and Phones with clickable order-by titles +# 70108-1405 - Added ADAPT OVERRIDE to allow for forced dial_level changes in ADAPT dial methods +# - Screen width definable at top of script, merged server_stats into this script +# 70109-1638 - Added ALTPH2 and ADDR3 hotkey options for alt number dialing with HotKeys +# 70109-1716 - Added concurrent_transfers option to vicidial_campaigns +# 70115-1152 - Aded (CLOSER|BLEND|INBND|_C$|_B$|_I$) options for CLOSER-type campaigns +# 70115-1532 - Added auto_alt_dial field to campaign screen for auto-dialing of alt numbers +# 70116-1200 - Added auto_alt_dial_status functionality to campaign screen +# 70117-1235 - Added header formatting variables at top of script +# - Moved Call Times and Phones/Server functions to Admin section +# 70118-1706 - Added new user group displays and links +# 70123-1519 - Added user permission settings for all sections +# 70124-1346 - Fixed spelling errors and formatting consistency +# 70202-1120 - Added agent_pause_codes section to campaigns +# 70205-1204 - Added memo, last dialed, timestamp and stats-refresh fields to vicidial_campaigns/lists +# 70206-1323 - Added user setting for vicidial_recording_override +# 70212-1412 - Added system settings section +# 70214-1226 - Added QueueMetrics Log ID field to system settings section +# 70219-1102 - Changed campaign dial statuses to be one string allowing for high limit +# 70223-0957 - Added queuemetrics_eq_prepend for custom ENTERQUEUE prepending of a field +# 70302-1111 - Fixed small bug in dialable leads calculation +# 70314-1133 - Added insert selection on script forms +# 70319-1423 - Added Alter Customer Data and agent disable display functions +# 70319-1625 - Added option to allow agents to login to outbound campaigns with no leads in the hopper +# 70322-1455 - Added sipsak messages parameters +# 70402-1157 - Added HOME link and entry to system_settings table, added QM link on reports section + +# make sure you have added a user to the vicidial_users MySQL table with at least user_level 8 to access this page the first time + +$admin_version = '2.0.95'; +$build = '70402-1157'; + +$STARTtime = date("U"); +$SQLdate = date("Y-m-d H:i:s"); + + +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]; + $LOGuser_group =$row[5]; + $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]; + $LOGast_admin_access =$row[16]; + $LOGast_delete_phones =$row[17]; + $LOGdelete_scripts =$row[18]; + $LOGdelete_filters =$row[29]; + $LOGalter_agent_interface =$row[30]; + $LOGdelete_call_times =$row[32]; + $LOGmodify_call_times =$row[33]; + $LOGmodify_users =$row[34]; + $LOGmodify_campaigns =$row[35]; + $LOGmodify_lists =$row[36]; + $LOGmodify_scripts =$row[37]; + $LOGmodify_filters =$row[38]; + $LOGmodify_ingroups =$row[39]; + $LOGmodify_usergroups =$row[40]; + $LOGmodify_remoteagents =$row[41]; + $LOGmodify_servers =$row[42]; + $LOGview_reports =$row[43]; + + $stmt="SELECT allowed_campaigns from vicidial_user_groups where user_group='$LOGuser_group';"; + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + $LOGallowed_campaigns =$row[0]; + + 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='admin'; $sh='times'; echo "Πρόσθεσε Νέο Χρόνο Κλήσης";} +if ($ADD==1111111111) {$hh='admin'; $sh='times'; echo "Πρόσθεσε Νέο Χρόνο Κλήσης Κατάστασης";} +if ($ADD==11111111111) {$hh='admin'; $sh='phones'; echo "ΠΡΟΣΘΕΣΕ ΝΕΟ ΤΗΛΕΦΩΝΟ";} +if ($ADD==111111111111) {$hh='admin'; $sh='server'; echo "ΠΡΟΣΘΕΣΕ ΝΕΟ ΔΙΑΚΟΜΙΣΤΗ";} +if ($ADD==1111111111111) {$hh='admin'; $sh='conference'; echo "ΠΡΟΣΘΕΣΕ ΝΕΑ ΣΥΝΔΙΑΛΕΞΗ";} +if ($ADD==11111111111111) {$hh='admin'; $sh='conference'; echo "ADD NEW VICIDIAL CONFERENCE";} +if ($ADD==2) {$hh='users'; echo "Προσθήκη Νέου Χρήστη";} +if ($ADD==21) {$hh='campaigns'; echo "Προσθήκη Νέας Εκστρατείας";} +if ($ADD==22) {$hh='campaigns'; echo "Προσθήκη Νέας Κατάστασης Εκστρατείας";} +if ($ADD==23) {$hh='campaigns'; echo "New Εκστρατεία HotKey Addition";} +if ($ADD==25) {$hh='campaigns'; echo "Νέα προσθήκη οδηγού ανακύκλωσης εκστρατείας";} +if ($ADD==26) {$hh='campaigns'; echo "Νέα αυτόματη θέση πινάκων ALT";} +if ($ADD==27) {$hh='campaigns'; echo "Νέος κώδικας μικρής διακοπής πρακτόρων";} +if ($ADD==28) {$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='admin'; $sh='times'; echo "Προσθήκη Νέου Χρόνου Κλήσης";} +if ($ADD==2111111111) {$hh='admin'; $sh='times'; echo "Προσθήκη Νέου Χρόνου Κλήσης Κατάστασης";} +if ($ADD==21111111111) {$hh='admin'; $sh='phones'; echo "ΠΡΟΣΘΗΚΗ ΝΕΟΥ ΤΗΛΕΦΩΝΟΥ";} +if ($ADD==211111111111) {$hh='admin'; $sh='server'; echo "ΠΡΟΣΘΗΚΗ ΝΕΟΥ ΔΙΑΚΟΜΙΣΤΗ";} +if ($ADD==221111111111) {$hh='admin'; $sh='server'; echo "ΠΡΟΣΘΕΤΕΙ ΝΕΑ ΕΓΓΡΑΦΗ ΕΞΥΠΗΡΕΤΗΤΗ ΚΟΡΜΟΥ";} +if ($ADD==2111111111111) {$hh='admin'; $sh='conference'; echo "ΠΡΟΣΘΗΚΗ ΝΕΑΣ ΣΥΝΔΙΑΛΕΞΗΣ";} +if ($ADD==21111111111111) {$hh='admin'; $sh='conference'; echo "ADDING NEW VICIDIAL CONFERENCE";} +if ($ADD==3) {$hh='users'; echo "Τροποποίηση Χρήστη";} +if ($ADD==30) {$hh='campaigns'; 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='admin'; $sh='times'; echo "Τροποποίηση Χρόνου Κλήσης";} +if ($ADD==321111111) {$hh='admin'; $sh='times'; echo "Τροποποίηση Λίστας Ορισμών Χρόνου Κλήσης Κατάστασης ";} +if ($ADD==3111111111) {$hh='admin'; $sh='times'; echo "Τροποπίηση Χρόνου Κλήσης Κατάστασης";} +if ($ADD==31111111111) {$hh='admin'; $sh='phones'; echo "ΤΡΟΠΟΠΟΙΗΣΕ ΤΗΛΕΦΩΝΟ";} +if ($ADD==311111111111) {$hh='admin'; $sh='server'; echo "ΤΡΟΠΟΠΟΙΗΣΕ ΔΙΑΚΟΜΙΣΤΗ";} +if ($ADD==3111111111111) {$hh='admin'; $sh='conference'; echo "ΤΡΟΠΟΠΟΙΗΣΕ ΣΥΝΔΙΑΛΕΞΗ";} +if ($ADD==31111111111111) {$hh='admin'; $sh='conference'; echo "MODIFY VICIDIAL CONFERENCE";} +if ($ADD==311111111111111) {$hh='admin'; $sh='settings'; echo "ΤΡΟΠΟΠΟΙΗΣΤΕ ΤΙΣ ΤΟΠΟΘΕΤΉΣΕΙΣ ΣΥΣΤΗΜΑΤΩΝ VICIDIAL";} +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==47) {$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='admin'; $sh='times'; echo "Τροποποίηση Χρόνου Κλήσης";} +if ($ADD==4111111111) {$hh='admin'; $sh='times'; echo "Τροποπίηση Χρόνου Κλήσης Κατάστασης";} +if ($ADD==41111111111) {$hh='admin'; $sh='phones'; echo "ΤΡΟΠΟΠΟΙΗΣΕ ΤΗΛΕΦΩΝΟ";} +if ($ADD==411111111111) {$hh='admin'; $sh='server'; echo "ΤΡΟΠΟΠΟΙΗΣΕ ΔΙΑΚΟΜΙΣΤΗ";} +if ($ADD==421111111111) {$hh='admin'; $sh='server'; echo "ΤΡΟΠΟΠΟΙΗΣΗ ΕΓΓΡΑΦΗΣ ΕΞΥΠΗΡΕΤΗΤΗ ΚΟΡΜΟΥ";} +if ($ADD==4111111111111) {$hh='admin'; $sh='conference'; echo "ΤΡΟΠΟΠΟΙΗΣΕ ΣΥΝΔΙΑΛΕΞΗ";} +if ($ADD==41111111111111) {$hh='admin'; $sh='conference'; echo "MODIFY VICIDIAL CONFERENCE";} +if ($ADD==411111111111111) {$hh='admin'; $sh='settings'; echo "ΤΡΟΠΟΠΟΙΗΣΤΕ ΤΙΣ ΤΟΠΟΘΕΤΉΣΕΙΣ ΣΥΣΤΗΜΑΤΩΝ VICIDIAL";} +if ($ADD==5) {$hh='users'; echo "Delete User";} +if ($ADD==51) {$hh='campaigns'; echo "Delete Εκστρατεία";} +if ($ADD==52) {$hh='campaigns'; echo "Αποσυνδεμένοι Χειριστές";} +if ($ADD==53) {$hh='campaigns'; echo "έκτακτης ανάγκης καθαρισμού VDAC";} +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='admin'; $sh='times'; echo "Διαγραφή Χρόνου Κλήσης";} +if ($ADD==5111111111) {$hh='admin'; $sh='times'; echo "Διαγραφή Χρόνου Κλήσης Κατάστασης";} +if ($ADD==51111111111) {$hh='admin'; $sh='phones'; echo "DELETE PHONE";} +if ($ADD==511111111111) {$hh='admin'; $sh='server'; echo "DELETE SERVER";} +if ($ADD==5111111111111) {$hh='admin'; $sh='conference'; echo "DELETE CONFERENCE";} +if ($ADD==51111111111111) {$hh='admin'; $sh='conference'; echo "DELETE VICIDIAL CONFERENCE";} +if ($ADD==6) {$hh='users'; echo "Delete User";} +if ($ADD==61) {$hh='campaigns'; echo "Delete Εκστρατεία";} +if ($ADD==62) {$hh='campaigns'; echo "Αποσυνδεμένοι Χειριστές";} +if ($ADD==63) {$hh='campaigns'; echo "έκτακτης ανάγκης καθαρισμού VDAC";} +if ($ADD==65) {$hh='campaigns'; echo "Διαγράψτε τον οδηγό ανακύκλωσης";} +if ($ADD==66) {$hh='campaigns'; echo "Διαγράψτε την αυτόματη θέση πινάκων ALT";} +if ($ADD==67) {$hh='campaigns'; echo "Διαγράψτε τον κώδικα μικρής διακοπής πρακτόρων";} +if ($ADD==68) {$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='admin'; $sh='times'; echo "Διαγραφή Χρόνου Κλήσης";} +if ($ADD==6111111111) {$hh='admin'; $sh='times'; echo "Διαγραφή Χρόνου Κλήσης Κατάστασης";} +if ($ADD==61111111111) {$hh='admin'; $sh='phones'; echo "DELETE PHONE";} +if ($ADD==611111111111) {$hh='admin'; $sh='server'; echo "DELETE SERVER";} +if ($ADD==621111111111) {$hh='admin'; $sh='server'; echo "ΔΙΑΓΡΑΦΗ ΕΓΓΡΑΦΗΣ ΕΞΥΠΗΡΕΤΗΤΗ ΚΟΡΜΟΥ";} +if ($ADD==6111111111111) {$hh='admin'; $sh='conference'; echo "DELETE CONFERENCE";} +if ($ADD==61111111111111) {$hh='admin'; $sh='conference'; echo "DELETE VICIDIAL CONFERENCE";} +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='lists'; echo "Επανακλήσεις μέσα στην λίστα";} +if ($ADD==8111) {$hh='usergroups'; echo "CallBacks μέσα στην ομάδα χρηστών ";} +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='admin'; $sh='times'; echo "Χρόνοι Κλήσεων";} +if ($ADD==1000000000) {$hh='admin'; $sh='times'; echo "";} +if ($ADD==10000000000) {$hh='admin'; $sh='phones'; echo "ΛΙΣΤΑ ΤΗΛΕΦΩΝΟΥ";} +if ($ADD==100000000000) {$hh='admin'; $sh='server'; echo "ΛΙΣΤΑ ΔΙΑΚΟΜΙΣΤΗ";} +if ($ADD==1000000000000) {$hh='admin'; $sh='conference'; echo "ΛΙΣΤΑ ΣΥΝΔΙΑΛΕΞΕΩΝ";} +if ($ADD==10000000000000) {$hh='admin'; $sh='conference'; echo "VICIDIAL ΛΙΣΤΑ ΣΥΝΔΙΑΛΕΞΕΩΝ";} +if ($ADD==550) {$hh='users'; echo "Φόρμα Αναζήτησης";} +if ($ADD==551) {$hh='users'; echo "ΑΝΑΖΗΤΗΣΗ ΤΗΛΕΦΩΝΩΝ";} +if ($ADD==660) {$hh='users'; echo "Αποτελέσματα Αναζήτησης";} +if ($ADD==661) {$hh='users'; echo "ΑΝΑΖΗΤΗΣΗ ΑΠΟΤΕΛΕΣΜΑΤΩΝ ΤΗΛΕΦΩΝΩΝ";} +if ($ADD==99999) {$hh='users'; echo "ΒΟΗΘΕΙΑ";} +if ($ADD==999999) {$hh='reports'; 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>20) and ($ADD<70)) or ($ADD=="4A") or ($ADD=="4B") or (strlen($ADD)==12) ) + { + ##### 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++; + } + + ##### BEGIN get inbound groups listing for checkboxes ##### + if ( (($ADD>20) and ($ADD<70)) and ($ADD!=41) ) + { + $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 .= " -";} + } + ##### END get inbound groups listing for checkboxes ##### + + + ##### BEGIN get campaigns listing for checkboxes ##### + if ( ($ADD==211111) or ($ADD==311111) or ($ADD==411111) or ($ADD==511111) or ($ADD==611111) ) + { + if ( ($ADD==211111) or ($ADD==311111) or ($ADD==511111) or ($ADD==611111) ) + { + $stmt="SELECT allowed_campaigns from vicidial_user_groups where user_group='$user_group';"; + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + $allowed_campaigns = $row[0]; + $allowed_campaigns = preg_replace("/ -$/","",$allowed_campaigns); + $campaigns = explode(" ", $allowed_campaigns); + echo "<!-- $allowed_campaigns -->"; + } + + $campaigns_value=''; + $campaigns_list='<B><input type="checkbox" name="campaigns[]" value="-ALL-CAMPAIGNS-"'; + $p=0; + while ($p<100) + { + if (eregi('ALL-CAMPAIGNS',$campaigns[$p])) + { + $campaigns_list.=" CHECKED"; + $campaigns_value .= " -ALL-CAMPAIGNS- -"; + } + $p++; + } + $campaigns_list.="> ALL-CAMPAIGNS - ΟΙ ΧΡΗΣΤΕΣ ΜΠΟΡΟΥΝ ΝΑ ΔΟΥΝ ΟΠΟΙΑΔΗΠΟΤΕ ΕΚΣΤΡΑΤΕΙΑ</B><BR>\n"; + + $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); + + $o=0; + while ($campaigns_to_print > $o) + { + $rowx=mysql_fetch_row($rslt); + $campaign_id_value = $rowx[0]; + $campaign_name_value = $rowx[1]; + $campaigns_list .= "<input type=\"checkbox\" name=\"campaigns[]\" value=\"$campaign_id_value\""; + $p=0; + while ($p<100) + { + if ($campaign_id_value == $campaigns[$p]) + { + # echo "<!-- X $p|$campaign_id_value|$campaigns[$p]| -->"; + $campaigns_list .= " CHECKED"; + $campaigns_value .= " $campaign_id_value"; + } + # echo "<!-- O $p|$campaign_id_value|$campaigns[$p]| -->"; + $p++; + } + $campaigns_list .= "> $campaign_id_value - $campaign_name_value<BR>\n"; + $o++; + } + if (strlen($campaigns_value)>2) {$campaigns_value .= " -";} + } + ##### END get campaigns listing for checkboxes ##### + + + if ( (strlen($ADD)==11) or (strlen($ADD)>12) ) + { + ##### 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++; + } + } + + + +$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. + +
+
+
+Hot Keys ενεργός - εάν θέσετε σε 1 αυτή την επιλογή, επιτρέπει στο χρήστη να χρησιμοποιήσει τα πλήκτρα γρήγορου τερματισμού vicidial.php. + +
+
+
+Ο πράκτορας επιλέγει Ingroups - εάν θέσετε σε 1 αυτή την επιλογή επιτρέπει στο χρήστη να επιλέξει τις εισ-ομάδες που θα λάβουν τις κλήσεις. Διαφορετικά ο Manager θα πρέπει να το θέσει αυτό στην σελίδα διαχείρισης. + +
+
+
+Εισερχόμενες Ομάδες - Εδώ μπορείτε να επιλέξετε τις εισερχόμενες ομάδες που θέλετε να λαμβάνουν τις κλήσεις , εάν έχετε επιλέξει την εκστρατεία CLOSER. + +
+
+
+Προγραμματισμένες Επανακλήσεις - Αυτή η επιλογή επιτρέπει στον χειριστή να τερματίσει μία κλήση ως CALLBK και να επιλέξει τα δεδομένα και την ώρα κατά την οποία ο οδηγός θα ξανα-ενεργοποιηθεί. + +
+
+
+Μόνο του Χρήστη Επανακλήσεις- Αυτή η επιλογή επιτρέπει στον χρήστη να θέσει μία επανάκληση με τέτοιο τρόπο, ώστε μόνο αυτός να μπορεί να καλέσει τον πελάτη. Επίσης, επιτρέπει στον χρήστη να δει τις λίστες των επανακλήσεων και να τις καλέσει οποιαδήποτε στιγμή. + +
+
+
+Χειροκίνητη Κλήση Χρήστη - Αυτή η επιλογή επιτρέπει στον χειριστή να καταχωρήσει χειροκίνητα ένα νέο οδηγό στο σύστημα και να τον καλέσε. + +
+
+
+Ηχογράφηση - Αυτή η επιλογή μπορεί να απαγορεύσει σε έναν χειριστή να κάνει ηχογραφήσεις και θα πρέπει να ακολουθεί την διαδικασία ηχογράφησης της εκστρατείας. + +
+
+
+Μεταφορές- Αυτή η επιλογή μπορεί να απαγορεύσει σε έναν χειριστή να ανοίξει την διαδικασία μεταφορά-συνδιάσκεψη. Αν είναι απενεργοποιημένη, ο χρήστης δεν μπορεί να μεαφέρει κλήσεις ή να κάνει κλήση σε τρίτο. + +
+
+
+Πιό στενή προεπιλογή που συνδυάζεται - αυτή η επιλογή προκαθορίζει απλά το συνδυασμένο τετραγωνίδιο σε μια ΠΙΟ ΣΤΕΝΉ οθόνη σύνδεσης. + +
+
+
+VICIDIAL συμπληρωματική προμήθεια καταγραφής - αυτή η επιλογήθα αγνοήσει οποιο δήποτε η επιλογή είναι στην εκστρατεία για τηνκαταγραφή. Τα ΑΤΟΜΑ ΜΕ ΕΙΔΙΚΈΣ ΑΝΑΓΚΕΣ δεν θα αγνοήσουν τηρύθμιση καταγραφής εκστρατείας. Δεν θα θέσει εκτός λειτουργίαςΠΟΤΕ την καταγραφή στον πελάτη. ONDEMAND είναι η προεπιλογήκαι επιτρέπει στον πράκτορα για να αρχίσει και να σταματήσει όπωςαπαιτείται. ALLCALLS θα αρχίσει την καταγραφή στον πελάτηόποτε μια κλήση στέλνεται σε έναν πράκτορα. ALLFORCE θααρχίσει την καταγραφή στον πελάτη όποτε μια κλήση στέλνεται σεέναν πράκτορα που δεν δίνει στον πράκτορα καμία επιλογή νασταματήσει. Για ALLCALLS και ALLFORCE υπάρχει μια επιλογή ναχρησιμοποιηθεί η καθυστέρηση καταγραφής για να περικόψει στιςπολύ σύντομα καταγραφές και recude το φορτίο συστημάτων. + +
+
+
+Ο πράκτορας αλλάζει τη συμπληρωματική προμήθεια στοιχείωνπελατών - αυτή η επιλογή θα αγνοήσει οποιος δήποτε η επιλογήείναι στην εκστρατεία για την αλλαγή των στοιχείων πελατών.NOT_ACTIVE θα χρησιμοποιήσει οποιου δήποτε που θέτει είναιπαρών για την εκστρατεία. ALLOW_ALTER θα επιτρέψει πάντα τονπράκτορα να αλλάξει τα στοιχεία πελατών, η των οποίων ρύθμισηεκστρατείας είναι. Η προεπιλογή είναι NOT_ACTIVE. + +
+
+
+Αλλάξτε τις επιλογές διεπαφών Χειριστών - εάν θέσετε σε 1 αυτή την επιλογή, επιτρέπει στο διαχειριστή να τροποποιήσει τις επιλογές διεπαφών χειριστών στην admin.php. + +
+
+
+Διαγραφή Χρηστών - εάν θέσετε σε 1 αυτή την επιλογή, επιτρέπει στο χρήστη να διαγράψει άλλους χρήστες ίσου ή μικρότερου επιπέδου από το σύστημα. + +
+
+
+Διαγραφή Ομάδων Χρηστών - εάν θέσετε σε 1 αυτή την επιλογή, επιτρέπει στο χρήστη να διαγράψει τις ομάδες χρηστών από το σύστημα. + +
+
+
+Διαγραφή Λιστών - εάν θέσετε σε 1 αυτή την επιλογή, επιτρέπει στο χρήστη να διαγράψει τις λίστες από το σύστημα. + +
+
+
+Διαγραφή Εκστρατειών - εάν θέσετε σε 1 αυτή την επιλογή, επιτρέπει στο χρήστη να διαγράψει τις εκστρατείες από το σύστημα. + +
+
+
+Διαγραφή Εισ-Ομάδων - εάν θέσετε σε 1 αυτή την επιλογή, επιτρέπει στο χρήστη να διαγράψει τις Εισ-Ομάδες από το σύστημα. + +
+
+
+Διαγράψτε τους Απομακρυσμένους Χειριστές - εάν θέσετε σε 1 αυτή την επιλογή, επιτρέπει στο χρήστη να διαγράψει τους απομακρυσμένους χειριστές από το σύστημα. + +
+
+
+Εισαγωγή Οδηγών - εάν θέσετε σε 1 αυτή την επιλογή, επιτρέπει στο χρήστη να εισάγει τους οδηγούς στον πίνακα vicidial_list μέσω του βασισμένου σε Ιστοσελίδα Εισαγωγέα οδηγών. + +
+
+
+Λεπτομέρειες Εκστρατείας - εάν θέσετε σε 1 αυτή την επιλογή, επιτρέπει στο χρήστη να δει και να τροποποιήσει τα λεπτομερή στοιχεία της εκστρατείας. + +
+
+
+AGC Πρόσβαση Διαχειριστή - εάν θέσετε σε 1 αυτή την επιλογή, επιτρέπει στο χρήστη να συνδεθεί στις σελίδες του astGUIclient ως διαχειριστής. + +
+
+
+AGC διαγραφή τηλεφώνων - εάν θέσετε σε 1 αυτή την επιλογή, επιτρέπει στο χρήστη να διαγράψει τα τηλέφωνα στις σελίδες του διαχειριστή του astGUIclient. + +
+
+
+Διαγραφή Βοηθού - εάν θέσετε σε 1 αυτή την επιλογή, επιτρέπει στο χρήστη να διαγράψει τους οδηγούς της εκστρατείας . + +
+
+
+Τροποποιήστε τους οδηγούς - αυτή η επιλογή εάν τη θέσετε σε 1, επιτρέπει στο χρήστη να τροποποιήσει τους οδηγούς στη σελίδα αποτελεσμάτων αναζήτησης οδηγών. + +
+
+
+Αλλαγή Εκστρατείας Χειριστού - εάν θέσετε σε 1 αυτή την επιλογή, επιτρέπει στο χρήστη να αλλάξει την εκτρατεία όπου ένας πράκτορας έχει συνδεθεί . + +
+
+
+Διαγραφή Φίλτρων - Αυτή η επιλογή επιτρέπει στον χειριστή να διαγράφει φίλτρα από το σύστημα. + +
+
+
+Διαγραφή Χρόνων Κλήσεων - Αυτή η επιλογή επιτρέπει στον χρήστη να διαγράφει εγγραφές χρόνων κλήσεων και καταστάσεων από το σύστημα. + +
+
+
+Τροποποίηση Χρόνων Κλήσεων - Αυτή η επιλογή επιτρέπει στον χρήστη εμφανίσει και να τροποποιήσει τους χρόνους κλήσεων και τις εγγραφές χρόνων κλήσεων κατάστασης. Δεν χρειάζεται να είναι ενεργή αυτή η επιλογή εάν μόνο χρειάζεται η αλλαγή της επιλογής των χρόνων κλήσεων στην οθόνη των εκστρατειών. + +
+
+
+Τροποποιήστε τα τμήματα - αυτές οι επιλογές επιτρέπουν στοχρήστη για να δουν και να τροποποιήσουν κάθε ένας αρχείατμημάτων. Εάν θέστε 0, ο χρήστης θα είναι σε θέση ναδει τον κατάλογο τμημάτων, αλλά όχι την οθόνηλεπτομέρειας ή τροποποίησης ενός αρχείου σε εκείνο το τμήμα. + +
+
+
+Εκθέσεις άποψης - αυτή η επιλογή επιτρέπει στο χρήστη για να δειτις εκθέσεις VICIDIAL. + + + + +



+ +VICIDIAL_CAMPAIGNS ΠΙΝΑΚΑΣ

+
+
+ID Εκστρατείας - Αυτό είναι το σύντομο όνομα της εκστρατείας, δεν μπορεί να διορθωθεί μετά από την αρχική παράδοση, δεν μπορεί να περιέχει κενά και πρέπει να είναι μεταξύ 2 και 8 χαρακτήεςh. + +
+
+
+Ονομα Εκστρατείας - Αυτό είναι η περιγραφή της εκστρατείας, πρέπει να είναι μεταξύ 6 και 40 χαρακτήρες. + +
+
+
+Περιγραφή εκστρατείας - αυτό είναι ένας τομέας υπομνημάτων γιατην εκστρατεία, είναι προαιρετικό και μπορεί να είναι έναμέγιστο 255 χαρακτήρων στο μήκος. + +
+
+
+Ημερομηνία αλλαγής εκστρατείας - αυτό είναι η τελευταία φοράότι οι τοποθετήσεις για αυτήν την εκστρατεία τροποποιήθηκαν απόκαμιά άποψη. + +
+
+
+Τελευταία ημερομηνία σύνδεσης εκστρατείας - αυτό είναι ητελευταία φορά ότι ένας πράκτορας καταγράφηκε σε αυτήν τηνεκστρατεία. + +
+
+
+Η εκστρατεία Stats αναζωογονεί - αυτό το τετραγωνίδιο θαεπιτρέψει ότι για να αναγκάσετε τα vicidial statsαναζωογονείτε, ακόμα κι αν η εκστρατεία δεν είναι ενεργός. + +
+
+
+Ενεργοποίηση - Εδώ μπορείτε να θέσετε την εκστρατεία ενεργή ή μη ενεργή. Εάν είναι μη ενεργή, κανένας δεν μπορεί να συνδεθεί σε αυτήν. + +
+
+
+Τηλ.Σύνδεση Στάθμευσης - Εδώ μπορείτε να ορίσετε την μουσική αναμονής για το VICIDIAL. Επιβεβαιώστε, ότι η εσωτ.σύνδεση βρίσκεται στο extensions.conf και ότι δείχνει το αρχείο παρακάτω. + +
+
+
+ν Αρχείου Στάθμευσης - Εδώ μπορείτε να προσαρμόσετε την μουσική αναμονής για το VICIDIAL. Επιβεβαιώστε ότι το αρχείο έχει 10 χαρακτήρες ή λιγότερους και ότι το αρχείο βρίσκεται στον κατάλογο /var/lib/asterisk/sounds. + +
+
+
+Ιστοσελίδα - Αυτή είναι η προσαρμοσμένη διεύθυνση που θα σας κατευθύνει για κλήσεις που έρχονται σε αυτήν την ομάδα. + +
+
+
+Επιτρέπει τους Closers - Εδώ ορίζετε εάν οι χρήστες της εκστρατείας θα έχουν την επιλογή να στείλουν την κλήση σε έναν closer. + +
+
+
+Κατάσταση Κλήσης - Εδώ ορίζετε τις καταστάσεις που θέλετε να κληθούν μέσα στις λίστες, οι οποίες είναι ενεργές για την εκστρατεία παρακάτω. Να προσθέσει μια άλλη θέση στον πίνακα, να το επιλέξει από τονεξελισσόμενους κατάλογο και τον κρότο ΠΡΟΣΘΕΤΕΙ. Για να αφαιρέσετεμια από τις θέσεις πινάκων, χτυπήστε στη REMOVE σύνδεση δίπλαστη θέση που θέλετε να αφαιρέσετε. + +
+
+
+Ταξινόμηση Λίστας - Σε αυτόν τον κατάλογο επιλογών μπορείτε να επιλέξετε πώς οι οδηγοί, που ταιριάζουν με τις καταστάσεις που επιλέξατε παραπάνω, θα τοποθετηθούν στον 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 θα τρέξει. + +
+
+
Μέθοδος Κλήσης - This field is the way to define how dialing is to take place. If MANUAL then the auto_dial_level will be locked at 0 unless Μέθοδος Κλήσης is changed. If RATIO then the normal dialing a number of lines for Active agents. ADAPT_HARD_LIMIT will dial predictively up to the dropped percentage and then not allow aggressive dialing once the drop limit is reached until the percentage goes down again. ADAPT_TAPERED allows for running over the dropped percentage in the first half of the shift -as defined by call_time selected for campaign- and gets more strict as the shift goes on. ADAPT_AVERAGE tries to maintain an average or the dropped percentage not imposing hard limits as aggressively as the other two methods. Δεν μπορείτε να αλλάξετε το επίπεδο Αυτόματης Κλήσης, εάν έχετε ορίσει κάποια μέθοδο Προσαρμογής Κλήσεων. Μόνο ο διακομιστής μπορεί να το αλλάξει όταν είναι σε διαδικασία αυτόματων κλήσεων. -. - -
-
-
-Επίπεδο Αυτόματης Κλήσης - Εδώ είναι που καθορίζεται πόσες γραμμές θα χρησιμοποιούνται ανά ενεργό χρήστη. Μηδέν (0) σημαίνει ότι η αυτόματη κλήση είναι μη ενεργή και οι χρήστες πατούν το πλήκτρο για την κλήση κάθε αριθμού. Διαφορετικά, το σύστημα καλεί γραμμές ίσες με τους ενεργούς χρήστες, πολλαπλασιασμένους με το επίπεδο κλήσης και σύμφωνα με το πόσες γραμμές η εκστρτεία σε κάθε διακομιστή επιτρέπει. - -
-
-
-Διαθέσιμα μόνο ετικέτες -<\/B> Εάν θέσετε σε Ν αυτό το πεδίο, θα αφήσει εκτός τις καταστάσεις των χειριστών out INCALL και QUEUE, καθώς υπολογίζεται ο αριθμός των κλήσεων όταν δεν είναι σε κατάσταση κλήσης MANUAL. Προκαθορισμένα είναι Ο. - -
-
-
-Ποσοστό Ορίου Εγκατ. Κλήσεων -<\/B> Σε αυτό το πεδίο μπορείτε να θέσετε το όριο του ποσοστού εγκατ. κλήσεων καθώς χρησιμοποιείτε μία μέθοδος προσαρμοσμένης-πρόβλεψη κλήσεων, όχι MANUAL ή RATIO. - -
-
-
-Μέγιστο Επίπεδο Προσαρμογής Κλήσεων -<\/B> Σε αυτό το πεδίο μπορείτε να θέσετε το όριο για το όριο του αριθμού γραμμών για κάθε χειριστή καθώς χρησιμοποιείτε μία μέθοδος προσαρμοσμένης-πρόβλεψη κλήσεων, όχι MANUAL ή RATIO. Αυτός ο αριθμός μπορεί να είναι μεγαλύτερος από το επίπεδο αυτόματης κλήσης εάν το υλικό σας το υποστηρίζει. Η τιμή πρέπει να είναι θετικός αριθμός μεγαλύτερος από ένα και μπορεί να έχει δεκαδικά. Προκαθορισμένα είναι 3.0. - -
-
-
-Τελευταίος Χρόνος Διακομιστή -<\/B> Αυτό το πεδίο χρησιμοποιείτε μόνο από την μέθοδο ADAPT_TAPERED. Θα πρέπει να καταχωρήσετε την ώρα και τα λεπτά που θα σταματήσει τις κλήσεις η εκστρατεία. Αυτό επιτρέπει στον αλγόριθμο να αποφασίσει πόσο επιθετικά θα κάνει κλήσεις και πόσο χρόνο. - -
-
-
-Ενταση Τροποποίησης Προσαρμογής -<\/B> Αυτό το πεδίο χρησιμοποιείτε για να αλλάζει ένταση προβλέψεων είτε υψηλότερα ή χαμηλότερα. Προκαθορισμένα είναι 0. Αυτό το πεδίο δεν χρησιμοποιείται από τις μεθόδους MANUAL ή RATIO. - -
-
-
-Επίπεδο Κλήσεων Μεταβολής Στόχου -<\/B> Αυτό το πεδίο χρησιμοποιείτε για να έχει στόχο ένα συγκεκριμένο αριθμό χειριστών να περιμένουν κλήσεις ή κλήσεις να περιμένουν για χειριστές. Π.χ. εάν θέλετε πάντα να έχετε κατά μέσο όρο έναν χειριστή ελεύθερο για ν παίρνει τις κλήσεις, τότε πρέπει να το θέσετε σε -1. Εάν στόχος είναι να έχετε πάντα μία κλήση σε αναμονή για ένα χειριστή, τότε πρέπει να το θέσετε σε 1. Προκαθορισμένα είναι 0. Αυτό το πεδίο δεν χρησιμοποιείται από τις μεθόδους MANUAL ή RATIO. - -
-
-
-Επόμενη Κλήση Χρήστη - Αυτό προσδιορίζει ποιος χρήστης λαμβάνει την επόμενη κλήση που είναι διαθέσιμη: -
  - 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. - -
-
-
-Παράλειψη Κωδικού Τηλεφώνου -<\/B> Αυτό το πεδίο σας επιτρέπει να αφήσετε εκτός το πεδίο phone_code καθώς γίνονται οι κλήσεις. Προκαθορισμένα είναι Ο. - -
-
-
-CallerID Εκστρατείας - Αυτός ο τομέας επιτρέπει την αποστολή ενός αριθμού συνήθειας callerid στις εξερχόμενες κλήσεις. Αυτό είναι ο αριθμός που θα παρουσίαζε στο callerid του προσώπου που καλείτε. Η προεπιλογή είναι ΑΓΝΩΣΤΗ. Εάν χρησιμοποιείτε το T1 ή Eί να σχηματίσει έξω αυτήν την επιλογή είναι μόνο διαθέσιμος εάν χρησιμοποιετε PRIs - ISDN Tί ή Eί - που ανοίγουν το χαρακτηριστικό γνώρισμα συνήθειας callerid, αυτό δεν θα λειτουργήσει με την υπηρεσία ληστεύω-κομματιών - RBS - κυκλώματα. Αυτό θα λειτουργήσει επίσης μέσω του περισσότερου VOIP - ΓΟΥΛΙΑ ή κορμοί IAX - προμηθευτές που επιτρέπουν δυναμικό εξερχόμενο callerID. Η σνήθεια callerID ισχύει μόνο για τις κλήσεις που τοποθετούνται για την εκστρατεία VICIDIAL άμεσα, οποιεσδήποτε κλήσεις ή μεταφορές 3$ων συμβαλλόμενων μερών δεν θα στείλουν τη συνήθεια callerID. ΣΗΜΕΙΩΣΗ: Μερικές φορές να βάλει ΑΓΝΩΣΤΗ ή ΙΔΙΩΤΙΚΗ στον τομέα θα παραγάγει την αποστολή του αριθμού προεπιλογής σας callerID από το μεταφορέα σας με τις κλήσεις. Μπορείτε να θελήσετε να εξετάσετε αυτό και να υποβάλετε 0000000000 ο τομέας callerid αντ' αυτού εάν δεν θέλετε να σας στείλετε CallerID. - -
-
-
-Τηλ.Σύνδεση Εκστρατείας VDAD - Αυτό το πεδίο επιτρέπει γαι μία προσαρμόσιμη VDAD εσωτ.σύνδεση μεταφοράς. Αυτό σας επιτρέπει να χρησιμοποιήσετε διαφορετικές διαδικασίες VDADtransfer.agi, σύμφωνα με την κστρατεία. Η προκαθορισμένη AGI μεταφορά - εσωτ.σύνδ. 8365 agi VDADtransfer.agi - στέλνει αμέσως τις κλήσεις στον χρήστη, μόλις το σηκώσουν. Ενα πρόσθετο AGI παράεα πολιτικής έρευνας συμπεριλαμβάνεται - 8366 agi - VDADtransferSURVEY.agi - όπου παίζει ένα μήνυμα στο κληθέν πρόσωπο και επιτρέπει να κάνουν επιλογς με τα πλήκτρα. - -
-
-
-Τηλ.Επέκταση εκσρατείας Ηχογρ - αυτό το πεδίο επιτρέπει να ορίσετε μία επέκταση ηχογράφησης που χρησιμοποιείται με το VICIDIAL. Αυτό επιτρέπει να χρησιμοποιήσετε διαφορετικές επεκτάσεις ανάλογα με πόσο χρόνο θέλετε να επιτρέψετε μία ηχογράφηση και ποιο τύπος κωδικοποιητή-αποκωδικοποιητή θα χρσιμοποιηθεί. Η προεπιλογή είναι 8309 και θα καταγράψει με το σχήμα WAV μέχρι μια ώρα. Μια άλλη επιλογή που περιλαμβάνεται στα παραδείγματα είναι 8310 που θα καταγράψουν με το σχήμα GSM για μέχρι μια ώρα. - -
-
-
-Ηχογράφηση Εκστρατείας -<\/B> Αυτές οι επιλογές σας επιτρέπουν να διαλέξετε πιο επίπεδο ηχογράφησης επιτρέπετε στην εκστρατεία. NEVER θα απενεργοποιήσει την ηχογράφηση στον πελάτη. ONDEMAND είναι το προκαθορισμένο και επιτρέπει στον χειριστή να ξεκινάει και να σταματάει την ηχογράφηση. ALLCALLS ξεκινάει η ηχογράφηση όποτε η κλήση μεταφέρετε στον χειριστή. - -
-
-
-Όνομα αρχείου ηχογρ εκστρατείας - αυτό το πεδίο επιτρέπει να προσαρμόσετε το όνομα της ηχογράφησης, όταν η ηχογράφηση της εκστρατείας είναι ONDEMAND ή ALLCALLS. Οι μεταβλητές είναι CAMPAIGN CUSTPHONE FULLDATE TINYDATE EPOCH AGENT. Η προεπιλογή είναι FULLDATE_ΧΕΙΡΙΣΤΗΣκαι θα μοιάζει με το 20051020-103108_6666. Ένα άλλο παράδειγμα είναι CAMPAIGN_TINYDATE_CUSTPHONE που θα μοιάζει με το TESTCAMP_51020103108_3125551212. 50 char max. - -
-
-
-Καθυστέρηση Ηχογράφησης -<\/B> Μόνο για ηχογραφήσεις ALLCALLS και ALLFORCE. Προκαθορισμένα είναι 0. - -
-
-
-Βοηθός εκστρατείας - αυτές οι επιλογές επιτρέπουν να επιλέξετε τον Βοηθό που θα εμφανιστεί στην οθόνη των χειριστών για αυτήν την εκστρατεία. Επιλέξτε NONE για να μην παρουσιάσετε κανένα χειρόγραφο για αυτήν την εκστρατεία. - -
-
-
-Κατά την έναρξη κλήσης - αυτές οι επιλογές επιτρέπουν να επιλέξετε εάν θέλετε την αυτόματη έναρξη μίας ιστο σελίδας σε ένα διαφορετικό παράθυρο, αυτόματη μεάβαση στον Βοηθό ή τίποτα. - -
-
-
-Μήνυμα αυτόματου τηλεφωνητού - αυτός το πεδίο χρησιμοποιείτε για τις τυφλές κλήσεις μεταφοράς όταν παίρνει ο χειριστής έναν αυτόματο τηλεφωνητή και χτυπά στο πλήκτρο μηνυμάτων αυτόματων τηλεφωνητών στο πλαίσιο διασκέψεων μεταφοράς. Πρέπει το θέσετε αυτό στο dialplan - extensions.conf - και σιγουρευτείτε ότι παίζει ένα αρχείο μουσικής κατόπιν κλείνει το τηλέφωνο. - -
-
-
-AMD στέλνει στο VM - αυτές οι επιλογές επιτρέπουν να καθορίσετε εάν ένα μήνυμα αφήνεται σε έναν αυτόματο τηλεφωνητή όταν ανιχνεύεται ότι η κλήση είναι ένας αυτόματος τηλεφωνητής και εάν το AMD είναι ενεργό. - -
-
-
-Xfer- Συνδ DTMF - αυτά τα τέσσερα πεδία επιτρέπουν να έχετε δύο σύνολα συνδιάσκεψης μεταφοράς και DTMF. Όταν η κλήση ή η εκστρατεία φορτώνεται, ο Βοηθός θα παρουσιάσει δύο πλήκτρα στο πλαίσιο μεταφορά-διασκέψεων και αυτόματα θα παρουσιάσει τα πεδία αριθμό για κλήση και στείλε DTMF όταν πατηθεί. Εάν θέλετε να επιτρέψετε τις μεταφορές σε σύμβουλο, ενός fronter σε έναν closer, θα πρέπει να θέσετε CXFER στο πεδίο number-to-dial και το σωστό κείμενο κλήσης θα σταλεί να κάνει μία τοπική μεταφορά σε σύμβουλο. Καθώς η κλήση θα απαντηθεί, μπορείτε να αφήσετε το πελάτη με τον χειριστή closer και να συνεχίσετε στην επόμενη κλήση πατώντας το πλήκτρο ΑΠΟΧΩΡΗΣΗ 3μελής ΚΛΗΣΗΣ. Εάν θέλετε να μεταφέρετε τους πελάτες σε AGI διαδικασία ή σε IVR, τότε θα πρέπει να θέσετε AXFER στο πεδίο number-to-dial. Μπορείτε επίσης να θέσετε και μία προσωπική τηλ. σύνδεση μετά το AXFER ή CXFER. - -
-
-
-Κλήση Εναλ Αρ Χρήστη - Αυτή η επιλογή επιτρέπει στον χειριστή να κάνει χειροκίνητη κλήση του εναλλακτικού αριθμού τηλεφώνου ή το πεδίο 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 χαρακτήρες. Must be a number greater than 100. - -
-
-
-Ονομα Λίστας - Αυτή είναι η περιγραφή της λίστας, πρέπει να είναι μεταξύ 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 όταν πατηθεί. Εάν θέλετε να επιτρέψετε τις μεταφορές σε σύμβουλο, ενός fronter σε έναν closer, θα πρέπει να θέσετε CXFER στο πεδίο number-to-dial και το σωστό κείμενο κλήσης θα σταλεί να κάνει μία τοπική μεταφορά σε σύμβουλο. Καθώς η κλήση θα απαντηθεί, μπορείτε να αφήσετε το πελάτη με τον χειριστή closer και να συνεχίσετε στην επόμενη κλήση πατώντας το πλήκτρο ΑΠΟΧΩΡΗΣΗ 3μελής ΚΛΗΣΗΣ. Εάν θέλετε να μεταφέρετε τους πελάτες σε AGI διαδικασία ή σε IVR, τότε θα πρέπει να θέσετε AXFER στο πεδίο number-to-dial. Μπορείτε επίσης να θέσετε και μία προσωπική τηλ. σύνδεση μετά το AXFER ή CXFER. - -
-
-
-Δευτερ. Εγκαταλ. Κλήσης - Ο αριθμός των δευτερολέπτων από την στιγμή που ο πελάτης σηκώνει το τηλ μέχρι η κλήση να θεωρηθεί εγκαταλειμένη. Μόνο για εξερχόμενες κλήσεις . - -
-
-
-Φωνητικό Ταχυδρομείο - Εάν έχει οριστεί, οι κλήσεις που φυσιολογικά θα ΕΓΚΑΤΑΛΕΙΠΟΝΤΑΝ, θα κατευθυνθούν σε αυό το φωνητικό ταχυδρομείο, ώστε να ακούσετε και να αφήσετε ένα μήνυμα. - -
-
-
-Μήνυμα Εγκατάλειψης - Εάν είναι Υ θα παίξει ένα μήνυμα στον πελάτη μετά το πέρας των δευτερολέπτων Εγκατάλειψης, χωρίς να μεταφερθεί σε έναν χειριστή. Αυτή η επιλογή υπερβαίνει την αποστολή σε θυρίδα ηχητικού μηνύματος εάν είναι Υ. - -
-
-
-Εσωτ.Σύνδεση Εγκατάλειψης - Αυτή είναι η εσωτ.σύνδεση του πλάνου κλήσεων, όπου βρίσκεται το ηχητικό αρχείο της Εγκατάλειψης στον διακομιστή. - - - -



- -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, lead_id, campaign, phone_login, group, channel_group, SQLdate, epoch, uniqueid, customer_zap_channel, server_ip, SIPexten, session_id. 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?

You can also use an iframe to load a separate window within the SCRIPT tab, here is an example with prepopulated variables: - -
-<iframe src="http://astguiclient.sf.net/test_VICIDIAL_output.php?lead_id=--A--lead_id--B--&vendor_id=--A--vendor_lead_code--B--&list_id=--A--list_id--B--&gmt_offset_now=--A--gmt_offset_now--B--&phone_code=--A--phone_code--B--&phone_number=--A--phone_number--B--&title=--A--title--B--&first_name=--A--first_name--B--&middle_initial=--A--middle_initial--B--&last_name=--A--last_name--B--&address1=--A--address1--B--&address2=--A--address2--B--&address3=--A--address3--B--&city=--A--city--B--&state=--A--state--B--&province=--A--province--B--&postal_code=--A--postal_code--B--&country_code=--A--country_code--B--&gender=--A--gender--B--&date_of_birth=--A--date_of_birth--B--&alt_phone=--A--alt_phone--B--&email=--A--email--B--&security_phrase=--A--security_phrase--B--&comments=--A--comments--B--&user=--A--user--B--&campaign=--A--campaign--B--&phone_login=--A--phone_login--B--&fronter=--A--fronter--B--&closer=--A--user--B--&group=--A--group--B--&channel_group=--A--group--B--&SQLdate=--A--SQLdate--B--&epoch=--A--epoch--B--&uniqueid=--A--uniqueid--B--&customer_zap_channel=--A--customer_zap_channel--B--&server_ip=--A--server_ip--B--&SIPexten=--A--SIPexten--B--&session_id=--A--session_id--B--&phone=--A--phone--B--" style="width:580;height:290;background-color:transparent;" scrolling="auto" frameborder="0" allowtransparency="true" id="popupFrame" name="popupFrame" width="460" height="290"> -</iframe> -
- -
-
-
-Ενεργός - αυτό καθορίζει εάν αυτός ο οδηγός μπορεί να επιλεχτεί για να χρησιμοποιηθεί από μια εκστρατεία. - - - - - -



- -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) σημαίνει ότι η αυτόματη κλήση είναι μη ενεργή και οι χρήστες πατούν το πλήκτρο για την κλήση κάθε αριθμού. Διαφορετικά, το σύστημα καλεί γραμμές ίσες με τους ενεργούς χρήστες, πολλαπλασιασμένους με το επίπεδο κλήσης και σύμφωνα με το πόσες γραμμές η εκστρτεία σε κάθε διακομιστή επιτρέπει. Το ADAPT τετραγωνίδιο ΣΥΜΠΛΗΡΩΜΑΤΙΚΗΣ ΠΡΟΜΉΘΕΙΑΣ επιτρέπει σεσας για να αναγκάσει ένα νέο επίπεδο πινάκων ακόμα κι αν ημέθοδος πινάκων είναι σε έναν ADAPT τρόπο. Αυτό είναιχρήσιμο εάν υπάρχει μια δραματική μετατόπιση στην ποιότητα τωνμολύβδων και θέλετε να αλλάξετε δραστικά το dial_level με τοχέρι. + +
+
+
+Διαθέσιμα μόνο ετικέτες - Εάν θέσετε σε Ν αυτό το πεδίο, θα αφήσει εκτός τις καταστάσεις των χειριστών out INCALL και QUEUE, καθώς υπολογίζεται ο αριθμός των κλήσεων όταν δεν είναι σε κατάσταση κλήσης MANUAL. Προκαθορισμένα είναι Ο. + +
+
+
+Ποσοστό Ορίου Εγκατ. Κλήσεων - Σε αυτό το πεδίο μπορείτε να θέσετε το όριο του ποσοστού εγκατ. κλήσεων καθώς χρησιμοποιείτε μία μέθοδος προσαρμοσμένης-πρόβλεψη κλήσεων, όχι MANUAL ή RATIO. + +
+
+
+Μέγιστο Επίπεδο Προσαρμογής Κλήσεων - Σε αυτό το πεδίο μπορείτε να θέσετε το όριο για το όριο του αριθμού γραμμών για κάθε χειριστή καθώς χρησιμοποιείτε μία μέθοδος προσαρμοσμένης-πρόβλεψη κλήσεων, όχι MANUAL ή RATIO. Αυτός ο αριθμός μπορεί να είναι μεγαλύτερος από το επίπεδο αυτόματης κλήσης εάν το υλικό σας το υποστηρίζει. Η τιμή πρέπει να είναι θετικός αριθμός μεγαλύτερος από ένα και μπορεί να έχει δεκαδικά. Προκαθορισμένα είναι 3.0. + +
+
+
+Τελευταίος Χρόνος Διακομιστή - Αυτό το πεδίο χρησιμοποιείτε μόνο από την μέθοδο ADAPT_TAPERED. Θα πρέπει να καταχωρήσετε την ώρα και τα λεπτά που θα σταματήσει τις κλήσεις η εκστρατεία. Αυτό επιτρέπει στον αλγόριθμο να αποφασίσει πόσο επιθετικά θα κάνει κλήσεις και πόσο χρόνο. + +
+
+
+Ενταση Τροποποίησης Προσαρμογής - Αυτό το πεδίο χρησιμοποιείτε για να αλλάζει ένταση προβλέψεων είτε υψηλότερα ή χαμηλότερα. Προκαθορισμένα είναι 0. Αυτό το πεδίο δεν χρησιμοποιείται από τις μεθόδους MANUAL ή RATIO. + +
+
+
+Επίπεδο Κλήσεων Μεταβολής Στόχου - Αυτό το πεδίο χρησιμοποιείτε για να έχει στόχο ένα συγκεκριμένο αριθμό χειριστών να περιμένουν κλήσεις ή κλήσεις να περιμένουν για χειριστές. Π.χ. εάν θέλετε πάντα να έχετε κατά μέσο όρο έναν χειριστή ελεύθερο για ν παίρνει τις κλήσεις, τότε πρέπει να το θέσετε σε -1. Εάν στόχος είναι να έχετε πάντα μία κλήση σε αναμονή για ένα χειριστή, τότε πρέπει να το θέσετε σε 1. Προκαθορισμένα είναι 0. Αυτό το πεδίο δεν χρησιμοποιείται από τις μεθόδους MANUAL ή RATIO. + +
+
+
+Ταυτόχρονες μεταφορές - αυτή η ρύθμιση χρησιμοποιείται για νακαθορίσει τον αριθμό κλήσεων που μπορεί να σταλεί στουςπράκτορες συγχρόνως. Συνιστάται αυτή η ρύθμιση να αφήνεται στοΑΥΤΟΚΙΝΗΤΟ. Αυτός ο τομέας δεν χρησιμοποιείται με τη ΧΕΙΡΩΝΑΚΤΙΚΗμέθοδο πινάκων. + +
+
+
+Αυτόματος ALT-ARJCMO'S που σχηματίζει - αυτή η ρύθμισηχρησιμοποιείται για να σχηματίσει αυτόματα τους εναλλάσσομαιτομείς αριθμού σχηματίζοντας σε ΑΝΑΛΟΓΙΑ και ΝΑ ΠΡΟΣΑΡΜΟΣΕΙ τιςμεθόδους πινάκων όταν δεν υπάρχει καμία επαφή στον κύριοτηλεφωνικό αριθμό για έναν μόλυβδο, τις θέσεις NA, β,συνεχούς ρεύματος και ν. Αυτή η ρύθμιση δεν χρησιμοποιείται με τηΧΕΙΡΩΝΑΚΤΙΚΗ μέθοδο πινάκων. + +
+
+
+Επόμενη Κλήση Χρήστη - Αυτό προσδιορίζει ποιος χρήστης λαμβάνει την επόμενη κλήση που είναι διαθέσιμη: +
  - 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. + +
+
+
+Παράλειψη Κωδικού Τηλεφώνου - Αυτό το πεδίο σας επιτρέπει να αφήσετε εκτός το πεδίο phone_code καθώς γίνονται οι κλήσεις. Προκαθορισμένα είναι Ο. + +
+
+
+CallerID Εκστρατείας - Αυτός ο τομέας επιτρέπει την αποστολή ενός αριθμού συνήθειας callerid στις εξερχόμενες κλήσεις. Αυτό είναι ο αριθμός που θα παρουσίαζε στο callerid του προσώπου που καλείτε. Η προεπιλογή είναι ΑΓΝΩΣΤΗ. Εάν χρησιμοποιείτε το T1 ή Eί να σχηματίσει έξω αυτήν την επιλογή είναι μόνο διαθέσιμος εάν χρησιμοποιετε PRIs - ISDN Tί ή Eί - που ανοίγουν το χαρακτηριστικό γνώρισμα συνήθειας callerid, αυτό δεν θα λειτουργήσει με την υπηρεσία ληστεύω-κομματιών - RBS - κυκλώματα. Αυτό θα λειτουργήσει επίσης μέσω του περισσότερου VOIP - ΓΟΥΛΙΑ ή κορμοί IAX - προμηθευτές που επιτρέπουν δυναμικό εξερχόμενο callerID. Η σνήθεια callerID ισχύει μόνο για τις κλήσεις που τοποθετούνται για την εκστρατεία VICIDIAL άμεσα, οποιεσδήποτε κλήσεις ή μεταφορές 3$ων συμβαλλόμενων μερών δεν θα στείλουν τη συνήθεια callerID. ΣΗΜΕΙΩΣΗ: Μερικές φορές να βάλει ΑΓΝΩΣΤΗ ή ΙΔΙΩΤΙΚΗ στον τομέα θα παραγάγει την αποστολή του αριθμού προεπιλογής σας callerID από το μεταφορέα σας με τις κλήσεις. Μπορείτε να θελήσετε να εξετάσετε αυτό και να υποβάλετε 0000000000 ο τομέας callerid αντ' αυτού εάν δεν θέλετε να σας στείλετε 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. + +
+
+
+Καθυστέρηση Ηχογράφησης - Μόνο για ηχογραφήσεις ALLCALLS και ALLFORCE. Προκαθορισμένα είναι 0. + +
+
+
+Βοηθός εκστρατείας - αυτές οι επιλογές επιτρέπουν να επιλέξετε τον Βοηθό που θα εμφανιστεί στην οθόνη των χειριστών για αυτήν την εκστρατεία. Επιλέξτε NONE για να μην παρουσιάσετε κανένα χειρόγραφο για αυτήν την εκστρατεία. + +
+
+
+Κατά την έναρξη κλήσης - αυτές οι επιλογές επιτρέπουν να επιλέξετε εάν θέλετε την αυτόματη έναρξη μίας ιστο σελίδας σε ένα διαφορετικό παράθυρο, αυτόματη μεάβαση στον Βοηθό ή τίποτα. + +
+
+
+Μήνυμα αυτόματου τηλεφωνητού - αυτός το πεδίο χρησιμοποιείτε για τις τυφλές κλήσεις μεταφοράς όταν παίρνει ο χειριστής έναν αυτόματο τηλεφωνητή και χτυπά στο πλήκτρο μηνυμάτων αυτόματων τηλεφωνητών στο πλαίσιο διασκέψεων μεταφοράς. Πρέπει το θέσετε αυτό στο dial plan - extensions.conf - και σιγουρευτείτε ότι παίζει ένα αρχείο μουσικής κατόπιν κλείνει το τηλέφωνο. + +
+
+
+AMD στέλνει στο VM - αυτές οι επιλογές επιτρέπουν να καθορίσετε εάν ένα μήνυμα αφήνεται σε έναν αυτόματο τηλεφωνητή όταν ανιχνεύεται ότι η κλήση είναι ένας αυτόματος τηλεφωνητής και εάν το AMD είναι ενεργό. + +
+
+
+Xfer- Συνδ DTMF - αυτά τα τέσσερα πεδία επιτρέπουν να έχετε δύο σύνολα συνδιάσκεψης μεταφοράς και DTMF. Όταν η κλήση ή η εκστρατεία φορτώνεται, ο Βοηθός θα παρουσιάσει δύο πλήκτρα στο πλαίσιο μεταφορά-διασκέψεων και αυτόματα θα παρουσιάσει τα πεδία αριθμό για κλήση και στείλε DTMF όταν πατηθεί. Εάν θέλετε να επιτρέψετε τις μεταφορές σε σύμβουλο, ενός fronter σε έναν closer, θα πρέπει να θέσετε CXFER στο πεδίο number-to-dial και το σωστό κείμενο κλήσης θα σταλεί να κάνει μία τοπική μεταφορά σε σύμβουλο. Καθώς η κλήση θα απαντηθεί, μπορείτε να αφήσετε το πελάτη με τον χειριστή closer και να συνεχίσετε στην επόμενη κλήση πατώντας το πλήκτρο ΑΠΟΧΩΡΗΣΗ 3μελής ΚΛΗΣΗΣ. Εάν θέλετε να μεταφέρετε τους πελάτες σε AGI διαδικασία ή σε IVR, τότε θα πρέπει να θέσετε AXFER στο πεδίο number-to-dial. Μπορείτε επίσης να θέσετε και μία προσωπική τηλ. σύνδεση μετά το AXFER ή CXFER. + +
+
+
+Κλήση Εναλ Αρ Χρήστη - Αυτή η επιλογή επιτρέπει στον χειριστή να κάνει χειροκίνητη κλήση του εναλλακτικού αριθμού τηλεφώνου ή το πεδίο 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.php. είναι ευπροσδιόριστοι ανά εκστρατεία στοκατώτατο σημείο της οθόνης λεπτομέρειας άποψης εκστρατείας καιαποθηκεύονται στον πίνακα vicidial_agent_log. Η προεπιλογήείναι ν. + +
+
+
+Θέστε εκτός λειτουργίας αλλάζει τα στοιχεία πελατών - εάνθέστε το Υ, δεν αλλάζει οποιων δήποτε από το αρχείο στοιχείωνπελατών όταν διαθέσεις πρακτόρων η κλήση. Η προεπιλογή είναι ν. + +
+
+
+Επιτρέψτε τους κανένας-χοάνη-μολύβδους Logins - εάν θέστε τοΥ, επιτρέπει στους πράκτορες στη σύνδεση στην εκστρατεία ακόμα κιαν δεν υπάρχει κανένας μόλυβδος που φορτώνεται στη χοάνη γιαεκείνη την εκστρατεία. Αυτή η λειτουργία δεν απαιτείται στιςεκστρατείες στενός-τύπων. Η προεπιλογή είναι ν. + + + +



+ +VICIDIAL_ΛΙΣΤΕΣ ΠΙΝΑΚΑΣ

+
+
+ID Λίστας - Αυτό είναι το αριθμητικό όνομα της λίστας, δεν μπορεί να διορθωθεί μετά από την αρχική εισαγωγή, πρέπει να περιέχει μόνο αριθμούς και πρέπει να είναι μεταξύ 2 και 8 χαρακτήρες. Must be a number greater than 100. + +
+
+
+Ονομα Λίστας - Αυτή είναι η περιγραφή της λίστας, πρέπει να είναι μεταξύ 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 όταν πατηθεί. Εάν θέλετε να επιτρέψετε τις μεταφορές σε σύμβουλο, ενός fronter σε έναν closer, θα πρέπει να θέσετε CXFER στο πεδίο number-to-dial και το σωστό κείμενο κλήσης θα σταλεί να κάνει μία τοπική μεταφορά σε σύμβουλο. Καθώς η κλήση θα απαντηθεί, μπορείτε να αφήσετε το πελάτη με τον χειριστή closer και να συνεχίσετε στην επόμενη κλήση πατώντας το πλήκτρο ΑΠΟΧΩΡΗΣΗ 3μελής ΚΛΗΣΗΣ. Εάν θέλετε να μεταφέρετε τους πελάτες σε AGI διαδικασία ή σε IVR, τότε θα πρέπει να θέσετε AXFER στο πεδίο number-to-dial. Μπορείτε επίσης να θέσετε και μία προσωπική τηλ. σύνδεση μετά το AXFER ή CXFER. + +
+
+
+Δευτερ. Εγκαταλ. Κλήσης - Ο αριθμός των δευτερολέπτων από την στιγμή που ο πελάτης σηκώνει το τηλ μέχρι η κλήση να θεωρηθεί εγκαταλειμένη. Μόνο για εξερχόμενες κλήσεις . + +
+
+
+Φωνητικό Ταχυδρομείο - Εάν έχει οριστεί, οι κλήσεις που φυσιολογικά θα ΕΓΚΑΤΑΛΕΙΠΟΝΤΑΝ, θα κατευθυνθούν σε αυό το φωνητικό ταχυδρομείο, ώστε να ακούσετε και να αφήσετε ένα μήνυμα. + +
+
+
+Μήνυμα Εγκατάλειψης - Εάν είναι Υ θα παίξει ένα μήνυμα στον πελάτη μετά το πέρας των δευτερολέπτων Εγκατάλειψης, χωρίς να μεταφερθεί σε έναν χειριστή. Αυτή η επιλογή υπερβαίνει την αποστολή σε θυρίδα ηχητικού μηνύματος εάν είναι Υ. + +
+
+
+Εσωτ.Σύνδεση Εγκατάλειψης - Αυτή είναι η εσωτ.σύνδεση του πλάνου κλήσεων, όπου βρίσκεται το ηχητικό αρχείο της Εγκατάλειψης στον διακομιστή. + + + +



+ +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 μπορούν να κλείσουν και να τερματίσουν την κλήση, με ένα μόνο πάτημα πλήκτρου. There are two special HotKey options that you can use in conjunction with Alternate Phone number dialing, ALTPH2 - Alternate Phone Hot Dial and ADDR3-----Address3 Hot Dial allow an agent to use a hotkey to hang up their call, stay on the same lead, and dial another contact number from that lead. + + + + + +



+ +VICIDIAL_LEAD_RECYCLE ΠΙΝΑΚΑΣ

+
+
+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. + + + + + +



+ +VICIDIAL ΑΥΤΟΜΑΤΕΣ ΘΈΣΕΙΣ ΠΙΝΑΚΩΝ ALT

+
+
+Εάν ο αυτόματος τομέας σχηματισμού ALT-ARJCMOY' τίθεται,κατόπιν οι μόλυβδοι που είναι κάτω από αυτές τις αυτόματεςθέσεις πινάκων ALT θα σχηματίσουν το alt_phone και-ή τουςτομείς address3 τους αφότου τίθενται οποιεσδήποτε από αυτέςτις θέσεις κανένας-απάντησης. + + + + + +



+ +VICIDIAL ΚΩΔΙΚΕΣ ΜΙΚΡΗΣ ΔΙΑΚΟΠΉΣ ΠΡΑΚΤΟΡΩΝ

+
+
+_ εάν ο πράκτορας διακοπή κωδικοποιώ ενεργός τομέας είμαι θέτωνα ενεργός έπειτα ο πράκτορας θα είμαι σε θέση να επι:λέγω απόαυτός διακοπή κώδικας όταν αυτός χτυπώ ο ΔΙΑΚΟΠΉ κουμπί τουςοθόνη. Αυτό το στοιχείο αποθηκεύεται έπειτα στο vicidialκούτσουρο πρακτόρων. Ο κώδικας μικρής διακοπής πρέπει ναπεριέχει μόνο τα γράμματα και τους αριθμούς και να είναιλιγότερο από 7 χαρακτήρες μακροχρόνιοι. Το όνομα κώδικα μικρήςδιακοπής δεν μπορεί να είναι πλέον από 30 χαρακτήρες. + + + + + +



+ +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, lead_id, campaign, phone_login, group, channel_group, SQLdate, epoch, uniqueid, customer_zap_channel, server_ip, SIPexten, session_id. 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?

You can also use an iframe to load a separate window within the SCRIPT tab, here is an example with prepopulated variables: + +
+<iframe src="http://astguiclient.sf.net/test_VICIDIAL_output.php?lead_id=--A--lead_id--B--&vendor_id=--A--vendor_lead_code--B--&list_id=--A--list_id--B--&gmt_offset_now=--A--gmt_offset_now--B--&phone_code=--A--phone_code--B--&phone_number=--A--phone_number--B--&title=--A--title--B--&first_name=--A--first_name--B--&middle_initial=--A--middle_initial--B--&last_name=--A--last_name--B--&address1=--A--address1--B--&address2=--A--address2--B--&address3=--A--address3--B--&city=--A--city--B--&state=--A--state--B--&province=--A--province--B--&postal_code=--A--postal_code--B--&country_code=--A--country_code--B--&gender=--A--gender--B--&date_of_birth=--A--date_of_birth--B--&alt_phone=--A--alt_phone--B--&email=--A--email--B--&security_phrase=--A--security_phrase--B--&comments=--A--comments--B--&user=--A--user--B--&campaign=--A--campaign--B--&phone_login=--A--phone_login--B--&fronter=--A--fronter--B--&closer=--A--user--B--&group=--A--group--B--&channel_group=--A--group--B--&SQLdate=--A--SQLdate--B--&epoch=--A--epoch--B--&uniqueid=--A--uniqueid--B--&customer_zap_channel=--A--customer_zap_channel--B--&server_ip=--A--server_ip--B--&SIPexten=--A--SIPexten--B--&session_id=--A--session_id--B--&phone=--A--phone--B--" style="width:580;height:290;background-color:transparent;" scrolling="auto" frameborder="0" allowtransparency="true" id="popupFrame" name="popupFrame" width="460" height="290"> +</iframe> +
+ +
+
+
+Ενεργός - αυτό καθορίζει εάν αυτός ο οδηγός μπορεί να επιλεχτεί για να χρησιμοποιηθεί από μια εκστρατεία. + + + + + +



+ +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 τον χρόνο παύσης -. - -
-
-Εβδομαδιαίοι Χρόνοι Εκκίνησης και Παύσης - Αυτοί είναι προσαρμόσιμοι χρόνοι ανά ημέρα για τον ορισμό χρόνων κλήσεων. - -
-
-Ορισμοί Χρόνων Κλήσεων Καταστάσεων - Είναι η λίστα συγκεκριμένων Ορισμών Χρόνων Κλήσεων Καταστάσεων. - -
-
-Κατάσταση Χρόνου Κλήσης Κατάστασης - Αυτό είναι ο δύο γραμμάτων κωδικός για την κατάσταση όπου ο ορισμός χρόνου κλήης είναι για. Θα πρέπει και οι Οδηγοί της εκστρατείας να έχουν δύο γράμματα κωδικούς κατάστασης για τον χρόνο κλήσης κατάστασης. - - - - -



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

-
-
-Ο 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. Σχόλια -
- -
NOTES: The Excel Lead loader functionality is enabled by a series of perl scripts and needs to have a properly configured /etc/astguiclient.conf 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. - - - - -



- - - - - - -ΠΙΝΑΚΑΣ ΤΗΛΕΦΩΝΩΝ

-
-
-Εωτ.Σύνδεση Τηλεφώνου - Αυτό το πεδίο είναι για την καταχώρηση του ονόματος του τηλεφώνου, όπως αυτό εμφανίζεται στο 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' - -
-
-
-Προκαθορισμένο Περιεχόμενο - Το προκαθορισμένο περιεχόμενο του πλάνου κλήσεων για διεργασίες του διακομιστή. Το προκαθορισμένο είναι 'προκαθορισμένο' - -
-
-
-Επίδοση Συστήματος -<\/B> Θέτοντας αυτήν την επιλογή σε Ν, θα ενεργοποιήσετε την καταγραφή στατιστικών γεγονότων επίδοσης για τον διακομιστή, συμπεριλαμβάνοντας το φόρτο του συστήματος, τις διεργασίες και τα κανάλια που χρησιμοποιεί. Προκαθορισμένα είναι Ο. - -
-
-
-Γεγονότα Διακομιστή -<\/B> Θέτοντας αυτήν την επιλογή σε Ν θα ενεργοποιήσετε την καταγραφή των γεγονότων για όλες τις διεργασίες. Επίσης, η καταγραφή γεγονότων της οθόνης θα είναι απενεργοποιημένη, εάν είναι Ν όταν το σύστημα ξεκινήσει. Προκαθορισμένα είναι Ν. - -
-
-
-Εξοδος AGI -<\/B> Θέτοντας αυτήν την επιλογή σε NONE θα απενεργοποιήσετε την έξοδο από όλες τις διαδικασίες AGI. Αν θέσετε STDERR θα σταλεί η έξοδος των AGI στο CLI. Επίσης υπάρχουν οι επιλογές FILE και BOTH. Προκαθορισμένα είναι FILE. - -
-
-
-Διακύμανση Τηλεφωνικής Κλήσης -<\/B> Καθορίζοντας αυτό το πεδίο σε Ν θα επιτρέψει στον εξυπηρετητή να ορίζει κλήσεις διακύμανσης για την εκστρατεία, ώστε το καθορισμένο επίπεδο κλήσης να μπορεί να ικανοποιείται έστω και εάν δεν υπάρχουν συνδεμένοι χειριστές σε αυτήν την εκστρατεία. Προκαθορισμένα είναι Ο. - -
-
-
-Διακύμανση εκτός ορίων -<\/B> Καθορίζει τον αριθμό των τηλ.κυκλ.συνδ. που δεν επιτρέπετε στο σύστημα να χειριστεί για Διακύμανση Τηλεφωνικής Κλήσης. - - -



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

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



- -VICIDIAL_SERVER_TRUNKS ΠΙΝΑΚΑΣ

-
-
-Οι Τηλ.Κυκλ.Συνδ. του εξυπηρετητή σας επιτρέπουν να περιορίσετε τις εξερχόμενες γραμμές που χρησιμοποιούνται στον εξυπηρετητή ανά εκστρατεία. Χωρίς αυτές τις εγγραφές, επιτρέπετε στην εκστρατεία να έχει όσες γραμμές μπορεί να έχει, μέχρι τον μέγιστο καθορισμένο αριθμό Τηλ.Κυκλ.Συνδ.. - - -







-







-ΤΕΛΟΣ -
-\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 = 'VENDOR:LEAD;CODE'; - $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'; - $RGlead_id = '1234'; - $RGcampaign = 'TESTCAMP'; - $RGphone_login = 'gs102'; - $RGgroup = 'TESTCAMP'; - $RGchannel_group = 'TESTCAMP'; - $RGSQLdate = date("Y-m-d H:i:s"); - $RGepoch = date("U"); - $RGuniqueid = '1163095830.4136'; - $RGcustomer_zap_channel = 'Zap/1-1'; - $RGserver_ip = '10.10.10.15'; - $RGSIPexten = 'SIP/gs102'; - $RGsession_id = '8600051'; - -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]; - -if (eregi("iframe src",$script_text)) - { - $vendor_lead_code = eregi_replace(' ','+',$vendor_lead_code); - $list_id = eregi_replace(' ','+',$list_id); - $gmt_offset_now = eregi_replace(' ','+',$gmt_offset_now); - $phone_code = eregi_replace(' ','+',$phone_code); - $phone_number = eregi_replace(' ','+',$phone_number); - $title = eregi_replace(' ','+',$title); - $first_name = eregi_replace(' ','+',$first_name); - $middle_initial = eregi_replace(' ','+',$middle_initial); - $last_name = eregi_replace(' ','+',$last_name); - $address1 = eregi_replace(' ','+',$address1); - $address2 = eregi_replace(' ','+',$address2); - $address3 = eregi_replace(' ','+',$address2); - $city = eregi_replace(' ','+',$city); - $state = eregi_replace(' ','+',$state); - $province = eregi_replace(' ','+',$province); - $postal_code = eregi_replace(' ','+',$postal_code); - $country_code = eregi_replace(' ','+',$country_code); - $gender = eregi_replace(' ','+',$gender); - $date_of_birth = eregi_replace(' ','+',$date_of_birth); - $alt_phone = eregi_replace(' ','+',$alt_phone); - $email = eregi_replace(' ','+',$email); - $security_phrase = eregi_replace(' ','+',$security_phrase); - $comments = eregi_replace(' ','+',$comments); - $RGfullname = eregi_replace(' ','+',$RGfullname); - $RGuser = eregi_replace(' ','+',$RGuser); - $RGlead_id = eregi_replace(' ','+',$RGlead_id); - $RGcampaign = eregi_replace(' ','+',$RGcampaign); - $RGphone_login = eregi_replace(' ','+',$RGphone_login); - $RGgroup = eregi_replace(' ','+',$RGgroup); - $RGchannel_group = eregi_replace(' ','+',$RGchannel_group); - $RGSQLdate = eregi_replace(' ','+',$RGSQLdate); - $RGepoch = eregi_replace(' ','+',$RGepoch); - $RGuniqueid = eregi_replace(' ','+',$RGuniqueid); - $RGcustomer_zap_channel = eregi_replace(' ','+',$RGcustomer_zap_channel); - $RGserver_ip = eregi_replace(' ','+',$RGserver_ip); - $RGSIPexten = eregi_replace(' ','+',$RGSIPexten); - $RGsession_id = eregi_replace(' ','+',$RGsession_id); - } - -$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--fronter--B--',"$RGuser",$script_text); -$script_text = eregi_replace('--A--user--B--',"$RGuser",$script_text); -$script_text = eregi_replace('--A--lead_id--B--',"$RGlead_id",$script_text); -$script_text = eregi_replace('--A--campaign--B--',"$RGcampaign",$script_text); -$script_text = eregi_replace('--A--phone_login--B--',"$RGphone_login",$script_text); -$script_text = eregi_replace('--A--group--B--',"$RGgroup",$script_text); -$script_text = eregi_replace('--A--channel_group--B--',"$RGchannel_group",$script_text); -$script_text = eregi_replace('--A--SQLdate--B--',"$RGSQLdate",$script_text); -$script_text = eregi_replace('--A--epoch--B--',"$RGepoch",$script_text); -$script_text = eregi_replace('--A--uniqueid--B--',"$RGuniqueid",$script_text); -$script_text = eregi_replace('--A--customer_zap_channel--B--',"$RGcustomer_zap_channel",$script_text); -$script_text = eregi_replace('--A--server_ip--B--',"$RGserver_ip",$script_text); -$script_text = eregi_replace('--A--SIPexten--B--',"$RGSIPexten",$script_text); -$script_text = eregi_replace('--A--session_id--B--',"$RGsession_id",$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';} -if ($hh=='server') {$server_hh='bgcolor ="#FF99FF"'; $server_fc='BLACK';} # pink - else {$server_hh=''; $server_fc='WHITE';} - -?> - - - - -\n"; -echo "
English Ελληνικά
- - - - - - - - - - - - - - - - - 1) { - ?> - - 1) { - ?> - - 1) { - ?> - - 1) { - ?> - - 1) { - ?> - - 1) { - ?> - - 1) { - ?> - - 1) { - ?> - - 1) { - ?> - - 1) { - ?> - -\n"; - echo "Δεν έχετε το δικαίωμα για να δείτε την σελίδα. Παρακαλώ επιστρέψτε.\n"; - } - -} -if (strlen($reports_hh) > 1) { - ?> - - - - - -
  ΔΙΑΧΕΙΡΙΣΗ - Αποσύνδεση  
> SIZE=1> ΧΡΗΣΤΕΣ > SIZE=1> ΕΚΣΤΡΑΤΕΙΕΣ > SIZE=1> ΛΙΣΤΕΣ > SIZE=1> ΒΟΗΘΟΙ > SIZE=1> ΦΙΛΤΡΑ > SIZE=1> ΕΙΣΕΡΧΟΜΕΝΕΣ ΟΜΑΔΕΣ > SIZE=1> ΧΡΟΝΟΙ ΚΛΗΣΕΩΝ > SIZE=1> ΟΜΑΔΕΣ ΧΡΗΣΤΗ > SIZE=1> ΑΠΟΜΑΚΡΥΣΜΕΝΟΙ ΧΕΙΡΙΣΤΕΣ > SIZE=1> PHONES > ΑΝΑΦΟΡΕΣ
  ΛΙΣΤΑ ΧΡΗΣΤΩΝ     |     ΠΡΟΣΘΗΚΗ ΝΕΟΥ ΧΡΗΣΤΗ     |     ΑΝΑΖΗΤΗΣΗ ΧΡΗΣΤΗ
  ΠΡΟΣΘΗΚΗ ΕΚΣΤΡΑΤΕΙΑΣ     |     ΛΙΣΤΑ ΕΚΣΤΡΑΤΕΙΩΝ     |     REALTIME ΕΚΣΤΡΑΤΕΙΕΣ SUMMARY
  ΕΜΦΑΝΙΣΗ ΛΙΣΤΩΝ     |     ΠΡΟΣΘΗΚΗ ΝΕΑΣ ΛΙΣΤΑΣ     |     ΑΝΑΖΗΤΗΣΗ ΟΔΗΓΟΥ |     ΠΡΟΣΘΕΣΤΕ ΤΟΝ ΑΡΙΘΜΟ ΣΕ DNC           |     ΕΙΣΑΓΩΓΗ ΝΕΩΝ ΟΔΗΓΩΝ
  ΠΡΟΣΘΕΣΕ ΒΟΗΘΟ     |     ΕΜΦΑΝΙΣΗ ΒΟΗΘΩΝ
  ΠΡΟΣΘΕΣΕ ΦΙΛΤΡΟ     |     ΕΜΦΑΝΙΣΗ ΦΙΛΤΡΩΝ
  ΕΜΦΑΝΙΣΗ ΕΙΣΕΡΧΟΜΕΝΩΝ ΟΜΑΔΩΝ     |     ΠΡΟΣΘΗΚΗ ΝΕΑΣ ΕΙΣΕΡΜΟΜΕΝΗΣ ΟΜΑΔΑΣ
  ΕΜΦΑΝΙΣΗ ΧΡΟΝΩΝ ΚΛΗΣΕΩΝ     |     ΠΡΟΣΘΗΚΗ ΝΕΟΥ ΧΡΟΝΟΥ ΚΛΗΣΗΣ     |     ΕΜΦΑΝΙΣΗ ΧΡΟΝΩΝ ΚΛΗΣΕΩΝ ΚΑΤΑΣΤΑΣΕΩΝ     |     ΠΡΟΣΘΗΚΗ ΝΕΟΥ ΧΡΟΝΟΥ ΚΛΗΣΗΣ ΚΑΤΑΣΤΑΣΗΣ  
  ΠΡΟΣΘΗΚΗ ΟΜΑΔΑΣ ΧΡΗΣΤΗ     |     ΛΙΣΤΑ ΟΜΑΔΩΝ ΧΡΗΣΤΗ     |     ΩΡΙΑΙΑ ΟΜΔΟΠΟΙΗΣΗ
  ΕΜΦΑΝΙΣΗ ΑΠΟΜΑΚΡΥΣΜΕΝΩΝ ΧΕΙΡΙΣΤΩΝ     |     ΠΡΟΣΘΗΚΗ ΝΕΩΝ ΑΠΟΜΑΚΡΥΣΜΕΝΩΝ ΧΕΙΡΙΣΤΩΝ
  PHONES   |   ADD PHONE   |   SERVERS   |   ADD SERVER   |   CONFERENCES   |   ADD CONFERENCE   |   VD CONFERENCES   |   ADD VD CONFERENCE
 
-
\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"; -} - - -###################### -# ADD=11111111111 display the ADD NEW PHONE SCREEN -###################### - -if ($ADD==11111111111) -{ -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 "\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=111111111111 display the ADD NEW SERVER SCREEN -###################### - -if ($ADD==111111111111) -{ -echo "
\n"; -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=1111111111111 display the ADD NEW CONFERENCE SCREEN -###################### - -if ($ADD==1111111111111) -{ -echo "
\n"; -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=11111111111111 display the ADD NEW VICIDIAL CONFERENCE SCREEN -###################### - -if ($ADD==11111111111111) -{ -echo "
\n"; -echo ""; - -echo "
ADD A NEW VICIDIAL CONFERENCE\n"; -echo "\n"; -echo "
\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
Αριθμός Συνδιάλεξης: (μόνο αριθμοί)$NWB#conferences-conf_exten$NWE
IP Διακομιστή: $NWB#conferences-server_ip$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 ($list_id < 100) or (strlen($list_id) > 8) ) - { - echo "
Η ΛΙΣΤΑ ΔΕΝ ΠΡΟΣΤΕΘΗΚΕ - Παρακαλώ ελέγξτε τα δεδομένα που καταχωρήσατε\n"; - echo "
Το ID λίστας πρέπει να είναι μεταξύ 2 και 8 χαρακτήρες\n"; - echo "
Το όνομα λίστας πρέπει να είναι 2 χαρακτήρες\n"; - echo "
ID Λίστας must be greater than 100\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(user_group,group_name,allowed_campaigns) values('$user_group','$group_name','-ALL-CAMPAIGNS-');"; - $rslt=mysql_query($stmt, $link); - - echo "
ΟΜΑΔΑ ΧΡΗΣΤΗ ΠΡΟΣΤΕΘΗΚΕ: $user_group\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|$stmt|\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','$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; -} - - -###################### -# ADD=21111111111 adds new phone to the system -###################### - -if ($ADD==21111111111) -{ -echo "
\n"; - 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=31111111111; -} - - -###################### -# ADD=211111111111 adds new server to the system -###################### - -if ($ADD==211111111111) -{ -echo "
\n"; - 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=311111111111; -} - - -###################### -# ADD=221111111111 adds the new vicidial server trunk record to the system -###################### - -if ($ADD==221111111111) -{ - echo ""; - $stmt="SELECT max_vicidial_trunks from servers where server_ip='$server_ip';"; - $rslt=mysql_query($stmt, $link); - $rowx=mysql_fetch_row($rslt); - $MAXvicidial_trunks = $rowx[0]; - - $stmt="SELECT sum(dedicated_trunks) from vicidial_server_trunks where server_ip='$server_ip' and campaign_id !='$campaign_id';"; - $rslt=mysql_query($stmt, $link); - $rowx=mysql_fetch_row($rslt); - $SUMvicidial_trunks = ($rowx[0] + $dedicated_trunks); - - if ($SUMvicidial_trunks > $MAXvicidial_trunks) - { - echo "
Η ΕΓΓΡΑΦΗ ΤΟΥ ΚΟΡΜΟΥ ΣΤΟΝ ΕΞΥΠΗΡΕΤΗΤΗ ΔΕΝ ΠΡΟΣΤΕΘΗΚΕ - ο αριθμός των κορμών είναι πολύ υψηλός: $SUMvicidial_trunks / $MAXvicidial_trunks\n"; - } - else - { - $stmt="SELECT count(*) from vicidial_server_trunks where campaign_id='$campaign_id' and server_ip='$server_ip';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0] > 0) - {echo "
Η ΕΓΓΡΑΦΗ ΤΟΥ ΚΟΡΜΟΥ ΣΤΟΝ ΕΞΥΠΗΡΕΤΗΤΗ ΔΕΝ ΠΡΟΣΤΕΘΗΚΕ - υπάρχει ήδη μία εγγραφή-κορμού στον εξυπηρετητή για την εκστρατεία\n";} - else - { - if ( (strlen($campaign_id) < 2) or (strlen($server_ip) < 7) or (strlen($dedicated_trunks) < 1) or (strlen($trunk_restriction) < 1) ) - { - echo "
Η ΕΓΓΡΑΦΗ ΤΟΥ ΚΟΡΜΟΥ ΣΤΟΝ ΕΞΥΠΗΡΕΤΗΤΗ ΔΕΝ ΠΡΟΣΤΕΘΗΚΕ - Παρακαλώ επιστρέψτε πίσω και κάνετε έλεγχο των δεδομένων που καταχωρήσατε\n"; - echo "
η εκστρατεία πρέπει να είναι μεταξύ 3 και 8 χαρακτήρων στο μήκος\n"; - echo "
η server_ip καθυστέρηση πρέπει να είναι τουλάχιστον 7 χαρακτήρες\n"; - echo "
οι κορμοί πρέπει να είναι ένα ψηφίο από 0 έως 9999\n"; - } - else - { - echo "
Η ΕΓΓΡΑΦΗ ΤΟΥ ΚΟΡΜΟΥ ΣΤΟΝ ΕΞΥΠΗΡΕΤΗΤΗ ΠΡΟΣΤΕΘΗΚΕ: $campaign_id - $server_ip - $dedicated_trunks - $trunk_restriction\n"; - - $stmt="INSERT INTO vicidial_server_trunks(server_ip,campaign_id,dedicated_trunks,trunk_restriction) values('$server_ip','$campaign_id','$dedicated_trunks','$trunk_restriction');"; - $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 VICIDIAL TRUNK |$PHP_AUTH_USER|$ip|$stmt|\n"); - fclose($fp); - } - } - } - } -$ADD=311111111111; -} - - -###################### -# ADD=2111111111111 adds new conference to the system -###################### - -if ($ADD==2111111111111) -{ -echo "
\n"; - 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=3111111111111; -} - - -###################### -# ADD=21111111111111 adds new vicidial conference to the system -###################### - -if ($ADD==21111111111111) -{ -echo "
\n"; - echo ""; - $stmt="SELECT count(*) from vicidial_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 "
VICIDIAL CONFERENCE NOT ADDED - there is already a vicidial conference in the system with this ID and server\n";} - else - { - if ( (strlen($conf_exten) < 1) or (strlen($server_ip) < 7) ) - {echo "
VICIDIAL Η ΣΥΝΔΙΑΛΕΞΗ ΔΕΝ ΠΡΟΣΤΕΘΗΚΕ - Παρακαλώ ελέγξτε τα δεδομένα που καταχωρήσατε\n";} - else - { - echo "
VICIDIAL Η ΣΥΝΔΙΑΛΕΞΗ ΠΡΟΣΤΕΘΗΚΕ\n"; - - $stmt="INSERT INTO vicidial_conferences (conf_exten,server_ip) values('$conf_exten','$server_ip');"; - $rslt=mysql_query($stmt, $link); - } - } -$ADD=31111111111111; -} - - - -###################################################################################################### -###################################################################################################### -####### 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"; - - if ($dial_method == 'RATIO') - { - if ($auto_dial_level < 1) {$auto_dial_level = "1.0";} - $adlSQL = "auto_dial_level='$auto_dial_level',"; - } - else - { - if ($dial_method == 'MANUAL') - { - $auto_dial_level='0'; - $adlSQL = "auto_dial_level='0',"; - } - else - { - $adlSQL = ""; - if ($auto_dial_level < 1) - { - $auto_dial_level = "1.0"; - $adlSQL = "auto_dial_level='$auto_dial_level',"; - } - } - } - $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', $adlSQL 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',allcalls_delay='$allcalls_delay',omit_phone_code='$omit_phone_code',dial_method='$dial_method',available_only_ratio_tally='$available_only_ratio_tally',adaptive_dropped_percentage='$adaptive_dropped_percentage',adaptive_maximum_level='$adaptive_maximum_level',adaptive_latest_server_time='$adaptive_latest_server_time',adaptive_intensity='$adaptive_intensity',adaptive_dl_diff_target='$adaptive_dl_diff_target' 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 IN('READY','QUEUE','DONE');"; - $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|$stmt|\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"; - - if ($dial_method == 'RATIO') - { - if ($auto_dial_level < 1) {$auto_dial_level = "1.0";} - $adlSQL = "auto_dial_level='$auto_dial_level',"; - } - else - { - if ($dial_method == 'MANUAL') - { - $auto_dial_level='0'; - $adlSQL = "auto_dial_level='0',"; - } - else - { - $adlSQL = ""; - if ($auto_dial_level < 1) - { - $auto_dial_level = "1.0"; - $adlSQL = "auto_dial_level='$auto_dial_level',"; - } - } - } - $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', $adlSQL lead_filter_id='$lead_filter_id',dial_method='$dial_method',adaptive_intensity='$adaptive_intensity' 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 IN('READY','QUEUE','DONE');;"; - $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|$stmt|\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',allowed_campaigns='$campaigns_value' 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|$stmt|\n"); - fclose($fp); - } - } - -$ADD=311111; # go to user group modification form below -} - -###################### -# ADD=4111111 modify script in the system -###################### - -if ($ADD==4111111) -{ - echo "\n"; - echo "\n"; - 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='$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 -} - - -###################### -# ADD=41111111111 modify phone record in the system -###################### - -if ($ADD==41111111111) -{ - 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); - } - } -$ADD=31111111111; # go to phone modification form below -} - - -###################### -# ADD=411111111111 modify server record in the system -###################### - -if ($ADD==411111111111) -{ - 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', sys_perf_log='$sys_perf_log', vd_server_logs='$vd_server_logs', agi_output='$agi_output', vicidial_balance_active='$vicidial_balance_active', balance_trunks_offlimits='$balance_trunks_offlimits' where server_id='$old_server_id';"; - $rslt=mysql_query($stmt, $link); - } - } - } -$ADD=311111111111; # go to server modification form below -} - - -###################### -# ADD=421111111111 modify vicidial server trunks record in the system -###################### - -if ($ADD==421111111111) -{ - echo ""; - $stmt="SELECT max_vicidial_trunks from servers where server_ip='$server_ip';"; - $rslt=mysql_query($stmt, $link); - $rowx=mysql_fetch_row($rslt); - $MAXvicidial_trunks = $rowx[0]; - - $stmt="SELECT sum(dedicated_trunks) from vicidial_server_trunks where server_ip='$server_ip' and campaign_id !='$campaign_id';"; - $rslt=mysql_query($stmt, $link); - $rowx=mysql_fetch_row($rslt); - $SUMvicidial_trunks = ($rowx[0] + $dedicated_trunks); - - if ($SUMvicidial_trunks > $MAXvicidial_trunks) - { - echo "
Η ΕΓΓΡΑΦΗ ΤΟΥ ΚΟΡΜΟΥ ΣΤΟΝ ΕΞΥΠΗΡΕΤΗΤΗ ΔΕΝ ΠΡΟΣΤΕΘΗΚΕ - ο αριθμός των κορμών είναι πολύ υψηλός: $SUMvicidial_trunks / $MAXvicidial_trunks\n"; - } - else - { - if ( (strlen($campaign_id) < 2) or (strlen($server_ip) < 7) or (strlen($dedicated_trunks) < 1) or (strlen($trunk_restriction) < 1) ) - { - echo "
Η ΕΓΓΡΑΦΗ ΤΟΥ ΚΟΡΜΟΥ ΣΤΟΝ ΕΞΥΠΗΡΕΤΗΤΗ ΔΕΝ ΤΡΟΠΟΠΟΙΗΘΗΚΕ - Παρακαλώ επιστρέψτε πίσω και κάνετε έλεγχο των δεδομένων που καταχωρήσατε\n"; - echo "
η εκστρατεία πρέπει να είναι μεταξύ 3 και 8 χαρακτήρων στο μήκος\n"; - echo "
η server_ip καθυστέρηση πρέπει να είναι τουλάχιστον 7 χαρακτήρες\n"; - echo "
οι κορμοί πρέπει να είναι ένα ψηφίο από 0 έως 9999\n"; - } - else - { - echo "
Η ΕΓΓΡΑΦΗ ΤΟΥ ΚΟΡΜΟΥ ΣΤΟΝ ΕΞΥΠΗΡΕΤΗΤΗ ΤΡΟΠΟΠΟΙΗΘΗΚΕ: $campaign_id - $server_ip - $dedicated_trunks - $trunk_restriction\n"; - - $stmt="UPDATE vicidial_server_trunks SET dedicated_trunks='$dedicated_trunks',trunk_restriction='$trunk_restriction' where campaign_id='$campaign_id' and server_ip='$server_ip';"; - $rslt=mysql_query($stmt, $link); - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|ΤΡΟΠΟΠΟΙΗΣΕ ΔΙΑΚΟΜΙΣΤΗ TRUNK |$PHP_AUTH_USER|$ip|$stmt|\n"); - fclose($fp); - } - } - } -$ADD=311111111111; # go to server modification form below -} - - -###################### -# ADD=4111111111111 modify conference record in the system -###################### - -if ($ADD==4111111111111) -{ - 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); - } - } -$ADD=3111111111111; # go to conference modification form below -} - - -###################### -# ADD=41111111111111 modify vicidial conference record in the system -###################### - -if ($ADD==41111111111111) -{ - echo ""; - - $stmt="SELECT count(*) from vicidial_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 "
VICIDIAL Η ΣΥΝΔΙΑΛΕΞΗ ΔΕΝ ΤΡΟΠΟΠΟΙΗΘΗΚΕ - υπάρχει ήδη μία συνδιάλεξη με αυτή την εσωτ.σύνδεση-διακομιστή\n";} - else - { - if ( (strlen($conf_exten) < 1) or (strlen($server_ip) < 7) ) - {echo "
VICIDIAL Η ΣΥΝΔΙΑΛΕΞΗ ΔΕΝ ΤΡΟΠΟΠΟΙΗΘΗΚΕ - Παρακαλώ ελέγξτε τα δεδομένα που καταχωρήσατε\n";} - else - { - echo "
VICIDIAL Η ΣΥΝΔΙΑΛΕΞΗ ΤΡΟΠΟΠΟΙΗΘΗΚΕ: $conf_exten\n"; - - $stmt="UPDATE vicidial_conferences set conf_exten='$conf_exten',server_ip='$server_ip',extension='$extension' where conf_exten='$old_conf_exten';"; - $rslt=mysql_query($stmt, $link); - } - } -$ADD=31111111111111; # go to vicidial conference 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=53 confirmation before Emergency VDAC Jam Clear - deletes oldest LIVE vicidial_auto_call record -###################### - -if ($ADD==53) -{ - if (eregi('IN',$stage)) - {$group_id=$campaign_id;} - echo ""; - - if (strlen($campaign_id) < 2) - { - echo "
VDAC ΔΕΝ ΚΑΘΑΡΙΣΤΗΚΕ ΓΙΑ ΤΗΝ ΕΚΣΤΡΑΤΕΊΑ - Παρακαλώ επιστρέψτε πίσω και κάνετε έλεγχο των δεδομένων που καταχωρήσατε\n"; - echo "
Εκστρατεία_id be at least 2 characters in length\n"; - } - else - { - echo "
ΕΠΙΒΕΒΑΙΩΣΗ ΚΑΘΑΡΙΣΜΟΥ VDAC: $campaign_id\n"; - echo "

Επιλέξτε εδώ για να διαγράψετε την παλαιότερη ΖΩΝΤΑΝΗ εγγραφή στο VDAC για $campaign_id


\n"; - } - -# go to campaign modification below -if (eregi('IN',$stage)) - {$ADD='3111';} -else - {$ADD='31';} -} - -###################### -# 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 state 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 -} - - -###################### -# ADD=51111111111 confirmation before deletion of phone record -###################### - -if ($ADD==51111111111) -{ - echo ""; - - if ( (strlen($extension) < 2) or (strlen($server_ip) < 7) or ($LOGast_delete_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='31111111111'; # go to phone modification below -} - - -###################### -# ADD=511111111111 confirmation before deletion of server record -###################### - -if ($ADD==511111111111) -{ - echo ""; - - if ( (strlen($server_id) < 2) or (strlen($server_ip) < 7) or ($LOGast_delete_phones < 1) ) - { - echo "
ΔΙΑΚΟΜΙΣΤΗΣ NOT DELETED - Παρακαλώ επιστρέψτε πίσω και κάνετε έλεγχο των δεδομένων που καταχωρήσατε\n"; - echo "
ID Διακομιστή be at least 2 characters in length\n"; - echo "
IP Διακομιστή be at least 7 characters in length\n"; - } - else - { - echo "
ΔΙΑΚΟΜΙΣΤΗΣ DELETION CONFIRMATION: $server_id - $server_ip\n"; - echo "

Επιλέξτε εδώ για να διαγράψετε το τηλέφωνο $server_id - $server_ip


\n"; - } -$ADD='311111111111'; # go to server modification below -} - - -###################### -# ADD=5111111111111 confirmation before deletion of conference record -###################### - -if ($ADD==5111111111111) -{ - echo ""; - - if ( (strlen($conf_exten) < 2) or (strlen($server_ip) < 7) or ($LOGast_delete_phones < 1) ) - { - echo "
CONFERENCE NOT DELETED - Παρακαλώ επιστρέψτε πίσω και κάνετε έλεγχο των δεδομένων που καταχωρήσατε\n"; - echo "
Conference must be at least 2 characters in length\n"; - echo "
IP Διακομιστή be at least 7 characters in length\n"; - } - else - { - echo "
CONFERENCE DELETION CONFIRMATION: $conf_exten - $server_ip\n"; - echo "

Επιλέξτε εδώ για να διαγράψετε το τηλέφωνο $conf_exten - $server_ip


\n"; - } -$ADD='3111111111111'; # go to conference modification below -} - - -###################### -# ADD=51111111111111 confirmation before deletion of vicidial conference record -###################### - -if ($ADD==51111111111111) -{ - echo ""; - - if ( (strlen($conf_exten) < 2) or (strlen($server_ip) < 7) or ($LOGast_delete_phones < 1) ) - { - echo "
VICIDIAL CONFERENCE NOT DELETED - Παρακαλώ επιστρέψτε πίσω και κάνετε έλεγχο των δεδομένων που καταχωρήσατε\n"; - echo "
Conference must be at least 2 characters in length\n"; - echo "
IP Διακομιστή be at least 7 characters in length\n"; - } - else - { - echo "
VICIDIAL CONFERENCE DELETION CONFIRMATION: $conf_exten - $server_ip\n"; - echo "

Επιλέξτε εδώ για να διαγράψετε το τηλέφωνο $conf_exten - $server_ip


\n"; - } -$ADD='31111111111111'; # go to vicidial conference 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 from 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=63 Emergency VDAC Jam Clear -###################### - -if ($ADD==63) -{ - if (eregi('IN',$stage)) - {$group_id=$campaign_id;} - echo ""; - - if (strlen($campaign_id) < 2) - { - echo "
VDAC ΔΕΝ ΚΑΘΑΡΙΣΤΗΚΕ ΓΙΑ ΤΗΝ ΕΚΣΤΡΑΤΕΊΑ - Παρακαλώ επιστρέψτε πίσω και κάνετε έλεγχο των δεδομένων που καταχωρήσατε\n"; - echo "
Εκστρατεία_id be at least 2 characters in length\n"; - } - else - { - $stmt="DELETE from vicidial_auto_calls where status='LIVE' and campaign_id='$campaign_id' order by call_time 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|EMERGENCY VDAC CLEAR|$PHP_AUTH_USER|$ip|campaign_id='$campaign_id'|\n"); - fclose($fp); - } - echo "
ΤΕΛΕΥΤΑΙΑ ΕΓΓΡΑΦΗ VDAC ΠΟΥ ΚΑΘΑΡΙΖΕΤΑΙ ΓΙΑ ΤΗΝ ΕΚΣΤΡΑΤΕΙΑ: $campaign_id\n"; - echo "

\n"; - } - -# go to campaign modification below -if (eregi('IN',$stage)) - {$ADD='3111';} -else - {$ADD='31';} -} - - -###################### -# 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 -} - - -###################### -# ADD=61111111111 delete phone record -###################### - -if ($ADD==61111111111) -{ - echo ""; - - if ( (strlen($extension) < 2) or (strlen($server_ip) < 7) or ($CoNfIrM != 'YES') or ($LOGast_delete_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='10000000000'; # go to phone list -} - - -###################### -# ADD=611111111111 delete server record -###################### - -if ($ADD==611111111111) -{ - echo ""; - - if ( (strlen($server_id) < 2) or (strlen($server_ip) < 7) or ($CoNfIrM != 'YES') or ($LOGast_delete_phones < 1) ) - { - echo "
ΔΙΑΚΟΜΙΣΤΗΣ NOT DELETED - Παρακαλώ επιστρέψτε πίσω και κάνετε έλεγχο των δεδομένων που καταχωρήσατε\n"; - echo "
ID Διακομιστή be at least 2 characters in length\n"; - echo "
IP Διακομιστή be at least 7 characters in length\n"; - } - else - { - $stmt="DELETE from servers where server_id='$server_id' 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 SERVER!!|$PHP_AUTH_USER|$ip|server_id='$server_id'|server_ip='$server_ip'|\n"); - fclose($fp); - } - echo "
ΔΙΑΚΟΜΙΣΤΗΣ DELETION COMPLETED: $server_id - $server_ip\n"; - echo "

\n"; - } -$ADD='100000000000'; # go to server list -} - - -###################### -# ADD=621111111111 delete vicidial server trunk record in the system -###################### - -if ($ADD==621111111111) -{ - echo ""; - - if ( (strlen($campaign_id) < 2) or (strlen($server_ip) < 7) ) - { - echo "
Η ΕΓΓΡΑΦΗ ΤΟΥ ΚΟΡΜΟΥ ΣΤΟΝ ΕΞΥΠΗΡΕΤΗΤΗ ΔΕΝ ΔΙΑΓΡΑΦΗΚΕ - Παρακαλώ επιστρέψτε πίσω και κάνετε έλεγχο των δεδομένων που καταχωρήσατε\n"; - echo "
η εκστρατεία πρέπει να είναι μεταξύ 3 και 8 χαρακτήρων στο μήκος\n"; - echo "
η server_ip καθυστέρηση πρέπει να είναι τουλάχιστον 7 χαρακτήρες\n"; - } - else - { - echo "
Η ΕΓΓΡΑΦΗ ΤΟΥ ΚΟΡΜΟΥ ΣΤΟΝ ΕΞΥΠΗΡΕΤΗΤΗ ΔΙΑΓΡΑΦΗΚΕ: $campaign_id - $server_ip\n"; - - $stmt="DELETE FROM vicidial_server_trunks where campaign_id='$campaign_id' and server_ip='$server_ip';"; - $rslt=mysql_query($stmt, $link); - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|DELETE ΔΙΑΚΟΜΙΣΤΗΣ TRUNK |$PHP_AUTH_USER|$ip|$stmt|\n"); - fclose($fp); - } - } - -$ADD=311111111111; # go to server modification form below -} - - -###################### -# ADD=6111111111111 delete conference record -###################### - -if ($ADD==6111111111111) -{ - echo ""; - - if ( (strlen($conf_exten) < 2) or (strlen($server_ip) < 7) or ($CoNfIrM != 'YES') or ($LOGast_delete_phones < 1) ) - { - echo "
CONFERENCE NOT DELETED - Παρακαλώ επιστρέψτε πίσω και κάνετε έλεγχο των δεδομένων που καταχωρήσατε\n"; - echo "
Conference be at least 2 characters in length\n"; - echo "
IP Διακομιστή be at least 7 characters in length\n"; - } - else - { - $stmt="DELETE from conferences where conf_exten='$conf_exten' 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 CONF!!!!|$PHP_AUTH_USER|$ip|conf_exten='$conf_exten'|server_ip='$server_ip'|\n"); - fclose($fp); - } - echo "
CONFERENCE DELETION COMPLETED: $conf_exten - $server_ip\n"; - echo "

\n"; - } -$ADD='1000000000000'; # go to conference list -} - - -###################### -# ADD=61111111111111 delete vicidial conference record -###################### - -if ($ADD==61111111111111) -{ - echo ""; - - if ( (strlen($conf_exten) < 2) or (strlen($server_ip) < 7) or ($CoNfIrM != 'YES') or ($LOGast_delete_phones < 1) ) - { - echo "
VICIDIAL CONFERENCE NOT DELETED - Παρακαλώ επιστρέψτε πίσω και κάνετε έλεγχο των δεδομένων που καταχωρήσατε\n"; - echo "
Conference be at least 2 characters in length\n"; - echo "
IP Διακομιστή be at least 7 characters in length\n"; - } - else - { - $stmt="DELETE from vicidial_conferences where conf_exten='$conf_exten' 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 CONF!!!!|$PHP_AUTH_USER|$ip|conf_exten='$conf_exten'|server_ip='$server_ip'|\n"); - fclose($fp); - } - echo "
VICIDIAL CONFERENCE DELETION COMPLETED: $conf_exten - $server_ip\n"; - echo "

\n"; - } -$ADD='10000000000000'; # go to vicidial conference 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) and ( (!eregi("$campaign_id",$LOGallowed_campaigns)) and (!eregi("ALL-CAMPAIGNS",$LOGallowed_campaigns)) ) ) - {$ADD=30;} # send to not allowed screen if not in vicidial_user_groups allowed_campaigns list - -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]; - $allcalls_delay = $row[44]; - $omit_phone_code = $row[45]; - $dial_method = $row[46]; - $available_only_ratio_tally = $row[47]; - $adaptive_dropped_percentage = $row[48]; - $adaptive_maximum_level = $row[49]; - $adaptive_latest_server_time = $row[50]; - $adaptive_intensity = $row[51]; - $adaptive_dl_diff_target = $row[52]; - -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"; - -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
Μέθοδος Κλήσης -: $NWB#vicidial_campaigns-dial_method$NWE
ΕΠΙΠΕΔΟ ΑΥΤΟΜΑΤΗΣ ΚΛΗΣΗΣ: (0 = off)$NWB#vicidial_campaigns-auto_dial_level$NWE
Διαθέσιμα μόνο ετικέτες -: $NWB#vicidial_campaigns-available_only_ratio_tally$NWE
Ποσοστό Ορίου Εγκατ.Κλήσεων -: % $NWB#vicidial_campaigns-adaptive_dropped_percentage$NWE
Μέγιστο Επίπεδο Προσαρμογής Κλήσεων -: number only $NWB#vicidial_campaigns-adaptive_maximum_level$NWE
Τελευταίος Χρόνος Διακομιστή -: 4 μόνο αριθμοί $NWB#vicidial_campaigns-adaptive_latest_server_time$NWE
Ενταση Τροποποίησης Προσαρμογής -: $NWB#vicidial_campaigns-adaptive_intensity$NWE
Επίπεδο Κλήσεων Μεταβολής Στόχου -: $NWB#vicidial_campaigns-adaptive_dl_diff_target$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
Παράλειψη Κωδικού Τηλεφώνου -: $NWB#vicidial_campaigns-omit_phone_code$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
Καθυστέρηση Ηχογράφησης -: in seconds$NWB#vicidial_campaigns-allcalls_delay$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 "Click here to see a VDAD report for this campaign

\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"; -echo "EMERGENCY VDAC CLEAR FOR THIS CAMPAIGN

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

ΔΙΑΓΡΑΨΕ ΑΥΤΗΝ ΤΗΝ ΕΚΣΤΡΑΤΕΙΑ\n"; - } - -} - - -###################### -# ADD=34 modify campaign info in the system - Basic View -###################### - -if ( ($ADD==34) and ( (!eregi("$campaign_id",$LOGallowed_campaigns)) and (!eregi("ALL-CAMPAIGNS",$LOGallowed_campaigns)) ) ) - {$ADD=30;} # send to not allowed screen if not in vicidial_user_groups allowed_campaigns list - -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]; - $dial_method = $row[46]; - $adaptive_intensity = $row[51]; - -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 "\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
Μέθοδος Κλήσης -: $NWB#vicidial_campaigns-dial_method$NWE
ΕΠΙΠΕΔΟ ΑΥΤΟΜΑΤΗΣ ΚΛΗΣΗΣ: (0 = off)$NWB#vicidial_campaigns-auto_dial_level$NWE
Ενταση Τροποποίησης Προσαρμογής -: $NWB#vicidial_campaigns-adaptive_intensity$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 "Click here to see a VDAD report for this campaign

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

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

ΔΙΑΓΡΑΨΕ ΑΥΤΗΝ ΤΗΝ ΕΚΣΤΡΑΤΕΙΑ\n"; - } - - -} - - -###################### -# ADD=31 campaign not allowed -###################### - -if ($ADD==30) -{ -echo "
\n"; - echo ""; -echo "You do not have permission to view campaign $campaign_id\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 "Click here to see a report for this campaign

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

EMERGENCY VDAC CLEAR FOR THIS IN-GROUP

\n"; - 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 "\n"; -echo "
Ομάδα: (όχι κενά ή στίξη)$NWB#vicidial_user_groups-user_group$NWE
Περιγραφή: (περιγραφή ομάδας)$NWB#vicidial_user_groups-group_name$NWE
Επιτρεπόμενες Εκστρατείες: \n"; -echo "$campaigns_list"; -echo "$NWB#vicidial_user_groups-allowed_campaigns$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=31111111111 modify phone record in the system -###################### - -if ($ADD==31111111111) -{ -echo "
\n"; - 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 ($LOGast_delete_phones > 0) - { - echo "

ΔΙΑΓΡΑΨΕ ΑΥΤΟ ΤΟ ΤΗΛΕΦΩΝΟ\n"; - } -} - - -###################### -# ADD=311111111111 modify server record in the system -###################### - -if ($ADD==311111111111) -{ -echo "
\n"; - echo ""; - - $stmt="SELECT * from servers where server_id='$server_id' or server_ip='$server_ip';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $server_id = $row[0]; - $server_ip = $row[2]; - -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 "\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
Διακύμανση Τηλεφωνικής Κλήσης: $NWB#servers-vicidial_balance_active$NWE
Διακύμανση εκτός ορίων: $NWB#servers-balance_trunks_offlimits$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
Επίδοση Συστήματος -: $NWB#servers-sys_perf_log$NWE
Γεγονότα Διακομιστή -: $NWB#servers-vd_server_logs$NWE
Εξοδος AGI -: $NWB#servers-agi_output$NWE
\n"; - - -### vicidial server trunk records for this server -echo "

ΚΟΡΜΟΙ ΓΙΑ ΤΟΝ ΕΞΥΠΗΡΕΤΗΤΗ:   $NWB#vicidial_server_trunks$NWE
\n"; -echo "\n"; -echo "\n"; - - $stmt="SELECT * from vicidial_server_trunks where server_ip='$server_ip' order by campaign_id"; - $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 "
ΕΚΣΤΡΑΤΕΙΑ ΚΟΡΜΟΙ ΠΕΡΙΟΡΙΣΜΟΣ DELETE
$rowx[1]
\n"; - echo "\n"; - echo "\n"; - echo "
ΔΙΑΓΡΑΦΗ
\n"; - -echo "
ΠΡΟΣΘΗΚΗ ΕΓΓΡΑΦΗΣ ΕΞΥΠΗΡΕΤΗΤΗ ΚΟΣΡΜΟΥ
\n"; -echo "\n"; -echo "\n"; -echo "TRUNKS:
\n"; -echo "ΕΚΣΤΡΑΤΕΙΑ:
\n"; -echo "RESTRICTION:
\n"; -echo "
\n"; - -echo "

\n"; - - -### list of phones on this server -echo "
\n"; -echo "
ΤΗΛΕΦΩΝΑ ΣΤΟΝ ΔΙΑΚΟΜΙΣΤΗ:
\n"; -echo "\n"; -echo "\n"; - - $active_phones = 0; - $inactive_phones = 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_phones++; $camp_lists .= "'$rowx[0]',";} - if (ereg("N", $rowx[1])) {$inactive_phones++;} - - 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"; - - -### list of conferences on this server -echo "
\n"; -echo "
CONFERENCES WITHIN THIS SERVER:
\n"; -echo "\n"; -echo "\n"; - - $active_confs = 0; - $stmt="SELECT conf_exten,extension from conferences 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++; - $active_confs++; - - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - - echo "\n"; - } - -echo "
CONFERENCEΤΗΛ.ΣΥΝΔΕΣΗ
$rowx[0]$rowx[2]

\n"; - - -### list of vicidial conferences on this server -echo "
\n"; -echo "
VICIDIAL CONFERENCES WITHIN THIS SERVER:
\n"; -echo "\n"; -echo "\n"; - - $active_vdconfs = 0; - $stmt="SELECT conf_exten,extension from vicidial_conferences 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++; - $active_vdconfs++; - - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - - echo "\n"; - } - -echo "
VD CONFERENCEΤΗΛ.ΣΥΝΔΕΣΗ
$rowx[0]$rowx[2]

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

\n"; -echo "Αυτός ο διακομιστής έχει $active_confs active conferences

\n"; -echo "Αυτός ο διακομιστής έχει $active_vdconfs active vicidial conferences

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

DELETE THIS SERVER\n"; - } -} - - -###################### -# ADD=3111111111111 modify conference record in the system -###################### - -if ($ADD==3111111111111) -{ -echo "
\n"; - 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); - $conf_exten = $row[0]; - $server_ip = $row[1]; - -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"; -if ($LOGast_delete_phones > 0) - { - echo "

DELETE THIS CONFERENCE\n"; - } -} - - -###################### -# ADD=31111111111111 modify vicidial conference record in the system -###################### - -if ($ADD==31111111111111) -{ -echo "
\n"; - echo ""; - - $stmt="SELECT * from vicidial_conferences where conf_exten='$conf_exten' and server_ip='$server_ip';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $conf_exten = $row[0]; - $server_ip = $row[1]; - -echo "
MODIFY A VICIDIAL CONFERENCE RECORD: $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"; -if ($LOGast_delete_phones > 0) - { - echo "

DELETE THIS VICIDIAL CONFERENCE\n"; - } -} - - - - - - - -###################### -# 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 "
LEADLISTΕΚΣΤΡΑΤΕΙΑENTRY ΗΜΕΡΑ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 ""; - -$USERlink='stage=USERIDDOWN'; -$NAMElink='stage=NAMEDOWN'; -$LEVELlink='stage=LEVELDOWN'; -$GROUPlink='stage=GROUPDOWN'; -$SQLorder='order by full_name'; -if (eregi("USERIDUP",$stage)) {$SQLorder='order by user asc'; $USERlink='stage=USERIDDOWN';} -if (eregi("USERIDDOWN",$stage)) {$SQLorder='order by user desc'; $USERlink='stage=USERIDUP';} -if (eregi("NAMEUP",$stage)) {$SQLorder='order by full_name asc'; $NAMElink='stage=NAMEDOWN';} -if (eregi("NAMEDOWN",$stage)) {$SQLorder='order by full_name desc'; $NAMElink='stage=NAMEUP';} -if (eregi("LEVELUP",$stage)) {$SQLorder='order by user_level asc'; $LEVELlink='stage=LEVELDOWN';} -if (eregi("LEVELDOWN",$stage)) {$SQLorder='order by user_level desc'; $LEVELlink='stage=LEVELUP';} -if (eregi("GROUPUP",$stage)) {$SQLorder='order by user_group asc'; $GROUPlink='stage=GROUPDOWN';} -if (eregi("GROUPDOWN",$stage)) {$SQLorder='order by user_group desc'; $GROUPlink='stage=GROUPUP';} - $stmt="SELECT * from vicidial_users $SQLorder"; - $rslt=mysql_query($stmt, $link); - $people_to_print = mysql_num_rows($rslt); - -echo "
ΛΙΣΤΕΣ ΧΡΗΣΤΗ:\n"; -echo "
\n"; -echo ""; -echo ""; -echo ""; -echo ""; -echo ""; -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 "
USER IDFULL NAMELEVELGROUPLINKS
$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 ""; - - $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"; -} - -###################### -# ADD=10000000000 display all phones -###################### -if ($ADD==10000000000) -{ -echo "
\n"; -echo ""; - -$EXTENlink='stage=EXTENDOWN'; -$PROTOlink='stage=PROTODOWN'; -$SERVERlink='stage=SERVERDOWN'; -$STATUSlink='stage=STATUSDOWN'; -$SQLorder='order by extension,server_ip'; -if (eregi("EXTENUP",$stage)) {$SQLorder='order by extension asc'; $EXTENlink='stage=EXTENDOWN';} -if (eregi("EXTENDOWN",$stage)) {$SQLorder='order by extension desc'; $EXTENlink='stage=EXTENUP';} -if (eregi("PROTOUP",$stage)) {$SQLorder='order by protocol asc'; $PROTOlink='stage=PROTODOWN';} -if (eregi("PROTODOWN",$stage)) {$SQLorder='order by protocol desc'; $PROTOlink='stage=PROTOUP';} -if (eregi("SERVERUP",$stage)) {$SQLorder='order by server_ip asc'; $SERVERlink='stage=SERVERDOWN';} -if (eregi("SERVERDOWN",$stage)) {$SQLorder='order by server_ip desc'; $SERVERlink='stage=SERVERUP';} -if (eregi("STATUSUP",$stage)) {$SQLorder='order by status asc'; $STATUSlink='stage=STATUSDOWN';} -if (eregi("STATUSDOWN",$stage)) {$SQLorder='order by status desc'; $STATUSlink='stage=STATUSUP';} - $stmt="SELECT * from phones $SQLorder"; - $rslt=mysql_query($stmt, $link); - $phones_to_print = mysql_num_rows($rslt); - -echo "
ΕΝΤΑΓΜΕΝΑ ΤΗΛΕΦΩΝΑ:\n"; -echo "
\n"; -echo ""; -echo ""; -echo ""; -echo ""; -echo ""; -echo ""; -echo ""; -echo ""; -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 "
EXTENPROTOSERVERDIALPLANΚΑΤΑΣΤΑΣΗΟΝΟΜΑVMAILLINKS
$row[0]$row[16]$row[5]$row[1]$row[2]$row[8]$row[11]$row[14]$row[15]ΤΡΟΠΟΠΟΙΗΣΗ | ΣΤΑΤΙΣΤΙΚΑ
\n"; -} - -###################### -# ADD=100000000000 display all servers -###################### -if ($ADD==100000000000) -{ -echo "\n";echo "\n"; +$stmt="SELECT admin_home_url from system_settings;"; +$rslt=mysql_query($stmt, $link); +$row=mysql_fetch_row($rslt); +$admin_home_url_LU = $row[0]; + +?> +
+
\n"; - 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=1000000000000 display all conferences -###################### -if ($ADD==1000000000000) -{ -echo "
\n"; - 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"; -} - -###################### -# ADD=10000000000000 display all vicidial conferences -###################### -if ($ADD==10000000000000) -{ -echo "
\n"; - echo ""; - - $stmt="SELECT * from vicidial_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"; -} - - - - -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 ### -} -?> +. + +
+ +Εβδομαδιαίοι Χρόνοι Εκκίνησης και Παύσης - Αυτοί είναι προσαρμόσιμοι χρόνοι ανά ημέρα για τον ορισμό χρόνων κλήσεων. + +
+
+Ορισμοί Χρόνων Κλήσεων Καταστάσεων - Είναι η λίστα συγκεκριμένων Ορισμών Χρόνων Κλήσεων Καταστάσεων. + +
+
+Κατάσταση Χρόνου Κλήσης Κατάστασης - Αυτό είναι ο δύο γραμμάτων κωδικός για την κατάσταση όπου ο ορισμός χρόνου κλήης είναι για. Θα πρέπει και οι Οδηγοί της εκστρατείας να έχουν δύο γράμματα κωδικούς κατάστασης για τον χρόνο κλήσης κατάστασης. + + + + +



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

+
+
+Ο 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. Σχόλια +
+ +
NOTES: The Excel Lead loader functionality is enabled by a series of perl scripts and needs to have a properly configured /etc/astguiclient.conf 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. + + + + +



+ + + + + + +ΠΙΝΑΚΑΣ ΤΗΛΕΦΩΝΩΝ

+
+
+Εωτ.Σύνδεση Τηλεφώνου - Αυτό το πεδίο είναι για την καταχώρηση του ονόματος του τηλεφώνου, όπως αυτό εμφανίζεται στο 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 θα παραμένει συνδεμένο αντί να συνδέεται κάθε δευτερόλεπτο. + +
+
+
+Αυτόματη Κλήση Επόμενου Αριθμού - Εάν είναι ενεργοποιημένο, μετά από τον τερματισμό θα γίνει κλήση του επόμενου αριθμού, εκτός εάν επιλέξουμε "Μη κάνεις κλήσεις". + +
+
+
+Σταμάτα την ηχογράφηση μετά από κάθε κλήση - Εάν είναι ενεργοποιημένο η ηχογράφηση θα σταματήσει μετά τον τερματισμό. + +
+
+
+Επιτρέψτε τα μηνύματα SIPSAK - εάν επιτρέπεται ο κεντρικόςυπολογιστής θα στείλει τα μηνύματα στο τηλέφωνο ΓΟΥΛΙΏΝ στηνεπίδειξη στην τηλεφωνική LCD επίδειξη όταν συνδέεται μεVICIDIAL. Το χαρακτηριστικό γνώρισμα λειτουργεί μόνο με τατηλέφωνα ΓΟΥΛΙΩΝ και απαιτεί sipsak την εφαρμογή για ναεγκατασταθεί στον κεντρικό υπολογιστή δικτύου. Η προεπιλογήείναι 0. + +
+
+
+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' + +
+
+
+Προκαθορισμένο Περιεχόμενο - Το προκαθορισμένο περιεχόμενο του πλάνου κλήσεων για διεργασίες του διακομιστή. Το προκαθορισμένο είναι 'προκαθορισμένο' + +
+
+
+Επίδοση Συστήματος - Θέτοντας αυτήν την επιλογή σε Ν, θα ενεργοποιήσετε την καταγραφή στατιστικών γεγονότων επίδοσης για τον διακομιστή, συμπεριλαμβάνοντας το φόρτο του συστήματος, τις διεργασίες και τα κανάλια που χρησιμοποιεί. Προκαθορισμένα είναι Ο. + +
+
+
+Γεγονότα Διακομιστή - Θέτοντας αυτήν την επιλογή σε Ν θα ενεργοποιήσετε την καταγραφή των γεγονότων για όλες τις διεργασίες. Επίσης, η καταγραφή γεγονότων της οθόνης θα είναι απενεργοποιημένη, εάν είναι Ν όταν το σύστημα ξεκινήσει. Προκαθορισμένα είναι Ν. + +
+
+
+Εξοδος AGI - Θέτοντας αυτήν την επιλογή σε NONE θα απενεργοποιήσετε την έξοδο από όλες τις διαδικασίες AGI. Αν θέσετε STDERR θα σταλεί η έξοδος των AGI στο CLI. Επίσης υπάρχουν οι επιλογές FILE και BOTH. Προκαθορισμένα είναι FILE. + +
+
+
+Διακύμανση Τηλεφωνικής Κλήσης - Καθορίζοντας αυτό το πεδίο σε Ν θα επιτρέψει στον εξυπηρετητή να ορίζει κλήσεις διακύμανσης για την εκστρατεία, ώστε το καθορισμένο επίπεδο κλήσης να μπορεί να ικανοποιείται έστω και εάν δεν υπάρχουν συνδεμένοι χειριστές σε αυτήν την εκστρατεία. Προκαθορισμένα είναι Ο. + +
+
+
+Διακύμανση εκτός ορίων - Καθορίζει τον αριθμό των τηλ.κυκλ.συνδ. που δεν επιτρέπετε στο σύστημα να χειριστεί για Διακύμανση Τηλεφωνικής Κλήσης. + + +



+ +ΠΙΝΑΚΑΣ ΣΥΝΔΙΑΛΕΞΕΩΝ

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



+ +VICIDIAL_SERVER_TRUNKS ΠΙΝΑΚΑΣ

+
+
+Οι Τηλ.Κυκλ.Συνδ. του εξυπηρετητή σας επιτρέπουν να περιορίσετε τις εξερχόμενες γραμμές που χρησιμοποιούνται στον εξυπηρετητή ανά εκστρατεία. Χωρίς αυτές τις εγγραφές, επιτρέπετε στην εκστρατεία να έχει όσες γραμμές μπορεί να έχει, μέχρι τον μέγιστο καθορισμένο αριθμό Τηλ.Κυκλ.Συνδ.. + + + + + +



+ +SYSTEM_SETTINGS ΠΙΝΑΚΑΣ

+
+
+Μη-λατινικά χρήσης - αυτή η επιλογή επιτρέπει σε σας για ναπροκαθορίσει το χειρόγραφο επίδειξης Ιστού για να χρησιμοποιήσειUTF8 τους χαρακτήρες και να μην κάνει οποιαδήποτε φιλτράρισμαλατινικός-χαρακτήρας-οικογενειακής κανονική έκφρασης ήμορφοποίηση επίδειξης. Η προεπιλογή είναι 0. + +
+
+
+Webroot writable - αυτή η ρύθμιση επιτρέπει σε σας για νακαθορίσει εάν temp τα αρχεία και τα αρχεία επικύρωσης πρέπεινα τοποθετηθούν στο webroot στον κεντρικό υπολογιστή δικτύουσας. Η προεπιλογή είναι 1. + +
+
+
+Επιτρέψτε την αναγραφή QueueMetrics - αυτή η ρύθμιση επιτρέπεισε σας για να καθορίσει εάν VICIDIAL θα παρεμβάλει τιςκαταχωρήσεις κούτσουρων στον πίνακα βάσεων δεδομένων queue_logόπως η δραστηριότητα σειρών αναμονής αστερίσκων. ΤοQueueMetrics είναι ένα πρόγραμμα αυτόνομης, ανάλυσηςκλείνω-πηγής στατιστικό. Πρέπει που εγκαταστάθηκε ήδη ναδιαμορφώσετε QueueMetrics και πρίν επιτρέπετε αυτό τοχαρακτηριστικό γνώρισμα. Η προεπιλογή είναι 0. + +
+
+
+QueueMetrics κεντρικός υπολογιστής IP - αυτό είναι ηδιεύθυνση IP της βάσης δεδομένων για την εγκατάστασηQueueMetrics σας. + +
+
+
+QueueMetrics όνομα βάσεων δεδομένων - αυτό είναι το όνομαβάσεων δεδομένων για τη βάση δεδομένων QueueMetrics σας. + +
+
+
+QueueMetrics σύνδεση βάσεων δεδομένων - αυτό είναι το όνομαχρηστών που χρησιμοποιείται για να συνδεθεί στη βάση δεδομένωνQueueMetrics σας. + +
+
+
+QueueMetrics κωδικός πρόσβασης βάσεων δεδομένων - αυτό είναιο κωδικός πρόσβασης που χρησιμοποιείται για να συνδεθεί στη βάσηδεδομένων QueueMetrics σας. + +
+
+
+QueueMetrics URL - αυτό είναι η διεύθυνση URL ήιστοχώρων που χρησιμοποιείται για να φτάσει στην εγκατάστασηQueueMetrics σας. + +
+
+
+QueueMetrics ταυτότητα κούτσουρων - αυτό είναι η ταυτότητακεντρικών υπολογιστών που όλα τα κούτσουρα VICIDIAL πουπηγαίνουν στη βάση δεδομένων QueueMetrics θα χρησιμοποιήσουν ωςπροσδιοριστικό για κάθε αρχείο. + +
+
+
+QueueMetrics EnterQueue Prepend - αυτός ο τομέαςχρησιμοποιείται για να επιτρέψει ένας από τους τομείς στοιχείωνvicidial_list μπροστά από τον τηλεφωνικό αριθμό του πελάτη γιατις προσαρμοσμένες εκθέσεις QueueMetrics. Η προεπιλογή δενείναι ΚΑΜΙΑ για να μην εποικήσει τίποτα. + +
+
+
+VICIDIAL ο πράκτορας θέτει εκτός λειτουργίας την επίδειξη - αυτός ο τομέας χρησιμοποιείται για να επιλέξει πότε για ναπαρουσιάσει σε έναν πράκτορα πότε η σύνοδός τους έχει τεθείεκτός λειτουργίας από το σύστημα, μια δράση διευθυντών ή απόένα εξωτερικό μέτρο. Η ρύθμιση NOT_ACTIVE θα θέσει εκτόςλειτουργίας το μήνυμα στην οθόνη πρακτόρων. Η ρύθμισηLIVE_ΧΕΙΡΙΣΤΗΣθα επιδείξει μόνο το εκτός λειτουργίας μήνυμα όταναφαιρεθεί το αρχείο πρακτόρων vicidial_auto_calls, όπως κατάτη διάρκεια μιας αποσύνδεσης δύναμης ή της αποσύνδεσης έκτακτηςανάγκης. + +
+
+
+Επιτρέψτε τα μηνύματα SIPSAK - εάν θέστε 1, αυτό θα επιτρέψειτον τηλεφωνικό πίνακα θέτοντας για να εργαστεί κατάλληλα, οκεντρικός υπολογιστής θα στείλει τα μηνύματα στο τηλέφωνοΓΟΥΛΙΏΝ στην επίδειξη στην τηλεφωνική LCD επίδειξη ότανσυνδέεται με VICIDIAL. Αυτό το χαρακτηριστικό γνώρισμαλειτουργεί μόνο με τα τηλέφωνα ΓΟΥΛΙΩΝ και απαιτεί sipsak τηνεφαρμογή για να εγκατασταθεί στον κεντρικό υπολογιστή δικτύου. Ηπροεπιλογή είναι 0. + +
+
+
+Σπίτι URL Admin - αυτό είναι η διεύθυνση URL ήιστοχώρων ότι θα πάτε εάν χτυπήσετε στην ΕΓΧΏΡΙΑ σύνδεση στηνκορυφή της σελίδας admin.php. + + + + +







+







+ΤΕΛΟΣ +
+\n"; + echo "\n"; + echo "\n"; + echo ""; + + $stmt="SELECT dial_statuses,local_call_time,lead_filter_id from vicidial_campaigns where campaign_id='$campaign_id';"; + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + $dial_statuses = $row[0]; + $local_call_time = $row[1]; + if ($lead_filter_id=='') + { + $lead_filter_id = $row[2]; + 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_statuses
\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_statuses,$camp_lists,$fSQL); + + echo "

\n"; + echo "\n"; + + exit; + } + else + { + echo "Δεν έχετε την άδεια να δείτε αυτήν την σελίδα\n"; + exit; + } +} + + +###################### +# ADD=7111111 view sample script with test variables +###################### + +if ($ADD==7111111) +{ + ##### TEST VARIABLES ##### + $vendor_lead_code = 'VENDOR:LEAD;CODE'; + $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'; + $RGlead_id = '1234'; + $RGcampaign = 'TESTCAMP'; + $RGphone_login = 'gs102'; + $RGgroup = 'TESTCAMP'; + $RGchannel_group = 'TESTCAMP'; + $RGSQLdate = date("Y-m-d H:i:s"); + $RGepoch = date("U"); + $RGuniqueid = '1163095830.4136'; + $RGcustomer_zap_channel = 'Zap/1-1'; + $RGserver_ip = '10.10.10.15'; + $RGSIPexten = 'SIP/gs102'; + $RGsession_id = '8600051'; + +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]; + +if (eregi("iframe src",$script_text)) + { + $vendor_lead_code = eregi_replace(' ','+',$vendor_lead_code); + $list_id = eregi_replace(' ','+',$list_id); + $gmt_offset_now = eregi_replace(' ','+',$gmt_offset_now); + $phone_code = eregi_replace(' ','+',$phone_code); + $phone_number = eregi_replace(' ','+',$phone_number); + $title = eregi_replace(' ','+',$title); + $first_name = eregi_replace(' ','+',$first_name); + $middle_initial = eregi_replace(' ','+',$middle_initial); + $last_name = eregi_replace(' ','+',$last_name); + $address1 = eregi_replace(' ','+',$address1); + $address2 = eregi_replace(' ','+',$address2); + $address3 = eregi_replace(' ','+',$address2); + $city = eregi_replace(' ','+',$city); + $state = eregi_replace(' ','+',$state); + $province = eregi_replace(' ','+',$province); + $postal_code = eregi_replace(' ','+',$postal_code); + $country_code = eregi_replace(' ','+',$country_code); + $gender = eregi_replace(' ','+',$gender); + $date_of_birth = eregi_replace(' ','+',$date_of_birth); + $alt_phone = eregi_replace(' ','+',$alt_phone); + $email = eregi_replace(' ','+',$email); + $security_phrase = eregi_replace(' ','+',$security_phrase); + $comments = eregi_replace(' ','+',$comments); + $RGfullname = eregi_replace(' ','+',$RGfullname); + $RGuser = eregi_replace(' ','+',$RGuser); + $RGlead_id = eregi_replace(' ','+',$RGlead_id); + $RGcampaign = eregi_replace(' ','+',$RGcampaign); + $RGphone_login = eregi_replace(' ','+',$RGphone_login); + $RGgroup = eregi_replace(' ','+',$RGgroup); + $RGchannel_group = eregi_replace(' ','+',$RGchannel_group); + $RGSQLdate = eregi_replace(' ','+',$RGSQLdate); + $RGepoch = eregi_replace(' ','+',$RGepoch); + $RGuniqueid = eregi_replace(' ','+',$RGuniqueid); + $RGcustomer_zap_channel = eregi_replace(' ','+',$RGcustomer_zap_channel); + $RGserver_ip = eregi_replace(' ','+',$RGserver_ip); + $RGSIPexten = eregi_replace(' ','+',$RGSIPexten); + $RGsession_id = eregi_replace(' ','+',$RGsession_id); + } + +$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--fronter--B--',"$RGuser",$script_text); +$script_text = eregi_replace('--A--user--B--',"$RGuser",$script_text); +$script_text = eregi_replace('--A--lead_id--B--',"$RGlead_id",$script_text); +$script_text = eregi_replace('--A--campaign--B--',"$RGcampaign",$script_text); +$script_text = eregi_replace('--A--phone_login--B--',"$RGphone_login",$script_text); +$script_text = eregi_replace('--A--group--B--',"$RGgroup",$script_text); +$script_text = eregi_replace('--A--channel_group--B--',"$RGchannel_group",$script_text); +$script_text = eregi_replace('--A--SQLdate--B--',"$RGSQLdate",$script_text); +$script_text = eregi_replace('--A--epoch--B--',"$RGepoch",$script_text); +$script_text = eregi_replace('--A--uniqueid--B--',"$RGuniqueid",$script_text); +$script_text = eregi_replace('--A--customer_zap_channel--B--',"$RGcustomer_zap_channel",$script_text); +$script_text = eregi_replace('--A--server_ip--B--',"$RGserver_ip",$script_text); +$script_text = eregi_replace('--A--SIPexten--B--',"$RGSIPexten",$script_text); +$script_text = eregi_replace('--A--session_id--B--',"$RGsession_id",$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 =\"$users_color\""; $users_fc="$users_font"; $users_bold="$header_selected_bold";} + else {$users_hh=''; $users_fc='WHITE'; $users_bold="$header_nonselected_bold";} +if ($hh=='campaigns') + {$campaigns_hh="bgcolor=\"$campaigns_color\""; $campaigns_fc="$campaigns_font"; $campaigns_bold="$header_selected_bold";} + else {$campaigns_hh=''; $campaigns_fc='WHITE'; $campaigns_bold="$header_nonselected_bold";} +if ($hh=='lists') + {$lists_hh="bgcolor=\"$lists_color\""; $lists_fc="$lists_font"; $lists_bold="$header_selected_bold";} + else {$lists_hh=''; $lists_fc='WHITE'; $lists_bold="$header_nonselected_bold";} +if ($hh=='ingroups') + {$ingroups_hh="bgcolor=\"$ingroups_color\""; $ingroups_fc="$ingroups_font"; $ingroups_bold="$header_selected_bold";} + else {$ingroups_hh=''; $ingroups_fc='WHITE'; $ingroups_bold="$header_nonselected_bold";} +if ($hh=='remoteagent') + {$remoteagent_hh="bgcolor=\"$remoteagent_color\""; $remoteagent_fc="$remoteagent_font"; $remoteagent_bold="$header_selected_bold";} + else {$remoteagent_hh=''; $remoteagent_fc='WHITE'; $remoteagent_bold="$header_nonselected_bold";} +if ($hh=='usergroups') + {$usergroups_hh="bgcolor=\"$usergroups_color\""; $usergroups_fc="$usergroups_font"; $usergroups_bold="$header_selected_bold";} + else {$usergroups_hh=''; $usergroups_fc='WHITE'; $usergroups_bold="$header_nonselected_bold";} +if ($hh=='scripts') + {$scripts_hh="bgcolor=\"$scripts_color\""; $scripts_fc="$scripts_font"; $scripts_bold="$header_selected_bold";} + else {$scripts_hh=''; $scripts_fc='WHITE'; $scripts_bold="$header_nonselected_bold";} +if ($hh=='filters') + {$filters_hh="bgcolor=\"$filters_color\""; $filters_fc="$filters_font"; $filters_bold="$header_selected_bold";} + else {$filters_hh=''; $filters_fc='WHITE'; $filters_bold="$header_nonselected_bold";} +if ($hh=='admin') + {$admin_hh="bgcolor=\"$admin_color\""; $admin_fc="$admin_font"; $admin_bold="$header_selected_bold";} + else {$admin_hh=''; $admin_fc='WHITE'; $admin_bold="$header_nonselected_bold";} +if ($hh=='reports') + {$reports_hh="bgcolor=\"$reports_color\""; $reports_fc="$reports_font"; $reports_bold="$header_selected_bold";} + else {$reports_hh=''; $reports_fc='WHITE'; $reports_bold="$header_nonselected_bold";} + +?> + + + + +\n"; +echo "
English Ελληνικά
BGCOLOR=#D9E6FE cellpadding=2 cellspacing=0> + + + + + + + + + + + + + + + 1) { + ?> +> + 1) { + ?> +> + 1) { + ?> +> + 1) { + ?> +> + 1) { + ?> +> + 1) { + ?> +> + 1) { + ?> +> + 1) { + ?> +> + 1) { + if ($sh=='times') {$times_sh="bgcolor=\"$times_color\""; $times_fc="$times_font";} # hard teal + else {$times_sh=''; $times_fc='BLACK';} + if ($sh=='phones') {$phones_sh="bgcolor=\"$server_color\""; $phones_fc="$phones_font";} # pink + else {$phones_sh=''; $phones_fc='BLACK';} + if ($sh=='server') {$server_sh="bgcolor=\"$server_color\""; $server_fc="$server_font";} # pink + else {$server_sh=''; $server_fc='BLACK';} + if ($sh=='conference') {$conference_sh="bgcolor=\"$server_color\""; $conference_fc="$server_font";} # pink + else {$conference_sh=''; $conference_fc='BLACK';} + if ($sh=='settings') {$settings_sh="bgcolor=\"$server_color\""; $settings_fc="$server_font";} # pink + else {$settings_sh=''; $settings_fc='BLACK';} + + ?> +> + + + + + + + 1) { + ?> + > + 1) { + ?> + > + 1) { + ?> + > + 1) { + ?> + > + 1) { + ?> + > + \n"; + echo "Δεν έχετε το δικαίωμα για να δείτε την σελίδα. Παρακαλώ επιστρέψτε.\n"; + } + +} +if (strlen($reports_hh) > 1) { + ?> +> + + + + +
  ΔΙΑΧΕΙΡΙΣΗ - ΣΠΙΤΙ | Αποσύνδεση  
> SIZE=> Χρήστες > SIZE=> Εκστρατείες > SIZE=> Κατάλογοι > SIZE=> Χειρόγραφα > SIZE=> Φίλτρα > SIZE=> $$$-ΟΜΑΔΕΣ > SIZE=> Ομάδες χρηστών > SIZE=> Μακρινοί πράκτορες > SIZE=> Admin > SIZE=> Εκθέσεις
>   > Παρουσιάστε χρήστες     |     > Προσθέστε έναν νέο χρήστη     |     > Αναζήτηση ενός χρήστη
>   > Παρουσιάστε εκστρατείες     |     > Προσθέστε μια νέα εκστρατεία     |     > Σε πραγματικό χρόνο περίληψη εκστρατειών
>   > Παρουσιάστε καταλόγους     |     > Προσθέστε έναν νέο κατάλογο     |     > Αναζήτηση ενός μολύβδου     |     > Προσθέστε τον αριθμό σε DNC     |     > Νέοι μόλυβδοι φορτίων
>   > Παρουσιάστε χειρόγραφα     |     > Προσθέστε ένα νέο χειρόγραφο
>   > Παρουσιάστε φίλτρα     |     > Προσθέστε ένα νέο φίλτρο
>   > Παρουσιάστε-ΟΜΑΔΕΣ     |     > Προσθέστε μια νέα-ΟΜΑΔΑ
>   > Παρουσιάστε ομάδες χρηστών     |     > Προσθέστε μια νέα ομάδα χρηστών     |     > Ωριαία έκθεση ομάδας
>   > Παρουσιάστε μακρινούς πράκτορες     |     > Προσθέστε τους νέους μακρινούς πράκτορες
COLSPAN=2> SIZE=> Χρόνοι κλήσης COLSPAN=2> SIZE=> Τηλέφωνα COLSPAN=2> SIZE=> Διασκέψεις COLSPAN=1> SIZE=> Κεντρικοί υπολογιστές COLSPAN=3> SIZE=> Τοποθετήσεις συστημάτων
>   > Παρουσιάστε χρόνους κλήσης     |     > Προσθέστε έναν νέο χρόνο κλήσης     |     > Παρουσιάστε χρόνους κρατικής κλήσης     |     > Προσθέστε έναν νέο χρόνο κρατικής κλήσης  
>   > Παρουσιάστε τηλέφωνα   |   > Προσθέστε ένα νέο τηλέφωνο
> Παρουσιάστε διασκέψεις   |   > Προσθέστε μια νέα διάσκεψη   |   > Παρουσιάστε διασκέψεις VICIDIAL   |   > Προσθέστε μια νέα διάσκεψη VICIDIAL
> Παρουσιάστε κεντρικούς υπολογιστές   |   > Προσθέστε έναν νέο κεντρικό υπολογιστή
> Τοποθετήσεις συστημάτων
>  
+
\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"; + } + else + { + echo "Δεν έχετε την άδεια να δείτε αυτήν την σελίδα\n"; + exit; + } +} + + +###################### +# ADD=11 display the ADD NEW CAMPAIGN FORM SCREEN +###################### + +if ($ADD==11) +{ + if ($LOGmodify_campaigns==1) + { + 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 "\n"; + echo "
ID Εκστρατείας: $NWB#vicidial_campaigns-campaign_id$NWE
Ονομα Εκστρατείας: $NWB#vicidial_campaigns-campaign_name$NWE
Περιγραφή εκστρατείας: $NWB#vicidial_campaigns-campaign_description$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"; + } + else + { + echo "Δεν έχετε την άδεια να δείτε αυτήν την σελίδα\n"; + exit; + } +} + + +###################### +# ADD=111 display the ADD NEW LIST FORM SCREEN +###################### + +if ($ADD==111) +{ + if ($LOGmodify_lists==1) + { + echo "
\n"; + echo ""; + + echo "
ADD A NEW LIST\n"; + echo "\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-list_description$NWE
Εκστρατεία: $NWB#vicidial_lists-campaign_id$NWE
Ενεργή:$NWB#vicidial_lists-active$NWE
\n"; + } + else + { + echo "Δεν έχετε την άδεια να δείτε αυτήν την σελίδα\n"; + exit; + } +} + + +###################### +# 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) +{ + if ($LOGmodify_ingroups==1) + { + 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"; + } + else + { + echo "Δεν έχετε την άδεια να δείτε αυτήν την σελίδα\n"; + exit; + } +} + + +###################### +# ADD=11111 display the ADD NEW REMOTE AGENTS SCREEN +###################### + +if ($ADD==11111) +{ + if ($LOGmodify_remoteagents==1) + { + 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"; + } + else + { + echo "Δεν έχετε την άδεια να δείτε αυτήν την σελίδα\n"; + exit; + } +} + + +###################### +# ADD=111111 display the ADD NEW USERS GROUP SCREEN +###################### + +if ($ADD==111111) +{ + if ($LOGmodify_usergroups==1) + { + 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"; + } + else + { + echo "Δεν έχετε την άδεια να δείτε αυτήν την σελίδα\n"; + exit; + } +} + + +###################### +# ADD=1111111 display the ADD NEW SCRIPT SCREEN +###################### + +if ($ADD==1111111) +{ + if ($LOGmodify_scripts==1) + { + 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
Κείμενο χειρόγραφου: "; + # BEGIN Insert Field + echo ""; + echo "
"; + # END Insert Field + echo " $NWB#vicidial_scripts-script_text$NWE
\n"; + } + else + { + echo "Δεν έχετε την άδεια να δείτε αυτήν την σελίδα\n"; + exit; + } +} + + +###################### +# ADD=11111111 display the ADD NEW FILTER SCREEN +###################### + +if ($ADD==11111111) +{ + if ($LOGmodify_filters==1) + { + 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"; + } + else + { + echo "Δεν έχετε την άδεια να δείτε αυτήν την σελίδα\n"; + exit; + } +} + + +###################### +# ADD=111111111 display the ADD NEW CALL TIME SCREEN +###################### + +if ($ADD==111111111) +{ + if ($LOGmodify_call_times==1) + { + 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"; + } + else + { + echo "Δεν έχετε την άδεια να δείτε αυτήν την σελίδα\n"; + exit; + } +} + + +###################### +# ADD=1111111111 display the ADD NEW STATE CALL TIME SCREEN +###################### + +if ($ADD==1111111111) +{ + if ($LOGmodify_call_times==1) + { + 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"; + } + else + { + echo "Δεν έχετε την άδεια να δείτε αυτήν την σελίδα\n"; + exit; + } +} + + +###################### +# ADD=11111111111 display the ADD NEW PHONE SCREEN +###################### + +if ($ADD==11111111111) +{ + if ($LOGast_admin_access==1) + { + 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 "\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"; + } + else + { + echo "Δεν έχετε την άδεια να δείτε αυτήν την σελίδα\n"; + exit; + } +} + + +###################### +# ADD=111111111111 display the ADD NEW SERVER SCREEN +###################### + +if ($ADD==111111111111) +{ + if ($LOGmodify_servers==1) + { + echo "
\n"; + 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"; + } + else + { + echo "Δεν έχετε την άδεια να δείτε αυτήν την σελίδα\n"; + exit; + } +} + + +###################### +# ADD=1111111111111 display the ADD NEW CONFERENCE SCREEN +###################### + +if ($ADD==1111111111111) +{ + if ($LOGast_admin_access==1) + { + echo "
\n"; + 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"; + } + else + { + echo "Δεν έχετε την άδεια να δείτε αυτήν την σελίδα\n"; + exit; + } +} + + +###################### +# ADD=11111111111111 display the ADD NEW VICIDIAL CONFERENCE SCREEN +###################### + +if ($ADD==11111111111111) +{ + if ($LOGast_admin_access==1) + { + echo "
\n"; + echo ""; + + echo "
ADD A NEW VICIDIAL CONFERENCE\n"; + echo "\n"; + echo "
\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "
Αριθμός Συνδιάλεξης: (μόνο αριθμοί)$NWB#conferences-conf_exten$NWE
IP Διακομιστή: $NWB#conferences-server_ip$NWE
\n"; + } + else + { + echo "Δεν έχετε την άδεια να δείτε αυτήν την σελίδα\n"; + exit; + } +} + + + +###################################################################################################### +###################################################################################################### +####### 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,campaign_description,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,campaign_changedate,campaign_stats_refresh) values('$campaign_id','$campaign_name','$campaign_description','$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','$SQLdate','Y');"; + $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 "
CAMPAIGN HOT KEY 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 "
ΤΟ ΚΛΕΙΔΙ ΤΗΣ ΕΚΣΤΡΑΤΕΙΑΣ ΔΕΝ ΠΡΟΣΤΕΘΗΚΕ - Παρακαλώ ελέγξτε τα δεδομένα που καταχωρήσατε\n"; + echo "
hotkey must be a single character between 1 and 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|ΠΡΟΣΘΗΚΗ ΝΕΑΣ ΕΚΣΤΡΑΤΕΙΑΣ HOT KEY |$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=26 adds the new auto alt dial status to the campaign +###################### + +if ($ADD==26) +{ + $status = eregi_replace("-----.*",'',$status); + echo ""; + $stmt="SELECT count(*) from vicidial_campaigns where campaign_id='$campaign_id' and auto_alt_dial_statuses LIKE \"% $status %\";"; + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + if ($row[0] > 0) + {echo "
ΑΥΤΟΜΑΤΗ ΘΈΣΗ ΠΙΝΑΚΩΝ ALT ΠΡΟΣΤΙΘΈΜΕΝΗ - υπάρχει ήδη μια είσοδος για αυτήν την εκστρατεία με αυτήν τηνθέση\n";} + else + { + if ( (strlen($campaign_id) < 2) or (strlen($status) < 1) ) + { + echo "
ΑΥΤΟΜΑΤΗ ΘΈΣΗ ΠΙΝΑΚΩΝ ALT ΠΡΟΣΤΙΘΈΜΕΝΗ - Παρακαλώ επιστρέψτε πίσω και κάνετε έλεγχο των δεδομένων που καταχωρήσατε\n"; + echo "
η κατάσταση πρέπει να είναι μεταξύ 1 και 6 χαρακτήρων στο μήκος\n"; + } + else + { + echo "
ΑΥΤΟΜΑΤΗ ΘΈΣΗ ΠΙΝΑΚΩΝ ALT ΠΡΟΣΤΙΘΈΜΕΝΗ: $campaign_id - $status\n"; + + $stmt="SELECT auto_alt_dial_statuses from vicidial_campaigns where campaign_id='$campaign_id';"; + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + + if (strlen($row[0])<2) {$row[0] = ' -';} + $auto_alt_dial_statuses = " $status$row[0]"; + $stmt="UPDATE vicidial_campaigns set auto_alt_dial_statuses='$auto_alt_dial_statuses' 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|ADD A AUTO-ALT-DIAL STATUS|$PHP_AUTH_USER|$ip|$stmt|\n"); + fclose($fp); + } + } + } +$ADD=31; +} + + +###################### +# ADD=27 adds the new campaign agent pause code entry to the system +###################### + +if ($ADD==27) +{ + echo ""; + $stmt="SELECT count(*) from vicidial_pause_codes where campaign_id='$campaign_id' and pause_code='$pause_code';"; + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + if ($row[0] > 0) + {echo "
ΚΩΔΙΚΑΣ ΜΙΚΡΗΣ ΔΙΑΚΟΠΉΣ ΠΡΑΚΤΟΡΩΝ ΠΡΟΣΤΙΘΕΜΕΝΟΣ - υπάρχει ήδη μια είσοδος για αυτήν την εκστρατεία με αυτόν τονκώδικα μικρής διακοπής\n";} + else + { + if ( (strlen($campaign_id) < 2) or (strlen($pause_code) < 1) or (strlen($pause_code) > 6) or (strlen($pause_code_name) < 2) ) + { + echo "
ΚΩΔΙΚΑΣ ΜΙΚΡΗΣ ΔΙΑΚΟΠΉΣ ΠΡΑΚΤΟΡΩΝ ΠΡΟΣΤΙΘΕΜΕΝΟΣ - Παρακαλώ επιστρέψτε πίσω και κάνετε έλεγχο των δεδομένων που καταχωρήσατε\n"; + echo "
pause code must be between 1 and 6 characters in length\n"; + echo "
pause code name must be between 2 and 30 characters in length\n"; + } + else + { + echo "
ΚΩΔΙΚΑΣ ΜΙΚΡΗΣ ΔΙΑΚΟΠΉΣ ΠΡΑΚΤΟΡΩΝ ΠΡΟΣΤΙΘΕΜΕΝΟΣ: $campaign_id - $pause_code - $pause_code_name\n"; + + $stmt="INSERT INTO vicidial_pause_codes(campaign_id,pause_code,pause_code_name,billable) values('$campaign_id','$pause_code','$pause_code_name','$billable');"; + $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 ΧΕΙΡΙΣΤΗΣPAUSE CODE|$PHP_AUTH_USER|$ip|$stmt|\n"); + fclose($fp); + } + } + } +$ADD=31; +} + + +###################### +# ADD=28 adds new status to the campaign dial statuses +###################### + +if ($ADD==28) +{ + $status = eregi_replace("-----.*",'',$status); + echo ""; + $stmt="SELECT count(*) from vicidial_campaigns where campaign_id='$campaign_id' and dial_statuses LIKE \"% $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) ) + { + echo "
ΘΕΣΗ ΠΙΝΑΚΩΝ ΕΚΣΤΡΑΤΕΙΑΣ ΠΡΟΣΤΙΘΕΜΕΝΗ - Παρακαλώ επιστρέψτε πίσω και κάνετε έλεγχο των δεδομένων που καταχωρήσατε\n"; + echo "
η κατάσταση πρέπει να είναι μεταξύ 1 και 6 χαρακτήρων στο μήκος\n"; + } + else + { + echo "
ΘΕΣΗ ΠΙΝΑΚΩΝ ΕΚΣΤΡΑΤΕΙΑΣ ΠΡΟΣΤΙΘΕΜΕΝΗ: $campaign_id - $status\n"; + + $stmt="SELECT dial_statuses from vicidial_campaigns where campaign_id='$campaign_id';"; + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + + if (strlen($row[0])<2) {$row[0] = ' -';} + $dial_statuses = " $status$row[0]"; + $stmt="UPDATE vicidial_campaigns set dial_statuses='$dial_statuses' 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|ΠΡΟΣΘΗΚΗ ΕΚΣΤΡΑΤΕΙΑΣ DIAL STATUS |$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 ($list_id < 100) or (strlen($list_id) > 8) ) + { + echo "
Η ΛΙΣΤΑ ΔΕΝ ΠΡΟΣΤΕΘΗΚΕ - Παρακαλώ ελέγξτε τα δεδομένα που καταχωρήσατε\n"; + echo "
Το ID λίστας πρέπει να είναι μεταξύ 2 και 8 χαρακτήρες\n"; + echo "
Το όνομα λίστας πρέπει να είναι 2 χαρακτήρες\n"; + echo "
ID Λίστας must be greater than 100\n"; + } + else + { + echo "
ΛΙΣΤΑ ΠΡΟΣΤΕΘΗΚΕ: $list_id\n"; + + $stmt="INSERT INTO vicidial_lists (list_id,list_name,campaign_id,active,list_description,list_changedate) values('$list_id','$list_name','$campaign_id','$active','$list_description','$SQLdate');"; + $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|$stmt|\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(user_group,group_name,allowed_campaigns) values('$user_group','$group_name','-ALL-CAMPAIGNS-');"; + $rslt=mysql_query($stmt, $link); + + echo "
ΟΜΑΔΑ ΧΡΗΣΤΗ ΠΡΟΣΤΕΘΗΚΕ: $user_group\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|$stmt|\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','$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; +} + + +###################### +# ADD=21111111111 adds new phone to the system +###################### + +if ($ADD==21111111111) +{ +echo "
\n"; + 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=31111111111; +} + + +###################### +# ADD=211111111111 adds new server to the system +###################### + +if ($ADD==211111111111) +{ +echo "
\n"; + 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=311111111111; +} + + +###################### +# ADD=221111111111 adds the new vicidial server trunk record to the system +###################### + +if ($ADD==221111111111) +{ + echo ""; + $stmt="SELECT max_vicidial_trunks from servers where server_ip='$server_ip';"; + $rslt=mysql_query($stmt, $link); + $rowx=mysql_fetch_row($rslt); + $MAXvicidial_trunks = $rowx[0]; + + $stmt="SELECT sum(dedicated_trunks) from vicidial_server_trunks where server_ip='$server_ip' and campaign_id !='$campaign_id';"; + $rslt=mysql_query($stmt, $link); + $rowx=mysql_fetch_row($rslt); + $SUMvicidial_trunks = ($rowx[0] + $dedicated_trunks); + + if ($SUMvicidial_trunks > $MAXvicidial_trunks) + { + echo "
Η ΕΓΓΡΑΦΗ ΤΟΥ ΚΟΡΜΟΥ ΣΤΟΝ ΕΞΥΠΗΡΕΤΗΤΗ ΔΕΝ ΠΡΟΣΤΕΘΗΚΕ - ο αριθμός των κορμών είναι πολύ υψηλός: $SUMvicidial_trunks / $MAXvicidial_trunks\n"; + } + else + { + $stmt="SELECT count(*) from vicidial_server_trunks where campaign_id='$campaign_id' and server_ip='$server_ip';"; + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + if ($row[0] > 0) + {echo "
Η ΕΓΓΡΑΦΗ ΤΟΥ ΚΟΡΜΟΥ ΣΤΟΝ ΕΞΥΠΗΡΕΤΗΤΗ ΔΕΝ ΠΡΟΣΤΕΘΗΚΕ - υπάρχει ήδη μία εγγραφή-κορμού στον εξυπηρετητή για την εκστρατεία\n";} + else + { + if ( (strlen($campaign_id) < 2) or (strlen($server_ip) < 7) or (strlen($dedicated_trunks) < 1) or (strlen($trunk_restriction) < 1) ) + { + echo "
Η ΕΓΓΡΑΦΗ ΤΟΥ ΚΟΡΜΟΥ ΣΤΟΝ ΕΞΥΠΗΡΕΤΗΤΗ ΔΕΝ ΠΡΟΣΤΕΘΗΚΕ - Παρακαλώ επιστρέψτε πίσω και κάνετε έλεγχο των δεδομένων που καταχωρήσατε\n"; + echo "
η εκστρατεία πρέπει να είναι μεταξύ 3 και 8 χαρακτήρων στο μήκος\n"; + echo "
η server_ip καθυστέρηση πρέπει να είναι τουλάχιστον 7 χαρακτήρες\n"; + echo "
οι κορμοί πρέπει να είναι ένα ψηφίο από 0 έως 9999\n"; + } + else + { + echo "
Η ΕΓΓΡΑΦΗ ΤΟΥ ΚΟΡΜΟΥ ΣΤΟΝ ΕΞΥΠΗΡΕΤΗΤΗ ΠΡΟΣΤΕΘΗΚΕ: $campaign_id - $server_ip - $dedicated_trunks - $trunk_restriction\n"; + + $stmt="INSERT INTO vicidial_server_trunks(server_ip,campaign_id,dedicated_trunks,trunk_restriction) values('$server_ip','$campaign_id','$dedicated_trunks','$trunk_restriction');"; + $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 VICIDIAL TRUNK |$PHP_AUTH_USER|$ip|$stmt|\n"); + fclose($fp); + } + } + } + } +$ADD=311111111111; +} + + +###################### +# ADD=2111111111111 adds new conference to the system +###################### + +if ($ADD==2111111111111) +{ +echo "
\n"; + 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=3111111111111; +} + + +###################### +# ADD=21111111111111 adds new vicidial conference to the system +###################### + +if ($ADD==21111111111111) +{ +echo "
\n"; + echo ""; + $stmt="SELECT count(*) from vicidial_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 "
VICIDIAL CONFERENCE NOT ADDED - there is already a vicidial conference in the system with this ID and server\n";} + else + { + if ( (strlen($conf_exten) < 1) or (strlen($server_ip) < 7) ) + {echo "
VICIDIAL Η ΣΥΝΔΙΑΛΕΞΗ ΔΕΝ ΠΡΟΣΤΕΘΗΚΕ - Παρακαλώ ελέγξτε τα δεδομένα που καταχωρήσατε\n";} + else + { + echo "
VICIDIAL Η ΣΥΝΔΙΑΛΕΞΗ ΠΡΟΣΤΕΘΗΚΕ\n"; + + $stmt="INSERT INTO vicidial_conferences (conf_exten,server_ip) values('$conf_exten','$server_ip');"; + $rslt=mysql_query($stmt, $link); + } + } +$ADD=31111111111111; +} + + + +###################################################################################################### +###################################################################################################### +####### 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") +{ + if ($LOGmodify_users==1) + { + 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',modify_users='$modify_users',modify_campaigns='$modify_campaigns',modify_lists='$modify_lists',modify_scripts='$modify_scripts',modify_filters='$modify_filters',modify_ingroups='$modify_ingroups',modify_usergroups='$modify_usergroups',modify_remoteagents='$modify_remoteagents',modify_servers='$modify_servers',view_reports='$view_reports',vicidial_recording_override='$vicidial_recording_override',alter_custdata_override='$alter_custdata_override' 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); + } + } + } + else + { + echo "Δεν έχετε την άδεια να δείτε αυτήν την σελίδα\n"; + exit; + } +$ADD=3; # go to user modification below +} + + +###################### +# ADD=4B submit user modifications to the system - ADMIN +###################### + +if ($ADD=="4B") +{ + if ($LOGmodify_users==1) + { + 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',vicidial_recording_override='$vicidial_recording_override',alter_custdata_override='$alter_custdata_override' 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); + } + } + } + else + { + echo "Δεν έχετε την άδεια να δείτε αυτήν την σελίδα\n"; + exit; + } +$ADD=3; # go to user modification below +} + + + +###################### +# ADD=4 submit user modifications to the system +###################### + +if ($ADD==4) +{ + if ($LOGmodify_users==1) + { + 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); + } + } + } + else + { + echo "Δεν έχετε την άδεια να δείτε αυτήν την σελίδα\n"; + exit; + } +$ADD=3; # go to user modification below +} + +###################### +# ADD=41 submit campaign modifications to the system +###################### + +if ($ADD==41) +{ + if ($LOGmodify_campaigns==1) + { + echo ""; + + if ( (strlen($campaign_name) < 6) or (strlen($active) < 1) ) + { + echo "
Η ΕΚΣΤΡΑΤΕΙΑ ΔΕΝ ΤΡΟΠΟΠΟΙΗΘΗΚΕ - Παρακαλώ ελέγξτε τα δεδομένα που καταχωρήσατε\n"; + echo "
το όνομα της εκστρατείας πρέπει να είναι τουλάχιστον 6 χαρακτήρες\n"; + echo "
|$campaign_name|$active|\n"; + } + else + { + echo "
ΕΣΤΡΑΤΕΙΑ ΤΡΟΠΟΠΟΙΗΘΗΚΕ: $campaign_id\n"; + + if ($dial_method == 'MANUAL') + { + $auto_dial_level='0'; + $adlSQL = "auto_dial_level='0',"; + } + else + { + if ($dial_level_override > 0) + { + $adlSQL = "auto_dial_level='$auto_dial_level',"; + } + else + { + if ($dial_method == 'RATIO') + { + if ($auto_dial_level < 1) {$auto_dial_level = "1.0";} + $adlSQL = "auto_dial_level='$auto_dial_level',"; + } + else + { + $adlSQL = ""; + if ($auto_dial_level < 1) + { + $auto_dial_level = "1.0"; + $adlSQL = "auto_dial_level='$auto_dial_level',"; + } + } + } + } + $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', $adlSQL 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',allcalls_delay='$allcalls_delay',omit_phone_code='$omit_phone_code',dial_method='$dial_method',available_only_ratio_tally='$available_only_ratio_tally',adaptive_dropped_percentage='$adaptive_dropped_percentage',adaptive_maximum_level='$adaptive_maximum_level',adaptive_latest_server_time='$adaptive_latest_server_time',adaptive_intensity='$adaptive_intensity',adaptive_dl_diff_target='$adaptive_dl_diff_target',concurrent_transfers='$concurrent_transfers',auto_alt_dial='$auto_alt_dial',agent_pause_codes_active='$agent_pause_codes_active',campaign_description='$campaign_description',campaign_changedate='$SQLdate',campaign_stats_refresh='$campaign_stats_refresh',disable_alter_custdata='$disable_alter_custdata',no_hopper_leads_logins='$no_hopper_leads_logins' 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 IN('READY','QUEUE','DONE');"; + $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|$stmt|\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); + } + } + } + else + { + echo "Δεν έχετε την άδεια να δείτε αυτήν την σελίδα\n"; + exit; + } +$ADD=31; # go to campaign modification form below +} + +###################### +# ADD=42 delete campaign status in the system +###################### + +if ($ADD==42) +{ + if ($LOGmodify_campaigns==1) + { + 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); + } + } + } + else + { + echo "Δεν έχετε την άδεια να δείτε αυτήν την σελίδα\n"; + exit; + } +$ADD=31; # go to campaign modification form below +} + +###################### +# ADD=43 delete campaign hotkey in the system +###################### + +if ($ADD==43) +{ + if ($LOGmodify_campaigns==1) + { + echo ""; + + if ( (strlen($campaign_id) < 2) or (strlen($status) < 1) or (strlen($hotkey) < 1) ) + { + echo "
ΤΟ ΚΛΕΙΔΙ ΤΗΣ ΕΚΣΤΡΑΤΕΙΑΣ ΔΕΝ ΤΡΟΠΟΠΟΙΗΘΗΚΕ - Παρακαλώ ελέγξτε τα δεδομένα που καταχωρήσατε\n"; + echo "
το ID της εκστρατείας πρέπει να είναι τουλάχιστον 2 χαρακτήρες\n"; + echo "
η κατάσταση της εκστρατείας πρέπει να είναι τουλάχιστον 1 χαρακτήρας\n"; + echo "
the campaign hotkey needs to be at least 1 characters in length\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); + } + } + } + else + { + echo "Δεν έχετε την άδεια να δείτε αυτήν την σελίδα\n"; + exit; + } +$ADD=31; # go to campaign modification form below +} + +###################### +# ADD=44 submit campaign modifications to the system - Basic View +###################### + +if ($ADD==44) +{ + if ($LOGmodify_campaigns==1) + { + echo ""; + + if ( (strlen($campaign_name) < 6) or (strlen($active) < 1) ) + { + echo "
Η ΕΚΣΤΡΑΤΕΙΑ ΔΕΝ ΤΡΟΠΟΠΟΙΗΘΗΚΕ - Παρακαλώ ελέγξτε τα δεδομένα που καταχωρήσατε\n"; + echo "
το όνομα της εκστρατείας πρέπει να είναι τουλάχιστον 6 χαρακτήρες\n"; + } + else + { + echo "
ΕΣΤΡΑΤΕΙΑ ΤΡΟΠΟΠΟΙΗΘΗΚΕ: $campaign_id\n"; + + if ($dial_method == 'RATIO') + { + if ($auto_dial_level < 1) {$auto_dial_level = "1.0";} + $adlSQL = "auto_dial_level='$auto_dial_level',"; + } + else + { + if ($dial_method == 'MANUAL') + { + $auto_dial_level='0'; + $adlSQL = "auto_dial_level='0',"; + } + else + { + $adlSQL = ""; + if ($auto_dial_level < 1) + { + $auto_dial_level = "1.0"; + $adlSQL = "auto_dial_level='$auto_dial_level',"; + } + } + } + $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', $adlSQL lead_filter_id='$lead_filter_id',dial_method='$dial_method',adaptive_intensity='$adaptive_intensity',campaign_description='$campaign_description',campaign_changedate='$SQLdate' 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 IN('READY','QUEUE','DONE');;"; + $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|$stmt|\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); + } + } + } + else + { + echo "Δεν έχετε την άδεια να δείτε αυτήν την σελίδα\n"; + exit; + } +$ADD=34; # go to campaign modification form below +} + +###################### +# ADD=45 modify campaign lead recycle in the system +###################### + +if ($ADD==45) +{ + if ($LOGmodify_campaigns==1) + { + 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); + } + } + } + else + { + echo "Δεν έχετε την άδεια να δείτε αυτήν την σελίδα\n"; + exit; + } +$ADD=31; # go to campaign modification form below +} + +###################### +# ADD=47 modify agent pause code in the system +###################### + +if ($ADD==47) +{ + if ($LOGmodify_campaigns==1) + { + echo ""; + + if ( (strlen($campaign_id) < 2) or (strlen($pause_code) < 1) or (strlen($pause_code) > 6) or (strlen($pause_code_name) < 2) ) + { + echo "
ΚΩΔΙΚΑΣ ΜΙΚΡΗΣ ΔΙΑΚΟΠΉΣ ΠΡΑΚΤΟΡΩΝ ΤΡΟΠΟΠΟΙΗΜΕΝΟΣ - Παρακαλώ επιστρέψτε πίσω και κάνετε έλεγχο των δεδομένων που καταχωρήσατε\n"; + echo "
pause_code must be between 1 and 6 characters in length\n"; + echo "
pause_code name must be between 2 and 30 characters in length\n"; + } + else + { + echo "
ΧΕΙΡΙΣΤΗΣPAUSE CODE MODIFIED: $campaign_id - $pause_code - $pause_code_name\n"; + + $stmt="UPDATE vicidial_pause_codes SET pause_code_name='$pause_code_name',billable='$billable' where campaign_id='$campaign_id' and pause_code='$pause_code';"; + $rslt=mysql_query($stmt, $link); + + ### LOG CHANGES TO LOG FILE ### + if ($WeBRooTWritablE > 0) + { + $fp = fopen ("./admin_changes_log.txt", "a"); + fwrite ($fp, "$date|MODIFY ΧΕΙΡΙΣΤΗΣPAUSECODE|$PHP_AUTH_USER|$ip|$stmt|\n"); + fclose($fp); + } + } + } + else + { + echo "Δεν έχετε την άδεια να δείτε αυτήν την σελίδα\n"; + exit; + } +$ADD=31; # go to campaign modification form below +} + +###################### +# ADD=411 submit list modifications to the system +###################### + +if ($ADD==411) +{ + if ($LOGmodify_lists==1) + { + 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',list_description='$list_description',list_changedate='$SQLdate' 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',list_description='$list_description' where list_id='$list_id'|\n"); + fclose($fp); + } + } + } + else + { + echo "Δεν έχετε την άδεια να δείτε αυτήν την σελίδα\n"; + exit; + } +$ADD=311; # go to list modification form below +} + + +###################### +# ADD=4111 modify in-group info in the system +###################### + +if ($ADD==4111) +{ + if ($LOGmodify_ingroups==1) + { + 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); + } + } + } + else + { + echo "Δεν έχετε την άδεια να δείτε αυτήν την σελίδα\n"; + exit; + } +$ADD=3111; # go to in-group modification form below +} + + + +###################### +# ADD=41111 modify remote agents info in the system +###################### + +if ($ADD==41111) +{ + if ($LOGmodify_remoteagents==1) + { + 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); + } + } + } + else + { + echo "Δεν έχετε την άδεια να δείτε αυτήν την σελίδα\n"; + exit; + } +$ADD=31111; # go to remote agents modification form below +} + + + +###################### +# ADD=411111 modify user group info in the system +###################### + +if ($ADD==411111) +{ + if ($LOGmodify_usergroups==1) + { + 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',allowed_campaigns='$campaigns_value' 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|$stmt|\n"); + fclose($fp); + } + } + } + else + { + echo "Δεν έχετε την άδεια να δείτε αυτήν την σελίδα\n"; + exit; + } +$ADD=311111; # go to user group modification form below +} + +###################### +# ADD=4111111 modify script in the system +###################### + +if ($ADD==4111111) +{ + if ($LOGmodify_scripts==1) + { + echo "\n"; + echo "\n"; + 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='$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); + } + } + } + else + { + echo "Δεν έχετε την άδεια να δείτε αυτήν την σελίδα\n"; + exit; + } +$ADD=3111111; # go to script modification form below +} + + +###################### +# ADD=41111111 modify filter in the system +###################### + +if ($ADD==41111111) +{ + if ($LOGmodify_filters==1) + { + 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); + } + } + } + else + { + echo "Δεν έχετε την άδεια να δείτε αυτήν την σελίδα\n"; + exit; + } +$ADD=31111111; # go to filter modification form below +} + + +###################### +# ADD=411111111 modify call time in the system +###################### + +if ($ADD==411111111) +{ + if ($LOGmodify_call_times==1) + { + 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); + } + } + } + else + { + echo "Δεν έχετε την άδεια να δείτε αυτήν την σελίδα\n"; + exit; + } +$ADD=311111111; # go to call time modification form below +} + + +###################### +# ADD=4111111111 modify state call time in the system +###################### + +if ($ADD==4111111111) +{ + if ($LOGmodify_call_times==1) + { + 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); + } + } + } + else + { + echo "Δεν έχετε την άδεια να δείτε αυτήν την σελίδα\n"; + exit; + } +$ADD=3111111111; # go to state call time modification form below +} + + +###################### +# ADD=41111111111 modify phone record in the system +###################### + +if ($ADD==41111111111) +{ + if ($LOGast_admin_access==1) + { + 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', enable_sipsak_messages='$enable_sipsak_messages' where extension='$old_extension' and server_ip='$old_server_ip';"; + $rslt=mysql_query($stmt, $link); + } + } + } + else + { + echo "Δεν έχετε την άδεια να δείτε αυτήν την σελίδα\n"; + exit; + } +$ADD=31111111111; # go to phone modification form below +} + + +###################### +# ADD=411111111111 modify server record in the system +###################### + +if ($ADD==411111111111) +{ + if ($LOGmodify_servers==1) + { + 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', sys_perf_log='$sys_perf_log', vd_server_logs='$vd_server_logs', agi_output='$agi_output', vicidial_balance_active='$vicidial_balance_active', balance_trunks_offlimits='$balance_trunks_offlimits' where server_id='$old_server_id';"; + $rslt=mysql_query($stmt, $link); + } + } + } + } + else + { + echo "Δεν έχετε την άδεια να δείτε αυτήν την σελίδα\n"; + exit; + } +$ADD=311111111111; # go to server modification form below +} + + +###################### +# ADD=421111111111 modify vicidial server trunks record in the system +###################### + +if ($ADD==421111111111) +{ + if ($LOGmodify_servers==1) + { + echo ""; + $stmt="SELECT max_vicidial_trunks from servers where server_ip='$server_ip';"; + $rslt=mysql_query($stmt, $link); + $rowx=mysql_fetch_row($rslt); + $MAXvicidial_trunks = $rowx[0]; + + $stmt="SELECT sum(dedicated_trunks) from vicidial_server_trunks where server_ip='$server_ip' and campaign_id !='$campaign_id';"; + $rslt=mysql_query($stmt, $link); + $rowx=mysql_fetch_row($rslt); + $SUMvicidial_trunks = ($rowx[0] + $dedicated_trunks); + + if ($SUMvicidial_trunks > $MAXvicidial_trunks) + { + echo "
Η ΕΓΓΡΑΦΗ ΤΟΥ ΚΟΡΜΟΥ ΣΤΟΝ ΕΞΥΠΗΡΕΤΗΤΗ ΔΕΝ ΠΡΟΣΤΕΘΗΚΕ - ο αριθμός των κορμών είναι πολύ υψηλός: $SUMvicidial_trunks / $MAXvicidial_trunks\n"; + } + else + { + if ( (strlen($campaign_id) < 2) or (strlen($server_ip) < 7) or (strlen($dedicated_trunks) < 1) or (strlen($trunk_restriction) < 1) ) + { + echo "
Η ΕΓΓΡΑΦΗ ΤΟΥ ΚΟΡΜΟΥ ΣΤΟΝ ΕΞΥΠΗΡΕΤΗΤΗ ΔΕΝ ΤΡΟΠΟΠΟΙΗΘΗΚΕ - Παρακαλώ επιστρέψτε πίσω και κάνετε έλεγχο των δεδομένων που καταχωρήσατε\n"; + echo "
η εκστρατεία πρέπει να είναι μεταξύ 3 και 8 χαρακτήρων στο μήκος\n"; + echo "
η server_ip καθυστέρηση πρέπει να είναι τουλάχιστον 7 χαρακτήρες\n"; + echo "
οι κορμοί πρέπει να είναι ένα ψηφίο από 0 έως 9999\n"; + } + else + { + echo "
Η ΕΓΓΡΑΦΗ ΤΟΥ ΚΟΡΜΟΥ ΣΤΟΝ ΕΞΥΠΗΡΕΤΗΤΗ ΤΡΟΠΟΠΟΙΗΘΗΚΕ: $campaign_id - $server_ip - $dedicated_trunks - $trunk_restriction\n"; + + $stmt="UPDATE vicidial_server_trunks SET dedicated_trunks='$dedicated_trunks',trunk_restriction='$trunk_restriction' where campaign_id='$campaign_id' and server_ip='$server_ip';"; + $rslt=mysql_query($stmt, $link); + + ### LOG CHANGES TO LOG FILE ### + if ($WeBRooTWritablE > 0) + { + $fp = fopen ("./admin_changes_log.txt", "a"); + fwrite ($fp, "$date|ΤΡΟΠΟΠΟΙΗΣΕ ΔΙΑΚΟΜΙΣΤΗ TRUNK |$PHP_AUTH_USER|$ip|$stmt|\n"); + fclose($fp); + } + } + } + } + else + { + echo "Δεν έχετε την άδεια να δείτε αυτήν την σελίδα\n"; + exit; + } +$ADD=311111111111; # go to server modification form below +} + + +###################### +# ADD=4111111111111 modify conference record in the system +###################### + +if ($ADD==4111111111111) +{ + if ($LOGast_admin_access==1) + { + 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); + } + } + } + else + { + echo "Δεν έχετε την άδεια να δείτε αυτήν την σελίδα\n"; + exit; + } +$ADD=3111111111111; # go to conference modification form below +} + + +###################### +# ADD=41111111111111 modify vicidial conference record in the system +###################### + +if ($ADD==41111111111111) +{ + if ($LOGast_admin_access==1) + { + echo ""; + + $stmt="SELECT count(*) from vicidial_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 "
VICIDIAL Η ΣΥΝΔΙΑΛΕΞΗ ΔΕΝ ΤΡΟΠΟΠΟΙΗΘΗΚΕ - υπάρχει ήδη μία συνδιάλεξη με αυτή την εσωτ.σύνδεση-διακομιστή\n";} + else + { + if ( (strlen($conf_exten) < 1) or (strlen($server_ip) < 7) ) + {echo "
VICIDIAL Η ΣΥΝΔΙΑΛΕΞΗ ΔΕΝ ΤΡΟΠΟΠΟΙΗΘΗΚΕ - Παρακαλώ ελέγξτε τα δεδομένα που καταχωρήσατε\n";} + else + { + echo "
VICIDIAL Η ΣΥΝΔΙΑΛΕΞΗ ΤΡΟΠΟΠΟΙΗΘΗΚΕ: $conf_exten\n"; + + $stmt="UPDATE vicidial_conferences set conf_exten='$conf_exten',server_ip='$server_ip',extension='$extension' where conf_exten='$old_conf_exten';"; + $rslt=mysql_query($stmt, $link); + + } + } + } + else + { + echo "Δεν έχετε την άδεια να δείτε αυτήν την σελίδα\n"; + exit; + } +$ADD=31111111111111; # go to vicidial conference modification form below +} + + + +###################### +# ADD=411111111111111 modify vicidial system settings +###################### + +if ($ADD==411111111111111) +{ + if ($LOGmodify_servers==1) + { + echo ""; + + echo "
VICIDIAL ΤΟΠΟΘΕΤΗΣΕΙΣ ΣΥΣΤΗΜΑΤΩΝ ΤΡΟΠΟΠΟΙΗΜΕΝΕΣ\n"; + + $stmt="UPDATE system_settings set use_non_latin='$use_non_latin',webroot_writable='$webroot_writable',enable_queuemetrics_logging='$enable_queuemetrics_logging',queuemetrics_server_ip='$queuemetrics_server_ip',queuemetrics_dbname='$queuemetrics_dbname',queuemetrics_login='$queuemetrics_login',queuemetrics_pass='$queuemetrics_pass',queuemetrics_url='$queuemetrics_url',queuemetrics_log_id='$queuemetrics_log_id',queuemetrics_eq_prepend='$queuemetrics_eq_prepend',vicidial_agent_disable='$vicidial_agent_disable',allow_sipsak_messages='$allow_sipsak_messages',admin_home_url='$admin_home_url';"; + $rslt=mysql_query($stmt, $link); + + ### LOG CHANGES TO LOG FILE ### + if ($WeBRooTWritablE > 0) + { + $fp = fopen ("./admin_changes_log.txt", "a"); + fwrite ($fp, "$date|MODIFY SYSTEM SETTINGS|$PHP_AUTH_USER|$ip|$stmt|\n"); + fclose($fp); + } + } + else + { + echo "Δεν έχετε την άδεια να δείτε αυτήν την σελίδα\n"; + exit; + } +$ADD=311111111111111; # go to vicidial system settings 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=53 confirmation before Emergency VDAC Jam Clear - deletes oldest LIVE vicidial_auto_call record +###################### + +if ($ADD==53) +{ + if (eregi('IN',$stage)) + {$group_id=$campaign_id;} + echo ""; + + if (strlen($campaign_id) < 2) + { + echo "
VDAC ΔΕΝ ΚΑΘΑΡΙΣΤΗΚΕ ΓΙΑ ΤΗΝ ΕΚΣΤΡΑΤΕΊΑ - Παρακαλώ επιστρέψτε πίσω και κάνετε έλεγχο των δεδομένων που καταχωρήσατε\n"; + echo "
Εκστρατεία_id be at least 2 characters in length\n"; + } + else + { + echo "
ΕΠΙΒΕΒΑΙΩΣΗ ΚΑΘΑΡΙΣΜΟΥ VDAC: $campaign_id\n"; + echo "

Επιλέξτε εδώ για να διαγράψετε την παλαιότερη ΖΩΝΤΑΝΗ εγγραφή στο VDAC για $campaign_id


\n"; + } + +# go to campaign modification below +if (eregi('IN',$stage)) + {$ADD='3111';} +else + {$ADD='31';} +} + +###################### +# 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 state 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 +} + + +###################### +# ADD=51111111111 confirmation before deletion of phone record +###################### + +if ($ADD==51111111111) +{ + echo ""; + + if ( (strlen($extension) < 2) or (strlen($server_ip) < 7) or ($LOGast_delete_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='31111111111'; # go to phone modification below +} + + +###################### +# ADD=511111111111 confirmation before deletion of server record +###################### + +if ($ADD==511111111111) +{ + echo ""; + + if ( (strlen($server_id) < 2) or (strlen($server_ip) < 7) or ($LOGast_delete_phones < 1) ) + { + echo "
ΔΙΑΚΟΜΙΣΤΗΣ NOT DELETED - Παρακαλώ επιστρέψτε πίσω και κάνετε έλεγχο των δεδομένων που καταχωρήσατε\n"; + echo "
ID Διακομιστή be at least 2 characters in length\n"; + echo "
IP Διακομιστή be at least 7 characters in length\n"; + } + else + { + echo "
ΔΙΑΚΟΜΙΣΤΗΣ DELETION CONFIRMATION: $server_id - $server_ip\n"; + echo "

Επιλέξτε εδώ για να διαγράψετε το τηλέφωνο $server_id - $server_ip


\n"; + } +$ADD='311111111111'; # go to server modification below +} + + +###################### +# ADD=5111111111111 confirmation before deletion of conference record +###################### + +if ($ADD==5111111111111) +{ + echo ""; + + if ( (strlen($conf_exten) < 2) or (strlen($server_ip) < 7) or ($LOGast_delete_phones < 1) ) + { + echo "
CONFERENCE NOT DELETED - Παρακαλώ επιστρέψτε πίσω και κάνετε έλεγχο των δεδομένων που καταχωρήσατε\n"; + echo "
Conference must be at least 2 characters in length\n"; + echo "
IP Διακομιστή be at least 7 characters in length\n"; + } + else + { + echo "
CONFERENCE DELETION CONFIRMATION: $conf_exten - $server_ip\n"; + echo "

Επιλέξτε εδώ για να διαγράψετε το τηλέφωνο $conf_exten - $server_ip


\n"; + } +$ADD='3111111111111'; # go to conference modification below +} + + +###################### +# ADD=51111111111111 confirmation before deletion of vicidial conference record +###################### + +if ($ADD==51111111111111) +{ + echo ""; + + if ( (strlen($conf_exten) < 2) or (strlen($server_ip) < 7) or ($LOGast_delete_phones < 1) ) + { + echo "
VICIDIAL CONFERENCE NOT DELETED - Παρακαλώ επιστρέψτε πίσω και κάνετε έλεγχο των δεδομένων που καταχωρήσατε\n"; + echo "
Conference must be at least 2 characters in length\n"; + echo "
IP Διακομιστή be at least 7 characters in length\n"; + } + else + { + echo "
VICIDIAL CONFERENCE DELETION CONFIRMATION: $conf_exten - $server_ip\n"; + echo "

Επιλέξτε εδώ για να διαγράψετε το τηλέφωνο $conf_exten - $server_ip


\n"; + } +$ADD='31111111111111'; # go to vicidial conference 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 from a campaign +###################### + +if ($ADD==62) +{ + if ($LOGmodify_campaigns==1) + { + 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"; + } + } + else + { + echo "Δεν έχετε την άδεια να δείτε αυτήν την σελίδα\n"; + exit; + } +$ADD='31'; # go to campaign modification below +} + + +###################### +# ADD=63 Emergency VDAC Jam Clear +###################### + +if ($ADD==63) +{ + if ($LOGmodify_campaigns==1) + { + if (eregi('IN',$stage)) + {$group_id=$campaign_id;} + echo ""; + + if (strlen($campaign_id) < 2) + { + echo "
VDAC ΔΕΝ ΚΑΘΑΡΙΣΤΗΚΕ ΓΙΑ ΤΗΝ ΕΚΣΤΡΑΤΕΊΑ - Παρακαλώ επιστρέψτε πίσω και κάνετε έλεγχο των δεδομένων που καταχωρήσατε\n"; + echo "
Εκστρατεία_id be at least 2 characters in length\n"; + } + else + { + $stmt="DELETE from vicidial_auto_calls where status='LIVE' and campaign_id='$campaign_id' order by call_time 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|EMERGENCY VDAC CLEAR|$PHP_AUTH_USER|$ip|campaign_id='$campaign_id'|\n"); + fclose($fp); + } + echo "
ΤΕΛΕΥΤΑΙΑ ΕΓΓΡΑΦΗ VDAC ΠΟΥ ΚΑΘΑΡΙΖΕΤΑΙ ΓΙΑ ΤΗΝ ΕΚΣΤΡΑΤΕΙΑ: $campaign_id\n"; + echo "

\n"; + } + } + else + { + echo "Δεν έχετε την άδεια να δείτε αυτήν την σελίδα\n"; + exit; + } +# go to campaign modification below +if (eregi('IN',$stage)) + {$ADD='3111';} +else + {$ADD='31';} +} + + +###################### +# ADD=65 delete campaign lead recycle in the system +###################### + +if ($ADD==65) +{ + if ($LOGmodify_campaigns==1) + { + 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); + } + } + } + else + { + echo "Δεν έχετε την άδεια να δείτε αυτήν την σελίδα\n"; + exit; + } +$ADD=31; # go to campaign modification form below +} + + +###################### +# ADD=66 delete auto alt dial status from the campaign +###################### + +if ($ADD==66) +{ + if ($LOGmodify_campaigns==1) + { + echo ""; + $stmt="SELECT count(*) from vicidial_campaigns where campaign_id='$campaign_id' and auto_alt_dial_statuses LIKE \"% $status %\";"; + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + if ($row[0] < 1) + {echo "
ΑΥΤΟΜΑΤΗ ΘΈΣΗ ΠΙΝΑΚΩΝ ALT ΠΟΥ ΔΕΝ ΔΙΑΓΡΑΦΕΤΑΙ - αυτή η αυτόματη θέση πινάκων ALT δεν είναι σε αυτήν τηνεκστρατεία\n";} + else + { + if ( (strlen($campaign_id) < 2) or (strlen($status) < 1) ) + { + echo "
ΑΥΤΟΜΑΤΗ ΘΈΣΗ ΠΙΝΑΚΩΝ ALT ΠΟΥ ΔΕΝ ΔΙΑΓΡΑΦΕΤΑΙ - Παρακαλώ επιστρέψτε πίσω και κάνετε έλεγχο των δεδομένων που καταχωρήσατε\n"; + echo "
η κατάσταση πρέπει να είναι μεταξύ 1 και 6 χαρακτήρων στο μήκος\n"; + } + else + { + echo "
ΑΥΤΟΜΑΤΗ ΘΈΣΗ ΠΙΝΑΚΩΝ ALT ΠΟΥ ΔΙΑΓΡΑΦΕΤΑΙ: $campaign_id - $status\n"; + + $stmt="SELECT auto_alt_dial_statuses from vicidial_campaigns where campaign_id='$campaign_id';"; + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + + $auto_alt_dial_statuses = eregi_replace(" $status "," ",$row[0]); + $stmt="UPDATE vicidial_campaigns set auto_alt_dial_statuses='$auto_alt_dial_statuses' 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|DELETE AUTALTDIALSTTUS|$PHP_AUTH_USER|$ip|$stmt|\n"); + fclose($fp); + } + } + } + } + else + { + echo "Δεν έχετε την άδεια να δείτε αυτήν την σελίδα\n"; + exit; + } +$ADD=31; # go to campaign modification form below +} + +###################### +# ADD=67 delete agent pause code in the system +###################### + +if ($ADD==67) +{ + if ($LOGmodify_campaigns==1) + { + echo ""; + + if ( (strlen($campaign_id) < 2) or (strlen($pause_code) < 1) ) + { + echo "
ΚΩΔΙΚΑΣ ΜΙΚΡΗΣ ΔΙΑΚΟΠΉΣ ΕΚΣΤΡΑΤΕΙΑΣ ΠΟΥ ΔΕΝ ΔΙΑΓΡΑΦΕΤΑΙ - Παρακαλώ επιστρέψτε πίσω και κάνετε έλεγχο των δεδομένων που καταχωρήσατε\n"; + echo "
pause code must be between 1 and 6 characters in length\n"; + } + else + { + echo "
CAMPAIGN PAUSE CODE DELETED: $campaign_id - $pause_code\n"; + + $stmt="DELETE FROM vicidial_pause_codes where campaign_id='$campaign_id' and pause_code='$pause_code';"; + $rslt=mysql_query($stmt, $link); + + ### LOG CHANGES TO LOG FILE ### + if ($WeBRooTWritablE > 0) + { + $fp = fopen ("./admin_changes_log.txt", "a"); + fwrite ($fp, "$date|DELETE ΧΕΙΡΙΣΤΗΣPAUSECODE|$PHP_AUTH_USER|$ip|$stmt|\n"); + fclose($fp); + } + } + } + else + { + echo "Δεν έχετε την άδεια να δείτε αυτήν την σελίδα\n"; + exit; + } +$ADD=31; # go to campaign modification form below +} + + +###################### +# ADD=68 remove campaign dial status +###################### + +if ($ADD==68) +{ + if ($LOGmodify_campaigns==1) + { + echo ""; + $stmt="SELECT count(*) from vicidial_campaigns where campaign_id='$campaign_id' and dial_statuses LIKE \"% $status %\";"; + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + if ($row[0] < 1) + {echo "
ΘΕΣΗ ΠΙΝΑΚΩΝ ΕΚΣΤΡΑΤΕΙΑΣ ΑΦΑΙΡΟΥΜΕΝΗ - αυτή η θέση πινάκων δεν επιλέγεται για αυτήν την εκστρατεία\n";} + else + { + if ( (strlen($campaign_id) < 2) or (strlen($status) < 1) ) + { + echo "
ΘΕΣΗ ΠΙΝΑΚΩΝ ΕΚΣΤΡΑΤΕΙΑΣ ΑΦΑΙΡΟΥΜΕΝΗ - Παρακαλώ επιστρέψτε πίσω και κάνετε έλεγχο των δεδομένων που καταχωρήσατε\n"; + echo "
η κατάσταση πρέπει να είναι μεταξύ 1 και 6 χαρακτήρων στο μήκος\n"; + } + else + { + echo "
ΘΕΣΗ ΠΙΝΑΚΩΝ ΕΚΣΤΡΑΤΕΙΑΣ ΑΦΑΙΡΟΥΜΕΝΗ: $campaign_id - $status\n"; + + $stmt="SELECT dial_statuses from vicidial_campaigns where campaign_id='$campaign_id';"; + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + + $dial_statuses = eregi_replace(" $status "," ",$row[0]); + $stmt="UPDATE vicidial_campaigns set dial_statuses='$dial_statuses' 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|DIAL STATUS REMOVED |$PHP_AUTH_USER|$ip|$stmt|\n"); + fclose($fp); + } + } + } + } + else + { + echo "Δεν έχετε την άδεια να δείτε αυτήν την σελίδα\n"; + exit; + } +$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 state 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 +} + + +###################### +# ADD=61111111111 delete phone record +###################### + +if ($ADD==61111111111) +{ + echo ""; + + if ( (strlen($extension) < 2) or (strlen($server_ip) < 7) or ($CoNfIrM != 'YES') or ($LOGast_delete_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='10000000000'; # go to phone list +} + + +###################### +# ADD=611111111111 delete server record +###################### + +if ($ADD==611111111111) +{ + echo ""; + + if ( (strlen($server_id) < 2) or (strlen($server_ip) < 7) or ($CoNfIrM != 'YES') or ($LOGast_delete_phones < 1) ) + { + echo "
ΔΙΑΚΟΜΙΣΤΗΣ NOT DELETED - Παρακαλώ επιστρέψτε πίσω και κάνετε έλεγχο των δεδομένων που καταχωρήσατε\n"; + echo "
ID Διακομιστή be at least 2 characters in length\n"; + echo "
IP Διακομιστή be at least 7 characters in length\n"; + } + else + { + $stmt="DELETE from servers where server_id='$server_id' 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 SERVER!!|$PHP_AUTH_USER|$ip|server_id='$server_id'|server_ip='$server_ip'|\n"); + fclose($fp); + } + echo "
ΔΙΑΚΟΜΙΣΤΗΣ DELETION COMPLETED: $server_id - $server_ip\n"; + echo "

\n"; + } +$ADD='100000000000'; # go to server list +} + + +###################### +# ADD=621111111111 delete vicidial server trunk record in the system +###################### + +if ($ADD==621111111111) +{ + if ($LOGmodify_servers==1) + { + echo ""; + + if ( (strlen($campaign_id) < 2) or (strlen($server_ip) < 7) ) + { + echo "
Η ΕΓΓΡΑΦΗ ΤΟΥ ΚΟΡΜΟΥ ΣΤΟΝ ΕΞΥΠΗΡΕΤΗΤΗ ΔΕΝ ΔΙΑΓΡΑΦΗΚΕ - Παρακαλώ επιστρέψτε πίσω και κάνετε έλεγχο των δεδομένων που καταχωρήσατε\n"; + echo "
η εκστρατεία πρέπει να είναι μεταξύ 3 και 8 χαρακτήρων στο μήκος\n"; + echo "
η server_ip καθυστέρηση πρέπει να είναι τουλάχιστον 7 χαρακτήρες\n"; + } + else + { + echo "
Η ΕΓΓΡΑΦΗ ΤΟΥ ΚΟΡΜΟΥ ΣΤΟΝ ΕΞΥΠΗΡΕΤΗΤΗ ΔΙΑΓΡΑΦΗΚΕ: $campaign_id - $server_ip\n"; + + $stmt="DELETE FROM vicidial_server_trunks where campaign_id='$campaign_id' and server_ip='$server_ip';"; + $rslt=mysql_query($stmt, $link); + + ### LOG CHANGES TO LOG FILE ### + if ($WeBRooTWritablE > 0) + { + $fp = fopen ("./admin_changes_log.txt", "a"); + fwrite ($fp, "$date|DELETE ΔΙΑΚΟΜΙΣΤΗΣ TRUNK |$PHP_AUTH_USER|$ip|$stmt|\n"); + fclose($fp); + } + } + } + else + { + echo "Δεν έχετε την άδεια να δείτε αυτήν την σελίδα\n"; + exit; + } +$ADD=311111111111; # go to server modification form below +} + + +###################### +# ADD=6111111111111 delete conference record +###################### + +if ($ADD==6111111111111) +{ + echo ""; + + if ( (strlen($conf_exten) < 2) or (strlen($server_ip) < 7) or ($CoNfIrM != 'YES') or ($LOGast_delete_phones < 1) ) + { + echo "
CONFERENCE NOT DELETED - Παρακαλώ επιστρέψτε πίσω και κάνετε έλεγχο των δεδομένων που καταχωρήσατε\n"; + echo "
Conference be at least 2 characters in length\n"; + echo "
IP Διακομιστή be at least 7 characters in length\n"; + } + else + { + $stmt="DELETE from conferences where conf_exten='$conf_exten' 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 CONF!!!!|$PHP_AUTH_USER|$ip|conf_exten='$conf_exten'|server_ip='$server_ip'|\n"); + fclose($fp); + } + echo "
CONFERENCE DELETION COMPLETED: $conf_exten - $server_ip\n"; + echo "

\n"; + } +$ADD='1000000000000'; # go to conference list +} + + +###################### +# ADD=61111111111111 delete vicidial conference record +###################### + +if ($ADD==61111111111111) +{ + echo ""; + + if ( (strlen($conf_exten) < 2) or (strlen($server_ip) < 7) or ($CoNfIrM != 'YES') or ($LOGast_delete_phones < 1) ) + { + echo "
VICIDIAL CONFERENCE NOT DELETED - Παρακαλώ επιστρέψτε πίσω και κάνετε έλεγχο των δεδομένων που καταχωρήσατε\n"; + echo "
Conference be at least 2 characters in length\n"; + echo "
IP Διακομιστή be at least 7 characters in length\n"; + } + else + { + $stmt="DELETE from vicidial_conferences where conf_exten='$conf_exten' 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 CONF!!!!|$PHP_AUTH_USER|$ip|conf_exten='$conf_exten'|server_ip='$server_ip'|\n"); + fclose($fp); + } + echo "
VICIDIAL CONFERENCE DELETION COMPLETED: $conf_exten - $server_ip\n"; + echo "

\n"; + } +$ADD='10000000000000'; # go to vicidial conference list +} + + + + + +###################################################################################################### +###################################################################################################### +####### 3 series, record modification forms +###################################################################################################### +###################################################################################################### + + + + +###################### +# ADD=3 modify user info in the system +###################### + +if ($ADD==3) +{ + if ($LOGmodify_users==1) + { + 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]; + $modify_users = $row[34]; + $modify_campaigns = $row[35]; + $modify_lists = $row[36]; + $modify_scripts = $row[37]; + $modify_filters = $row[38]; + $modify_ingroups = $row[39]; + $modify_usergroups = $row[40]; + $modify_remoteagents = $row[41]; + $modify_servers = $row[42]; + $view_reports = $row[43]; + $vicidial_recording_override = $row[44]; + $alter_custdata_override = $row[45]; + + 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"; + 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"; + 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
VICIDIAL συμπληρωματική προμήθεια καταγραφής: $NWB#vicidial_users-vicidial_recording_override$NWE
Ο πράκτορας αλλάζει τη συμπληρωματική προμήθεια στοιχείωνπελατών: $NWB#vicidial_users-alter_custdata_override$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
Τροποποιήστε τους χρήστες: $NWB#vicidial_users-modify_sections$NWE
Τροποποιήστε τις εκστρατείες: $NWB#vicidial_users-modify_sections$NWE
Τροποποιήστε τους καταλόγους: $NWB#vicidial_users-modify_sections$NWE
Τροποποιήστε τα χειρόγραφα: $NWB#vicidial_users-modify_sections$NWE
Τροποποιήστε τα φίλτρα: $NWB#vicidial_users-modify_sections$NWE
Τροποποιήστε τις-ΟΜΑΔΕΣ: $NWB#vicidial_users-modify_sections$NWE
Τροποποιήστε τις ομάδες χρηστών: $NWB#vicidial_users-modify_sections$NWE
Τροποποιήστε τους μακρινούς πράκτορες: $NWB#vicidial_users-modify_sections$NWE
Τροποποιήστε τους κεντρικούς υπολογιστές: $NWB#vicidial_users-modify_sections$NWE
Εκθέσεις άποψης: $NWB#vicidial_users-view_reports$NWE
\n"; + + if ($LOGdelete_users > 0) + { + echo "

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

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

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

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

Επιλέξτε εδώ για τις Επανακλήσεις του χρήστη που κρατήθηκαν\n"; + } + } + else + { + echo "Δεν έχετε την άδεια να δείτε αυτήν την σελίδα\n"; + exit; + } +} + + +###################### +# 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) and ( (!eregi("$campaign_id",$LOGallowed_campaigns)) and (!eregi("ALL-CAMPAIGNS",$LOGallowed_campaigns)) ) ) + {$ADD=30;} # send to not allowed screen if not in vicidial_user_groups allowed_campaigns list + +if ($ADD==31) +{ + if ($LOGmodify_users==1) + { + 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); + $campaign_name = $row[1]; + $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]; + $allcalls_delay = $row[44]; + $omit_phone_code = $row[45]; + $dial_method = $row[46]; + $available_only_ratio_tally = $row[47]; + $adaptive_dropped_percentage = $row[48]; + $adaptive_maximum_level = $row[49]; + $adaptive_latest_server_time = $row[50]; + $adaptive_intensity = $row[51]; + $adaptive_dl_diff_target = $row[52]; + $concurrent_transfers = $row[53]; + $auto_alt_dial = $row[54]; + $auto_alt_dial_statuses = $row[55]; + $agent_pause_codes_active = $row[56]; + $campaign_description = $row[57]; + $campaign_changedate = $row[58]; + $campaign_stats_refresh = $row[59]; + $campaign_logindate = $row[60]; + $dial_statuses = $row[61]; + $disable_alter_custdata = $row[62]; + $no_hopper_leads_logins = $row[63]; + + 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"; + + $stmt="SELECT * from vicidial_statuses order by status"; + $rslt=mysql_query($stmt, $link); + $statuses_to_print = mysql_num_rows($rslt); + $statuses_list=''; + + $o=0; + while ($statuses_to_print > $o) + { + $rowx=mysql_fetch_row($rslt); + $statuses_list .= "\n"; + $statname_list["$rowx[0]"] = "$rowx[1]"; + $LRstatuses_list .= "\n"; + if (eregi("Y",$rowx[2])) + {$HKstatuses_list .= "\n";} + $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 .= "\n"; + $statname_list["$rowx[0]"] = "$rowx[1]"; + $LRstatuses_list .= "\n"; + if (eregi("Y",$rowx[2])) + {$HKstatuses_list .= "\n";} + $o++; + } + + $dial_statuses = preg_replace("/ -$/","",$dial_statuses); + $Dstatuses = explode(" ", $dial_statuses); + $Ds_to_print = (count($Dstatuses) -1); + + $o=0; + while ($Ds_to_print > $o) + { + $o++; + $Dstatus = $Dstatuses[$o]; + + echo "\n"; + } + + echo "\n"; + + echo "\n"; + + echo "\n"; + + echo "\n"; + + echo "\n"; + + echo "\n"; + + echo "\n"; + + echo "\n"; + + echo "\n"; + + echo "\n"; + + echo "\n"; + + echo "\n"; + + + + echo "\n"; + + echo "\n"; + + + echo "\n"; + + echo "\n"; + + echo "\n"; + + echo "\n"; + + echo "\n"; + + echo "\n"; + + echo "\n"; + + echo "\n"; + + echo "\n"; + + echo "\n"; + + echo "\n"; + + echo "\n"; + + echo "\n"; + + echo "\n"; + + echo "\n"; + + echo "\n"; + + echo "\n"; + + echo "\n"; + + echo "\n"; + + echo "\n"; + + echo "\n"; + + 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|BLEND|INBND|_C$|_B$|_I$)", $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-campaign_description$NWE
Εκστρατεία Change Date: $campaign_changedate   $NWB#vicidial_campaigns-campaign_changedate$NWE
Εκστρατεία Login Date: $campaign_logindate   $NWB#vicidial_campaigns-campaign_logindate$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
Θέση πινάκων$o: \n"; + echo "$Dstatus - $statname_list[$Dstatus]         \n"; + echo "ΑΦΑΙΡΕΣΤΕ
Add A Dial Κατάσταση:   \n"; + echo "     $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
Μέθοδος Κλήσης +: $NWB#vicidial_campaigns-dial_method$NWE
ΕΠΙΠΕΔΟ ΑΥΤΟΜΑΤΗΣ ΚΛΗΣΗΣ: (0 = off)$NWB#vicidial_campaigns-auto_dial_level$NWE       ΠΡΟΣΑΡΜΟΣΤΕ ΤΗ ΣΥΜΠΛΗΡΩΜΑΤΙΚΗ ΠΡΟΜΉΘΕΙΑ
Διαθέσιμα μόνο ετικέτες +: $NWB#vicidial_campaigns-available_only_ratio_tally$NWE
Ποσοστό Ορίου Εγκατ.Κλήσεων +: % $NWB#vicidial_campaigns-adaptive_dropped_percentage$NWE
Μέγιστο Επίπεδο Προσαρμογής Κλήσεων +: number only $NWB#vicidial_campaigns-adaptive_maximum_level$NWE
Τελευταίος Χρόνος Διακομιστή +: 4 μόνο αριθμοί $NWB#vicidial_campaigns-adaptive_latest_server_time$NWE
Ενταση Τροποποίησης Προσαρμογής +: $NWB#vicidial_campaigns-adaptive_intensity$NWE
Επίπεδο Κλήσεων Μεταβολής Στόχου +: $NWB#vicidial_campaigns-adaptive_dl_diff_target$NWE
Ταυτόχρονες μεταφορές: $NWB#vicidial_campaigns-concurrent_transfers$NWE
Αυτόματος σχηματισμός ALT-ARJCMOY: $NWB#vicidial_campaigns-auto_alt_dial$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
Παράλειψη Κωδικού Τηλεφώνου +: $NWB#vicidial_campaigns-omit_phone_code$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
Καθυστέρηση Ηχογράφησης +: in seconds$NWB#vicidial_campaigns-allcalls_delay$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
Agent Pause Codes Ενεργή:$NWB#vicidial_campaigns-agent_pause_codes_active$NWE
Εκστρατεία Stats Refresh: $NWB#vicidial_campaigns-campaign_stats_refresh$NWE
Θέστε εκτός λειτουργίας αλλάζει τα στοιχεία πελατών: $NWB#vicidial_campaigns-disable_alter_custdata$NWE
Επιτρέψτε τους κανένας-χοάνη-μολύβδους Logins: $NWB#vicidial_campaigns-no_hopper_leads_logins$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_statuses,$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 "Click here to see a VDAD report for this campaign

\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 "Hotkey:   \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 "

ΑΥΤΟΜΑΤΟΣ ΣΧΗΜΑΤΙΣΜΌΣ ΑΡΙΘΜΟΎ ALT ΓΙΑ ΑΥΤΉΝ ΤΗΝ ΕΚΣΤΡΑΤΕΊΑ:   $NWB#vicidial_auto_alt_dial_statuses$NWE
\n"; + echo "\n"; + echo "\n"; + + $auto_alt_dial_statuses = preg_replace("/ -$/","",$auto_alt_dial_statuses); + $AADstatuses = explode(" ", $auto_alt_dial_statuses); + $AADs_to_print = (count($AADstatuses) -1); + + $o=0; + while ($AADs_to_print > $o) + { + if (eregi("1$|3$|5$|7$|9$", $o)) + {$bgcolor='bgcolor="#B9CBFD"';} + else + {$bgcolor='bgcolor="#9BB9FB"';} + $o++; + + echo "\n"; + echo "\n"; + } + + echo "
STATUSESΔΙΑΓΡΑΦΗ
$AADstatuses[$o]ΔΙΑΓΡΑΦΗ
\n"; + + echo "
ΠΡΟΣΘΕΣΤΕ ΤΗ ΝΕΑ ΑΥΤΟΜΑΤΗ ΘΈΣΗ ΣΧΗΜΑΤΙΣΜΟΎ ΑΡΙΘΜΟΎ ALT
\n"; + echo "\n"; + echo "\n"; + echo "Κατάσταση:   \n"; + echo "
\n"; + + echo "

\n"; + + + + echo "

ΚΩΔΙΚΕΣ ΜΙΚΡΗΣ ΔΙΑΚΟΠΉΣ ΠΡΑΚΤΟΡΩΝ ΓΙΑ ΑΥΤΗΝ ΤΗΝ ΕΚΣΤΡΑΤΕΙΑ:   $NWB#vicidial_pause_codes$NWE
\n"; + echo "\n"; + echo "\n"; + + $stmt="SELECT * from vicidial_pause_codes where campaign_id='$campaign_id' order by pause_code"; + $rslt=mysql_query($stmt, $link); + $pause_codes_to_print = mysql_num_rows($rslt); + $o=0; + while ($pause_codes_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 "
ΚΩΔΙΚΕΣ ΜΙΚΡΗΣ ΔΙΑΚΟΠΉΣΧΡΕΩΤΕΟΣΤΡΟΠΟΠΟΙΗΣΗΔΙΑΓΡΑΦΗ
$rowx[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 "EMERGENCY VDAC CLEAR FOR THIS CAMPAIGN

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

ΔΙΑΓΡΑΨΕ ΑΥΤΗΝ ΤΗΝ ΕΚΣΤΡΑΤΕΙΑ\n"; + } + } + else + { + echo "Δεν έχετε την άδεια να δείτε αυτήν την σελίδα\n"; + exit; + } +} + + +###################### +# ADD=34 modify campaign info in the system - Basic View +###################### + +if ( ($ADD==34) and ( (!eregi("$campaign_id",$LOGallowed_campaigns)) and (!eregi("ALL-CAMPAIGNS",$LOGallowed_campaigns)) ) ) + {$ADD=30;} # send to not allowed screen if not in vicidial_user_groups allowed_campaigns list + +if ($ADD==34) +{ + if ($LOGmodify_campaigns==1) + { + 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]; + $dial_method = $row[46]; + $adaptive_intensity = $row[51]; + $campaign_description = $row[57]; + $campaign_changedate = $row[58]; + $campaign_stats_refresh = $row[59]; + $campaign_logindate = $row[60]; + $dial_statuses = $row[61]; + + 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"; + + $stmt="SELECT * from vicidial_statuses order by status"; + $rslt=mysql_query($stmt, $link); + $statuses_to_print = mysql_num_rows($rslt); + $statuses_list=''; + + $o=0; + while ($statuses_to_print > $o) + { + $rowx=mysql_fetch_row($rslt); + $statuses_list .= "\n"; + $statname_list["$rowx[0]"] = "$rowx[1]"; + $LRstatuses_list .= "\n"; + if (eregi("Y",$rowx[2])) + {$HKstatuses_list .= "\n";} + $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 .= "\n"; + $statname_list["$rowx[0]"] = "$rowx[1]"; + $LRstatuses_list .= "\n"; + if (eregi("Y",$rowx[2])) + {$HKstatuses_list .= "\n";} + $o++; + } + + $dial_statuses = preg_replace("/ -$/","",$dial_statuses); + $Dstatuses = explode(" ", $dial_statuses); + $Ds_to_print = (count($Dstatuses) -1); + + $o=0; + while ($Ds_to_print > $o) + { + $o++; + $Dstatus = $Dstatuses[$o]; + + echo "\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-campaign_description$NWE
Εκστρατεία Change Date: $campaign_changedate   $NWB#vicidial_campaigns-campaign_changedate$NWE
Εκστρατεία Login Date: $campaign_logindate   $NWB#vicidial_campaigns-campaign_logindate$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
Θέση πινάκων$o: \n"; + echo "$Dstatus - $statname_list[$Dstatus]         \n"; + echo "ΑΦΑΙΡΕΣΤΕ
Add A Dial Κατάσταση:   \n"; + echo "     $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
Μέθοδος Κλήσης +: $NWB#vicidial_campaigns-dial_method$NWE
ΕΠΙΠΕΔΟ ΑΥΤΟΜΑΤΗΣ ΚΛΗΣΗΣ: (0 = off)$NWB#vicidial_campaigns-auto_dial_level$NWE
Ενταση Τροποποίησης Προσαρμογής +: $NWB#vicidial_campaigns-adaptive_intensity$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_statuses,$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 "Click here to see a VDAD report for this campaign

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

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

ΔΙΑΓΡΑΨΕ ΑΥΤΗΝ ΤΗΝ ΕΚΣΤΡΑΤΕΙΑ\n"; + } + } + else + { + echo "Δεν έχετε την άδεια να δείτε αυτήν την σελίδα\n"; + exit; + } +} + + +###################### +# ADD=31 campaign not allowed +###################### + +if ($ADD==30) +{ +echo "
\n"; + echo ""; +echo "You do not have permission to view campaign $campaign_id\n"; +} + + + +###################### +# ADD=311 modify list info in the system +###################### + +if ($ADD==311) +{ + if ($LOGmodify_lists==1) + { + 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]; + $list_description = $row[4]; + $list_changedate = $row[5]; + $list_lastcalldate = $row[6]; + + # 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 "\n"; + echo "\n"; + echo "\n"; + echo "
ID Λίστας: $row[0]$NWB#vicidial_lists-list_id$NWE
Ονομα Λίστας: $NWB#vicidial_lists-list_name$NWE
Περιγραφή καταλόγων: $NWB#vicidial_lists-list_description$NWE
Εκστρατεία: $NWB#vicidial_lists-campaign_id$NWE
Ενεργή:$NWB#vicidial_lists-active$NWE
ΕΠΑΝΑΦΟΡΑ ΚΑΤΑΣΤΑΣΗΣ ΚΛΗΣΗΣ ΟΔΗΓΟΥ ΓΙΑ ΤΗΝ ΛΙΣΤΑ: $NWB#vicidial_lists-reset_list$NWE
Ημερομηνία αλλαγής καταλόγων: $list_changedate   $NWB#vicidial_lists-list_changedate$NWE
List Last Call Date: $list_lastcalldate   $NWB#vicidial_lists-list_lastcalldate$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"; + + echo "

Click here to see all CallBack Holds in this list

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

ΔΙΑΓΡΑΨΕ ΑΥΤΗ ΤΗΝ ΛΙΣΤΑ\n"; + } + } + else + { + echo "Δεν έχετε την άδεια να δείτε αυτήν την σελίδα\n"; + exit; + } +} + + + +###################### +# ADD=3111 modify in-group info in the system +###################### + +if ($ADD==3111) +{ + if ($LOGmodify_ingroups==1) + { + 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 "Click here to see a report for this campaign

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

EMERGENCY VDAC CLEAR FOR THIS IN-GROUP

\n"; + echo "

ΔΙΑΓΡΑΨΕ ΑΥΤΗΝ ΤΗΝ ΕΙΣ-ΟΜΑΔΑ\n"; + } + } + else + { + echo "Δεν έχετε την άδεια να δείτε αυτήν την σελίδα\n"; + exit; + } +} + + + +###################### +# ADD=31111 modify remote agents info in the system +###################### + +if ($ADD==31111) +{ + if ($LOGmodify_remoteagents==1) + { + 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"; + } + } + else + { + echo "Δεν έχετε την άδεια να δείτε αυτήν την σελίδα\n"; + exit; + } +} + + +###################### +# ADD=311111 modify user group info in the system +###################### + +if ($ADD==311111) +{ + if ($LOGmodify_usergroups==1) + { + 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 "\n"; + echo "
Ομάδα: (όχι κενά ή στίξη)$NWB#vicidial_user_groups-user_group$NWE
Περιγραφή: (περιγραφή ομάδας)$NWB#vicidial_user_groups-group_name$NWE
Επιτρεπόμενες Εκστρατείες: \n"; + echo "$campaigns_list"; + echo "$NWB#vicidial_user_groups-allowed_campaigns$NWE
\n"; + + + ### list of users in this user group + + $active_confs = 0; + $stmt="SELECT user,full_name,user_level from vicidial_users where user_group='$user_group'"; + $rsltx=mysql_query($stmt, $link); + $users_to_print = mysql_num_rows($rsltx); + + echo "
\n"; + echo "
ΧΡΗΣΤΕΣ ΜΕΣΑ ΣΕ ΑΥΤΗΝ ΤΗΝ ΟΜΑΔΑ ΧΡΗΣΤΩΝ : $users_to_print
\n"; + echo "\n"; + echo "\n"; + + $o=0; + while ($users_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 "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + } + + echo "
USERFULL NAMELEVEL
$rowx[0]$rowx[1]$rowx[2]

\n"; + + + + echo "

Click here to see all CallBack Holds in this user group

\n"; + + if ($LOGdelete_user_groups > 0) + { + echo "

ΔΙΑΓΡΑΨΕ ΑΥΤΗΝ ΤΗΝ ΟΜΑΔΑ ΧΡΗΣΤΩΝ\n"; + } + } + else + { + echo "Δεν έχετε την άδεια να δείτε αυτήν την σελίδα\n"; + exit; + } +} + + +###################### +# ADD=3111111 modify script info in the system +###################### + +if ($ADD==3111111) +{ + if ($LOGmodify_scripts==1) + { + 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
Κείμενο χειρόγραφου:

Προεπισκόπιση Βοηθού
"; + # BEGIN Insert Field + echo ""; + echo "
"; + # END Insert Field + echo " $NWB#vicidial_scripts-script_text$NWE
\n"; + + if ($LOGdelete_scripts > 0) + { + echo "

ΔΙΑΓΡΑΨΕ ΑΥΤΟΝ ΤΟΝ ΒΟΗΘΟ\n"; + } + } + else + { + echo "Δεν έχετε την άδεια να δείτε αυτήν την σελίδα\n"; + exit; + } +} + + +###################### +# ADD=31111111 modify filter info in the system +###################### + +if ($ADD==31111111) +{ + if ($LOGmodify_filters==1) + { + 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"; + } + } + else + { + echo "Δεν έχετε την άδεια να δείτε αυτήν την σελίδα\n"; + exit; + } +} + + +###################### +# 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=31111111111 modify phone record in the system +###################### + +if ($ADD==31111111111) +{ + if ($LOGast_admin_access==1) + { + echo "
\n"; + 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 "\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
Επιτρέψτε τα μηνύματα SIPSAK: $NWB#phones-enable_sipsak_messages$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 ($LOGast_delete_phones > 0) + { + echo "

ΔΙΑΓΡΑΨΕ ΑΥΤΟ ΤΟ ΤΗΛΕΦΩΝΟ\n"; + } + } + else + { + echo "Δεν έχετε την άδεια να δείτε αυτήν την σελίδα\n"; + exit; + } +} + + +###################### +# ADD=311111111111 modify server record in the system +###################### + +if ($ADD==311111111111) +{ + if ($LOGmodify_servers==1) + { + echo "
\n"; + echo ""; + + $stmt="SELECT * from servers where server_id='$server_id' or server_ip='$server_ip';"; + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + $server_id = $row[0]; + $server_ip = $row[2]; + + 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 "\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
Διακύμανση Τηλεφωνικής Κλήσης: $NWB#servers-vicidial_balance_active$NWE
Διακύμανση εκτός ορίων: $NWB#servers-balance_trunks_offlimits$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
Επίδοση Συστήματος +: $NWB#servers-sys_perf_log$NWE
Γεγονότα Διακομιστή +: $NWB#servers-vd_server_logs$NWE
Εξοδος AGI +: $NWB#servers-agi_output$NWE
\n"; + + + ### vicidial server trunk records for this server + echo "

ΚΟΡΜΟΙ ΓΙΑ ΤΟΝ ΕΞΥΠΗΡΕΤΗΤΗ:   $NWB#vicidial_server_trunks$NWE
\n"; + echo "\n"; + echo "\n"; + + $stmt="SELECT * from vicidial_server_trunks where server_ip='$server_ip' order by campaign_id"; + $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 "
ΕΚΣΤΡΑΤΕΙΑ ΚΟΡΜΟΙ ΠΕΡΙΟΡΙΣΜΟΣ DELETE
$rowx[1]
\n"; + echo "\n"; + echo "\n"; + echo "
ΔΙΑΓΡΑΦΗ
\n"; + + echo "
ΠΡΟΣΘΗΚΗ ΕΓΓΡΑΦΗΣ ΕΞΥΠΗΡΕΤΗΤΗ ΚΟΣΡΜΟΥ
\n"; + echo "\n"; + echo "\n"; + echo "TRUNKS:
\n"; + echo "ΕΚΣΤΡΑΤΕΙΑ:
\n"; + echo "RESTRICTION:
\n"; + echo "
\n"; + + echo "

\n"; + + + ### list of phones on this server + echo "
\n"; + echo "
ΤΗΛΕΦΩΝΑ ΣΤΟΝ ΔΙΑΚΟΜΙΣΤΗ:
\n"; + echo "\n"; + echo "\n"; + + $active_phones = 0; + $inactive_phones = 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_phones++; $camp_lists .= "'$rowx[0]',";} + if (ereg("N", $rowx[1])) {$inactive_phones++;} + + 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"; + + + ### list of conferences on this server + echo "
\n"; + echo "
CONFERENCES WITHIN THIS SERVER:
\n"; + echo "\n"; + echo "\n"; + + $active_confs = 0; + $stmt="SELECT conf_exten,extension from conferences 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++; + $active_confs++; + + if (eregi("1$|3$|5$|7$|9$", $o)) + {$bgcolor='bgcolor="#B9CBFD"';} + else + {$bgcolor='bgcolor="#9BB9FB"';} + + echo "\n"; + } + + echo "
CONFERENCEΤΗΛ.ΣΥΝΔΕΣΗ
$rowx[0]$rowx[2]

\n"; + + + ### list of vicidial conferences on this server + echo "
\n"; + echo "
VICIDIAL CONFERENCES WITHIN THIS SERVER:
\n"; + echo "\n"; + echo "\n"; + + $active_vdconfs = 0; + $stmt="SELECT conf_exten,extension from vicidial_conferences 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++; + $active_vdconfs++; + + if (eregi("1$|3$|5$|7$|9$", $o)) + {$bgcolor='bgcolor="#B9CBFD"';} + else + {$bgcolor='bgcolor="#9BB9FB"';} + + echo "\n"; + } + + echo "
VD CONFERENCEΤΗΛ.ΣΥΝΔΕΣΗ
$rowx[0]$rowx[2]

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

\n"; + echo "Αυτός ο διακομιστής έχει $active_confs active conferences

\n"; + echo "Αυτός ο διακομιστής έχει $active_vdconfs active vicidial conferences

\n"; + echo "
\n"; + if ($LOGast_delete_phones > 0) + { + echo "

DELETE THIS SERVER\n"; + } + } + else + { + echo "Δεν έχετε την άδεια να δείτε αυτήν την σελίδα\n"; + exit; + } +} + + +###################### +# ADD=3111111111111 modify conference record in the system +###################### + +if ($ADD==3111111111111) +{ + if ($LOGast_admin_access==1) + { + echo "
\n"; + 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); + $conf_exten = $row[0]; + $server_ip = $row[1]; + + 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"; + if ($LOGast_delete_phones > 0) + { + echo "

DELETE THIS CONFERENCE\n"; + } + } + else + { + echo "Δεν έχετε την άδεια να δείτε αυτήν την σελίδα\n"; + exit; + } +} + + +###################### +# ADD=31111111111111 modify vicidial conference record in the system +###################### + +if ($ADD==31111111111111) +{ + if ($LOGast_admin_access==1) + { + echo "
\n"; + echo ""; + + $stmt="SELECT * from vicidial_conferences where conf_exten='$conf_exten' and server_ip='$server_ip';"; + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + $conf_exten = $row[0]; + $server_ip = $row[1]; + + echo "
MODIFY A VICIDIAL CONFERENCE RECORD: $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"; + if ($LOGast_delete_phones > 0) + { + echo "

DELETE THIS VICIDIAL CONFERENCE\n"; + } + } + else + { + echo "Δεν έχετε την άδεια να δείτε αυτήν την σελίδα\n"; + exit; + } +} + + + +###################### +# ADD=311111111111111 modify vicidial system settings +###################### + +if ($ADD==311111111111111) +{ + if ($LOGmodify_servers==1) + { + echo "
\n"; + echo ""; + + $stmt="SELECT version,install_date,use_non_latin,webroot_writable,enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_url,queuemetrics_log_id,queuemetrics_eq_prepend,vicidial_agent_disable,allow_sipsak_messages,admin_home_url from system_settings;"; + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + $version = $row[0]; + $install_date = $row[1]; + $use_non_latin = $row[2]; + $webroot_writable = $row[3]; + $enable_queuemetrics_logging = $row[4]; + $queuemetrics_server_ip = $row[5]; + $queuemetrics_dbname = $row[6]; + $queuemetrics_login = $row[7]; + $queuemetrics_pass = $row[8]; + $queuemetrics_url = $row[9]; + $queuemetrics_log_id = $row[10]; + $queuemetrics_eq_prepend = $row[11]; + $vicidial_agent_disable = $row[12]; + $allow_sipsak_messages = $row[13]; + $admin_home_url = $row[14]; + + echo "
ΤΡΟΠΟΠΟΙΗΣΤΕ ΤΙΣ ΤΟΠΟΘΕΤΉΣΕΙΣ ΣΥΣΤΗΜΑΤΩΝ VICIDIAL\n"; + echo "\n"; + echo "
\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + + echo "\n"; + echo "
Έκδοση: $version
Install Date: $install_date
Μη-λατινικά χρήσης: $NWB#settings-use_non_latin$NWE
Webroot writable: $NWB#settings-webroot_writable$NWE
Επιτρέψτε την αναγραφή QueueMetrics: $NWB#settings-enable_queuemetrics_logging$NWE
QueueMetrics κεντρικός υπολογιστής IP: $NWB#settings-queuemetrics_server_ip$NWE
QueueMetrics όνομα DB: $NWB#settings-queuemetrics_dbname$NWE
QueueMetrics σύνδεση DB: $NWB#settings-queuemetrics_login$NWE
QueueMetrics κωδικός πρόσβασης DB: $NWB#settings-queuemetrics_pass$NWE
QueueMetrics URL: $NWB#settings-queuemetrics_url$NWE
QueueMetrics καταγράψτε την ταυτότητα: $NWB#settings-queuemetrics_log_id$NWE
QueueMetrics EnterQueue Prepend:$NWB#settings-queuemetrics_eq_prepend$NWE
VICIDIAL ο πράκτορας θέτει εκτός λειτουργίας την επίδειξη: $NWB#settings-vicidial_agent_disable$NWE
Επιτρέψτε τα μηνύματα SIPSAK: $NWB#settings-allow_sipsak_messages$NWE
Σπίτι URL Admin:$NWB#settings-admin_home_url$NWE
\n"; + + echo "
\n"; + } + else + { + echo "Δεν έχετε την άδεια να δείτε αυτήν την σελίδα\n"; + exit; + } +} + + + + + + + +###################### +# ADD=550 search form +###################### + +if ($ADD==550) +{ +echo "
\n"; +echo ""; + +echo "
ΑΝΑΖΗΤΗΣΗ ΧΡΗΣΤΗ\n"; +echo "\n"; +echo "
\n"; +echo "\n"; +echo "\n"; +echo "\n"; +echo "\n"; + +echo "\n"; +echo "
Αριθμός Χρήστη:
Πλήρες Ονομα:
Επίπεδο Χρήστη:
Ομάδα Χρήστη:
\n"; + +} + +###################### +# ADD=660 user search results +###################### + +if ($ADD==660) +{ +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=8111 find all callbacks on hold within a user group +###################### +if ($ADD==8111) +{ + echo ""; + + $stmt="SELECT * from vicidial_callbacks where status IN('ACTIVE','LIVE') and user_group='$user_group' order by recipient,status desc,callback_time"; + $rslt=mysql_query($stmt, $link); + $cb_to_print = mysql_num_rows($rslt); + +echo "
USER GROUP 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 ""; + echo "\n"; + $o++; + } + +echo "
LEADLISTΕΚΣΤΡΑΤΕΙΑENTRY ΗΜΕΡΑCALLBACK ΗΜΕΡΑUSERRECIPIENTΚΑΤΑΣΤΑΣΗGROUP
$row[1]$row[2]$row[3]$row[5]$row[6]$row[8]$row[9]$row[4]$row[11]
\n"; +} + + + +###################################################################################################### +###################################################################################################### +####### 0 series, displays and searches +###################################################################################################### +###################################################################################################### + +###################### +# ADD=0 display all active users +###################### +if ($ADD==0) +{ +echo "
\n"; +echo ""; + +$USERlink='stage=USERIDDOWN'; +$NAMElink='stage=NAMEDOWN'; +$LEVELlink='stage=LEVELDOWN'; +$GROUPlink='stage=GROUPDOWN'; +$SQLorder='order by full_name'; +if (eregi("USERIDUP",$stage)) {$SQLorder='order by user asc'; $USERlink='stage=USERIDDOWN';} +if (eregi("USERIDDOWN",$stage)) {$SQLorder='order by user desc'; $USERlink='stage=USERIDUP';} +if (eregi("NAMEUP",$stage)) {$SQLorder='order by full_name asc'; $NAMElink='stage=NAMEDOWN';} +if (eregi("NAMEDOWN",$stage)) {$SQLorder='order by full_name desc'; $NAMElink='stage=NAMEUP';} +if (eregi("LEVELUP",$stage)) {$SQLorder='order by user_level asc'; $LEVELlink='stage=LEVELDOWN';} +if (eregi("LEVELDOWN",$stage)) {$SQLorder='order by user_level desc'; $LEVELlink='stage=LEVELUP';} +if (eregi("GROUPUP",$stage)) {$SQLorder='order by user_group asc'; $GROUPlink='stage=GROUPDOWN';} +if (eregi("GROUPDOWN",$stage)) {$SQLorder='order by user_group desc'; $GROUPlink='stage=GROUPUP';} + $stmt="SELECT * from vicidial_users $SQLorder"; + $rslt=mysql_query($stmt, $link); + $people_to_print = mysql_num_rows($rslt); + +echo "
ΛΙΣΤΕΣ ΧΡΗΣΤΗ:\n"; +echo "
\n"; +echo ""; +echo ""; +echo ""; +echo ""; +echo ""; +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 "
USER IDFULL NAMELEVELGROUPLINKS
$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 ""; + + $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"; +} + +###################### +# ADD=10000000000 display all phones +###################### +if ($ADD==10000000000) +{ +echo ""; echo ""; echo ""; echo ""; -echo ""; +echo ""; echo ""; echo ""; @@ -240,7 +245,7 @@ echo "\n";echo "\n";?> -
-
\n"; +echo ""; + +$EXTENlink='stage=EXTENDOWN'; +$PROTOlink='stage=PROTODOWN'; +$SERVERlink='stage=SERVERDOWN'; +$STATUSlink='stage=STATUSDOWN'; +$SQLorder='order by extension,server_ip'; +if (eregi("EXTENUP",$stage)) {$SQLorder='order by extension asc'; $EXTENlink='stage=EXTENDOWN';} +if (eregi("EXTENDOWN",$stage)) {$SQLorder='order by extension desc'; $EXTENlink='stage=EXTENUP';} +if (eregi("PROTOUP",$stage)) {$SQLorder='order by protocol asc'; $PROTOlink='stage=PROTODOWN';} +if (eregi("PROTODOWN",$stage)) {$SQLorder='order by protocol desc'; $PROTOlink='stage=PROTOUP';} +if (eregi("SERVERUP",$stage)) {$SQLorder='order by server_ip asc'; $SERVERlink='stage=SERVERDOWN';} +if (eregi("SERVERDOWN",$stage)) {$SQLorder='order by server_ip desc'; $SERVERlink='stage=SERVERUP';} +if (eregi("STATUSUP",$stage)) {$SQLorder='order by status asc'; $STATUSlink='stage=STATUSDOWN';} +if (eregi("STATUSDOWN",$stage)) {$SQLorder='order by status desc'; $STATUSlink='stage=STATUSUP';} + $stmt="SELECT * from phones $SQLorder"; + $rslt=mysql_query($stmt, $link); + $phones_to_print = mysql_num_rows($rslt); + +echo "
ΕΝΤΑΓΜΕΝΑ ΤΗΛΕΦΩΝΑ:\n"; +echo "
\n"; +echo ""; +echo ""; +echo ""; +echo ""; +echo ""; +echo ""; +echo ""; +echo ""; +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 "
EXTENPROTOSERVERDIAL PLANΚΑΤΑΣΤΑΣΗΟΝΟΜΑVMAILLINKS
$row[0]$row[16]$row[5]$row[1]$row[2]$row[8]$row[11]$row[14]$row[15]ΤΡΟΠΟΠΟΙΗΣΗ | ΣΤΑΤΙΣΤΙΚΑ
\n"; +} + +###################### +# ADD=100000000000 display all servers +###################### +if ($ADD==100000000000) +{ +echo "\n"; echo ""; echo ""; echo ""; echo ""; -echo ""; +echo ""; echo ""; echo ""; @@ -401,9 +436,13 @@ echo "\n\n"; ################################################################################### ###### OUTBOUND CALLS ################################################################################### -if (eregi("CLOSER",$group)) +if (eregi("(CLOSER|BLEND|INBND|_C$|_B$|_I$)",$group)) { $stmt="select closer_campaigns from vicidial_campaigns where campaign_id='" . mysql_real_escape_string($group) . "';"; +if ($non_latin > 0) +{ +$rslt=mysql_query("SET NAMES 'UTF8'"); +} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $closer_campaigns = preg_replace("/^ | -$/","",$row[0]); @@ -419,6 +458,10 @@ else $stmt="select status from vicidial_auto_calls where status NOT IN('XFER') $groupSQL;"; } +if ($non_latin > 0) +{ +$rslt=mysql_query("SET NAMES 'UTF8'"); +} $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $parked_to_print = mysql_num_rows($rslt); @@ -450,7 +493,7 @@ $parked_to_print = mysql_num_rows($rslt); if ($out_live > 9) {$F=''; $FG='';} if ($out_live > 14) {$F=''; $FG='';} - if (eregi("CLOSER",$group)) + if (eregi("(CLOSER|BLEND|INBND|_C$|_B$|_I$)",$group)) {echo "$NFB$out_total$NFE current active calls      \n";} else {echo "$NFB$out_total$NFE calls being placed       \n";} @@ -489,8 +532,8 @@ $HDsessionid = "------------------+"; $HTsessionid = " SESSIONID |"; $HDbarge = "-------+"; $HTbarge = " BARGE |"; -$HDstatus = "--------+"; -$HTstatus = " STATUS |"; +$HDstatus = "----------+"; +$HTstatus = " STATUS |"; $HDserver_ip = "-----------------+"; $HTserver_ip = " SERVER IP |"; $HDcall_server_ip = "-----------------+"; @@ -553,10 +596,14 @@ else {$groupSQL = " and campaign_id='" . mysql_real_escape_string($group) . "'"; if (strlen($usergroup)<1) {$usergroupSQL = '';} else {$usergroupSQL = " and user_group='" . mysql_real_escape_string($usergroup) . "'";} -$stmt="select extension,vicidial_live_agents.user,conf_exten,status,server_ip,UNIX_TIMESTAMP(last_call_time),UNIX_TIMESTAMP(last_call_finish),call_server_ip,campaign_id,vicidial_users.user_group,vicidial_users.full_name from vicidial_live_agents,vicidial_users where vicidial_live_agents.user=vicidial_users.user $groupSQL $usergroupSQL order by $orderSQL;"; +$stmt="select extension,vicidial_live_agents.user,conf_exten,status,server_ip,UNIX_TIMESTAMP(last_call_time),UNIX_TIMESTAMP(last_call_finish),call_server_ip,campaign_id,vicidial_users.user_group,vicidial_users.full_name,vicidial_live_agents.comments from vicidial_live_agents,vicidial_users where vicidial_live_agents.user=vicidial_users.user $groupSQL $usergroupSQL order by $orderSQL;"; #$stmt="select extension,vicidial_live_agents.user,conf_exten,status,server_ip,UNIX_TIMESTAMP(last_call_time),UNIX_TIMESTAMP(last_call_finish),call_server_ip,campaign_id,vicidial_users.user_group,vicidial_users.full_name from vicidial_live_agents,vicidial_users where vicidial_live_agents.user=vicidial_users.user and campaign_id='" . mysql_real_escape_string($group) . "' order by $orderSQL;"; +if ($non_latin > 0) +{ +$rslt=mysql_query("SET NAMES 'UTF8'"); +} $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $talking_to_print = mysql_num_rows($rslt); @@ -567,13 +614,22 @@ $talking_to_print = mysql_num_rows($rslt); while ($i < $talking_to_print) { $row=mysql_fetch_row($rslt); - if (eregi("READY|PAUSED",$row[4])) + if (eregi("READY|PAUSED",$row[3])) { $row[5]=$row[6]; } - $extension = eregi_replace('Local/',"",$row[0]); - $extension = sprintf("%-10s", $extension); + if ($non_latin < 1) + { + $extension = eregi_replace('Local/',"",$row[0]); + $extension = sprintf("%-10s", $extension); while(strlen($extension)>10) {$extension = substr("$extension", 0, -1);} + } + else + { + $extension = eregi_replace('Local/',"",$row[0]); + $extension = sprintf("%-40s", $extension); + while(mb_strlen($extension, 'utf-8')>10) {$extension = mb_substr("$extension", 0, -1,'utf8');} + } $Luser = $row[1]; $user = sprintf("%-18s", $row[1]); $Lsessionid = $row[2]; @@ -582,16 +638,48 @@ $talking_to_print = mysql_num_rows($rslt); $status = sprintf("%-6s", $row[3]); $server_ip = sprintf("%-15s", $row[4]); $call_server_ip = sprintf("%-15s", $row[7]); - $campaign_id = sprintf("%-10s", $row[8]); + $campaign_id = sprintf("%-10s", $row[8]); + $comments= $row[11]; + + if (eregi("INCALL",$Lstatus)) + { + if ( (eregi("AUTO",$comments)) or (strlen($comments)<1) ) + {$CM='A';} + else + { + if (eregi("INBOUND",$comments)) + {$CM='I';} + else + {$CM='M';} + } + } + else {$CM=' ';} + if ($UGdisplay > 0) { - $user_group = sprintf("%-12s", $row[9]); + if ($non_latin < 1) + { + $user_group = sprintf("%-12s", $row[9]); while(strlen($user_group)>12) {$user_group = substr("$user_group", 0, -1);} + } + else + { + $user_group = sprintf("%-40s", $row[9]); + while(mb_strlen($user_group, 'utf-8')>12) {$user_group = mb_substr("$user_group", 0, -1,'utf8');} + } } if ($UidORname > 0) { - $user = sprintf("%-18s", $row[10]); + if ($non_latin < 1) + { + $user = sprintf("%-18s", $row[10]); while(strlen($user)>18) {$user = substr("$user", 0, -1);} + } + else + { + $user = sprintf("%-40s", $row[10]); + while(mb_strlen($user, 'utf-8')>18) {$user = mb_substr("$user", 0, -1,'utf8');} + } } if (!eregi("INCALL|QUEUE",$row[3])) {$call_time_S = ($STARTtime - $row[6]);} @@ -655,7 +743,7 @@ $talking_to_print = mysql_num_rows($rslt); $agentcount++; - $Aecho .= "| $G$extension$EG | $G$user$EG |$UGD $G$sessionid$EG$L$R | $G$status$EG | $SVD$G$call_time_MS$EG | $G$campaign_id$EG |\n"; + $Aecho .= "| $G$extension$EG | $G$user$EG |$UGD $G$sessionid$EG$L$R | $G$status$EG $CM | $SVD$G$call_time_MS$EG | $G$campaign_id$EG |\n"; $i++; } diff --git a/agc_2-X/trunk/LANG_www/vicidial_en/AST_timeonVDADallREC.php b/agc_2-X/trunk/LANG_www/vicidial_en/AST_timeonVDADallREC.php new file mode 100644 index 00000000..2abf27b2 --- /dev/null +++ b/agc_2-X/trunk/LANG_www/vicidial_en/AST_timeonVDADallREC.php @@ -0,0 +1,943 @@ + LICENSE: GPLv2 +# +# live real-time stats for the VICIDIAL Auto-Dialer all servers +# +# STOP=4000, SLOW=40, GO=4 seconds refresh interval +# +# CHANGELOG: +# 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) +# 60901-1123 - Changed display elements at the top of the screen +# 60905-1342 - Fixed non INCALL|QUEUE timer column +# 61002-1642 - Added TRUNK SHORT/FILL stats +# 61101-1318 - Added SIP and IAX Listen and Barge links option +# 61101-1647 - Added Usergroup column and user name option as well as sorting +# 61102-1155 - Made display of columns more modular, added ability to hide server info +# 61215-1131 - Added answered calls and drop percent taken from answered calls +# 70111-1600 - Added ability to use BLEND/INBND/*_C/*_B/*_I as closer campaigns +# 70123-1151 - Added non_latin options for substr in display variables, thanks Marin Blu +# 70206-1140 - Added call-type statuses to display(A-Auto, M-Manual, I-Inbound/Closer) +# + +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["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["usergroup"])) {$usergroup=$_GET["usergroup"];} + elseif (isset($_POST["usergroup"])) {$usergroup=$_POST["usergroup"];} +if (isset($_GET["DB"])) {$DB=$_GET["DB"];} + elseif (isset($_POST["DB"])) {$DB=$_POST["DB"];} +if (isset($_GET["adastats"])) {$adastats=$_GET["adastats"];} + elseif (isset($_POST["adastats"])) {$adastats=$_POST["adastats"];} +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["SIPmonitorLINK"])) {$SIPmonitorLINK=$_GET["SIPmonitorLINK"];} + elseif (isset($_POST["SIPmonitorLINK"])) {$SIPmonitorLINK=$_POST["SIPmonitorLINK"];} +if (isset($_GET["IAXmonitorLINK"])) {$IAXmonitorLINK=$_GET["IAXmonitorLINK"];} + elseif (isset($_POST["IAXmonitorLINK"])) {$IAXmonitorLINK=$_POST["IAXmonitorLINK"];} +if (isset($_GET["UGdisplay"])) {$UGdisplay=$_GET["UGdisplay"];} + elseif (isset($_POST["UGdisplay"])) {$UGdisplay=$_POST["UGdisplay"];} +if (isset($_GET["UidORname"])) {$UidORname=$_GET["UidORname"];} + elseif (isset($_POST["UidORname"])) {$UidORname=$_POST["UidORname"];} +if (isset($_GET["orderby"])) {$orderby=$_GET["orderby"];} + elseif (isset($_POST["orderby"])) {$orderby=$_POST["orderby"];} +if (isset($_GET["SERVdisplay"])) {$SERVdisplay=$_GET["SERVdisplay"];} + elseif (isset($_POST["SERVdisplay"])) {$SERVdisplay=$_POST["SERVdisplay"];} + +if (isset($_GET["RECmonitorLINK"])) {$RECmonitorLINK=$_GET["RECmonitorLINK"];} + elseif (isset($_POST["RECmonitorLINK"])) {$RECmonitorLINK=$_POST["RECmonitorLINK"];} + +if (!isset($RR)) {$gRRroup=4;} +if (!isset($group)) {$group='';} +if (!isset($usergroup)) {$usergroup='';} +if (!isset($UGdisplay)) {$UGdisplay=0;} # 0=no, 1=yes +if (!isset($UidORname)) {$UidORname=0;} # 0=id, 1=name +if (!isset($orderby)) {$orderby='timeup';} +if (!isset($SERVdisplay)) {$SERVdisplay=1;} # 0=no, 1=yes + +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 and view_reports='1';"; + if ($DB) {echo "|$stmt|\n";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + if ($non_latin > 0) {$rslta=mysql_query("SET NAMES 'UTF8'");} $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; + } + + $stmt="SELECT vicidial_recording from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 6 and view_reports='1';"; + if ($DB) {echo "|$stmt|\n";} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + if ($non_latin > 0) {$rslta=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + $authrec=$row[0]; + if ($authrec=='1') {$RECmonitorLINK = 1;} else {$RECmonitorLINK = 0;} + + +$NOW_TIME = date("Y-m-d H:i:s"); +$FILE_TIME = date("Ymd-His"); +$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';"; +if ($non_latin > 0) +{ +$rslt=mysql_query("SET NAMES 'UTF8'"); +} +if ($non_latin > 0) {$rslta=mysql_query("SET NAMES 'UTF8'");} $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++; + } + +$stmt="select * from vicidial_user_groups;"; +if ($non_latin > 0) +{ +$rslt=mysql_query("SET NAMES 'UTF8'"); +} +if ($non_latin > 0) {$rslta=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); +if (!isset($DB)) {$DB=0;} +if ($DB) {echo "$stmt\n";} +$usergroups_to_print = mysql_num_rows($rslt); +$i=0; +while ($i < $usergroups_to_print) + { + $row=mysql_fetch_row($rslt); + $usergroups[$i] =$row[0]; + $i++; + } + +if (!isset($RR)) {$RR=4;} + +$NFB = ''; +$NFE = ''; +$F=''; $FG=''; $B=''; $BG=''; + +?> + + + + + + + + + +\n"; +echo"\n"; +echo "VICIDIAL: Time On VDAD Campaign: $group\n"; +echo "\n"; +echo "VICIDIAL 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"; +if ($UGdisplay > 0) + { + echo "\n"; + } +echo "         \n"; +echo "STOP | "; +echo "SLOW | "; +echo "GO"; +echo "       MODIFY | \n"; +echo "SUMMARY | \n"; +echo "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,dial_method,adaptive_maximum_level,adaptive_dropped_percentage,adaptive_dl_diff_target,adaptive_intensity,available_only_ratio_tally,adaptive_latest_server_time,local_call_time,dial_timeout,dial_statuses from vicidial_campaigns where campaign_id='" . mysql_real_escape_string($group) . "';"; + +if ($group=='XXXX-ALL-ACTIVE-XXXX') + { + $stmt="select avg(auto_dial_level),min(dial_status_a),min(dial_status_b),min(dial_status_c),min(dial_status_d),min(dial_status_e),min(lead_order),min(lead_filter_id),sum(hopper_level),min(dial_method),avg(adaptive_maximum_level),avg(adaptive_dropped_percentage),avg(adaptive_dl_diff_target),avg(adaptive_intensity),min(available_only_ratio_tally),min(adaptive_latest_server_time),min(local_call_time),avg(dial_timeout),min(dial_statuses) from vicidial_campaigns;"; + } +if ($non_latin > 0) +{ +$rslt=mysql_query("SET NAMES 'UTF8'"); +} +if ($non_latin > 0) {$rslta=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); +$row=mysql_fetch_row($rslt); +$DIALlev = $row[0]; +$DIALstatusA = $row[1]; +$DIALstatusB = $row[2]; +$DIALstatusC = $row[3]; +$DIALstatusD = $row[4]; +$DIALstatusE = $row[5]; +$DIALorder = $row[6]; +$DIALfilter = $row[7]; +$HOPlev = $row[8]; +$DIALmethod = $row[9]; +$maxDIALlev = $row[10]; +$DROPmax = $row[11]; +$targetDIFF = $row[12]; +$ADAintense = $row[13]; +$ADAavailonly = $row[14]; +$TAPERtime = $row[15]; +$CALLtime = $row[16]; +$DIALtimeout = $row[17]; +$DIALstatuses = $row[18]; + $DIALstatuses = (preg_replace("/ -$|^ /","",$DIALstatuses)); + $DIALstatuses = (ereg_replace(' ',', ',$DIALstatuses)); + +$stmt="select count(*) from vicidial_hopper where campaign_id='" . mysql_real_escape_string($group) . "';"; +if ($group=='XXXX-ALL-ACTIVE-XXXX') + { + $stmt="select count(*) from vicidial_hopper;"; + } +if ($non_latin > 0) +{ +$rslt=mysql_query("SET NAMES 'UTF8'"); +} +if ($non_latin > 0) {$rslta=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); +$row=mysql_fetch_row($rslt); +$VDhop = $row[0]; + +$stmt="select dialable_leads,calls_today,drops_today,drops_answers_today_pct,differential_onemin,agents_average_onemin,balance_trunk_fill,answers_today from vicidial_campaign_stats where campaign_id='" . mysql_real_escape_string($group) . "';"; +if ($group=='XXXX-ALL-ACTIVE-XXXX') + { + $stmt="select sum(dialable_leads),sum(calls_today),sum(drops_today),avg(drops_answers_today_pct),avg(differential_onemin),avg(agents_average_onemin),sum(balance_trunk_fill),sum(answers_today) from vicidial_campaign_stats;"; + } +if ($non_latin > 0) +{ +$rslt=mysql_query("SET NAMES 'UTF8'"); +} +if ($non_latin > 0) {$rslta=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); +$row=mysql_fetch_row($rslt); +$DAleads = $row[0]; +$callsTODAY = $row[1]; +$dropsTODAY = $row[2]; +$drpctTODAY = $row[3]; +$diffONEMIN = $row[4]; +$agentsONEMIN = $row[5]; +$balanceFILL = $row[6]; +$answersTODAY = $row[7]; +if ( ($diffONEMIN != 0) and ($agentsONEMIN > 0) ) + { + $diffpctONEMIN = ( ($diffONEMIN / $agentsONEMIN) * 100); + $diffpctONEMIN = sprintf("%01.2f", $diffpctONEMIN); + } +else {$diffpctONEMIN = '0.00';} + +$stmt="select sum(local_trunk_shortage) from vicidial_campaign_server_stats where campaign_id='" . mysql_real_escape_string($group) . "';"; +if ($group=='XXXX-ALL-ACTIVE-XXXX') + { + $stmt="select sum(local_trunk_shortage) from vicidial_campaign_server_stats;"; + } +if ($non_latin > 0) +{ +$rslt=mysql_query("SET NAMES 'UTF8'"); +} +if ($non_latin > 0) {$rslta=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); +$row=mysql_fetch_row($rslt); +$balanceSHORT = $row[0]; + +echo "
\n"; + 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=1000000000000 display all conferences +###################### +if ($ADD==1000000000000) +{ +echo " - + - + diff --git a/agc_2-X/trunk/LANG_www/vicidial_el/new_listloader_superL.php b/agc_2-X/trunk/LANG_www/vicidial_el/new_listloader_superL.php index b424dba0..7ad3229f 100644 --- a/agc_2-X/trunk/LANG_www/vicidial_el/new_listloader_superL.php +++ b/agc_2-X/trunk/LANG_www/vicidial_el/new_listloader_superL.php @@ -303,11 +303,11 @@ function ParseFileName() { - + - + diff --git a/agc_2-X/trunk/LANG_www/vicidial_el/user_stats.php b/agc_2-X/trunk/LANG_www/vicidial_el/user_stats.php index 7ca9dd0e..26f4fe19 100644 --- a/agc_2-X/trunk/LANG_www/vicidial_el/user_stats.php +++ b/agc_2-X/trunk/LANG_www/vicidial_el/user_stats.php @@ -7,6 +7,7 @@ # # 60619-1743 - Added variable filtering to eliminate SQL injection attack threat # 61201-1136 - Added recordings display and changed calls to time range with 10000 limit +# 70118-1605 - Added user group column to login/out and calls lists # header ("Content-type: text/html; charset=utf-8"); @@ -38,7 +39,7 @@ $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;"; + $stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 7 and view_reports='1';"; $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $auth=$row[0]; @@ -111,6 +112,11 @@ echo "\n"; echo "           $user - $full_name\n"; +echo " - VICIDIAL Time Sheet\n"; +echo " - User Status\n"; +echo " - Τροποποίηση Χρήστη\n"; + + echo "\n"; echo "
\n"; + 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"; +} + +###################### +# ADD=10000000000000 display all vicidial conferences +###################### +if ($ADD==10000000000000) +{ +echo "
\n"; + echo ""; + + $stmt="SELECT * from vicidial_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"; +} + +###################### +# ADD=999999 display reports section +###################### +if ($ADD==999999) +{ + if ($LOGview_reports==1) + { + echo "
\n"; + echo ""; + + $stmt="SELECT * from vicidial_conferences order by conf_exten"; + $rslt=mysql_query($stmt, $link); + $phones_to_print = mysql_num_rows($rslt); + + $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++; + } + + $stmt="SELECT enable_queuemetrics_logging,queuemetrics_url from system_settings;"; + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + $enable_queuemetrics_logging_LU = $row[0]; + $queuemetrics_url_LU = $row[1]; + + ?> + + + + + + 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";
+		$o++;
+		}
+
+	echo "
SERVERΠΕΡΙΓΡΑΦΗIP ADDRESSΕΝΕΡΓΟVDAD timePARK timeCLOSER/INBOUND time
$server_id[$o]$server_description[$o]$server_ip[$o]$active[$o]LINKLINKLINK
\n"; + } + else + { + echo "Δεν έχετε την άδεια να δείτε αυτήν την σελίδα\n"; + exit; + } +} + + + + + +echo "
\n"; + +$ENDtime = date("U"); + +$RUNtime = ($ENDtime - $STARTtime); + +echo "\n\n\n


\n\n"; + + +echo "\n\n\n


\nχρόνος εκτέλεσης διαδικασίας: $RUNtime seconds"; +echo "             ΕΚΔΟΣΗ: $admin_version"; +echo "             ΔΗΜΙΟΥΡΓΙΑ: $build
\n"; + + +?> + + +
+ + + +1) + { + if (strlen($dial_statuses)>2) + { + $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"; + + + $dial_statuses = preg_replace("/ -$/","",$dial_statuses); + $Dstatuses = explode(" ", $dial_statuses); + $Ds_to_print = (count($Dstatuses) - 0); + $Dsql = ''; + $o=0; + while ($Ds_to_print > $o) + { + $o++; + $Dsql .= "'$Dstatuses[$o]',"; + } + $Dsql = preg_replace("/,$/","",$Dsql); + + $stmt="SELECT count(*) FROM vicidial_list where called_since_last_reset='N' and status IN($Dsql) 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 "|$DB|\n"; + echo "Αυτή η εκστρατεία έχει$active_leads οδηγοί που καλούντε στις λίστες\n"; + } + else + { + echo "καμία θέση πινάκων που επιλέγεται για αυτήν την εκστρατεία\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_www/vicidial_el/admin_modify_lead.php b/agc_2-X/trunk/LANG_www/vicidial_el/admin_modify_lead.php index ef8b25b6..151b8118 100644 --- a/agc_2-X/trunk/LANG_www/vicidial_el/admin_modify_lead.php +++ b/agc_2-X/trunk/LANG_www/vicidial_el/admin_modify_lead.php @@ -85,6 +85,8 @@ 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"];} +if (isset($_GET["modify_logs"])) {$modify_logs=$_GET["modify_logs"];} + elseif (isset($_POST["modify_logs"])) {$modify_logs=$_POST["modify_logs"];} $PHP_AUTH_USER = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_USER); @@ -112,7 +114,7 @@ $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;"; + $stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 7 and modify_leads='1';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); @@ -216,6 +218,17 @@ $call_length = ($STARTtime - $call_began); echo "
Lead added to DNC List: $lead_id - $phone_number
\n"; } + ### update last record in vicidial_agent_log and vicidial_log tables + if (($dispo != $status) and ($modify_logs > 0)) + { + $stmt="UPDATE vicidial_log set status='" . mysql_real_escape_string($status) . "' where lead_id='" . mysql_real_escape_string($lead_id) . "' order by call_date desc limit 1"; + if ($DB) {echo "|$stmt|\n";} + $rslt=mysql_query($stmt, $link); + + $stmt="UPDATE vicidial_agent_log set status='" . mysql_real_escape_string($status) . "' where lead_id='" . mysql_real_escape_string($lead_id) . "' order by agent_log_id desc limit 1"; + if ($DB) {echo "|$stmt|\n";} + $rslt=mysql_query($stmt, $link); + } } else @@ -346,7 +359,9 @@ else echo "\n"; - echo "\n"; + echo "\n"; + + echo "\n"; echo "
Modify agent and vicidial logs
\n"; echo "


\n"; diff --git a/agc_2-X/trunk/LANG_www/vicidial_el/admin_search_lead.php b/agc_2-X/trunk/LANG_www/vicidial_el/admin_search_lead.php index 680a422a..01549ba9 100644 --- a/agc_2-X/trunk/LANG_www/vicidial_el/admin_search_lead.php +++ b/agc_2-X/trunk/LANG_www/vicidial_el/admin_search_lead.php @@ -40,7 +40,7 @@ $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;"; + $stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 7 and modify_leads='1';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); diff --git a/agc_2-X/trunk/LANG_www/vicidial_el/dbconnect.php b/agc_2-X/trunk/LANG_www/vicidial_el/dbconnect.php index 7221b35e..5247e166 100644 --- a/agc_2-X/trunk/LANG_www/vicidial_el/dbconnect.php +++ b/agc_2-X/trunk/LANG_www/vicidial_el/dbconnect.php @@ -44,5 +44,6 @@ $local_AMP = '@'; $ext_context = 'demo'; $recording_exten = '8309'; $WeBRooTWritablE = '1'; +$non_latin = '0'; # set to 1 for UTF rules ?> diff --git a/agc_2-X/trunk/LANG_www/vicidial_el/group_hourly_stats.php b/agc_2-X/trunk/LANG_www/vicidial_el/group_hourly_stats.php index 76ee651f..1f85a0e6 100644 --- a/agc_2-X/trunk/LANG_www/vicidial_el/group_hourly_stats.php +++ b/agc_2-X/trunk/LANG_www/vicidial_el/group_hourly_stats.php @@ -28,7 +28,7 @@ if (isset($_GET["ΕΠΙΒΕΒΑΙΩΣΗ"])) {$ΕΠΙΒΕΒΑΙΩΣΗ=$_GET[" $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;"; + $stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 6 and view_reports='1';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); diff --git a/agc_2-X/trunk/LANG_www/vicidial_el/listloader.php b/agc_2-X/trunk/LANG_www/vicidial_el/listloader.php index c0c44044..1d9d3f75 100644 --- a/agc_2-X/trunk/LANG_www/vicidial_el/listloader.php +++ b/agc_2-X/trunk/LANG_www/vicidial_el/listloader.php @@ -137,11 +137,11 @@ function ShowProgress(good, bad, total, dup, post) {
(μόνο αριθμοί or leave blank for values in the file)
Lead Duplicate Check: Διπλός έλεγχος μολύβδου:
Lead Timezone Lookup: Συμβούλευση ζώνης χρονικής ανοχής:
Τυποποιημένο VICIDIAL    Εμφάνιση συνήθειας
Lead Duplicate Check: Διπλός έλεγχος μολύβδου:
Lead Timezone Lookup: Συμβούλευση ζώνης χρονικής ανοχής:
\n"; @@ -173,10 +179,10 @@ echo "

\n"; echo "
\n"; echo " ΧΡΟΝΟΣ ΣYΝΔΕΣΗΣ/ΑΠΟΣΥΝΔΕΣΗΣ:\n"; -echo "\n"; -echo "\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'"; + $stmt="SELECT event,event_epoch,event_date,campaign_id,user_group 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); @@ -197,6 +203,7 @@ echo ""; echo "\n"; echo "\n"; + echo "\n"; echo "\n"; } if (ereg("LOGOUT", $row[0])) @@ -216,6 +223,7 @@ echo ""; echo "\n"; echo "\n"; + echo "\n"; echo "\n"; $event_start_seconds=''; $event_stop_seconds=''; @@ -256,8 +264,8 @@ echo "

\n"; echo "
\n"; echo "CALLS FOR THIS TIME PERIOD: (10000 record limit)\n"; -echo "
ΣΥΜΒΑΝ ΗΜΕΡΑΕΚΣΤΡΑΤΕΙΑ GROUPΩΡΕΣ:ΛΕΠΤΑ
ΣΥΜΒΑΝ ΗΜ echo "
$row[0] $row[2] $row[3] $row[4]
ΣΥΜΒΑΝ ΗΜ echo "
$row[0] $row[2] $row[3] $row[4] $event_hours_int:$event_minutes_int
\n"; -echo "\n"; +echo "
# DATE/TIME LENGTH STATUS PHONEΕΚΣΤΡΑΤΕΙΑ LIST LEAD
\n"; +echo "\n"; $stmt="select * 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' order by call_date desc limit 10000;"; $rslt=mysql_query($stmt, $link); @@ -279,13 +287,14 @@ echo "\n"; echo "\n"; echo "\n"; + echo "\n"; echo "\n"; echo "\n"; } -echo "
# DATE/TIME LENGTH STATUS PHONEΕΚΣΤΡΑΤΕΙΑ GROUP LIST LEAD
# DATE/TIME $row[8] $row[10] $row[3] $row[14] $row[2] $row[1]
\n"; +echo "


\n"; diff --git a/agc_2-X/trunk/LANG_www/vicidial_el/user_status.php b/agc_2-X/trunk/LANG_www/vicidial_el/user_status.php index 44120136..97ef2cac 100644 --- a/agc_2-X/trunk/LANG_www/vicidial_el/user_status.php +++ b/agc_2-X/trunk/LANG_www/vicidial_el/user_status.php @@ -39,7 +39,7 @@ $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;"; + $stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 7 and view_reports='1';"; $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $auth=$row[0]; @@ -75,10 +75,11 @@ $browser = getenv("HTTP_USER_AGENT"); fclose($fp); } - $stmt="SELECT full_name from vicidial_users where user='" . mysql_real_escape_string($user) . "';"; + $stmt="SELECT full_name,user_group from vicidial_users where user='" . mysql_real_escape_string($user) . "';"; $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $full_name = $row[0]; + $user_group = $row[1]; $stmt="SELECT * from vicidial_live_agents where user='" . mysql_real_escape_string($user) . "';"; $rslt=mysql_query($stmt, $link); @@ -198,9 +199,12 @@ else } -echo "           $user - $full_name - \n"; +echo "           $user - $full_name \n"; +echo "       GROUP: $user_group

\n"; echo "VICIDIAL Time Sheet\n"; +echo " - User Stats\n"; +echo " - Τροποποίηση Χρήστη\n"; echo "
\n"; diff --git a/agc_2-X/trunk/LANG_www/vicidial_el/welcome.php b/agc_2-X/trunk/LANG_www/vicidial_el/welcome.php new file mode 100644 index 00000000..00b8d8f0 --- /dev/null +++ b/agc_2-X/trunk/LANG_www/vicidial_el/welcome.php @@ -0,0 +1,25 @@ + LICENSE: GPLv2 +# + +echo "VICIDIAL Καλωσήρθες\n"; +echo "\n"; +echo "\n"; +echo "




"; +echo ""; +echo ""; +echo "\n"; +echo "\n"; +echo "\n"; +echo "\n"; +echo "\n"; +echo "\n"; +echo "
Υποδοχή
 
Agent Login
 
Administration
 
\n"; +echo "\n\n"; +echo "\n\n"; +echo "\n\n"; + +?> \ No newline at end of file diff --git a/agc_2-X/trunk/LANG_www/vicidial_en/AST_CLOSERstats.php b/agc_2-X/trunk/LANG_www/vicidial_en/AST_CLOSERstats.php index ca0ebf4f..c2bea4d6 100644 --- a/agc_2-X/trunk/LANG_www/vicidial_en/AST_CLOSERstats.php +++ b/agc_2-X/trunk/LANG_www/vicidial_en/AST_CLOSERstats.php @@ -27,7 +27,7 @@ if (isset($_GET["SUBMIT"])) {$SUBMIT=$_GET["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;"; + $stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 6 and view_reports='1';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); @@ -86,7 +86,7 @@ echo "\n"; echo "\n"; -echo "           MODIFY | REPORTS \n"; +echo "           MODIFY | REPORTS \n"; echo "\n\n"; echo "
\n\n";
diff --git a/agc_2-X/trunk/LANG_www/vicidial_en/AST_VDADstats.php b/agc_2-X/trunk/LANG_www/vicidial_en/AST_VDADstats.php
index 3dd9b290..b26e245f 100644
--- a/agc_2-X/trunk/LANG_www/vicidial_en/AST_VDADstats.php
+++ b/agc_2-X/trunk/LANG_www/vicidial_en/AST_VDADstats.php
@@ -29,7 +29,7 @@ if (isset($_GET["SUBMIT"]))				{$SUBMIT=$_GET["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;";
+	$stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 6 and view_reports='1';";
 	if ($DB) {echo "|$stmt|\n";}
 	$rslt=mysql_query($stmt, $link);
 	$row=mysql_fetch_row($rslt);
@@ -88,7 +88,7 @@ echo "\n";
 echo "\n";
-echo "           MODIFY | REPORTS \n";
+echo "           MODIFY | REPORTS \n";
 echo "\n\n";
 
 echo "
\n\n";
@@ -202,6 +202,82 @@ echo "Total NA calls -Busy,Disconnect,RingNoAnswer: $NAcalls  $NApercent%\n";
 echo "Average Call Length for NA Calls in seconds:  $average_na_seconds\n";
 
 
+##############################
+#########  CALL STATUS STATS
+
+$TOTALcalls = 0;
+
+echo "\n";
+echo "---------- CALL STATUS STATS\n";
+echo "+--------+----------------------+------------+\n";
+echo "| STATUS | DESCRIPTION          | CALLS      |\n";
+echo "+--------+----------------------+------------+\n";
+
+$stmt="SELECT * from vicidial_statuses order by status";
+$rslt=mysql_query($stmt, $link);
+$statuses_to_print = mysql_num_rows($rslt);
+$statuses_list='';
+
+$o=0;
+while ($statuses_to_print > $o) 
+	{
+	$rowx=mysql_fetch_row($rslt);
+	$statname_list["$rowx[0]"] = "$rowx[1]";
+	$o++;
+	}
+
+$stmt="SELECT * from vicidial_campaign_statuses where campaign_id='" . mysql_real_escape_string($group) . "' 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);
+	$statname_list["$rowx[0]"] = "$rowx[1]";
+	$o++;
+	}
+
+$stmt="select count(*),status 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) . "' group by status;";
+if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");}
+$rslt=mysql_query($stmt, $link);
+if ($DB) {echo "$stmt\n";}
+$statuses_to_print = mysql_num_rows($rslt);
+$i=0;
+while ($i < $statuses_to_print)
+	{
+	$row=mysql_fetch_row($rslt);
+
+	$TOTALcalls = ($TOTALcalls + $row[0]);
+
+	$STATUScount =	sprintf("%10s", $row[0]);while(strlen($STATUScount)>10) {$STATUScount = substr("$STATUScount", 0, -1);}
+	$RAWstatus = $row[1];
+	$status =	sprintf("%-6s", $row[1]);while(strlen($status)>6) {$status = substr("$status", 0, -1);}
+
+	if ($non_latin < 1)
+		{
+		 $status_name =	sprintf("%-20s", $statname_list[$RAWstatus]); 
+		 while(strlen($status_name)>20) {$status_name = substr("$status_name", 0, -1);}	
+		}
+	else
+		{
+		 $status_name =	sprintf("%-60s", $statname_list[$RAWstatus]); 
+		 while(mb_strlen($status_name,'utf-8')>20) {$status_name = mb_substr("$status_name", 0, -1,'utf-8');}	
+		}
+
+
+	echo "| $status | $status_name | $STATUScount |\n";
+
+	$i++;
+	}
+
+$TOTALcalls =		sprintf("%10s", $TOTALcalls);
+
+echo "+--------+----------------------+------------+\n";
+echo "| TOTAL:                        | $TOTALcalls |\n";
+echo "+-------------------------------+------------+\n";
+
+
 ##############################
 #########  USER STATS
 
@@ -217,6 +293,7 @@ echo "| AGENT                    | 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;";
+if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");}
 $rslt=mysql_query($stmt, $link);
 if ($DB) {echo "$stmt\n";}
 $users_to_print = mysql_num_rows($rslt);
@@ -228,8 +305,15 @@ while ($i < $users_to_print)
 	$TOTcalls = ($TOTcalls + $row[2]);
 	$TOTtime = ($TOTtime + $row[3]);
 
-	$user =			sprintf("%-6s", $row[0]);
-	$full_name =	sprintf("%-15s", $row[1]); while(strlen($full_name)>15) {$full_name = substr("$full_name", 0, -1);}
+	$user =	sprintf("%-6s", $row[0]);while(strlen($user)>6) {$user = substr("$user", 0, -1);}
+	if ($non_latin < 1)
+	{
+ 	 $full_name =	sprintf("%-15s", $row[1]); while(strlen($full_name)>15) {$full_name = substr("$full_name", 0, -1);}	
+	}
+	else
+	{
+	 $full_name =	sprintf("%-45s", $row[1]); while(mb_strlen($full_name,'utf-8')>15) {$full_name = mb_substr("$full_name", 0, -1,'utf-8');}	
+	}
 	$USERcalls =	sprintf("%10s", $row[2]);
 	$USERtotTALK =	$row[3];
 	$USERavgTALK =	$row[4];
diff --git a/agc_2-X/trunk/LANG_www/vicidial_en/AST_VICIDIAL_hopperlist.php b/agc_2-X/trunk/LANG_www/vicidial_en/AST_VICIDIAL_hopperlist.php
index feaae790..dae17443 100644
--- a/agc_2-X/trunk/LANG_www/vicidial_en/AST_VICIDIAL_hopperlist.php
+++ b/agc_2-X/trunk/LANG_www/vicidial_en/AST_VICIDIAL_hopperlist.php
@@ -7,7 +7,8 @@
 #
 # 60619-1654 - Added variable filtering to eliminate SQL injection attack threat
 #            - Added required user/pass to gain access to this page
-#
+# 70115-1614 - Added ALT field for vicidial_hopper alt_dial column
+# 
 
 require("dbconnect.php");
 
@@ -24,7 +25,7 @@ if (isset($_GET["SUBMIT"]))				{$SUBMIT=$_GET["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;";
+	$stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 6 and view_reports='1' and modify_campaigns='1';";
 	if ($DB) {echo "|$stmt|\n";}
 	$rslt=mysql_query($stmt, $link);
 	$row=mysql_fetch_row($rslt);
@@ -122,11 +123,11 @@ echo "Total leads in hopper right now:       $TOTALcalls\n";
 
 echo "\n";
 echo "---------- LEADS IN HOPPER\n";
-echo "+------+-----------+------------+-------+--------+-------+--------+\n";
-echo "|      | LEAD_ID   | PHONE NUM  | STATE | STATUS | COUNT | GMT    |\n";
-echo "+------+-----------+------------+-------+--------+-------+--------+\n";
+echo "+------+-----------+------------+-------+--------+-------+--------+-------+\n";
+echo "|      | LEAD_ID   | PHONE NUM  | STATE | STATUS | COUNT | GMT    | ALT   |\n";
+echo "+------+-----------+------------+-------+--------+-------+--------+-------+\n";
 
-$stmt="select vicidial_hopper.lead_id,phone_number,vicidial_hopper.state,vicidial_list.status,called_count,vicidial_hopper.gmt_offset_now,hopper_id 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;";
+$stmt="select vicidial_hopper.lead_id,phone_number,vicidial_hopper.state,vicidial_list.status,called_count,vicidial_hopper.gmt_offset_now,hopper_id,alt_dial 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);
@@ -143,14 +144,15 @@ while ($i < $users_to_print)
 	$count =		sprintf("%-5s", $row[4]);
 	$gmt =			sprintf("%-6s", $row[5]);
 	$hopper_id =	sprintf("%-6s", $row[6]);
+	$alt_dial =		sprintf("%-5s", $row[7]);
 
 if ($DB) {echo "| $FMT_i | $lead_id | $phone_number | $state | $status | $count | $gmt | $hopper_id |\n";}
-else {echo "| $FMT_i | $lead_id | $phone_number | $state | $status | $count | $gmt |\n";}
+else {echo "| $FMT_i | $lead_id | $phone_number | $state | $status | $count | $gmt | $alt_dial |\n";}
 
 	$i++;
 	}
 
-echo "+------+-----------+------------+-------+--------+-------+--------+\n";
+echo "+------+-----------+------------+-------+--------+-------+--------+-------+\n";
 
 
 }
diff --git a/agc_2-X/trunk/LANG_www/vicidial_en/AST_admin_log_display.php b/agc_2-X/trunk/LANG_www/vicidial_en/AST_admin_log_display.php
index b5286873..9c5c4af6 100644
--- a/agc_2-X/trunk/LANG_www/vicidial_en/AST_admin_log_display.php
+++ b/agc_2-X/trunk/LANG_www/vicidial_en/AST_admin_log_display.php
@@ -35,7 +35,7 @@ $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;";
+	$stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 8 and view_reports='1';";
 	if ($DB) {echo "|$stmt|\n";}
 	$rslt=mysql_query($stmt, $link);
 	$row=mysql_fetch_row($rslt);
diff --git a/agc_2-X/trunk/LANG_www/vicidial_en/AST_agent_disposition.php b/agc_2-X/trunk/LANG_www/vicidial_en/AST_agent_disposition.php
new file mode 100644
index 00000000..b0b0a461
--- /dev/null
+++ b/agc_2-X/trunk/LANG_www/vicidial_en/AST_agent_disposition.php
@@ -0,0 +1,237 @@
+    LICENSE: GPLv2
+###
+# CHANGES
+#
+# 70201-1213 - First build - from Marin Blu
+#            
+# 
+
+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($begin_date)) {$begin_date =  $NOW_DATE;}
+if (!isset($end_date)) {$end_date =  $NOW_DATE;}
+
+$stmt="select campaign_id from vicidial_campaigns;";
+if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");}
+$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 Disposition\n";
+echo "
\n"; +echo "Date - From: to \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 ABOVE AND CLICK SUBMIT\n";
+}
+
+else
+{
+
+echo "VICIDIAL: Agent Disposition                             $NOW_TIME\n";
+
+echo "Time range: $begin_date to $end_date \n\n";
+echo "---------- Disposition Details -------------\n\n";
+
+echo "+-----------------+------------+--------+--------+--------+------+------+------+------+------+------+------+------+------+------+------+------+------+------+------+------+------+------+\n";
+echo "| USER NAME       | ID         | CALLS  | TALK   | TALKAVG| A    | B    |CALLBK|CBHOLD| DEC  | DC   | DNC  | DROP |INCALL| LB   | N    | NA   | NI   | NP   | NQ   |QUEUE | SALE | XFER |\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 >= '$begin_date 00:00:01' and call_date <= '$end_date 23:59:59'  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;";
+if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");}
+$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("%-10s", $row[3]); while(strlen($user[$i])>10) {$user[$i] = substr("$user[$i]", 0, -1);}
+	$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   ";  $ctINCALL[$k]="0   ";  $ctDROP[$k]="0   ";  $ctQUEUE[$k]="0   ";  $ctNP[$k]="0   ";   $ctDEC[$k]="0   ";  $ctNQ[$k]="0   ";  $ctNA[$k]="0   ";   $ctXFER[$k]="0   "; $ctLB[$k]="0   ";  $ctCALLBK[$k]="0   "; $ctCBHOLD[$k]="0   ";
+	$stmt="select count(*),status from vicidial_log where call_date >= '$begin_date 00:00:01' and call_date <= '$end_date 23:59:59'  and user='$user[$k]' and campaign_id='" . mysql_real_escape_string($group) . "' group by status;";
+	if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");}
+	$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') {$ctSALE[$k]=sprintf("%-4s", $row[0]);	$TOT_SALE = ($TOT_SALE + $row[0]);}
+		if ($row[1] == 'INCALL') {$ctINCALL[$k]=sprintf("%-4s", $row[0]);	$TOT_INCALL = ($TOT_INCALL + $row[0]);}
+		if ($row[1] == 'DROP') {$ctDROP[$k]=sprintf("%-4s", $row[0]);	$TOT_DROP = ($TOT_DROP + $row[0]);}
+		if ($row[1] == 'QUEUE') {$ctQUEUE[$k]=sprintf("%-4s", $row[0]);	$TOT_QUEUE = ($TOT_QUEUE + $row[0]);}
+		if ($row[1] == 'NP') {$ctNP[$k]=sprintf("%-4s", $row[0]);	$TOT_NP = ($TOT_NP + $row[0]);}
+		if ($row[1] == 'DEC') {$ctDEC[$k]=sprintf("%-4s", $row[0]);	$TOT_DEC = ($TOT_DEC + $row[0]);}
+		if ($row[1] == 'NQ') {$ctNQ[$k]=sprintf("%-4s", $row[0]);	$TOT_NQ = ($TOT_NQ + $row[0]);}
+		if ($row[1] == 'NA') {$ctNA[$k]=sprintf("%-4s", $row[0]);	$TOT_NA = ($TOT_NA + $row[0]);}
+		if ($row[1] == 'XFER') {$ctXFER[$k]=sprintf("%-4s", $row[0]);	$TOT_XFER = ($TOT_XFER + $row[0]);}
+		if ($row[1] == 'LB') {$ctLB[$k]=sprintf("%-4s", $row[0]);	$TOT_LB = ($TOT_LB + $row[0]);}
+		if ($row[1] == 'CALLBK') {$ctCALLBK[$k]=sprintf("%-4s", $row[0]);	$TOT_CALLBK = ($TOT_CALLBK + $row[0]);}
+		if ($row[1] == 'CBHOLD') {$ctCBHOLD[$k]=sprintf("%-4s", $row[0]);	$TOT_CBHOLD = ($TOT_CBHOLD + $row[0]);}
+		$m++;
+		}
+	echo "| $full_name[$k] | $user[$k] | $calls[$k] | $pfUSERtotTALK_MS[$k] | $pfUSERavgTALK_MS[$k] | $ctA[$k] | $ctB[$k] | $ctCALLBK[$k] | $ctCBHOLD[$k] | $ctDEC[$k] | $ctDC[$k] | $ctDNC[$k] | $ctDROP[$k] | $ctINCALL[$k] | $ctLB[$k] | $ctN[$k] | $ctNA[$k] | $ctNI[$k] | $ctNP[$k] | $ctNQ[$k] | $ctQUEUE[$k] | $ctSALE[$k] | $ctXFER[$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);
+	$TOT_INCALL = sprintf("%-5s", $TOT_INCALL);
+	$TOT_DROP = sprintf("%-5s", $TOT_DROP); 
+	$TOT_QUEUE = sprintf("%-5s", $TOT_QUEUE);
+	$TOT_NP = sprintf("%-5s", $TOT_NP);
+	$TOT_DEC = sprintf("%-5s", $TOT_DEC);
+	$TOT_NQ = sprintf("%-5s", $TOT_NQ);
+	$TOT_NA = sprintf("%-5s", $TOT_NA);
+	$TOT_XFER = sprintf("%-5s", $TOT_XFER);
+	$TOT_LB= sprintf("%-5s", $TOT_LB);
+	$TOT_CALLBK = sprintf("%-5s", $TOT_CALLBK);
+	$TOT_CBHOLD = sprintf("%-5s", $TOT_CBHOLD);
+
+echo "+-----------------+------------+--------+--------+--------+------+------+------+------+------+------+------+------+------+------+------+------+------+------+------+------+------+------+\n";
+echo "|  TOTALS                      | $TOTcalls| $TOTtotTALK_MS|        | $TOT_A| $TOT_B| $TOT_CALLBK| $TOT_CBHOLD| $TOT_DEC| $TOT_DC| $TOT_DNC| $TOT_DROP| $TOT_INCALL| $TOT_LB| $TOT_N| $TOT_NA| $TOT_NI| $TOT_NP| $TOT_NQ| $TOT_QUEUE| $TOT_SALE| $TOT_XFER|\n";
+echo "+-----------------+------------+--------+--------+--------+------+------+------+------+------+------+------+------+------+------+------+------+------+------+------+------+------+------+\n";
+echo "\n";
+
+}
+?>
+
\ No newline at end of file
diff --git a/agc_2-X/trunk/LANG_www/vicidial_en/AST_agent_performance.php b/agc_2-X/trunk/LANG_www/vicidial_en/AST_agent_performance.php
index a489bc7d..eb2ceac4 100644
--- a/agc_2-X/trunk/LANG_www/vicidial_en/AST_agent_performance.php
+++ b/agc_2-X/trunk/LANG_www/vicidial_en/AST_agent_performance.php
@@ -7,6 +7,7 @@
 #
 # 60619-1711 - Added variable filtering to eliminate SQL injection attack threat
 #            - Added required user/pass to gain access to this page
+# 70201-1203 - Added non_latin UTF8 output code, widened USER ID to 8 chars
 #
 
 require("dbconnect.php");
@@ -28,8 +29,9 @@ if (isset($_GET["SUBMIT"]))				{$SUBMIT=$_GET["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;";
+	$stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 6 and view_reports='1';";
 	if ($DB) {echo "|$stmt|\n";}
+	if ($non_latin > 0) { $rslt=mysql_query("SET NAMES 'UTF8'");}
 	$rslt=mysql_query($stmt, $link);
 	$row=mysql_fetch_row($rslt);
 	$auth=$row[0];
@@ -49,6 +51,7 @@ if (!isset($group)) {$group = '';}
 if (!isset($query_date)) {$query_date = $NOW_DATE;}
 
 $stmt="select campaign_id from vicidial_campaigns;";
+if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");}
 $rslt=mysql_query($stmt, $link);
 if ($DB) {echo "$stmt\n";}
 $campaigns_to_print = mysql_num_rows($rslt);
@@ -91,7 +94,7 @@ echo "\n";
 echo "\n";
 echo "\n";
 echo "\n";
-echo "           MODIFY | REPORTS \n";
+echo "           MODIFY | REPORTS \n";
 echo "\n\n";
 
 echo "
\n";
@@ -126,11 +129,12 @@ 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";
+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;";
+if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");}
 $rslt=mysql_query($stmt, $link);
 if ($DB) {echo "$stmt\n";}
 $rows_to_print = mysql_num_rows($rslt);
@@ -141,8 +145,25 @@ while ($i < $rows_to_print)
 	$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]);
+
+	if ($non_latin < 1)
+	{
+   	 $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]);
+        while(strlen($user[$i])>6) {$user[$i] = substr("$user[$i]", 0, -1);}
+       }
+	else
+	{	
+        $full_name[$i]=	sprintf("%-45s", $row[2]); 
+	 while(mb_strlen($full_name[$i],'utf-8')>15) {$full_name[$i] = mb_substr("$full_name[$i]", 0, -1,'utf-8');}
+
+ 	 $user[$i] =		sprintf("%-18s", $row[3]);
+	 while(mb_strlen($user[$i],'utf-8')>6) {$user[$i] = mb_substr("$user[$i]", 0, -1,'utf-8');}
+	}
+
+	$user[$i] =		sprintf("%-8s", $row[3]);
 	$USERtotTALK =	$row[1];
 	$USERavgTALK =	$row[4];
 
@@ -173,6 +194,10 @@ 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;";
+	if ($non_latin > 0)
+	{
+	$rslt=mysql_query("SET NAMES 'UTF8'");
+	}
 	$rslt=mysql_query($stmt, $link);
 	if ($DB) {echo "$stmt\n";}
 	$rows_to_print = mysql_num_rows($rslt);
@@ -217,9 +242,9 @@ while($k < $i)
 	$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";
+echo "|  TOTALS                    | $TOTcalls| $TOTtotTALK_MS|        | $TOT_A| $TOT_B| $TOT_DC| $TOT_DNC| $TOT_N| $TOT_NI| $TOT_SALE|\n";
+echo "+-----------------+----------+--------+--------+--------+------+------+------+------+------+------+------+\n";
 
 echo "\n";
 
diff --git a/agc_2-X/trunk/LANG_www/vicidial_en/AST_agent_performance_detail.php b/agc_2-X/trunk/LANG_www/vicidial_en/AST_agent_performance_detail.php
index 2dd3dc5e..72779f6e 100644
--- a/agc_2-X/trunk/LANG_www/vicidial_en/AST_agent_performance_detail.php
+++ b/agc_2-X/trunk/LANG_www/vicidial_en/AST_agent_performance_detail.php
@@ -7,6 +7,8 @@
 #
 # 60619-1712 - Added variable filtering to eliminate SQL injection attack threat
 #            - Added required user/pass to gain access to this page
+# 70118-1705 - Added user_group filtering option
+# 70201-1207 - Added non_latin UTF8 output code, widened USER ID to 8 chars
 #
 
 require("dbconnect.php");
@@ -15,21 +17,26 @@ $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"];}
+	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["user_group"]))				{$user_group=$_GET["user_group"];}
+	elseif (isset($_POST["user_group"]))	{$user_group=$_POST["user_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"];}
+	elseif (isset($_POST["submit"]))	{$submit=$_POST["submit"];}
 if (isset($_GET["SUBMIT"]))				{$SUBMIT=$_GET["SUBMIT"];}
-	elseif (isset($_POST["SUBMIT"]))		{$SUBMIT=$_POST["SUBMIT"];}
+	elseif (isset($_POST["SUBMIT"]))	{$SUBMIT=$_POST["SUBMIT"];}
+
+if (strlen($shift)<2) {$shift='ALL';}
 
 $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;";
+	$stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 6 and view_reports='1';";
 	if ($DB) {echo "|$stmt|\n";}
+	if ($non_latin > 0) { $rslt=mysql_query("SET NAMES 'UTF8'");}
 	$rslt=mysql_query($stmt, $link);
 	$row=mysql_fetch_row($rslt);
 	$auth=$row[0];
@@ -49,6 +56,7 @@ if (!isset($group)) {$group = '';}
 if (!isset($query_date)) {$query_date = $NOW_DATE;}
 
 $stmt="select campaign_id from vicidial_campaigns;";
+if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");}
 $rslt=mysql_query($stmt, $link);
 if ($DB) {echo "$stmt\n";}
 $campaigns_to_print = mysql_num_rows($rslt);
@@ -59,6 +67,18 @@ while ($i < $campaigns_to_print)
 	$groups[$i] =$row[0];
 	$i++;
 	}
+$stmt="select user_group from vicidial_user_groups;";
+if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");}
+$rslt=mysql_query($stmt, $link);
+if ($DB) {echo "$stmt\n";}
+$user_groups_to_print = mysql_num_rows($rslt);
+$i=0;
+while ($i < $user_groups_to_print)
+	{
+	$row=mysql_fetch_row($rslt);
+	$user_groups[$i] =$row[0];
+	$i++;
+	}
 ?>
 
 
@@ -86,12 +106,25 @@ echo "\n";
+echo "\n";
 echo "\n";
 echo "\n";
-echo "           MODIFY | REPORTS \n";
+echo "           MODIFY | REPORTS \n";
 echo "\n\n";
 
 echo "
\n";
@@ -101,7 +134,7 @@ 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";
+echo " NOTE: stats taken from shift specified\n";
 }
 
 else
@@ -120,17 +153,28 @@ if ($shift == 'PM')
 	$time_BEGIN = "15:15:00";   
 	$time_END = "23:15:00";
 	}
+if ($shift == 'ALL') 
+	{
+	$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";
+	}
+
+if (strlen($user_group)>0) {$ugSQL="and vicidial_agent_log.user_group='$user_group'";}
+else {$ugSQL='';}
 
 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";
+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;";
+$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 $ugSQL group by full_name order by calls desc limit 1000;";
+if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");}
 $rslt=mysql_query($stmt, $link);
 if ($DB) {echo "$stmt\n";}
 $rows_to_print = mysql_num_rows($rslt);
@@ -145,8 +189,25 @@ while ($i < $rows_to_print)
 	$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]);
+
+	if ($non_latin < 1)
+	{
+   	 $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]);
+        while(strlen($user[$i])>6) {$user[$i] = substr("$user[$i]", 0, -1);}
+       }
+	else
+	{	
+        $full_name[$i]=	sprintf("%-45s", $row[2]); 
+	 while(mb_strlen($full_name[$i],'utf-8')>15) {$full_name[$i] = mb_substr("$full_name[$i]", 0, -1,'utf-8');}
+
+ 	 $user[$i] =		sprintf("%-18s", $row[3]);
+	 while(mb_strlen($user[$i],'utf-8')>6) {$user[$i] = mb_substr("$user[$i]", 0, -1,'utf-8');}
+	}
+
+	$user[$i] =		sprintf("%-8s", $row[3]);
 	$USERtime =	($row[1] + $row[5] + $row[7] + $row[9]);
 	$USERtotTALK =	$row[1];
 	$USERavgTALK =	$row[4];
@@ -255,6 +316,7 @@ 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;";
+	if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");}
 	$rslt=mysql_query($stmt, $link);
 	if ($DB) {echo "$stmt\n";}
 	$rows_to_print = mysql_num_rows($rslt);
@@ -390,10 +452,11 @@ while($k < $i)
 	$TOT_NI = sprintf("%-5s", $TOT_NI);
 	$TOT_CB = sprintf("%-5s", $TOT_CB);
 	$TOT_SALE = sprintf("%-5s", $TOT_SALE);
+	$TOT_AGENTS = sprintf("%-4s", $k);
 
-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";
+echo "|  TOTALS        AGENTS:$TOT_AGENTS | $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";
 
diff --git a/agc_2-X/trunk/LANG_www/vicidial_en/AST_agent_time_sheet.php b/agc_2-X/trunk/LANG_www/vicidial_en/AST_agent_time_sheet.php
index 017d39d6..bd562a7b 100644
--- a/agc_2-X/trunk/LANG_www/vicidial_en/AST_agent_time_sheet.php
+++ b/agc_2-X/trunk/LANG_www/vicidial_en/AST_agent_time_sheet.php
@@ -28,7 +28,7 @@ if (isset($_GET["SUBMIT"]))				{$SUBMIT=$_GET["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;";
+	$stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 6 and view_reports='1';";
 	if ($DB) {echo "|$stmt|\n";}
 	$rslt=mysql_query($stmt, $link);
 	$row=mysql_fetch_row($rslt);
@@ -63,7 +63,11 @@ if (!isset($query_date)) {$query_date = $NOW_DATE;}
 \n";
 echo "VICIDIAL: Agent Time Sheet\n";
-echo "VICIDIAL ADMIN: Agent Time Sheet
\n"; +echo "VICIDIAL ADMIN: Agent Time Sheet\n"; +echo " - User Stats\n"; +echo " - User Status\n"; +echo " - Modify User\n"; +echo "
\n"; echo "
  \n"; echo "Date: \n"; echo "User ID: \n"; diff --git a/agc_2-X/trunk/LANG_www/vicidial_en/AST_agent_time_sheet_archive.php b/agc_2-X/trunk/LANG_www/vicidial_en/AST_agent_time_sheet_archive.php new file mode 100644 index 00000000..fb71d1d6 --- /dev/null +++ b/agc_2-X/trunk/LANG_www/vicidial_en/AST_agent_time_sheet_archive.php @@ -0,0 +1,286 @@ + 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 and view_reports='1';"; + 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 "VICIDIAL ADMIN: Agent Time Sheet\n"; +echo " - User Stats\n"; +echo " - User Status\n"; +echo " - Modify User\n"; +echo "
\n"; +echo "   \n"; +echo "Date: \n"; +echo "User ID: \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_www/vicidial_en/AST_inboundEXTstats.php b/agc_2-X/trunk/LANG_www/vicidial_en/AST_inboundEXTstats.php
new file mode 100644
index 00000000..5bc24935
--- /dev/null
+++ b/agc_2-X/trunk/LANG_www/vicidial_en/AST_inboundEXTstats.php
@@ -0,0 +1,400 @@
+    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 and view_reports='1';";
+	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_www/vicidial_en/AST_inboundEXTstats_department.php b/agc_2-X/trunk/LANG_www/vicidial_en/AST_inboundEXTstats_department.php new file mode 100644 index 00000000..015f6820 --- /dev/null +++ b/agc_2-X/trunk/LANG_www/vicidial_en/AST_inboundEXTstats_department.php @@ -0,0 +1,178 @@ + LICENSE: GPLv2 +# +# CHANGES +# 70201-1710 - First Build +# + +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["end_query_date"])) {$end_query_date=$_GET["end_query_date"];} + elseif (isset($_POST["end_query_date"])) {$end_query_date=$_POST["end_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 and view_reports='1';"; + 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($end_query_date)) {$end_query_date = $NOW_DATE;} +if (!isset($server_ip)) {$server_ip = '10.10.11.20';} + +$stmt="select distinct department from inbound_numbers;"; +$rslt=mysql_query($stmt, $link); +if ($DB) {echo "$stmt\n";} +$dept_to_print = mysql_num_rows($rslt); +$i=0; +while ($i < $dept_to_print) + { + $row=mysql_fetch_row($rslt); + $dept[$i] =$row[0]; + $i++; + } + +?> + + + + + +\n"; +#echo"\n"; +echo "ASTERISK: Inbound Calls Stats - By Department\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 "PLEASE SELECT A DEPARTMENT AND DATE RANGE ABOVE AND CLICK SUBMIT\n";
+}
+
+else
+{
+$extSQL='';
+$stmt="select extension from inbound_numbers where department='$group';";
+$rslt=mysql_query($stmt, $link);
+if ($DB) {echo "$stmt\n";}
+$inbound_to_print = mysql_num_rows($rslt);
+$i=0;
+while ($i < $inbound_to_print)
+	{
+	if (strlen($extSQL)> 1) {$extSQL .= ",";}
+	$row=mysql_fetch_row($rslt);
+	$extensions[$i] =$row[0];
+	$extSQL .= "'$extensions[$i]'";
+	$i++;
+	}
+
+echo "ASTERISK: Inbound Calls Stats For $group   from $query_date to $end_query_date\n";
+
+echo "\n";
+echo "---------- TOTALS\n";
+echo "\n";
+
+echo "+----------------------+------------+------------+\n";
+echo "| NUMBER               | CALLS      | AVG TIME   |\n";
+echo "+----------------------+------------+------------+\n";
+
+$k=0;
+while ($k < $inbound_to_print)
+	{
+	$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($end_query_date) . " 23:59:59' and server_ip='" . mysql_real_escape_string($server_ip) . "' and extension='$extensions[$k]' ;";
+	$rslt=mysql_query($stmt, $link);
+	if ($DB) {echo "$stmt\n";}
+	$row=mysql_fetch_row($rslt);
+
+	$extensions[$k] = sprintf("%20s", $extensions[$k]);
+	$TOTALcalls =	sprintf("%10s", $row[0]);
+	if ( ($row[0]<1) or ($row[1]<1) )
+		{
+		$average_hold_seconds = "         0";
+		}
+	else
+		{
+		$average_hold_seconds = ($row[1] / $row[0]);
+		$average_hold_seconds = round($average_hold_seconds, 0);
+		$average_hold_seconds =	sprintf("%10s", $average_hold_seconds);
+		}
+
+	$calls = ($TOTALcalls + $calls);
+	$seconds = ($row[1] + $seconds);
+
+	echo "| $extensions[$k] | $TOTALcalls | $average_hold_seconds |\n";
+	$k++;
+	}
+
+$calls =	sprintf("%10s", $calls);
+$seconds = ($seconds / $calls);
+$seconds = round($seconds, 0);
+$seconds =	sprintf("%5s", $seconds);
+echo "+----------------------+------------+------------+\n";
+echo "| TOTALS               | $calls | AVG: $seconds |\n";
+echo "+----------------------+------------+------------+\n";
+
+
+}
+
+
+
+?>
+
+ + \ No newline at end of file diff --git a/agc_2-X/trunk/LANG_www/vicidial_en/AST_server_performance.php b/agc_2-X/trunk/LANG_www/vicidial_en/AST_server_performance.php index f3e5b9fb..8a3b6529 100644 --- a/agc_2-X/trunk/LANG_www/vicidial_en/AST_server_performance.php +++ b/agc_2-X/trunk/LANG_www/vicidial_en/AST_server_performance.php @@ -28,7 +28,7 @@ if (isset($_GET["SUBMIT"])) {$SUBMIT=$_GET["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;"; + $stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 6 and view_reports='1' and modify_servers='1';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); @@ -96,7 +96,7 @@ echo "\n"; echo "\n"; echo "\n"; echo "\n"; -echo "             REPORTS \n"; +echo "             REPORTS \n"; echo "\n\n"; echo "
\n";
diff --git a/agc_2-X/trunk/LANG_www/vicidial_en/AST_timeonVDAD.php b/agc_2-X/trunk/LANG_www/vicidial_en/AST_timeonVDAD.php
index 06b6e181..e9c8f52e 100644
--- a/agc_2-X/trunk/LANG_www/vicidial_en/AST_timeonVDAD.php
+++ b/agc_2-X/trunk/LANG_www/vicidial_en/AST_timeonVDAD.php
@@ -33,7 +33,7 @@ if (isset($_GET["closer_display"]))				{$closer_display=$_GET["closer_display"];
 $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;";
+	$stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 6 and view_reports='1';";
 	if ($DB) {echo "|$stmt|\n";}
 	$rslt=mysql_query($stmt, $link);
 	$row=mysql_fetch_row($rslt);
@@ -133,7 +133,7 @@ echo "SERVER: $server_ip\n";
 if ($closer_display>0) {$closer_display_reverse=0;   $closer_reverse_link='DEFAULT';}
 else {$closer_display_reverse=1;   $closer_reverse_link='CLOSER';}
 
-echo "VICIDIAL: Agents Time On Calls           $NOW_TIME    $closer_reverse_link | REPORTS\n\n";
+echo "VICIDIAL: Agents Time On Calls           $NOW_TIME    $closer_reverse_link | REPORTS\n\n";
 
 if ($closer_display>0)
 {
diff --git a/agc_2-X/trunk/LANG_www/vicidial_en/AST_timeonVDADall.php b/agc_2-X/trunk/LANG_www/vicidial_en/AST_timeonVDADall.php
index 3eae6859..5946b75a 100644
--- a/agc_2-X/trunk/LANG_www/vicidial_en/AST_timeonVDADall.php
+++ b/agc_2-X/trunk/LANG_www/vicidial_en/AST_timeonVDADall.php
@@ -7,7 +7,7 @@
 #
 # STOP=4000, SLOW=40, GO=4 seconds refresh interval
 # 
-# changes:
+# CHANGELOG:
 # 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
@@ -21,7 +21,11 @@
 # 61002-1642 - Added TRUNK SHORT/FILL stats
 # 61101-1318 - Added SIP and IAX Listen and Barge links option
 # 61101-1647 - Added Usergroup column and user name option as well as sorting
-# 61102-1155 - made display of columns more modular, added ability to hide server info
+# 61102-1155 - Made display of columns more modular, added ability to hide server info
+# 61215-1131 - Added answered calls and drop percent taken from answered calls
+# 70111-1600 - Added ability to use BLEND/INBND/*_C/*_B/*_I as closer campaigns
+# 70123-1151 - Added non_latin options for substr in display variables, thanks Marin Blu
+# 70206-1140 - Added call-type statuses to display(A-Auto, M-Manual, I-Inbound/Closer)
 #
 
 header ("Content-type: text/html; charset=utf-8");
@@ -113,8 +117,12 @@ $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;";
+	$stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 6 and view_reports='1';";
 	if ($DB) {echo "|$stmt|\n";}
+if ($non_latin > 0)
+{
+$rslt=mysql_query("SET NAMES 'UTF8'");
+}
 	$rslt=mysql_query($stmt, $link);
 	$row=mysql_fetch_row($rslt);
 	$auth=$row[0];
@@ -135,6 +143,10 @@ $epochSIXhoursAGO = ($STARTtime - 21600);
 $timeSIXhoursAGO = date("Y-m-d H:i:s",$epochSIXhoursAGO);
 
 $stmt="select campaign_id from vicidial_campaigns where active='Y';";
+if ($non_latin > 0)
+{
+$rslt=mysql_query("SET NAMES 'UTF8'");
+}
 $rslt=mysql_query($stmt, $link);
 if (!isset($DB))   {$DB=0;}
 if ($DB) {echo "$stmt\n";}
@@ -148,6 +160,10 @@ while ($i < $groups_to_print)
 	}
 
 $stmt="select * from vicidial_user_groups;";
+if ($non_latin > 0)
+{
+$rslt=mysql_query("SET NAMES 'UTF8'");
+}
 $rslt=mysql_query($stmt, $link);
 if (!isset($DB))   {$DB=0;}
 if ($DB) {echo "$stmt\n";}
@@ -242,18 +258,22 @@ echo "GO";
 echo "       MODIFY | \n";
 echo "SUMMARY | \n";
-echo "REPORTS \n";
+echo "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,dial_method,adaptive_maximum_level,adaptive_dropped_percentage,adaptive_dl_diff_target,adaptive_intensity,available_only_ratio_tally,adaptive_latest_server_time,local_call_time,dial_timeout from vicidial_campaigns where campaign_id='" . mysql_real_escape_string($group) . "';"; +$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,dial_method,adaptive_maximum_level,adaptive_dropped_percentage,adaptive_dl_diff_target,adaptive_intensity,available_only_ratio_tally,adaptive_latest_server_time,local_call_time,dial_timeout,dial_statuses from vicidial_campaigns where campaign_id='" . mysql_real_escape_string($group) . "';"; if ($group=='XXXX-ALL-ACTIVE-XXXX') { - $stmt="select avg(auto_dial_level),min(dial_status_a),min(dial_status_b),min(dial_status_c),min(dial_status_d),min(dial_status_e),min(lead_order),min(lead_filter_id),sum(hopper_level),min(dial_method),avg(adaptive_maximum_level),avg(adaptive_dropped_percentage),avg(adaptive_dl_diff_target),avg(adaptive_intensity),min(available_only_ratio_tally),min(adaptive_latest_server_time),min(local_call_time),avg(dial_timeout) from vicidial_campaigns;"; + $stmt="select avg(auto_dial_level),min(dial_status_a),min(dial_status_b),min(dial_status_c),min(dial_status_d),min(dial_status_e),min(lead_order),min(lead_filter_id),sum(hopper_level),min(dial_method),avg(adaptive_maximum_level),avg(adaptive_dropped_percentage),avg(adaptive_dl_diff_target),avg(adaptive_intensity),min(available_only_ratio_tally),min(adaptive_latest_server_time),min(local_call_time),avg(dial_timeout),min(dial_statuses) from vicidial_campaigns;"; } +if ($non_latin > 0) +{ +$rslt=mysql_query("SET NAMES 'UTF8'"); +} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $DIALlev = $row[0]; @@ -274,12 +294,19 @@ $ADAavailonly = $row[14]; $TAPERtime = $row[15]; $CALLtime = $row[16]; $DIALtimeout = $row[17]; +$DIALstatuses = $row[18]; + $DIALstatuses = (preg_replace("/ -$|^ /","",$DIALstatuses)); + $DIALstatuses = (ereg_replace(' ',', ',$DIALstatuses)); $stmt="select count(*) from vicidial_hopper where campaign_id='" . mysql_real_escape_string($group) . "';"; if ($group=='XXXX-ALL-ACTIVE-XXXX') { $stmt="select count(*) from vicidial_hopper;"; } +if ($non_latin > 0) +{ +$rslt=mysql_query("SET NAMES 'UTF8'"); +} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $VDhop = $row[0]; @@ -289,6 +316,10 @@ if ($group=='XXXX-ALL-ACTIVE-XXXX') { $stmt="select sum(dialable_leads),sum(calls_today),sum(drops_today),avg(drops_answers_today_pct),avg(differential_onemin),avg(agents_average_onemin),sum(balance_trunk_fill),sum(answers_today) from vicidial_campaign_stats;"; } +if ($non_latin > 0) +{ +$rslt=mysql_query("SET NAMES 'UTF8'"); +} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $DAleads = $row[0]; @@ -311,6 +342,10 @@ if ($group=='XXXX-ALL-ACTIVE-XXXX') { $stmt="select sum(local_trunk_shortage) from vicidial_campaign_server_stats;"; } +if ($non_latin > 0) +{ +$rslt=mysql_query("SET NAMES 'UTF8'"); +} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $balanceSHORT = $row[0]; @@ -351,7 +386,7 @@ echo "
HOPPER LEVEL:  $HOPlev     DROPPED / ANSWERED:  $dropsTODAY / $answersTODAY   DL DIFF:  $diffONEMIN     STATUSES:  $DIALstatusA, $DIALstatusB, $DIALstatusC, $DIALstatusD, $DIALstatusE     STATUSES:  $DIALstatuses    
"; +echo ""; +echo ""; +echo ""; +echo ""; +echo ""; +echo ""; + +if ($adastats>1) + { + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + } + +echo ""; +echo ""; +echo ""; +echo ""; +echo ""; +echo ""; + +echo ""; +echo ""; +echo ""; +echo ""; +echo ""; +echo ""; + +echo ""; +echo ""; +echo ""; +echo ""; +echo ""; +echo ""; + +echo ""; +echo ""; +echo ""; +echo "
DIAL LEVEL:  $DIALlev    TRUNK SHORT/FILL:  $balanceSHORT / $balanceFILL     FILTER:  $DIALfilter   TIME:   $NOW_TIME
- min   MAX LEVEL:  $maxDIALlev   DROPPED MAX:  $DROPmax%    TARGET DIFF:  $targetDIFF     INTENSITY:  $ADAintense    
DIAL TIMEOUT:  $DIALtimeout  TAPER TIME:  $TAPERtime  LOCAL TIME:  $CALLtime  AVAIL ONLY:  $ADAavailonly  
DIALABLE LEADS:  $DAleads     CALLS TODAY:  $callsTODAY     AVG AGENTS:  $agentsONEMIN     DIAL METHOD:  $DIALmethod    
HOPPER LEVEL:  $HOPlev     DROPPED / ANSWERED:  $dropsTODAY / $answersTODAY   DL DIFF:  $diffONEMIN     STATUSES:  $DIALstatuses    
LEADS IN HOPPER:  $VDhop     DROPPED PERCENT:  $drpctTODAY%    DIFF:  $diffpctONEMIN%     ORDER:  $DIALorder    
"; + +if ($adastats<2) + { + echo "+ VIEW MORE SETTINGS"; + } +if ($UGdisplay>0) + { + echo "       HIDE USER GROUP"; + } +else + { + echo "       VIEW USER GROUP"; + } +if ($UidORname>0) + { + echo "       SHOW AGENT ID"; + } +else + { + echo "       SHOW AGENT NAME"; + } +if ($SERVdisplay>0) + { + echo "       HIDE SERVER INFO"; + } +else + { + echo "       SHOW SERVER INFO"; + } +echo "
"; + +echo "\n\n"; +} +################################################################################### +###### OUTBOUND CALLS +################################################################################### +if (eregi("(CLOSER|BLEND|INBND|_C$|_B$|_I$)",$group)) + { + $stmt="select closer_campaigns from vicidial_campaigns where campaign_id='" . mysql_real_escape_string($group) . "';"; +if ($non_latin > 0) +{ +$rslt=mysql_query("SET NAMES 'UTF8'"); +} + if ($non_latin > 0) {$rslta=mysql_query("SET NAMES 'UTF8'");} $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 + { + if ($group=='XXXX-ALL-ACTIVE-XXXX') {$groupSQL = '';} + else {$groupSQL = " and campaign_id='" . mysql_real_escape_string($group) . "'";} + + $stmt="select status from vicidial_auto_calls where status NOT IN('XFER') $groupSQL;"; + } +if ($non_latin > 0) +{ +$rslt=mysql_query("SET NAMES 'UTF8'"); +} +if ($non_latin > 0) {$rslta=mysql_query("SET NAMES 'UTF8'");} $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|BLEND|INBND|_C$|_B$|_I$)",$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"; + + +$HDbegin = "+"; +$HTbegin = "|"; +$HDstation = "------------+"; +$HTstation = " STATION |"; +$HDuser = "--------------------+"; +$HTuser = " USER |"; +$HDusergroup = "--------------+"; +$HTusergroup = " USER GROUP |"; +$HDsessionid = "------------------+"; +$HTsessionid = " SESSIONID |"; +$HDbarge = "-------+"; +$HTbarge = " BARGE |"; +$HDrec = "---------+"; +$HTrec = " MONITOR |"; +$HDstatus = "----------+"; +$HTstatus = " STATUS |"; +$HDserver_ip = "-----------------+"; +$HTserver_ip = " SERVER IP |"; +$HDcall_server_ip = "-----------------+"; +$HTcall_server_ip = " CALL SERVER IP |"; +$HDtime = "---------+"; +$HTtime = " MM:SS |"; +$HDcampaign = "------------+"; +$HTcampaign = " CAMPAIGN |"; + +if ($UGdisplay < 1) + { + $HDusergroup = ''; + $HTusergroup = ''; + } +if ( ($SIPmonitorLINK<1) && ($IAXmonitorLINK<1) ) + { + $HDsessionid = "-----------+"; + $HTsessionid = " SESSIONID |"; + } +if ( ($SIPmonitorLINK<2) && ($IAXmonitorLINK<2) ) + { + $HDbarge = ''; + $HTbarge = ''; + } +if ($SERVdisplay < 1) + { + $HDserver_ip = ''; + $HTserver_ip = ''; + $HDcall_server_ip = ''; + $HTcall_server_ip = ''; + } + +if ( ($RECmonitorLINK<1) ) +{ + $HDrec = ''; + $HTrec = ''; +} + +$Aline = "$HDbegin$HDstation$HDuser$HDusergroup$HDsessionid$HDbarge$HDstatus$HDrec$HDserver_ip$HDcall_server_ip$HDtime$HDcampaign\n"; +$Bline = "$HTbegin$HTstation$HTuser$HTusergroup$HTsessionid$HTbarge$HTstatus$HTrec$HTserver_ip$HTcall_server_ip$HTtime$HTcampaign\n"; + +$Aecho .= "$Aline"; +$Aecho .= "$Bline"; +$Aecho .= "$Aline"; + +if ($orderby=='timeup') {$orderSQL='status,last_call_time';} +if ($orderby=='timedown') {$orderSQL='status desc,last_call_time desc';} +if ($orderby=='campaignup') {$orderSQL='campaign_id,status,last_call_time';} +if ($orderby=='campaigndown') {$orderSQL='campaign_id desc,status desc,last_call_time desc';} +if ($orderby=='groupup') {$orderSQL='user_group,status,last_call_time';} +if ($orderby=='groupdown') {$orderSQL='user_group desc,status desc,last_call_time desc';} +if ($UidORname > 0) + { + if ($orderby=='userup') {$orderSQL='full_name,status,last_call_time';} + if ($orderby=='userdown') {$orderSQL='full_name desc,status desc,last_call_time desc';} + } +else + { + if ($orderby=='userup') {$orderSQL='vicidial_live_agents.user';} + if ($orderby=='userdown') {$orderSQL='vicidial_live_agents.user desc';} + } + +if ($group=='XXXX-ALL-ACTIVE-XXXX') {$groupSQL = '';} +else {$groupSQL = " and campaign_id='" . mysql_real_escape_string($group) . "'";} +if (strlen($usergroup)<1) {$usergroupSQL = '';} +else {$usergroupSQL = " and user_group='" . mysql_real_escape_string($usergroup) . "'";} + +$stmt="select extension,vicidial_live_agents.user,conf_exten,status,server_ip,UNIX_TIMESTAMP(last_call_time),UNIX_TIMESTAMP(last_call_finish),call_server_ip,campaign_id,vicidial_users.user_group,vicidial_users.full_name,vicidial_live_agents.comments,lead_id,vicidial_users.pass from vicidial_live_agents,vicidial_users where vicidial_live_agents.user=vicidial_users.user $groupSQL $usergroupSQL order by $orderSQL;"; + +#$stmt="select extension,vicidial_live_agents.user,conf_exten,status,server_ip,UNIX_TIMESTAMP(last_call_time),UNIX_TIMESTAMP(last_call_finish),call_server_ip,campaign_id,vicidial_users.user_group,vicidial_users.full_name from vicidial_live_agents,vicidial_users where vicidial_live_agents.user=vicidial_users.user and campaign_id='" . mysql_real_escape_string($group) . "' order by $orderSQL;"; + +if ($non_latin > 0) +{ +$rslt=mysql_query("SET NAMES 'UTF8'"); +} +if ($non_latin > 0) {$rslta=mysql_query("SET NAMES 'UTF8'");} $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[3])) + { + $row[5]=$row[6]; + } + if ($non_latin < 1) + { + $extension = eregi_replace('Local/',"",$row[0]); + $extension = eregi_replace('IAX2/',"",$row[0]); + $extension = sprintf("%-10s", $extension); + while(strlen($extension)>10) {$extension = substr("$extension", 0, -1);} + } + else + { + $extension = eregi_replace('Local/',"",$row[0]); + $extension = eregi_replace('IAX2/',"",$row[0]); + $extension = sprintf("%-40s", $extension); + while(mb_strlen($extension, 'utf-8')>10) {$extension = mb_substr("$extension", 0, -1,'utf8');} + } + + $Luser = $row[1]; + $user = sprintf("%-18s", $row[1]); + $Lsessionid = $row[2]; + $sessionid = sprintf("%-9s", $row[2]); + $Lstatus = $row[3]; + $status = sprintf("%-6s", $row[3]); + $Lserver_ip = $row[4]; + $server_ip = sprintf("%-15s", $row[4]); + $call_server_ip = sprintf("%-15s", $row[7]); + $campaign_id = sprintf("%-10s", $row[8]); + $comments= $row[11]; + + $lead_id = $row[12]; + $user_pass = $row[13]; + + + if (eregi("INCALL",$Lstatus)) + { + if ( (eregi("AUTO",$comments)) or (strlen($comments)<1) ) + {$CM='A';} + else + { + if (eregi("INBOUND",$comments)) + {$CM='I';} + else + {$CM='M';} + } + } + else {$CM=' ';} + + if ($UGdisplay > 0) + { + if ($non_latin < 1) + { + $user_group = sprintf("%-12s", $row[9]); + while(strlen($user_group)>12) {$user_group = substr("$user_group", 0, -1);} + } + else + { + $user_group = sprintf("%-40s", $row[9]); + while(mb_strlen($user_group, 'utf-8')>12) {$user_group = mb_substr("$user_group", 0, -1,'utf8');} + } + } + if ($UidORname > 0) + { + if ($non_latin < 1) + { + $user = sprintf("%-18s", $row[10]); + while(strlen($user)>18) {$user = substr("$user", 0, -1);} + } + else + { + $user = sprintf("%-40s", $row[10]); + while(mb_strlen($user, 'utf-8')>18) {$user = mb_substr("$user", 0, -1,'utf8');} + } + } + if (!eregi("INCALL|QUEUE",$row[3])) + {$call_time_S = ($STARTtime - $row[6]);} + else + {$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 ($Lstatus=='INCALL') + { + if ($call_time_S >= 10) {$G=''; $EG='';} + if ($call_time_M_int >= 1) {$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 >= 30) + {$i++; continue;} + else + { + $agent_paused++; $agent_total++; + $G=''; $EG=''; + if ($call_time_S >= 10) {$G=''; $EG='';} + if ($call_time_M_int >= 1) {$G=''; $EG='';} + if ($call_time_M_int >= 5) {$G=''; $EG='';} + } + } +# 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=''; + if ($call_time_M_int >= 1) {$G=''; $EG='';} + if ($call_time_M_int >= 5) {$G=''; $EG='';} + } + + $L=''; + $R=''; + $LL=''; + $EXTF='6'; + $servip= str_replace('.','',$Lserver_ip); + if ($SIPmonitorLINK>0) {$L=" LISTEN"; $R='';} + if ($IAXmonitorLINK>0) {$L=" LISTEN"; $R='';} + if ($SIPmonitorLINK>1) {$R=" | BARGE";} + if ($IAXmonitorLINK>1) {$R=" | BARGE";} + + + if ($RECmonitorLINK>0) + { + + $stmt="select session_name from web_client_sessions where server_ip ='$server_ip' and extension ='$extension' limit 1;"; + if ($non_latin > 0) {$rslta=mysql_query("SET NAMES 'UTF8'");} + $rslta=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $sess = mysql_num_rows($rslta); + + if ($sess > 0) + { + $row=mysql_fetch_row($rslta); + $sessionname = $row[0]; + } else + { + $sessionname = ""; + } + + + $stmt="select end_time,channel,extension,lead_id,user,server_ip,filename from recording_log where server_ip ='$server_ip' and user ='$Luser';"; + if ($non_latin > 0) {$rslta=mysql_query("SET NAMES 'UTF8'");} + $rslta=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $rec_channels = mysql_num_rows($rslta); + + if ($rec_channels > 0) + { + $ii=0; + while ($ii < $rec_channels) + { + $row=mysql_fetch_row($rslta); + $pos=strpos($row[1], $Lsessionid); + + if ($pos===false) + { + $LL=" Rec "; + } + else + { + if(is_null($row[0])) { + $LL=" Stop"; + } + else + { + $LL=" Rec "; + } + } + + $ii++; + } + } + else + { + $LL=" Rec "; + + } + } + + + if ($UGdisplay > 0) {$UGD = " $G$user_group$EG |";} + else {$UGD = "";} + + if ($SERVdisplay > 0) {$SVD = "$G$server_ip$EG | $G$call_server_ip$EG | ";} + else {$SVD = "";} + + $agentcount++; + + $Aecho .= "| $G$extension$EG | $G$user$EG |$UGD $G$sessionid$EG$L$R | $G$status$EG $CM | $LL | $SVD$G$call_time_MS$EG | $G$campaign_id$EG |\n"; + + $i++; + } + + $Aecho .= "$Aline"; + $Aecho .= " $agentcount agents logged in on all servers\n"; + $Aecho .= " System Load Average: $load_ave\n\n"; + + # $Aecho .= " - Balanced call\n"; + $Aecho .= " - Agent waiting for call\n"; + $Aecho .= " - Agent waiting for call > 1 minute\n"; + $Aecho .= " - Agent waiting for call > 5 minutes\n"; + $Aecho .= " - Agent on call > 10 seconds\n"; + $Aecho .= " - Agent on call > 1 minute\n"; + $Aecho .= " - Agent on call > 5 minutes\n"; + $Aecho .= " - Agent Paused > 10 seconds\n"; + $Aecho .= " - Agent Paused > 1 minute\n"; + $Aecho .= " - Agent Paused > 5 minutes\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_www/vicidial_en/AST_timeonVDADallSUMMARY.php b/agc_2-X/trunk/LANG_www/vicidial_en/AST_timeonVDADallSUMMARY.php index a14194f8..47e1d270 100644 --- a/agc_2-X/trunk/LANG_www/vicidial_en/AST_timeonVDADallSUMMARY.php +++ b/agc_2-X/trunk/LANG_www/vicidial_en/AST_timeonVDADallSUMMARY.php @@ -9,6 +9,8 @@ # # changes: # 61102-1616 - first build +# 61215-1131 - added answered calls and drop percent taken from answered calls +# 70111-1600 - added ability to use BLEND/INBND/*_C/*_B/*_I as closer campaigns # header ("Content-type: text/html; charset=utf-8"); @@ -35,7 +37,7 @@ if (!isset($RR)) {$gRRroup=4;} $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;"; + $stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 6 and view_reports='1';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); @@ -114,7 +116,7 @@ else { echo "- VIEW LESS SETTINGS"; } -echo "       REPORTS"; +echo "       REPORTS"; echo "

\n\n"; $k=0; @@ -128,7 +130,7 @@ $group = $groups[$k]; echo "$group   -   "; echo "Modify\n"; -$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,dial_method,adaptive_maximum_level,adaptive_dropped_percentage,adaptive_dl_diff_target,adaptive_intensity,available_only_ratio_tally,adaptive_latest_server_time,local_call_time,dial_timeout from vicidial_campaigns where campaign_id='" . mysql_real_escape_string($group) . "';"; +$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,dial_method,adaptive_maximum_level,adaptive_dropped_percentage,adaptive_dl_diff_target,adaptive_intensity,available_only_ratio_tally,adaptive_latest_server_time,local_call_time,dial_timeout,dial_statuses from vicidial_campaigns where campaign_id='" . mysql_real_escape_string($group) . "';"; $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $DIALlev = $row[0]; @@ -149,6 +151,9 @@ $ADAavailonly = $row[14]; $TAPERtime = $row[15]; $CALLtime = $row[16]; $DIALtimeout = $row[17]; +$DIALstatuses = $row[18]; + $DIALstatuses = (preg_replace("/ -$|^ /","",$DIALstatuses)); + $DIALstatuses = (ereg_replace(' ',', ',$DIALstatuses)); $stmt="select count(*) from vicidial_hopper where campaign_id='" . mysql_real_escape_string($group) . "';"; $rslt=mysql_query($stmt, $link); @@ -214,7 +219,7 @@ echo "
HOPPER LEVEL:  $HOPlev     DROPPED / ANSWERED:  $dropsTODAY / $answersTODAY   DL DIFF:  $diffONEMIN     STATUSES:  $DIALstatusA, $DIALstatusB, $DIALstatusC, $DIALstatusD, $DIALstatusE     STATUSES:  $DIALstatuses    
"; ################################################################################ ###### OUTBOUND CALLS ################################################################################ -if (eregi("CLOSER",$group)) +if (eregi("(CLOSER|BLEND|INBND|_C$|_B$|_I$)",$group)) { $stmt="select closer_campaigns from vicidial_campaigns where campaign_id='" . mysql_real_escape_string($group) . "';"; $rslt=mysql_query($stmt, $link); @@ -289,7 +294,7 @@ $parked_to_print = mysql_num_rows($rslt); if ($out_live > 9) {$F=''; $FG='';} if ($out_live > 14) {$F=''; $FG='';} - if (eregi("CLOSER",$group)) + if (eregi("(CLOSER|BLEND|INBND|_C$|_B$|_I$)",$group)) {echo "$NFB$out_total$NFE current active calls      \n";} else {echo "$NFB$out_total$NFE calls being placed       \n";} @@ -323,7 +328,7 @@ $talking_to_print = mysql_num_rows($rslt); while ($i < $talking_to_print) { $row=mysql_fetch_row($rslt); - if (eregi("READY|PAUSED",$row[4])) + if (eregi("READY|PAUSED",$row[3])) { $row[5]=$row[6]; } diff --git a/agc_2-X/trunk/LANG_www/vicidial_en/AST_timeonpark.php b/agc_2-X/trunk/LANG_www/vicidial_en/AST_timeonpark.php index 78caf4dc..fd54a333 100644 --- a/agc_2-X/trunk/LANG_www/vicidial_en/AST_timeonpark.php +++ b/agc_2-X/trunk/LANG_www/vicidial_en/AST_timeonpark.php @@ -3,6 +3,11 @@ ### ### Copyright (C) 2006 Matt Florell 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"); @@ -18,6 +23,23 @@ if (isset($_GET["submit"])) {$submit=$_GET["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 and view_reports='1';"; + 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); @@ -67,7 +89,7 @@ echo"VICIDIAL: Time On Park\n"; echo "
\n\n";
 
-echo "VICIDIAL: Time On Park                       $NOW_TIME\n\n";
+echo "VICIDIAL: Time On Park         $NOW_TIME    REPORTS\n\n";
 echo "+------------+-----------------+---------------------+---------+\n";
 echo "| CHANNEL    | GROUP           | START TIME          | MINUTES |\n";
 echo "+------------+-----------------+---------------------+---------+\n";
@@ -76,7 +98,7 @@ echo "+------------+-----------------+---------------------+---------+\n";
 # $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;";
+$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);
@@ -138,7 +160,7 @@ echo "| STATION    | USER   | CHANNEL    | GROUP           | START TIME
 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;";
+$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);
diff --git a/agc_2-X/trunk/LANG_www/vicidial_en/admin.php b/agc_2-X/trunk/LANG_www/vicidial_en/admin.php
index ee46df35..f82ea5f8 100644
--- a/agc_2-X/trunk/LANG_www/vicidial_en/admin.php
+++ b/agc_2-X/trunk/LANG_www/vicidial_en/admin.php
@@ -1,9037 +1,10721 @@
-    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["active"]))	{$active=$_GET["active"];}
-	elseif (isset($_POST["active"]))	{$active=$_POST["active"];}
-if (isset($_GET["adaptive_dl_diff_target"]))	{$adaptive_dl_diff_target=$_GET["adaptive_dl_diff_target"];}
-	elseif (isset($_POST["adaptive_dl_diff_target"]))	{$adaptive_dl_diff_target=$_POST["adaptive_dl_diff_target"];}
-if (isset($_GET["adaptive_dropped_percentage"]))	{$adaptive_dropped_percentage=$_GET["adaptive_dropped_percentage"];}
-	elseif (isset($_POST["adaptive_dropped_percentage"])){$adaptive_dropped_percentage=$_POST["adaptive_dropped_percentage"];}
-if (isset($_GET["adaptive_intensity"]))	{$adaptive_intensity=$_GET["adaptive_intensity"];}
-	elseif (isset($_POST["adaptive_intensity"]))	{$adaptive_intensity=$_POST["adaptive_intensity"];}
-if (isset($_GET["adaptive_latest_server_time"]))	{$adaptive_latest_server_time=$_GET["adaptive_latest_server_time"];}
-	elseif (isset($_POST["adaptive_latest_server_time"])){$adaptive_latest_server_time=$_POST["adaptive_latest_server_time"];}
-if (isset($_GET["adaptive_maximum_level"]))	{$adaptive_maximum_level=$_GET["adaptive_maximum_level"];}
-	elseif (isset($_POST["adaptive_maximum_level"]))	{$adaptive_maximum_level=$_POST["adaptive_maximum_level"];}
-if (isset($_GET["ADD"]))	{$ADD=$_GET["ADD"];}
-	elseif (isset($_POST["ADD"]))	{$ADD=$_POST["ADD"];}
-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["AFLogging_enabled"]))	{$AFLogging_enabled=$_GET["AFLogging_enabled"];}
-	elseif (isset($_POST["AFLogging_enabled"]))	{$AFLogging_enabled=$_POST["AFLogging_enabled"];}
-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["agentcall_manual"]))	{$agentcall_manual=$_GET["agentcall_manual"];}
-	elseif (isset($_POST["agentcall_manual"]))	{$agentcall_manual=$_POST["agentcall_manual"];}
-if (isset($_GET["agentonly_callbacks"]))	{$agentonly_callbacks=$_GET["agentonly_callbacks"];}
-	elseif (isset($_POST["agentonly_callbacks"]))	{$agentonly_callbacks=$_POST["agentonly_callbacks"];}
-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["agi_output"]))	{$agi_output=$_GET["agi_output"];}
-	elseif (isset($_POST["agi_output"]))	{$agi_output=$_POST["agi_output"];}
-if (isset($_GET["allcalls_delay"]))	{$allcalls_delay=$_GET["allcalls_delay"];}
-	elseif (isset($_POST["allcalls_delay"]))	{$allcalls_delay=$_POST["allcalls_delay"];}
-if (isset($_GET["allow_closers"]))	{$allow_closers=$_GET["allow_closers"];}
-	elseif (isset($_POST["allow_closers"]))	{$allow_closers=$_POST["allow_closers"];}
-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["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["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["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["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["asterisk_version"]))	{$asterisk_version=$_GET["asterisk_version"];}
-	elseif (isset($_POST["asterisk_version"]))	{$asterisk_version=$_POST["asterisk_version"];}
-if (isset($_GET["ASTmgrSECRET"]))	{$ASTmgrSECRET=$_GET["ASTmgrSECRET"];}
-	elseif (isset($_POST["ASTmgrSECRET"]))	{$ASTmgrSECRET=$_POST["ASTmgrSECRET"];}
-if (isset($_GET["ASTmgrUSERNAME"]))	{$ASTmgrUSERNAME=$_GET["ASTmgrUSERNAME"];}
-	elseif (isset($_POST["ASTmgrUSERNAME"]))	{$ASTmgrUSERNAME=$_POST["ASTmgrUSERNAME"];}
-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["ASTmgrUSERNAMEupdate"]))	{$ASTmgrUSERNAMEupdate=$_GET["ASTmgrUSERNAMEupdate"];}
-	elseif (isset($_POST["ASTmgrUSERNAMEupdate"]))	{$ASTmgrUSERNAMEupdate=$_POST["ASTmgrUSERNAMEupdate"];}
-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($_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["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["available_only_ratio_tally"]))	{$available_only_ratio_tally=$_GET["available_only_ratio_tally"];}
-	elseif (isset($_POST["available_only_ratio_tally"])){$available_only_ratio_tally=$_POST["available_only_ratio_tally"];}
-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["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["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["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["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["campaign_cid"]))	{$campaign_cid=$_GET["campaign_cid"];}
-	elseif (isset($_POST["campaign_cid"]))	{$campaign_cid=$_POST["campaign_cid"];}
-if (isset($_GET["campaign_detail"]))	{$campaign_detail=$_GET["campaign_detail"];}
-	elseif (isset($_POST["campaign_detail"]))	{$campaign_detail=$_POST["campaign_detail"];}
-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["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_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["campaign_recording"]))	{$campaign_recording=$_GET["campaign_recording"];}
-	elseif (isset($_POST["campaign_recording"]))	{$campaign_recording=$_POST["campaign_recording"];}
-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["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["client_browser"]))	{$client_browser=$_GET["client_browser"];}
-	elseif (isset($_POST["client_browser"]))	{$client_browser=$_POST["client_browser"];}
-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["company"]))	{$company=$_GET["company"];}
-	elseif (isset($_POST["company"]))	{$company=$_POST["company"];}
-if (isset($_GET["computer_ip"]))	{$computer_ip=$_GET["computer_ip"];}
-	elseif (isset($_POST["computer_ip"]))	{$computer_ip=$_POST["computer_ip"];}
-if (isset($_GET["conf_exten"]))	{$conf_exten=$_GET["conf_exten"];}
-	elseif (isset($_POST["conf_exten"]))	{$conf_exten=$_POST["conf_exten"];}
-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["conferencing_enabled"]))	{$conferencing_enabled=$_GET["conferencing_enabled"];}
-	elseif (isset($_POST["conferencing_enabled"]))	{$conferencing_enabled=$_POST["conferencing_enabled"];}
-if (isset($_GET["CoNfIrM"]))	{$CoNfIrM=$_GET["CoNfIrM"];}
-	elseif (isset($_POST["CoNfIrM"]))	{$CoNfIrM=$_POST["CoNfIrM"];}
-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_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_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_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["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_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_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["DBX_database"]))	{$DBX_database=$_GET["DBX_database"];}
-	elseif (isset($_POST["DBX_database"]))	{$DBX_database=$_POST["DBX_database"];}
-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["DBX_server"]))	{$DBX_server=$_GET["DBX_server"];}
-	elseif (isset($_POST["DBX_server"]))	{$DBX_server=$_POST["DBX_server"];}
-if (isset($_GET["DBX_user"]))	{$DBX_user=$_GET["DBX_user"];}
-	elseif (isset($_POST["DBX_user"]))	{$DBX_user=$_POST["DBX_user"];}
-if (isset($_GET["DBY_database"]))	{$DBY_database=$_GET["DBY_database"];}
-	elseif (isset($_POST["DBY_database"]))	{$DBY_database=$_POST["DBY_database"];}
-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["DBY_server"]))	{$DBY_server=$_GET["DBY_server"];}
-	elseif (isset($_POST["DBY_server"]))	{$DBY_server=$_POST["DBY_server"];}
-if (isset($_GET["DBY_user"]))	{$DBY_user=$_GET["DBY_user"];}
-	elseif (isset($_POST["DBY_user"]))	{$DBY_user=$_POST["DBY_user"];}
-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["delete_campaigns"]))	{$delete_campaigns=$_GET["delete_campaigns"];}
-	elseif (isset($_POST["delete_campaigns"]))	{$delete_campaigns=$_POST["delete_campaigns"];}
-if (isset($_GET["delete_filters"]))	{$delete_filters=$_GET["delete_filters"];}
-	elseif (isset($_POST["delete_filters"]))	{$delete_filters=$_POST["delete_filters"];}
-if (isset($_GET["delete_ingroups"]))	{$delete_ingroups=$_GET["delete_ingroups"];}
-	elseif (isset($_POST["delete_ingroups"]))	{$delete_ingroups=$_POST["delete_ingroups"];}
-if (isset($_GET["delete_lists"]))	{$delete_lists=$_GET["delete_lists"];}
-	elseif (isset($_POST["delete_lists"]))	{$delete_lists=$_POST["delete_lists"];}
-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["delete_scripts"]))	{$delete_scripts=$_GET["delete_scripts"];}
-	elseif (isset($_POST["delete_scripts"]))	{$delete_scripts=$_POST["delete_scripts"];}
-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_users"]))	{$delete_users=$_GET["delete_users"];}
-	elseif (isset($_POST["delete_users"]))	{$delete_users=$_POST["delete_users"];}
-if (isset($_GET["dial_method"]))	{$dial_method=$_GET["dial_method"];}
-	elseif (isset($_POST["dial_method"]))	{$dial_method=$_POST["dial_method"];}
-if (isset($_GET["dial_prefix"]))	{$dial_prefix=$_GET["dial_prefix"];}
-	elseif (isset($_POST["dial_prefix"]))	{$dial_prefix=$_POST["dial_prefix"];}
-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["dial_timeout"]))	{$dial_timeout=$_GET["dial_timeout"];}
-	elseif (isset($_POST["dial_timeout"]))	{$dial_timeout=$_POST["dial_timeout"];}
-if (isset($_GET["dialplan_number"]))	{$dialplan_number=$_GET["dialplan_number"];}
-	elseif (isset($_POST["dialplan_number"]))	{$dialplan_number=$_POST["dialplan_number"];}
-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["drop_exten"]))	{$drop_exten=$_GET["drop_exten"];}
-	elseif (isset($_POST["drop_exten"]))	{$drop_exten=$_POST["drop_exten"];}
-if (isset($_GET["drop_message"]))	{$drop_message=$_GET["drop_message"];}
-	elseif (isset($_POST["drop_message"]))	{$drop_message=$_POST["drop_message"];}
-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["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["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["ext_context"]))	{$ext_context=$_GET["ext_context"];}
-	elseif (isset($_POST["ext_context"]))	{$ext_context=$_POST["ext_context"];}
-if (isset($_GET["extension"]))	{$extension=$_GET["extension"];}
-	elseif (isset($_POST["extension"]))	{$extension=$_POST["extension"];}
-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["force_logout"]))	{$force_logout=$_GET["force_logout"];}
-	elseif (isset($_POST["force_logout"]))	{$force_logout=$_POST["force_logout"];}
-if (isset($_GET["fronter_display"]))	{$fronter_display=$_GET["fronter_display"];}
-	elseif (isset($_POST["fronter_display"]))	{$fronter_display=$_POST["fronter_display"];}
-if (isset($_GET["full_name"]))	{$full_name=$_GET["full_name"];}
-	elseif (isset($_POST["full_name"]))	{$full_name=$_POST["full_name"];}
-if (isset($_GET["fullname"]))	{$fullname=$_GET["fullname"];}
-	elseif (isset($_POST["fullname"]))	{$fullname=$_POST["fullname"];}
-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["group_color"]))	{$group_color=$_GET["group_color"];}
-	elseif (isset($_POST["group_color"]))	{$group_color=$_POST["group_color"];}
-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["groups"]))	{$groups=$_GET["groups"];}
-	elseif (isset($_POST["groups"]))	{$groups=$_POST["groups"];}
-if (isset($_GET["HKstatus"]))	{$HKstatus=$_GET["HKstatus"];}
-	elseif (isset($_POST["HKstatus"]))	{$HKstatus=$_POST["HKstatus"];}
-if (isset($_GET["hopper_level"]))	{$hopper_level=$_GET["hopper_level"];}
-	elseif (isset($_POST["hopper_level"]))	{$hopper_level=$_POST["hopper_level"];}
-if (isset($_GET["hotkey"]))	{$hotkey=$_GET["hotkey"];}
-	elseif (isset($_POST["hotkey"]))	{$hotkey=$_POST["hotkey"];}
-if (isset($_GET["hotkeys_active"]))	{$hotkeys_active=$_GET["hotkeys_active"];}
-	elseif (isset($_POST["hotkeys_active"]))	{$hotkeys_active=$_POST["hotkeys_active"];}
-if (isset($_GET["install_directory"]))	{$install_directory=$_GET["install_directory"];}
-	elseif (isset($_POST["install_directory"]))	{$install_directory=$_POST["install_directory"];}
-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_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_sql"]))	{$lead_filter_sql=$_GET["lead_filter_sql"];}
-	elseif (isset($_POST["lead_filter_sql"]))	{$lead_filter_sql=$_POST["lead_filter_sql"];}
-if (isset($_GET["lead_order"]))	{$lead_order=$_GET["lead_order"];}
-	elseif (isset($_POST["lead_order"]))	{$lead_order=$_POST["lead_order"];}
-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["load_leads"]))	{$load_leads=$_GET["load_leads"];}
-	elseif (isset($_POST["load_leads"]))	{$load_leads=$_POST["load_leads"];}
-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["local_gmt"]))	{$local_gmt=$_GET["local_gmt"];}
-	elseif (isset($_POST["local_gmt"]))	{$local_gmt=$_POST["local_gmt"];}
-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["login"]))	{$login=$_GET["login"];}
-	elseif (isset($_POST["login"]))	{$login=$_POST["login"];}
-if (isset($_GET["login_campaign"]))	{$login_campaign=$_GET["login_campaign"];}
-	elseif (isset($_POST["login_campaign"]))	{$login_campaign=$_POST["login_campaign"];}
-if (isset($_GET["login_pass"]))	{$login_pass=$_GET["login_pass"];}
-	elseif (isset($_POST["login_pass"]))	{$login_pass=$_POST["login_pass"];}
-if (isset($_GET["login_user"]))	{$login_user=$_GET["login_user"];}
-	elseif (isset($_POST["login_user"]))	{$login_user=$_POST["login_user"];}
-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["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["modify_leads"]))	{$modify_leads=$_GET["modify_leads"];}
-	elseif (isset($_POST["modify_leads"]))	{$modify_leads=$_POST["modify_leads"];}
-if (isset($_GET["monitor_prefix"]))	{$monitor_prefix=$_GET["monitor_prefix"];}
-	elseif (isset($_POST["monitor_prefix"]))	{$monitor_prefix=$_POST["monitor_prefix"];}
-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["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["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["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["old_extension"]))	{$old_extension=$_GET["old_extension"];}
-	elseif (isset($_POST["old_extension"]))	{$old_extension=$_POST["old_extension"];}
-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["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["OLDuser_group"]))	{$OLDuser_group=$_GET["OLDuser_group"];}
-	elseif (isset($_POST["OLDuser_group"]))	{$OLDuser_group=$_POST["OLDuser_group"];}
-if (isset($_GET["omit_phone_code"]))	{$omit_phone_code=$_GET["omit_phone_code"];}
-	elseif (isset($_POST["omit_phone_code"]))	{$omit_phone_code=$_POST["omit_phone_code"];}
-if (isset($_GET["outbound_cid"]))	{$outbound_cid=$_GET["outbound_cid"];}
-	elseif (isset($_POST["outbound_cid"]))	{$outbound_cid=$_POST["outbound_cid"];}
-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["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["pass"]))	{$pass=$_GET["pass"];}
-	elseif (isset($_POST["pass"]))	{$pass=$_POST["pass"];}
-if (isset($_GET["phone_ip"]))	{$phone_ip=$_GET["phone_ip"];}
-	elseif (isset($_POST["phone_ip"]))	{$phone_ip=$_POST["phone_ip"];}
-if (isset($_GET["phone_login"]))	{$phone_login=$_GET["phone_login"];}
-	elseif (isset($_POST["phone_login"]))	{$phone_login=$_POST["phone_login"];}
-if (isset($_GET["phone_number"]))	{$phone_number=$_GET["phone_number"];}
-	elseif (isset($_POST["phone_number"]))	{$phone_number=$_POST["phone_number"];}
-if (isset($_GET["phone_pass"]))	{$phone_pass=$_GET["phone_pass"];}
-	elseif (isset($_POST["phone_pass"]))	{$phone_pass=$_POST["phone_pass"];}
-if (isset($_GET["phone_type"]))	{$phone_type=$_GET["phone_type"];}
-	elseif (isset($_POST["phone_type"]))	{$phone_type=$_POST["phone_type"];}
-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["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["recording_exten"]))	{$recording_exten=$_GET["recording_exten"];}
-	elseif (isset($_POST["recording_exten"]))	{$recording_exten=$_POST["recording_exten"];}
-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["reset_hopper"]))	{$reset_hopper=$_GET["reset_hopper"];}
-	elseif (isset($_POST["reset_hopper"]))	{$reset_hopper=$_POST["reset_hopper"];}
-if (isset($_GET["reset_list"]))	{$reset_list=$_GET["reset_list"];}
-	elseif (isset($_POST["reset_list"]))	{$reset_list=$_POST["reset_list"];}
-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["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["scheduled_callbacks"]))	{$scheduled_callbacks=$_GET["scheduled_callbacks"];}
-	elseif (isset($_POST["scheduled_callbacks"]))	{$scheduled_callbacks=$_POST["scheduled_callbacks"];}
-if (isset($_GET["script_comments"]))	{$script_comments=$_GET["script_comments"];}
-	elseif (isset($_POST["script_comments"]))	{$script_comments=$_POST["script_comments"];}
-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_text"]))	{$script_text=$_GET["script_text"];}
-	elseif (isset($_POST["script_text"]))	{$script_text=$_POST["script_text"];}
-if (isset($_GET["selectable"]))	{$selectable=$_GET["selectable"];}
-	elseif (isset($_POST["selectable"]))	{$selectable=$_POST["selectable"];}
-if (isset($_GET["server_description"]))	{$server_description=$_GET["server_description"];}
-	elseif (isset($_POST["server_description"]))	{$server_description=$_POST["server_description"];}
-if (isset($_GET["server_id"]))	{$server_id=$_GET["server_id"];}
-	elseif (isset($_POST["server_id"]))	{$server_id=$_POST["server_id"];}
-if (isset($_GET["server_ip"]))	{$server_ip=$_GET["server_ip"];}
-	elseif (isset($_POST["server_ip"]))	{$server_ip=$_POST["server_ip"];}
-if (isset($_GET["stage"]))	{$stage=$_GET["stage"];}
-	elseif (isset($_POST["stage"]))	{$stage=$_POST["stage"];}
-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["status"]))	{$status=$_GET["status"];}
-	elseif (isset($_POST["status"]))	{$status=$_POST["status"];}
-if (isset($_GET["status_name"]))	{$status_name=$_GET["status_name"];}
-	elseif (isset($_POST["status_name"]))	{$status_name=$_POST["status_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"];}
-if (isset($_GET["sys_perf_log"]))	{$sys_perf_log=$_GET["sys_perf_log"];}
-	elseif (isset($_POST["sys_perf_log"]))	{$sys_perf_log=$_POST["sys_perf_log"];}
-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["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["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["user"]))	{$user=$_GET["user"];}
-	elseif (isset($_POST["user"]))	{$user=$_POST["user"];}
-if (isset($_GET["user_group"]))	{$user_group=$_GET["user_group"];}
-	elseif (isset($_POST["user_group"]))	{$user_group=$_POST["user_group"];}
-if (isset($_GET["user_level"]))	{$user_level=$_GET["user_level"];}
-	elseif (isset($_POST["user_level"]))	{$user_level=$_POST["user_level"];}
-if (isset($_GET["user_start"]))	{$user_start=$_GET["user_start"];}
-	elseif (isset($_POST["user_start"]))	{$user_start=$_POST["user_start"];}
-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["vd_server_logs"]))	{$vd_server_logs=$_GET["vd_server_logs"];}
-	elseif (isset($_POST["vd_server_logs"]))	{$vd_server_logs=$_POST["vd_server_logs"];}
-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["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["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["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["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["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["voicemail_ext"]))	{$voicemail_ext=$_GET["voicemail_ext"];}
-	elseif (isset($_POST["voicemail_ext"]))	{$voicemail_ext=$_POST["voicemail_ext"];}
-if (isset($_GET["voicemail_exten"]))	{$voicemail_exten=$_GET["voicemail_exten"];}
-	elseif (isset($_POST["voicemail_exten"]))	{$voicemail_exten=$_POST["voicemail_exten"];}
-if (isset($_GET["voicemail_id"]))	{$voicemail_id=$_GET["voicemail_id"];}
-	elseif (isset($_POST["voicemail_id"]))	{$voicemail_id=$_POST["voicemail_id"];}
-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["wrapup_message"]))	{$wrapup_message=$_GET["wrapup_message"];}
-	elseif (isset($_POST["wrapup_message"]))	{$wrapup_message=$_POST["wrapup_message"];}
-if (isset($_GET["wrapup_seconds"]))	{$wrapup_seconds=$_GET["wrapup_seconds"];}
-	elseif (isset($_POST["wrapup_seconds"]))	{$wrapup_seconds=$_POST["wrapup_seconds"];}
-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["vicidial_balance_active"]))	{$vicidial_balance_active=$_GET["vicidial_balance_active"];}
-	elseif (isset($_POST["vicidial_balance_active"]))	{$vicidial_balance_active=$_POST["vicidial_balance_active"];}
-if (isset($_GET["balance_trunks_offlimits"]))	{$balance_trunks_offlimits=$_GET["balance_trunks_offlimits"];}
-	elseif (isset($_POST["balance_trunks_offlimits"]))	{$balance_trunks_offlimits=$_POST["balance_trunks_offlimits"];}
-if (isset($_GET["dedicated_trunks"]))	{$dedicated_trunks=$_GET["dedicated_trunks"];}
-	elseif (isset($_POST["dedicated_trunks"]))	{$dedicated_trunks=$_POST["dedicated_trunks"];}
-if (isset($_GET["trunk_restriction"]))	{$trunk_restriction=$_GET["trunk_restriction"];}
-	elseif (isset($_POST["trunk_restriction"]))	{$trunk_restriction=$_POST["trunk_restriction"];}
-if (isset($_GET["campaigns"]))	{$campaigns=$_GET["campaigns"];}
-	elseif (isset($_POST["campaigns"]))	{$campaigns=$_POST["campaigns"];}
-
-
-
-
-	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 ###
-$adaptive_dropped_percentage = ereg_replace("[^0-9]","",$adaptive_dropped_percentage);
-$adaptive_latest_server_time = ereg_replace("[^0-9]","",$adaptive_latest_server_time);
-$admin_hangup_enabled = ereg_replace("[^0-9]","",$admin_hangup_enabled);
-$admin_hijack_enabled = ereg_replace("[^0-9]","",$admin_hijack_enabled);
-$admin_monitor_enabled = ereg_replace("[^0-9]","",$admin_monitor_enabled);
-$AFLogging_enabled = ereg_replace("[^0-9]","",$AFLogging_enabled);
-$agent_choose_ingroups = ereg_replace("[^0-9]","",$agent_choose_ingroups);
-$agentcall_manual = ereg_replace("[^0-9]","",$agentcall_manual);
-$agentonly_callbacks = ereg_replace("[^0-9]","",$agentonly_callbacks);
-$AGI_call_logging_enabled = ereg_replace("[^0-9]","",$AGI_call_logging_enabled);
-$allcalls_delay = ereg_replace("[^0-9]","",$allcalls_delay);
-$alter_agent_interface_options = ereg_replace("[^0-9]","",$alter_agent_interface_options);
-$am_message_exten = ereg_replace("[^0-9]","",$am_message_exten);
-$answer_transfer_agent = ereg_replace("[^0-9]","",$answer_transfer_agent);
-$ast_admin_access = ereg_replace("[^0-9]","",$ast_admin_access);
-$ast_delete_phones = ereg_replace("[^0-9]","",$ast_delete_phones);
-$attempt_delay = ereg_replace("[^0-9]","",$attempt_delay);
-$attempt_maximum = ereg_replace("[^0-9]","",$attempt_maximum);
-$auto_dial_next_number = ereg_replace("[^0-9]","",$auto_dial_next_number);
-$balance_trunks_offlimits = ereg_replace("[^0-9]","",$balance_trunks_offlimits);
-$call_parking_enabled = ereg_replace("[^0-9]","",$call_parking_enabled);
-$CallerID_popup_enabled = ereg_replace("[^0-9]","",$CallerID_popup_enabled);
-$campaign_detail = ereg_replace("[^0-9]","",$campaign_detail);
-$campaign_rec_exten = ereg_replace("[^0-9]","",$campaign_rec_exten);
-$campaign_vdad_exten = ereg_replace("[^0-9]","",$campaign_vdad_exten);
-$change_agent_campaign = ereg_replace("[^0-9]","",$change_agent_campaign);
-$closer_default_blended = ereg_replace("[^0-9]","",$closer_default_blended);
-$conf_exten = ereg_replace("[^0-9]","",$conf_exten);
-$conf_on_extension = ereg_replace("[^0-9]","",$conf_on_extension);
-$conferencing_enabled = ereg_replace("[^0-9]","",$conferencing_enabled);
-$ct_default_start = ereg_replace("[^0-9]","",$ct_default_start);
-$ct_default_stop = ereg_replace("[^0-9]","",$ct_default_stop);
-$ct_friday_start = ereg_replace("[^0-9]","",$ct_friday_start);
-$ct_friday_stop = ereg_replace("[^0-9]","",$ct_friday_stop);
-$ct_monday_start = ereg_replace("[^0-9]","",$ct_monday_start);
-$ct_monday_stop = ereg_replace("[^0-9]","",$ct_monday_stop);
-$ct_saturday_start = ereg_replace("[^0-9]","",$ct_saturday_start);
-$ct_saturday_stop = ereg_replace("[^0-9]","",$ct_saturday_stop);
-$ct_sunday_start = ereg_replace("[^0-9]","",$ct_sunday_start);
-$ct_sunday_stop = ereg_replace("[^0-9]","",$ct_sunday_stop);
-$ct_thursday_start = ereg_replace("[^0-9]","",$ct_thursday_start);
-$ct_thursday_stop = ereg_replace("[^0-9]","",$ct_thursday_stop);
-$ct_tuesday_start = ereg_replace("[^0-9]","",$ct_tuesday_start);
-$ct_tuesday_stop = ereg_replace("[^0-9]","",$ct_tuesday_stop);
-$ct_wednesday_start = ereg_replace("[^0-9]","",$ct_wednesday_start);
-$ct_wednesday_stop = ereg_replace("[^0-9]","",$ct_wednesday_stop);
-$DBX_port = ereg_replace("[^0-9]","",$DBX_port);
-$DBY_port = ereg_replace("[^0-9]","",$DBY_port);
-$dedicated_trunks = ereg_replace("[^0-9]","",$dedicated_trunks);
-$delete_call_times = ereg_replace("[^0-9]","",$delete_call_times);
-$delete_campaigns = ereg_replace("[^0-9]","",$delete_campaigns);
-$delete_filters = ereg_replace("[^0-9]","",$delete_filters);
-$delete_ingroups = ereg_replace("[^0-9]","",$delete_ingroups);
-$delete_lists = ereg_replace("[^0-9]","",$delete_lists);
-$delete_remote_agents = ereg_replace("[^0-9]","",$delete_remote_agents);
-$delete_scripts = ereg_replace("[^0-9]","",$delete_scripts);
-$delete_user_groups = ereg_replace("[^0-9]","",$delete_user_groups);
-$delete_users = ereg_replace("[^0-9]","",$delete_users);
-$dial_timeout = ereg_replace("[^0-9]","",$dial_timeout);
-$dialplan_number = ereg_replace("[^0-9]","",$dialplan_number);
-$drop_call_seconds = ereg_replace("[^0-9]","",$drop_call_seconds);
-$drop_exten = ereg_replace("[^0-9]","",$drop_exten);
-$enable_fast_refresh = ereg_replace("[^0-9]","",$enable_fast_refresh);
-$enable_persistant_mysql = ereg_replace("[^0-9]","",$enable_persistant_mysql);
-$fast_refresh_rate = ereg_replace("[^0-9]","",$fast_refresh_rate);
-$hopper_level = ereg_replace("[^0-9]","",$hopper_level);
-$hotkey = ereg_replace("[^0-9]","",$hotkey);
-$hotkeys_active = ereg_replace("[^0-9]","",$hotkeys_active);
-$list_id = ereg_replace("[^0-9]","",$list_id);
-$load_leads = ereg_replace("[^0-9]","",$delete_call_times);
-$max_vicidial_trunks = ereg_replace("[^0-9]","",$max_vicidial_trunks);
-$modify_call_times = ereg_replace("[^0-9]","",$modify_call_times);
-$modify_leads = ereg_replace("[^0-9]","",$modify_leads);
-$monitor_prefix = ereg_replace("[^0-9]","",$monitor_prefix);
-$number_of_lines = ereg_replace("[^0-9]","",$number_of_lines);
-$old_conf_exten = ereg_replace("[^0-9]","",$old_conf_exten);
-$outbound_cid = ereg_replace("[^0-9]","",$outbound_cid);
-$park_ext = ereg_replace("[^0-9]","",$park_ext);
-$park_on_extension = ereg_replace("[^0-9]","",$park_on_extension);
-$phone_number = ereg_replace("[^0-9]","",$phone_number);
-$QUEUE_ACTION_enabled = ereg_replace("[^0-9]","",$QUEUE_ACTION_enabled);
-$recording_exten = ereg_replace("[^0-9]","",$recording_exten);
-$remote_agent_id = ereg_replace("[^0-9]","",$remote_agent_id);
-$safe_harbor_exten = ereg_replace("[^0-9]","",$safe_harbor_exten);
-$telnet_port = ereg_replace("[^0-9]","",$telnet_port);
-$updater_check_enabled = ereg_replace("[^0-9]","",$updater_check_enabled);
-$user_level = ereg_replace("[^0-9]","",$user_level);
-$user_start = ereg_replace("[^0-9]","",$user_start);
-$user_switching_enabled = ereg_replace("[^0-9]","",$user_switching_enabled);
-$VDstop_rec_after_each_call = ereg_replace("[^0-9]","",$VDstop_rec_after_each_call);
-$VICIDIAL_park_on_extension = ereg_replace("[^0-9]","",$VICIDIAL_park_on_extension);
-$vicidial_recording = ereg_replace("[^0-9]","",$vicidial_recording);
-$vicidial_transfers = ereg_replace("[^0-9]","",$vicidial_transfers);
-$voicemail_button_enabled = ereg_replace("[^0-9]","",$voicemail_button_enabled);
-$voicemail_dump_exten = ereg_replace("[^0-9]","",$voicemail_dump_exten);
-$voicemail_ext = ereg_replace("[^0-9]","",$voicemail_ext);
-$voicemail_exten = ereg_replace("[^0-9]","",$voicemail_exten);
-$voicemail_id = ereg_replace("[^0-9]","",$voicemail_id);
-$wrapup_seconds = ereg_replace("[^0-9]","",$wrapup_seconds);
-
-### 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);
-$omit_phone_code = ereg_replace("[^NY]","",$omit_phone_code);
-$available_only_ratio_tally = ereg_replace("[^NY]","",$available_only_ratio_tally);
-$sys_perf_log = ereg_replace("[^NY]","",$sys_perf_log);
-$vicidial_balance_active = ereg_replace("[^NY]","",$vicidial_balance_active);
-$vd_server_logs = ereg_replace("[^NY]","",$vd_server_logs);
-
-### ALPHA-NUMERIC ONLY ###
-$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);
-$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);
-$adaptive_maximum_level = ereg_replace("[^\.0-9]","",$adaptive_maximum_level);
-$phone_ip = ereg_replace("[^\.0-9]","",$phone_ip);
-$old_server_ip = ereg_replace("[^\.0-9]","",$old_server_ip);
-$computer_ip = ereg_replace("[^\.0-9]","",$computer_ip);
-
-### ALPHA-NUMERIC and spaces and hash and star and comma
-$xferconf_a_dtmf = ereg_replace("[^ \,\*\#0-9a-zA-Z]","",$xferconf_a_dtmf);
-$xferconf_b_dtmf = ereg_replace("[^ \,\*\#0-9a-zA-Z]","",$xferconf_b_dtmf);
-
-### ALPHACAPS-NUMERIC
-$xferconf_a_number = ereg_replace("[^0-9A-Z]","",$xferconf_a_number);
-$xferconf_b_number = ereg_replace("[^0-9A-Z]","",$xferconf_b_number);
-
-### ALPHA-NUMERIC and underscore and dash
-$agi_output = ereg_replace("[^-\_0-9a-zA-Z]","",$agi_output);
-$ASTmgrSECRET = ereg_replace("[^-\_0-9a-zA-Z]","",$ASTmgrSECRET);
-$ASTmgrUSERNAME = ereg_replace("[^-\_0-9a-zA-Z]","",$ASTmgrUSERNAME);
-$ASTmgrUSERNAMElisten = ereg_replace("[^-\_0-9a-zA-Z]","",$ASTmgrUSERNAMElisten);
-$ASTmgrUSERNAMEsend = ereg_replace("[^-\_0-9a-zA-Z]","",$ASTmgrUSERNAMEsend);
-$ASTmgrUSERNAMEupdate = ereg_replace("[^-\_0-9a-zA-Z]","",$ASTmgrUSERNAMEupdate);
-$call_time_id = ereg_replace("[^-\_0-9a-zA-Z]","",$call_time_id);
-$campaign_id = ereg_replace("[^-\_0-9a-zA-Z]","",$campaign_id);
-$CoNfIrM = ereg_replace("[^-\_0-9a-zA-Z]","",$CoNfIrM);
-$DBX_database = ereg_replace("[^-\_0-9a-zA-Z]","",$DBX_database);
-$DBX_pass = ereg_replace("[^-\_0-9a-zA-Z]","",$DBX_pass);
-$DBX_user = ereg_replace("[^-\_0-9a-zA-Z]","",$DBX_user);
-$DBY_database = ereg_replace("[^-\_0-9a-zA-Z]","",$DBY_database);
-$DBY_pass = ereg_replace("[^-\_0-9a-zA-Z]","",$DBY_pass);
-$DBY_user = ereg_replace("[^-\_0-9a-zA-Z]","",$DBY_user);
-$dial_method = ereg_replace("[^-\_0-9a-zA-Z]","",$dial_method);
-$dial_status_a = ereg_replace("[^-\_0-9a-zA-Z]","",$dial_status_a);
-$dial_status_b = ereg_replace("[^-\_0-9a-zA-Z]","",$dial_status_b);
-$dial_status_c = ereg_replace("[^-\_0-9a-zA-Z]","",$dial_status_c);
-$dial_status_d = ereg_replace("[^-\_0-9a-zA-Z]","",$dial_status_d);
-$dial_status_e = ereg_replace("[^-\_0-9a-zA-Z]","",$dial_status_e);
-$ext_context = ereg_replace("[^-\_0-9a-zA-Z]","",$ext_context);
-$group_id = ereg_replace("[^-\_0-9a-zA-Z]","",$group_id);
-$lead_filter_id = ereg_replace("[^-\_0-9a-zA-Z]","",$lead_filter_id);
-$local_call_time = ereg_replace("[^-\_0-9a-zA-Z]","",$local_call_time);
-$login = ereg_replace("[^-\_0-9a-zA-Z]","",$login);
-$login_campaign = ereg_replace("[^-\_0-9a-zA-Z]","",$login_campaign);
-$login_pass = ereg_replace("[^-\_0-9a-zA-Z]","",$login_pass);
-$login_user = ereg_replace("[^-\_0-9a-zA-Z]","",$login_user);
-$next_agent_call = ereg_replace("[^-\_0-9a-zA-Z]","",$next_agent_call);
-$old_campaign_id = ereg_replace("[^-\_0-9a-zA-Z]","",$old_campaign_id);
-$old_server_id = ereg_replace("[^-\_0-9a-zA-Z]","",$old_server_id);
-$OLDuser_group = ereg_replace("[^-\_0-9a-zA-Z]","",$OLDuser_group);
-$park_file_name = ereg_replace("[^-\_0-9a-zA-Z]","",$park_file_name);
-$pass = ereg_replace("[^-\_0-9a-zA-Z]","",$pass);
-$phone_login = ereg_replace("[^-\_0-9a-zA-Z]","",$phone_login);
-$phone_pass = ereg_replace("[^-\_0-9a-zA-Z]","",$phone_pass);
-$PHP_AUTH_PW = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_PW);
-$PHP_AUTH_USER = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_USER);
-$protocol = ereg_replace("[^-\_0-9a-zA-Z]","",$protocol);
-$server_id = ereg_replace("[^-\_0-9a-zA-Z]","",$server_id);
-$stage = ereg_replace("[^-\_0-9a-zA-Z]","",$stage);
-$state_rule = ereg_replace("[^-\_0-9a-zA-Z]","",$state_rule);
-$status = ereg_replace("[^-\_0-9a-zA-Z]","",$status);
-$trunk_restriction = ereg_replace("[^-\_0-9a-zA-Z]","",$trunk_restriction);
-$user = ereg_replace("[^-\_0-9a-zA-Z]","",$user);
-$user_group = ereg_replace("[^-\_0-9a-zA-Z]","",$user_group);
-$VICIDIAL_park_on_filename = ereg_replace("[^-\_0-9a-zA-Z]","",$VICIDIAL_park_on_filename);
-
-### 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
-$adaptive_dl_diff_target = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$adaptive_dl_diff_target);
-$adaptive_intensity = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$adaptive_intensity);
-$asterisk_version = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$asterisk_version);
-$call_time_comments = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$call_time_comments);
-$call_time_name = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$call_time_name);
-$campaign_name = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$campaign_name);
-$campaign_rec_filename = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$campaign_rec_filename);
-$company = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$company);
-$full_name = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$full_name);
-$fullname = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$fullname);
-$group_name = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$group_name);
-$HKstatus = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$HKstatus);
-$lead_filter_comments = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$lead_filter_comments);
-$lead_filter_name = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$lead_filter_name);
-$list_name = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$list_name);
-$local_gmt = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$local_gmt);
-$phone_type = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$phone_type);
-$picture = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$picture);
-$script_comments = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$script_comments);
-$script_name = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$script_name);
-$server_description = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$server_description);
-$status = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$status);
-$status_name = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$status_name);
-$wrapup_message = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$wrapup_message);
-
-### ALPHA-NUMERIC and underscore and dash and slash and at and dot
-$call_out_number_group = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$call_out_number_group);
-$client_browser = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$client_browser);
-$DBX_server = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$DBX_server);
-$DBY_server = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$DBY_server);
-$dtmf_send_extension = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$dtmf_send_extension);
-$extension = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$extension);
-$install_directory = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$install_directory);
-$old_extension = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$old_extension);
-$telnet_host = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$telnet_host);
-
-### remove semi-colons ###
-$lead_filter_sql = ereg_replace(";","",$lead_filter_sql);
-
-### VARIABLES TO BE mysql_real_escape_string ###
-# $web_form_address
-
-### VARIABLES not filtered at all ###
-# $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
-# 60808-1147 - changed filtering for and added instructions for consutative transfers
-# 60816-1552 - added allcalls_delay start delay for recordings in vicidial.php
-# 60817-2226 - fixed bug that would not allow lead recycling of non-selectable statuses
-# 60821-1543 - added option to Omit Phone Code while dialing in vicidial
-# 60821-1625 - added ALLFORCE recording option for campaign_recording
-# 60823-1154 - added fields for adaptive dialing
-# 60824-1326 - added adaptive_latest_target_gmt for ADAPT_TAPERED dial method
-# 60825-1205 - added adaptive_intensity for ADAPT_ dial methods
-# 60828-1019 - changed adaptive_latest_target_gmt to adaptive_latest_server_time
-# 60828-1115 - added adaptive_dl_diff_target and changed intensity dropdown
-# 60927-1246 - added astguiclient/admin.php functions under SERVERS tab
-# 61002-1402 - added fields for vicidial balance trunk controls
-# 61003-1123 - added functions for vicidial_server_trunks records
-# 61109-1022 - added Emergency VDAC Jam Clear function to Campaign Detail screen
-# 61110-1502 - add ability to select NONE in dial statuses, new list_id must not be < 100
-# 61122-1228 - added user group campaign restrictions
-# 61122-1535 - changed script_text to unfiltered and added more variables to SCRIPTS
-# 61129-1028 - Added headers to Users and Phones with clickable order-by titles
-#
-
-# 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 = '2.0.73';
-$build = '61129-1028';
-
-$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];
-			$LOGuser_group				=$row[5];
-			$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];
-			$LOGast_admin_access		=$row[16];
-			$LOGast_delete_phones		=$row[17];
-			$LOGdelete_scripts			=$row[18];
-			$LOGdelete_filters			=$row[29];
-			$LOGalter_agent_interface	=$row[30];
-			$LOGdelete_call_times		=$row[32];
-			$LOGmodify_call_times		=$row[33];
-
-			$stmt="SELECT allowed_campaigns from vicidial_user_groups where user_group='$LOGuser_group';";
-			$rslt=mysql_query($stmt, $link);
-			$row=mysql_fetch_row($rslt);
-			$LOGallowed_campaigns		=$row[0];
-
-		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==11111111111)	{$hh='server';		echo "ADD NEW PHONE";}
-if ($ADD==111111111111)	{$hh='server';		echo "ADD NEW SERVER";}
-if ($ADD==1111111111111)	{$hh='server';		echo "ADD NEW CONFERENCE";}
-if ($ADD==11111111111111)	{$hh='server';		echo "ADD NEW VICIDIAL CONFERENCE";}
-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==21111111111)	{$hh='server';		echo "ADDING NEW PHONE";}
-if ($ADD==211111111111)	{$hh='server';		echo "ADDING NEW SERVER";}
-if ($ADD==221111111111)	{$hh='server';		echo "ADDING NEW SERVER VICIDIAL TRUNK RECORD";}
-if ($ADD==2111111111111)	{$hh='server';		echo "ADDING NEW CONFERENCE";}
-if ($ADD==21111111111111)	{$hh='server';		echo "ADDING NEW VICIDIAL CONFERENCE";}
-if ($ADD==3)			{$hh='users';		echo "Modify User";}
-if ($ADD==30)			{$hh='campaigns';	echo "Campaign Not Allowed";}
-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==31111111111)	{$hh='server';		echo "MODIFY PHONE";}
-if ($ADD==311111111111)	{$hh='server';		echo "MODIFY SERVER";}
-if ($ADD==3111111111111)	{$hh='server';		echo "MODIFY CONFERENCE";}
-if ($ADD==31111111111111)	{$hh='server';		echo "MODIFY VICIDIAL CONFERENCE";}
-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==41111111111)	{$hh='server';		echo "MODIFY PHONE";}
-if ($ADD==411111111111)	{$hh='server';		echo "MODIFY SERVER";}
-if ($ADD==421111111111)	{$hh='server';		echo "MODIFY SERVER VICIDIAL TRUNK RECORD";}
-if ($ADD==4111111111111)	{$hh='server';		echo "MODIFY CONFERENCE";}
-if ($ADD==41111111111111)	{$hh='server';		echo "MODIFY VICIDIAL CONFERENCE";}
-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==53)			{$hh='campaigns';	echo "Emergency VDAC Jam Clear";}
-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==51111111111)	{$hh='server';		echo "DELETE PHONE";}
-if ($ADD==511111111111)	{$hh='server';		echo "DELETE SERVER";}
-if ($ADD==5111111111111)	{$hh='server';		echo "DELETE CONFERENCE";}
-if ($ADD==51111111111111)	{$hh='server';		echo "DELETE VICIDIAL CONFERENCE";}
-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==63)			{$hh='campaigns';	echo "Emergency VDAC Jam Clear";}
-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==61111111111)	{$hh='server';		echo "DELETE PHONE";}
-if ($ADD==611111111111)	{$hh='server';		echo "DELETE SERVER";}
-if ($ADD==621111111111)	{$hh='server';		echo "DELETE SERVER VICIDIAL TRUNK RECORD";}
-if ($ADD==6111111111111)	{$hh='server';		echo "DELETE CONFERENCE";}
-if ($ADD==61111111111111)	{$hh='server';		echo "DELETE VICIDIAL CONFERENCE";}
-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==10000000000)	{$hh='server';		echo "PHONE LIST";}
-if ($ADD==100000000000)	{$hh='server';		echo "SERVER LIST";}
-if ($ADD==1000000000000)	{$hh='server';		echo "CONFERENCE LIST";}
-if ($ADD==10000000000000)	{$hh='server';		echo "VICIDIAL CONFERENCE LIST";}
-if ($ADD==55)			{$hh='users';		echo "Search Form";}
-if ($ADD==551)			{$hh='users';		echo "SEARCH PHONES";}
-if ($ADD==66)			{$hh='users';		echo "Search Results";}
-if ($ADD==661)			{$hh='users';		echo "SEARCH PHONES 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") or (strlen($ADD)==12) )
-	{
-	##### 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++;
-		}
-
-	##### BEGIN 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 .= " -";}
-	}
-	##### END get inbound groups listing for checkboxes #####
-
-
-	##### BEGIN get campaigns listing for checkboxes #####
-	if ( ($ADD==211111) or ($ADD==311111) or ($ADD==411111) or ($ADD==511111) or ($ADD==611111) )
-	{
-		if ( ($ADD==211111) or ($ADD==311111) or ($ADD==511111) or ($ADD==611111) )
-		{
-		$stmt="SELECT allowed_campaigns from vicidial_user_groups where user_group='$user_group';";
-		$rslt=mysql_query($stmt, $link);
-		$row=mysql_fetch_row($rslt);
-		$allowed_campaigns =	$row[0];
-		$allowed_campaigns = preg_replace("/ -$/","",$allowed_campaigns);
-		$campaigns = explode(" ", $allowed_campaigns);
-		echo "<!--  $allowed_campaigns -->";
-		}
-
-	$campaigns_value='';
-	$campaigns_list='<B><input type="checkbox" name="campaigns[]" value="-ALL-CAMPAIGNS-"';
-		$p=0;
-		while ($p<100)
-			{
-			if (eregi('ALL-CAMPAIGNS',$campaigns[$p])) 
-				{
-				$campaigns_list.=" CHECKED";
-				$campaigns_value .= " -ALL-CAMPAIGNS- -";
-				}
-			$p++;
-			}
-	$campaigns_list.="> ALL-CAMPAIGNS - USERS CAN VIEW ANY CAMPAIGN</B><BR>\n";
-
-	$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);
-
-	$o=0;
-	while ($campaigns_to_print > $o)
-		{
-		$rowx=mysql_fetch_row($rslt);
-		$campaign_id_value = $rowx[0];
-		$campaign_name_value = $rowx[1];
-		$campaigns_list .= "<input type=\"checkbox\" name=\"campaigns[]\" value=\"$campaign_id_value\"";
-		$p=0;
-		while ($p<100)
-			{
-			if ($campaign_id_value == $campaigns[$p]) 
-				{
-			#	echo "<!--  X $p|$campaign_id_value|$campaigns[$p]| -->";
-				$campaigns_list .= " CHECKED";
-				$campaigns_value .= " $campaign_id_value";
-				}
-		#	echo "<!--  O $p|$campaign_id_value|$campaigns[$p]| -->";
-			$p++;
-			}
-		$campaigns_list .= "> $campaign_id_value - $campaign_name_value<BR>\n";
-		$o++;
-		}
-	if (strlen($campaigns_value)>2) {$campaigns_value .= " -";}
-	}
-	##### END get campaigns listing for checkboxes #####
-
-
-	if ( (strlen($ADD)==11) or (strlen($ADD)>12) )
-	{
-	##### 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++;
-		}
-	}
-
-
-
-$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. - -
-
-
-Dial Method - This field is the way to define how dialing is to take place. If MANUAL then the auto_dial_level will be locked at 0 unless Dial Method is changed. If RATIO then the normal dialing a number of lines for Active agents. ADAPT_HARD_LIMIT will dial predictively up to the dropped percentage and then not allow aggressive dialing once the drop limit is reached until the percentage goes down again. ADAPT_TAPERED allows for running over the dropped percentage in the first half of the shift -as defined by call_time selected for campaign- and gets more strict as the shift goes on. ADAPT_AVERAGE tries to maintain an average or the dropped percentage not imposing hard limits as aggressively as the other two methods. You cannot change the Auto Dial Level if you are in any of the ADAPT dial methods. Only the Dialer can change the dial level when in predictive dialing mode. - -
-
-
-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. - -
-
-
-Available Only Tally - This field if set to Y will leave out INCALL and QUEUE status agents when calculating the number of calls to dial when not in MANUAL dial mode. Default is N. - -
-
-
-Drop Percentage Limit - This field is where you set the limit of the percentage of dropped calls you would like while using an adaptive-predictive dial method, not MANUAL or RATIO. - -
-
-
-Maximum Adapt Dial Level - This field is where you set the limit of the limit to the numbr of lines you would like dialed per agent while using an adaptive-predictive dial method, not MANUAL or RATIO. This number can be higher than the Auto Dial Level if your hardware will support it. Value must be a positive number greater than one and can have decimal places Default 3.0. - -
-
-
-Latest Server Time - This field is only used by the ADAPT_TAPERED dial method. You should enter in the hour and minute that you will stop calling on this campaign, 2100 would mean that you will stop dialing this campaign at 9PM server time. This allows the Tapered algorithm to decide how aggressively to dial by how long you have until you will be finished calling. - -
-
-
-Adapt Intensity Modifier - This field is used to adjust the predictive intensity either higher or lower. The higher a positive number you select, the greater the dialer will increase the call pacing when it goes up and the slower the dialer will decrease the call pacing when it goes down. The lower the negative number you select here, the slower the dialer will increase the call pacing and the faster the dialer will lower the call pacing when it goes down. Default is 0. This field is not used by the MANUAL or RATIO dial methods. - -
-
-
-Dial Level Difference Target - This field is used to define whether you want to target having a specific number of agents waiting for calls or calls waiting for agents. For example if you would always like to have on average one agent free to take calls immediately you would set this to -1, if you would like to target always having one call on hold waiting for an agent you would set this to 1. Default is 0. This field is not used by the MANUAL or RATIO dial methods. - -
-
-
-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. - -
-
-
-Omit Phone Code - This field allows you to leave out the phone_code field while dialing within VICIDIAL. For instance if you are dialing in the UK from the UK you would have 44 in as your phone_code field for all leads, but you just want to dial 10 digits in your dialplan extensions.conf to place calls instead of 44 then 10 digits. Default is N. - -
-
-
-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. ALLFORCE will start recording on the client whenever a call is sent to an agent giving the agent no option to stop recording. For ALLCALLS and ALLFORCE there is an option to use the Recording Delay to cut down on very short recordings and recude system load. - -
-
-
-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. - -
-
-
-Recording Delay - For ALLCALLS and ALLFORCE recording only. This setting will delay the starting of the recording on all calls for the number of seconds specified in this field. Default is 0. - -
-
-
-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. If you want to allow Consultative Transfers, a fronter to a closer, you can place CXFER as one of the number-to-dial presets and the proper dialstring will be sent to do a Local Consultative Transfer, then the agent can just LEAVE-3WAY-CALL and move on to their next call. If you want to allow Blind transfers of customers to a VICIDIAL AGI script for logging or an IVR, then place AXFER in the number-to-dial field. You can also specify an custom extension after the AXFER or CXFER, for instance if you want to do Internal Consultative transfers instead of Local you would put CXFER90009 in the number-to-dial field. - -
-
-
-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. Must be a number greater than 100. - -
-
-
-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. If you want to allow Consultative Transfers, a fronter to a closer, you can place CXFER as one of the number-to-dial presets and the proper dialstring will be sent to do a Local Consultative Transfer, then the agent can just LEAVE-3WAY-CALL and move on to their next call. If you want to allow Blind transfers of customers to a VICIDIAL AGI script for logging or an IVR, then place AXFER in the number-to-dial field. You can also specify an custom extension after the AXFER or CXFER, for instance if you want to do Internal Consultative transfers instead of Local you would put CXFER90009 in the number-to-dial field. - -
-
-
-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. - -
-
-
-Allowed Campaigns - This is a selectable list of Campaigns to which members of this user group can log in to. The ALL-CAMPAIGNS option allows the users in this group to see and log in to any campaign on the system. - - - - - -



- -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, lead_id, campaign, phone_login, group, channel_group, SQLdate, epoch, uniqueid, customer_zap_channel, server_ip, SIPexten, session_id. 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?

You can also use an iframe to load a separate window within the SCRIPT tab, here is an example with prepopulated variables: - -
-<iframe src="http://astguiclient.sf.net/test_VICIDIAL_output.php?lead_id=--A--lead_id--B--&vendor_id=--A--vendor_lead_code--B--&list_id=--A--list_id--B--&gmt_offset_now=--A--gmt_offset_now--B--&phone_code=--A--phone_code--B--&phone_number=--A--phone_number--B--&title=--A--title--B--&first_name=--A--first_name--B--&middle_initial=--A--middle_initial--B--&last_name=--A--last_name--B--&address1=--A--address1--B--&address2=--A--address2--B--&address3=--A--address3--B--&city=--A--city--B--&state=--A--state--B--&province=--A--province--B--&postal_code=--A--postal_code--B--&country_code=--A--country_code--B--&gender=--A--gender--B--&date_of_birth=--A--date_of_birth--B--&alt_phone=--A--alt_phone--B--&email=--A--email--B--&security_phrase=--A--security_phrase--B--&comments=--A--comments--B--&user=--A--user--B--&campaign=--A--campaign--B--&phone_login=--A--phone_login--B--&fronter=--A--fronter--B--&closer=--A--user--B--&group=--A--group--B--&channel_group=--A--group--B--&SQLdate=--A--SQLdate--B--&epoch=--A--epoch--B--&uniqueid=--A--uniqueid--B--&customer_zap_channel=--A--customer_zap_channel--B--&server_ip=--A--server_ip--B--&SIPexten=--A--SIPexten--B--&session_id=--A--session_id--B--&phone=--A--phone--B--" style="width:580;height:290;background-color:transparent;" scrolling="auto" frameborder="0" allowtransparency="true" id="popupFrame" name="popupFrame" width="460" height="290"> -</iframe> -
- -
-
-
-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 /etc/astguiclient.conf 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. - - - - -



- - - - - - -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' - -
-
-
-System Performance - Setting this option to Y will enable logging of system performance stats for the server machine including system load, system processes and Asterisk channels in use. Default is N. - -
-
-
-Server Logs - Setting this option to Y will enable logging of all VICIDIAL related scripts to their text log files. Setting this to N will stop writing logs to files for these processes, also the screen logging of asterisk will be disabled if this is set to N when Asterisk is started. Default is Y. - -
-
-
-AGI Output - Setting this option to NONE will disable output from all VICIDIAL related AGI scripts. Setting this to STDERR will send the AGI output to the Asterisk CLI. Setting this to FILE will send the output to a file in the logs directory. Setting this to BOTH will send output to both the Asterisk CLI and a log file. Default is FILE. - -
-
-
-VICIDIAL Balance Dialing - Setting this field to Y will allow the server to place balance calls for campaigns in VICIDIAL so that the defined dial level can be met even if there are no agents logged into that campaign on this server. Default is N. - -
-
-
-VICIDIAL Balance Offlimits - This setting defines the number of trunks to not allow VICIDIAL balance dialing to use. For example if you have 40 max vicidial trunks and balance offlimits is set to 10 you will only be able to use 30 trunk lines for VICIDIAL balance dialing. Default is 0. - - -



- -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. - - - - -



- -VICIDIAL_SERVER_TRUNKS TABLE

-
-
-VICIDIAL Server Trunks allows you to restrict the outgoing lines that are used on this server for campaign dialing on a per-campaign basis. You have the option to reserve a specific number of lines to be used by only one campaign as well as allowing that campaign to run over its reserved lines into whatever lines remain open, as long at the total lines used by vicidial on this server is less than the Max VICIDIAL Trunks setting. Not having any of these records will allow the campaign that dials the line first to have as many lines as it can get under the Max VICIDIAL Trunks setting. - - -







-







-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 = 'VENDOR:LEAD;CODE'; - $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'; - $RGlead_id = '1234'; - $RGcampaign = 'TESTCAMP'; - $RGphone_login = 'gs102'; - $RGgroup = 'TESTCAMP'; - $RGchannel_group = 'TESTCAMP'; - $RGSQLdate = date("Y-m-d H:i:s"); - $RGepoch = date("U"); - $RGuniqueid = '1163095830.4136'; - $RGcustomer_zap_channel = 'Zap/1-1'; - $RGserver_ip = '10.10.10.15'; - $RGSIPexten = 'SIP/gs102'; - $RGsession_id = '8600051'; - -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]; - -if (eregi("iframe src",$script_text)) - { - $vendor_lead_code = eregi_replace(' ','+',$vendor_lead_code); - $list_id = eregi_replace(' ','+',$list_id); - $gmt_offset_now = eregi_replace(' ','+',$gmt_offset_now); - $phone_code = eregi_replace(' ','+',$phone_code); - $phone_number = eregi_replace(' ','+',$phone_number); - $title = eregi_replace(' ','+',$title); - $first_name = eregi_replace(' ','+',$first_name); - $middle_initial = eregi_replace(' ','+',$middle_initial); - $last_name = eregi_replace(' ','+',$last_name); - $address1 = eregi_replace(' ','+',$address1); - $address2 = eregi_replace(' ','+',$address2); - $address3 = eregi_replace(' ','+',$address2); - $city = eregi_replace(' ','+',$city); - $state = eregi_replace(' ','+',$state); - $province = eregi_replace(' ','+',$province); - $postal_code = eregi_replace(' ','+',$postal_code); - $country_code = eregi_replace(' ','+',$country_code); - $gender = eregi_replace(' ','+',$gender); - $date_of_birth = eregi_replace(' ','+',$date_of_birth); - $alt_phone = eregi_replace(' ','+',$alt_phone); - $email = eregi_replace(' ','+',$email); - $security_phrase = eregi_replace(' ','+',$security_phrase); - $comments = eregi_replace(' ','+',$comments); - $RGfullname = eregi_replace(' ','+',$RGfullname); - $RGuser = eregi_replace(' ','+',$RGuser); - $RGlead_id = eregi_replace(' ','+',$RGlead_id); - $RGcampaign = eregi_replace(' ','+',$RGcampaign); - $RGphone_login = eregi_replace(' ','+',$RGphone_login); - $RGgroup = eregi_replace(' ','+',$RGgroup); - $RGchannel_group = eregi_replace(' ','+',$RGchannel_group); - $RGSQLdate = eregi_replace(' ','+',$RGSQLdate); - $RGepoch = eregi_replace(' ','+',$RGepoch); - $RGuniqueid = eregi_replace(' ','+',$RGuniqueid); - $RGcustomer_zap_channel = eregi_replace(' ','+',$RGcustomer_zap_channel); - $RGserver_ip = eregi_replace(' ','+',$RGserver_ip); - $RGSIPexten = eregi_replace(' ','+',$RGSIPexten); - $RGsession_id = eregi_replace(' ','+',$RGsession_id); - } - -$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--fronter--B--',"$RGuser",$script_text); -$script_text = eregi_replace('--A--user--B--',"$RGuser",$script_text); -$script_text = eregi_replace('--A--lead_id--B--',"$RGlead_id",$script_text); -$script_text = eregi_replace('--A--campaign--B--',"$RGcampaign",$script_text); -$script_text = eregi_replace('--A--phone_login--B--',"$RGphone_login",$script_text); -$script_text = eregi_replace('--A--group--B--',"$RGgroup",$script_text); -$script_text = eregi_replace('--A--channel_group--B--',"$RGchannel_group",$script_text); -$script_text = eregi_replace('--A--SQLdate--B--',"$RGSQLdate",$script_text); -$script_text = eregi_replace('--A--epoch--B--',"$RGepoch",$script_text); -$script_text = eregi_replace('--A--uniqueid--B--',"$RGuniqueid",$script_text); -$script_text = eregi_replace('--A--customer_zap_channel--B--',"$RGcustomer_zap_channel",$script_text); -$script_text = eregi_replace('--A--server_ip--B--',"$RGserver_ip",$script_text); -$script_text = eregi_replace('--A--SIPexten--B--',"$RGSIPexten",$script_text); -$script_text = eregi_replace('--A--session_id--B--',"$RGsession_id",$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';} -if ($hh=='server') {$server_hh='bgcolor ="#FF99FF"'; $server_fc='BLACK';} # pink - else {$server_hh=''; $server_fc='WHITE';} - -?> - - - - -\n"; -echo "
English Español
- - - - - - - - - - - - - - - - - 1) { - ?> - - 1) { - ?> - - 1) { - ?> - - 1) { - ?> - - 1) { - ?> - - 1) { - ?> - - 1) { - ?> - - 1) { - ?> - - 1) { - ?> - - 1) { - ?> - -\n"; - echo "You are not authorized to view this page. Please go back.\n"; - } - -} -if (strlen($reports_hh) > 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 > SIZE=1> PHONES > REPORTS
  LIST USERS     |     ADD A NEW USER     |     SEARCH FOR A USER
  ADD CAMPAIGN     |     LIST CAMPAIGNS     |     REALTIME CAMPAIGNS SUMMARY
  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
  PHONES   |   ADD PHONE   |   SERVERS   |   ADD SERVER   |   CONFERENCES   |   ADD CONFERENCE   |   VD CONFERENCES   |   ADD VD CONFERENCE
 
-
\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"; -} - - -###################### -# ADD=11111111111 display the ADD NEW PHONE SCREEN -###################### - -if ($ADD==11111111111) -{ -echo "
\n"; -echo ""; - -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=111111111111 display the ADD NEW SERVER SCREEN -###################### - -if ($ADD==111111111111) -{ -echo "
\n"; -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=1111111111111 display the ADD NEW CONFERENCE SCREEN -###################### - -if ($ADD==1111111111111) -{ -echo "
\n"; -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=11111111111111 display the ADD NEW VICIDIAL CONFERENCE SCREEN -###################### - -if ($ADD==11111111111111) -{ -echo "
\n"; -echo ""; - -echo "
ADD A NEW VICIDIAL 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"; -} - - - -###################################################################################################### -###################################################################################################### -####### 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 ($list_id < 100) 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"; - echo "
List ID must be greater than 100\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(user_group,group_name,allowed_campaigns) values('$user_group','$group_name','-ALL-CAMPAIGNS-');"; - $rslt=mysql_query($stmt, $link); - - echo "
USER GROUP ADDED: $user_group\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|$stmt|\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','$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; -} - - -###################### -# ADD=21111111111 adds new phone to the system -###################### - -if ($ADD==21111111111) -{ -echo "
\n"; - 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=31111111111; -} - - -###################### -# ADD=211111111111 adds new server to the system -###################### - -if ($ADD==211111111111) -{ -echo "
\n"; - 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=311111111111; -} - - -###################### -# ADD=221111111111 adds the new vicidial server trunk record to the system -###################### - -if ($ADD==221111111111) -{ - echo ""; - $stmt="SELECT max_vicidial_trunks from servers where server_ip='$server_ip';"; - $rslt=mysql_query($stmt, $link); - $rowx=mysql_fetch_row($rslt); - $MAXvicidial_trunks = $rowx[0]; - - $stmt="SELECT sum(dedicated_trunks) from vicidial_server_trunks where server_ip='$server_ip' and campaign_id !='$campaign_id';"; - $rslt=mysql_query($stmt, $link); - $rowx=mysql_fetch_row($rslt); - $SUMvicidial_trunks = ($rowx[0] + $dedicated_trunks); - - if ($SUMvicidial_trunks > $MAXvicidial_trunks) - { - echo "
VICIDIAL SERVER TRUNK RECORD NOT ADDED - the number of vicidial trunks is too high: $SUMvicidial_trunks / $MAXvicidial_trunks\n"; - } - else - { - $stmt="SELECT count(*) from vicidial_server_trunks where campaign_id='$campaign_id' and server_ip='$server_ip';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0] > 0) - {echo "
VICIDIAL SERVER TRUNK RECORD NOT ADDED - there is already a server-trunk record for this campaign\n";} - else - { - if ( (strlen($campaign_id) < 2) or (strlen($server_ip) < 7) or (strlen($dedicated_trunks) < 1) or (strlen($trunk_restriction) < 1) ) - { - echo "
VICIDIAL SERVER TRUNK RECORD NOT ADDED - Please go back and look at the data you entered\n"; - echo "
campaign must be between 3 and 8 characters in length\n"; - echo "
server_ip delay must be at least 7 characters\n"; - echo "
trunks must be a digit from 0 to 9999\n"; - } - else - { - echo "
VICIDIAL SERVER TRUNK RECORD ADDED: $campaign_id - $server_ip - $dedicated_trunks - $trunk_restriction\n"; - - $stmt="INSERT INTO vicidial_server_trunks(server_ip,campaign_id,dedicated_trunks,trunk_restriction) values('$server_ip','$campaign_id','$dedicated_trunks','$trunk_restriction');"; - $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 VICIDIAL TRUNK |$PHP_AUTH_USER|$ip|$stmt|\n"); - fclose($fp); - } - } - } - } -$ADD=311111111111; -} - - -###################### -# ADD=2111111111111 adds new conference to the system -###################### - -if ($ADD==2111111111111) -{ -echo "
\n"; - 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=3111111111111; -} - - -###################### -# ADD=21111111111111 adds new vicidial conference to the system -###################### - -if ($ADD==21111111111111) -{ -echo "
\n"; - echo ""; - $stmt="SELECT count(*) from vicidial_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 "
VICIDIAL CONFERENCE NOT ADDED - there is already a vicidial conference in the system with this ID and server\n";} - else - { - if ( (strlen($conf_exten) < 1) or (strlen($server_ip) < 7) ) - {echo "
VICIDIAL CONFERENCE NOT ADDED - Please go back and look at the data you entered\n";} - else - { - echo "
VICIDIAL CONFERENCE ADDED\n"; - - $stmt="INSERT INTO vicidial_conferences (conf_exten,server_ip) values('$conf_exten','$server_ip');"; - $rslt=mysql_query($stmt, $link); - } - } -$ADD=31111111111111; -} - - - -###################################################################################################### -###################################################################################################### -####### 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"; - - if ($dial_method == 'RATIO') - { - if ($auto_dial_level < 1) {$auto_dial_level = "1.0";} - $adlSQL = "auto_dial_level='$auto_dial_level',"; - } - else - { - if ($dial_method == 'MANUAL') - { - $auto_dial_level='0'; - $adlSQL = "auto_dial_level='0',"; - } - else - { - $adlSQL = ""; - if ($auto_dial_level < 1) - { - $auto_dial_level = "1.0"; - $adlSQL = "auto_dial_level='$auto_dial_level',"; - } - } - } - $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', $adlSQL 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',allcalls_delay='$allcalls_delay',omit_phone_code='$omit_phone_code',dial_method='$dial_method',available_only_ratio_tally='$available_only_ratio_tally',adaptive_dropped_percentage='$adaptive_dropped_percentage',adaptive_maximum_level='$adaptive_maximum_level',adaptive_latest_server_time='$adaptive_latest_server_time',adaptive_intensity='$adaptive_intensity',adaptive_dl_diff_target='$adaptive_dl_diff_target' 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 IN('READY','QUEUE','DONE');"; - $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|$stmt|\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"; - - if ($dial_method == 'RATIO') - { - if ($auto_dial_level < 1) {$auto_dial_level = "1.0";} - $adlSQL = "auto_dial_level='$auto_dial_level',"; - } - else - { - if ($dial_method == 'MANUAL') - { - $auto_dial_level='0'; - $adlSQL = "auto_dial_level='0',"; - } - else - { - $adlSQL = ""; - if ($auto_dial_level < 1) - { - $auto_dial_level = "1.0"; - $adlSQL = "auto_dial_level='$auto_dial_level',"; - } - } - } - $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', $adlSQL lead_filter_id='$lead_filter_id',dial_method='$dial_method',adaptive_intensity='$adaptive_intensity' 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 IN('READY','QUEUE','DONE');;"; - $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|$stmt|\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',allowed_campaigns='$campaigns_value' 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|$stmt|\n"); - fclose($fp); - } - } - -$ADD=311111; # go to user group modification form below -} - -###################### -# ADD=4111111 modify script in the system -###################### - -if ($ADD==4111111) -{ - echo "\n"; - echo "\n"; - 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='$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 -} - - -###################### -# ADD=41111111111 modify phone record in the system -###################### - -if ($ADD==41111111111) -{ - 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); - } - } -$ADD=31111111111; # go to phone modification form below -} - - -###################### -# ADD=411111111111 modify server record in the system -###################### - -if ($ADD==411111111111) -{ - 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', sys_perf_log='$sys_perf_log', vd_server_logs='$vd_server_logs', agi_output='$agi_output', vicidial_balance_active='$vicidial_balance_active', balance_trunks_offlimits='$balance_trunks_offlimits' where server_id='$old_server_id';"; - $rslt=mysql_query($stmt, $link); - } - } - } -$ADD=311111111111; # go to server modification form below -} - - -###################### -# ADD=421111111111 modify vicidial server trunks record in the system -###################### - -if ($ADD==421111111111) -{ - echo ""; - $stmt="SELECT max_vicidial_trunks from servers where server_ip='$server_ip';"; - $rslt=mysql_query($stmt, $link); - $rowx=mysql_fetch_row($rslt); - $MAXvicidial_trunks = $rowx[0]; - - $stmt="SELECT sum(dedicated_trunks) from vicidial_server_trunks where server_ip='$server_ip' and campaign_id !='$campaign_id';"; - $rslt=mysql_query($stmt, $link); - $rowx=mysql_fetch_row($rslt); - $SUMvicidial_trunks = ($rowx[0] + $dedicated_trunks); - - if ($SUMvicidial_trunks > $MAXvicidial_trunks) - { - echo "
VICIDIAL SERVER TRUNK RECORD NOT ADDED - the number of vicidial trunks is too high: $SUMvicidial_trunks / $MAXvicidial_trunks\n"; - } - else - { - if ( (strlen($campaign_id) < 2) or (strlen($server_ip) < 7) or (strlen($dedicated_trunks) < 1) or (strlen($trunk_restriction) < 1) ) - { - echo "
VICIDIAL SERVER TRUNK RECORD NOT MODIFIED - Please go back and look at the data you entered\n"; - echo "
campaign must be between 3 and 8 characters in length\n"; - echo "
server_ip delay must be at least 7 characters\n"; - echo "
trunks must be a digit from 0 to 9999\n"; - } - else - { - echo "
VICIDIAL SERVER TRUNK RECORD MODIFIED: $campaign_id - $server_ip - $dedicated_trunks - $trunk_restriction\n"; - - $stmt="UPDATE vicidial_server_trunks SET dedicated_trunks='$dedicated_trunks',trunk_restriction='$trunk_restriction' where campaign_id='$campaign_id' and server_ip='$server_ip';"; - $rslt=mysql_query($stmt, $link); - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|MODIFY SERVER TRUNK |$PHP_AUTH_USER|$ip|$stmt|\n"); - fclose($fp); - } - } - } -$ADD=311111111111; # go to server modification form below -} - - -###################### -# ADD=4111111111111 modify conference record in the system -###################### - -if ($ADD==4111111111111) -{ - 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); - } - } -$ADD=3111111111111; # go to conference modification form below -} - - -###################### -# ADD=41111111111111 modify vicidial conference record in the system -###################### - -if ($ADD==41111111111111) -{ - echo ""; - - $stmt="SELECT count(*) from vicidial_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 "
VICIDIAL 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 "
VICIDIAL CONFERENCE NOT MODIFIED - Please go back and look at the data you entered\n";} - else - { - echo "
VICIDIAL CONFERENCE MODIFIED: $conf_exten\n"; - - $stmt="UPDATE vicidial_conferences set conf_exten='$conf_exten',server_ip='$server_ip',extension='$extension' where conf_exten='$old_conf_exten';"; - $rslt=mysql_query($stmt, $link); - } - } -$ADD=31111111111111; # go to vicidial conference 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=53 confirmation before Emergency VDAC Jam Clear - deletes oldest LIVE vicidial_auto_call record -###################### - -if ($ADD==53) -{ - if (eregi('IN',$stage)) - {$group_id=$campaign_id;} - echo ""; - - if (strlen($campaign_id) < 2) - { - echo "
VDAC NOT CLEARED FOR 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 "
VDAC CLEAR CONFIRMATION: $campaign_id\n"; - echo "

Click here to delete the oldest LIVE record in VDAC for $campaign_id


\n"; - } - -# go to campaign modification below -if (eregi('IN',$stage)) - {$ADD='3111';} -else - {$ADD='31';} -} - -###################### -# 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 state 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 -} - - -###################### -# ADD=51111111111 confirmation before deletion of phone record -###################### - -if ($ADD==51111111111) -{ - echo ""; - - if ( (strlen($extension) < 2) or (strlen($server_ip) < 7) or ($LOGast_delete_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='31111111111'; # go to phone modification below -} - - -###################### -# ADD=511111111111 confirmation before deletion of server record -###################### - -if ($ADD==511111111111) -{ - echo ""; - - if ( (strlen($server_id) < 2) or (strlen($server_ip) < 7) or ($LOGast_delete_phones < 1) ) - { - echo "
SERVER NOT DELETED - Please go back and look at the data you entered\n"; - echo "
Server ID be at least 2 characters in length\n"; - echo "
Server IP be at least 7 characters in length\n"; - } - else - { - echo "
SERVER DELETION CONFIRMATION: $server_id - $server_ip\n"; - echo "

Click here to delete phone $server_id - $server_ip


\n"; - } -$ADD='311111111111'; # go to server modification below -} - - -###################### -# ADD=5111111111111 confirmation before deletion of conference record -###################### - -if ($ADD==5111111111111) -{ - echo ""; - - if ( (strlen($conf_exten) < 2) or (strlen($server_ip) < 7) or ($LOGast_delete_phones < 1) ) - { - echo "
CONFERENCE NOT DELETED - Please go back and look at the data you entered\n"; - echo "
Conference must be at least 2 characters in length\n"; - echo "
Server IP be at least 7 characters in length\n"; - } - else - { - echo "
CONFERENCE DELETION CONFIRMATION: $conf_exten - $server_ip\n"; - echo "

Click here to delete phone $conf_exten - $server_ip


\n"; - } -$ADD='3111111111111'; # go to conference modification below -} - - -###################### -# ADD=51111111111111 confirmation before deletion of vicidial conference record -###################### - -if ($ADD==51111111111111) -{ - echo ""; - - if ( (strlen($conf_exten) < 2) or (strlen($server_ip) < 7) or ($LOGast_delete_phones < 1) ) - { - echo "
VICIDIAL CONFERENCE NOT DELETED - Please go back and look at the data you entered\n"; - echo "
Conference must be at least 2 characters in length\n"; - echo "
Server IP be at least 7 characters in length\n"; - } - else - { - echo "
VICIDIAL CONFERENCE DELETION CONFIRMATION: $conf_exten - $server_ip\n"; - echo "

Click here to delete phone $conf_exten - $server_ip


\n"; - } -$ADD='31111111111111'; # go to vicidial conference 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 from 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=63 Emergency VDAC Jam Clear -###################### - -if ($ADD==63) -{ - if (eregi('IN',$stage)) - {$group_id=$campaign_id;} - echo ""; - - if (strlen($campaign_id) < 2) - { - echo "
VDAC NOT CLEARED FOR 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_auto_calls where status='LIVE' and campaign_id='$campaign_id' order by call_time 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|EMERGENCY VDAC CLEAR|$PHP_AUTH_USER|$ip|campaign_id='$campaign_id'|\n"); - fclose($fp); - } - echo "
LAST VDAC RECORD CLEARED FOR CAMPAIGN: $campaign_id\n"; - echo "

\n"; - } - -# go to campaign modification below -if (eregi('IN',$stage)) - {$ADD='3111';} -else - {$ADD='31';} -} - - -###################### -# 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 -} - - -###################### -# ADD=61111111111 delete phone record -###################### - -if ($ADD==61111111111) -{ - echo ""; - - if ( (strlen($extension) < 2) or (strlen($server_ip) < 7) or ($CoNfIrM != 'YES') or ($LOGast_delete_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='10000000000'; # go to phone list -} - - -###################### -# ADD=611111111111 delete server record -###################### - -if ($ADD==611111111111) -{ - echo ""; - - if ( (strlen($server_id) < 2) or (strlen($server_ip) < 7) or ($CoNfIrM != 'YES') or ($LOGast_delete_phones < 1) ) - { - echo "
SERVER NOT DELETED - Please go back and look at the data you entered\n"; - echo "
Server ID be at least 2 characters in length\n"; - echo "
Server IP be at least 7 characters in length\n"; - } - else - { - $stmt="DELETE from servers where server_id='$server_id' 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 SERVER!!|$PHP_AUTH_USER|$ip|server_id='$server_id'|server_ip='$server_ip'|\n"); - fclose($fp); - } - echo "
SERVER DELETION COMPLETED: $server_id - $server_ip\n"; - echo "

\n"; - } -$ADD='100000000000'; # go to server list -} - - -###################### -# ADD=621111111111 delete vicidial server trunk record in the system -###################### - -if ($ADD==621111111111) -{ - echo ""; - - if ( (strlen($campaign_id) < 2) or (strlen($server_ip) < 7) ) - { - echo "
VICIDIAL SERVER TRUNK RECORD NOT DELETED - Please go back and look at the data you entered\n"; - echo "
campaign must be between 3 and 8 characters in length\n"; - echo "
server_ip delay must be at least 7 characters\n"; - } - else - { - echo "
VICIDIAL SERVER TRUNK RECORD DELETED: $campaign_id - $server_ip\n"; - - $stmt="DELETE FROM vicidial_server_trunks where campaign_id='$campaign_id' and server_ip='$server_ip';"; - $rslt=mysql_query($stmt, $link); - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|DELETE SERVER TRUNK |$PHP_AUTH_USER|$ip|$stmt|\n"); - fclose($fp); - } - } - -$ADD=311111111111; # go to server modification form below -} - - -###################### -# ADD=6111111111111 delete conference record -###################### - -if ($ADD==6111111111111) -{ - echo ""; - - if ( (strlen($conf_exten) < 2) or (strlen($server_ip) < 7) or ($CoNfIrM != 'YES') or ($LOGast_delete_phones < 1) ) - { - echo "
CONFERENCE NOT DELETED - Please go back and look at the data you entered\n"; - echo "
Conference be at least 2 characters in length\n"; - echo "
Server IP be at least 7 characters in length\n"; - } - else - { - $stmt="DELETE from conferences where conf_exten='$conf_exten' 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 CONF!!!!|$PHP_AUTH_USER|$ip|conf_exten='$conf_exten'|server_ip='$server_ip'|\n"); - fclose($fp); - } - echo "
CONFERENCE DELETION COMPLETED: $conf_exten - $server_ip\n"; - echo "

\n"; - } -$ADD='1000000000000'; # go to conference list -} - - -###################### -# ADD=61111111111111 delete vicidial conference record -###################### - -if ($ADD==61111111111111) -{ - echo ""; - - if ( (strlen($conf_exten) < 2) or (strlen($server_ip) < 7) or ($CoNfIrM != 'YES') or ($LOGast_delete_phones < 1) ) - { - echo "
VICIDIAL CONFERENCE NOT DELETED - Please go back and look at the data you entered\n"; - echo "
Conference be at least 2 characters in length\n"; - echo "
Server IP be at least 7 characters in length\n"; - } - else - { - $stmt="DELETE from vicidial_conferences where conf_exten='$conf_exten' 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 CONF!!!!|$PHP_AUTH_USER|$ip|conf_exten='$conf_exten'|server_ip='$server_ip'|\n"); - fclose($fp); - } - echo "
VICIDIAL CONFERENCE DELETION COMPLETED: $conf_exten - $server_ip\n"; - echo "

\n"; - } -$ADD='10000000000000'; # go to vicidial conference 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) and ( (!eregi("$campaign_id",$LOGallowed_campaigns)) and (!eregi("ALL-CAMPAIGNS",$LOGallowed_campaigns)) ) ) - {$ADD=30;} # send to not allowed screen if not in vicidial_user_groups allowed_campaigns list - -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]; - $allcalls_delay = $row[44]; - $omit_phone_code = $row[45]; - $dial_method = $row[46]; - $available_only_ratio_tally = $row[47]; - $adaptive_dropped_percentage = $row[48]; - $adaptive_maximum_level = $row[49]; - $adaptive_latest_server_time = $row[50]; - $adaptive_intensity = $row[51]; - $adaptive_dl_diff_target = $row[52]; - -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"; - -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
Dial Method: $NWB#vicidial_campaigns-dial_method$NWE
Auto Dial Level: (0 = off)$NWB#vicidial_campaigns-auto_dial_level$NWE
Available Only Tally: $NWB#vicidial_campaigns-available_only_ratio_tally$NWE
Drop Percentage Limit: % $NWB#vicidial_campaigns-adaptive_dropped_percentage$NWE
Maximum Adapt Dial Level: number only $NWB#vicidial_campaigns-adaptive_maximum_level$NWE
Latest Server Time: 4 digits only $NWB#vicidial_campaigns-adaptive_latest_server_time$NWE
Adapt Intensity Modifier: $NWB#vicidial_campaigns-adaptive_intensity$NWE
Dial Level Difference Target: $NWB#vicidial_campaigns-adaptive_dl_diff_target$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
Omit Phone Code: $NWB#vicidial_campaigns-omit_phone_code$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
Recording Delay: in seconds$NWB#vicidial_campaigns-allcalls_delay$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 "Click here to see a VDAD report for 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"; -echo "EMERGENCY VDAC CLEAR FOR 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) and ( (!eregi("$campaign_id",$LOGallowed_campaigns)) and (!eregi("ALL-CAMPAIGNS",$LOGallowed_campaigns)) ) ) - {$ADD=30;} # send to not allowed screen if not in vicidial_user_groups allowed_campaigns list - -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]; - $dial_method = $row[46]; - $adaptive_intensity = $row[51]; - -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 "\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
Dial Method: $NWB#vicidial_campaigns-dial_method$NWE
Auto Dial Level: (0 = off)$NWB#vicidial_campaigns-auto_dial_level$NWE
Adapt Intensity Modifier: $NWB#vicidial_campaigns-adaptive_intensity$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 "Click here to see a VDAD report for 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=31 campaign not allowed -###################### - -if ($ADD==30) -{ -echo "
\n"; - echo ""; -echo "You do not have permission to view campaign $campaign_id\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 "Click here to see a report for this campaign

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

EMERGENCY VDAC CLEAR FOR THIS IN-GROUP

\n"; - 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 "\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
Allowed Campaigns: \n"; -echo "$campaigns_list"; -echo "$NWB#vicidial_user_groups-allowed_campaigns$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=31111111111 modify phone record in the system -###################### - -if ($ADD==31111111111) -{ -echo "
\n"; - 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 ($LOGast_delete_phones > 0) - { - echo "

DELETE THIS PHONE\n"; - } -} - - -###################### -# ADD=311111111111 modify server record in the system -###################### - -if ($ADD==311111111111) -{ -echo "
\n"; - echo ""; - - $stmt="SELECT * from servers where server_id='$server_id' or server_ip='$server_ip';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $server_id = $row[0]; - $server_ip = $row[2]; - -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 "\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
VICIDIAL Balance Dialing: $NWB#servers-vicidial_balance_active$NWE
VICIDIAL Balance Offlimits: $NWB#servers-balance_trunks_offlimits$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
System Performance: $NWB#servers-sys_perf_log$NWE
Server Logs: $NWB#servers-vd_server_logs$NWE
AGI Output: $NWB#servers-agi_output$NWE
\n"; - - -### vicidial server trunk records for this server -echo "

VICIDIAL TRUNKS FOR THIS SERVER:   $NWB#vicidial_server_trunks$NWE
\n"; -echo "\n"; -echo "\n"; - - $stmt="SELECT * from vicidial_server_trunks where server_ip='$server_ip' order by campaign_id"; - $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 "
CAMPAIGN TRUNKS RESTRICTION DELETE
$rowx[1]
\n"; - echo "\n"; - echo "\n"; - echo "
DELETE
\n"; - -echo "
ADD NEW SERVER VICIDIAL TRUNK RECORD
\n"; -echo "\n"; -echo "\n"; -echo "TRUNKS:
\n"; -echo "CAMPAIGN:
\n"; -echo "RESTRICTION:
\n"; -echo "
\n"; - -echo "

\n"; - - -### list of phones on this server -echo "
\n"; -echo "
PHONES WITHIN THIS SERVER:
\n"; -echo "\n"; -echo "\n"; - - $active_phones = 0; - $inactive_phones = 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_phones++; $camp_lists .= "'$rowx[0]',";} - if (ereg("N", $rowx[1])) {$inactive_phones++;} - - 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"; - - -### list of conferences on this server -echo "
\n"; -echo "
CONFERENCES WITHIN THIS SERVER:
\n"; -echo "\n"; -echo "\n"; - - $active_confs = 0; - $stmt="SELECT conf_exten,extension from conferences 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++; - $active_confs++; - - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - - echo "\n"; - } - -echo "
CONFERENCEEXTENSION
$rowx[0]$rowx[2]

\n"; - - -### list of vicidial conferences on this server -echo "
\n"; -echo "
VICIDIAL CONFERENCES WITHIN THIS SERVER:
\n"; -echo "\n"; -echo "\n"; - - $active_vdconfs = 0; - $stmt="SELECT conf_exten,extension from vicidial_conferences 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++; - $active_vdconfs++; - - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - - echo "\n"; - } - -echo "
VD CONFERENCEEXTENSION
$rowx[0]$rowx[2]

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

\n"; -echo "This server has $active_confs active conferences

\n"; -echo "This server has $active_vdconfs active vicidial conferences

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

DELETE THIS SERVER\n"; - } -} - - -###################### -# ADD=3111111111111 modify conference record in the system -###################### - -if ($ADD==3111111111111) -{ -echo "
\n"; - 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); - $conf_exten = $row[0]; - $server_ip = $row[1]; - -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"; -if ($LOGast_delete_phones > 0) - { - echo "

DELETE THIS CONFERENCE\n"; - } -} - - -###################### -# ADD=31111111111111 modify vicidial conference record in the system -###################### - -if ($ADD==31111111111111) -{ -echo "
\n"; - echo ""; - - $stmt="SELECT * from vicidial_conferences where conf_exten='$conf_exten' and server_ip='$server_ip';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $conf_exten = $row[0]; - $server_ip = $row[1]; - -echo "
MODIFY A VICIDIAL 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"; -if ($LOGast_delete_phones > 0) - { - echo "

DELETE THIS VICIDIAL CONFERENCE\n"; - } -} - - - - - - - -###################### -# 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 "
LEADLIST CAMPAIGNENTRY 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 ""; - -$USERlink='stage=USERIDDOWN'; -$NAMElink='stage=NAMEDOWN'; -$LEVELlink='stage=LEVELDOWN'; -$GROUPlink='stage=GROUPDOWN'; -$SQLorder='order by full_name'; -if (eregi("USERIDUP",$stage)) {$SQLorder='order by user asc'; $USERlink='stage=USERIDDOWN';} -if (eregi("USERIDDOWN",$stage)) {$SQLorder='order by user desc'; $USERlink='stage=USERIDUP';} -if (eregi("NAMEUP",$stage)) {$SQLorder='order by full_name asc'; $NAMElink='stage=NAMEDOWN';} -if (eregi("NAMEDOWN",$stage)) {$SQLorder='order by full_name desc'; $NAMElink='stage=NAMEUP';} -if (eregi("LEVELUP",$stage)) {$SQLorder='order by user_level asc'; $LEVELlink='stage=LEVELDOWN';} -if (eregi("LEVELDOWN",$stage)) {$SQLorder='order by user_level desc'; $LEVELlink='stage=LEVELUP';} -if (eregi("GROUPUP",$stage)) {$SQLorder='order by user_group asc'; $GROUPlink='stage=GROUPDOWN';} -if (eregi("GROUPDOWN",$stage)) {$SQLorder='order by user_group desc'; $GROUPlink='stage=GROUPUP';} - $stmt="SELECT * from vicidial_users $SQLorder"; - $rslt=mysql_query($stmt, $link); - $people_to_print = mysql_num_rows($rslt); - -echo "
USER LISTINGS:\n"; -echo "
\n"; -echo ""; -echo ""; -echo ""; -echo ""; -echo ""; -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 "
USER IDFULL NAMELEVELGROUPLINKS
$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 ""; - - $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"; -} - -###################### -# ADD=10000000000 display all phones -###################### -if ($ADD==10000000000) -{ -echo "
\n"; -echo ""; - -$EXTENlink='stage=EXTENDOWN'; -$PROTOlink='stage=PROTODOWN'; -$SERVERlink='stage=SERVERDOWN'; -$STATUSlink='stage=STATUSDOWN'; -$SQLorder='order by extension,server_ip'; -if (eregi("EXTENUP",$stage)) {$SQLorder='order by extension asc'; $EXTENlink='stage=EXTENDOWN';} -if (eregi("EXTENDOWN",$stage)) {$SQLorder='order by extension desc'; $EXTENlink='stage=EXTENUP';} -if (eregi("PROTOUP",$stage)) {$SQLorder='order by protocol asc'; $PROTOlink='stage=PROTODOWN';} -if (eregi("PROTODOWN",$stage)) {$SQLorder='order by protocol desc'; $PROTOlink='stage=PROTOUP';} -if (eregi("SERVERUP",$stage)) {$SQLorder='order by server_ip asc'; $SERVERlink='stage=SERVERDOWN';} -if (eregi("SERVERDOWN",$stage)) {$SQLorder='order by server_ip desc'; $SERVERlink='stage=SERVERUP';} -if (eregi("STATUSUP",$stage)) {$SQLorder='order by status asc'; $STATUSlink='stage=STATUSDOWN';} -if (eregi("STATUSDOWN",$stage)) {$SQLorder='order by status desc'; $STATUSlink='stage=STATUSUP';} - $stmt="SELECT * from phones $SQLorder"; - $rslt=mysql_query($stmt, $link); - $phones_to_print = mysql_num_rows($rslt); - -echo "
PHONE LISTINGS:\n"; -echo "
\n"; -echo ""; -echo ""; -echo ""; -echo ""; -echo ""; -echo ""; -echo ""; -echo ""; -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 "
EXTENPROTOSERVERDIALPLANSTATUSNAMEVMAILLINKS
$row[0]$row[16]$row[5]$row[1]$row[2]$row[8]$row[11]$row[14]$row[15]MODIFY | STATS
\n"; -} - -###################### -# ADD=100000000000 display all servers -###################### -if ($ADD==100000000000) -{ -echo "
\n"; - 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=1000000000000 display all conferences -###################### -if ($ADD==1000000000000) -{ -echo "
\n"; - 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"; -} - -###################### -# ADD=10000000000000 display all vicidial conferences -###################### -if ($ADD==10000000000000) -{ -echo "
\n"; - echo ""; - - $stmt="SELECT * from vicidial_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"; -} - - - - -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 ### -} -?> + LICENSE: GPLv2 +# + + +require("dbconnect.php"); + +$page_width='750'; +$section_width='700'; +$header_font_size='3'; +$subheader_font_size='2'; +$header_selected_bold=''; +$header_nonselected_bold=''; +$users_color = '#FFFF99'; +$campaigns_color = '#FFCC99'; +$lists_color = '#FFCCCC'; +$ingroups_color = '#CC99FF'; +$remoteagent_color ='#CCFFCC'; +$usergroups_color = '#CCFFFF'; +$scripts_color = '#99FFCC'; +$filters_color = '#CCCCCC'; +$admin_color = '#FF99FF'; +$reports_color = '#99FF33'; +#$users_color = '#FFFF99'; +#$campaigns_color = '#FFFF99'; +#$lists_color = '#FFFF99'; +#$ingroups_color = '#FFFF99'; +#$remoteagent_color ='#FFFF99'; +#$usergroups_color = '#FFFF99'; +#$scripts_color = '#FFFF99'; +#$filters_color = '#FFFF99'; +#$admin_color = '#FFFF99'; +#$reports_color = '#FFFF99'; + $times_color = '#CCCC00'; + $phones_color = '#CCCC00'; + $conference_color = '#CCCC00'; + $server_color = '#CCCC00'; + $settings_color = '#CCCC00'; +$users_font = 'BLACK'; +$campaigns_font = 'BLACK'; +$lists_font = 'BLACK'; +$ingroups_font = 'BLACK'; +$remoteagent_font = 'BLACK'; +$usergroups_font = 'BLACK'; +$scripts_font = 'BLACK'; +$filters_font = 'BLACK'; +$admin_font = 'BLACK'; +$reports_font = 'BLACK'; + $times_font = 'BLACK'; + $phones_font = 'BLACK'; + $conference_font = 'BLACK'; + $server_font = 'BLACK'; + $settings_font = 'BLACK'; + +$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; +$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; +$PHP_SELF=$_SERVER['PHP_SELF']; + +if (isset($_GET["DB"])) {$DB=$_GET["DB"];} + elseif (isset($_POST["DB"])) {$DB=$_POST["DB"];} +if (isset($_GET["active"])) {$active=$_GET["active"];} + elseif (isset($_POST["active"])) {$active=$_POST["active"];} +if (isset($_GET["adaptive_dl_diff_target"])) {$adaptive_dl_diff_target=$_GET["adaptive_dl_diff_target"];} + elseif (isset($_POST["adaptive_dl_diff_target"])) {$adaptive_dl_diff_target=$_POST["adaptive_dl_diff_target"];} +if (isset($_GET["adaptive_dropped_percentage"])) {$adaptive_dropped_percentage=$_GET["adaptive_dropped_percentage"];} + elseif (isset($_POST["adaptive_dropped_percentage"])){$adaptive_dropped_percentage=$_POST["adaptive_dropped_percentage"];} +if (isset($_GET["adaptive_intensity"])) {$adaptive_intensity=$_GET["adaptive_intensity"];} + elseif (isset($_POST["adaptive_intensity"])) {$adaptive_intensity=$_POST["adaptive_intensity"];} +if (isset($_GET["adaptive_latest_server_time"])) {$adaptive_latest_server_time=$_GET["adaptive_latest_server_time"];} + elseif (isset($_POST["adaptive_latest_server_time"])){$adaptive_latest_server_time=$_POST["adaptive_latest_server_time"];} +if (isset($_GET["adaptive_maximum_level"])) {$adaptive_maximum_level=$_GET["adaptive_maximum_level"];} + elseif (isset($_POST["adaptive_maximum_level"])) {$adaptive_maximum_level=$_POST["adaptive_maximum_level"];} +if (isset($_GET["ADD"])) {$ADD=$_GET["ADD"];} + elseif (isset($_POST["ADD"])) {$ADD=$_POST["ADD"];} +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["AFLogging_enabled"])) {$AFLogging_enabled=$_GET["AFLogging_enabled"];} + elseif (isset($_POST["AFLogging_enabled"])) {$AFLogging_enabled=$_POST["AFLogging_enabled"];} +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["agentcall_manual"])) {$agentcall_manual=$_GET["agentcall_manual"];} + elseif (isset($_POST["agentcall_manual"])) {$agentcall_manual=$_POST["agentcall_manual"];} +if (isset($_GET["agentonly_callbacks"])) {$agentonly_callbacks=$_GET["agentonly_callbacks"];} + elseif (isset($_POST["agentonly_callbacks"])) {$agentonly_callbacks=$_POST["agentonly_callbacks"];} +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["agi_output"])) {$agi_output=$_GET["agi_output"];} + elseif (isset($_POST["agi_output"])) {$agi_output=$_POST["agi_output"];} +if (isset($_GET["allcalls_delay"])) {$allcalls_delay=$_GET["allcalls_delay"];} + elseif (isset($_POST["allcalls_delay"])) {$allcalls_delay=$_POST["allcalls_delay"];} +if (isset($_GET["allow_closers"])) {$allow_closers=$_GET["allow_closers"];} + elseif (isset($_POST["allow_closers"])) {$allow_closers=$_POST["allow_closers"];} +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["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["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["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["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["asterisk_version"])) {$asterisk_version=$_GET["asterisk_version"];} + elseif (isset($_POST["asterisk_version"])) {$asterisk_version=$_POST["asterisk_version"];} +if (isset($_GET["ASTmgrSECRET"])) {$ASTmgrSECRET=$_GET["ASTmgrSECRET"];} + elseif (isset($_POST["ASTmgrSECRET"])) {$ASTmgrSECRET=$_POST["ASTmgrSECRET"];} +if (isset($_GET["ASTmgrUSERNAME"])) {$ASTmgrUSERNAME=$_GET["ASTmgrUSERNAME"];} + elseif (isset($_POST["ASTmgrUSERNAME"])) {$ASTmgrUSERNAME=$_POST["ASTmgrUSERNAME"];} +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["ASTmgrUSERNAMEupdate"])) {$ASTmgrUSERNAMEupdate=$_GET["ASTmgrUSERNAMEupdate"];} + elseif (isset($_POST["ASTmgrUSERNAMEupdate"])) {$ASTmgrUSERNAMEupdate=$_POST["ASTmgrUSERNAMEupdate"];} +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($_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["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["available_only_ratio_tally"])) {$available_only_ratio_tally=$_GET["available_only_ratio_tally"];} + elseif (isset($_POST["available_only_ratio_tally"])){$available_only_ratio_tally=$_POST["available_only_ratio_tally"];} +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["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["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["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["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["campaign_cid"])) {$campaign_cid=$_GET["campaign_cid"];} + elseif (isset($_POST["campaign_cid"])) {$campaign_cid=$_POST["campaign_cid"];} +if (isset($_GET["campaign_detail"])) {$campaign_detail=$_GET["campaign_detail"];} + elseif (isset($_POST["campaign_detail"])) {$campaign_detail=$_POST["campaign_detail"];} +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["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_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["campaign_recording"])) {$campaign_recording=$_GET["campaign_recording"];} + elseif (isset($_POST["campaign_recording"])) {$campaign_recording=$_POST["campaign_recording"];} +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["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["client_browser"])) {$client_browser=$_GET["client_browser"];} + elseif (isset($_POST["client_browser"])) {$client_browser=$_POST["client_browser"];} +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["company"])) {$company=$_GET["company"];} + elseif (isset($_POST["company"])) {$company=$_POST["company"];} +if (isset($_GET["computer_ip"])) {$computer_ip=$_GET["computer_ip"];} + elseif (isset($_POST["computer_ip"])) {$computer_ip=$_POST["computer_ip"];} +if (isset($_GET["conf_exten"])) {$conf_exten=$_GET["conf_exten"];} + elseif (isset($_POST["conf_exten"])) {$conf_exten=$_POST["conf_exten"];} +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["conferencing_enabled"])) {$conferencing_enabled=$_GET["conferencing_enabled"];} + elseif (isset($_POST["conferencing_enabled"])) {$conferencing_enabled=$_POST["conferencing_enabled"];} +if (isset($_GET["CoNfIrM"])) {$CoNfIrM=$_GET["CoNfIrM"];} + elseif (isset($_POST["CoNfIrM"])) {$CoNfIrM=$_POST["CoNfIrM"];} +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_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_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_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["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_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_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["DBX_database"])) {$DBX_database=$_GET["DBX_database"];} + elseif (isset($_POST["DBX_database"])) {$DBX_database=$_POST["DBX_database"];} +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["DBX_server"])) {$DBX_server=$_GET["DBX_server"];} + elseif (isset($_POST["DBX_server"])) {$DBX_server=$_POST["DBX_server"];} +if (isset($_GET["DBX_user"])) {$DBX_user=$_GET["DBX_user"];} + elseif (isset($_POST["DBX_user"])) {$DBX_user=$_POST["DBX_user"];} +if (isset($_GET["DBY_database"])) {$DBY_database=$_GET["DBY_database"];} + elseif (isset($_POST["DBY_database"])) {$DBY_database=$_POST["DBY_database"];} +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["DBY_server"])) {$DBY_server=$_GET["DBY_server"];} + elseif (isset($_POST["DBY_server"])) {$DBY_server=$_POST["DBY_server"];} +if (isset($_GET["DBY_user"])) {$DBY_user=$_GET["DBY_user"];} + elseif (isset($_POST["DBY_user"])) {$DBY_user=$_POST["DBY_user"];} +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["delete_campaigns"])) {$delete_campaigns=$_GET["delete_campaigns"];} + elseif (isset($_POST["delete_campaigns"])) {$delete_campaigns=$_POST["delete_campaigns"];} +if (isset($_GET["delete_filters"])) {$delete_filters=$_GET["delete_filters"];} + elseif (isset($_POST["delete_filters"])) {$delete_filters=$_POST["delete_filters"];} +if (isset($_GET["delete_ingroups"])) {$delete_ingroups=$_GET["delete_ingroups"];} + elseif (isset($_POST["delete_ingroups"])) {$delete_ingroups=$_POST["delete_ingroups"];} +if (isset($_GET["delete_lists"])) {$delete_lists=$_GET["delete_lists"];} + elseif (isset($_POST["delete_lists"])) {$delete_lists=$_POST["delete_lists"];} +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["delete_scripts"])) {$delete_scripts=$_GET["delete_scripts"];} + elseif (isset($_POST["delete_scripts"])) {$delete_scripts=$_POST["delete_scripts"];} +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_users"])) {$delete_users=$_GET["delete_users"];} + elseif (isset($_POST["delete_users"])) {$delete_users=$_POST["delete_users"];} +if (isset($_GET["dial_method"])) {$dial_method=$_GET["dial_method"];} + elseif (isset($_POST["dial_method"])) {$dial_method=$_POST["dial_method"];} +if (isset($_GET["dial_prefix"])) {$dial_prefix=$_GET["dial_prefix"];} + elseif (isset($_POST["dial_prefix"])) {$dial_prefix=$_POST["dial_prefix"];} +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["dial_timeout"])) {$dial_timeout=$_GET["dial_timeout"];} + elseif (isset($_POST["dial_timeout"])) {$dial_timeout=$_POST["dial_timeout"];} +if (isset($_GET["dialplan_number"])) {$dialplan_number=$_GET["dialplan_number"];} + elseif (isset($_POST["dialplan_number"])) {$dialplan_number=$_POST["dialplan_number"];} +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["drop_exten"])) {$drop_exten=$_GET["drop_exten"];} + elseif (isset($_POST["drop_exten"])) {$drop_exten=$_POST["drop_exten"];} +if (isset($_GET["drop_message"])) {$drop_message=$_GET["drop_message"];} + elseif (isset($_POST["drop_message"])) {$drop_message=$_POST["drop_message"];} +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["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["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["ext_context"])) {$ext_context=$_GET["ext_context"];} + elseif (isset($_POST["ext_context"])) {$ext_context=$_POST["ext_context"];} +if (isset($_GET["extension"])) {$extension=$_GET["extension"];} + elseif (isset($_POST["extension"])) {$extension=$_POST["extension"];} +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["force_logout"])) {$force_logout=$_GET["force_logout"];} + elseif (isset($_POST["force_logout"])) {$force_logout=$_POST["force_logout"];} +if (isset($_GET["fronter_display"])) {$fronter_display=$_GET["fronter_display"];} + elseif (isset($_POST["fronter_display"])) {$fronter_display=$_POST["fronter_display"];} +if (isset($_GET["full_name"])) {$full_name=$_GET["full_name"];} + elseif (isset($_POST["full_name"])) {$full_name=$_POST["full_name"];} +if (isset($_GET["fullname"])) {$fullname=$_GET["fullname"];} + elseif (isset($_POST["fullname"])) {$fullname=$_POST["fullname"];} +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["group_color"])) {$group_color=$_GET["group_color"];} + elseif (isset($_POST["group_color"])) {$group_color=$_POST["group_color"];} +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["groups"])) {$groups=$_GET["groups"];} + elseif (isset($_POST["groups"])) {$groups=$_POST["groups"];} +if (isset($_GET["HKstatus"])) {$HKstatus=$_GET["HKstatus"];} + elseif (isset($_POST["HKstatus"])) {$HKstatus=$_POST["HKstatus"];} +if (isset($_GET["hopper_level"])) {$hopper_level=$_GET["hopper_level"];} + elseif (isset($_POST["hopper_level"])) {$hopper_level=$_POST["hopper_level"];} +if (isset($_GET["hotkey"])) {$hotkey=$_GET["hotkey"];} + elseif (isset($_POST["hotkey"])) {$hotkey=$_POST["hotkey"];} +if (isset($_GET["hotkeys_active"])) {$hotkeys_active=$_GET["hotkeys_active"];} + elseif (isset($_POST["hotkeys_active"])) {$hotkeys_active=$_POST["hotkeys_active"];} +if (isset($_GET["install_directory"])) {$install_directory=$_GET["install_directory"];} + elseif (isset($_POST["install_directory"])) {$install_directory=$_POST["install_directory"];} +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_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_sql"])) {$lead_filter_sql=$_GET["lead_filter_sql"];} + elseif (isset($_POST["lead_filter_sql"])) {$lead_filter_sql=$_POST["lead_filter_sql"];} +if (isset($_GET["lead_order"])) {$lead_order=$_GET["lead_order"];} + elseif (isset($_POST["lead_order"])) {$lead_order=$_POST["lead_order"];} +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["load_leads"])) {$load_leads=$_GET["load_leads"];} + elseif (isset($_POST["load_leads"])) {$load_leads=$_POST["load_leads"];} +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["local_gmt"])) {$local_gmt=$_GET["local_gmt"];} + elseif (isset($_POST["local_gmt"])) {$local_gmt=$_POST["local_gmt"];} +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["login"])) {$login=$_GET["login"];} + elseif (isset($_POST["login"])) {$login=$_POST["login"];} +if (isset($_GET["login_campaign"])) {$login_campaign=$_GET["login_campaign"];} + elseif (isset($_POST["login_campaign"])) {$login_campaign=$_POST["login_campaign"];} +if (isset($_GET["login_pass"])) {$login_pass=$_GET["login_pass"];} + elseif (isset($_POST["login_pass"])) {$login_pass=$_POST["login_pass"];} +if (isset($_GET["login_user"])) {$login_user=$_GET["login_user"];} + elseif (isset($_POST["login_user"])) {$login_user=$_POST["login_user"];} +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["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["modify_leads"])) {$modify_leads=$_GET["modify_leads"];} + elseif (isset($_POST["modify_leads"])) {$modify_leads=$_POST["modify_leads"];} +if (isset($_GET["monitor_prefix"])) {$monitor_prefix=$_GET["monitor_prefix"];} + elseif (isset($_POST["monitor_prefix"])) {$monitor_prefix=$_POST["monitor_prefix"];} +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["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["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["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["old_extension"])) {$old_extension=$_GET["old_extension"];} + elseif (isset($_POST["old_extension"])) {$old_extension=$_POST["old_extension"];} +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["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["OLDuser_group"])) {$OLDuser_group=$_GET["OLDuser_group"];} + elseif (isset($_POST["OLDuser_group"])) {$OLDuser_group=$_POST["OLDuser_group"];} +if (isset($_GET["omit_phone_code"])) {$omit_phone_code=$_GET["omit_phone_code"];} + elseif (isset($_POST["omit_phone_code"])) {$omit_phone_code=$_POST["omit_phone_code"];} +if (isset($_GET["outbound_cid"])) {$outbound_cid=$_GET["outbound_cid"];} + elseif (isset($_POST["outbound_cid"])) {$outbound_cid=$_POST["outbound_cid"];} +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["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["pass"])) {$pass=$_GET["pass"];} + elseif (isset($_POST["pass"])) {$pass=$_POST["pass"];} +if (isset($_GET["phone_ip"])) {$phone_ip=$_GET["phone_ip"];} + elseif (isset($_POST["phone_ip"])) {$phone_ip=$_POST["phone_ip"];} +if (isset($_GET["phone_login"])) {$phone_login=$_GET["phone_login"];} + elseif (isset($_POST["phone_login"])) {$phone_login=$_POST["phone_login"];} +if (isset($_GET["phone_number"])) {$phone_number=$_GET["phone_number"];} + elseif (isset($_POST["phone_number"])) {$phone_number=$_POST["phone_number"];} +if (isset($_GET["phone_pass"])) {$phone_pass=$_GET["phone_pass"];} + elseif (isset($_POST["phone_pass"])) {$phone_pass=$_POST["phone_pass"];} +if (isset($_GET["phone_type"])) {$phone_type=$_GET["phone_type"];} + elseif (isset($_POST["phone_type"])) {$phone_type=$_POST["phone_type"];} +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["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["recording_exten"])) {$recording_exten=$_GET["recording_exten"];} + elseif (isset($_POST["recording_exten"])) {$recording_exten=$_POST["recording_exten"];} +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["reset_hopper"])) {$reset_hopper=$_GET["reset_hopper"];} + elseif (isset($_POST["reset_hopper"])) {$reset_hopper=$_POST["reset_hopper"];} +if (isset($_GET["reset_list"])) {$reset_list=$_GET["reset_list"];} + elseif (isset($_POST["reset_list"])) {$reset_list=$_POST["reset_list"];} +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["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["scheduled_callbacks"])) {$scheduled_callbacks=$_GET["scheduled_callbacks"];} + elseif (isset($_POST["scheduled_callbacks"])) {$scheduled_callbacks=$_POST["scheduled_callbacks"];} +if (isset($_GET["script_comments"])) {$script_comments=$_GET["script_comments"];} + elseif (isset($_POST["script_comments"])) {$script_comments=$_POST["script_comments"];} +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_text"])) {$script_text=$_GET["script_text"];} + elseif (isset($_POST["script_text"])) {$script_text=$_POST["script_text"];} +if (isset($_GET["selectable"])) {$selectable=$_GET["selectable"];} + elseif (isset($_POST["selectable"])) {$selectable=$_POST["selectable"];} +if (isset($_GET["server_description"])) {$server_description=$_GET["server_description"];} + elseif (isset($_POST["server_description"])) {$server_description=$_POST["server_description"];} +if (isset($_GET["server_id"])) {$server_id=$_GET["server_id"];} + elseif (isset($_POST["server_id"])) {$server_id=$_POST["server_id"];} +if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} + elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} +if (isset($_GET["stage"])) {$stage=$_GET["stage"];} + elseif (isset($_POST["stage"])) {$stage=$_POST["stage"];} +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["status"])) {$status=$_GET["status"];} + elseif (isset($_POST["status"])) {$status=$_POST["status"];} +if (isset($_GET["status_name"])) {$status_name=$_GET["status_name"];} + elseif (isset($_POST["status_name"])) {$status_name=$_POST["status_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"];} +if (isset($_GET["sys_perf_log"])) {$sys_perf_log=$_GET["sys_perf_log"];} + elseif (isset($_POST["sys_perf_log"])) {$sys_perf_log=$_POST["sys_perf_log"];} +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["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["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["user"])) {$user=$_GET["user"];} + elseif (isset($_POST["user"])) {$user=$_POST["user"];} +if (isset($_GET["user_group"])) {$user_group=$_GET["user_group"];} + elseif (isset($_POST["user_group"])) {$user_group=$_POST["user_group"];} +if (isset($_GET["user_level"])) {$user_level=$_GET["user_level"];} + elseif (isset($_POST["user_level"])) {$user_level=$_POST["user_level"];} +if (isset($_GET["user_start"])) {$user_start=$_GET["user_start"];} + elseif (isset($_POST["user_start"])) {$user_start=$_POST["user_start"];} +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["vd_server_logs"])) {$vd_server_logs=$_GET["vd_server_logs"];} + elseif (isset($_POST["vd_server_logs"])) {$vd_server_logs=$_POST["vd_server_logs"];} +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["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["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["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["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["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["voicemail_ext"])) {$voicemail_ext=$_GET["voicemail_ext"];} + elseif (isset($_POST["voicemail_ext"])) {$voicemail_ext=$_POST["voicemail_ext"];} +if (isset($_GET["voicemail_exten"])) {$voicemail_exten=$_GET["voicemail_exten"];} + elseif (isset($_POST["voicemail_exten"])) {$voicemail_exten=$_POST["voicemail_exten"];} +if (isset($_GET["voicemail_id"])) {$voicemail_id=$_GET["voicemail_id"];} + elseif (isset($_POST["voicemail_id"])) {$voicemail_id=$_POST["voicemail_id"];} +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["wrapup_message"])) {$wrapup_message=$_GET["wrapup_message"];} + elseif (isset($_POST["wrapup_message"])) {$wrapup_message=$_POST["wrapup_message"];} +if (isset($_GET["wrapup_seconds"])) {$wrapup_seconds=$_GET["wrapup_seconds"];} + elseif (isset($_POST["wrapup_seconds"])) {$wrapup_seconds=$_POST["wrapup_seconds"];} +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["vicidial_balance_active"])) {$vicidial_balance_active=$_GET["vicidial_balance_active"];} + elseif (isset($_POST["vicidial_balance_active"])) {$vicidial_balance_active=$_POST["vicidial_balance_active"];} +if (isset($_GET["balance_trunks_offlimits"])) {$balance_trunks_offlimits=$_GET["balance_trunks_offlimits"];} + elseif (isset($_POST["balance_trunks_offlimits"])) {$balance_trunks_offlimits=$_POST["balance_trunks_offlimits"];} +if (isset($_GET["dedicated_trunks"])) {$dedicated_trunks=$_GET["dedicated_trunks"];} + elseif (isset($_POST["dedicated_trunks"])) {$dedicated_trunks=$_POST["dedicated_trunks"];} +if (isset($_GET["trunk_restriction"])) {$trunk_restriction=$_GET["trunk_restriction"];} + elseif (isset($_POST["trunk_restriction"])) {$trunk_restriction=$_POST["trunk_restriction"];} +if (isset($_GET["campaigns"])) {$campaigns=$_GET["campaigns"];} + elseif (isset($_POST["campaigns"])) {$campaigns=$_POST["campaigns"];} +if (isset($_GET["dial_level_override"])) {$dial_level_override=$_GET["dial_level_override"];} + elseif (isset($_POST["dial_level_override"])) {$dial_level_override=$_POST["dial_level_override"];} +if (isset($_GET["concurrent_transfers"])) {$concurrent_transfers=$_GET["concurrent_transfers"];} + elseif (isset($_POST["concurrent_transfers"])) {$concurrent_transfers=$_POST["concurrent_transfers"];} +if (isset($_GET["auto_alt_dial"])) {$auto_alt_dial=$_GET["auto_alt_dial"];} + elseif (isset($_POST["auto_alt_dial"])) {$auto_alt_dial=$_POST["auto_alt_dial"];} +if (isset($_GET["modify_users"])) {$modify_users=$_GET["modify_users"];} + elseif (isset($_POST["modify_users"])) {$modify_users=$_POST["modify_users"];} +if (isset($_GET["modify_campaigns"])) {$modify_campaigns=$_GET["modify_campaigns"];} + elseif (isset($_POST["modify_campaigns"])) {$modify_campaigns=$_POST["modify_campaigns"];} +if (isset($_GET["modify_lists"])) {$modify_lists=$_GET["modify_lists"];} + elseif (isset($_POST["modify_lists"])) {$modify_lists=$_POST["modify_lists"];} +if (isset($_GET["modify_scripts"])) {$modify_scripts=$_GET["modify_scripts"];} + elseif (isset($_POST["modify_scripts"])) {$modify_scripts=$_POST["modify_scripts"];} +if (isset($_GET["modify_filters"])) {$modify_filters=$_GET["modify_filters"];} + elseif (isset($_POST["modify_filters"])) {$modify_filters=$_POST["modify_filters"];} +if (isset($_GET["modify_ingroups"])) {$modify_ingroups=$_GET["modify_ingroups"];} + elseif (isset($_POST["modify_ingroups"])) {$modify_ingroups=$_POST["modify_ingroups"];} +if (isset($_GET["modify_usergroups"])) {$modify_usergroups=$_GET["modify_usergroups"];} + elseif (isset($_POST["modify_usergroups"])) {$modify_usergroups=$_POST["modify_usergroups"];} +if (isset($_GET["modify_remoteagents"])) {$modify_remoteagents=$_GET["modify_remoteagents"];} + elseif (isset($_POST["modify_remoteagents"])) {$modify_remoteagents=$_POST["modify_remoteagents"];} +if (isset($_GET["modify_servers"])) {$modify_servers=$_GET["modify_servers"];} + elseif (isset($_POST["modify_servers"])) {$modify_servers=$_POST["modify_servers"];} +if (isset($_GET["view_reports"])) {$view_reports=$_GET["view_reports"];} + elseif (isset($_POST["view_reports"])) {$view_reports=$_POST["view_reports"];} +if (isset($_GET["agent_pause_codes_active"])) {$agent_pause_codes_active=$_GET["agent_pause_codes_active"];} + elseif (isset($_POST["agent_pause_codes_active"])) {$agent_pause_codes_active=$_POST["agent_pause_codes_active"];} +if (isset($_GET["pause_code"])) {$pause_code=$_GET["pause_code"];} + elseif (isset($_POST["pause_code"])) {$pause_code=$_POST["pause_code"];} +if (isset($_GET["pause_code_name"])) {$pause_code_name=$_GET["pause_code_name"];} + elseif (isset($_POST["pause_code_name"])) {$pause_code_name=$_POST["pause_code_name"];} +if (isset($_GET["billable"])) {$billable=$_GET["billable"];} + elseif (isset($_POST["billable"])) {$billable=$_POST["billable"];} +if (isset($_GET["campaign_description"])) {$campaign_description=$_GET["campaign_description"];} + elseif (isset($_POST["campaign_description"])) {$campaign_description=$_POST["campaign_description"];} +if (isset($_GET["campaign_stats_refresh"])) {$campaign_stats_refresh=$_GET["campaign_stats_refresh"];} + elseif (isset($_POST["campaign_stats_refresh"])){$campaign_stats_refresh=$_POST["campaign_stats_refresh"];} +if (isset($_GET["list_description"])) {$list_description=$_GET["list_description"];} + elseif (isset($_POST["list_description"])) {$list_description=$_POST["list_description"];} +if (isset($_GET["vicidial_recording_override"])) {$vicidial_recording_override=$_GET["vicidial_recording_override"];} elseif (isset($_POST["vicidial_recording_override"])) {$vicidial_recording_override=$_POST["vicidial_recording_override"];} +if (isset($_GET["use_non_latin"])) {$use_non_latin=$_GET["use_non_latin"];} + elseif (isset($_POST["use_non_latin"])) {$use_non_latin=$_POST["use_non_latin"];} +if (isset($_GET["webroot_writable"])) {$webroot_writable=$_GET["webroot_writable"];} + elseif (isset($_POST["webroot_writable"])) {$webroot_writable=$_POST["webroot_writable"];} +if (isset($_GET["enable_queuemetrics_logging"])) {$enable_queuemetrics_logging=$_GET["enable_queuemetrics_logging"];} + elseif (isset($_POST["enable_queuemetrics_logging"])) {$enable_queuemetrics_logging=$_POST["enable_queuemetrics_logging"];} +if (isset($_GET["queuemetrics_server_ip"])) {$queuemetrics_server_ip=$_GET["queuemetrics_server_ip"];} + elseif (isset($_POST["queuemetrics_server_ip"])) {$queuemetrics_server_ip=$_POST["queuemetrics_server_ip"];} +if (isset($_GET["queuemetrics_dbname"])) {$queuemetrics_dbname=$_GET["queuemetrics_dbname"];} + elseif (isset($_POST["queuemetrics_dbname"])) {$queuemetrics_dbname=$_POST["queuemetrics_dbname"];} +if (isset($_GET["queuemetrics_login"])) {$queuemetrics_login=$_GET["queuemetrics_login"];} + elseif (isset($_POST["queuemetrics_login"])) {$queuemetrics_login=$_POST["queuemetrics_login"];} +if (isset($_GET["queuemetrics_pass"])) {$queuemetrics_pass=$_GET["queuemetrics_pass"];} + elseif (isset($_POST["queuemetrics_pass"])) {$queuemetrics_pass=$_POST["queuemetrics_pass"];} +if (isset($_GET["queuemetrics_url"])) {$queuemetrics_url=$_GET["queuemetrics_url"];} + elseif (isset($_POST["queuemetrics_url"])) {$queuemetrics_url=$_POST["queuemetrics_url"];} +if (isset($_GET["queuemetrics_log_id"])) {$queuemetrics_log_id=$_GET["queuemetrics_log_id"];} + elseif (isset($_POST["queuemetrics_log_id"])) {$queuemetrics_log_id=$_POST["queuemetrics_log_id"];} +if (isset($_GET["dial_status"])) {$dial_status=$_GET["dial_status"];} + elseif (isset($_POST["dial_status"])) {$dial_status=$_POST["dial_status"];} +if (isset($_GET["queuemetrics_eq_prepend"])) {$queuemetrics_eq_prepend=$_GET["queuemetrics_eq_prepend"];} + elseif (isset($_POST["queuemetrics_eq_prepend"])) {$queuemetrics_eq_prepend=$_POST["queuemetrics_eq_prepend"];} +if (isset($_GET["vicidial_agent_disable"])) {$vicidial_agent_disable=$_GET["vicidial_agent_disable"];} + elseif (isset($_POST["vicidial_agent_disable"])) {$vicidial_agent_disable=$_POST["vicidial_agent_disable"];} +if (isset($_GET["disable_alter_custdata"])) {$disable_alter_custdata=$_GET["disable_alter_custdata"];} + elseif (isset($_POST["disable_alter_custdata"])) {$disable_alter_custdata=$_POST["disable_alter_custdata"];} +if (isset($_GET["alter_custdata_override"])) {$alter_custdata_override=$_GET["alter_custdata_override"];} + elseif (isset($_POST["alter_custdata_override"])) {$alter_custdata_override=$_POST["alter_custdata_override"];} +if (isset($_GET["no_hopper_leads_logins"])) {$no_hopper_leads_logins=$_GET["no_hopper_leads_logins"];} + elseif (isset($_POST["no_hopper_leads_logins"])) {$no_hopper_leads_logins=$_POST["no_hopper_leads_logins"];} +if (isset($_GET["enable_sipsak_messages"])) {$enable_sipsak_messages=$_GET["enable_sipsak_messages"];} + elseif (isset($_POST["enable_sipsak_messages"])) {$enable_sipsak_messages=$_POST["enable_sipsak_messages"];} +if (isset($_GET["allow_sipsak_messages"])) {$allow_sipsak_messages=$_GET["allow_sipsak_messages"];} + elseif (isset($_POST["allow_sipsak_messages"])) {$allow_sipsak_messages=$_POST["allow_sipsak_messages"];} +if (isset($_GET["admin_home_url"])) {$admin_home_url=$_GET["admin_home_url"];} + elseif (isset($_POST["admin_home_url"])) {$admin_home_url=$_POST["admin_home_url"];} + + + if (isset($script_id)) {$script_id= strtoupper($script_id);} + if (isset($lead_filter_id)) {$lead_filter_id = strtoupper($lead_filter_id);} + +if (strlen($dial_status) > 0) + { + $ADD='28'; + $status = $dial_status; + } + +##### BEGIN VARIABLE FILTERING FOR SECURITY ##### + +if ($non_latin < 1) +{ +### DIGITS ONLY ### +$adaptive_dropped_percentage = ereg_replace("[^0-9]","",$adaptive_dropped_percentage); +$adaptive_latest_server_time = ereg_replace("[^0-9]","",$adaptive_latest_server_time); +$admin_hangup_enabled = ereg_replace("[^0-9]","",$admin_hangup_enabled); +$admin_hijack_enabled = ereg_replace("[^0-9]","",$admin_hijack_enabled); +$admin_monitor_enabled = ereg_replace("[^0-9]","",$admin_monitor_enabled); +$AFLogging_enabled = ereg_replace("[^0-9]","",$AFLogging_enabled); +$agent_choose_ingroups = ereg_replace("[^0-9]","",$agent_choose_ingroups); +$agentcall_manual = ereg_replace("[^0-9]","",$agentcall_manual); +$agentonly_callbacks = ereg_replace("[^0-9]","",$agentonly_callbacks); +$AGI_call_logging_enabled = ereg_replace("[^0-9]","",$AGI_call_logging_enabled); +$allcalls_delay = ereg_replace("[^0-9]","",$allcalls_delay); +$alter_agent_interface_options = ereg_replace("[^0-9]","",$alter_agent_interface_options); +$am_message_exten = ereg_replace("[^0-9]","",$am_message_exten); +$answer_transfer_agent = ereg_replace("[^0-9]","",$answer_transfer_agent); +$ast_admin_access = ereg_replace("[^0-9]","",$ast_admin_access); +$ast_delete_phones = ereg_replace("[^0-9]","",$ast_delete_phones); +$attempt_delay = ereg_replace("[^0-9]","",$attempt_delay); +$attempt_maximum = ereg_replace("[^0-9]","",$attempt_maximum); +$auto_dial_next_number = ereg_replace("[^0-9]","",$auto_dial_next_number); +$balance_trunks_offlimits = ereg_replace("[^0-9]","",$balance_trunks_offlimits); +$call_parking_enabled = ereg_replace("[^0-9]","",$call_parking_enabled); +$CallerID_popup_enabled = ereg_replace("[^0-9]","",$CallerID_popup_enabled); +$campaign_detail = ereg_replace("[^0-9]","",$campaign_detail); +$campaign_rec_exten = ereg_replace("[^0-9]","",$campaign_rec_exten); +$campaign_vdad_exten = ereg_replace("[^0-9]","",$campaign_vdad_exten); +$change_agent_campaign = ereg_replace("[^0-9]","",$change_agent_campaign); +$closer_default_blended = ereg_replace("[^0-9]","",$closer_default_blended); +$conf_exten = ereg_replace("[^0-9]","",$conf_exten); +$conf_on_extension = ereg_replace("[^0-9]","",$conf_on_extension); +$conferencing_enabled = ereg_replace("[^0-9]","",$conferencing_enabled); +$ct_default_start = ereg_replace("[^0-9]","",$ct_default_start); +$ct_default_stop = ereg_replace("[^0-9]","",$ct_default_stop); +$ct_friday_start = ereg_replace("[^0-9]","",$ct_friday_start); +$ct_friday_stop = ereg_replace("[^0-9]","",$ct_friday_stop); +$ct_monday_start = ereg_replace("[^0-9]","",$ct_monday_start); +$ct_monday_stop = ereg_replace("[^0-9]","",$ct_monday_stop); +$ct_saturday_start = ereg_replace("[^0-9]","",$ct_saturday_start); +$ct_saturday_stop = ereg_replace("[^0-9]","",$ct_saturday_stop); +$ct_sunday_start = ereg_replace("[^0-9]","",$ct_sunday_start); +$ct_sunday_stop = ereg_replace("[^0-9]","",$ct_sunday_stop); +$ct_thursday_start = ereg_replace("[^0-9]","",$ct_thursday_start); +$ct_thursday_stop = ereg_replace("[^0-9]","",$ct_thursday_stop); +$ct_tuesday_start = ereg_replace("[^0-9]","",$ct_tuesday_start); +$ct_tuesday_stop = ereg_replace("[^0-9]","",$ct_tuesday_stop); +$ct_wednesday_start = ereg_replace("[^0-9]","",$ct_wednesday_start); +$ct_wednesday_stop = ereg_replace("[^0-9]","",$ct_wednesday_stop); +$DBX_port = ereg_replace("[^0-9]","",$DBX_port); +$DBY_port = ereg_replace("[^0-9]","",$DBY_port); +$dedicated_trunks = ereg_replace("[^0-9]","",$dedicated_trunks); +$delete_call_times = ereg_replace("[^0-9]","",$delete_call_times); +$delete_campaigns = ereg_replace("[^0-9]","",$delete_campaigns); +$delete_filters = ereg_replace("[^0-9]","",$delete_filters); +$delete_ingroups = ereg_replace("[^0-9]","",$delete_ingroups); +$delete_lists = ereg_replace("[^0-9]","",$delete_lists); +$delete_remote_agents = ereg_replace("[^0-9]","",$delete_remote_agents); +$delete_scripts = ereg_replace("[^0-9]","",$delete_scripts); +$delete_user_groups = ereg_replace("[^0-9]","",$delete_user_groups); +$delete_users = ereg_replace("[^0-9]","",$delete_users); +$dial_timeout = ereg_replace("[^0-9]","",$dial_timeout); +$dialplan_number = ereg_replace("[^0-9]","",$dialplan_number); +$drop_call_seconds = ereg_replace("[^0-9]","",$drop_call_seconds); +$drop_exten = ereg_replace("[^0-9]","",$drop_exten); +$enable_fast_refresh = ereg_replace("[^0-9]","",$enable_fast_refresh); +$enable_persistant_mysql = ereg_replace("[^0-9]","",$enable_persistant_mysql); +$fast_refresh_rate = ereg_replace("[^0-9]","",$fast_refresh_rate); +$hopper_level = ereg_replace("[^0-9]","",$hopper_level); +$hotkey = ereg_replace("[^0-9]","",$hotkey); +$hotkeys_active = ereg_replace("[^0-9]","",$hotkeys_active); +$list_id = ereg_replace("[^0-9]","",$list_id); +$load_leads = ereg_replace("[^0-9]","",$load_leads); +$max_vicidial_trunks = ereg_replace("[^0-9]","",$max_vicidial_trunks); +$modify_call_times = ereg_replace("[^0-9]","",$modify_call_times); +$modify_users = ereg_replace("[^0-9]","",$modify_users); +$modify_campaigns = ereg_replace("[^0-9]","",$modify_campaigns); +$modify_lists = ereg_replace("[^0-9]","",$modify_lists); +$modify_scripts = ereg_replace("[^0-9]","",$modify_scripts); +$modify_filters = ereg_replace("[^0-9]","",$modify_filters); +$modify_ingroups = ereg_replace("[^0-9]","",$modify_ingroups); +$modify_usergroups = ereg_replace("[^0-9]","",$modify_usergroups); +$modify_remoteagents = ereg_replace("[^0-9]","",$modify_remoteagents); +$modify_servers = ereg_replace("[^0-9]","",$modify_servers); +$view_reports = ereg_replace("[^0-9]","",$view_reports); +$modify_leads = ereg_replace("[^0-9]","",$modify_leads); +$monitor_prefix = ereg_replace("[^0-9]","",$monitor_prefix); +$number_of_lines = ereg_replace("[^0-9]","",$number_of_lines); +$old_conf_exten = ereg_replace("[^0-9]","",$old_conf_exten); +$outbound_cid = ereg_replace("[^0-9]","",$outbound_cid); +$park_ext = ereg_replace("[^0-9]","",$park_ext); +$park_on_extension = ereg_replace("[^0-9]","",$park_on_extension); +$phone_number = ereg_replace("[^0-9]","",$phone_number); +$QUEUE_ACTION_enabled = ereg_replace("[^0-9]","",$QUEUE_ACTION_enabled); +$recording_exten = ereg_replace("[^0-9]","",$recording_exten); +$remote_agent_id = ereg_replace("[^0-9]","",$remote_agent_id); +$safe_harbor_exten = ereg_replace("[^0-9]","",$safe_harbor_exten); +$telnet_port = ereg_replace("[^0-9]","",$telnet_port); +$updater_check_enabled = ereg_replace("[^0-9]","",$updater_check_enabled); +$user_level = ereg_replace("[^0-9]","",$user_level); +$user_start = ereg_replace("[^0-9]","",$user_start); +$user_switching_enabled = ereg_replace("[^0-9]","",$user_switching_enabled); +$VDstop_rec_after_each_call = ereg_replace("[^0-9]","",$VDstop_rec_after_each_call); +$VICIDIAL_park_on_extension = ereg_replace("[^0-9]","",$VICIDIAL_park_on_extension); +$vicidial_recording = ereg_replace("[^0-9]","",$vicidial_recording); +$vicidial_transfers = ereg_replace("[^0-9]","",$vicidial_transfers); +$voicemail_button_enabled = ereg_replace("[^0-9]","",$voicemail_button_enabled); +$voicemail_dump_exten = ereg_replace("[^0-9]","",$voicemail_dump_exten); +$voicemail_ext = ereg_replace("[^0-9]","",$voicemail_ext); +$voicemail_exten = ereg_replace("[^0-9]","",$voicemail_exten); +$voicemail_id = ereg_replace("[^0-9]","",$voicemail_id); +$wrapup_seconds = ereg_replace("[^0-9]","",$wrapup_seconds); +$use_non_latin = ereg_replace("[^0-9]","",$use_non_latin); +$webroot_writable = ereg_replace("[^0-9]","",$webroot_writable); +$enable_queuemetrics_logging = ereg_replace("[^0-9]","",$enable_queuemetrics_logging); +$enable_sipsak_messages = ereg_replace("[^0-9]","",$enable_sipsak_messages); +$allow_sipsak_messages = ereg_replace("[^0-9]","",$allow_sipsak_messages); + +### 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); +$omit_phone_code = ereg_replace("[^NY]","",$omit_phone_code); +$available_only_ratio_tally = ereg_replace("[^NY]","",$available_only_ratio_tally); +$sys_perf_log = ereg_replace("[^NY]","",$sys_perf_log); +$vicidial_balance_active = ereg_replace("[^NY]","",$vicidial_balance_active); +$vd_server_logs = ereg_replace("[^NY]","",$vd_server_logs); +$agent_pause_codes_active = ereg_replace("[^NY]","",$agent_pause_codes_active); +$campaign_stats_refresh = ereg_replace("[^NY]","",$campaign_stats_refresh); +$disable_alter_custdata = ereg_replace("[^NY]","",$disable_alter_custdata); +$no_hopper_leads_logins = ereg_replace("[^NY]","",$no_hopper_leads_logins); + +### ALPHA-NUMERIC ONLY ### +$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); +$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); +$concurrent_transfers = ereg_replace("[^0-9a-zA-Z]","",$concurrent_transfers); +$billable = ereg_replace("[^0-9a-zA-Z]","",$billable); +$pause_code = ereg_replace("[^0-9a-zA-Z]","",$pause_code); +$vicidial_recording_override = ereg_replace("[^0-9a-zA-Z]","",$vicidial_recording_override); +$queuemetrics_log_id = ereg_replace("[^0-9a-zA-Z]","",$queuemetrics_log_id); + +### DIGITS and Dots +$server_ip = ereg_replace("[^\.0-9]","",$server_ip); +$auto_dial_level = ereg_replace("[^\.0-9]","",$auto_dial_level); +$adaptive_maximum_level = ereg_replace("[^\.0-9]","",$adaptive_maximum_level); +$phone_ip = ereg_replace("[^\.0-9]","",$phone_ip); +$old_server_ip = ereg_replace("[^\.0-9]","",$old_server_ip); +$computer_ip = ereg_replace("[^\.0-9]","",$computer_ip); +$queuemetrics_server_ip = ereg_replace("[^\.0-9]","",$queuemetrics_server_ip); + +### ALPHA-NUMERIC and spaces and hash and star and comma +$xferconf_a_dtmf = ereg_replace("[^ \,\*\#0-9a-zA-Z]","",$xferconf_a_dtmf); +$xferconf_b_dtmf = ereg_replace("[^ \,\*\#0-9a-zA-Z]","",$xferconf_b_dtmf); + +### ALPHACAPS-NUMERIC +$xferconf_a_number = ereg_replace("[^0-9A-Z]","",$xferconf_a_number); +$xferconf_b_number = ereg_replace("[^0-9A-Z]","",$xferconf_b_number); + +### ALPHA-NUMERIC and underscore and dash +$agi_output = ereg_replace("[^-\_0-9a-zA-Z]","",$agi_output); +$ASTmgrSECRET = ereg_replace("[^-\_0-9a-zA-Z]","",$ASTmgrSECRET); +$ASTmgrUSERNAME = ereg_replace("[^-\_0-9a-zA-Z]","",$ASTmgrUSERNAME); +$ASTmgrUSERNAMElisten = ereg_replace("[^-\_0-9a-zA-Z]","",$ASTmgrUSERNAMElisten); +$ASTmgrUSERNAMEsend = ereg_replace("[^-\_0-9a-zA-Z]","",$ASTmgrUSERNAMEsend); +$ASTmgrUSERNAMEupdate = ereg_replace("[^-\_0-9a-zA-Z]","",$ASTmgrUSERNAMEupdate); +$call_time_id = ereg_replace("[^-\_0-9a-zA-Z]","",$call_time_id); +$campaign_id = ereg_replace("[^-\_0-9a-zA-Z]","",$campaign_id); +$CoNfIrM = ereg_replace("[^-\_0-9a-zA-Z]","",$CoNfIrM); +$DBX_database = ereg_replace("[^-\_0-9a-zA-Z]","",$DBX_database); +$DBX_pass = ereg_replace("[^-\_0-9a-zA-Z]","",$DBX_pass); +$DBX_user = ereg_replace("[^-\_0-9a-zA-Z]","",$DBX_user); +$DBY_database = ereg_replace("[^-\_0-9a-zA-Z]","",$DBY_database); +$DBY_pass = ereg_replace("[^-\_0-9a-zA-Z]","",$DBY_pass); +$DBY_user = ereg_replace("[^-\_0-9a-zA-Z]","",$DBY_user); +$dial_method = ereg_replace("[^-\_0-9a-zA-Z]","",$dial_method); +$dial_status_a = ereg_replace("[^-\_0-9a-zA-Z]","",$dial_status_a); +$dial_status_b = ereg_replace("[^-\_0-9a-zA-Z]","",$dial_status_b); +$dial_status_c = ereg_replace("[^-\_0-9a-zA-Z]","",$dial_status_c); +$dial_status_d = ereg_replace("[^-\_0-9a-zA-Z]","",$dial_status_d); +$dial_status_e = ereg_replace("[^-\_0-9a-zA-Z]","",$dial_status_e); +$ext_context = ereg_replace("[^-\_0-9a-zA-Z]","",$ext_context); +$group_id = ereg_replace("[^-\_0-9a-zA-Z]","",$group_id); +$lead_filter_id = ereg_replace("[^-\_0-9a-zA-Z]","",$lead_filter_id); +$local_call_time = ereg_replace("[^-\_0-9a-zA-Z]","",$local_call_time); +$login = ereg_replace("[^-\_0-9a-zA-Z]","",$login); +$login_campaign = ereg_replace("[^-\_0-9a-zA-Z]","",$login_campaign); +$login_pass = ereg_replace("[^-\_0-9a-zA-Z]","",$login_pass); +$login_user = ereg_replace("[^-\_0-9a-zA-Z]","",$login_user); +$next_agent_call = ereg_replace("[^-\_0-9a-zA-Z]","",$next_agent_call); +$old_campaign_id = ereg_replace("[^-\_0-9a-zA-Z]","",$old_campaign_id); +$old_server_id = ereg_replace("[^-\_0-9a-zA-Z]","",$old_server_id); +$OLDuser_group = ereg_replace("[^-\_0-9a-zA-Z]","",$OLDuser_group); +$park_file_name = ereg_replace("[^-\_0-9a-zA-Z]","",$park_file_name); +$pass = ereg_replace("[^-\_0-9a-zA-Z]","",$pass); +$phone_login = ereg_replace("[^-\_0-9a-zA-Z]","",$phone_login); +$phone_pass = ereg_replace("[^-\_0-9a-zA-Z]","",$phone_pass); +$PHP_AUTH_PW = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_PW); +$PHP_AUTH_USER = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_USER); +$protocol = ereg_replace("[^-\_0-9a-zA-Z]","",$protocol); +$server_id = ereg_replace("[^-\_0-9a-zA-Z]","",$server_id); +$stage = ereg_replace("[^-\_0-9a-zA-Z]","",$stage); +$state_rule = ereg_replace("[^-\_0-9a-zA-Z]","",$state_rule); +$status = ereg_replace("[^-\_0-9a-zA-Z]","",$status); +$trunk_restriction = ereg_replace("[^-\_0-9a-zA-Z]","",$trunk_restriction); +$user = ereg_replace("[^-\_0-9a-zA-Z]","",$user); +$user_group = ereg_replace("[^-\_0-9a-zA-Z]","",$user_group); +$VICIDIAL_park_on_filename = ereg_replace("[^-\_0-9a-zA-Z]","",$VICIDIAL_park_on_filename); +$auto_alt_dial = ereg_replace("[^-\_0-9a-zA-Z]","",$auto_alt_dial); +$dial_status = ereg_replace("[^-\_0-9a-zA-Z]","",$dial_status); +$queuemetrics_eq_prepend = ereg_replace("[^-\_0-9a-zA-Z]","",$queuemetrics_eq_prepend); +$vicidial_agent_disable = ereg_replace("[^-\_0-9a-zA-Z]","",$vicidial_agent_disable); +$alter_custdata_override = ereg_replace("[^-\_0-9a-zA-Z]","",$alter_custdata_override); + +### 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 +$adaptive_dl_diff_target = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$adaptive_dl_diff_target); +$adaptive_intensity = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$adaptive_intensity); +$asterisk_version = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$asterisk_version); +$call_time_comments = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$call_time_comments); +$call_time_name = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$call_time_name); +$campaign_name = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$campaign_name); +$campaign_rec_filename = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$campaign_rec_filename); +$company = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$company); +$full_name = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$full_name); +$fullname = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$fullname); +$group_name = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$group_name); +$HKstatus = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$HKstatus); +$lead_filter_comments = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$lead_filter_comments); +$lead_filter_name = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$lead_filter_name); +$list_name = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$list_name); +$local_gmt = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$local_gmt); +$phone_type = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$phone_type); +$picture = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$picture); +$script_comments = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$script_comments); +$script_name = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$script_name); +$server_description = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$server_description); +$status = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$status); +$status_name = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$status_name); +$wrapup_message = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$wrapup_message); +$pause_code_name = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$pause_code_name); +$campaign_description = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$campaign_description); +$list_description = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$list_description); + +### ALPHA-NUMERIC and underscore and dash and slash and at and dot +$call_out_number_group = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$call_out_number_group); +$client_browser = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$client_browser); +$DBX_server = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$DBX_server); +$DBY_server = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$DBY_server); +$dtmf_send_extension = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$dtmf_send_extension); +$extension = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$extension); +$install_directory = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$install_directory); +$old_extension = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$old_extension); +$telnet_host = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$telnet_host); +$queuemetrics_dbname = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$queuemetrics_dbname); +$queuemetrics_login = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$queuemetrics_login); +$queuemetrics_pass = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$queuemetrics_pass); + +### remove semi-colons ### +$lead_filter_sql = ereg_replace(";","",$lead_filter_sql); + +### VARIABLES TO BE mysql_real_escape_string ### +# $web_form_address +# $queuemetrics_url +# $admin_home_url + +### VARIABLES not filtered at all ### +# $script_text + +} # end of non_latin + + +##### END VARIABLE FILTERING FOR SECURITY ##### + + +# AST GUI database administration +# admin.php +# +# CHANGELOG: +# 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 +# 60808-1147 - Changed filtering for and added instructions for consutative transfers +# 60816-1552 - Added allcalls_delay start delay for recordings in vicidial.php +# 60817-2226 - Fixed bug that would not allow lead recycling of non-selectable statuses +# 60821-1543 - Added option to Omit Phone Code while dialing in vicidial +# 60821-1625 - Added ALLFORCE recording option for campaign_recording +# 60823-1154 - Added fields for adaptive dialing +# 60824-1326 - Added adaptive_latest_target_gmt for ADAPT_TAPERED dial method +# 60825-1205 - Added adaptive_intensity for ADAPT_ dial methods +# 60828-1019 - Changed adaptive_latest_target_gmt to adaptive_latest_server_time +# 60828-1115 - Added adaptive_dl_diff_target and changed intensity dropdown +# 60927-1246 - Added astguiclient/admin.php functions under SERVERS tab +# 61002-1402 - Added fields for vicidial balance trunk controls +# 61003-1123 - Added functions for vicidial_server_trunks records +# 61109-1022 - Added Emergency VDAC Jam Clear function to Campaign Detail screen +# 61110-1502 - Add ability to select NONE in dial statuses, new list_id must not be < 100 +# 61122-1228 - Added user group campaign restrictions +# 61122-1535 - Changed script_text to unfiltered and added more variables to SCRIPTS +# 61129-1028 - Added headers to Users and Phones with clickable order-by titles +# 70108-1405 - Added ADAPT OVERRIDE to allow for forced dial_level changes in ADAPT dial methods +# - Screen width definable at top of script, merged server_stats into this script +# 70109-1638 - Added ALTPH2 and ADDR3 hotkey options for alt number dialing with HotKeys +# 70109-1716 - Added concurrent_transfers option to vicidial_campaigns +# 70115-1152 - Aded (CLOSER|BLEND|INBND|_C$|_B$|_I$) options for CLOSER-type campaigns +# 70115-1532 - Added auto_alt_dial field to campaign screen for auto-dialing of alt numbers +# 70116-1200 - Added auto_alt_dial_status functionality to campaign screen +# 70117-1235 - Added header formatting variables at top of script +# - Moved Call Times and Phones/Server functions to Admin section +# 70118-1706 - Added new user group displays and links +# 70123-1519 - Added user permission settings for all sections +# 70124-1346 - Fixed spelling errors and formatting consistency +# 70202-1120 - Added agent_pause_codes section to campaigns +# 70205-1204 - Added memo, last dialed, timestamp and stats-refresh fields to vicidial_campaigns/lists +# 70206-1323 - Added user setting for vicidial_recording_override +# 70212-1412 - Added system settings section +# 70214-1226 - Added QueueMetrics Log ID field to system settings section +# 70219-1102 - Changed campaign dial statuses to be one string allowing for high limit +# 70223-0957 - Added queuemetrics_eq_prepend for custom ENTERQUEUE prepending of a field +# 70302-1111 - Fixed small bug in dialable leads calculation +# 70314-1133 - Added insert selection on script forms +# 70319-1423 - Added Alter Customer Data and agent disable display functions +# 70319-1625 - Added option to allow agents to login to outbound campaigns with no leads in the hopper +# 70322-1455 - Added sipsak messages parameters +# 70402-1157 - Added HOME link and entry to system_settings table, added QM link on reports section + +# make sure you have added a user to the vicidial_users MySQL table with at least user_level 8 to access this page the first time + +$admin_version = '2.0.95'; +$build = '70402-1157'; + +$STARTtime = date("U"); +$SQLdate = date("Y-m-d H:i:s"); + + +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]; + $LOGuser_group =$row[5]; + $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]; + $LOGast_admin_access =$row[16]; + $LOGast_delete_phones =$row[17]; + $LOGdelete_scripts =$row[18]; + $LOGdelete_filters =$row[29]; + $LOGalter_agent_interface =$row[30]; + $LOGdelete_call_times =$row[32]; + $LOGmodify_call_times =$row[33]; + $LOGmodify_users =$row[34]; + $LOGmodify_campaigns =$row[35]; + $LOGmodify_lists =$row[36]; + $LOGmodify_scripts =$row[37]; + $LOGmodify_filters =$row[38]; + $LOGmodify_ingroups =$row[39]; + $LOGmodify_usergroups =$row[40]; + $LOGmodify_remoteagents =$row[41]; + $LOGmodify_servers =$row[42]; + $LOGview_reports =$row[43]; + + $stmt="SELECT allowed_campaigns from vicidial_user_groups where user_group='$LOGuser_group';"; + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + $LOGallowed_campaigns =$row[0]; + + 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='admin'; $sh='times'; echo "Add New Call Time";} +if ($ADD==1111111111) {$hh='admin'; $sh='times'; echo "Add New State Call Time";} +if ($ADD==11111111111) {$hh='admin'; $sh='phones'; echo "ADD NEW PHONE";} +if ($ADD==111111111111) {$hh='admin'; $sh='server'; echo "ADD NEW SERVER";} +if ($ADD==1111111111111) {$hh='admin'; $sh='conference'; echo "ADD NEW CONFERENCE";} +if ($ADD==11111111111111) {$hh='admin'; $sh='conference'; echo "ADD NEW VICIDIAL CONFERENCE";} +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==26) {$hh='campaigns'; echo "New Auto Alt Dial Status";} +if ($ADD==27) {$hh='campaigns'; echo "New Agent Pause Code";} +if ($ADD==28) {$hh='campaigns'; echo "Campaign Dial Status Added";} +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='admin'; $sh='times'; echo "New Call Time Addition";} +if ($ADD==2111111111) {$hh='admin'; $sh='times'; echo "New State Call Time Addition";} +if ($ADD==21111111111) {$hh='admin'; $sh='phones'; echo "ADDING NEW PHONE";} +if ($ADD==211111111111) {$hh='admin'; $sh='server'; echo "ADDING NEW SERVER";} +if ($ADD==221111111111) {$hh='admin'; $sh='server'; echo "ADDING NEW SERVER VICIDIAL TRUNK RECORD";} +if ($ADD==2111111111111) {$hh='admin'; $sh='conference'; echo "ADDING NEW CONFERENCE";} +if ($ADD==21111111111111) {$hh='admin'; $sh='conference'; echo "ADDING NEW VICIDIAL CONFERENCE";} +if ($ADD==3) {$hh='users'; echo "Modify User";} +if ($ADD==30) {$hh='campaigns'; echo "Campaign Not Allowed";} +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='admin'; $sh='times'; echo "Modify Call Time";} +if ($ADD==321111111) {$hh='admin'; $sh='times'; echo "Modify Call Time State Definitions List";} +if ($ADD==3111111111) {$hh='admin'; $sh='times'; echo "Modify State Call Time";} +if ($ADD==31111111111) {$hh='admin'; $sh='phones'; echo "MODIFY PHONE";} +if ($ADD==311111111111) {$hh='admin'; $sh='server'; echo "MODIFY SERVER";} +if ($ADD==3111111111111) {$hh='admin'; $sh='conference'; echo "MODIFY CONFERENCE";} +if ($ADD==31111111111111) {$hh='admin'; $sh='conference'; echo "MODIFY VICIDIAL CONFERENCE";} +if ($ADD==311111111111111) {$hh='admin'; $sh='settings'; echo "MODIFY VICIDIAL SYSTEM SETTINGS";} +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==47) {$hh='campaigns'; echo "Modify Agent Pause Code";} +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='admin'; $sh='times'; echo "Modify Call Time";} +if ($ADD==4111111111) {$hh='admin'; $sh='times'; echo "Modify State Call Time";} +if ($ADD==41111111111) {$hh='admin'; $sh='phones'; echo "MODIFY PHONE";} +if ($ADD==411111111111) {$hh='admin'; $sh='server'; echo "MODIFY SERVER";} +if ($ADD==421111111111) {$hh='admin'; $sh='server'; echo "MODIFY SERVER VICIDIAL TRUNK RECORD";} +if ($ADD==4111111111111) {$hh='admin'; $sh='conference'; echo "MODIFY CONFERENCE";} +if ($ADD==41111111111111) {$hh='admin'; $sh='conference'; echo "MODIFY VICIDIAL CONFERENCE";} +if ($ADD==411111111111111) {$hh='admin'; $sh='settings'; echo "MODIFY VICIDIAL SYSTEM SETTINGS";} +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==53) {$hh='campaigns'; echo "Emergency VDAC Jam Clear";} +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='admin'; $sh='times'; echo "Delete Call Time";} +if ($ADD==5111111111) {$hh='admin'; $sh='times'; echo "Delete State Call Time";} +if ($ADD==51111111111) {$hh='admin'; $sh='phones'; echo "DELETE PHONE";} +if ($ADD==511111111111) {$hh='admin'; $sh='server'; echo "DELETE SERVER";} +if ($ADD==5111111111111) {$hh='admin'; $sh='conference'; echo "DELETE CONFERENCE";} +if ($ADD==51111111111111) {$hh='admin'; $sh='conference'; echo "DELETE VICIDIAL CONFERENCE";} +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==63) {$hh='campaigns'; echo "Emergency VDAC Jam Clear";} +if ($ADD==65) {$hh='campaigns'; echo "Delete Lead Recycle";} +if ($ADD==66) {$hh='campaigns'; echo "Delete Auto Alt Dial Status";} +if ($ADD==67) {$hh='campaigns'; echo "Delete Agent Pause Code";} +if ($ADD==68) {$hh='campaigns'; echo "Campaign Dial Status Removed";} +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='admin'; $sh='times'; echo "Delete Call Time";} +if ($ADD==6111111111) {$hh='admin'; $sh='times'; echo "Delete State Call Time";} +if ($ADD==61111111111) {$hh='admin'; $sh='phones'; echo "DELETE PHONE";} +if ($ADD==611111111111) {$hh='admin'; $sh='server'; echo "DELETE SERVER";} +if ($ADD==621111111111) {$hh='admin'; $sh='server'; echo "DELETE SERVER VICIDIAL TRUNK RECORD";} +if ($ADD==6111111111111) {$hh='admin'; $sh='conference'; echo "DELETE CONFERENCE";} +if ($ADD==61111111111111) {$hh='admin'; $sh='conference'; echo "DELETE VICIDIAL CONFERENCE";} +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='lists'; echo "CallBacks Within List";} +if ($ADD==8111) {$hh='usergroups'; echo "CallBacks Within User Group";} +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='admin'; $sh='times'; echo "Call Times";} +if ($ADD==1000000000) {$hh='admin'; $sh='times'; echo "State Call Times";} +if ($ADD==10000000000) {$hh='admin'; $sh='phones'; echo "PHONE LIST";} +if ($ADD==100000000000) {$hh='admin'; $sh='server'; echo "SERVER LIST";} +if ($ADD==1000000000000) {$hh='admin'; $sh='conference'; echo "CONFERENCE LIST";} +if ($ADD==10000000000000) {$hh='admin'; $sh='conference'; echo "VICIDIAL CONFERENCE LIST";} +if ($ADD==550) {$hh='users'; echo "Search Form";} +if ($ADD==551) {$hh='users'; echo "SEARCH PHONES";} +if ($ADD==660) {$hh='users'; echo "Search Results";} +if ($ADD==661) {$hh='users'; echo "SEARCH PHONES RESULTS";} +if ($ADD==99999) {$hh='users'; echo "HELP";} +if ($ADD==999999) {$hh='reports'; echo "REPORTS";} + +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>20) and ($ADD<70)) or ($ADD=="4A") or ($ADD=="4B") or (strlen($ADD)==12) ) + { + ##### 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++; + } + + ##### BEGIN get inbound groups listing for checkboxes ##### + if ( (($ADD>20) and ($ADD<70)) and ($ADD!=41) ) + { + $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 .= " -";} + } + ##### END get inbound groups listing for checkboxes ##### + + + ##### BEGIN get campaigns listing for checkboxes ##### + if ( ($ADD==211111) or ($ADD==311111) or ($ADD==411111) or ($ADD==511111) or ($ADD==611111) ) + { + if ( ($ADD==211111) or ($ADD==311111) or ($ADD==511111) or ($ADD==611111) ) + { + $stmt="SELECT allowed_campaigns from vicidial_user_groups where user_group='$user_group';"; + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + $allowed_campaigns = $row[0]; + $allowed_campaigns = preg_replace("/ -$/","",$allowed_campaigns); + $campaigns = explode(" ", $allowed_campaigns); + echo "<!-- $allowed_campaigns -->"; + } + + $campaigns_value=''; + $campaigns_list='<B><input type="checkbox" name="campaigns[]" value="-ALL-CAMPAIGNS-"'; + $p=0; + while ($p<100) + { + if (eregi('ALL-CAMPAIGNS',$campaigns[$p])) + { + $campaigns_list.=" CHECKED"; + $campaigns_value .= " -ALL-CAMPAIGNS- -"; + } + $p++; + } + $campaigns_list.="> ALL-CAMPAIGNS - USERS CAN VIEW ANY CAMPAIGN</B><BR>\n"; + + $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); + + $o=0; + while ($campaigns_to_print > $o) + { + $rowx=mysql_fetch_row($rslt); + $campaign_id_value = $rowx[0]; + $campaign_name_value = $rowx[1]; + $campaigns_list .= "<input type=\"checkbox\" name=\"campaigns[]\" value=\"$campaign_id_value\""; + $p=0; + while ($p<100) + { + if ($campaign_id_value == $campaigns[$p]) + { + # echo "<!-- X $p|$campaign_id_value|$campaigns[$p]| -->"; + $campaigns_list .= " CHECKED"; + $campaigns_value .= " $campaign_id_value"; + } + # echo "<!-- O $p|$campaign_id_value|$campaigns[$p]| -->"; + $p++; + } + $campaigns_list .= "> $campaign_id_value - $campaign_name_value<BR>\n"; + $o++; + } + if (strlen($campaigns_value)>2) {$campaigns_value .= " -";} + } + ##### END get campaigns listing for checkboxes ##### + + + if ( (strlen($ADD)==11) or (strlen($ADD)>12) ) + { + ##### 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++; + } + } + + + +$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. + +
+
+
+Hot Keys Active - This option if set to 1 allows the user to use the Hot Keys 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. + +
+
+
+VICIDIAL Recording Override - This option will override whatever the option is in the campaign for recording. DISABLED will not override the campaign recording setting. 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. ALLFORCE will start recording on the client whenever a call is sent to an agent giving the agent no option to stop recording. For ALLCALLS and ALLFORCE there is an option to use the Recording Delay to cut down on very short recordings and recude system load. + +
+
+
+Agent Alter Customer Data Override - This option will override whatever the option is in the campaign for altering of customer data. NOT_ACTIVE will use whatever setting is present for the campaign. ALLOW_ALTER will always allow for the agent to alter the customer data, no matter what the campaign setting is. Default is NOT_ACTIVE. + +
+
+
+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. + +
+
+
+Modify Sections - These options allow the user to view and modify each sections records. If set to 0, the user will be able to see the section list, but not the detail or modification screen of a record in that section. + +
+
+
+View Reports - This option allows the user to view the VICIDIAL reports. + + + + +



+ +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. + +
+
+
+Campaign Description - This is a memo field for the campaign, it is optional and can be a maximum of 255 characters in length. + +
+
+
+Campaign Change Date - This is the last time that the settings for this campaign were modified in any way. + +
+
+
+Last Campaign Login Date - This is the last time that an agent was logged into this campaign. + +
+
+
+Campaign Stats Refresh - This checkbox will allow you to force a vicidial stats refresh, even if the campaign is not active. + +
+
+
+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. To add another status to dial, select it from the drop-down list and click ADD. To remove one of the dial statuses, click on the REMOVE link next to the status you want to remove. + +
+
+
+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. + +
+
+
+Dial Method - This field is the way to define how dialing is to take place. If MANUAL then the auto_dial_level will be locked at 0 unless Dial Method is changed. If RATIO then the normal dialing a number of lines for Active agents. ADAPT_HARD_LIMIT will dial predictively up to the dropped percentage and then not allow aggressive dialing once the drop limit is reached until the percentage goes down again. ADAPT_TAPERED allows for running over the dropped percentage in the first half of the shift -as defined by call_time selected for campaign- and gets more strict as the shift goes on. ADAPT_AVERAGE tries to maintain an average or the dropped percentage not imposing hard limits as aggressively as the other two methods. You cannot change the Auto Dial Level if you are in any of the ADAPT dial methods. Only the Dialer can change the dial level when in predictive dialing mode. + +
+
+
+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. The ADAPT OVERRIDE checkbox allows you to force a new dial level even though the dial method is in an ADAPT mode. This is useful if there is a dramatic shift in the quality of leads and you want to drastically change the dial_level manually. + +
+
+
+Available Only Tally - This field if set to Y will leave out INCALL and QUEUE status agents when calculating the number of calls to dial when not in MANUAL dial mode. Default is N. + +
+
+
+Drop Percentage Limit - This field is where you set the limit of the percentage of dropped calls you would like while using an adaptive-predictive dial method, not MANUAL or RATIO. + +
+
+
+Maximum Adapt Dial Level - This field is where you set the limit of the limit to the numbr of lines you would like dialed per agent while using an adaptive-predictive dial method, not MANUAL or RATIO. This number can be higher than the Auto Dial Level if your hardware will support it. Value must be a positive number greater than one and can have decimal places Default 3.0. + +
+
+
+Latest Server Time - This field is only used by the ADAPT_TAPERED dial method. You should enter in the hour and minute that you will stop calling on this campaign, 2100 would mean that you will stop dialing this campaign at 9PM server time. This allows the Tapered algorithm to decide how aggressively to dial by how long you have until you will be finished calling. + +
+
+
+Adapt Intensity Modifier - This field is used to adjust the predictive intensity either higher or lower. The higher a positive number you select, the greater the dialer will increase the call pacing when it goes up and the slower the dialer will decrease the call pacing when it goes down. The lower the negative number you select here, the slower the dialer will increase the call pacing and the faster the dialer will lower the call pacing when it goes down. Default is 0. This field is not used by the MANUAL or RATIO dial methods. + +
+
+
+Dial Level Difference Target - This field is used to define whether you want to target having a specific number of agents waiting for calls or calls waiting for agents. For example if you would always like to have on average one agent free to take calls immediately you would set this to -1, if you would like to target always having one call on hold waiting for an agent you would set this to 1. Default is 0. This field is not used by the MANUAL or RATIO dial methods. + +
+
+
+Concurrent Transfers - This setting is used to define the number of calls that can be sent to agents at the same time. It is recommended that this setting is left at AUTO. This field is not used by the MANUAL dial method. + +
+
+
+Auto Alt-Number Dialing - This setting is used to automatically dial alternate number fields while dialing in the RATIO and ADAPT dial methods when there is no contact at the main phone number for a lead, the NA, B, DC and N statuses. This setting is not used by the MANUAL dial method. + +
+
+
+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 hang up 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 dial plan - extensions.conf. + +
+
+
+Omit Phone Code - This field allows you to leave out the phone_code field while dialing within VICIDIAL. For instance if you are dialing in the UK from the UK you would have 44 in as your phone_code field for all leads, but you just want to dial 10 digits in your dial plan extensions.conf to place calls instead of 44 then 10 digits. Default is N. + +
+
+
+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. ALLFORCE will start recording on the client whenever a call is sent to an agent giving the agent no option to stop recording. For ALLCALLS and ALLFORCE there is an option to use the Recording Delay to cut down on very short recordings and recude system load. + +
+
+
+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. + +
+
+
+Recording Delay - For ALLCALLS and ALLFORCE recording only. This setting will delay the starting of the recording on all calls for the number of seconds specified in this field. Default is 0. + +
+
+
+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 dial plan - 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. If you want to allow Consultative Transfers, a fronter to a closer, you can place CXFER as one of the number-to-dial presets and the proper dial string will be sent to do a Local Consultative Transfer, then the agent can just LEAVE-3WAY-CALL and move on to their next call. If you want to allow Blind transfers of customers to a VICIDIAL AGI script for logging or an IVR, then place AXFER in the number-to-dial field. You can also specify an custom extension after the AXFER or CXFER, for instance if you want to do Internal Consultative transfers instead of Local you would put CXFER90009 in the number-to-dial field. + +
+
+
+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 dial plan extension that the desired Safe Harbor audio file is located at on your server. + +
+
+
+Wrap Up 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. + +
+
+
+Wrap Up Message - This is a campaign-specific message to be displayed on the wrap up screen if wrap up 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. + +
+
+
+Agent Pause Codes Active - Allows agents to select a pause code when they click on the PAUSE button in vicidial.php. Pause codes are definable per campaign at the bottom of the campaign view detail screen and they are stored in the vicidial_agent_log table. Default is N. + +
+
+
+Disable Alter Customer Data - If set to Y, does not change any of the customer data record when an agent dispositions the call. Default is N. + +
+
+
+Allow No-Hopper-Leads Logins - If set to Y, allows agents to login to the campaign even if there are no leads loaded into the hopper for that campaign. This function is not needed in CLOSER-type campaigns. Default is N. + + + +



+ +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. Must be a number greater than 100. + +
+
+
+List Name - This is the description of the list, it must be between 2 and 20 characters in length. + +
+
+
+List Description - This is the memo field for the list, it is optional. + +
+
+
+List Change Date - This is the last time that the settings for this list were modified in any way. + +
+
+
+List Last Call Date - This is the last time that lead was dialed from this list. + +
+
+
+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. If you want to allow Consultative Transfers, a fronter to a closer, you can place CXFER as one of the number-to-dial presets and the proper dial string will be sent to do a Local Consultative Transfer, then the agent can just LEAVE-3WAY-CALL and move on to their next call. If you want to allow Blind transfers of customers to a VICIDIAL AGI script for logging or an IVR, then place AXFER in the number-to-dial field. You can also specify an custom extension after the AXFER or CXFER, for instance if you want to do Internal Consultative transfers instead of Local you would put CXFER90009 in the number-to-dial field. + +
+
+
+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 dial plan 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 dial plan 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 hot keys, agents that use the vicidial web-client can hang up and disposition calls just by pressing a single key on their keyboard. There are two special HotKey options that you can use in conjunction with Alternate Phone number dialing, ALTPH2 - Alternate Phone Hot Dial and ADDR3-----Address3 Hot Dial allow an agent to use a hotkey to hang up their call, stay on the same lead, and dial another contact number from that lead. + + + + + +



+ +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. + + + + + +



+ +VICIDIAL AUTO ALT DIAL STATUSES

+
+
+If the Auto Alt-Number Dialing field is set, then the leads that are dispositioned under these auto alt dial statuses will have their alt_phone and-or address3 fields dialed after any of these no-answer statuses are set. + + + + + +



+ +VICIDIAL AGENT PAUSE CODES

+
+
+If the Agent Pause Codes Active field is set to active then the agents will be able to select from these pause codes when they click on the PAUSE button on their screens. This data is then stored in the vicidial agent log. The Pause code must contain only letters and numbers and be less than 7 characters long. The pause code name can be no longer than 30 characters. + + + + + +



+ +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. + +
+
+
+Allowed Campaigns - This is a selectable list of Campaigns to which members of this user group can log in to. The ALL-CAMPAIGNS option allows the users in this group to see and log in to any campaign on the system. + + + + + +



+ +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, lead_id, campaign, phone_login, group, channel_group, SQLdate, epoch, uniqueid, customer_zap_channel, server_ip, SIPexten, session_id. 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?

You can also use an iframe to load a separate window within the SCRIPT tab, here is an example with prepopulated variables: + +
+<iframe src="http://astguiclient.sf.net/test_VICIDIAL_output.php?lead_id=--A--lead_id--B--&vendor_id=--A--vendor_lead_code--B--&list_id=--A--list_id--B--&gmt_offset_now=--A--gmt_offset_now--B--&phone_code=--A--phone_code--B--&phone_number=--A--phone_number--B--&title=--A--title--B--&first_name=--A--first_name--B--&middle_initial=--A--middle_initial--B--&last_name=--A--last_name--B--&address1=--A--address1--B--&address2=--A--address2--B--&address3=--A--address3--B--&city=--A--city--B--&state=--A--state--B--&province=--A--province--B--&postal_code=--A--postal_code--B--&country_code=--A--country_code--B--&gender=--A--gender--B--&date_of_birth=--A--date_of_birth--B--&alt_phone=--A--alt_phone--B--&email=--A--email--B--&security_phrase=--A--security_phrase--B--&comments=--A--comments--B--&user=--A--user--B--&campaign=--A--campaign--B--&phone_login=--A--phone_login--B--&fronter=--A--fronter--B--&closer=--A--user--B--&group=--A--group--B--&channel_group=--A--group--B--&SQLdate=--A--SQLdate--B--&epoch=--A--epoch--B--&uniqueid=--A--uniqueid--B--&customer_zap_channel=--A--customer_zap_channel--B--&server_ip=--A--server_ip--B--&SIPexten=--A--SIPexten--B--&session_id=--A--session_id--B--&phone=--A--phone--B--" style="width:580;height:290;background-color:transparent;" scrolling="auto" frameborder="0" allowtransparency="true" id="popupFrame" name="popupFrame" width="460" height="290"> +</iframe> +
+ +
+
+
+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 /etc/astguiclient.conf 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. + + + + +



+ + + + + + +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. + +
+
+
+Dial Plan 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 dial plan 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 dial plan 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 dial plan extension going to check your voicemail. verify with extensions.conf file before changing. + +
+
+
+VMAIL Dump Exten - This is the dial plan 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 dial plan 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 hang up '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 Hang Up - Set to true to allow user to be able to hang up 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 hang up. 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. + +
+
+
+Enable SIPSAK Messages - If enabled the server will send messages to the SIP phone to display on the phone LCD display when logged into VICIDIAL. Feature only works with SIP phones and requires sipsak application to be installed on the web server. Default is 0. + +
+
+
+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 dial plan context used for scripts that operate for this server. Default is 'default' + +
+
+
+System Performance - Setting this option to Y will enable logging of system performance stats for the server machine including system load, system processes and Asterisk channels in use. Default is N. + +
+
+
+Server Logs - Setting this option to Y will enable logging of all VICIDIAL related scripts to their text log files. Setting this to N will stop writing logs to files for these processes, also the screen logging of asterisk will be disabled if this is set to N when Asterisk is started. Default is Y. + +
+
+
+AGI Output - Setting this option to NONE will disable output from all VICIDIAL related AGI scripts. Setting this to STDERR will send the AGI output to the Asterisk CLI. Setting this to FILE will send the output to a file in the logs directory. Setting this to BOTH will send output to both the Asterisk CLI and a log file. Default is FILE. + +
+
+
+VICIDIAL Balance Dialing - Setting this field to Y will allow the server to place balance calls for campaigns in VICIDIAL so that the defined dial level can be met even if there are no agents logged into that campaign on this server. Default is N. + +
+
+
+VICIDIAL Balance Offlimits - This setting defines the number of trunks to not allow VICIDIAL balance dialing to use. For example if you have 40 max vicidial trunks and balance offlimits is set to 10 you will only be able to use 30 trunk lines for VICIDIAL balance dialing. Default is 0. + + +



+ +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. + + + + +



+ +VICIDIAL_SERVER_TRUNKS TABLE

+
+
+VICIDIAL Server Trunks allows you to restrict the outgoing lines that are used on this server for campaign dialing on a per-campaign basis. You have the option to reserve a specific number of lines to be used by only one campaign as well as allowing that campaign to run over its reserved lines into whatever lines remain open, as long at the total lines used by vicidial on this server is less than the Max VICIDIAL Trunks setting. Not having any of these records will allow the campaign that dials the line first to have as many lines as it can get under the Max VICIDIAL Trunks setting. + + + + + +



+ +SYSTEM_SETTINGS TABLE

+
+
+Use Non-Latin - This option allows you to default the web display script to use UTF8 characters and not do any latin-character-family regular expression filtering or display formatting. Default is 0. + +
+
+
+Webroot Writable - This setting allows you to define whether temp files and authentication files should be placed in the webroot on your web server. Default is 1. + +
+
+
+Enable QueueMetrics Logging - This setting allows you to define whether VICIDIAL will insert log entries into the queue_log database table as Asterisk Queues activity does. QueueMetrics is a standalone, closed-source statistical analysis program. You must have QueueMetrics already installed and configured before enabling this feature. Default is 0. + +
+
+
+QueueMetrics Server IP - This is the IP address of the database for your QueueMetrics installation. + +
+
+
+QueueMetrics Database Name - This is the database name for your QueueMetrics database. + +
+
+
+QueueMetrics Database Login - This is the user name used to log in to your QueueMetrics database. + +
+
+
+QueueMetrics Database Password - This is the password used to log in to your QueueMetrics database. + +
+
+
+QueueMetrics URL - This is the URL or web site address used to get to your QueueMetrics installation. + +
+
+
+QueueMetrics Log ID - This is the server ID that all VICIDIAL logs going into the QueueMetrics database will use as an identifier for each record. + +
+
+
+QueueMetrics EnterQueue Prepend - This field is used to allow for prepending of one of the vicidial_list data fields in front of the phone number of the customer for customized QueueMetrics reports. Default is NONE to not populate anything. + +
+
+
+VICIDIAL Agent Disable Display - This field is used to select when to show an agent when their session has been disabled by the system, a manager action or by an external measure. The NOT_ACTIVE setting will disable the message on the agents screen. The LIVE_AGENT setting will only display the disabled message when the agents vicidial_auto_calls record has been removed, such as during a force logout or emergency logout. + +
+
+
+Allow SIPSAK Messages - If set to 1, this will allow the phones table setting to work properly, the server will send messages to the SIP phone to display on the phone LCD display when logged into VICIDIAL. This feature only works with SIP phones and requires sipsak application to be installed on the web server. Default is 0. + +
+
+
+Admin Home URL - This is the URL or web site address that you will go to if you click on the HOME link at the top of the admin.php page. + + + + +







+







+THE END +
+\n"; + echo "\n"; + echo "\n"; + echo ""; + + $stmt="SELECT dial_statuses,local_call_time,lead_filter_id from vicidial_campaigns where campaign_id='$campaign_id';"; + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + $dial_statuses = $row[0]; + $local_call_time = $row[1]; + if ($lead_filter_id=='') + { + $lead_filter_id = $row[2]; + 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_statuses
\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_statuses,$camp_lists,$fSQL); + + echo "

\n"; + echo "\n"; + + exit; + } + else + { + echo "You do not have permission to view this page\n"; + exit; + } +} + + +###################### +# ADD=7111111 view sample script with test variables +###################### + +if ($ADD==7111111) +{ + ##### TEST VARIABLES ##### + $vendor_lead_code = 'VENDOR:LEAD;CODE'; + $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'; + $RGlead_id = '1234'; + $RGcampaign = 'TESTCAMP'; + $RGphone_login = 'gs102'; + $RGgroup = 'TESTCAMP'; + $RGchannel_group = 'TESTCAMP'; + $RGSQLdate = date("Y-m-d H:i:s"); + $RGepoch = date("U"); + $RGuniqueid = '1163095830.4136'; + $RGcustomer_zap_channel = 'Zap/1-1'; + $RGserver_ip = '10.10.10.15'; + $RGSIPexten = 'SIP/gs102'; + $RGsession_id = '8600051'; + +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]; + +if (eregi("iframe src",$script_text)) + { + $vendor_lead_code = eregi_replace(' ','+',$vendor_lead_code); + $list_id = eregi_replace(' ','+',$list_id); + $gmt_offset_now = eregi_replace(' ','+',$gmt_offset_now); + $phone_code = eregi_replace(' ','+',$phone_code); + $phone_number = eregi_replace(' ','+',$phone_number); + $title = eregi_replace(' ','+',$title); + $first_name = eregi_replace(' ','+',$first_name); + $middle_initial = eregi_replace(' ','+',$middle_initial); + $last_name = eregi_replace(' ','+',$last_name); + $address1 = eregi_replace(' ','+',$address1); + $address2 = eregi_replace(' ','+',$address2); + $address3 = eregi_replace(' ','+',$address2); + $city = eregi_replace(' ','+',$city); + $state = eregi_replace(' ','+',$state); + $province = eregi_replace(' ','+',$province); + $postal_code = eregi_replace(' ','+',$postal_code); + $country_code = eregi_replace(' ','+',$country_code); + $gender = eregi_replace(' ','+',$gender); + $date_of_birth = eregi_replace(' ','+',$date_of_birth); + $alt_phone = eregi_replace(' ','+',$alt_phone); + $email = eregi_replace(' ','+',$email); + $security_phrase = eregi_replace(' ','+',$security_phrase); + $comments = eregi_replace(' ','+',$comments); + $RGfullname = eregi_replace(' ','+',$RGfullname); + $RGuser = eregi_replace(' ','+',$RGuser); + $RGlead_id = eregi_replace(' ','+',$RGlead_id); + $RGcampaign = eregi_replace(' ','+',$RGcampaign); + $RGphone_login = eregi_replace(' ','+',$RGphone_login); + $RGgroup = eregi_replace(' ','+',$RGgroup); + $RGchannel_group = eregi_replace(' ','+',$RGchannel_group); + $RGSQLdate = eregi_replace(' ','+',$RGSQLdate); + $RGepoch = eregi_replace(' ','+',$RGepoch); + $RGuniqueid = eregi_replace(' ','+',$RGuniqueid); + $RGcustomer_zap_channel = eregi_replace(' ','+',$RGcustomer_zap_channel); + $RGserver_ip = eregi_replace(' ','+',$RGserver_ip); + $RGSIPexten = eregi_replace(' ','+',$RGSIPexten); + $RGsession_id = eregi_replace(' ','+',$RGsession_id); + } + +$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--fronter--B--',"$RGuser",$script_text); +$script_text = eregi_replace('--A--user--B--',"$RGuser",$script_text); +$script_text = eregi_replace('--A--lead_id--B--',"$RGlead_id",$script_text); +$script_text = eregi_replace('--A--campaign--B--',"$RGcampaign",$script_text); +$script_text = eregi_replace('--A--phone_login--B--',"$RGphone_login",$script_text); +$script_text = eregi_replace('--A--group--B--',"$RGgroup",$script_text); +$script_text = eregi_replace('--A--channel_group--B--',"$RGchannel_group",$script_text); +$script_text = eregi_replace('--A--SQLdate--B--',"$RGSQLdate",$script_text); +$script_text = eregi_replace('--A--epoch--B--',"$RGepoch",$script_text); +$script_text = eregi_replace('--A--uniqueid--B--',"$RGuniqueid",$script_text); +$script_text = eregi_replace('--A--customer_zap_channel--B--',"$RGcustomer_zap_channel",$script_text); +$script_text = eregi_replace('--A--server_ip--B--',"$RGserver_ip",$script_text); +$script_text = eregi_replace('--A--SIPexten--B--',"$RGSIPexten",$script_text); +$script_text = eregi_replace('--A--session_id--B--',"$RGsession_id",$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 =\"$users_color\""; $users_fc="$users_font"; $users_bold="$header_selected_bold";} + else {$users_hh=''; $users_fc='WHITE'; $users_bold="$header_nonselected_bold";} +if ($hh=='campaigns') + {$campaigns_hh="bgcolor=\"$campaigns_color\""; $campaigns_fc="$campaigns_font"; $campaigns_bold="$header_selected_bold";} + else {$campaigns_hh=''; $campaigns_fc='WHITE'; $campaigns_bold="$header_nonselected_bold";} +if ($hh=='lists') + {$lists_hh="bgcolor=\"$lists_color\""; $lists_fc="$lists_font"; $lists_bold="$header_selected_bold";} + else {$lists_hh=''; $lists_fc='WHITE'; $lists_bold="$header_nonselected_bold";} +if ($hh=='ingroups') + {$ingroups_hh="bgcolor=\"$ingroups_color\""; $ingroups_fc="$ingroups_font"; $ingroups_bold="$header_selected_bold";} + else {$ingroups_hh=''; $ingroups_fc='WHITE'; $ingroups_bold="$header_nonselected_bold";} +if ($hh=='remoteagent') + {$remoteagent_hh="bgcolor=\"$remoteagent_color\""; $remoteagent_fc="$remoteagent_font"; $remoteagent_bold="$header_selected_bold";} + else {$remoteagent_hh=''; $remoteagent_fc='WHITE'; $remoteagent_bold="$header_nonselected_bold";} +if ($hh=='usergroups') + {$usergroups_hh="bgcolor=\"$usergroups_color\""; $usergroups_fc="$usergroups_font"; $usergroups_bold="$header_selected_bold";} + else {$usergroups_hh=''; $usergroups_fc='WHITE'; $usergroups_bold="$header_nonselected_bold";} +if ($hh=='scripts') + {$scripts_hh="bgcolor=\"$scripts_color\""; $scripts_fc="$scripts_font"; $scripts_bold="$header_selected_bold";} + else {$scripts_hh=''; $scripts_fc='WHITE'; $scripts_bold="$header_nonselected_bold";} +if ($hh=='filters') + {$filters_hh="bgcolor=\"$filters_color\""; $filters_fc="$filters_font"; $filters_bold="$header_selected_bold";} + else {$filters_hh=''; $filters_fc='WHITE'; $filters_bold="$header_nonselected_bold";} +if ($hh=='admin') + {$admin_hh="bgcolor=\"$admin_color\""; $admin_fc="$admin_font"; $admin_bold="$header_selected_bold";} + else {$admin_hh=''; $admin_fc='WHITE'; $admin_bold="$header_nonselected_bold";} +if ($hh=='reports') + {$reports_hh="bgcolor=\"$reports_color\""; $reports_fc="$reports_font"; $reports_bold="$header_selected_bold";} + else {$reports_hh=''; $reports_fc='WHITE'; $reports_bold="$header_nonselected_bold";} + +?> + + + + +\n"; + +$stmt="SELECT admin_home_url from system_settings;"; +$rslt=mysql_query($stmt, $link); +$row=mysql_fetch_row($rslt); +$admin_home_url_LU = $row[0]; + +?> +
+ BGCOLOR=#D9E6FE cellpadding=2 cellspacing=0> + + + + + + + + + + + + + + + 1) { + ?> +> + 1) { + ?> +> + 1) { + ?> +> + 1) { + ?> +> + 1) { + ?> +> + 1) { + ?> +> + 1) { + ?> +> + 1) { + ?> +> + 1) { + if ($sh=='times') {$times_sh="bgcolor=\"$times_color\""; $times_fc="$times_font";} # hard teal + else {$times_sh=''; $times_fc='BLACK';} + if ($sh=='phones') {$phones_sh="bgcolor=\"$server_color\""; $phones_fc="$phones_font";} # pink + else {$phones_sh=''; $phones_fc='BLACK';} + if ($sh=='server') {$server_sh="bgcolor=\"$server_color\""; $server_fc="$server_font";} # pink + else {$server_sh=''; $server_fc='BLACK';} + if ($sh=='conference') {$conference_sh="bgcolor=\"$server_color\""; $conference_fc="$server_font";} # pink + else {$conference_sh=''; $conference_fc='BLACK';} + if ($sh=='settings') {$settings_sh="bgcolor=\"$server_color\""; $settings_fc="$server_font";} # pink + else {$settings_sh=''; $settings_fc='BLACK';} + + ?> +> + + + + + + + 1) { + ?> + > + 1) { + ?> + > + 1) { + ?> + > + 1) { + ?> + > + 1) { + ?> + > + \n"; + echo "You are not authorized to view this page. Please go back.\n"; + } + +} +if (strlen($reports_hh) > 1) { + ?> +> + + + + +
  VICIDIAL ADMIN - HOME | Logout  
> SIZE=> Users > SIZE=> Campaigns > SIZE=> Lists > SIZE=> Scripts > SIZE=> Filters > SIZE=> In-Groups > SIZE=> User Groups > SIZE=> Remote Agents > SIZE=> Admin > SIZE=> Reports
>   > Show Users     |     > Add A New User     |     > Search For A User
>   > Show Campaigns     |     > Add A New Campaign     |     > Real-Time Campaigns Summary
>   > Show Lists     |     > Add A New List     |     > Search For A Lead     |     > Add Number To DNC     |     > Load New Leads
>   > Show Scripts     |     > Add A New Script
>   > Show Filters     |     > Add A New Filter
>   > Show In-Groups     |     > Add A New In-Group
>   > Show User Groups     |     > Add A New User Group     |     > Group Hourly Report
>   > Show Remote Agents     |     > Add New Remote Agents
COLSPAN=2> SIZE=> Call Times COLSPAN=2> SIZE=> Phones COLSPAN=2> SIZE=> Conferences COLSPAN=1> SIZE=> Servers COLSPAN=3> SIZE=> System Settings
>   > Show Call Times     |     > Add A New Call Time     |     > Show State Call Times     |     > Add A New State Call Time  
>   > Show Phones   |   > Add A New Phone
> Show Conferences   |   > Add A New Conference   |   > Show VICIDIAL Conferences   |   > Add A New VICIDIAL Conference
> Show Servers   |   > Add A New Server
> System Settings
>  
+
\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"; + } + else + { + echo "You do not have permission to view this page\n"; + exit; + } +} + + +###################### +# ADD=11 display the ADD NEW CAMPAIGN FORM SCREEN +###################### + +if ($ADD==11) +{ + if ($LOGmodify_campaigns==1) + { + 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 "\n"; + echo "
Campaign ID: $NWB#vicidial_campaigns-campaign_id$NWE
Campaign Name: $NWB#vicidial_campaigns-campaign_name$NWE
Campaign Description: $NWB#vicidial_campaigns-campaign_description$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"; + } + else + { + echo "You do not have permission to view this page\n"; + exit; + } +} + + +###################### +# ADD=111 display the ADD NEW LIST FORM SCREEN +###################### + +if ($ADD==111) +{ + if ($LOGmodify_lists==1) + { + echo "
\n"; + echo ""; + + echo "
ADD A NEW LIST\n"; + echo "\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
List Description: $NWB#vicidial_lists-list_description$NWE
Campaign: $NWB#vicidial_lists-campaign_id$NWE
Active: $NWB#vicidial_lists-active$NWE
\n"; + } + else + { + echo "You do not have permission to view this page\n"; + exit; + } +} + + +###################### +# 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) +{ + if ($LOGmodify_ingroups==1) + { + 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"; + } + else + { + echo "You do not have permission to view this page\n"; + exit; + } +} + + +###################### +# ADD=11111 display the ADD NEW REMOTE AGENTS SCREEN +###################### + +if ($ADD==11111) +{ + if ($LOGmodify_remoteagents==1) + { + 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: (dial plan 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"; + } + else + { + echo "You do not have permission to view this page\n"; + exit; + } +} + + +###################### +# ADD=111111 display the ADD NEW USERS GROUP SCREEN +###################### + +if ($ADD==111111) +{ + if ($LOGmodify_usergroups==1) + { + 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"; + } + else + { + echo "You do not have permission to view this page\n"; + exit; + } +} + + +###################### +# ADD=1111111 display the ADD NEW SCRIPT SCREEN +###################### + +if ($ADD==1111111) +{ + if ($LOGmodify_scripts==1) + { + 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: "; + # BEGIN Insert Field + echo ""; + echo "
"; + # END Insert Field + echo " $NWB#vicidial_scripts-script_text$NWE
\n"; + } + else + { + echo "You do not have permission to view this page\n"; + exit; + } +} + + +###################### +# ADD=11111111 display the ADD NEW FILTER SCREEN +###################### + +if ($ADD==11111111) +{ + if ($LOGmodify_filters==1) + { + 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"; + } + else + { + echo "You do not have permission to view this page\n"; + exit; + } +} + + +###################### +# ADD=111111111 display the ADD NEW CALL TIME SCREEN +###################### + +if ($ADD==111111111) +{ + if ($LOGmodify_call_times==1) + { + 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"; + } + else + { + echo "You do not have permission to view this page\n"; + exit; + } +} + + +###################### +# ADD=1111111111 display the ADD NEW STATE CALL TIME SCREEN +###################### + +if ($ADD==1111111111) +{ + if ($LOGmodify_call_times==1) + { + 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"; + } + else + { + echo "You do not have permission to view this page\n"; + exit; + } +} + + +###################### +# ADD=11111111111 display the ADD NEW PHONE SCREEN +###################### + +if ($ADD==11111111111) +{ + if ($LOGast_admin_access==1) + { + echo "
\n"; + echo ""; + + 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
Dial Plan 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"; + } + else + { + echo "You do not have permission to view this page\n"; + exit; + } +} + + +###################### +# ADD=111111111111 display the ADD NEW SERVER SCREEN +###################### + +if ($ADD==111111111111) +{ + if ($LOGmodify_servers==1) + { + echo "
\n"; + 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"; + } + else + { + echo "You do not have permission to view this page\n"; + exit; + } +} + + +###################### +# ADD=1111111111111 display the ADD NEW CONFERENCE SCREEN +###################### + +if ($ADD==1111111111111) +{ + if ($LOGast_admin_access==1) + { + echo "
\n"; + 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"; + } + else + { + echo "You do not have permission to view this page\n"; + exit; + } +} + + +###################### +# ADD=11111111111111 display the ADD NEW VICIDIAL CONFERENCE SCREEN +###################### + +if ($ADD==11111111111111) +{ + if ($LOGast_admin_access==1) + { + echo "
\n"; + echo ""; + + echo "
ADD A NEW VICIDIAL 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"; + } + else + { + echo "You do not have permission to view this page\n"; + exit; + } +} + + + +###################################################################################################### +###################################################################################################### +####### 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,campaign_description,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,campaign_changedate,campaign_stats_refresh) values('$campaign_id','$campaign_name','$campaign_description','$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','$SQLdate','Y');"; + $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 HOT KEY 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 HOT KEY 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 HOT KEY 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 HOT KEY |$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=26 adds the new auto alt dial status to the campaign +###################### + +if ($ADD==26) +{ + $status = eregi_replace("-----.*",'',$status); + echo ""; + $stmt="SELECT count(*) from vicidial_campaigns where campaign_id='$campaign_id' and auto_alt_dial_statuses LIKE \"% $status %\";"; + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + if ($row[0] > 0) + {echo "
AUTO ALT DIAL STATUS NOT ADDED - there is already an entry for this campaign with this status\n";} + else + { + if ( (strlen($campaign_id) < 2) or (strlen($status) < 1) ) + { + echo "
AUTO ALT DIAL STATUS 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"; + } + else + { + echo "
AUTO ALT DIAL STATUS ADDED: $campaign_id - $status\n"; + + $stmt="SELECT auto_alt_dial_statuses from vicidial_campaigns where campaign_id='$campaign_id';"; + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + + if (strlen($row[0])<2) {$row[0] = ' -';} + $auto_alt_dial_statuses = " $status$row[0]"; + $stmt="UPDATE vicidial_campaigns set auto_alt_dial_statuses='$auto_alt_dial_statuses' 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|ADD A AUTO-ALT-DIAL STATUS|$PHP_AUTH_USER|$ip|$stmt|\n"); + fclose($fp); + } + } + } +$ADD=31; +} + + +###################### +# ADD=27 adds the new campaign agent pause code entry to the system +###################### + +if ($ADD==27) +{ + echo ""; + $stmt="SELECT count(*) from vicidial_pause_codes where campaign_id='$campaign_id' and pause_code='$pause_code';"; + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + if ($row[0] > 0) + {echo "
AGENT PAUSE CODE NOT ADDED - there is already an entry for this campaign with this pause code\n";} + else + { + if ( (strlen($campaign_id) < 2) or (strlen($pause_code) < 1) or (strlen($pause_code) > 6) or (strlen($pause_code_name) < 2) ) + { + echo "
AGENT PAUSE CODE NOT ADDED - Please go back and look at the data you entered\n"; + echo "
pause code must be between 1 and 6 characters in length\n"; + echo "
pause code name must be between 2 and 30 characters in length\n"; + } + else + { + echo "
AGENT PAUSE CODE ADDED: $campaign_id - $pause_code - $pause_code_name\n"; + + $stmt="INSERT INTO vicidial_pause_codes(campaign_id,pause_code,pause_code_name,billable) values('$campaign_id','$pause_code','$pause_code_name','$billable');"; + $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 AGENT PAUSE CODE|$PHP_AUTH_USER|$ip|$stmt|\n"); + fclose($fp); + } + } + } +$ADD=31; +} + + +###################### +# ADD=28 adds new status to the campaign dial statuses +###################### + +if ($ADD==28) +{ + $status = eregi_replace("-----.*",'',$status); + echo ""; + $stmt="SELECT count(*) from vicidial_campaigns where campaign_id='$campaign_id' and dial_statuses LIKE \"% $status %\";"; + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + if ($row[0] > 0) + {echo "
CAMPAIGN DIAL STATUS NOT ADDED - there is already an entry for this campaign with this status\n";} + else + { + if ( (strlen($campaign_id) < 2) or (strlen($status) < 1) ) + { + echo "
CAMPAIGN DIAL STATUS 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"; + } + else + { + echo "
CAMPAIGN DIAL STATUS ADDED: $campaign_id - $status\n"; + + $stmt="SELECT dial_statuses from vicidial_campaigns where campaign_id='$campaign_id';"; + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + + if (strlen($row[0])<2) {$row[0] = ' -';} + $dial_statuses = " $status$row[0]"; + $stmt="UPDATE vicidial_campaigns set dial_statuses='$dial_statuses' 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|ADD CAMPAIGN DIAL STATUS |$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 ($list_id < 100) 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"; + echo "
List ID must be greater than 100\n"; + } + else + { + echo "
LIST ADDED: $list_id\n"; + + $stmt="INSERT INTO vicidial_lists (list_id,list_name,campaign_id,active,list_description,list_changedate) values('$list_id','$list_name','$campaign_id','$active','$list_description','$SQLdate');"; + $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|$stmt|\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(user_group,group_name,allowed_campaigns) values('$user_group','$group_name','-ALL-CAMPAIGNS-');"; + $rslt=mysql_query($stmt, $link); + + echo "
USER GROUP ADDED: $user_group\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|$stmt|\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','$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; +} + + +###################### +# ADD=21111111111 adds new phone to the system +###################### + +if ($ADD==21111111111) +{ +echo "
\n"; + 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=31111111111; +} + + +###################### +# ADD=211111111111 adds new server to the system +###################### + +if ($ADD==211111111111) +{ +echo "
\n"; + 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=311111111111; +} + + +###################### +# ADD=221111111111 adds the new vicidial server trunk record to the system +###################### + +if ($ADD==221111111111) +{ + echo ""; + $stmt="SELECT max_vicidial_trunks from servers where server_ip='$server_ip';"; + $rslt=mysql_query($stmt, $link); + $rowx=mysql_fetch_row($rslt); + $MAXvicidial_trunks = $rowx[0]; + + $stmt="SELECT sum(dedicated_trunks) from vicidial_server_trunks where server_ip='$server_ip' and campaign_id !='$campaign_id';"; + $rslt=mysql_query($stmt, $link); + $rowx=mysql_fetch_row($rslt); + $SUMvicidial_trunks = ($rowx[0] + $dedicated_trunks); + + if ($SUMvicidial_trunks > $MAXvicidial_trunks) + { + echo "
VICIDIAL SERVER TRUNK RECORD NOT ADDED - the number of vicidial trunks is too high: $SUMvicidial_trunks / $MAXvicidial_trunks\n"; + } + else + { + $stmt="SELECT count(*) from vicidial_server_trunks where campaign_id='$campaign_id' and server_ip='$server_ip';"; + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + if ($row[0] > 0) + {echo "
VICIDIAL SERVER TRUNK RECORD NOT ADDED - there is already a server-trunk record for this campaign\n";} + else + { + if ( (strlen($campaign_id) < 2) or (strlen($server_ip) < 7) or (strlen($dedicated_trunks) < 1) or (strlen($trunk_restriction) < 1) ) + { + echo "
VICIDIAL SERVER TRUNK RECORD NOT ADDED - Please go back and look at the data you entered\n"; + echo "
campaign must be between 3 and 8 characters in length\n"; + echo "
server_ip delay must be at least 7 characters\n"; + echo "
trunks must be a digit from 0 to 9999\n"; + } + else + { + echo "
VICIDIAL SERVER TRUNK RECORD ADDED: $campaign_id - $server_ip - $dedicated_trunks - $trunk_restriction\n"; + + $stmt="INSERT INTO vicidial_server_trunks(server_ip,campaign_id,dedicated_trunks,trunk_restriction) values('$server_ip','$campaign_id','$dedicated_trunks','$trunk_restriction');"; + $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 VICIDIAL TRUNK |$PHP_AUTH_USER|$ip|$stmt|\n"); + fclose($fp); + } + } + } + } +$ADD=311111111111; +} + + +###################### +# ADD=2111111111111 adds new conference to the system +###################### + +if ($ADD==2111111111111) +{ +echo "
\n"; + 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=3111111111111; +} + + +###################### +# ADD=21111111111111 adds new vicidial conference to the system +###################### + +if ($ADD==21111111111111) +{ +echo "
\n"; + echo ""; + $stmt="SELECT count(*) from vicidial_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 "
VICIDIAL CONFERENCE NOT ADDED - there is already a vicidial conference in the system with this ID and server\n";} + else + { + if ( (strlen($conf_exten) < 1) or (strlen($server_ip) < 7) ) + {echo "
VICIDIAL CONFERENCE NOT ADDED - Please go back and look at the data you entered\n";} + else + { + echo "
VICIDIAL CONFERENCE ADDED\n"; + + $stmt="INSERT INTO vicidial_conferences (conf_exten,server_ip) values('$conf_exten','$server_ip');"; + $rslt=mysql_query($stmt, $link); + } + } +$ADD=31111111111111; +} + + + +###################################################################################################### +###################################################################################################### +####### 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") +{ + if ($LOGmodify_users==1) + { + 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',modify_users='$modify_users',modify_campaigns='$modify_campaigns',modify_lists='$modify_lists',modify_scripts='$modify_scripts',modify_filters='$modify_filters',modify_ingroups='$modify_ingroups',modify_usergroups='$modify_usergroups',modify_remoteagents='$modify_remoteagents',modify_servers='$modify_servers',view_reports='$view_reports',vicidial_recording_override='$vicidial_recording_override',alter_custdata_override='$alter_custdata_override' 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); + } + } + } + else + { + echo "You do not have permission to view this page\n"; + exit; + } +$ADD=3; # go to user modification below +} + + +###################### +# ADD=4B submit user modifications to the system - ADMIN +###################### + +if ($ADD=="4B") +{ + if ($LOGmodify_users==1) + { + 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',vicidial_recording_override='$vicidial_recording_override',alter_custdata_override='$alter_custdata_override' 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); + } + } + } + else + { + echo "You do not have permission to view this page\n"; + exit; + } +$ADD=3; # go to user modification below +} + + + +###################### +# ADD=4 submit user modifications to the system +###################### + +if ($ADD==4) +{ + if ($LOGmodify_users==1) + { + 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); + } + } + } + else + { + echo "You do not have permission to view this page\n"; + exit; + } +$ADD=3; # go to user modification below +} + +###################### +# ADD=41 submit campaign modifications to the system +###################### + +if ($ADD==41) +{ + if ($LOGmodify_campaigns==1) + { + 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"; + echo "
|$campaign_name|$active|\n"; + } + else + { + echo "
CAMPAIGN MODIFIED: $campaign_id\n"; + + if ($dial_method == 'MANUAL') + { + $auto_dial_level='0'; + $adlSQL = "auto_dial_level='0',"; + } + else + { + if ($dial_level_override > 0) + { + $adlSQL = "auto_dial_level='$auto_dial_level',"; + } + else + { + if ($dial_method == 'RATIO') + { + if ($auto_dial_level < 1) {$auto_dial_level = "1.0";} + $adlSQL = "auto_dial_level='$auto_dial_level',"; + } + else + { + $adlSQL = ""; + if ($auto_dial_level < 1) + { + $auto_dial_level = "1.0"; + $adlSQL = "auto_dial_level='$auto_dial_level',"; + } + } + } + } + $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', $adlSQL 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',allcalls_delay='$allcalls_delay',omit_phone_code='$omit_phone_code',dial_method='$dial_method',available_only_ratio_tally='$available_only_ratio_tally',adaptive_dropped_percentage='$adaptive_dropped_percentage',adaptive_maximum_level='$adaptive_maximum_level',adaptive_latest_server_time='$adaptive_latest_server_time',adaptive_intensity='$adaptive_intensity',adaptive_dl_diff_target='$adaptive_dl_diff_target',concurrent_transfers='$concurrent_transfers',auto_alt_dial='$auto_alt_dial',agent_pause_codes_active='$agent_pause_codes_active',campaign_description='$campaign_description',campaign_changedate='$SQLdate',campaign_stats_refresh='$campaign_stats_refresh',disable_alter_custdata='$disable_alter_custdata',no_hopper_leads_logins='$no_hopper_leads_logins' 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 IN('READY','QUEUE','DONE');"; + $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|$stmt|\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); + } + } + } + else + { + echo "You do not have permission to view this page\n"; + exit; + } +$ADD=31; # go to campaign modification form below +} + +###################### +# ADD=42 delete campaign status in the system +###################### + +if ($ADD==42) +{ + if ($LOGmodify_campaigns==1) + { + 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); + } + } + } + else + { + echo "You do not have permission to view this page\n"; + exit; + } +$ADD=31; # go to campaign modification form below +} + +###################### +# ADD=43 delete campaign hotkey in the system +###################### + +if ($ADD==43) +{ + if ($LOGmodify_campaigns==1) + { + echo ""; + + if ( (strlen($campaign_id) < 2) or (strlen($status) < 1) or (strlen($hotkey) < 1) ) + { + echo "
CAMPAIGN HOT KEY 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 HOT KEY 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); + } + } + } + else + { + echo "You do not have permission to view this page\n"; + exit; + } +$ADD=31; # go to campaign modification form below +} + +###################### +# ADD=44 submit campaign modifications to the system - Basic View +###################### + +if ($ADD==44) +{ + if ($LOGmodify_campaigns==1) + { + 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"; + + if ($dial_method == 'RATIO') + { + if ($auto_dial_level < 1) {$auto_dial_level = "1.0";} + $adlSQL = "auto_dial_level='$auto_dial_level',"; + } + else + { + if ($dial_method == 'MANUAL') + { + $auto_dial_level='0'; + $adlSQL = "auto_dial_level='0',"; + } + else + { + $adlSQL = ""; + if ($auto_dial_level < 1) + { + $auto_dial_level = "1.0"; + $adlSQL = "auto_dial_level='$auto_dial_level',"; + } + } + } + $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', $adlSQL lead_filter_id='$lead_filter_id',dial_method='$dial_method',adaptive_intensity='$adaptive_intensity',campaign_description='$campaign_description',campaign_changedate='$SQLdate' 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 IN('READY','QUEUE','DONE');;"; + $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|$stmt|\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); + } + } + } + else + { + echo "You do not have permission to view this page\n"; + exit; + } +$ADD=34; # go to campaign modification form below +} + +###################### +# ADD=45 modify campaign lead recycle in the system +###################### + +if ($ADD==45) +{ + if ($LOGmodify_campaigns==1) + { + 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); + } + } + } + else + { + echo "You do not have permission to view this page\n"; + exit; + } +$ADD=31; # go to campaign modification form below +} + +###################### +# ADD=47 modify agent pause code in the system +###################### + +if ($ADD==47) +{ + if ($LOGmodify_campaigns==1) + { + echo ""; + + if ( (strlen($campaign_id) < 2) or (strlen($pause_code) < 1) or (strlen($pause_code) > 6) or (strlen($pause_code_name) < 2) ) + { + echo "
AGENT PAUSE CODE NOT MODIFIED - Please go back and look at the data you entered\n"; + echo "
pause_code must be between 1 and 6 characters in length\n"; + echo "
pause_code name must be between 2 and 30 characters in length\n"; + } + else + { + echo "
AGENT PAUSE CODE MODIFIED: $campaign_id - $pause_code - $pause_code_name\n"; + + $stmt="UPDATE vicidial_pause_codes SET pause_code_name='$pause_code_name',billable='$billable' where campaign_id='$campaign_id' and pause_code='$pause_code';"; + $rslt=mysql_query($stmt, $link); + + ### LOG CHANGES TO LOG FILE ### + if ($WeBRooTWritablE > 0) + { + $fp = fopen ("./admin_changes_log.txt", "a"); + fwrite ($fp, "$date|MODIFY AGENT PAUSECODE|$PHP_AUTH_USER|$ip|$stmt|\n"); + fclose($fp); + } + } + } + else + { + echo "You do not have permission to view this page\n"; + exit; + } +$ADD=31; # go to campaign modification form below +} + +###################### +# ADD=411 submit list modifications to the system +###################### + +if ($ADD==411) +{ + if ($LOGmodify_lists==1) + { + 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',list_description='$list_description',list_changedate='$SQLdate' 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',list_description='$list_description' where list_id='$list_id'|\n"); + fclose($fp); + } + } + } + else + { + echo "You do not have permission to view this page\n"; + exit; + } +$ADD=311; # go to list modification form below +} + + +###################### +# ADD=4111 modify in-group info in the system +###################### + +if ($ADD==4111) +{ + if ($LOGmodify_ingroups==1) + { + 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); + } + } + } + else + { + echo "You do not have permission to view this page\n"; + exit; + } +$ADD=3111; # go to in-group modification form below +} + + + +###################### +# ADD=41111 modify remote agents info in the system +###################### + +if ($ADD==41111) +{ + if ($LOGmodify_remoteagents==1) + { + 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); + } + } + } + else + { + echo "You do not have permission to view this page\n"; + exit; + } +$ADD=31111; # go to remote agents modification form below +} + + + +###################### +# ADD=411111 modify user group info in the system +###################### + +if ($ADD==411111) +{ + if ($LOGmodify_usergroups==1) + { + 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',allowed_campaigns='$campaigns_value' 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|$stmt|\n"); + fclose($fp); + } + } + } + else + { + echo "You do not have permission to view this page\n"; + exit; + } +$ADD=311111; # go to user group modification form below +} + +###################### +# ADD=4111111 modify script in the system +###################### + +if ($ADD==4111111) +{ + if ($LOGmodify_scripts==1) + { + echo "\n"; + echo "\n"; + 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='$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); + } + } + } + else + { + echo "You do not have permission to view this page\n"; + exit; + } +$ADD=3111111; # go to script modification form below +} + + +###################### +# ADD=41111111 modify filter in the system +###################### + +if ($ADD==41111111) +{ + if ($LOGmodify_filters==1) + { + 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); + } + } + } + else + { + echo "You do not have permission to view this page\n"; + exit; + } +$ADD=31111111; # go to filter modification form below +} + + +###################### +# ADD=411111111 modify call time in the system +###################### + +if ($ADD==411111111) +{ + if ($LOGmodify_call_times==1) + { + 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); + } + } + } + else + { + echo "You do not have permission to view this page\n"; + exit; + } +$ADD=311111111; # go to call time modification form below +} + + +###################### +# ADD=4111111111 modify state call time in the system +###################### + +if ($ADD==4111111111) +{ + if ($LOGmodify_call_times==1) + { + 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); + } + } + } + else + { + echo "You do not have permission to view this page\n"; + exit; + } +$ADD=3111111111; # go to state call time modification form below +} + + +###################### +# ADD=41111111111 modify phone record in the system +###################### + +if ($ADD==41111111111) +{ + if ($LOGast_admin_access==1) + { + 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', enable_sipsak_messages='$enable_sipsak_messages' where extension='$old_extension' and server_ip='$old_server_ip';"; + $rslt=mysql_query($stmt, $link); + } + } + } + else + { + echo "You do not have permission to view this page\n"; + exit; + } +$ADD=31111111111; # go to phone modification form below +} + + +###################### +# ADD=411111111111 modify server record in the system +###################### + +if ($ADD==411111111111) +{ + if ($LOGmodify_servers==1) + { + 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', sys_perf_log='$sys_perf_log', vd_server_logs='$vd_server_logs', agi_output='$agi_output', vicidial_balance_active='$vicidial_balance_active', balance_trunks_offlimits='$balance_trunks_offlimits' where server_id='$old_server_id';"; + $rslt=mysql_query($stmt, $link); + } + } + } + } + else + { + echo "You do not have permission to view this page\n"; + exit; + } +$ADD=311111111111; # go to server modification form below +} + + +###################### +# ADD=421111111111 modify vicidial server trunks record in the system +###################### + +if ($ADD==421111111111) +{ + if ($LOGmodify_servers==1) + { + echo ""; + $stmt="SELECT max_vicidial_trunks from servers where server_ip='$server_ip';"; + $rslt=mysql_query($stmt, $link); + $rowx=mysql_fetch_row($rslt); + $MAXvicidial_trunks = $rowx[0]; + + $stmt="SELECT sum(dedicated_trunks) from vicidial_server_trunks where server_ip='$server_ip' and campaign_id !='$campaign_id';"; + $rslt=mysql_query($stmt, $link); + $rowx=mysql_fetch_row($rslt); + $SUMvicidial_trunks = ($rowx[0] + $dedicated_trunks); + + if ($SUMvicidial_trunks > $MAXvicidial_trunks) + { + echo "
VICIDIAL SERVER TRUNK RECORD NOT ADDED - the number of vicidial trunks is too high: $SUMvicidial_trunks / $MAXvicidial_trunks\n"; + } + else + { + if ( (strlen($campaign_id) < 2) or (strlen($server_ip) < 7) or (strlen($dedicated_trunks) < 1) or (strlen($trunk_restriction) < 1) ) + { + echo "
VICIDIAL SERVER TRUNK RECORD NOT MODIFIED - Please go back and look at the data you entered\n"; + echo "
campaign must be between 3 and 8 characters in length\n"; + echo "
server_ip delay must be at least 7 characters\n"; + echo "
trunks must be a digit from 0 to 9999\n"; + } + else + { + echo "
VICIDIAL SERVER TRUNK RECORD MODIFIED: $campaign_id - $server_ip - $dedicated_trunks - $trunk_restriction\n"; + + $stmt="UPDATE vicidial_server_trunks SET dedicated_trunks='$dedicated_trunks',trunk_restriction='$trunk_restriction' where campaign_id='$campaign_id' and server_ip='$server_ip';"; + $rslt=mysql_query($stmt, $link); + + ### LOG CHANGES TO LOG FILE ### + if ($WeBRooTWritablE > 0) + { + $fp = fopen ("./admin_changes_log.txt", "a"); + fwrite ($fp, "$date|MODIFY SERVER TRUNK |$PHP_AUTH_USER|$ip|$stmt|\n"); + fclose($fp); + } + } + } + } + else + { + echo "You do not have permission to view this page\n"; + exit; + } +$ADD=311111111111; # go to server modification form below +} + + +###################### +# ADD=4111111111111 modify conference record in the system +###################### + +if ($ADD==4111111111111) +{ + if ($LOGast_admin_access==1) + { + 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); + } + } + } + else + { + echo "You do not have permission to view this page\n"; + exit; + } +$ADD=3111111111111; # go to conference modification form below +} + + +###################### +# ADD=41111111111111 modify vicidial conference record in the system +###################### + +if ($ADD==41111111111111) +{ + if ($LOGast_admin_access==1) + { + echo ""; + + $stmt="SELECT count(*) from vicidial_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 "
VICIDIAL 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 "
VICIDIAL CONFERENCE NOT MODIFIED - Please go back and look at the data you entered\n";} + else + { + echo "
VICIDIAL CONFERENCE MODIFIED: $conf_exten\n"; + + $stmt="UPDATE vicidial_conferences set conf_exten='$conf_exten',server_ip='$server_ip',extension='$extension' where conf_exten='$old_conf_exten';"; + $rslt=mysql_query($stmt, $link); + + } + } + } + else + { + echo "You do not have permission to view this page\n"; + exit; + } +$ADD=31111111111111; # go to vicidial conference modification form below +} + + + +###################### +# ADD=411111111111111 modify vicidial system settings +###################### + +if ($ADD==411111111111111) +{ + if ($LOGmodify_servers==1) + { + echo ""; + + echo "
VICIDIAL SYSTEM SETTINGS MODIFIED\n"; + + $stmt="UPDATE system_settings set use_non_latin='$use_non_latin',webroot_writable='$webroot_writable',enable_queuemetrics_logging='$enable_queuemetrics_logging',queuemetrics_server_ip='$queuemetrics_server_ip',queuemetrics_dbname='$queuemetrics_dbname',queuemetrics_login='$queuemetrics_login',queuemetrics_pass='$queuemetrics_pass',queuemetrics_url='$queuemetrics_url',queuemetrics_log_id='$queuemetrics_log_id',queuemetrics_eq_prepend='$queuemetrics_eq_prepend',vicidial_agent_disable='$vicidial_agent_disable',allow_sipsak_messages='$allow_sipsak_messages',admin_home_url='$admin_home_url';"; + $rslt=mysql_query($stmt, $link); + + ### LOG CHANGES TO LOG FILE ### + if ($WeBRooTWritablE > 0) + { + $fp = fopen ("./admin_changes_log.txt", "a"); + fwrite ($fp, "$date|MODIFY SYSTEM SETTINGS|$PHP_AUTH_USER|$ip|$stmt|\n"); + fclose($fp); + } + } + else + { + echo "You do not have permission to view this page\n"; + exit; + } +$ADD=311111111111111; # go to vicidial system settings 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=53 confirmation before Emergency VDAC Jam Clear - deletes oldest LIVE vicidial_auto_call record +###################### + +if ($ADD==53) +{ + if (eregi('IN',$stage)) + {$group_id=$campaign_id;} + echo ""; + + if (strlen($campaign_id) < 2) + { + echo "
VDAC NOT CLEARED FOR 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 "
VDAC CLEAR CONFIRMATION: $campaign_id\n"; + echo "

Click here to delete the oldest LIVE record in VDAC for $campaign_id


\n"; + } + +# go to campaign modification below +if (eregi('IN',$stage)) + {$ADD='3111';} +else + {$ADD='31';} +} + +###################### +# 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 state 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 +} + + +###################### +# ADD=51111111111 confirmation before deletion of phone record +###################### + +if ($ADD==51111111111) +{ + echo ""; + + if ( (strlen($extension) < 2) or (strlen($server_ip) < 7) or ($LOGast_delete_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='31111111111'; # go to phone modification below +} + + +###################### +# ADD=511111111111 confirmation before deletion of server record +###################### + +if ($ADD==511111111111) +{ + echo ""; + + if ( (strlen($server_id) < 2) or (strlen($server_ip) < 7) or ($LOGast_delete_phones < 1) ) + { + echo "
SERVER NOT DELETED - Please go back and look at the data you entered\n"; + echo "
Server ID be at least 2 characters in length\n"; + echo "
Server IP be at least 7 characters in length\n"; + } + else + { + echo "
SERVER DELETION CONFIRMATION: $server_id - $server_ip\n"; + echo "

Click here to delete phone $server_id - $server_ip


\n"; + } +$ADD='311111111111'; # go to server modification below +} + + +###################### +# ADD=5111111111111 confirmation before deletion of conference record +###################### + +if ($ADD==5111111111111) +{ + echo ""; + + if ( (strlen($conf_exten) < 2) or (strlen($server_ip) < 7) or ($LOGast_delete_phones < 1) ) + { + echo "
CONFERENCE NOT DELETED - Please go back and look at the data you entered\n"; + echo "
Conference must be at least 2 characters in length\n"; + echo "
Server IP be at least 7 characters in length\n"; + } + else + { + echo "
CONFERENCE DELETION CONFIRMATION: $conf_exten - $server_ip\n"; + echo "

Click here to delete phone $conf_exten - $server_ip


\n"; + } +$ADD='3111111111111'; # go to conference modification below +} + + +###################### +# ADD=51111111111111 confirmation before deletion of vicidial conference record +###################### + +if ($ADD==51111111111111) +{ + echo ""; + + if ( (strlen($conf_exten) < 2) or (strlen($server_ip) < 7) or ($LOGast_delete_phones < 1) ) + { + echo "
VICIDIAL CONFERENCE NOT DELETED - Please go back and look at the data you entered\n"; + echo "
Conference must be at least 2 characters in length\n"; + echo "
Server IP be at least 7 characters in length\n"; + } + else + { + echo "
VICIDIAL CONFERENCE DELETION CONFIRMATION: $conf_exten - $server_ip\n"; + echo "

Click here to delete phone $conf_exten - $server_ip


\n"; + } +$ADD='31111111111111'; # go to vicidial conference 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 from a campaign +###################### + +if ($ADD==62) +{ + if ($LOGmodify_campaigns==1) + { + 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"; + } + } + else + { + echo "You do not have permission to view this page\n"; + exit; + } +$ADD='31'; # go to campaign modification below +} + + +###################### +# ADD=63 Emergency VDAC Jam Clear +###################### + +if ($ADD==63) +{ + if ($LOGmodify_campaigns==1) + { + if (eregi('IN',$stage)) + {$group_id=$campaign_id;} + echo ""; + + if (strlen($campaign_id) < 2) + { + echo "
VDAC NOT CLEARED FOR 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_auto_calls where status='LIVE' and campaign_id='$campaign_id' order by call_time 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|EMERGENCY VDAC CLEAR|$PHP_AUTH_USER|$ip|campaign_id='$campaign_id'|\n"); + fclose($fp); + } + echo "
LAST VDAC RECORD CLEARED FOR CAMPAIGN: $campaign_id\n"; + echo "

\n"; + } + } + else + { + echo "You do not have permission to view this page\n"; + exit; + } +# go to campaign modification below +if (eregi('IN',$stage)) + {$ADD='3111';} +else + {$ADD='31';} +} + + +###################### +# ADD=65 delete campaign lead recycle in the system +###################### + +if ($ADD==65) +{ + if ($LOGmodify_campaigns==1) + { + 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); + } + } + } + else + { + echo "You do not have permission to view this page\n"; + exit; + } +$ADD=31; # go to campaign modification form below +} + + +###################### +# ADD=66 delete auto alt dial status from the campaign +###################### + +if ($ADD==66) +{ + if ($LOGmodify_campaigns==1) + { + echo ""; + $stmt="SELECT count(*) from vicidial_campaigns where campaign_id='$campaign_id' and auto_alt_dial_statuses LIKE \"% $status %\";"; + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + if ($row[0] < 1) + {echo "
AUTO ALT DIAL STATUS NOT DELETED - this auto alt dial status is not in this campaign\n";} + else + { + if ( (strlen($campaign_id) < 2) or (strlen($status) < 1) ) + { + echo "
AUTO ALT DIAL STATUS 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"; + } + else + { + echo "
AUTO ALT DIAL STATUS DELETED: $campaign_id - $status\n"; + + $stmt="SELECT auto_alt_dial_statuses from vicidial_campaigns where campaign_id='$campaign_id';"; + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + + $auto_alt_dial_statuses = eregi_replace(" $status "," ",$row[0]); + $stmt="UPDATE vicidial_campaigns set auto_alt_dial_statuses='$auto_alt_dial_statuses' 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|DELETE AUTALTDIALSTTUS|$PHP_AUTH_USER|$ip|$stmt|\n"); + fclose($fp); + } + } + } + } + else + { + echo "You do not have permission to view this page\n"; + exit; + } +$ADD=31; # go to campaign modification form below +} + +###################### +# ADD=67 delete agent pause code in the system +###################### + +if ($ADD==67) +{ + if ($LOGmodify_campaigns==1) + { + echo ""; + + if ( (strlen($campaign_id) < 2) or (strlen($pause_code) < 1) ) + { + echo "
CAMPAIGN PAUSE CODE NOT DELETED - Please go back and look at the data you entered\n"; + echo "
pause code must be between 1 and 6 characters in length\n"; + } + else + { + echo "
CAMPAIGN PAUSE CODE DELETED: $campaign_id - $pause_code\n"; + + $stmt="DELETE FROM vicidial_pause_codes where campaign_id='$campaign_id' and pause_code='$pause_code';"; + $rslt=mysql_query($stmt, $link); + + ### LOG CHANGES TO LOG FILE ### + if ($WeBRooTWritablE > 0) + { + $fp = fopen ("./admin_changes_log.txt", "a"); + fwrite ($fp, "$date|DELETE AGENT PAUSECODE|$PHP_AUTH_USER|$ip|$stmt|\n"); + fclose($fp); + } + } + } + else + { + echo "You do not have permission to view this page\n"; + exit; + } +$ADD=31; # go to campaign modification form below +} + + +###################### +# ADD=68 remove campaign dial status +###################### + +if ($ADD==68) +{ + if ($LOGmodify_campaigns==1) + { + echo ""; + $stmt="SELECT count(*) from vicidial_campaigns where campaign_id='$campaign_id' and dial_statuses LIKE \"% $status %\";"; + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + if ($row[0] < 1) + {echo "
CAMPAIGN DIAL STATUS NOT REMOVED - this dial status is not selected for this campaign\n";} + else + { + if ( (strlen($campaign_id) < 2) or (strlen($status) < 1) ) + { + echo "
CAMPAIGN DIAL STATUS NOT REMOVED - Please go back and look at the data you entered\n"; + echo "
status must be between 1 and 6 characters in length\n"; + } + else + { + echo "
CAMPAIGN DIAL STATUS REMOVED: $campaign_id - $status\n"; + + $stmt="SELECT dial_statuses from vicidial_campaigns where campaign_id='$campaign_id';"; + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + + $dial_statuses = eregi_replace(" $status "," ",$row[0]); + $stmt="UPDATE vicidial_campaigns set dial_statuses='$dial_statuses' 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|DIAL STATUS REMOVED |$PHP_AUTH_USER|$ip|$stmt|\n"); + fclose($fp); + } + } + } + } + else + { + echo "You do not have permission to view this page\n"; + exit; + } +$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 state 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 +} + + +###################### +# ADD=61111111111 delete phone record +###################### + +if ($ADD==61111111111) +{ + echo ""; + + if ( (strlen($extension) < 2) or (strlen($server_ip) < 7) or ($CoNfIrM != 'YES') or ($LOGast_delete_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='10000000000'; # go to phone list +} + + +###################### +# ADD=611111111111 delete server record +###################### + +if ($ADD==611111111111) +{ + echo ""; + + if ( (strlen($server_id) < 2) or (strlen($server_ip) < 7) or ($CoNfIrM != 'YES') or ($LOGast_delete_phones < 1) ) + { + echo "
SERVER NOT DELETED - Please go back and look at the data you entered\n"; + echo "
Server ID be at least 2 characters in length\n"; + echo "
Server IP be at least 7 characters in length\n"; + } + else + { + $stmt="DELETE from servers where server_id='$server_id' 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 SERVER!!|$PHP_AUTH_USER|$ip|server_id='$server_id'|server_ip='$server_ip'|\n"); + fclose($fp); + } + echo "
SERVER DELETION COMPLETED: $server_id - $server_ip\n"; + echo "

\n"; + } +$ADD='100000000000'; # go to server list +} + + +###################### +# ADD=621111111111 delete vicidial server trunk record in the system +###################### + +if ($ADD==621111111111) +{ + if ($LOGmodify_servers==1) + { + echo ""; + + if ( (strlen($campaign_id) < 2) or (strlen($server_ip) < 7) ) + { + echo "
VICIDIAL SERVER TRUNK RECORD NOT DELETED - Please go back and look at the data you entered\n"; + echo "
campaign must be between 3 and 8 characters in length\n"; + echo "
server_ip delay must be at least 7 characters\n"; + } + else + { + echo "
VICIDIAL SERVER TRUNK RECORD DELETED: $campaign_id - $server_ip\n"; + + $stmt="DELETE FROM vicidial_server_trunks where campaign_id='$campaign_id' and server_ip='$server_ip';"; + $rslt=mysql_query($stmt, $link); + + ### LOG CHANGES TO LOG FILE ### + if ($WeBRooTWritablE > 0) + { + $fp = fopen ("./admin_changes_log.txt", "a"); + fwrite ($fp, "$date|DELETE SERVER TRUNK |$PHP_AUTH_USER|$ip|$stmt|\n"); + fclose($fp); + } + } + } + else + { + echo "You do not have permission to view this page\n"; + exit; + } +$ADD=311111111111; # go to server modification form below +} + + +###################### +# ADD=6111111111111 delete conference record +###################### + +if ($ADD==6111111111111) +{ + echo ""; + + if ( (strlen($conf_exten) < 2) or (strlen($server_ip) < 7) or ($CoNfIrM != 'YES') or ($LOGast_delete_phones < 1) ) + { + echo "
CONFERENCE NOT DELETED - Please go back and look at the data you entered\n"; + echo "
Conference be at least 2 characters in length\n"; + echo "
Server IP be at least 7 characters in length\n"; + } + else + { + $stmt="DELETE from conferences where conf_exten='$conf_exten' 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 CONF!!!!|$PHP_AUTH_USER|$ip|conf_exten='$conf_exten'|server_ip='$server_ip'|\n"); + fclose($fp); + } + echo "
CONFERENCE DELETION COMPLETED: $conf_exten - $server_ip\n"; + echo "

\n"; + } +$ADD='1000000000000'; # go to conference list +} + + +###################### +# ADD=61111111111111 delete vicidial conference record +###################### + +if ($ADD==61111111111111) +{ + echo ""; + + if ( (strlen($conf_exten) < 2) or (strlen($server_ip) < 7) or ($CoNfIrM != 'YES') or ($LOGast_delete_phones < 1) ) + { + echo "
VICIDIAL CONFERENCE NOT DELETED - Please go back and look at the data you entered\n"; + echo "
Conference be at least 2 characters in length\n"; + echo "
Server IP be at least 7 characters in length\n"; + } + else + { + $stmt="DELETE from vicidial_conferences where conf_exten='$conf_exten' 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 CONF!!!!|$PHP_AUTH_USER|$ip|conf_exten='$conf_exten'|server_ip='$server_ip'|\n"); + fclose($fp); + } + echo "
VICIDIAL CONFERENCE DELETION COMPLETED: $conf_exten - $server_ip\n"; + echo "

\n"; + } +$ADD='10000000000000'; # go to vicidial conference list +} + + + + + +###################################################################################################### +###################################################################################################### +####### 3 series, record modification forms +###################################################################################################### +###################################################################################################### + + + + +###################### +# ADD=3 modify user info in the system +###################### + +if ($ADD==3) +{ + if ($LOGmodify_users==1) + { + 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]; + $modify_users = $row[34]; + $modify_campaigns = $row[35]; + $modify_lists = $row[36]; + $modify_scripts = $row[37]; + $modify_filters = $row[38]; + $modify_ingroups = $row[39]; + $modify_usergroups = $row[40]; + $modify_remoteagents = $row[41]; + $modify_servers = $row[42]; + $view_reports = $row[43]; + $vicidial_recording_override = $row[44]; + $alter_custdata_override = $row[45]; + + 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"; + 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"; + 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
Hot Keys 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
VICIDIAL Recording Override: $NWB#vicidial_users-vicidial_recording_override$NWE
Agent Alter Customer Data Override: $NWB#vicidial_users-alter_custdata_override$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
Modify Users: $NWB#vicidial_users-modify_sections$NWE
Modify Campaigns: $NWB#vicidial_users-modify_sections$NWE
Modify Lists: $NWB#vicidial_users-modify_sections$NWE
Modify Scripts: $NWB#vicidial_users-modify_sections$NWE
Modify Filters: $NWB#vicidial_users-modify_sections$NWE
Modify In-Groups: $NWB#vicidial_users-modify_sections$NWE
Modify User Groups: $NWB#vicidial_users-modify_sections$NWE
Modify Remote Agents: $NWB#vicidial_users-modify_sections$NWE
Modify Servers: $NWB#vicidial_users-modify_sections$NWE
View Reports: $NWB#vicidial_users-view_reports$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"; + } + } + else + { + echo "You do not have permission to view this page\n"; + exit; + } +} + + +###################### +# 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) and ( (!eregi("$campaign_id",$LOGallowed_campaigns)) and (!eregi("ALL-CAMPAIGNS",$LOGallowed_campaigns)) ) ) + {$ADD=30;} # send to not allowed screen if not in vicidial_user_groups allowed_campaigns list + +if ($ADD==31) +{ + if ($LOGmodify_users==1) + { + 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); + $campaign_name = $row[1]; + $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]; + $allcalls_delay = $row[44]; + $omit_phone_code = $row[45]; + $dial_method = $row[46]; + $available_only_ratio_tally = $row[47]; + $adaptive_dropped_percentage = $row[48]; + $adaptive_maximum_level = $row[49]; + $adaptive_latest_server_time = $row[50]; + $adaptive_intensity = $row[51]; + $adaptive_dl_diff_target = $row[52]; + $concurrent_transfers = $row[53]; + $auto_alt_dial = $row[54]; + $auto_alt_dial_statuses = $row[55]; + $agent_pause_codes_active = $row[56]; + $campaign_description = $row[57]; + $campaign_changedate = $row[58]; + $campaign_stats_refresh = $row[59]; + $campaign_logindate = $row[60]; + $dial_statuses = $row[61]; + $disable_alter_custdata = $row[62]; + $no_hopper_leads_logins = $row[63]; + + echo "
MODIFY A CAMPAIGNS RECORD: $row[0] - Basic View"; + echo " | Detail View | "; + echo "Real-Time 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"; + + $stmt="SELECT * from vicidial_statuses order by status"; + $rslt=mysql_query($stmt, $link); + $statuses_to_print = mysql_num_rows($rslt); + $statuses_list=''; + + $o=0; + while ($statuses_to_print > $o) + { + $rowx=mysql_fetch_row($rslt); + $statuses_list .= "\n"; + $statname_list["$rowx[0]"] = "$rowx[1]"; + $LRstatuses_list .= "\n"; + if (eregi("Y",$rowx[2])) + {$HKstatuses_list .= "\n";} + $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 .= "\n"; + $statname_list["$rowx[0]"] = "$rowx[1]"; + $LRstatuses_list .= "\n"; + if (eregi("Y",$rowx[2])) + {$HKstatuses_list .= "\n";} + $o++; + } + + $dial_statuses = preg_replace("/ -$/","",$dial_statuses); + $Dstatuses = explode(" ", $dial_statuses); + $Ds_to_print = (count($Dstatuses) -1); + + $o=0; + while ($Ds_to_print > $o) + { + $o++; + $Dstatus = $Dstatuses[$o]; + + echo "\n"; + } + + echo "\n"; + + echo "\n"; + + echo "\n"; + + echo "\n"; + + echo "\n"; + + echo "\n"; + + echo "\n"; + + echo "\n"; + + echo "\n"; + + echo "\n"; + + echo "\n"; + + echo "\n"; + + + + echo "\n"; + + echo "\n"; + + + echo "\n"; + + echo "\n"; + + echo "\n"; + + echo "\n"; + + echo "\n"; + + echo "\n"; + + echo "\n"; + + echo "\n"; + + echo "\n"; + + echo "\n"; + + echo "\n"; + + echo "\n"; + + echo "\n"; + + echo "\n"; + + echo "\n"; + + echo "\n"; + + echo "\n"; + + echo "\n"; + + echo "\n"; + + echo "\n"; + + echo "\n"; + + 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|BLEND|INBND|_C$|_B$|_I$)", $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
Campaign Description: $NWB#vicidial_campaigns-campaign_description$NWE
Campaign Change Date: $campaign_changedate   $NWB#vicidial_campaigns-campaign_changedate$NWE
Campaign Login Date: $campaign_logindate   $NWB#vicidial_campaigns-campaign_logindate$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 $o: \n"; + echo "$Dstatus - $statname_list[$Dstatus]         \n"; + echo "REMOVE
Add A Dial Status:   \n"; + echo "     $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
Dial Method: $NWB#vicidial_campaigns-dial_method$NWE
Auto Dial Level: (0 = off)$NWB#vicidial_campaigns-auto_dial_level$NWE       ADAPT OVERRIDE
Available Only Tally: $NWB#vicidial_campaigns-available_only_ratio_tally$NWE
Drop Percentage Limit: % $NWB#vicidial_campaigns-adaptive_dropped_percentage$NWE
Maximum Adapt Dial Level: number only $NWB#vicidial_campaigns-adaptive_maximum_level$NWE
Latest Server Time: 4 digits only $NWB#vicidial_campaigns-adaptive_latest_server_time$NWE
Adapt Intensity Modifier: $NWB#vicidial_campaigns-adaptive_intensity$NWE
Dial Level Difference Target: $NWB#vicidial_campaigns-adaptive_dl_diff_target$NWE
Concurrent Transfers: $NWB#vicidial_campaigns-concurrent_transfers$NWE
Auto Alt-Number Dialing: $NWB#vicidial_campaigns-auto_alt_dial$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
Omit Phone Code: $NWB#vicidial_campaigns-omit_phone_code$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
Recording Delay: in seconds$NWB#vicidial_campaigns-allcalls_delay$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
Wrap Up Seconds: $NWB#vicidial_campaigns-wrapup_seconds$NWE
Wrap Up Message: $NWB#vicidial_campaigns-wrapup_message$NWE
Use Internal DNC List: $NWB#vicidial_campaigns-use_internal_dnc$NWE
Agent Pause Codes Active: $NWB#vicidial_campaigns-agent_pause_codes_active$NWE
Campaign Stats Refresh: $NWB#vicidial_campaigns-campaign_stats_refresh$NWE
Disable Alter Customer Data: $NWB#vicidial_campaigns-disable_alter_custdata$NWE
Allow No-Hopper-Leads Logins: $NWB#vicidial_campaigns-no_hopper_leads_logins$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_statuses,$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 "Click here to see a VDAD report for 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 HOT KEYS 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 "
HOT KEYSTATUSDESCRIPTIONDELETE
$rowx[1]$rowx[0]$rowx[2]DELETE
\n"; + + echo "
ADD NEW CUSTOM CAMPAIGN HOT KEY
\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 "

AUTO ALT NUMBER DIALING FOR THIS CAMPAIGN:   $NWB#vicidial_auto_alt_dial_statuses$NWE
\n"; + echo "\n"; + echo "\n"; + + $auto_alt_dial_statuses = preg_replace("/ -$/","",$auto_alt_dial_statuses); + $AADstatuses = explode(" ", $auto_alt_dial_statuses); + $AADs_to_print = (count($AADstatuses) -1); + + $o=0; + while ($AADs_to_print > $o) + { + if (eregi("1$|3$|5$|7$|9$", $o)) + {$bgcolor='bgcolor="#B9CBFD"';} + else + {$bgcolor='bgcolor="#9BB9FB"';} + $o++; + + echo "\n"; + echo "\n"; + } + + echo "
STATUSESDELETE
$AADstatuses[$o]DELETE
\n"; + + echo "
ADD NEW AUTO ALT NUMBER DIALING STATUS
\n"; + echo "\n"; + echo "\n"; + echo "Status:   \n"; + echo "
\n"; + + echo "

\n"; + + + + echo "

AGENT PAUSE CODES FOR THIS CAMPAIGN:   $NWB#vicidial_pause_codes$NWE
\n"; + echo "\n"; + echo "\n"; + + $stmt="SELECT * from vicidial_pause_codes where campaign_id='$campaign_id' order by pause_code"; + $rslt=mysql_query($stmt, $link); + $pause_codes_to_print = mysql_num_rows($rslt); + $o=0; + while ($pause_codes_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 "
PAUSE CODESBILLABLEMODIFYDELETE
$rowx[0]\n"; + echo "\n"; + echo "\n"; + echo "  \n"; + echo "
DELETE
\n"; + + echo "
ADD NEW AGENT PAUSE CODE
\n"; + echo "\n"; + echo "\n"; + echo "Pause Code: \n"; + echo "Pause Code Name: \n"; + echo "   Billable: \n"; + echo "
\n"; + + echo "

\n"; + + + + + + + echo "

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

\n"; + echo "EMERGENCY VDAC CLEAR FOR THIS CAMPAIGN

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

DELETE THIS CAMPAIGN\n"; + } + } + else + { + echo "You do not have permission to view this page\n"; + exit; + } +} + + +###################### +# ADD=34 modify campaign info in the system - Basic View +###################### + +if ( ($ADD==34) and ( (!eregi("$campaign_id",$LOGallowed_campaigns)) and (!eregi("ALL-CAMPAIGNS",$LOGallowed_campaigns)) ) ) + {$ADD=30;} # send to not allowed screen if not in vicidial_user_groups allowed_campaigns list + +if ($ADD==34) +{ + if ($LOGmodify_campaigns==1) + { + 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]; + $dial_method = $row[46]; + $adaptive_intensity = $row[51]; + $campaign_description = $row[57]; + $campaign_changedate = $row[58]; + $campaign_stats_refresh = $row[59]; + $campaign_logindate = $row[60]; + $dial_statuses = $row[61]; + + echo "
MODIFY A CAMPAIGN'S RECORD: $row[0] - Basic View | "; + echo "Detail View | "; + echo "Real-Time 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"; + + $stmt="SELECT * from vicidial_statuses order by status"; + $rslt=mysql_query($stmt, $link); + $statuses_to_print = mysql_num_rows($rslt); + $statuses_list=''; + + $o=0; + while ($statuses_to_print > $o) + { + $rowx=mysql_fetch_row($rslt); + $statuses_list .= "\n"; + $statname_list["$rowx[0]"] = "$rowx[1]"; + $LRstatuses_list .= "\n"; + if (eregi("Y",$rowx[2])) + {$HKstatuses_list .= "\n";} + $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 .= "\n"; + $statname_list["$rowx[0]"] = "$rowx[1]"; + $LRstatuses_list .= "\n"; + if (eregi("Y",$rowx[2])) + {$HKstatuses_list .= "\n";} + $o++; + } + + $dial_statuses = preg_replace("/ -$/","",$dial_statuses); + $Dstatuses = explode(" ", $dial_statuses); + $Ds_to_print = (count($Dstatuses) -1); + + $o=0; + while ($Ds_to_print > $o) + { + $o++; + $Dstatus = $Dstatuses[$o]; + + echo "\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
Campaign Description: $NWB#vicidial_campaigns-campaign_description$NWE
Campaign Change Date: $campaign_changedate   $NWB#vicidial_campaigns-campaign_changedate$NWE
Campaign Login Date: $campaign_logindate   $NWB#vicidial_campaigns-campaign_logindate$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 $o: \n"; + echo "$Dstatus - $statname_list[$Dstatus]         \n"; + echo "REMOVE
Add A Dial Status:   \n"; + echo "     $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
Dial Method: $NWB#vicidial_campaigns-dial_method$NWE
Auto Dial Level: (0 = off)$NWB#vicidial_campaigns-auto_dial_level$NWE
Adapt Intensity Modifier: $NWB#vicidial_campaigns-adaptive_intensity$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_statuses,$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 "Click here to see a VDAD report for 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"; + } + } + else + { + echo "You do not have permission to view this page\n"; + exit; + } +} + + +###################### +# ADD=31 campaign not allowed +###################### + +if ($ADD==30) +{ +echo "
\n"; + echo ""; +echo "You do not have permission to view campaign $campaign_id\n"; +} + + + +###################### +# ADD=311 modify list info in the system +###################### + +if ($ADD==311) +{ + if ($LOGmodify_lists==1) + { + 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]; + $list_description = $row[4]; + $list_changedate = $row[5]; + $list_lastcalldate = $row[6]; + + # 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 "\n"; + echo "\n"; + echo "\n"; + echo "
List ID: $row[0]$NWB#vicidial_lists-list_id$NWE
List Name: $NWB#vicidial_lists-list_name$NWE
List Description: $NWB#vicidial_lists-list_description$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
List Change Date: $list_changedate   $NWB#vicidial_lists-list_changedate$NWE
List Last Call Date: $list_lastcalldate   $NWB#vicidial_lists-list_lastcalldate$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"; + + echo "

Click here to see all CallBack Holds in this list

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

DELETE THIS LIST\n"; + } + } + else + { + echo "You do not have permission to view this page\n"; + exit; + } +} + + + +###################### +# ADD=3111 modify in-group info in the system +###################### + +if ($ADD==3111) +{ + if ($LOGmodify_ingroups==1) + { + 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 "Click here to see a report for this campaign

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

EMERGENCY VDAC CLEAR FOR THIS IN-GROUP

\n"; + echo "

DELETE THIS IN-GROUP\n"; + } + } + else + { + echo "You do not have permission to view this page\n"; + exit; + } +} + + + +###################### +# ADD=31111 modify remote agents info in the system +###################### + +if ($ADD==31111) +{ + if ($LOGmodify_remoteagents==1) + { + 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: (dial plan 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"; + } + } + else + { + echo "You do not have permission to view this page\n"; + exit; + } +} + + +###################### +# ADD=311111 modify user group info in the system +###################### + +if ($ADD==311111) +{ + if ($LOGmodify_usergroups==1) + { + 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 "\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
Allowed Campaigns: \n"; + echo "$campaigns_list"; + echo "$NWB#vicidial_user_groups-allowed_campaigns$NWE
\n"; + + + ### list of users in this user group + + $active_confs = 0; + $stmt="SELECT user,full_name,user_level from vicidial_users where user_group='$user_group'"; + $rsltx=mysql_query($stmt, $link); + $users_to_print = mysql_num_rows($rsltx); + + echo "
\n"; + echo "
USERS WITHIN THIS USER GROUP: $users_to_print
\n"; + echo "\n"; + echo "\n"; + + $o=0; + while ($users_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 "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + } + + echo "
USERFULL NAMELEVEL
$rowx[0]$rowx[1]$rowx[2]

\n"; + + + + echo "

Click here to see all CallBack Holds in this user group

\n"; + + if ($LOGdelete_user_groups > 0) + { + echo "

DELETE THIS USER GROUP\n"; + } + } + else + { + echo "You do not have permission to view this page\n"; + exit; + } +} + + +###################### +# ADD=3111111 modify script info in the system +###################### + +if ($ADD==3111111) +{ + if ($LOGmodify_scripts==1) + { + 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
"; + # BEGIN Insert Field + echo ""; + echo "
"; + # END Insert Field + echo " $NWB#vicidial_scripts-script_text$NWE
\n"; + + if ($LOGdelete_scripts > 0) + { + echo "

DELETE THIS SCRIPT\n"; + } + } + else + { + echo "You do not have permission to view this page\n"; + exit; + } +} + + +###################### +# ADD=31111111 modify filter info in the system +###################### + +if ($ADD==31111111) +{ + if ($LOGmodify_filters==1) + { + 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"; + } + } + else + { + echo "You do not have permission to view this page\n"; + exit; + } +} + + +###################### +# 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=31111111111 modify phone record in the system +###################### + +if ($ADD==31111111111) +{ + if ($LOGast_admin_access==1) + { + echo "
\n"; + 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 "\n"; + echo "
Phone extension: $NWB#phones-extension$NWE
Dial Plan 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 Hang Up: $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
Enable SIPSAK Messages: $NWB#phones-enable_sipsak_messages$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 ($LOGast_delete_phones > 0) + { + echo "

DELETE THIS PHONE\n"; + } + } + else + { + echo "You do not have permission to view this page\n"; + exit; + } +} + + +###################### +# ADD=311111111111 modify server record in the system +###################### + +if ($ADD==311111111111) +{ + if ($LOGmodify_servers==1) + { + echo "
\n"; + echo ""; + + $stmt="SELECT * from servers where server_id='$server_id' or server_ip='$server_ip';"; + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + $server_id = $row[0]; + $server_ip = $row[2]; + + 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 "\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
VICIDIAL Balance Dialing: $NWB#servers-vicidial_balance_active$NWE
VICIDIAL Balance Offlimits: $NWB#servers-balance_trunks_offlimits$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
System Performance: $NWB#servers-sys_perf_log$NWE
Server Logs: $NWB#servers-vd_server_logs$NWE
AGI Output: $NWB#servers-agi_output$NWE
\n"; + + + ### vicidial server trunk records for this server + echo "

VICIDIAL TRUNKS FOR THIS SERVER:   $NWB#vicidial_server_trunks$NWE
\n"; + echo "\n"; + echo "\n"; + + $stmt="SELECT * from vicidial_server_trunks where server_ip='$server_ip' order by campaign_id"; + $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 "
CAMPAIGN TRUNKS RESTRICTION DELETE
$rowx[1]
\n"; + echo "\n"; + echo "\n"; + echo "
DELETE
\n"; + + echo "
ADD NEW SERVER VICIDIAL TRUNK RECORD
\n"; + echo "\n"; + echo "\n"; + echo "TRUNKS:
\n"; + echo "CAMPAIGN:
\n"; + echo "RESTRICTION:
\n"; + echo "
\n"; + + echo "

\n"; + + + ### list of phones on this server + echo "
\n"; + echo "
PHONES WITHIN THIS SERVER:
\n"; + echo "\n"; + echo "\n"; + + $active_phones = 0; + $inactive_phones = 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_phones++; $camp_lists .= "'$rowx[0]',";} + if (ereg("N", $rowx[1])) {$inactive_phones++;} + + 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"; + + + ### list of conferences on this server + echo "
\n"; + echo "
CONFERENCES WITHIN THIS SERVER:
\n"; + echo "\n"; + echo "\n"; + + $active_confs = 0; + $stmt="SELECT conf_exten,extension from conferences 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++; + $active_confs++; + + if (eregi("1$|3$|5$|7$|9$", $o)) + {$bgcolor='bgcolor="#B9CBFD"';} + else + {$bgcolor='bgcolor="#9BB9FB"';} + + echo "\n"; + } + + echo "
CONFERENCEEXTENSION
$rowx[0]$rowx[2]

\n"; + + + ### list of vicidial conferences on this server + echo "
\n"; + echo "
VICIDIAL CONFERENCES WITHIN THIS SERVER:
\n"; + echo "\n"; + echo "\n"; + + $active_vdconfs = 0; + $stmt="SELECT conf_exten,extension from vicidial_conferences 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++; + $active_vdconfs++; + + if (eregi("1$|3$|5$|7$|9$", $o)) + {$bgcolor='bgcolor="#B9CBFD"';} + else + {$bgcolor='bgcolor="#9BB9FB"';} + + echo "\n"; + } + + echo "
VD CONFERENCEEXTENSION
$rowx[0]$rowx[2]

\n"; + + + echo "
\n"; + + $camp_lists = eregi_replace(".$","",$camp_lists); + echo "This server has $active_phones active phones and $inactive_phones inactive phones

\n"; + echo "This server has $active_confs active conferences

\n"; + echo "This server has $active_vdconfs active vicidial conferences

\n"; + echo "
\n"; + if ($LOGast_delete_phones > 0) + { + echo "

DELETE THIS SERVER\n"; + } + } + else + { + echo "You do not have permission to view this page\n"; + exit; + } +} + + +###################### +# ADD=3111111111111 modify conference record in the system +###################### + +if ($ADD==3111111111111) +{ + if ($LOGast_admin_access==1) + { + echo "
\n"; + 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); + $conf_exten = $row[0]; + $server_ip = $row[1]; + + 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"; + if ($LOGast_delete_phones > 0) + { + echo "

DELETE THIS CONFERENCE\n"; + } + } + else + { + echo "You do not have permission to view this page\n"; + exit; + } +} + + +###################### +# ADD=31111111111111 modify vicidial conference record in the system +###################### + +if ($ADD==31111111111111) +{ + if ($LOGast_admin_access==1) + { + echo "
\n"; + echo ""; + + $stmt="SELECT * from vicidial_conferences where conf_exten='$conf_exten' and server_ip='$server_ip';"; + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + $conf_exten = $row[0]; + $server_ip = $row[1]; + + echo "
MODIFY A VICIDIAL 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"; + if ($LOGast_delete_phones > 0) + { + echo "

DELETE THIS VICIDIAL CONFERENCE\n"; + } + } + else + { + echo "You do not have permission to view this page\n"; + exit; + } +} + + + +###################### +# ADD=311111111111111 modify vicidial system settings +###################### + +if ($ADD==311111111111111) +{ + if ($LOGmodify_servers==1) + { + echo "
\n"; + echo ""; + + $stmt="SELECT version,install_date,use_non_latin,webroot_writable,enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_url,queuemetrics_log_id,queuemetrics_eq_prepend,vicidial_agent_disable,allow_sipsak_messages,admin_home_url from system_settings;"; + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + $version = $row[0]; + $install_date = $row[1]; + $use_non_latin = $row[2]; + $webroot_writable = $row[3]; + $enable_queuemetrics_logging = $row[4]; + $queuemetrics_server_ip = $row[5]; + $queuemetrics_dbname = $row[6]; + $queuemetrics_login = $row[7]; + $queuemetrics_pass = $row[8]; + $queuemetrics_url = $row[9]; + $queuemetrics_log_id = $row[10]; + $queuemetrics_eq_prepend = $row[11]; + $vicidial_agent_disable = $row[12]; + $allow_sipsak_messages = $row[13]; + $admin_home_url = $row[14]; + + echo "
MODIFY VICIDIAL SYSTEM SETTINGS\n"; + echo "\n"; + echo "
\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + + echo "\n"; + echo "
Version: $version
Install Date: $install_date
Use Non-Latin: $NWB#settings-use_non_latin$NWE
Webroot Writable: $NWB#settings-webroot_writable$NWE
Enable QueueMetrics Logging: $NWB#settings-enable_queuemetrics_logging$NWE
QueueMetrics Server IP: $NWB#settings-queuemetrics_server_ip$NWE
QueueMetrics DB Name: $NWB#settings-queuemetrics_dbname$NWE
QueueMetrics DB Login: $NWB#settings-queuemetrics_login$NWE
QueueMetrics DB Password: $NWB#settings-queuemetrics_pass$NWE
QueueMetrics URL: $NWB#settings-queuemetrics_url$NWE
QueueMetrics Log ID: $NWB#settings-queuemetrics_log_id$NWE
QueueMetrics EnterQueue Prepend: $NWB#settings-queuemetrics_eq_prepend$NWE
VICIDIAL Agent Disable Display: $NWB#settings-vicidial_agent_disable$NWE
Allow SIPSAK Messages: $NWB#settings-allow_sipsak_messages$NWE
Admin Home URL: $NWB#settings-admin_home_url$NWE
\n"; + + echo "
\n"; + } + else + { + echo "You do not have permission to view this page\n"; + exit; + } +} + + + + + + + +###################### +# ADD=550 search form +###################### + +if ($ADD==550) +{ +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=660 user search results +###################### + +if ($ADD==660) +{ +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=8111 find all callbacks on hold within a user group +###################### +if ($ADD==8111) +{ + echo ""; + + $stmt="SELECT * from vicidial_callbacks where status IN('ACTIVE','LIVE') and user_group='$user_group' order by recipient,status desc,callback_time"; + $rslt=mysql_query($stmt, $link); + $cb_to_print = mysql_num_rows($rslt); + +echo "
USER GROUP 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 ""; + echo "\n"; + $o++; + } + +echo "
LEADLIST CAMPAIGNENTRY DATECALLBACK DATEUSERRECIPIENTSTATUSGROUP
$row[1]$row[2]$row[3]$row[5]$row[6]$row[8]$row[9]$row[4]$row[11]
\n"; +} + + + +###################################################################################################### +###################################################################################################### +####### 0 series, displays and searches +###################################################################################################### +###################################################################################################### + +###################### +# ADD=0 display all active users +###################### +if ($ADD==0) +{ +echo "
\n"; +echo ""; + +$USERlink='stage=USERIDDOWN'; +$NAMElink='stage=NAMEDOWN'; +$LEVELlink='stage=LEVELDOWN'; +$GROUPlink='stage=GROUPDOWN'; +$SQLorder='order by full_name'; +if (eregi("USERIDUP",$stage)) {$SQLorder='order by user asc'; $USERlink='stage=USERIDDOWN';} +if (eregi("USERIDDOWN",$stage)) {$SQLorder='order by user desc'; $USERlink='stage=USERIDUP';} +if (eregi("NAMEUP",$stage)) {$SQLorder='order by full_name asc'; $NAMElink='stage=NAMEDOWN';} +if (eregi("NAMEDOWN",$stage)) {$SQLorder='order by full_name desc'; $NAMElink='stage=NAMEUP';} +if (eregi("LEVELUP",$stage)) {$SQLorder='order by user_level asc'; $LEVELlink='stage=LEVELDOWN';} +if (eregi("LEVELDOWN",$stage)) {$SQLorder='order by user_level desc'; $LEVELlink='stage=LEVELUP';} +if (eregi("GROUPUP",$stage)) {$SQLorder='order by user_group asc'; $GROUPlink='stage=GROUPDOWN';} +if (eregi("GROUPDOWN",$stage)) {$SQLorder='order by user_group desc'; $GROUPlink='stage=GROUPUP';} + $stmt="SELECT * from vicidial_users $SQLorder"; + $rslt=mysql_query($stmt, $link); + $people_to_print = mysql_num_rows($rslt); + +echo "
USER LISTINGS:\n"; +echo "
\n"; +echo ""; +echo ""; +echo ""; +echo ""; +echo ""; +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 "
USER IDFULL NAMELEVELGROUPLINKS
$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 ""; + + $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"; +} + +###################### +# ADD=10000000000 display all phones +###################### +if ($ADD==10000000000) +{ +echo "
\n"; +echo ""; + +$EXTENlink='stage=EXTENDOWN'; +$PROTOlink='stage=PROTODOWN'; +$SERVERlink='stage=SERVERDOWN'; +$STATUSlink='stage=STATUSDOWN'; +$SQLorder='order by extension,server_ip'; +if (eregi("EXTENUP",$stage)) {$SQLorder='order by extension asc'; $EXTENlink='stage=EXTENDOWN';} +if (eregi("EXTENDOWN",$stage)) {$SQLorder='order by extension desc'; $EXTENlink='stage=EXTENUP';} +if (eregi("PROTOUP",$stage)) {$SQLorder='order by protocol asc'; $PROTOlink='stage=PROTODOWN';} +if (eregi("PROTODOWN",$stage)) {$SQLorder='order by protocol desc'; $PROTOlink='stage=PROTOUP';} +if (eregi("SERVERUP",$stage)) {$SQLorder='order by server_ip asc'; $SERVERlink='stage=SERVERDOWN';} +if (eregi("SERVERDOWN",$stage)) {$SQLorder='order by server_ip desc'; $SERVERlink='stage=SERVERUP';} +if (eregi("STATUSUP",$stage)) {$SQLorder='order by status asc'; $STATUSlink='stage=STATUSDOWN';} +if (eregi("STATUSDOWN",$stage)) {$SQLorder='order by status desc'; $STATUSlink='stage=STATUSUP';} + $stmt="SELECT * from phones $SQLorder"; + $rslt=mysql_query($stmt, $link); + $phones_to_print = mysql_num_rows($rslt); + +echo "
PHONE LISTINGS:\n"; +echo "
\n"; +echo ""; +echo ""; +echo ""; +echo ""; +echo ""; +echo ""; +echo ""; +echo ""; +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 "
EXTENPROTOSERVERDIAL PLANSTATUSNAMEVMAILLINKS
$row[0]$row[16]$row[5]$row[1]$row[2]$row[8]$row[11]$row[14]$row[15]MODIFY | STATS
\n"; +} + +###################### +# ADD=100000000000 display all servers +###################### +if ($ADD==100000000000) +{ +echo "\n"; echo ""; echo ""; echo ""; echo ""; -echo ""; +echo ""; echo ""; echo ""; @@ -401,9 +436,13 @@ echo "\n\n"; ################################################################################### ###### OUTBOUND CALLS ################################################################################### -if (eregi("CLOSER",$group)) +if (eregi("(CLOSER|BLEND|INBND|_C$|_B$|_I$)",$group)) { $stmt="select closer_campaigns from vicidial_campaigns where campaign_id='" . mysql_real_escape_string($group) . "';"; +if ($non_latin > 0) +{ +$rslt=mysql_query("SET NAMES 'UTF8'"); +} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $closer_campaigns = preg_replace("/^ | -$/","",$row[0]); @@ -419,6 +458,10 @@ else $stmt="select status from vicidial_auto_calls where status NOT IN('XFER') $groupSQL;"; } +if ($non_latin > 0) +{ +$rslt=mysql_query("SET NAMES 'UTF8'"); +} $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $parked_to_print = mysql_num_rows($rslt); @@ -450,7 +493,7 @@ $parked_to_print = mysql_num_rows($rslt); if ($out_live > 9) {$F=''; $FG='';} if ($out_live > 14) {$F=''; $FG='';} - if (eregi("CLOSER",$group)) + if (eregi("(CLOSER|BLEND|INBND|_C$|_B$|_I$)",$group)) {echo "$NFB$out_total$NFE current active calls      \n";} else {echo "$NFB$out_total$NFE calls being placed       \n";} @@ -489,8 +532,8 @@ $HDsessionid = "------------------+"; $HTsessionid = " SESSIONID |"; $HDbarge = "-------+"; $HTbarge = " BARGE |"; -$HDstatus = "--------+"; -$HTstatus = " STATUS |"; +$HDstatus = "----------+"; +$HTstatus = " STATUS |"; $HDserver_ip = "-----------------+"; $HTserver_ip = " SERVIDOR IP |"; $HDcall_server_ip = "-----------------+"; @@ -553,10 +596,14 @@ else {$groupSQL = " and campaign_id='" . mysql_real_escape_string($group) . "'"; if (strlen($usergroup)<1) {$usergroupSQL = '';} else {$usergroupSQL = " and user_group='" . mysql_real_escape_string($usergroup) . "'";} -$stmt="select extension,vicidial_live_agents.user,conf_exten,status,server_ip,UNIX_TIMESTAMP(last_call_time),UNIX_TIMESTAMP(last_call_finish),call_server_ip,campaign_id,vicidial_users.user_group,vicidial_users.full_name from vicidial_live_agents,vicidial_users where vicidial_live_agents.user=vicidial_users.user $groupSQL $usergroupSQL order by $orderSQL;"; +$stmt="select extension,vicidial_live_agents.user,conf_exten,status,server_ip,UNIX_TIMESTAMP(last_call_time),UNIX_TIMESTAMP(last_call_finish),call_server_ip,campaign_id,vicidial_users.user_group,vicidial_users.full_name,vicidial_live_agents.comments from vicidial_live_agents,vicidial_users where vicidial_live_agents.user=vicidial_users.user $groupSQL $usergroupSQL order by $orderSQL;"; #$stmt="select extension,vicidial_live_agents.user,conf_exten,status,server_ip,UNIX_TIMESTAMP(last_call_time),UNIX_TIMESTAMP(last_call_finish),call_server_ip,campaign_id,vicidial_users.user_group,vicidial_users.full_name from vicidial_live_agents,vicidial_users where vicidial_live_agents.user=vicidial_users.user and campaign_id='" . mysql_real_escape_string($group) . "' order by $orderSQL;"; +if ($non_latin > 0) +{ +$rslt=mysql_query("SET NAMES 'UTF8'"); +} $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $talking_to_print = mysql_num_rows($rslt); @@ -571,9 +618,18 @@ $talking_to_print = mysql_num_rows($rslt); { $row[5]=$row[6]; } - $extension = eregi_replace('Local/',"",$row[0]); - $extension = sprintf("%-10s", $extension); + if ($non_latin < 1) + { + $extension = eregi_replace('Local/',"",$row[0]); + $extension = sprintf("%-10s", $extension); while(strlen($extension)>10) {$extension = substr("$extension", 0, -1);} + } + else + { + $extension = eregi_replace('Local/',"",$row[0]); + $extension = sprintf("%-40s", $extension); + while(mb_strlen($extension, 'utf-8')>10) {$extension = mb_substr("$extension", 0, -1,'utf8');} + } $Luser = $row[1]; $user = sprintf("%-18s", $row[1]); $Lsessionid = $row[2]; @@ -582,16 +638,48 @@ $talking_to_print = mysql_num_rows($rslt); $status = sprintf("%-6s", $row[3]); $server_ip = sprintf("%-15s", $row[4]); $call_server_ip = sprintf("%-15s", $row[7]); - $campaign_id = sprintf("%-10s", $row[8]); + $campaign_id = sprintf("%-10s", $row[8]); + $comments= $row[11]; + + if (eregi("INCALL",$Lstatus)) + { + if ( (eregi("AUTO",$comments)) or (strlen($comments)<1) ) + {$CM='A';} + else + { + if (eregi("INBOUND",$comments)) + {$CM='I';} + else + {$CM='M';} + } + } + else {$CM=' ';} + if ($UGdisplay > 0) { - $user_group = sprintf("%-12s", $row[9]); + if ($non_latin < 1) + { + $user_group = sprintf("%-12s", $row[9]); while(strlen($user_group)>12) {$user_group = substr("$user_group", 0, -1);} + } + else + { + $user_group = sprintf("%-40s", $row[9]); + while(mb_strlen($user_group, 'utf-8')>12) {$user_group = mb_substr("$user_group", 0, -1,'utf8');} + } } if ($UidORname > 0) { - $user = sprintf("%-18s", $row[10]); + if ($non_latin < 1) + { + $user = sprintf("%-18s", $row[10]); while(strlen($user)>18) {$user = substr("$user", 0, -1);} + } + else + { + $user = sprintf("%-40s", $row[10]); + while(mb_strlen($user, 'utf-8')>18) {$user = mb_substr("$user", 0, -1,'utf8');} + } } if (!eregi("INCALL|QUEUE",$row[3])) {$call_time_S = ($STARTtime - $row[6]);} @@ -655,7 +743,7 @@ $talking_to_print = mysql_num_rows($rslt); $agentcount++; - $Aecho .= "| $G$extension$EG | $G$user$EG |$UGD $G$sessionid$EG$L$R | $G$status$EG | $SVD$G$call_time_MS$EG | $G$campaign_id$EG |\n"; + $Aecho .= "| $G$extension$EG | $G$user$EG |$UGD $G$sessionid$EG$L$R | $G$status$EG $CM | $SVD$G$call_time_MS$EG | $G$campaign_id$EG |\n"; $i++; } diff --git a/agc_2-X/trunk/LANG_www/vicidial_es/AST_timeonVDADallSUMMARY.php b/agc_2-X/trunk/LANG_www/vicidial_es/AST_timeonVDADallSUMMARY.php index 4317a4a3..c4335ec5 100644 --- a/agc_2-X/trunk/LANG_www/vicidial_es/AST_timeonVDADallSUMMARY.php +++ b/agc_2-X/trunk/LANG_www/vicidial_es/AST_timeonVDADallSUMMARY.php @@ -9,6 +9,8 @@ # # changes: # 61102-1616 - first build +# 61215-1131 - added answered calls and drop percent taken from answered calls +# 70111-1600 - added ability to use BLEND/INBND/*_C/*_B/*_I as closer campaigns # header ("Content-type: text/html; charset=utf-8"); @@ -35,7 +37,7 @@ if (!isset($RR)) {$gRRroup=4;} $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;"; + $stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 6 and view_reports='1';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); @@ -114,7 +116,7 @@ else { echo "- VIEW LESS SETTINGS"; } -echo "       INFORMES"; +echo "       INFORMES"; echo "

\n\n"; $k=0; @@ -128,7 +130,7 @@ $group = $groups[$k]; echo "$group   -   "; echo "Modify\n"; -$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,dial_method,adaptive_maximum_level,adaptive_dropped_percentage,adaptive_dl_diff_target,adaptive_intensity,available_only_ratio_tally,adaptive_latest_server_time,local_call_time,dial_timeout from vicidial_campaigns where campaign_id='" . mysql_real_escape_string($group) . "';"; +$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,dial_method,adaptive_maximum_level,adaptive_dropped_percentage,adaptive_dl_diff_target,adaptive_intensity,available_only_ratio_tally,adaptive_latest_server_time,local_call_time,dial_timeout,dial_statuses from vicidial_campaigns where campaign_id='" . mysql_real_escape_string($group) . "';"; $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $DIALlev = $row[0]; @@ -149,6 +151,9 @@ $ADAavailonly = $row[14]; $TAPERtime = $row[15]; $CALLtime = $row[16]; $DIALtimeout = $row[17]; +$DIALstatuses = $row[18]; + $DIALstatuses = (preg_replace("/ -$|^ /","",$DIALstatuses)); + $DIALstatuses = (ereg_replace(' ',', ',$DIALstatuses)); $stmt="select count(*) from vicidial_hopper where campaign_id='" . mysql_real_escape_string($group) . "';"; $rslt=mysql_query($stmt, $link); @@ -214,7 +219,7 @@ echo ""; echo ""; echo ""; echo ""; -echo ""; +echo ""; echo ""; echo ""; @@ -240,7 +245,7 @@ echo "\n";echo "\n";?> -
-
\n"; + 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=1000000000000 display all conferences +###################### +if ($ADD==1000000000000) +{ +echo " - + @@ -872,6 +873,7 @@ if ($leadfile and filesize($LF_path)<=8388608) { } + if (strlen($phone_code)<1) {$phone_code = '1';} 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);"; diff --git a/agc_2-X/trunk/LANG_www/vicidial_en/listloader.pl b/agc_2-X/trunk/LANG_www/vicidial_en/listloader.pl index b15bfbb8..f93b4520 100644 --- a/agc_2-X/trunk/LANG_www/vicidial_en/listloader.pl +++ b/agc_2-X/trunk/LANG_www/vicidial_en/listloader.pl @@ -15,6 +15,7 @@ # 60906-1058 - added filter of non-digits in alt_phone field # 61110-1229 - added new USA-Canada DST scheme and Brazil DST scheme # 61128-1215 - added postal code GMT lookup and duplicate check options +# 70205-1703 - Defaulted phone_code to 1 if not populated # ### begin parsing run-time options ### @@ -434,6 +435,7 @@ foreach $oWkS (@{$oBook->{Worksheet}}) { $AC_processed++; } + if (length($phone_code)<1) {$phone_code = '1';} 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);"; @@ -454,7 +456,7 @@ foreach $oWkS (@{$oBook->{Worksheet}}) { } $total++; if ($total%100==0) { - print ""; + print ""; sleep(1); # flush(); } diff --git a/agc_2-X/trunk/LANG_www/vicidial_en/listloaderMAIN.php b/agc_2-X/trunk/LANG_www/vicidial_en/listloaderMAIN.php index 67ee25bc..bb292c36 100644 --- a/agc_2-X/trunk/LANG_www/vicidial_en/listloaderMAIN.php +++ b/agc_2-X/trunk/LANG_www/vicidial_en/listloaderMAIN.php @@ -8,6 +8,7 @@ # # changes: # 60620-1149 - Added variable filtering to eliminate SQL injection attack threat +# 60822-1105 - fixed for nonwritable directories # require("dbconnect.php"); @@ -30,7 +31,7 @@ $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $auth=$row[0]; -$fp = fopen ("./project_auth_entries.txt", "a"); +if ($WeBRooTWritablE > 0) {$fp = fopen ("./project_auth_entries.txt", "a");} $date = date("r"); $ip = getenv("REMOTE_ADDR"); $browser = getenv("HTTP_USER_AGENT"); @@ -59,13 +60,19 @@ $browser = getenv("HTTP_USER_AGENT"); 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); + if ($WeBRooTWritablE > 0) + { + 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); + if ($WeBRooTWritablE > 0) + { + fwrite ($fp, "LIST_LOAD|FAIL|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|\n"); + fclose($fp); + } } } diff --git a/agc_2-X/trunk/LANG_www/vicidial_en/listloader_super.pl b/agc_2-X/trunk/LANG_www/vicidial_en/listloader_super.pl index 704e06b7..bbf353ce 100644 --- a/agc_2-X/trunk/LANG_www/vicidial_en/listloader_super.pl +++ b/agc_2-X/trunk/LANG_www/vicidial_en/listloader_super.pl @@ -14,6 +14,7 @@ # 60906-1056 - added filter of non-digits in alt_phone field # 61110-1229 - added new USA-Canada DST scheme and Brazil DST scheme # 61128-1207 - added postal code GMT lookup and duplicate check options +# 70205-1703 - Defaulted phone_code to 1 if not populated # ### begin parsing run-time options ### @@ -436,6 +437,7 @@ foreach $oWkS (@{$oBook->{Worksheet}}) { $AC_processed++; } + if (length($phone_code)<1) {$phone_code = '1';} 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);"; @@ -456,7 +458,7 @@ foreach $oWkS (@{$oBook->{Worksheet}}) { } $total++; if ($total%100==0) { - print ""; + print ""; sleep(1); # flush(); } diff --git a/agc_2-X/trunk/LANG_www/vicidial_en/new_listloader_superL.php b/agc_2-X/trunk/LANG_www/vicidial_en/new_listloader_superL.php index dceb71c4..deecb128 100644 --- a/agc_2-X/trunk/LANG_www/vicidial_en/new_listloader_superL.php +++ b/agc_2-X/trunk/LANG_www/vicidial_en/new_listloader_superL.php @@ -179,7 +179,7 @@ $admDIR = "$HTTPprotocol$server_name$script_name"; $admDIR = eregi_replace('new_listloader_superL.php','',$admDIR); $admSCR = 'admin.php'; $NWB = "   \"HELP\""; +$NWE = "')\">\"HELP\""; $secX = date("U"); $hour = date("H"); @@ -307,7 +307,7 @@ function ParseFileName() { - + diff --git a/agc_2-X/trunk/LANG_www/vicidial_en/user_stats.php b/agc_2-X/trunk/LANG_www/vicidial_en/user_stats.php index f753c9d2..eb6ee8da 100644 --- a/agc_2-X/trunk/LANG_www/vicidial_en/user_stats.php +++ b/agc_2-X/trunk/LANG_www/vicidial_en/user_stats.php @@ -7,6 +7,7 @@ # # 60619-1743 - Added variable filtering to eliminate SQL injection attack threat # 61201-1136 - Added recordings display and changed calls to time range with 10000 limit +# 70118-1605 - Added user group column to login/out and calls lists # header ("Content-type: text/html; charset=utf-8"); @@ -38,7 +39,7 @@ $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;"; + $stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 7 and view_reports='1';"; $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $auth=$row[0]; @@ -111,6 +112,11 @@ echo "\n"; echo "           $user - $full_name\n"; +echo " - VICIDIAL Time Sheet\n"; +echo " - User Status\n"; +echo " - Modify User\n"; + + echo "\n"; echo "
\n"; + 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"; +} + +###################### +# ADD=10000000000000 display all vicidial conferences +###################### +if ($ADD==10000000000000) +{ +echo "
\n"; + echo ""; + + $stmt="SELECT * from vicidial_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"; +} + +###################### +# ADD=999999 display reports section +###################### +if ($ADD==999999) +{ + if ($LOGview_reports==1) + { + echo "
\n"; + echo ""; + + $stmt="SELECT * from vicidial_conferences order by conf_exten"; + $rslt=mysql_query($stmt, $link); + $phones_to_print = mysql_num_rows($rslt); + + $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++; + } + + $stmt="SELECT enable_queuemetrics_logging,queuemetrics_url from system_settings;"; + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + $enable_queuemetrics_logging_LU = $row[0]; + $queuemetrics_url_LU = $row[1]; + + ?> + + + + + + VICIDIAL: Server Stats and Reports + VICIDIAL: Server Stats and Reports

+ +

+	
+	 $o)
+		{
+		echo "\n";
+		echo "\n";
+		echo "\n";
+		echo "\n";
+		echo "\n";
+		echo "\n";
+		echo "\n";
+		echo "\n";
+		echo "\n";
+		$o++;
+		}
+
+	echo "
SERVERDESCRIPTIONIP ADDRESSACTIVEVDAD timePARK timeCLOSER/INBOUND time
$server_id[$o]$server_description[$o]$server_ip[$o]$active[$o]LINKLINKLINK
\n"; + } + else + { + echo "You do not have permission to view this page\n"; + exit; + } +} + + + + + +echo "
\n"; + +$ENDtime = date("U"); + +$RUNtime = ($ENDtime - $STARTtime); + +echo "\n\n\n


\n\n"; + + +echo "\n\n\n


\nscript runtime: $RUNtime seconds"; +echo "             VERSION: $admin_version"; +echo "             BUILD: $build
\n"; + + +?> + + +
+ + + +1) + { + if (strlen($dial_statuses)>2) + { + $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"; + + + $dial_statuses = preg_replace("/ -$/","",$dial_statuses); + $Dstatuses = explode(" ", $dial_statuses); + $Ds_to_print = (count($Dstatuses) - 0); + $Dsql = ''; + $o=0; + while ($Ds_to_print > $o) + { + $o++; + $Dsql .= "'$Dstatuses[$o]',"; + } + $Dsql = preg_replace("/,$/","",$Dsql); + + $stmt="SELECT count(*) FROM vicidial_list where called_since_last_reset='N' and status IN($Dsql) 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 "|$DB|\n"; + echo "This campaign has $active_leads leads to be dialed in those lists\n"; + } + else + { + echo "no dial statuses selected for this campaign\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_www/vicidial_en/admin_modify_lead.php b/agc_2-X/trunk/LANG_www/vicidial_en/admin_modify_lead.php index 34016b29..fd51a12b 100644 --- a/agc_2-X/trunk/LANG_www/vicidial_en/admin_modify_lead.php +++ b/agc_2-X/trunk/LANG_www/vicidial_en/admin_modify_lead.php @@ -85,6 +85,8 @@ 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"];} +if (isset($_GET["modify_logs"])) {$modify_logs=$_GET["modify_logs"];} + elseif (isset($_POST["modify_logs"])) {$modify_logs=$_POST["modify_logs"];} $PHP_AUTH_USER = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_USER); @@ -105,6 +107,7 @@ $PHP_AUTH_PW = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_PW); # 60619-1539 - Added variable filtering to eliminate SQL injection attack threat # 61130-1639 - Added recording_log lookup and list for this lead_id # 61201-1136 - Added recording_log user(TSR) display and link +# 70305-1133 - Changed to default CHECKED modify logs upon status change # $STARTtime = date("U"); @@ -112,7 +115,7 @@ $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;"; + $stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 7 and modify_leads='1';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); @@ -216,6 +219,17 @@ $call_length = ($STARTtime - $call_began); echo "
Lead added to DNC List: $lead_id - $phone_number
\n"; } + ### update last record in vicidial_agent_log and vicidial_log tables + if (($dispo != $status) and ($modify_logs > 0)) + { + $stmt="UPDATE vicidial_log set status='" . mysql_real_escape_string($status) . "' where lead_id='" . mysql_real_escape_string($lead_id) . "' order by call_date desc limit 1"; + if ($DB) {echo "|$stmt|\n";} + $rslt=mysql_query($stmt, $link); + + $stmt="UPDATE vicidial_agent_log set status='" . mysql_real_escape_string($status) . "' where lead_id='" . mysql_real_escape_string($lead_id) . "' order by agent_log_id desc limit 1"; + if ($DB) {echo "|$stmt|\n";} + $rslt=mysql_query($stmt, $link); + } } else @@ -346,7 +360,9 @@ else echo "\n"; - echo "\n"; + echo "\n"; + + echo "\n"; echo "
Modify agent and vicidial logs
\n"; echo "


\n"; diff --git a/agc_2-X/trunk/LANG_www/vicidial_en/admin_search_lead.php b/agc_2-X/trunk/LANG_www/vicidial_en/admin_search_lead.php index 6b8b0b69..ff814159 100644 --- a/agc_2-X/trunk/LANG_www/vicidial_en/admin_search_lead.php +++ b/agc_2-X/trunk/LANG_www/vicidial_en/admin_search_lead.php @@ -40,7 +40,7 @@ $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;"; + $stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 7 and modify_leads='1';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); diff --git a/agc_2-X/trunk/LANG_www/vicidial_en/dbconnect.php b/agc_2-X/trunk/LANG_www/vicidial_en/dbconnect.php index 7221b35e..5247e166 100644 --- a/agc_2-X/trunk/LANG_www/vicidial_en/dbconnect.php +++ b/agc_2-X/trunk/LANG_www/vicidial_en/dbconnect.php @@ -44,5 +44,6 @@ $local_AMP = '@'; $ext_context = 'demo'; $recording_exten = '8309'; $WeBRooTWritablE = '1'; +$non_latin = '0'; # set to 1 for UTF rules ?> diff --git a/agc_2-X/trunk/LANG_www/vicidial_en/group_hourly_stats.php b/agc_2-X/trunk/LANG_www/vicidial_en/group_hourly_stats.php index 3f8e4fb9..607f2fd7 100644 --- a/agc_2-X/trunk/LANG_www/vicidial_en/group_hourly_stats.php +++ b/agc_2-X/trunk/LANG_www/vicidial_en/group_hourly_stats.php @@ -28,7 +28,7 @@ if (isset($_GET["SUBMIT"])) {$SUBMIT=$_GET["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;"; + $stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 6 and view_reports='1';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); diff --git a/agc_2-X/trunk/LANG_www/vicidial_en/listloader.php b/agc_2-X/trunk/LANG_www/vicidial_en/listloader.php index 5dc28f2e..272d94a7 100644 --- a/agc_2-X/trunk/LANG_www/vicidial_en/listloader.php +++ b/agc_2-X/trunk/LANG_www/vicidial_en/listloader.php @@ -15,12 +15,13 @@ # 60906-1059 - added filter of non-digits in alt_phone field # 61110-1222 - added new USA-Canada DST scheme and Brazil DST scheme # 61128-1046 - added postal code GMT lookup and duplicate check options +# 70205-1703 - Defaulted phone_code to 1 if not populated # # make sure vicidial_list exists and that your file follows the formatting correctly. This page does not dedupe or do any other lead filtering actions yet at this time. # -$version = '2.0.2'; -$build = '61128-1046'; +$version = '2.0.3'; +$build = '70205-1703'; header ("Content-type: text/html; charset=utf-8"); @@ -60,7 +61,7 @@ $admDIR = "$HTTPprotocol$server_name$script_name"; $admDIR = eregi_replace('listloader.php','',$admDIR); $admSCR = 'admin.php'; $NWB = "   \"HELP\""; +$NWE = "')\">\"HELP\""; $secX = date("U"); @@ -141,7 +142,7 @@ function ShowProgress(good, bad, total, dup, post) {
Lead Timezone Lookup: Lead Time Zone Lookup:
Lead Timezone Lookup: Lead Time Zone Lookup:
\n"; @@ -173,10 +179,10 @@ echo "

\n"; echo "
\n"; echo "LOGIN/LOGOUT TIME:\n"; -echo "\n"; -echo "\n"; +echo "
EVENT DATE CAMPAIGNHOURS:MINUTES
\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'"; + $stmt="SELECT event,event_epoch,event_date,campaign_id,user_group 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); @@ -197,6 +203,7 @@ echo ""; echo "\n"; echo "\n"; + echo "\n"; echo "\n"; } if (ereg("LOGOUT", $row[0])) @@ -216,6 +223,7 @@ echo ""; echo "\n"; echo "\n"; + echo "\n"; echo "\n"; $event_start_seconds=''; $event_stop_seconds=''; @@ -256,8 +264,8 @@ echo "

\n"; echo "
\n"; echo "CALLS FOR THIS TIME PERIOD: (10000 record limit)\n"; -echo "
EVENT DATE CAMPAIGN GROUPHOURS:MINUTES
EVENT DATE$row[0] $row[2] $row[3] $row[4]
EVENT DATE$row[0] $row[2] $row[3] $row[4] $event_hours_int:$event_minutes_int
\n"; -echo "\n"; +echo "
# DATE/TIME LENGTH STATUS PHONE CAMPAIGN LIST LEAD
\n"; +echo "\n"; $stmt="select * 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' order by call_date desc limit 10000;"; $rslt=mysql_query($stmt, $link); @@ -279,13 +287,14 @@ echo "\n"; echo "\n"; echo "\n"; + echo "\n"; echo "\n"; echo "\n"; } -echo "
# DATE/TIME LENGTH STATUS PHONE CAMPAIGN GROUP LIST LEAD
# DATE/TIME $row[8] $row[10] $row[3] $row[14] $row[2] $row[1]
\n"; +echo "


\n"; diff --git a/agc_2-X/trunk/LANG_www/vicidial_en/user_status.php b/agc_2-X/trunk/LANG_www/vicidial_en/user_status.php index 91d106ab..ecffbc5c 100644 --- a/agc_2-X/trunk/LANG_www/vicidial_en/user_status.php +++ b/agc_2-X/trunk/LANG_www/vicidial_en/user_status.php @@ -39,7 +39,7 @@ $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;"; + $stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 7 and view_reports='1';"; $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $auth=$row[0]; @@ -75,10 +75,11 @@ $browser = getenv("HTTP_USER_AGENT"); fclose($fp); } - $stmt="SELECT full_name from vicidial_users where user='" . mysql_real_escape_string($user) . "';"; + $stmt="SELECT full_name,user_group from vicidial_users where user='" . mysql_real_escape_string($user) . "';"; $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $full_name = $row[0]; + $user_group = $row[1]; $stmt="SELECT * from vicidial_live_agents where user='" . mysql_real_escape_string($user) . "';"; $rslt=mysql_query($stmt, $link); @@ -198,9 +199,12 @@ else } -echo "           $user - $full_name - \n"; +echo "           $user - $full_name \n"; +echo "       GROUP: $user_group

\n"; echo "VICIDIAL Time Sheet\n"; +echo " - User Stats\n"; +echo " - Modify User\n"; echo "
\n"; diff --git a/agc_2-X/trunk/LANG_www/vicidial_en/voice_lab.php b/agc_2-X/trunk/LANG_www/vicidial_en/voice_lab.php new file mode 100644 index 00000000..2ce3a2a9 --- /dev/null +++ b/agc_2-X/trunk/LANG_www/vicidial_en/voice_lab.php @@ -0,0 +1,312 @@ + LICENSE: GPLv2 +### +# +# CHANGES +# +# 61220-1050 - First Build +# 70115-1246 - Added ability to define an exten to play +# + +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["message"])) {$message=$_GET["message"];} + elseif (isset($_POST["message"])) {$message=$_POST["message"];} +if (isset($_GET["session_id"])) {$session_id=$_GET["session_id"];} + elseif (isset($_POST["session_id"])) {$session_id=$_POST["session_id"];} +if (isset($_GET["campaign_id"])) {$campaign_id=$_GET["campaign_id"];} + elseif (isset($_POST["campaign_id"])) {$campaign_id=$_POST["campaign_id"];} +if (isset($_GET["NEW_VOICE_LAB"])) {$NEW_VOICE_LAB=$_GET["NEW_VOICE_LAB"];} + elseif (isset($_POST["NEW_VOICE_LAB"])) {$NEW_VOICE_LAB=$_POST["NEW_VOICE_LAB"];} +if (isset($_GET["KILL_VOICE_LAB"])) {$KILL_VOICE_LAB=$_GET["KILL_VOICE_LAB"];} + elseif (isset($_POST["KILL_VOICE_LAB"])) {$KILL_VOICE_LAB=$_POST["KILL_VOICE_LAB"];} +if (isset($_GET["PLAY_MESSAGE"])) {$PLAY_MESSAGE=$_GET["PLAY_MESSAGE"];} + elseif (isset($_POST["PLAY_MESSAGE"])) {$PLAY_MESSAGE=$_POST["PLAY_MESSAGE"];} +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"); +$MYSQL_datetime = date("Y-m-d H:i:s"); +$FILE_datetime = date("Ymd-His_"); +$secX = $STARTtime; + +$local_DEF = 'Local/'; +$local_AMP = '@'; +$ext_context = 'demo'; + + $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]; + + } + + +##### 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++; + } + + + + +?> + + +VICIDIAL VOICE LAB: Admin +\n"; +?> + + +
+ + 0) +{ + if ( (strlen($server_ip) > 6) && (strlen($session_id) > 6) && (strlen($campaign_id) > 2) ) + { + echo "


TO START YOUR VOICE LAB, DIAL 9$session_id ON YOUR PHONE NOW
\n"; + + echo "
or, you can enter an extension that you want played below
\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "Message Extension\n"; + echo "\n"; + echo "



\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]";} + $remote_dialstring = "$D_s_ip[0]$S$D_s_ip[1]$S$D_s_ip[2]$S$D_s_ip[3]$S$session_id"; + + $thirty_minutes_old = mktime(date("H"), date("i"), date("s")-30, date("m"), date("d"), date("Y")); + $past_thirty = date("Y-m-d H:i:s",$thirty_minutes_old); + + $stmt="SELECT conf_exten,server_ip,user from vicidial_live_agents where last_update_time > '$past_thirty' and campaign_id='$campaign_id';"; + $rslt=mysql_query($stmt, $link); + $agents_to_loop = mysql_num_rows($rslt); + $agents_sessions[0]=''; + $agents_servers[0]=''; + $agents_users[0]=''; + + $o=0; + while ($agents_to_loop > $o) + { + $rowx=mysql_fetch_row($rslt); + $agents_sessions[$o] = "$rowx[0]"; + $agents_servers[$o] = "$rowx[1]"; + $agents_users[$o] = "$rowx[2]"; + $o++; + } + + $o=0; + while ($agents_to_loop > $o) + { + if ($agents_servers[$o] == "$server_ip") + {$dial_string = $session_id;} + else + {$dial_string = $remote_dialstring;} + + $stmt="INSERT INTO vicidial_manager values('','','$MYSQL_datetime','NEW','N','$agents_servers[$o]','','Originate','VL$FILE_datetime$o','Channel: $local_DEF$dial_string$local_AMP$ext_context','Context: $ext_context','Exten: $agents_sessions[$o]','Priority: 1','Callerid: VL$FILE_datetime$o','','','','','')"; + echo "|$stmt|\n

\n"; + $rslt=mysql_query($stmt, $link); + + echo "LOGGED IN USER $agents_users[$o] at session $agents_sessions[$o] on server $agents_servers[$o]\n"; + + $o++; + } + + + + echo "
Kill a Voice Lab Session: 8600900
\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "



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

\n"; + echo "|$server_ip| |$session_id| |$campaign_id|\n

\n"; + echo "Back to main voicelab screen\n

\n"; + } +} +else +{ + if ($PLAY_MESSAGE > 0) + { + if ( (strlen($server_ip) > 6) && (strlen($session_id) > 6) && (strlen($campaign_id) > 2) && (strlen($message) > 0) ) + { + echo "


TO START YOUR VOICE LAB, DIAL 9$session_id ON YOUR PHONE NOW
\n"; + + echo "
or, you can enter an extension that you want played below
\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "Message Extension\n"; + echo "\n"; + echo "



\n"; + + $nn='99'; + $n='9'; + + $stmt="INSERT INTO vicidial_manager values('','','$MYSQL_datetime','NEW','N','$server_ip','','Originate','VL$FILE_datetime$nn','Channel: $local_DEF$n$session_id$local_AMP$ext_context','Context: $ext_context','Exten: $message','Priority: 1','Callerid: VL$FILE_datetime$nn','','','','','')"; + echo "|$stmt|\n

\n"; + $rslt=mysql_query($stmt, $link); + + echo "MESSAGE $message played at session $session_id on server $server_ip\n"; + + echo "
Kill a Voice Lab Session: 8600900
\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "



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

\n"; + echo "|$server_ip| |$session_id| |$campaign_id|\n

\n"; + echo "Back to main voicelab screen\n

\n"; + } + } +else + { + echo "
Start a Voice Lab Session: 8600900
\n"; + echo "\n"; + echo "\n"; + echo "Your Server: \n"; + echo "
\n"; + echo "Campaign: "; + echo "
\n"; + echo "\n"; + echo "



\n"; + + + echo "
Kill a Voice Lab Session: 8600900
\n"; + echo "\n"; + echo "\n"; + echo "Your Server: \n"; + echo "
\n"; + echo "Campaign: "; + echo "
\n"; + echo "\n"; + echo "



\n"; + } +} + + +if ($KILL_VOICE_LAB > 1) +{ + if ( (strlen($server_ip) > 6) && (strlen($session_id) > 6) && (strlen($campaign_id) > 2) ) + { + $kill_dial_string = "5555$session_id"; + $hangup_exten='8300'; + $stmt="INSERT INTO vicidial_manager values('','','$MYSQL_datetime','NEW','N','$server_ip','','Originate','VLK$FILE_datetime','Channel: $local_DEF$kill_dial_string$local_AMP$ext_context','Context: $ext_context','Exten: $hangup_exten','Priority: 1','Callerid: VLK$FILE_datetime','','','','','')"; + echo "|$stmt|\n

\n"; + $rslt=mysql_query($stmt, $link); + + echo "VOICELAB SESSION KILLED: $session_id at $server_ip | $KILL_VOICE_LAB\n"; + } + else + { + echo "ERROR!!!! Not all info entered properly\n

\n"; + echo "|$server_ip| |$session_id| |$campaign_id|\n

\n"; + echo "Back to main voicelab screen\n

\n"; + } + +} + +?> + + \ No newline at end of file diff --git a/agc_2-X/trunk/LANG_www/vicidial_en/welcome.php b/agc_2-X/trunk/LANG_www/vicidial_en/welcome.php new file mode 100644 index 00000000..f0bad6d9 --- /dev/null +++ b/agc_2-X/trunk/LANG_www/vicidial_en/welcome.php @@ -0,0 +1,25 @@ + LICENSE: GPLv2 +# + +echo "VICIDIAL Welcome\n"; +echo "\n"; +echo "\n"; +echo "




"; +echo ""; +echo ""; +echo "\n"; +echo "\n"; +echo "\n"; +echo "\n"; +echo "\n"; +echo "\n"; +echo "
Welcome
 
Agent Login
 
Administration
 
\n"; +echo "\n\n"; +echo "\n\n"; +echo "\n\n"; + +?> \ No newline at end of file diff --git a/agc_2-X/trunk/LANG_www/vicidial_es/AST_CLOSERstats.php b/agc_2-X/trunk/LANG_www/vicidial_es/AST_CLOSERstats.php index 065c9f2d..23e40c69 100644 --- a/agc_2-X/trunk/LANG_www/vicidial_es/AST_CLOSERstats.php +++ b/agc_2-X/trunk/LANG_www/vicidial_es/AST_CLOSERstats.php @@ -27,7 +27,7 @@ if (isset($_GET["ENVIAR"])) {$ENVIAR=$_GET["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;"; + $stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 6 and view_reports='1';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); @@ -86,7 +86,7 @@ echo "\n"; echo "\n"; -echo "           MODIFICAR | INFORMES \n"; +echo "           MODIFICAR | INFORMES \n"; echo "\n\n"; echo "
\n\n";
diff --git a/agc_2-X/trunk/LANG_www/vicidial_es/AST_VDADstats.php b/agc_2-X/trunk/LANG_www/vicidial_es/AST_VDADstats.php
index dff98a5a..c4c493ed 100644
--- a/agc_2-X/trunk/LANG_www/vicidial_es/AST_VDADstats.php
+++ b/agc_2-X/trunk/LANG_www/vicidial_es/AST_VDADstats.php
@@ -29,7 +29,7 @@ if (isset($_GET["ENVIAR"]))				{$ENVIAR=$_GET["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;";
+	$stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 6 and view_reports='1';";
 	if ($DB) {echo "|$stmt|\n";}
 	$rslt=mysql_query($stmt, $link);
 	$row=mysql_fetch_row($rslt);
@@ -88,7 +88,7 @@ echo "\n";
 echo "\n";
-echo "           MODIFICAR | INFORMES \n";
+echo "           MODIFICAR | INFORMES \n";
 echo "\n\n";
 
 echo "
\n\n";
@@ -202,6 +202,82 @@ echo "Total NA calls -Busy,Disconnect,RingNoAnswer: $NAcalls  $NApercent%\n";
 echo "Longitud media para las Llamadas sin Respuesta en segundos:       $average_na_seconds\n";
 
 
+##############################
+#########  CALL STATUS STATS
+
+$TOTALcalls = 0;
+
+echo "\n";
+echo "---------- CALL STATUS STATS\n";
+echo "+--------+----------------------+------------+\n";
+echo "| STATUS | DESCRIPTION          | CALLS      |\n";
+echo "+--------+----------------------+------------+\n";
+
+$stmt="SELECT * from vicidial_statuses order by status";
+$rslt=mysql_query($stmt, $link);
+$statuses_to_print = mysql_num_rows($rslt);
+$statuses_list='';
+
+$o=0;
+while ($statuses_to_print > $o) 
+	{
+	$rowx=mysql_fetch_row($rslt);
+	$statname_list["$rowx[0]"] = "$rowx[1]";
+	$o++;
+	}
+
+$stmt="SELECT * from vicidial_campaign_statuses where campaign_id='" . mysql_real_escape_string($group) . "' 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);
+	$statname_list["$rowx[0]"] = "$rowx[1]";
+	$o++;
+	}
+
+$stmt="select count(*),status 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) . "' group by status;";
+if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");}
+$rslt=mysql_query($stmt, $link);
+if ($DB) {echo "$stmt\n";}
+$statuses_to_print = mysql_num_rows($rslt);
+$i=0;
+while ($i < $statuses_to_print)
+	{
+	$row=mysql_fetch_row($rslt);
+
+	$TOTALcalls = ($TOTALcalls + $row[0]);
+
+	$STATUScount =	sprintf("%10s", $row[0]);while(strlen($STATUScount)>10) {$STATUScount = substr("$STATUScount", 0, -1);}
+	$RAWstatus = $row[1];
+	$status =	sprintf("%-6s", $row[1]);while(strlen($status)>6) {$status = substr("$status", 0, -1);}
+
+	if ($non_latin < 1)
+		{
+		 $status_name =	sprintf("%-20s", $statname_list[$RAWstatus]); 
+		 while(strlen($status_name)>20) {$status_name = substr("$status_name", 0, -1);}	
+		}
+	else
+		{
+		 $status_name =	sprintf("%-60s", $statname_list[$RAWstatus]); 
+		 while(mb_strlen($status_name,'utf-8')>20) {$status_name = mb_substr("$status_name", 0, -1,'utf-8');}	
+		}
+
+
+	echo "| $status | $status_name | $STATUScount |\n";
+
+	$i++;
+	}
+
+$TOTALcalls =		sprintf("%10s", $TOTALcalls);
+
+echo "+--------+----------------------+------------+\n";
+echo "| TOTAL:                        | $TOTALcalls |\n";
+echo "+-------------------------------+------------+\n";
+
+
 ##############################
 #########  USER STATS
 
@@ -217,6 +293,7 @@ echo "| AGENTE                    | 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;";
+if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");}
 $rslt=mysql_query($stmt, $link);
 if ($DB) {echo "$stmt\n";}
 $users_to_print = mysql_num_rows($rslt);
@@ -228,8 +305,15 @@ while ($i < $users_to_print)
 	$TOTcalls = ($TOTcalls + $row[2]);
 	$TOTtime = ($TOTtime + $row[3]);
 
-	$user =			sprintf("%-6s", $row[0]);
-	$full_name =	sprintf("%-15s", $row[1]); while(strlen($full_name)>15) {$full_name = substr("$full_name", 0, -1);}
+	$user =	sprintf("%-6s", $row[0]);while(strlen($user)>6) {$user = substr("$user", 0, -1);}
+	if ($non_latin < 1)
+	{
+ 	 $full_name =	sprintf("%-15s", $row[1]); while(strlen($full_name)>15) {$full_name = substr("$full_name", 0, -1);}	
+	}
+	else
+	{
+	 $full_name =	sprintf("%-45s", $row[1]); while(mb_strlen($full_name,'utf-8')>15) {$full_name = mb_substr("$full_name", 0, -1,'utf-8');}	
+	}
 	$USERcalls =	sprintf("%10s", $row[2]);
 	$USERtotTALK =	$row[3];
 	$USERavgTALK =	$row[4];
diff --git a/agc_2-X/trunk/LANG_www/vicidial_es/AST_VICIDIAL_hopperlist.php b/agc_2-X/trunk/LANG_www/vicidial_es/AST_VICIDIAL_hopperlist.php
index d5f9f87e..cee75bf5 100644
--- a/agc_2-X/trunk/LANG_www/vicidial_es/AST_VICIDIAL_hopperlist.php
+++ b/agc_2-X/trunk/LANG_www/vicidial_es/AST_VICIDIAL_hopperlist.php
@@ -7,7 +7,8 @@
 #
 # 60619-1654 - Added variable filtering to eliminate SQL injection attack threat
 #            - Added required user/pass to gain access to this page
-#
+# 70115-1614 - Added ALT field for vicidial_hopper alt_dial column
+# 
 
 require("dbconnect.php");
 
@@ -24,7 +25,7 @@ if (isset($_GET["ENVIAR"]))				{$ENVIAR=$_GET["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;";
+	$stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 6 and view_reports='1' and modify_campaigns='1';";
 	if ($DB) {echo "|$stmt|\n";}
 	$rslt=mysql_query($stmt, $link);
 	$row=mysql_fetch_row($rslt);
@@ -122,11 +123,11 @@ echo "Total de Leads en el hopper ahora mismo:       $TOTALcalls\n";
 
 echo "\n";
 echo "---------- LEADS IN HOPPER\n";
-echo "+------+-----------+------------+-------+--------+-------+--------+\n";
-echo "|      | LEAD_ID   | PHONE NUM  | STATE | STATUS | COUNT | GMT    |\n";
-echo "+------+-----------+------------+-------+--------+-------+--------+\n";
+echo "+------+-----------+------------+-------+--------+-------+--------+-------+\n";
+echo "|      | LEAD_ID   | PHONE NUM  | STATE | STATUS | COUNT | GMT    | ALT   |\n";
+echo "+------+-----------+------------+-------+--------+-------+--------+-------+\n";
 
-$stmt="select vicidial_hopper.lead_id,phone_number,vicidial_hopper.state,vicidial_list.status,called_count,vicidial_hopper.gmt_offset_now,hopper_id 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;";
+$stmt="select vicidial_hopper.lead_id,phone_number,vicidial_hopper.state,vicidial_list.status,called_count,vicidial_hopper.gmt_offset_now,hopper_id,alt_dial 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);
@@ -143,14 +144,15 @@ while ($i < $users_to_print)
 	$count =		sprintf("%-5s", $row[4]);
 	$gmt =			sprintf("%-6s", $row[5]);
 	$hopper_id =	sprintf("%-6s", $row[6]);
+	$alt_dial =		sprintf("%-5s", $row[7]);
 
 if ($DB) {echo "| $FMT_i | $lead_id | $phone_number | $state | $status | $count | $gmt | $hopper_id |\n";}
-else {echo "| $FMT_i | $lead_id | $phone_number | $state | $status | $count | $gmt |\n";}
+else {echo "| $FMT_i | $lead_id | $phone_number | $state | $status | $count | $gmt | $alt_dial |\n";}
 
 	$i++;
 	}
 
-echo "+------+-----------+------------+-------+--------+-------+--------+\n";
+echo "+------+-----------+------------+-------+--------+-------+--------+-------+\n";
 
 
 }
diff --git a/agc_2-X/trunk/LANG_www/vicidial_es/AST_admin_log_display.php b/agc_2-X/trunk/LANG_www/vicidial_es/AST_admin_log_display.php
index 6d89ee3e..f7936b12 100644
--- a/agc_2-X/trunk/LANG_www/vicidial_es/AST_admin_log_display.php
+++ b/agc_2-X/trunk/LANG_www/vicidial_es/AST_admin_log_display.php
@@ -35,7 +35,7 @@ $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;";
+	$stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 8 and view_reports='1';";
 	if ($DB) {echo "|$stmt|\n";}
 	$rslt=mysql_query($stmt, $link);
 	$row=mysql_fetch_row($rslt);
diff --git a/agc_2-X/trunk/LANG_www/vicidial_es/AST_agent_time_sheet.php b/agc_2-X/trunk/LANG_www/vicidial_es/AST_agent_time_sheet.php
index 71aa363a..0c562ea2 100644
--- a/agc_2-X/trunk/LANG_www/vicidial_es/AST_agent_time_sheet.php
+++ b/agc_2-X/trunk/LANG_www/vicidial_es/AST_agent_time_sheet.php
@@ -28,7 +28,7 @@ if (isset($_GET["ENVIAR"]))				{$ENVIAR=$_GET["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;";
+	$stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 6 and view_reports='1';";
 	if ($DB) {echo "|$stmt|\n";}
 	$rslt=mysql_query($stmt, $link);
 	$row=mysql_fetch_row($rslt);
@@ -63,7 +63,11 @@ if (!isset($query_date)) {$query_date = $NOW_DATE;}
 \n";
 echo "VICIDIAL: Agent Time Sheet\n";
-echo "VICIDIAL ADMIN: Agent Time Sheet
\n"; +echo "VICIDIAL ADMIN: Agent Time Sheet\n"; +echo " - User Stats\n"; +echo " - User Status\n"; +echo " - Modificar Usuario\n"; +echo "
\n"; echo "
  \n"; echo "Date: \n"; echo "User ID: \n"; diff --git a/agc_2-X/trunk/LANG_www/vicidial_es/AST_inboundEXTstats.php b/agc_2-X/trunk/LANG_www/vicidial_es/AST_inboundEXTstats.php new file mode 100644 index 00000000..e85f742c --- /dev/null +++ b/agc_2-X/trunk/LANG_www/vicidial_es/AST_inboundEXTstats.php @@ -0,0 +1,400 @@ + 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 and view_reports='1';"; + 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_www/vicidial_es/AST_server_performance.php b/agc_2-X/trunk/LANG_www/vicidial_es/AST_server_performance.php index 5c122951..88d1d9bf 100644 --- a/agc_2-X/trunk/LANG_www/vicidial_es/AST_server_performance.php +++ b/agc_2-X/trunk/LANG_www/vicidial_es/AST_server_performance.php @@ -28,7 +28,7 @@ if (isset($_GET["ENVIAR"])) {$ENVIAR=$_GET["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;"; + $stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 6 and view_reports='1' and modify_servers='1';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); @@ -96,7 +96,7 @@ echo "\n"; echo "\n"; echo "\n"; echo "\n"; -echo "             INFORMES \n"; +echo "             INFORMES \n"; echo "\n\n"; echo "
\n";
diff --git a/agc_2-X/trunk/LANG_www/vicidial_es/AST_timeonVDAD.php b/agc_2-X/trunk/LANG_www/vicidial_es/AST_timeonVDAD.php
index 3ae32f20..b9024460 100644
--- a/agc_2-X/trunk/LANG_www/vicidial_es/AST_timeonVDAD.php
+++ b/agc_2-X/trunk/LANG_www/vicidial_es/AST_timeonVDAD.php
@@ -33,7 +33,7 @@ if (isset($_GET["closer_display"]))				{$closer_display=$_GET["closer_display"];
 $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;";
+	$stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 6 and view_reports='1';";
 	if ($DB) {echo "|$stmt|\n";}
 	$rslt=mysql_query($stmt, $link);
 	$row=mysql_fetch_row($rslt);
@@ -133,7 +133,7 @@ echo "SERVER: $server_ip\n";
 if ($closer_display>0) {$closer_display_reverse=0;   $closer_reverse_link='DEFAULT';}
 else {$closer_display_reverse=1;   $closer_reverse_link='CLOSER';}
 
-echo "VICIDIAL: Agents Time On Calls           $NOW_TIME    $closer_reverse_link | INFORMES\n\n";
+echo "VICIDIAL: Agents Time On Calls           $NOW_TIME    $closer_reverse_link | INFORMES\n\n";
 
 if ($closer_display>0)
 {
diff --git a/agc_2-X/trunk/LANG_www/vicidial_es/AST_timeonVDADall.php b/agc_2-X/trunk/LANG_www/vicidial_es/AST_timeonVDADall.php
index ff57fabc..7765f3d9 100644
--- a/agc_2-X/trunk/LANG_www/vicidial_es/AST_timeonVDADall.php
+++ b/agc_2-X/trunk/LANG_www/vicidial_es/AST_timeonVDADall.php
@@ -7,7 +7,7 @@
 #
 # STOP=4000, SLOW=40, GO=4 seconds refresh interval
 # 
-# changes:
+# CHANGELOG:
 # 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
@@ -21,7 +21,11 @@
 # 61002-1642 - Added TRUNK SHORT/FILL stats
 # 61101-1318 - Added SIP and IAX Listen and Barge links option
 # 61101-1647 - Added Usergroup column and user name option as well as sorting
-# 61102-1155 - made display of columns more modular, added ability to hide server info
+# 61102-1155 - Made display of columns more modular, added ability to hide server info
+# 61215-1131 - Added answered calls and drop percent taken from answered calls
+# 70111-1600 - Added ability to use BLEND/INBND/*_C/*_B/*_I as closer campaigns
+# 70123-1151 - Added non_latin options for substr in display variables, thanks Marin Blu
+# 70206-1140 - Added call-type statuses to display(A-Auto, M-Manual, I-Inbound/Closer)
 #
 
 header ("Content-type: text/html; charset=utf-8");
@@ -113,8 +117,12 @@ $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;";
+	$stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 6 and view_reports='1';";
 	if ($DB) {echo "|$stmt|\n";}
+if ($non_latin > 0)
+{
+$rslt=mysql_query("SET NAMES 'UTF8'");
+}
 	$rslt=mysql_query($stmt, $link);
 	$row=mysql_fetch_row($rslt);
 	$auth=$row[0];
@@ -135,6 +143,10 @@ $epochSIXhoursAGO = ($STARTtime - 21600);
 $timeSIXhoursAGO = date("Y-m-d H:i:s",$epochSIXhoursAGO);
 
 $stmt="select campaign_id from vicidial_campaigns where active='Y';";
+if ($non_latin > 0)
+{
+$rslt=mysql_query("SET NAMES 'UTF8'");
+}
 $rslt=mysql_query($stmt, $link);
 if (!isset($DB))   {$DB=0;}
 if ($DB) {echo "$stmt\n";}
@@ -148,6 +160,10 @@ while ($i < $groups_to_print)
 	}
 
 $stmt="select * from vicidial_user_groups;";
+if ($non_latin > 0)
+{
+$rslt=mysql_query("SET NAMES 'UTF8'");
+}
 $rslt=mysql_query($stmt, $link);
 if (!isset($DB))   {$DB=0;}
 if ($DB) {echo "$stmt\n";}
@@ -242,18 +258,22 @@ echo "GO";
 echo "       MODIFICAR | \n";
 echo "SUMMARY | \n";
-echo "INFORMES \n";
+echo "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,dial_method,adaptive_maximum_level,adaptive_dropped_percentage,adaptive_dl_diff_target,adaptive_intensity,available_only_ratio_tally,adaptive_latest_server_time,local_call_time,dial_timeout from vicidial_campaigns where campaign_id='" . mysql_real_escape_string($group) . "';"; +$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,dial_method,adaptive_maximum_level,adaptive_dropped_percentage,adaptive_dl_diff_target,adaptive_intensity,available_only_ratio_tally,adaptive_latest_server_time,local_call_time,dial_timeout,dial_statuses from vicidial_campaigns where campaign_id='" . mysql_real_escape_string($group) . "';"; if ($group=='XXXX-ALL-ACTIVE-XXXX') { - $stmt="select avg(auto_dial_level),min(dial_status_a),min(dial_status_b),min(dial_status_c),min(dial_status_d),min(dial_status_e),min(lead_order),min(lead_filter_id),sum(hopper_level),min(dial_method),avg(adaptive_maximum_level),avg(adaptive_dropped_percentage),avg(adaptive_dl_diff_target),avg(adaptive_intensity),min(available_only_ratio_tally),min(adaptive_latest_server_time),min(local_call_time),avg(dial_timeout) from vicidial_campaigns;"; + $stmt="select avg(auto_dial_level),min(dial_status_a),min(dial_status_b),min(dial_status_c),min(dial_status_d),min(dial_status_e),min(lead_order),min(lead_filter_id),sum(hopper_level),min(dial_method),avg(adaptive_maximum_level),avg(adaptive_dropped_percentage),avg(adaptive_dl_diff_target),avg(adaptive_intensity),min(available_only_ratio_tally),min(adaptive_latest_server_time),min(local_call_time),avg(dial_timeout),min(dial_statuses) from vicidial_campaigns;"; } +if ($non_latin > 0) +{ +$rslt=mysql_query("SET NAMES 'UTF8'"); +} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $DIALlev = $row[0]; @@ -274,12 +294,19 @@ $ADAavailonly = $row[14]; $TAPERtime = $row[15]; $CALLtime = $row[16]; $DIALtimeout = $row[17]; +$DIALstatuses = $row[18]; + $DIALstatuses = (preg_replace("/ -$|^ /","",$DIALstatuses)); + $DIALstatuses = (ereg_replace(' ',', ',$DIALstatuses)); $stmt="select count(*) from vicidial_hopper where campaign_id='" . mysql_real_escape_string($group) . "';"; if ($group=='XXXX-ALL-ACTIVE-XXXX') { $stmt="select count(*) from vicidial_hopper;"; } +if ($non_latin > 0) +{ +$rslt=mysql_query("SET NAMES 'UTF8'"); +} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $VDhop = $row[0]; @@ -289,6 +316,10 @@ if ($group=='XXXX-ALL-ACTIVE-XXXX') { $stmt="select sum(dialable_leads),sum(calls_today),sum(drops_today),avg(drops_answers_today_pct),avg(differential_onemin),avg(agents_average_onemin),sum(balance_trunk_fill),sum(answers_today) from vicidial_campaign_stats;"; } +if ($non_latin > 0) +{ +$rslt=mysql_query("SET NAMES 'UTF8'"); +} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $DAleads = $row[0]; @@ -311,6 +342,10 @@ if ($group=='XXXX-ALL-ACTIVE-XXXX') { $stmt="select sum(local_trunk_shortage) from vicidial_campaign_server_stats;"; } +if ($non_latin > 0) +{ +$rslt=mysql_query("SET NAMES 'UTF8'"); +} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $balanceSHORT = $row[0]; @@ -351,7 +386,7 @@ echo "
HOPPER LEVEL:  $HOPlev     DROPPED / ANSWERED:  $dropsTODAY / $answersTODAY   DL DIFF:  $diffONEMIN     STATUSES:  $DIALstatusA, $DIALstatusB, $DIALstatusC, $DIALstatusD, $DIALstatusE     STATUSES:  $DIALstatuses    
HOPPER LEVEL:  $HOPlev     DROPPED / ANSWERED:  $dropsTODAY / $answersTODAY   DL DIFF:  $diffONEMIN     STATUSES:  $DIALstatusA, $DIALstatusB, $DIALstatusC, $DIALstatusD, $DIALstatusE     STATUSES:  $DIALstatuses    
"; ################################################################################ ###### OUTBOUND CALLS ################################################################################ -if (eregi("CLOSER",$group)) +if (eregi("(CLOSER|BLEND|INBND|_C$|_B$|_I$)",$group)) { $stmt="select closer_campaigns from vicidial_campaigns where campaign_id='" . mysql_real_escape_string($group) . "';"; $rslt=mysql_query($stmt, $link); @@ -289,7 +294,7 @@ $parked_to_print = mysql_num_rows($rslt); if ($out_live > 9) {$F=''; $FG='';} if ($out_live > 14) {$F=''; $FG='';} - if (eregi("CLOSER",$group)) + if (eregi("(CLOSER|BLEND|INBND|_C$|_B$|_I$)",$group)) {echo "$NFB$out_total$NFE current active calls      \n";} else {echo "$NFB$out_total$NFE calls being placed       \n";} diff --git a/agc_2-X/trunk/LANG_www/vicidial_es/AST_timeonpark.php b/agc_2-X/trunk/LANG_www/vicidial_es/AST_timeonpark.php index d098a8a4..c48ee38c 100644 --- a/agc_2-X/trunk/LANG_www/vicidial_es/AST_timeonpark.php +++ b/agc_2-X/trunk/LANG_www/vicidial_es/AST_timeonpark.php @@ -3,6 +3,11 @@ ### ### Copyright (C) 2006 Matt Florell 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"); @@ -18,6 +23,23 @@ if (isset($_GET["submit"])) {$submit=$_GET["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 and view_reports='1';"; + 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"); $timeONEhoursAGO = ($STARTtime - 3600); @@ -67,7 +89,7 @@ echo"VICIDIAL: Time On Park\n"; echo "
\n\n";
 
-echo "VICIDIAL: Time On Park                       $NOW_TIME\n\n";
+echo "VICIDIAL: Time On Park         $NOW_TIME    INFORMES\n\n";
 echo "+------------+-----------------+---------------------+---------+\n";
 echo "| CHANNEL    | GROUP           | START TIME          | MINUTES |\n";
 echo "+------------+-----------------+---------------------+---------+\n";
@@ -76,7 +98,7 @@ echo "+------------+-----------------+---------------------+---------+\n";
 # $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;";
+$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);
@@ -138,7 +160,7 @@ echo "| STATION    | USER   | CHANNEL    | GROUP           | START TIME
 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;";
+$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);
diff --git a/agc_2-X/trunk/LANG_www/vicidial_es/admin.php b/agc_2-X/trunk/LANG_www/vicidial_es/admin.php
index 2d7fd313..755a83a5 100644
--- a/agc_2-X/trunk/LANG_www/vicidial_es/admin.php
+++ b/agc_2-X/trunk/LANG_www/vicidial_es/admin.php
@@ -1,9037 +1,10721 @@
-    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["active"]))	{$active=$_GET["active"];}
-	elseif (isset($_POST["active"]))	{$active=$_POST["active"];}
-if (isset($_GET["adaptive_dl_diff_target"]))	{$adaptive_dl_diff_target=$_GET["adaptive_dl_diff_target"];}
-	elseif (isset($_POST["adaptive_dl_diff_target"]))	{$adaptive_dl_diff_target=$_POST["adaptive_dl_diff_target"];}
-if (isset($_GET["adaptive_dropped_percentage"]))	{$adaptive_dropped_percentage=$_GET["adaptive_dropped_percentage"];}
-	elseif (isset($_POST["adaptive_dropped_percentage"])){$adaptive_dropped_percentage=$_POST["adaptive_dropped_percentage"];}
-if (isset($_GET["adaptive_intensity"]))	{$adaptive_intensity=$_GET["adaptive_intensity"];}
-	elseif (isset($_POST["adaptive_intensity"]))	{$adaptive_intensity=$_POST["adaptive_intensity"];}
-if (isset($_GET["adaptive_latest_server_time"]))	{$adaptive_latest_server_time=$_GET["adaptive_latest_server_time"];}
-	elseif (isset($_POST["adaptive_latest_server_time"])){$adaptive_latest_server_time=$_POST["adaptive_latest_server_time"];}
-if (isset($_GET["adaptive_maximum_level"]))	{$adaptive_maximum_level=$_GET["adaptive_maximum_level"];}
-	elseif (isset($_POST["adaptive_maximum_level"]))	{$adaptive_maximum_level=$_POST["adaptive_maximum_level"];}
-if (isset($_GET["ADD"]))	{$ADD=$_GET["ADD"];}
-	elseif (isset($_POST["ADD"]))	{$ADD=$_POST["ADD"];}
-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["AFLogging_enabled"]))	{$AFLogging_enabled=$_GET["AFLogging_enabled"];}
-	elseif (isset($_POST["AFLogging_enabled"]))	{$AFLogging_enabled=$_POST["AFLogging_enabled"];}
-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["agentcall_manual"]))	{$agentcall_manual=$_GET["agentcall_manual"];}
-	elseif (isset($_POST["agentcall_manual"]))	{$agentcall_manual=$_POST["agentcall_manual"];}
-if (isset($_GET["agentonly_callbacks"]))	{$agentonly_callbacks=$_GET["agentonly_callbacks"];}
-	elseif (isset($_POST["agentonly_callbacks"]))	{$agentonly_callbacks=$_POST["agentonly_callbacks"];}
-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["agi_output"]))	{$agi_output=$_GET["agi_output"];}
-	elseif (isset($_POST["agi_output"]))	{$agi_output=$_POST["agi_output"];}
-if (isset($_GET["allcalls_delay"]))	{$allcalls_delay=$_GET["allcalls_delay"];}
-	elseif (isset($_POST["allcalls_delay"]))	{$allcalls_delay=$_POST["allcalls_delay"];}
-if (isset($_GET["allow_closers"]))	{$allow_closers=$_GET["allow_closers"];}
-	elseif (isset($_POST["allow_closers"]))	{$allow_closers=$_POST["allow_closers"];}
-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["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["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["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["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["asterisk_version"]))	{$asterisk_version=$_GET["asterisk_version"];}
-	elseif (isset($_POST["asterisk_version"]))	{$asterisk_version=$_POST["asterisk_version"];}
-if (isset($_GET["ASTmgrSECRET"]))	{$ASTmgrSECRET=$_GET["ASTmgrSECRET"];}
-	elseif (isset($_POST["ASTmgrSECRET"]))	{$ASTmgrSECRET=$_POST["ASTmgrSECRET"];}
-if (isset($_GET["ASTmgrUSERNAME"]))	{$ASTmgrUSERNAME=$_GET["ASTmgrUSERNAME"];}
-	elseif (isset($_POST["ASTmgrUSERNAME"]))	{$ASTmgrUSERNAME=$_POST["ASTmgrUSERNAME"];}
-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["ASTmgrUSERNAMEupdate"]))	{$ASTmgrUSERNAMEupdate=$_GET["ASTmgrUSERNAMEupdate"];}
-	elseif (isset($_POST["ASTmgrUSERNAMEupdate"]))	{$ASTmgrUSERNAMEupdate=$_POST["ASTmgrUSERNAMEupdate"];}
-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($_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["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["available_only_ratio_tally"]))	{$available_only_ratio_tally=$_GET["available_only_ratio_tally"];}
-	elseif (isset($_POST["available_only_ratio_tally"])){$available_only_ratio_tally=$_POST["available_only_ratio_tally"];}
-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["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["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["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["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["campaign_cid"]))	{$campaign_cid=$_GET["campaign_cid"];}
-	elseif (isset($_POST["campaign_cid"]))	{$campaign_cid=$_POST["campaign_cid"];}
-if (isset($_GET["campaign_detail"]))	{$campaign_detail=$_GET["campaign_detail"];}
-	elseif (isset($_POST["campaign_detail"]))	{$campaign_detail=$_POST["campaign_detail"];}
-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["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_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["campaign_recording"]))	{$campaign_recording=$_GET["campaign_recording"];}
-	elseif (isset($_POST["campaign_recording"]))	{$campaign_recording=$_POST["campaign_recording"];}
-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["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["client_browser"]))	{$client_browser=$_GET["client_browser"];}
-	elseif (isset($_POST["client_browser"]))	{$client_browser=$_POST["client_browser"];}
-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["company"]))	{$company=$_GET["company"];}
-	elseif (isset($_POST["company"]))	{$company=$_POST["company"];}
-if (isset($_GET["computer_ip"]))	{$computer_ip=$_GET["computer_ip"];}
-	elseif (isset($_POST["computer_ip"]))	{$computer_ip=$_POST["computer_ip"];}
-if (isset($_GET["conf_exten"]))	{$conf_exten=$_GET["conf_exten"];}
-	elseif (isset($_POST["conf_exten"]))	{$conf_exten=$_POST["conf_exten"];}
-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["conferencing_enabled"]))	{$conferencing_enabled=$_GET["conferencing_enabled"];}
-	elseif (isset($_POST["conferencing_enabled"]))	{$conferencing_enabled=$_POST["conferencing_enabled"];}
-if (isset($_GET["CoNfIrM"]))	{$CoNfIrM=$_GET["CoNfIrM"];}
-	elseif (isset($_POST["CoNfIrM"]))	{$CoNfIrM=$_POST["CoNfIrM"];}
-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_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_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_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["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_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_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["DBX_database"]))	{$DBX_database=$_GET["DBX_database"];}
-	elseif (isset($_POST["DBX_database"]))	{$DBX_database=$_POST["DBX_database"];}
-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["DBX_server"]))	{$DBX_server=$_GET["DBX_server"];}
-	elseif (isset($_POST["DBX_server"]))	{$DBX_server=$_POST["DBX_server"];}
-if (isset($_GET["DBX_user"]))	{$DBX_user=$_GET["DBX_user"];}
-	elseif (isset($_POST["DBX_user"]))	{$DBX_user=$_POST["DBX_user"];}
-if (isset($_GET["DBY_database"]))	{$DBY_database=$_GET["DBY_database"];}
-	elseif (isset($_POST["DBY_database"]))	{$DBY_database=$_POST["DBY_database"];}
-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["DBY_server"]))	{$DBY_server=$_GET["DBY_server"];}
-	elseif (isset($_POST["DBY_server"]))	{$DBY_server=$_POST["DBY_server"];}
-if (isset($_GET["DBY_user"]))	{$DBY_user=$_GET["DBY_user"];}
-	elseif (isset($_POST["DBY_user"]))	{$DBY_user=$_POST["DBY_user"];}
-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["delete_campaigns"]))	{$delete_campaigns=$_GET["delete_campaigns"];}
-	elseif (isset($_POST["delete_campaigns"]))	{$delete_campaigns=$_POST["delete_campaigns"];}
-if (isset($_GET["delete_filters"]))	{$delete_filters=$_GET["delete_filters"];}
-	elseif (isset($_POST["delete_filters"]))	{$delete_filters=$_POST["delete_filters"];}
-if (isset($_GET["delete_ingroups"]))	{$delete_ingroups=$_GET["delete_ingroups"];}
-	elseif (isset($_POST["delete_ingroups"]))	{$delete_ingroups=$_POST["delete_ingroups"];}
-if (isset($_GET["delete_lists"]))	{$delete_lists=$_GET["delete_lists"];}
-	elseif (isset($_POST["delete_lists"]))	{$delete_lists=$_POST["delete_lists"];}
-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["delete_scripts"]))	{$delete_scripts=$_GET["delete_scripts"];}
-	elseif (isset($_POST["delete_scripts"]))	{$delete_scripts=$_POST["delete_scripts"];}
-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_users"]))	{$delete_users=$_GET["delete_users"];}
-	elseif (isset($_POST["delete_users"]))	{$delete_users=$_POST["delete_users"];}
-if (isset($_GET["dial_method"]))	{$dial_method=$_GET["dial_method"];}
-	elseif (isset($_POST["dial_method"]))	{$dial_method=$_POST["dial_method"];}
-if (isset($_GET["dial_prefix"]))	{$dial_prefix=$_GET["dial_prefix"];}
-	elseif (isset($_POST["dial_prefix"]))	{$dial_prefix=$_POST["dial_prefix"];}
-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["dial_timeout"]))	{$dial_timeout=$_GET["dial_timeout"];}
-	elseif (isset($_POST["dial_timeout"]))	{$dial_timeout=$_POST["dial_timeout"];}
-if (isset($_GET["dialplan_number"]))	{$dialplan_number=$_GET["dialplan_number"];}
-	elseif (isset($_POST["dialplan_number"]))	{$dialplan_number=$_POST["dialplan_number"];}
-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["drop_exten"]))	{$drop_exten=$_GET["drop_exten"];}
-	elseif (isset($_POST["drop_exten"]))	{$drop_exten=$_POST["drop_exten"];}
-if (isset($_GET["drop_message"]))	{$drop_message=$_GET["drop_message"];}
-	elseif (isset($_POST["drop_message"]))	{$drop_message=$_POST["drop_message"];}
-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["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["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["ext_context"]))	{$ext_context=$_GET["ext_context"];}
-	elseif (isset($_POST["ext_context"]))	{$ext_context=$_POST["ext_context"];}
-if (isset($_GET["extension"]))	{$extension=$_GET["extension"];}
-	elseif (isset($_POST["extension"]))	{$extension=$_POST["extension"];}
-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["force_logout"]))	{$force_logout=$_GET["force_logout"];}
-	elseif (isset($_POST["force_logout"]))	{$force_logout=$_POST["force_logout"];}
-if (isset($_GET["fronter_display"]))	{$fronter_display=$_GET["fronter_display"];}
-	elseif (isset($_POST["fronter_display"]))	{$fronter_display=$_POST["fronter_display"];}
-if (isset($_GET["full_name"]))	{$full_name=$_GET["full_name"];}
-	elseif (isset($_POST["full_name"]))	{$full_name=$_POST["full_name"];}
-if (isset($_GET["fullname"]))	{$fullname=$_GET["fullname"];}
-	elseif (isset($_POST["fullname"]))	{$fullname=$_POST["fullname"];}
-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["group_color"]))	{$group_color=$_GET["group_color"];}
-	elseif (isset($_POST["group_color"]))	{$group_color=$_POST["group_color"];}
-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["groups"]))	{$groups=$_GET["groups"];}
-	elseif (isset($_POST["groups"]))	{$groups=$_POST["groups"];}
-if (isset($_GET["HKstatus"]))	{$HKstatus=$_GET["HKstatus"];}
-	elseif (isset($_POST["HKstatus"]))	{$HKstatus=$_POST["HKstatus"];}
-if (isset($_GET["hopper_level"]))	{$hopper_level=$_GET["hopper_level"];}
-	elseif (isset($_POST["hopper_level"]))	{$hopper_level=$_POST["hopper_level"];}
-if (isset($_GET["hotkey"]))	{$hotkey=$_GET["hotkey"];}
-	elseif (isset($_POST["hotkey"]))	{$hotkey=$_POST["hotkey"];}
-if (isset($_GET["hotkeys_active"]))	{$hotkeys_active=$_GET["hotkeys_active"];}
-	elseif (isset($_POST["hotkeys_active"]))	{$hotkeys_active=$_POST["hotkeys_active"];}
-if (isset($_GET["install_directory"]))	{$install_directory=$_GET["install_directory"];}
-	elseif (isset($_POST["install_directory"]))	{$install_directory=$_POST["install_directory"];}
-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_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_sql"]))	{$lead_filter_sql=$_GET["lead_filter_sql"];}
-	elseif (isset($_POST["lead_filter_sql"]))	{$lead_filter_sql=$_POST["lead_filter_sql"];}
-if (isset($_GET["lead_order"]))	{$lead_order=$_GET["lead_order"];}
-	elseif (isset($_POST["lead_order"]))	{$lead_order=$_POST["lead_order"];}
-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["load_leads"]))	{$load_leads=$_GET["load_leads"];}
-	elseif (isset($_POST["load_leads"]))	{$load_leads=$_POST["load_leads"];}
-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["local_gmt"]))	{$local_gmt=$_GET["local_gmt"];}
-	elseif (isset($_POST["local_gmt"]))	{$local_gmt=$_POST["local_gmt"];}
-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["login"]))	{$login=$_GET["login"];}
-	elseif (isset($_POST["login"]))	{$login=$_POST["login"];}
-if (isset($_GET["login_campaign"]))	{$login_campaign=$_GET["login_campaign"];}
-	elseif (isset($_POST["login_campaign"]))	{$login_campaign=$_POST["login_campaign"];}
-if (isset($_GET["login_pass"]))	{$login_pass=$_GET["login_pass"];}
-	elseif (isset($_POST["login_pass"]))	{$login_pass=$_POST["login_pass"];}
-if (isset($_GET["login_user"]))	{$login_user=$_GET["login_user"];}
-	elseif (isset($_POST["login_user"]))	{$login_user=$_POST["login_user"];}
-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["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["modify_leads"]))	{$modify_leads=$_GET["modify_leads"];}
-	elseif (isset($_POST["modify_leads"]))	{$modify_leads=$_POST["modify_leads"];}
-if (isset($_GET["monitor_prefix"]))	{$monitor_prefix=$_GET["monitor_prefix"];}
-	elseif (isset($_POST["monitor_prefix"]))	{$monitor_prefix=$_POST["monitor_prefix"];}
-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["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["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["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["old_extension"]))	{$old_extension=$_GET["old_extension"];}
-	elseif (isset($_POST["old_extension"]))	{$old_extension=$_POST["old_extension"];}
-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["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["OLDuser_group"]))	{$OLDuser_group=$_GET["OLDuser_group"];}
-	elseif (isset($_POST["OLDuser_group"]))	{$OLDuser_group=$_POST["OLDuser_group"];}
-if (isset($_GET["omit_phone_code"]))	{$omit_phone_code=$_GET["omit_phone_code"];}
-	elseif (isset($_POST["omit_phone_code"]))	{$omit_phone_code=$_POST["omit_phone_code"];}
-if (isset($_GET["outbound_cid"]))	{$outbound_cid=$_GET["outbound_cid"];}
-	elseif (isset($_POST["outbound_cid"]))	{$outbound_cid=$_POST["outbound_cid"];}
-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["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["pass"]))	{$pass=$_GET["pass"];}
-	elseif (isset($_POST["pass"]))	{$pass=$_POST["pass"];}
-if (isset($_GET["phone_ip"]))	{$phone_ip=$_GET["phone_ip"];}
-	elseif (isset($_POST["phone_ip"]))	{$phone_ip=$_POST["phone_ip"];}
-if (isset($_GET["phone_login"]))	{$phone_login=$_GET["phone_login"];}
-	elseif (isset($_POST["phone_login"]))	{$phone_login=$_POST["phone_login"];}
-if (isset($_GET["phone_number"]))	{$phone_number=$_GET["phone_number"];}
-	elseif (isset($_POST["phone_number"]))	{$phone_number=$_POST["phone_number"];}
-if (isset($_GET["phone_pass"]))	{$phone_pass=$_GET["phone_pass"];}
-	elseif (isset($_POST["phone_pass"]))	{$phone_pass=$_POST["phone_pass"];}
-if (isset($_GET["phone_type"]))	{$phone_type=$_GET["phone_type"];}
-	elseif (isset($_POST["phone_type"]))	{$phone_type=$_POST["phone_type"];}
-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["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["recording_exten"]))	{$recording_exten=$_GET["recording_exten"];}
-	elseif (isset($_POST["recording_exten"]))	{$recording_exten=$_POST["recording_exten"];}
-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["reset_hopper"]))	{$reset_hopper=$_GET["reset_hopper"];}
-	elseif (isset($_POST["reset_hopper"]))	{$reset_hopper=$_POST["reset_hopper"];}
-if (isset($_GET["reset_list"]))	{$reset_list=$_GET["reset_list"];}
-	elseif (isset($_POST["reset_list"]))	{$reset_list=$_POST["reset_list"];}
-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["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["scheduled_callbacks"]))	{$scheduled_callbacks=$_GET["scheduled_callbacks"];}
-	elseif (isset($_POST["scheduled_callbacks"]))	{$scheduled_callbacks=$_POST["scheduled_callbacks"];}
-if (isset($_GET["script_comments"]))	{$script_comments=$_GET["script_comments"];}
-	elseif (isset($_POST["script_comments"]))	{$script_comments=$_POST["script_comments"];}
-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_text"]))	{$script_text=$_GET["script_text"];}
-	elseif (isset($_POST["script_text"]))	{$script_text=$_POST["script_text"];}
-if (isset($_GET["selectable"]))	{$selectable=$_GET["selectable"];}
-	elseif (isset($_POST["selectable"]))	{$selectable=$_POST["selectable"];}
-if (isset($_GET["server_description"]))	{$server_description=$_GET["server_description"];}
-	elseif (isset($_POST["server_description"]))	{$server_description=$_POST["server_description"];}
-if (isset($_GET["server_id"]))	{$server_id=$_GET["server_id"];}
-	elseif (isset($_POST["server_id"]))	{$server_id=$_POST["server_id"];}
-if (isset($_GET["server_ip"]))	{$server_ip=$_GET["server_ip"];}
-	elseif (isset($_POST["server_ip"]))	{$server_ip=$_POST["server_ip"];}
-if (isset($_GET["stage"]))	{$stage=$_GET["stage"];}
-	elseif (isset($_POST["stage"]))	{$stage=$_POST["stage"];}
-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["status"]))	{$status=$_GET["status"];}
-	elseif (isset($_POST["status"]))	{$status=$_POST["status"];}
-if (isset($_GET["status_name"]))	{$status_name=$_GET["status_name"];}
-	elseif (isset($_POST["status_name"]))	{$status_name=$_POST["status_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"];}
-if (isset($_GET["sys_perf_log"]))	{$sys_perf_log=$_GET["sys_perf_log"];}
-	elseif (isset($_POST["sys_perf_log"]))	{$sys_perf_log=$_POST["sys_perf_log"];}
-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["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["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["user"]))	{$user=$_GET["user"];}
-	elseif (isset($_POST["user"]))	{$user=$_POST["user"];}
-if (isset($_GET["user_group"]))	{$user_group=$_GET["user_group"];}
-	elseif (isset($_POST["user_group"]))	{$user_group=$_POST["user_group"];}
-if (isset($_GET["user_level"]))	{$user_level=$_GET["user_level"];}
-	elseif (isset($_POST["user_level"]))	{$user_level=$_POST["user_level"];}
-if (isset($_GET["user_start"]))	{$user_start=$_GET["user_start"];}
-	elseif (isset($_POST["user_start"]))	{$user_start=$_POST["user_start"];}
-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["vd_server_logs"]))	{$vd_server_logs=$_GET["vd_server_logs"];}
-	elseif (isset($_POST["vd_server_logs"]))	{$vd_server_logs=$_POST["vd_server_logs"];}
-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["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["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["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["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["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["voicemail_ext"]))	{$voicemail_ext=$_GET["voicemail_ext"];}
-	elseif (isset($_POST["voicemail_ext"]))	{$voicemail_ext=$_POST["voicemail_ext"];}
-if (isset($_GET["voicemail_exten"]))	{$voicemail_exten=$_GET["voicemail_exten"];}
-	elseif (isset($_POST["voicemail_exten"]))	{$voicemail_exten=$_POST["voicemail_exten"];}
-if (isset($_GET["voicemail_id"]))	{$voicemail_id=$_GET["voicemail_id"];}
-	elseif (isset($_POST["voicemail_id"]))	{$voicemail_id=$_POST["voicemail_id"];}
-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["wrapup_message"]))	{$wrapup_message=$_GET["wrapup_message"];}
-	elseif (isset($_POST["wrapup_message"]))	{$wrapup_message=$_POST["wrapup_message"];}
-if (isset($_GET["wrapup_seconds"]))	{$wrapup_seconds=$_GET["wrapup_seconds"];}
-	elseif (isset($_POST["wrapup_seconds"]))	{$wrapup_seconds=$_POST["wrapup_seconds"];}
-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["vicidial_balance_active"]))	{$vicidial_balance_active=$_GET["vicidial_balance_active"];}
-	elseif (isset($_POST["vicidial_balance_active"]))	{$vicidial_balance_active=$_POST["vicidial_balance_active"];}
-if (isset($_GET["balance_trunks_offlimits"]))	{$balance_trunks_offlimits=$_GET["balance_trunks_offlimits"];}
-	elseif (isset($_POST["balance_trunks_offlimits"]))	{$balance_trunks_offlimits=$_POST["balance_trunks_offlimits"];}
-if (isset($_GET["dedicated_trunks"]))	{$dedicated_trunks=$_GET["dedicated_trunks"];}
-	elseif (isset($_POST["dedicated_trunks"]))	{$dedicated_trunks=$_POST["dedicated_trunks"];}
-if (isset($_GET["trunk_restriction"]))	{$trunk_restriction=$_GET["trunk_restriction"];}
-	elseif (isset($_POST["trunk_restriction"]))	{$trunk_restriction=$_POST["trunk_restriction"];}
-if (isset($_GET["campaigns"]))	{$campaigns=$_GET["campaigns"];}
-	elseif (isset($_POST["campaigns"]))	{$campaigns=$_POST["campaigns"];}
-
-
-
-
-	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 ###
-$adaptive_dropped_percentage = ereg_replace("[^0-9]","",$adaptive_dropped_percentage);
-$adaptive_latest_server_time = ereg_replace("[^0-9]","",$adaptive_latest_server_time);
-$admin_hangup_enabled = ereg_replace("[^0-9]","",$admin_hangup_enabled);
-$admin_hijack_enabled = ereg_replace("[^0-9]","",$admin_hijack_enabled);
-$admin_monitor_enabled = ereg_replace("[^0-9]","",$admin_monitor_enabled);
-$AFLogging_enabled = ereg_replace("[^0-9]","",$AFLogging_enabled);
-$agent_choose_ingroups = ereg_replace("[^0-9]","",$agent_choose_ingroups);
-$agentcall_manual = ereg_replace("[^0-9]","",$agentcall_manual);
-$agentonly_callbacks = ereg_replace("[^0-9]","",$agentonly_callbacks);
-$AGI_call_logging_enabled = ereg_replace("[^0-9]","",$AGI_call_logging_enabled);
-$allcalls_delay = ereg_replace("[^0-9]","",$allcalls_delay);
-$alter_agent_interface_options = ereg_replace("[^0-9]","",$alter_agent_interface_options);
-$am_message_exten = ereg_replace("[^0-9]","",$am_message_exten);
-$answer_transfer_agent = ereg_replace("[^0-9]","",$answer_transfer_agent);
-$ast_admin_access = ereg_replace("[^0-9]","",$ast_admin_access);
-$ast_delete_phones = ereg_replace("[^0-9]","",$ast_delete_phones);
-$attempt_delay = ereg_replace("[^0-9]","",$attempt_delay);
-$attempt_maximum = ereg_replace("[^0-9]","",$attempt_maximum);
-$auto_dial_next_number = ereg_replace("[^0-9]","",$auto_dial_next_number);
-$balance_trunks_offlimits = ereg_replace("[^0-9]","",$balance_trunks_offlimits);
-$call_parking_enabled = ereg_replace("[^0-9]","",$call_parking_enabled);
-$CallerID_popup_enabled = ereg_replace("[^0-9]","",$CallerID_popup_enabled);
-$campaign_detail = ereg_replace("[^0-9]","",$campaign_detail);
-$campaign_rec_exten = ereg_replace("[^0-9]","",$campaign_rec_exten);
-$campaign_vdad_exten = ereg_replace("[^0-9]","",$campaign_vdad_exten);
-$change_agent_campaign = ereg_replace("[^0-9]","",$change_agent_campaign);
-$closer_default_blended = ereg_replace("[^0-9]","",$closer_default_blended);
-$conf_exten = ereg_replace("[^0-9]","",$conf_exten);
-$conf_on_extension = ereg_replace("[^0-9]","",$conf_on_extension);
-$conferencing_enabled = ereg_replace("[^0-9]","",$conferencing_enabled);
-$ct_default_start = ereg_replace("[^0-9]","",$ct_default_start);
-$ct_default_stop = ereg_replace("[^0-9]","",$ct_default_stop);
-$ct_friday_start = ereg_replace("[^0-9]","",$ct_friday_start);
-$ct_friday_stop = ereg_replace("[^0-9]","",$ct_friday_stop);
-$ct_monday_start = ereg_replace("[^0-9]","",$ct_monday_start);
-$ct_monday_stop = ereg_replace("[^0-9]","",$ct_monday_stop);
-$ct_saturday_start = ereg_replace("[^0-9]","",$ct_saturday_start);
-$ct_saturday_stop = ereg_replace("[^0-9]","",$ct_saturday_stop);
-$ct_sunday_start = ereg_replace("[^0-9]","",$ct_sunday_start);
-$ct_sunday_stop = ereg_replace("[^0-9]","",$ct_sunday_stop);
-$ct_thursday_start = ereg_replace("[^0-9]","",$ct_thursday_start);
-$ct_thursday_stop = ereg_replace("[^0-9]","",$ct_thursday_stop);
-$ct_tuesday_start = ereg_replace("[^0-9]","",$ct_tuesday_start);
-$ct_tuesday_stop = ereg_replace("[^0-9]","",$ct_tuesday_stop);
-$ct_wednesday_start = ereg_replace("[^0-9]","",$ct_wednesday_start);
-$ct_wednesday_stop = ereg_replace("[^0-9]","",$ct_wednesday_stop);
-$DBX_port = ereg_replace("[^0-9]","",$DBX_port);
-$DBY_port = ereg_replace("[^0-9]","",$DBY_port);
-$dedicated_trunks = ereg_replace("[^0-9]","",$dedicated_trunks);
-$delete_call_times = ereg_replace("[^0-9]","",$delete_call_times);
-$delete_campaigns = ereg_replace("[^0-9]","",$delete_campaigns);
-$delete_filters = ereg_replace("[^0-9]","",$delete_filters);
-$delete_ingroups = ereg_replace("[^0-9]","",$delete_ingroups);
-$delete_lists = ereg_replace("[^0-9]","",$delete_lists);
-$delete_remote_agents = ereg_replace("[^0-9]","",$delete_remote_agents);
-$delete_scripts = ereg_replace("[^0-9]","",$delete_scripts);
-$delete_user_groups = ereg_replace("[^0-9]","",$delete_user_groups);
-$delete_users = ereg_replace("[^0-9]","",$delete_users);
-$dial_timeout = ereg_replace("[^0-9]","",$dial_timeout);
-$dialplan_number = ereg_replace("[^0-9]","",$dialplan_number);
-$drop_call_seconds = ereg_replace("[^0-9]","",$drop_call_seconds);
-$drop_exten = ereg_replace("[^0-9]","",$drop_exten);
-$enable_fast_refresh = ereg_replace("[^0-9]","",$enable_fast_refresh);
-$enable_persistant_mysql = ereg_replace("[^0-9]","",$enable_persistant_mysql);
-$fast_refresh_rate = ereg_replace("[^0-9]","",$fast_refresh_rate);
-$hopper_level = ereg_replace("[^0-9]","",$hopper_level);
-$hotkey = ereg_replace("[^0-9]","",$hotkey);
-$hotkeys_active = ereg_replace("[^0-9]","",$hotkeys_active);
-$list_id = ereg_replace("[^0-9]","",$list_id);
-$load_leads = ereg_replace("[^0-9]","",$delete_call_times);
-$max_vicidial_trunks = ereg_replace("[^0-9]","",$max_vicidial_trunks);
-$modify_call_times = ereg_replace("[^0-9]","",$modify_call_times);
-$modify_leads = ereg_replace("[^0-9]","",$modify_leads);
-$monitor_prefix = ereg_replace("[^0-9]","",$monitor_prefix);
-$number_of_lines = ereg_replace("[^0-9]","",$number_of_lines);
-$old_conf_exten = ereg_replace("[^0-9]","",$old_conf_exten);
-$outbound_cid = ereg_replace("[^0-9]","",$outbound_cid);
-$park_ext = ereg_replace("[^0-9]","",$park_ext);
-$park_on_extension = ereg_replace("[^0-9]","",$park_on_extension);
-$phone_number = ereg_replace("[^0-9]","",$phone_number);
-$QUEUE_ACTION_enabled = ereg_replace("[^0-9]","",$QUEUE_ACTION_enabled);
-$recording_exten = ereg_replace("[^0-9]","",$recording_exten);
-$remote_agent_id = ereg_replace("[^0-9]","",$remote_agent_id);
-$safe_harbor_exten = ereg_replace("[^0-9]","",$safe_harbor_exten);
-$telnet_port = ereg_replace("[^0-9]","",$telnet_port);
-$updater_check_enabled = ereg_replace("[^0-9]","",$updater_check_enabled);
-$user_level = ereg_replace("[^0-9]","",$user_level);
-$user_start = ereg_replace("[^0-9]","",$user_start);
-$user_switching_enabled = ereg_replace("[^0-9]","",$user_switching_enabled);
-$VDstop_rec_after_each_call = ereg_replace("[^0-9]","",$VDstop_rec_after_each_call);
-$VICIDIAL_park_on_extension = ereg_replace("[^0-9]","",$VICIDIAL_park_on_extension);
-$vicidial_recording = ereg_replace("[^0-9]","",$vicidial_recording);
-$vicidial_transfers = ereg_replace("[^0-9]","",$vicidial_transfers);
-$voicemail_button_enabled = ereg_replace("[^0-9]","",$voicemail_button_enabled);
-$voicemail_dump_exten = ereg_replace("[^0-9]","",$voicemail_dump_exten);
-$voicemail_ext = ereg_replace("[^0-9]","",$voicemail_ext);
-$voicemail_exten = ereg_replace("[^0-9]","",$voicemail_exten);
-$voicemail_id = ereg_replace("[^0-9]","",$voicemail_id);
-$wrapup_seconds = ereg_replace("[^0-9]","",$wrapup_seconds);
-
-### 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);
-$omit_phone_code = ereg_replace("[^NY]","",$omit_phone_code);
-$available_only_ratio_tally = ereg_replace("[^NY]","",$available_only_ratio_tally);
-$sys_perf_log = ereg_replace("[^NY]","",$sys_perf_log);
-$vicidial_balance_active = ereg_replace("[^NY]","",$vicidial_balance_active);
-$vd_server_logs = ereg_replace("[^NY]","",$vd_server_logs);
-
-### ALPHA-NUMERIC ONLY ###
-$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);
-$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);
-$adaptive_maximum_level = ereg_replace("[^\.0-9]","",$adaptive_maximum_level);
-$phone_ip = ereg_replace("[^\.0-9]","",$phone_ip);
-$old_server_ip = ereg_replace("[^\.0-9]","",$old_server_ip);
-$computer_ip = ereg_replace("[^\.0-9]","",$computer_ip);
-
-### ALPHA-NUMERIC and spaces and hash and star and comma
-$xferconf_a_dtmf = ereg_replace("[^ \,\*\#0-9a-zA-Z]","",$xferconf_a_dtmf);
-$xferconf_b_dtmf = ereg_replace("[^ \,\*\#0-9a-zA-Z]","",$xferconf_b_dtmf);
-
-### ALPHACAPS-NUMERIC
-$xferconf_a_number = ereg_replace("[^0-9A-Z]","",$xferconf_a_number);
-$xferconf_b_number = ereg_replace("[^0-9A-Z]","",$xferconf_b_number);
-
-### ALPHA-NUMERIC and underscore and dash
-$agi_output = ereg_replace("[^-\_0-9a-zA-Z]","",$agi_output);
-$ASTmgrSECRET = ereg_replace("[^-\_0-9a-zA-Z]","",$ASTmgrSECRET);
-$ASTmgrUSERNAME = ereg_replace("[^-\_0-9a-zA-Z]","",$ASTmgrUSERNAME);
-$ASTmgrUSERNAMElisten = ereg_replace("[^-\_0-9a-zA-Z]","",$ASTmgrUSERNAMElisten);
-$ASTmgrUSERNAMEsend = ereg_replace("[^-\_0-9a-zA-Z]","",$ASTmgrUSERNAMEsend);
-$ASTmgrUSERNAMEupdate = ereg_replace("[^-\_0-9a-zA-Z]","",$ASTmgrUSERNAMEupdate);
-$call_time_id = ereg_replace("[^-\_0-9a-zA-Z]","",$call_time_id);
-$campaign_id = ereg_replace("[^-\_0-9a-zA-Z]","",$campaign_id);
-$CoNfIrM = ereg_replace("[^-\_0-9a-zA-Z]","",$CoNfIrM);
-$DBX_database = ereg_replace("[^-\_0-9a-zA-Z]","",$DBX_database);
-$DBX_pass = ereg_replace("[^-\_0-9a-zA-Z]","",$DBX_pass);
-$DBX_user = ereg_replace("[^-\_0-9a-zA-Z]","",$DBX_user);
-$DBY_database = ereg_replace("[^-\_0-9a-zA-Z]","",$DBY_database);
-$DBY_pass = ereg_replace("[^-\_0-9a-zA-Z]","",$DBY_pass);
-$DBY_user = ereg_replace("[^-\_0-9a-zA-Z]","",$DBY_user);
-$dial_method = ereg_replace("[^-\_0-9a-zA-Z]","",$dial_method);
-$dial_status_a = ereg_replace("[^-\_0-9a-zA-Z]","",$dial_status_a);
-$dial_status_b = ereg_replace("[^-\_0-9a-zA-Z]","",$dial_status_b);
-$dial_status_c = ereg_replace("[^-\_0-9a-zA-Z]","",$dial_status_c);
-$dial_status_d = ereg_replace("[^-\_0-9a-zA-Z]","",$dial_status_d);
-$dial_status_e = ereg_replace("[^-\_0-9a-zA-Z]","",$dial_status_e);
-$ext_context = ereg_replace("[^-\_0-9a-zA-Z]","",$ext_context);
-$group_id = ereg_replace("[^-\_0-9a-zA-Z]","",$group_id);
-$lead_filter_id = ereg_replace("[^-\_0-9a-zA-Z]","",$lead_filter_id);
-$local_call_time = ereg_replace("[^-\_0-9a-zA-Z]","",$local_call_time);
-$login = ereg_replace("[^-\_0-9a-zA-Z]","",$login);
-$login_campaign = ereg_replace("[^-\_0-9a-zA-Z]","",$login_campaign);
-$login_pass = ereg_replace("[^-\_0-9a-zA-Z]","",$login_pass);
-$login_user = ereg_replace("[^-\_0-9a-zA-Z]","",$login_user);
-$next_agent_call = ereg_replace("[^-\_0-9a-zA-Z]","",$next_agent_call);
-$old_campaign_id = ereg_replace("[^-\_0-9a-zA-Z]","",$old_campaign_id);
-$old_server_id = ereg_replace("[^-\_0-9a-zA-Z]","",$old_server_id);
-$OLDuser_group = ereg_replace("[^-\_0-9a-zA-Z]","",$OLDuser_group);
-$park_file_name = ereg_replace("[^-\_0-9a-zA-Z]","",$park_file_name);
-$pass = ereg_replace("[^-\_0-9a-zA-Z]","",$pass);
-$phone_login = ereg_replace("[^-\_0-9a-zA-Z]","",$phone_login);
-$phone_pass = ereg_replace("[^-\_0-9a-zA-Z]","",$phone_pass);
-$PHP_AUTH_PW = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_PW);
-$PHP_AUTH_USER = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_USER);
-$protocol = ereg_replace("[^-\_0-9a-zA-Z]","",$protocol);
-$server_id = ereg_replace("[^-\_0-9a-zA-Z]","",$server_id);
-$stage = ereg_replace("[^-\_0-9a-zA-Z]","",$stage);
-$state_rule = ereg_replace("[^-\_0-9a-zA-Z]","",$state_rule);
-$status = ereg_replace("[^-\_0-9a-zA-Z]","",$status);
-$trunk_restriction = ereg_replace("[^-\_0-9a-zA-Z]","",$trunk_restriction);
-$user = ereg_replace("[^-\_0-9a-zA-Z]","",$user);
-$user_group = ereg_replace("[^-\_0-9a-zA-Z]","",$user_group);
-$VICIDIAL_park_on_filename = ereg_replace("[^-\_0-9a-zA-Z]","",$VICIDIAL_park_on_filename);
-
-### 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
-$adaptive_dl_diff_target = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$adaptive_dl_diff_target);
-$adaptive_intensity = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$adaptive_intensity);
-$asterisk_version = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$asterisk_version);
-$call_time_comments = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$call_time_comments);
-$call_time_name = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$call_time_name);
-$campaign_name = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$campaign_name);
-$campaign_rec_filename = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$campaign_rec_filename);
-$company = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$company);
-$full_name = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$full_name);
-$fullname = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$fullname);
-$group_name = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$group_name);
-$HKstatus = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$HKstatus);
-$lead_filter_comments = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$lead_filter_comments);
-$lead_filter_name = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$lead_filter_name);
-$list_name = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$list_name);
-$local_gmt = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$local_gmt);
-$phone_type = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$phone_type);
-$picture = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$picture);
-$script_comments = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$script_comments);
-$script_name = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$script_name);
-$server_description = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$server_description);
-$status = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$status);
-$status_name = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$status_name);
-$wrapup_message = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$wrapup_message);
-
-### ALPHA-NUMERIC and underscore and dash and slash and at and dot
-$call_out_number_group = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$call_out_number_group);
-$client_browser = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$client_browser);
-$DBX_server = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$DBX_server);
-$DBY_server = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$DBY_server);
-$dtmf_send_extension = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$dtmf_send_extension);
-$extension = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$extension);
-$install_directory = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$install_directory);
-$old_extension = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$old_extension);
-$telnet_host = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$telnet_host);
-
-### remove semi-colons ###
-$lead_filter_sql = ereg_replace(";","",$lead_filter_sql);
-
-### VARIABLES TO BE mysql_real_escape_string ###
-# $web_form_address
-
-### VARIABLES not filtered at all ###
-# $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
-# 60808-1147 - changed filtering for and added instructions for consutative transfers
-# 60816-1552 - added allcalls_delay start delay for recordings in vicidial.php
-# 60817-2226 - fixed bug that would not allow lead recycling of non-selectable statuses
-# 60821-1543 - added option to Omit Phone Code while dialing in vicidial
-# 60821-1625 - added ALLFORCE recording option for campaign_recording
-# 60823-1154 - added fields for adaptive dialing
-# 60824-1326 - added adaptive_latest_target_gmt for ADAPT_TAPERED dial method
-# 60825-1205 - added adaptive_intensity for ADAPT_ dial methods
-# 60828-1019 - changed adaptive_latest_target_gmt to adaptive_latest_server_time
-# 60828-1115 - added adaptive_dl_diff_target and changed intensity dropdown
-# 60927-1246 - added astguiclient/admin.php functions under SERVERS tab
-# 61002-1402 - added fields for vicidial balance trunk controls
-# 61003-1123 - added functions for vicidial_server_trunks records
-# 61109-1022 - added Emergency VDAC Jam Clear function to Campaign Detail screen
-# 61110-1502 - add ability to select NONE in dial statuses, new list_id must not be < 100
-# 61122-1228 - added user group campaign restrictions
-# 61122-1535 - changed script_text to unfiltered and added more variables to SCRIPTS
-# 61129-1028 - Added headers to Users and Phones with clickable order-by titles
-#
-
-# 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 = '2.0.73';
-$build = '61129-1028';
-
-$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];
-			$LOGuser_group				=$row[5];
-			$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];
-			$LOGast_admin_access		=$row[16];
-			$LOGast_delete_phones		=$row[17];
-			$LOGdelete_scripts			=$row[18];
-			$LOGdelete_filters			=$row[29];
-			$LOGalter_agent_interface	=$row[30];
-			$LOGdelete_call_times		=$row[32];
-			$LOGmodify_call_times		=$row[33];
-
-			$stmt="SELECT allowed_campaigns from vicidial_user_groups where user_group='$LOGuser_group';";
-			$rslt=mysql_query($stmt, $link);
-			$row=mysql_fetch_row($rslt);
-			$LOGallowed_campaigns		=$row[0];
-
-		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==11111111111)	{$hh='server';		echo "NUEVO TELÉFONO";}
-if ($ADD==111111111111)	{$hh='server';		echo "NUEVO SERVIDOR";}
-if ($ADD==1111111111111)	{$hh='server';		echo "NUEVA CONFERENCIA";}
-if ($ADD==11111111111111)	{$hh='server';		echo "ADD NEW VICIDIAL CONFERENCE";}
-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==21111111111)	{$hh='server';		echo "CREANDO TELÉFONO";}
-if ($ADD==211111111111)	{$hh='server';		echo "CREANDO SERVIDOR";}
-if ($ADD==221111111111)	{$hh='server';		echo "ADICIÓN DEL NUEVO EXPEDIENTE DEL TRONCO DEL SERVIDOR VICIDIAL";}
-if ($ADD==2111111111111)	{$hh='server';		echo "CREANDO CONFERENCIA";}
-if ($ADD==21111111111111)	{$hh='server';		echo "ADDING NEW VICIDIAL CONFERENCE";}
-if ($ADD==3)			{$hh='users';		echo "Modificar Usuario";}
-if ($ADD==30)			{$hh='campaigns';	echo "Campaña No permitida";}
-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==31111111111)	{$hh='server';		echo "MODIFICAR EL TELÉFONO";}
-if ($ADD==311111111111)	{$hh='server';		echo "MODIFICAR EL SERVIDOR";}
-if ($ADD==3111111111111)	{$hh='server';		echo "MODIFICAR LA CONFERENCIA";}
-if ($ADD==31111111111111)	{$hh='server';		echo "MODIFY VICIDIAL CONFERENCE";}
-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==41111111111)	{$hh='server';		echo "MODIFICAR EL TELÉFONO";}
-if ($ADD==411111111111)	{$hh='server';		echo "MODIFICAR EL SERVIDOR";}
-if ($ADD==421111111111)	{$hh='server';		echo "MODIFIQUE EL EXPEDIENTE DEL TRONCO DEL SERVIDOR VICIDIAL";}
-if ($ADD==4111111111111)	{$hh='server';		echo "MODIFICAR LA CONFERENCIA";}
-if ($ADD==41111111111111)	{$hh='server';		echo "MODIFY VICIDIAL CONFERENCE";}
-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==53)			{$hh='campaigns';	echo "Claro Del Atasco De la Emergencia VDAC";}
-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==51111111111)	{$hh='server';		echo "DELETE PHONE";}
-if ($ADD==511111111111)	{$hh='server';		echo "DELETE SERVER";}
-if ($ADD==5111111111111)	{$hh='server';		echo "DELETE CONFERENCE";}
-if ($ADD==51111111111111)	{$hh='server';		echo "DELETE VICIDIAL CONFERENCE";}
-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==63)			{$hh='campaigns';	echo "Claro Del Atasco De la Emergencia VDAC";}
-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==61111111111)	{$hh='server';		echo "DELETE PHONE";}
-if ($ADD==611111111111)	{$hh='server';		echo "DELETE SERVER";}
-if ($ADD==621111111111)	{$hh='server';		echo "EXPEDIENTE DEL TRONCO DEL SERVIDOR VICIDIAL DE LA CANCELACIÓN";}
-if ($ADD==6111111111111)	{$hh='server';		echo "DELETE CONFERENCE";}
-if ($ADD==61111111111111)	{$hh='server';		echo "DELETE VICIDIAL CONFERENCE";}
-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==10000000000)	{$hh='server';		echo "LISTA DE TELÉFONOS";}
-if ($ADD==100000000000)	{$hh='server';		echo "LISTA DE SERVIDORES";}
-if ($ADD==1000000000000)	{$hh='server';		echo "LISTA DE  CONFERENCIAS";}
-if ($ADD==10000000000000)	{$hh='server';		echo "VICIDIAL LISTA DE  CONFERENCIAS";}
-if ($ADD==55)			{$hh='users';		echo "Formulario De Búsqueda";}
-if ($ADD==551)			{$hh='users';		echo "BUSCAR TELÉFONOS";}
-if ($ADD==66)			{$hh='users';		echo "RESULTADOS DE LA BÚSQUEDA";}
-if ($ADD==661)			{$hh='users';		echo "RESULTADO DE LA BÚSQUEDA DE TELÉFONOS";}
-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") or (strlen($ADD)==12) )
-	{
-	##### 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++;
-		}
-
-	##### BEGIN 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 .= " -";}
-	}
-	##### END get inbound groups listing for checkboxes #####
-
-
-	##### BEGIN get campaigns listing for checkboxes #####
-	if ( ($ADD==211111) or ($ADD==311111) or ($ADD==411111) or ($ADD==511111) or ($ADD==611111) )
-	{
-		if ( ($ADD==211111) or ($ADD==311111) or ($ADD==511111) or ($ADD==611111) )
-		{
-		$stmt="SELECT allowed_campaigns from vicidial_user_groups where user_group='$user_group';";
-		$rslt=mysql_query($stmt, $link);
-		$row=mysql_fetch_row($rslt);
-		$allowed_campaigns =	$row[0];
-		$allowed_campaigns = preg_replace("/ -$/","",$allowed_campaigns);
-		$campaigns = explode(" ", $allowed_campaigns);
-		echo "<!--  $allowed_campaigns -->";
-		}
-
-	$campaigns_value='';
-	$campaigns_list='<B><input type="checkbox" name="campaigns[]" value="-ALL-CAMPAIGNS-"';
-		$p=0;
-		while ($p<100)
-			{
-			if (eregi('ALL-CAMPAIGNS',$campaigns[$p])) 
-				{
-				$campaigns_list.=" CHECKED";
-				$campaigns_value .= " -ALL-CAMPAIGNS- -";
-				}
-			$p++;
-			}
-	$campaigns_list.="> ALL-CAMPAIGNS - LOS USUARIOS PUEDEN VISIÓN CUALQUIER CAMPAÑA</B><BR>\n";
-
-	$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);
-
-	$o=0;
-	while ($campaigns_to_print > $o)
-		{
-		$rowx=mysql_fetch_row($rslt);
-		$campaign_id_value = $rowx[0];
-		$campaign_name_value = $rowx[1];
-		$campaigns_list .= "<input type=\"checkbox\" name=\"campaigns[]\" value=\"$campaign_id_value\"";
-		$p=0;
-		while ($p<100)
-			{
-			if ($campaign_id_value == $campaigns[$p]) 
-				{
-			#	echo "<!--  X $p|$campaign_id_value|$campaigns[$p]| -->";
-				$campaigns_list .= " CHECKED";
-				$campaigns_value .= " $campaign_id_value";
-				}
-		#	echo "<!--  O $p|$campaign_id_value|$campaigns[$p]| -->";
-			$p++;
-			}
-		$campaigns_list .= "> $campaign_id_value - $campaign_name_value<BR>\n";
-		$o++;
-		}
-	if (strlen($campaigns_value)>2) {$campaigns_value .= " -";}
-	}
-	##### END get campaigns listing for checkboxes #####
-
-
-	if ( (strlen($ADD)==11) or (strlen($ADD)>12) )
-	{
-	##### 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++;
-		}
-	}
-
-
-
-$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_CAMPAIGNS 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. - -
-
-
-Método del dial - Este campo es la manera de definir cómo el marcar debe ocurrir. Si el MANUAL entonces el auto_dial_level es bloqueado en 0 a menos que se cambie el método del dial. Si COCIENTE entonces el normal marcando un número de líneas para los agentes activos. ADAPT_HARD_LIMIT marcará predictively hasta el porcentaje caído y después no permitirá marcar agresivo una vez que se alcance el límite de la gota hasta que va el porcentaje abajo otra vez. ADAPT_TAPERED permite para el excedente de funcionamiento el porcentaje caído por la mitad primer de la cambio - según lo definido por el call_time seleccionado para la campaña y consigue más terminante mientras que se enciende la cambio. ADAPT_AVERAGE intenta mantener un promedio o el porcentaje caído que no impone límites duros tan agresivamente como los otros dos métodos. Usted no puede cambiar el nivel auto del dial si usted está en cualesquiera de los métodos del dial del ADAPTAR. Solamente el sintonizador puede cambiar el nivel del dial cuando en modo que marca profético. - -
-
-
-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. - -
-
-
-Solamente cuenta disponible - este campo si el sistema a Y deja haciafuera los agentes del estado de INCALL y de la COLETA al calcular elnúmero de llamadas al dial cuando no en modo de dial MANUAL. Eldefecto es N. - -
-
-
-Límite del porcentaje de la gota - este campo es donde usted fijó ellímite del porcentaje de llamadas caídas que usted quisiera mientrasque usaba un método adaptante-profe'tico del dial, NO MANUAL o delCOCIENTE. - -
-
-
-El máximo adapta el dial llano - este campo es donde usted fijó ellímite del límite al numbr de líneas que usted quisiera marcado poragente mientras que usaba un método adaptante-profe'tico del dial, NOMANUAL o del COCIENTE. Este número puede ser más alto que el nivelauto del dial si su hardware lo apoya. El valor debe ser un númeropositivo mayor de uno y puede tener defecto 3.0 de los lugaresdecimales. - -
-
-
-El tiempo más último del servidor - este campo es utilizadosolamente por el método del dial de ADAPT_TAPERED. Usted debe entraren la hora y el minuto que usted parará el invitar de esta campaña,2100 significaría que usted parará el marcar de esta campaña en eltiempo del servidor de los 9PM. Esto permite que el algoritmo afiladodecida a cómo agresivamente al dial cerca cuánto tiempo usted tienehasta que usted será el llamar acabado. - -
-
-
-Adapte el modificante de la intensidad - este campo se utiliza paraajustar la intensidad profética más alta o más baja. El más altoun número positivo que usted selecciona, mayor va el sintonizadoraumentará la llamada que establece el paso cuando para arriba y máslentamente va el sintonizador disminuirá la llamada que establece elpaso cuando abajo. Cuanto más bajo es el número negativo que ustedseleccionan aquí, más lentamente el sintonizador aumentará lallamada que establece el paso y más rápidamente el sintonizadorbajará la llamada que establece el paso cuando va abajo. El defectoes 0. Este campo no es utilizado por los métodos del dial del MANUALo del COCIENTE. - -
-
-
-Blanco llana de la diferencia del dial - este campo se utiliza paradefinir si usted desea apuntar tener un número específico de losagentes que esperan agentes de las llamadas o el esperar de llamadas.Por ejemplo si usted siempre quisiera tener en agente del promedio unolibre tomar llamadas inmediatamente usted fijaría esto a -1, si ustedquisiera apuntar siempre tener uno invita el asimiento que espera unagente que usted fijaría esto a 1. El defecto es 0. Este campo no esutilizado por los métodos del dial del MANUAL o del COCIENTE. - -
-
-
-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. - -
-
-
-Omita el código del teléfono - este campo permite que usted dejehacia fuera el campo del phone_code mientras que marca dentro deVICIDIAL. Por ejemplo si usted está marcando en el Reino Unido delReino Unido usted tendría 44 adentro como su campo del phone_codepara todos los plomos, pero usted apenas desea marcar 10 dígitos ensu extensions.conf dialplan para poner llamadas en vez de 44 entonces10 dígitos. El defecto es N. - -
-
-
-Campaña CallerID - este campo permite enviar de un número de encargo del callerid en las llamadas de salida. Úste es el número que demostraría para arriba en el callerid de la persona que usted está llamando. El defecto es DESCONOCIDO. Esta opción está solamente disponible si usted está utilizando PRIs - ISDN T1 o E1 - que tienen la característica de encargo del callerid se giraron. Esta característica puede también trabajar con los troncos IAX2 dependiendo de lo que admite su abastecedor. El callerID de encargo se aplica solamente a las llamadas puestas para la campaña de VICIDIAL directamente, cualquier tercer persona llama o las transferencias no enviarán el callerID de encargo. NOTA: A veces el poner DESCONOCIDO o PRIVADO en el campo rendirá enviar de su número del callerID del defecto por su portador con las llamadas. Usted puede desear probar esto y poner 0000000000 en el campo del callerid en lugar de otro si usted no desea enviarle 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. NUNCAinhabilitará la grabación en el cliente. ONDEMAND es el defecto ypermite que el agente comience y pare a registrar según lonecesitado. ALLCALLS comenzará la grabación en el cliente siempreque una llamada se envíe a un agente. ALLFORCE comenzará lagrabación en el cliente siempre que una llamada se envíe a un agenteque no da al agente ninguna opción para parar el registrar. ParaALLCALLS y ALLFORCE hay una opción para utilizar la grabaciónretrasa para reducir en grabaciones y carga de sistema muy cortas delrecude. - -
-
-
-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. - -
-
-
-La registración retrasa - para la grabación de ALLCALLS y deALLFORCE solamente. Esta voluntad del ajuste retrasa comenzar de lagrabación en todas las llamadas para el número de los segundosespecificados en este campo. El defecto es 0. - -
-
-
-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. Si usted desea permitir transferencias consultivas, un fronter a unmás cercano, usted puede colocar CXFER pues uno de lasprecolocaciones del nu'mero-a-dial y del dialstring apropiado seráenviado para hacer una transferencia consultiva local, entonces lalata LEAVE-3WAY-CALL justo del agente y movimiento encendido a sullamada siguiente. Si usted desea permitir transferencias ocultas declientes a una escritura de VICIDIAL AGI para registrar o un IVR,entonces coloque AXFER en el campo del nu'mero-a-dial. Usted puedetambién especificar una extensión de encargo después del AXFER odel CXFER, por ejemplo si usted desea hacer transferencias consultivasinternas en vez de local que usted pondría CXFER90009 en el campo delnu'mero-a-dial. - -
-
-
-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. Must be a number greater than 100. - -
-
-
-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. Si usted desea permitir transferencias consultivas, un fronter a unmás cercano, usted puede colocar CXFER pues uno de lasprecolocaciones del nu'mero-a-dial y del dialstring apropiado seráenviado para hacer una transferencia consultiva local, entonces lalata LEAVE-3WAY-CALL justo del agente y movimiento encendido a sullamada siguiente. Si usted desea permitir transferencias ocultas declientes a una escritura de VICIDIAL AGI para registrar o un IVR,entonces coloque AXFER en el campo del nu'mero-a-dial. Usted puedetambién especificar una extensión de encargo después del AXFER odel CXFER, por ejemplo si usted desea hacer transferencias consultivasinternas en vez de local que usted pondría CXFER90009 en el campo delnu'mero-a-dial. - -
-
-
-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. - -
-
-
-Campañas permitidas - ésta es una lista seleccionable de lascampañas a las cuales los miembros de este grupo de usuario puedenabrirse una sesión. La opción de ALL-CAMPAIGNS permite que losusuarios en este grupo consideren y se abran una sesión a cualquiercampaña en el sistema. - - - - - -



- -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, lead_id, campaign, phone_login, group, channel_group, SQLdate, epoch, uniqueid, customer_zap_channel, server_ip, SIPexten, session_id. 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?

You can also use an iframe to load a separate window within the SCRIPT tab, here is an example with prepopulated variables: - -
-<iframe src="http://astguiclient.sf.net/test_VICIDIAL_output.php?lead_id=--A--lead_id--B--&vendor_id=--A--vendor_lead_code--B--&list_id=--A--list_id--B--&gmt_offset_now=--A--gmt_offset_now--B--&phone_code=--A--phone_code--B--&phone_number=--A--phone_number--B--&title=--A--title--B--&first_name=--A--first_name--B--&middle_initial=--A--middle_initial--B--&last_name=--A--last_name--B--&address1=--A--address1--B--&address2=--A--address2--B--&address3=--A--address3--B--&city=--A--city--B--&state=--A--state--B--&province=--A--province--B--&postal_code=--A--postal_code--B--&country_code=--A--country_code--B--&gender=--A--gender--B--&date_of_birth=--A--date_of_birth--B--&alt_phone=--A--alt_phone--B--&email=--A--email--B--&security_phrase=--A--security_phrase--B--&comments=--A--comments--B--&user=--A--user--B--&campaign=--A--campaign--B--&phone_login=--A--phone_login--B--&fronter=--A--fronter--B--&closer=--A--user--B--&group=--A--group--B--&channel_group=--A--group--B--&SQLdate=--A--SQLdate--B--&epoch=--A--epoch--B--&uniqueid=--A--uniqueid--B--&customer_zap_channel=--A--customer_zap_channel--B--&server_ip=--A--server_ip--B--&SIPexten=--A--SIPexten--B--&session_id=--A--session_id--B--&phone=--A--phone--B--" style="width:580;height:290;background-color:transparent;" scrolling="auto" frameborder="0" allowtransparency="true" id="popupFrame" name="popupFrame" width="460" height="290"> -</iframe> -
- -
-
-
-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 -
- -
NOTES: The Excel Lead loader functionality is enabled by a series of perl scripts and needs to have a properly configured /etc/astguiclient.conf 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. - - - - -



- - - - - - -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' - -
-
-
-Funcionamiento del sistema - fijar esta opción a Y permitirá laregistración del stats del funcionamiento del sistema para lamáquina del servidor incluyendo carga de sistema, procesos delsistema y canales del asterisco en uso. El defecto es N. - -
-
-
-Registros del servidor - fijar esta opción a Y permitirá laregistración de todas las escrituras relacionadas VICIDIAL a susficheros de diario del texto. Fijar esto a N parará registros de laescritura a los archivos para estos procesos, también laregistración de la pantalla del asterisco será lisiado si esto sefija a N cuando se comienza el asterisco. El defecto es Y. - -
-
-
-AGI hecho salir - fijar esta opción a NINGUNOS inhabilitará salidade todas las escrituras relacionadas VICIDIAL de AGI. Fijar esto aSTDERR enviará el AGI hecho salir al asterisco CLI. Fijar esto alARCHIVO enviará la salida a un archivo en el directorio de losregistros. Fijar esto a AMBOS enviará salida al asterisco CLI y a unfichero de diario. El defecto es ARCHIVO. - -
-
-
-El marcar del balance de VICIDIAL - fijar este campo a Y permitiráque el servidor ponga las llamadas del balance para las campañas enVICIDIAL para poder resolver el nivel definido del dial incluso si nohay agentes registrados en esa campaña en este servidor. El defectoes N. - -
-
-
-Balance Offlimits de VICIDIAL - este ajuste define el número detroncos para no permitir el balance de VICIDIAL que marca parautilizar. Por ejemplo si usted tiene 40 troncos y offlimits vicidialmáximos del balance se fijan a 10 que usted podrá solamenteutilizar 30 líneas interurbanas para marcar del balance de VICIDIAL.El defecto es 0. - - -



- -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. - - - - -



- -VICIDIAL_SERVER_TRUNKS TABLA

-
-
-Los troncos del servidor de VICIDIAL permiten que usted restrinja laslíneas salientes que se utilizan en este servidor para la campañaque marca sobre una base de la por-campaña. Usted tiene la opciónpara reservar un número de las líneas específico que se utilizaránpor solamente una campaña así como permitir que esa campañafuncione sobre sus líneas reservadas en cualesquiera líneas siguensiendo abiertas, según lo en las líneas totales usadas por vicidialen este servidor es de largo menos que fijar de los troncos delmáximo VICIDIAL. No tener cualesquiera de estos expedientespermitirá la campaña que marca la línea primero para tener tantaslíneas mientras que puede conseguir bajo fijar de los troncos delmáximo VICIDIAL. - - -







-







-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 = 'VENDOR:LEAD;CODE'; - $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'; - $RGlead_id = '1234'; - $RGcampaign = 'TESTCAMP'; - $RGphone_login = 'gs102'; - $RGgroup = 'TESTCAMP'; - $RGchannel_group = 'TESTCAMP'; - $RGSQLdate = date("Y-m-d H:i:s"); - $RGepoch = date("U"); - $RGuniqueid = '1163095830.4136'; - $RGcustomer_zap_channel = 'Zap/1-1'; - $RGserver_ip = '10.10.10.15'; - $RGSIPexten = 'SIP/gs102'; - $RGsession_id = '8600051'; - -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]; - -if (eregi("iframe src",$script_text)) - { - $vendor_lead_code = eregi_replace(' ','+',$vendor_lead_code); - $list_id = eregi_replace(' ','+',$list_id); - $gmt_offset_now = eregi_replace(' ','+',$gmt_offset_now); - $phone_code = eregi_replace(' ','+',$phone_code); - $phone_number = eregi_replace(' ','+',$phone_number); - $title = eregi_replace(' ','+',$title); - $first_name = eregi_replace(' ','+',$first_name); - $middle_initial = eregi_replace(' ','+',$middle_initial); - $last_name = eregi_replace(' ','+',$last_name); - $address1 = eregi_replace(' ','+',$address1); - $address2 = eregi_replace(' ','+',$address2); - $address3 = eregi_replace(' ','+',$address2); - $city = eregi_replace(' ','+',$city); - $state = eregi_replace(' ','+',$state); - $province = eregi_replace(' ','+',$province); - $postal_code = eregi_replace(' ','+',$postal_code); - $country_code = eregi_replace(' ','+',$country_code); - $gender = eregi_replace(' ','+',$gender); - $date_of_birth = eregi_replace(' ','+',$date_of_birth); - $alt_phone = eregi_replace(' ','+',$alt_phone); - $email = eregi_replace(' ','+',$email); - $security_phrase = eregi_replace(' ','+',$security_phrase); - $comments = eregi_replace(' ','+',$comments); - $RGfullname = eregi_replace(' ','+',$RGfullname); - $RGuser = eregi_replace(' ','+',$RGuser); - $RGlead_id = eregi_replace(' ','+',$RGlead_id); - $RGcampaign = eregi_replace(' ','+',$RGcampaign); - $RGphone_login = eregi_replace(' ','+',$RGphone_login); - $RGgroup = eregi_replace(' ','+',$RGgroup); - $RGchannel_group = eregi_replace(' ','+',$RGchannel_group); - $RGSQLdate = eregi_replace(' ','+',$RGSQLdate); - $RGepoch = eregi_replace(' ','+',$RGepoch); - $RGuniqueid = eregi_replace(' ','+',$RGuniqueid); - $RGcustomer_zap_channel = eregi_replace(' ','+',$RGcustomer_zap_channel); - $RGserver_ip = eregi_replace(' ','+',$RGserver_ip); - $RGSIPexten = eregi_replace(' ','+',$RGSIPexten); - $RGsession_id = eregi_replace(' ','+',$RGsession_id); - } - -$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--fronter--B--',"$RGuser",$script_text); -$script_text = eregi_replace('--A--user--B--',"$RGuser",$script_text); -$script_text = eregi_replace('--A--lead_id--B--',"$RGlead_id",$script_text); -$script_text = eregi_replace('--A--campaign--B--',"$RGcampaign",$script_text); -$script_text = eregi_replace('--A--phone_login--B--',"$RGphone_login",$script_text); -$script_text = eregi_replace('--A--group--B--',"$RGgroup",$script_text); -$script_text = eregi_replace('--A--channel_group--B--',"$RGchannel_group",$script_text); -$script_text = eregi_replace('--A--SQLdate--B--',"$RGSQLdate",$script_text); -$script_text = eregi_replace('--A--epoch--B--',"$RGepoch",$script_text); -$script_text = eregi_replace('--A--uniqueid--B--',"$RGuniqueid",$script_text); -$script_text = eregi_replace('--A--customer_zap_channel--B--',"$RGcustomer_zap_channel",$script_text); -$script_text = eregi_replace('--A--server_ip--B--',"$RGserver_ip",$script_text); -$script_text = eregi_replace('--A--SIPexten--B--',"$RGSIPexten",$script_text); -$script_text = eregi_replace('--A--session_id--B--',"$RGsession_id",$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';} -if ($hh=='server') {$server_hh='bgcolor ="#FF99FF"'; $server_fc='BLACK';} # pink - else {$server_hh=''; $server_fc='WHITE';} - -?> - - - - -\n"; -echo "
English Español
- - - - - - - - - - - - - - - - - 1) { - ?> - - 1) { - ?> - - 1) { - ?> - - 1) { - ?> - - 1) { - ?> - - 1) { - ?> - - 1) { - ?> - - 1) { - ?> - - 1) { - ?> - - 1) { - ?> - -\n"; - echo "Le no autorizan a visión esta página. Vaya por favor detrás.\n"; - } - -} -if (strlen($reports_hh) > 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 > SIZE=1> PHONES > INFORMES
  MOSTRAR USUARIOS     |     NUEVO USUARIO     |     BUSCAR UN USUARIO
  NUEVA CAMPAÑA     |     MOSTRAR CAMPAÑAS     |     REALTIME CAMPAÑAS SUMMARY
  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
  PHONES   |   ADD PHONE   |   SERVERS   |   ADD SERVER   |   CONFERENCES   |   ADD CONFERENCE   |   VD CONFERENCES   |   ADD VD CONFERENCE
 
-
\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"; -} - - -###################### -# ADD=11111111111 display the ADD NEW PHONE SCREEN -###################### - -if ($ADD==11111111111) -{ -echo "
\n"; -echo ""; - -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=111111111111 display the ADD NEW SERVER SCREEN -###################### - -if ($ADD==111111111111) -{ -echo "
\n"; -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=1111111111111 display the ADD NEW CONFERENCE SCREEN -###################### - -if ($ADD==1111111111111) -{ -echo "
\n"; -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=11111111111111 display the ADD NEW VICIDIAL CONFERENCE SCREEN -###################### - -if ($ADD==11111111111111) -{ -echo "
\n"; -echo ""; - -echo "
ADD A NEW VICIDIAL CONFERENCE\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"; -} - - - -###################################################################################################### -###################################################################################################### -####### 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 ($list_id < 100) 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"; - echo "
ID De la Lista must be greater than 100\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(user_group,group_name,allowed_campaigns) values('$user_group','$group_name','-ALL-CAMPAIGNS-');"; - $rslt=mysql_query($stmt, $link); - - echo "
GRUPO DE USUARIO AÑADIDO: $user_group\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|$stmt|\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','$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; -} - - -###################### -# ADD=21111111111 adds new phone to the system -###################### - -if ($ADD==21111111111) -{ -echo "
\n"; - 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=31111111111; -} - - -###################### -# ADD=211111111111 adds new server to the system -###################### - -if ($ADD==211111111111) -{ -echo "
\n"; - 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=311111111111; -} - - -###################### -# ADD=221111111111 adds the new vicidial server trunk record to the system -###################### - -if ($ADD==221111111111) -{ - echo ""; - $stmt="SELECT max_vicidial_trunks from servers where server_ip='$server_ip';"; - $rslt=mysql_query($stmt, $link); - $rowx=mysql_fetch_row($rslt); - $MAXvicidial_trunks = $rowx[0]; - - $stmt="SELECT sum(dedicated_trunks) from vicidial_server_trunks where server_ip='$server_ip' and campaign_id !='$campaign_id';"; - $rslt=mysql_query($stmt, $link); - $rowx=mysql_fetch_row($rslt); - $SUMvicidial_trunks = ($rowx[0] + $dedicated_trunks); - - if ($SUMvicidial_trunks > $MAXvicidial_trunks) - { - echo "
EXPEDIENTE DEL TRONCO DEL SERVIDOR DE VICIDIAL NO AGREGADO - el número de troncos vicidial es demasiado alto: $SUMvicidial_trunks / $MAXvicidial_trunks\n"; - } - else - { - $stmt="SELECT count(*) from vicidial_server_trunks where campaign_id='$campaign_id' and server_ip='$server_ip';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0] > 0) - {echo "
EXPEDIENTE DEL TRONCO DEL SERVIDOR DE VICIDIAL NO AGREGADO - hay ya un expediente del servidor-tronco para esta campaña\n";} - else - { - if ( (strlen($campaign_id) < 2) or (strlen($server_ip) < 7) or (strlen($dedicated_trunks) < 1) or (strlen($trunk_restriction) < 1) ) - { - echo "
EXPEDIENTE DEL TRONCO DEL SERVIDOR DE VICIDIAL NO AGREGADO - Vaya por favor detrás y mire los datos que usted incorporó\n"; - echo "
la campaña debe estar entre 3 y 8 caracteres en longitud\n"; - echo "
el server_ip retrasa debe ser por lo menos 7 caracteres\n"; - echo "
los troncos deben ser un dígito a partir de la 0 a 9999\n"; - } - else - { - echo "
EL EXPEDIENTE DEL TRONCO DEL SERVIDOR DE VICIDIAL AGREGÓ: $campaign_id - $server_ip - $dedicated_trunks - $trunk_restriction\n"; - - $stmt="INSERT INTO vicidial_server_trunks(server_ip,campaign_id,dedicated_trunks,trunk_restriction) values('$server_ip','$campaign_id','$dedicated_trunks','$trunk_restriction');"; - $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 VICIDIAL TRUNK |$PHP_AUTH_USER|$ip|$stmt|\n"); - fclose($fp); - } - } - } - } -$ADD=311111111111; -} - - -###################### -# ADD=2111111111111 adds new conference to the system -###################### - -if ($ADD==2111111111111) -{ -echo "
\n"; - 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=3111111111111; -} - - -###################### -# ADD=21111111111111 adds new vicidial conference to the system -###################### - -if ($ADD==21111111111111) -{ -echo "
\n"; - echo ""; - $stmt="SELECT count(*) from vicidial_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 "
VICIDIAL CONFERENCE NOT ADDED - there is already a vicidial conference in the system with this ID and server\n";} - else - { - if ( (strlen($conf_exten) < 1) or (strlen($server_ip) < 7) ) - {echo "
VICIDIAL CONFERENCIA NO AGREGADA - vaya por favor detrás y mire los datos que usted incorporó\n";} - else - { - echo "
VICIDIAL LA CONFERENCIA AGREGÚ\n"; - - $stmt="INSERT INTO vicidial_conferences (conf_exten,server_ip) values('$conf_exten','$server_ip');"; - $rslt=mysql_query($stmt, $link); - } - } -$ADD=31111111111111; -} - - - -###################################################################################################### -###################################################################################################### -####### 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"; - - if ($dial_method == 'RATIO') - { - if ($auto_dial_level < 1) {$auto_dial_level = "1.0";} - $adlSQL = "auto_dial_level='$auto_dial_level',"; - } - else - { - if ($dial_method == 'MANUAL') - { - $auto_dial_level='0'; - $adlSQL = "auto_dial_level='0',"; - } - else - { - $adlSQL = ""; - if ($auto_dial_level < 1) - { - $auto_dial_level = "1.0"; - $adlSQL = "auto_dial_level='$auto_dial_level',"; - } - } - } - $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', $adlSQL 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',allcalls_delay='$allcalls_delay',omit_phone_code='$omit_phone_code',dial_method='$dial_method',available_only_ratio_tally='$available_only_ratio_tally',adaptive_dropped_percentage='$adaptive_dropped_percentage',adaptive_maximum_level='$adaptive_maximum_level',adaptive_latest_server_time='$adaptive_latest_server_time',adaptive_intensity='$adaptive_intensity',adaptive_dl_diff_target='$adaptive_dl_diff_target' 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 IN('READY','QUEUE','DONE');"; - $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|$stmt|\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"; - - if ($dial_method == 'RATIO') - { - if ($auto_dial_level < 1) {$auto_dial_level = "1.0";} - $adlSQL = "auto_dial_level='$auto_dial_level',"; - } - else - { - if ($dial_method == 'MANUAL') - { - $auto_dial_level='0'; - $adlSQL = "auto_dial_level='0',"; - } - else - { - $adlSQL = ""; - if ($auto_dial_level < 1) - { - $auto_dial_level = "1.0"; - $adlSQL = "auto_dial_level='$auto_dial_level',"; - } - } - } - $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', $adlSQL lead_filter_id='$lead_filter_id',dial_method='$dial_method',adaptive_intensity='$adaptive_intensity' 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 IN('READY','QUEUE','DONE');;"; - $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|$stmt|\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',allowed_campaigns='$campaigns_value' 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|$stmt|\n"); - fclose($fp); - } - } - -$ADD=311111; # go to user group modification form below -} - -###################### -# ADD=4111111 modify script in the system -###################### - -if ($ADD==4111111) -{ - echo "\n"; - echo "\n"; - 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='$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 -} - - -###################### -# ADD=41111111111 modify phone record in the system -###################### - -if ($ADD==41111111111) -{ - 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); - } - } -$ADD=31111111111; # go to phone modification form below -} - - -###################### -# ADD=411111111111 modify server record in the system -###################### - -if ($ADD==411111111111) -{ - 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', sys_perf_log='$sys_perf_log', vd_server_logs='$vd_server_logs', agi_output='$agi_output', vicidial_balance_active='$vicidial_balance_active', balance_trunks_offlimits='$balance_trunks_offlimits' where server_id='$old_server_id';"; - $rslt=mysql_query($stmt, $link); - } - } - } -$ADD=311111111111; # go to server modification form below -} - - -###################### -# ADD=421111111111 modify vicidial server trunks record in the system -###################### - -if ($ADD==421111111111) -{ - echo ""; - $stmt="SELECT max_vicidial_trunks from servers where server_ip='$server_ip';"; - $rslt=mysql_query($stmt, $link); - $rowx=mysql_fetch_row($rslt); - $MAXvicidial_trunks = $rowx[0]; - - $stmt="SELECT sum(dedicated_trunks) from vicidial_server_trunks where server_ip='$server_ip' and campaign_id !='$campaign_id';"; - $rslt=mysql_query($stmt, $link); - $rowx=mysql_fetch_row($rslt); - $SUMvicidial_trunks = ($rowx[0] + $dedicated_trunks); - - if ($SUMvicidial_trunks > $MAXvicidial_trunks) - { - echo "
EXPEDIENTE DEL TRONCO DEL SERVIDOR DE VICIDIAL NO AGREGADO - el número de troncos vicidial es demasiado alto: $SUMvicidial_trunks / $MAXvicidial_trunks\n"; - } - else - { - if ( (strlen($campaign_id) < 2) or (strlen($server_ip) < 7) or (strlen($dedicated_trunks) < 1) or (strlen($trunk_restriction) < 1) ) - { - echo "
EXPEDIENTE DEL TRONCO DEL SERVIDOR DE VICIDIAL NO MODIFICADO - Vaya por favor detrás y mire los datos que usted incorporó\n"; - echo "
la campaña debe estar entre 3 y 8 caracteres en longitud\n"; - echo "
el server_ip retrasa debe ser por lo menos 7 caracteres\n"; - echo "
los troncos deben ser un dígito a partir de la 0 a 9999\n"; - } - else - { - echo "
EXPEDIENTE DEL TRONCO DEL SERVIDOR DE VICIDIAL MODIFICADO: $campaign_id - $server_ip - $dedicated_trunks - $trunk_restriction\n"; - - $stmt="UPDATE vicidial_server_trunks SET dedicated_trunks='$dedicated_trunks',trunk_restriction='$trunk_restriction' where campaign_id='$campaign_id' and server_ip='$server_ip';"; - $rslt=mysql_query($stmt, $link); - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|MODIFICAR EL SERVIDOR TRUNK |$PHP_AUTH_USER|$ip|$stmt|\n"); - fclose($fp); - } - } - } -$ADD=311111111111; # go to server modification form below -} - - -###################### -# ADD=4111111111111 modify conference record in the system -###################### - -if ($ADD==4111111111111) -{ - 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); - } - } -$ADD=3111111111111; # go to conference modification form below -} - - -###################### -# ADD=41111111111111 modify vicidial conference record in the system -###################### - -if ($ADD==41111111111111) -{ - echo ""; - - $stmt="SELECT count(*) from vicidial_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 "
VICIDIAL 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 "
VICIDIAL CONFERENCIA NO MODIFICADA - vaya por favor detrás y mire los datos que usted incorporó\n";} - else - { - echo "
VICIDIAL CONFERENCIA MODIFICADA: $conf_exten\n"; - - $stmt="UPDATE vicidial_conferences set conf_exten='$conf_exten',server_ip='$server_ip',extension='$extension' where conf_exten='$old_conf_exten';"; - $rslt=mysql_query($stmt, $link); - } - } -$ADD=31111111111111; # go to vicidial conference 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=53 confirmation before Emergency VDAC Jam Clear - deletes oldest LIVE vicidial_auto_call record -###################### - -if ($ADD==53) -{ - if (eregi('IN',$stage)) - {$group_id=$campaign_id;} - echo ""; - - if (strlen($campaign_id) < 2) - { - echo "
VDAC NO DESPEJÓ PARA LA 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 CLARA DE VDAC: $campaign_id\n"; - echo "

Chasque aquí para suprimir el más viejo VIVEN expediente en VDACpara $campaign_id


\n"; - } - -# go to campaign modification below -if (eregi('IN',$stage)) - {$ADD='3111';} -else - {$ADD='31';} -} - -###################### -# 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 state 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 -} - - -###################### -# ADD=51111111111 confirmation before deletion of phone record -###################### - -if ($ADD==51111111111) -{ - echo ""; - - if ( (strlen($extension) < 2) or (strlen($server_ip) < 7) or ($LOGast_delete_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='31111111111'; # go to phone modification below -} - - -###################### -# ADD=511111111111 confirmation before deletion of server record -###################### - -if ($ADD==511111111111) -{ - echo ""; - - if ( (strlen($server_id) < 2) or (strlen($server_ip) < 7) or ($LOGast_delete_phones < 1) ) - { - echo "
SERVIDOR NOT DELETED - Vaya por favor detrás y mire los datos que usted incorporó\n"; - echo "
ID Del Servidor be at least 2 characters in length\n"; - echo "
IP Del Servidor be at least 7 characters in length\n"; - } - else - { - echo "
SERVIDOR DELETION CONFIRMATION: $server_id - $server_ip\n"; - echo "

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


\n"; - } -$ADD='311111111111'; # go to server modification below -} - - -###################### -# ADD=5111111111111 confirmation before deletion of conference record -###################### - -if ($ADD==5111111111111) -{ - echo ""; - - if ( (strlen($conf_exten) < 2) or (strlen($server_ip) < 7) or ($LOGast_delete_phones < 1) ) - { - echo "
CONFERENCE NOT DELETED - Vaya por favor detrás y mire los datos que usted incorporó\n"; - echo "
Conference must be at least 2 characters in length\n"; - echo "
IP Del Servidor be at least 7 characters in length\n"; - } - else - { - echo "
CONFERENCE DELETION CONFIRMATION: $conf_exten - $server_ip\n"; - echo "

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


\n"; - } -$ADD='3111111111111'; # go to conference modification below -} - - -###################### -# ADD=51111111111111 confirmation before deletion of vicidial conference record -###################### - -if ($ADD==51111111111111) -{ - echo ""; - - if ( (strlen($conf_exten) < 2) or (strlen($server_ip) < 7) or ($LOGast_delete_phones < 1) ) - { - echo "
VICIDIAL CONFERENCE NOT DELETED - Vaya por favor detrás y mire los datos que usted incorporó\n"; - echo "
Conference must be at least 2 characters in length\n"; - echo "
IP Del Servidor be at least 7 characters in length\n"; - } - else - { - echo "
VICIDIAL CONFERENCE DELETION CONFIRMATION: $conf_exten - $server_ip\n"; - echo "

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


\n"; - } -$ADD='31111111111111'; # go to vicidial conference 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 from 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=63 Emergency VDAC Jam Clear -###################### - -if ($ADD==63) -{ - if (eregi('IN',$stage)) - {$group_id=$campaign_id;} - echo ""; - - if (strlen($campaign_id) < 2) - { - echo "
VDAC NO DESPEJÓ PARA LA 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_auto_calls where status='LIVE' and campaign_id='$campaign_id' order by call_time 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|EMERGENCY VDAC CLEAR|$PHP_AUTH_USER|$ip|campaign_id='$campaign_id'|\n"); - fclose($fp); - } - echo "
DE REGISTRO PASADO DE VDAC DESPEJADA PARA LA CAMPAÑA: $campaign_id\n"; - echo "

\n"; - } - -# go to campaign modification below -if (eregi('IN',$stage)) - {$ADD='3111';} -else - {$ADD='31';} -} - - -###################### -# 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 -} - - -###################### -# ADD=61111111111 delete phone record -###################### - -if ($ADD==61111111111) -{ - echo ""; - - if ( (strlen($extension) < 2) or (strlen($server_ip) < 7) or ($CoNfIrM != 'YES') or ($LOGast_delete_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='10000000000'; # go to phone list -} - - -###################### -# ADD=611111111111 delete server record -###################### - -if ($ADD==611111111111) -{ - echo ""; - - if ( (strlen($server_id) < 2) or (strlen($server_ip) < 7) or ($CoNfIrM != 'YES') or ($LOGast_delete_phones < 1) ) - { - echo "
SERVIDOR NOT DELETED - Vaya por favor detrás y mire los datos que usted incorporó\n"; - echo "
ID Del Servidor be at least 2 characters in length\n"; - echo "
IP Del Servidor be at least 7 characters in length\n"; - } - else - { - $stmt="DELETE from servers where server_id='$server_id' 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 SERVER!!|$PHP_AUTH_USER|$ip|server_id='$server_id'|server_ip='$server_ip'|\n"); - fclose($fp); - } - echo "
SERVIDOR DELETION COMPLETED: $server_id - $server_ip\n"; - echo "

\n"; - } -$ADD='100000000000'; # go to server list -} - - -###################### -# ADD=621111111111 delete vicidial server trunk record in the system -###################### - -if ($ADD==621111111111) -{ - echo ""; - - if ( (strlen($campaign_id) < 2) or (strlen($server_ip) < 7) ) - { - echo "
EXPEDIENTE DEL TRONCO DEL SERVIDOR DE VICIDIAL NO SUPRIMIDO - Vaya por favor detrás y mire los datos que usted incorporó\n"; - echo "
la campaña debe estar entre 3 y 8 caracteres en longitud\n"; - echo "
el server_ip retrasa debe ser por lo menos 7 caracteres\n"; - } - else - { - echo "
EXPEDIENTE DEL TRONCO DEL SERVIDOR DE VICIDIAL SUPRIMIDO: $campaign_id - $server_ip\n"; - - $stmt="DELETE FROM vicidial_server_trunks where campaign_id='$campaign_id' and server_ip='$server_ip';"; - $rslt=mysql_query($stmt, $link); - - ### LOG CHANGES TO LOG FILE ### - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|DELETE SERVIDOR TRUNK |$PHP_AUTH_USER|$ip|$stmt|\n"); - fclose($fp); - } - } - -$ADD=311111111111; # go to server modification form below -} - - -###################### -# ADD=6111111111111 delete conference record -###################### - -if ($ADD==6111111111111) -{ - echo ""; - - if ( (strlen($conf_exten) < 2) or (strlen($server_ip) < 7) or ($CoNfIrM != 'YES') or ($LOGast_delete_phones < 1) ) - { - echo "
CONFERENCE NOT DELETED - Vaya por favor detrás y mire los datos que usted incorporó\n"; - echo "
Conference be at least 2 characters in length\n"; - echo "
IP Del Servidor be at least 7 characters in length\n"; - } - else - { - $stmt="DELETE from conferences where conf_exten='$conf_exten' 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 CONF!!!!|$PHP_AUTH_USER|$ip|conf_exten='$conf_exten'|server_ip='$server_ip'|\n"); - fclose($fp); - } - echo "
CONFERENCE DELETION COMPLETED: $conf_exten - $server_ip\n"; - echo "

\n"; - } -$ADD='1000000000000'; # go to conference list -} - - -###################### -# ADD=61111111111111 delete vicidial conference record -###################### - -if ($ADD==61111111111111) -{ - echo ""; - - if ( (strlen($conf_exten) < 2) or (strlen($server_ip) < 7) or ($CoNfIrM != 'YES') or ($LOGast_delete_phones < 1) ) - { - echo "
VICIDIAL CONFERENCE NOT DELETED - Vaya por favor detrás y mire los datos que usted incorporó\n"; - echo "
Conference be at least 2 characters in length\n"; - echo "
IP Del Servidor be at least 7 characters in length\n"; - } - else - { - $stmt="DELETE from vicidial_conferences where conf_exten='$conf_exten' 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 CONF!!!!|$PHP_AUTH_USER|$ip|conf_exten='$conf_exten'|server_ip='$server_ip'|\n"); - fclose($fp); - } - echo "
VICIDIAL CONFERENCE DELETION COMPLETED: $conf_exten - $server_ip\n"; - echo "

\n"; - } -$ADD='10000000000000'; # go to vicidial conference 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) and ( (!eregi("$campaign_id",$LOGallowed_campaigns)) and (!eregi("ALL-CAMPAIGNS",$LOGallowed_campaigns)) ) ) - {$ADD=30;} # send to not allowed screen if not in vicidial_user_groups allowed_campaigns list - -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]; - $allcalls_delay = $row[44]; - $omit_phone_code = $row[45]; - $dial_method = $row[46]; - $available_only_ratio_tally = $row[47]; - $adaptive_dropped_percentage = $row[48]; - $adaptive_maximum_level = $row[49]; - $adaptive_latest_server_time = $row[50]; - $adaptive_intensity = $row[51]; - $adaptive_dl_diff_target = $row[52]; - -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"; - -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
Método Del Dial: $NWB#vicidial_campaigns-dial_method$NWE
Nivel del Auto-Dial: (0 = off)$NWB#vicidial_campaigns-auto_dial_level$NWE
Solamente Cuenta Disponible: $NWB#vicidial_campaigns-available_only_ratio_tally$NWE
Límite Del Porcentaje De la Gota: % $NWB#vicidial_campaigns-adaptive_dropped_percentage$NWE
El Máximo Adapta El Nivel Del Dial: number only $NWB#vicidial_campaigns-adaptive_maximum_level$NWE
El Tiempo Más último Del Servidor: 4 Solamente dígitos $NWB#vicidial_campaigns-adaptive_latest_server_time$NWE
Adapte El Modificante De la Intensidad: $NWB#vicidial_campaigns-adaptive_intensity$NWE
Blanco Llana De la Diferencia Del Dial: $NWB#vicidial_campaigns-adaptive_dl_diff_target$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
Omita El Código Del Teléfono: $NWB#vicidial_campaigns-omit_phone_code$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
La Registración Retrasa: in seconds$NWB#vicidial_campaigns-allcalls_delay$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 "Click here to see a VDAD report for this campaign

\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"; -echo "EMERGENCY VDAC CLEAR FOR THIS CAMPAIGN

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

SUPRIMA ESTA CAMPAÑA\n"; - } - -} - - -###################### -# ADD=34 modify campaign info in the system - Basic View -###################### - -if ( ($ADD==34) and ( (!eregi("$campaign_id",$LOGallowed_campaigns)) and (!eregi("ALL-CAMPAIGNS",$LOGallowed_campaigns)) ) ) - {$ADD=30;} # send to not allowed screen if not in vicidial_user_groups allowed_campaigns list - -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]; - $dial_method = $row[46]; - $adaptive_intensity = $row[51]; - -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 "\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
Método Del Dial: $NWB#vicidial_campaigns-dial_method$NWE
Nivel del Auto-Dial: (0 = off)$NWB#vicidial_campaigns-auto_dial_level$NWE
Adapte El Modificante De la Intensidad: $NWB#vicidial_campaigns-adaptive_intensity$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 "Click here to see a VDAD report for this campaign

\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=31 campaign not allowed -###################### - -if ($ADD==30) -{ -echo "
\n"; - echo ""; -echo "You do not have permission to view campaign $campaign_id\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 "Click here to see a report for this campaign

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

EMERGENCY VDAC CLEAR FOR THIS IN-GROUP

\n"; - 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 "\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
Campañas Permitidas: \n"; -echo "$campaigns_list"; -echo "$NWB#vicidial_user_groups-allowed_campaigns$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=31111111111 modify phone record in the system -###################### - -if ($ADD==31111111111) -{ -echo "
\n"; - 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 ($LOGast_delete_phones > 0) - { - echo "

SUPRIMA ESTE TELÉFONO\n"; - } -} - - -###################### -# ADD=311111111111 modify server record in the system -###################### - -if ($ADD==311111111111) -{ -echo "
\n"; - echo ""; - - $stmt="SELECT * from servers where server_id='$server_id' or server_ip='$server_ip';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $server_id = $row[0]; - $server_ip = $row[2]; - -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 "\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
El Marcar Del Balance de VICIDIAL: $NWB#servers-vicidial_balance_active$NWE
Balance Offlimits de VICIDIAL: $NWB#servers-balance_trunks_offlimits$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
Funcionamiento Del Sistema: $NWB#servers-sys_perf_log$NWE
Registros Del Servidor: $NWB#servers-vd_server_logs$NWE
Salida de AGI: $NWB#servers-agi_output$NWE
\n"; - - -### vicidial server trunk records for this server -echo "

TRONCOS DE VICIDIAL PARA ESTE SERVIDOR:   $NWB#vicidial_server_trunks$NWE
\n"; -echo "\n"; -echo "\n"; - - $stmt="SELECT * from vicidial_server_trunks where server_ip='$server_ip' order by campaign_id"; - $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 "
CAMPAÑA TRONCOS RESTRICCIÓN DELETE
$rowx[1]
\n"; - echo "\n"; - echo "\n"; - echo "
ELIMINAR
\n"; - -echo "
AGREGUE EL NUEVO EXPEDIENTE DEL TRONCO DEL SERVIDOR VICIDIAL
\n"; -echo "\n"; -echo "\n"; -echo "TRUNKS:
\n"; -echo "CAMPAÑA:
\n"; -echo "RESTRICTION:
\n"; -echo "
\n"; - -echo "

\n"; - - -### list of phones on this server -echo "
\n"; -echo "
TELÉFONOS DENTRO DE ESTE SERVIDOR:
\n"; -echo "\n"; -echo "\n"; - - $active_phones = 0; - $inactive_phones = 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_phones++; $camp_lists .= "'$rowx[0]',";} - if (ereg("N", $rowx[1])) {$inactive_phones++;} - - 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"; - - -### list of conferences on this server -echo "
\n"; -echo "
CONFERENCES WITHIN THIS SERVER:
\n"; -echo "\n"; -echo "\n"; - - $active_confs = 0; - $stmt="SELECT conf_exten,extension from conferences 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++; - $active_confs++; - - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - - echo "\n"; - } - -echo "
CONFERENCEEXTENSIÓN
$rowx[0]$rowx[2]

\n"; - - -### list of vicidial conferences on this server -echo "
\n"; -echo "
VICIDIAL CONFERENCES WITHIN THIS SERVER:
\n"; -echo "\n"; -echo "\n"; - - $active_vdconfs = 0; - $stmt="SELECT conf_exten,extension from vicidial_conferences 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++; - $active_vdconfs++; - - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - - echo "\n"; - } - -echo "
VD CONFERENCEEXTENSIÓN
$rowx[0]$rowx[2]

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

\n"; -echo "Este servidor tiene $active_confs active conferences

\n"; -echo "Este servidor tiene $active_vdconfs active vicidial conferences

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

DELETE THIS SERVER\n"; - } -} - - -###################### -# ADD=3111111111111 modify conference record in the system -###################### - -if ($ADD==3111111111111) -{ -echo "
\n"; - 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); - $conf_exten = $row[0]; - $server_ip = $row[1]; - -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"; -if ($LOGast_delete_phones > 0) - { - echo "

DELETE THIS CONFERENCE\n"; - } -} - - -###################### -# ADD=31111111111111 modify vicidial conference record in the system -###################### - -if ($ADD==31111111111111) -{ -echo "
\n"; - echo ""; - - $stmt="SELECT * from vicidial_conferences where conf_exten='$conf_exten' and server_ip='$server_ip';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $conf_exten = $row[0]; - $server_ip = $row[1]; - -echo "
MODIFY A VICIDIAL CONFERENCE RECORD: $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"; -if ($LOGast_delete_phones > 0) - { - echo "

DELETE THIS VICIDIAL CONFERENCE\n"; - } -} - - - - - - - -###################### -# 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 "
LEADLIST CAMPAÑAENTRY 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 ""; - -$USERlink='stage=USERIDDOWN'; -$NAMElink='stage=NAMEDOWN'; -$LEVELlink='stage=LEVELDOWN'; -$GROUPlink='stage=GROUPDOWN'; -$SQLorder='order by full_name'; -if (eregi("USERIDUP",$stage)) {$SQLorder='order by user asc'; $USERlink='stage=USERIDDOWN';} -if (eregi("USERIDDOWN",$stage)) {$SQLorder='order by user desc'; $USERlink='stage=USERIDUP';} -if (eregi("NAMEUP",$stage)) {$SQLorder='order by full_name asc'; $NAMElink='stage=NAMEDOWN';} -if (eregi("NAMEDOWN",$stage)) {$SQLorder='order by full_name desc'; $NAMElink='stage=NAMEUP';} -if (eregi("LEVELUP",$stage)) {$SQLorder='order by user_level asc'; $LEVELlink='stage=LEVELDOWN';} -if (eregi("LEVELDOWN",$stage)) {$SQLorder='order by user_level desc'; $LEVELlink='stage=LEVELUP';} -if (eregi("GROUPUP",$stage)) {$SQLorder='order by user_group asc'; $GROUPlink='stage=GROUPDOWN';} -if (eregi("GROUPDOWN",$stage)) {$SQLorder='order by user_group desc'; $GROUPlink='stage=GROUPUP';} - $stmt="SELECT * from vicidial_users $SQLorder"; - $rslt=mysql_query($stmt, $link); - $people_to_print = mysql_num_rows($rslt); - -echo "
USUARIOS:\n"; -echo "
\n"; -echo ""; -echo ""; -echo ""; -echo ""; -echo ""; -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 "
USER IDFULL NAMELEVELGROUPLINKS
$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"; - 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 "
\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"; -} - -###################### -# ADD=10000000000 display all phones -###################### -if ($ADD==10000000000) -{ -echo "
\n"; -echo ""; - -$EXTENlink='stage=EXTENDOWN'; -$PROTOlink='stage=PROTODOWN'; -$SERVERlink='stage=SERVERDOWN'; -$STATUSlink='stage=STATUSDOWN'; -$SQLorder='order by extension,server_ip'; -if (eregi("EXTENUP",$stage)) {$SQLorder='order by extension asc'; $EXTENlink='stage=EXTENDOWN';} -if (eregi("EXTENDOWN",$stage)) {$SQLorder='order by extension desc'; $EXTENlink='stage=EXTENUP';} -if (eregi("PROTOUP",$stage)) {$SQLorder='order by protocol asc'; $PROTOlink='stage=PROTODOWN';} -if (eregi("PROTODOWN",$stage)) {$SQLorder='order by protocol desc'; $PROTOlink='stage=PROTOUP';} -if (eregi("SERVERUP",$stage)) {$SQLorder='order by server_ip asc'; $SERVERlink='stage=SERVERDOWN';} -if (eregi("SERVERDOWN",$stage)) {$SQLorder='order by server_ip desc'; $SERVERlink='stage=SERVERUP';} -if (eregi("STATUSUP",$stage)) {$SQLorder='order by status asc'; $STATUSlink='stage=STATUSDOWN';} -if (eregi("STATUSDOWN",$stage)) {$SQLorder='order by status desc'; $STATUSlink='stage=STATUSUP';} - $stmt="SELECT * from phones $SQLorder"; - $rslt=mysql_query($stmt, $link); - $phones_to_print = mysql_num_rows($rslt); - -echo "
LISTADOS DE TELÉFONOS:\n"; -echo "
\n"; -echo ""; -echo ""; -echo ""; -echo ""; -echo ""; -echo ""; -echo ""; -echo ""; -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 "
EXTENPROTOSERVERDIALPLANESTADONOMBREVMAILLINKS
$row[0]$row[16]$row[5]$row[1]$row[2]$row[8]$row[11]$row[14]$row[15]MODIFICAR | ESTADÍSTICAS
\n"; -} - -###################### -# ADD=100000000000 display all servers -###################### -if ($ADD==100000000000) -{ -echo "\n";echo "\n"; +$stmt="SELECT admin_home_url from system_settings;"; +$rslt=mysql_query($stmt, $link); +$row=mysql_fetch_row($rslt); +$admin_home_url_LU = $row[0]; + +?> +
+
\n"; - 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=1000000000000 display all conferences -###################### -if ($ADD==1000000000000) -{ -echo "
\n"; - 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"; -} - -###################### -# ADD=10000000000000 display all vicidial conferences -###################### -if ($ADD==10000000000000) -{ -echo "
\n"; - echo ""; - - $stmt="SELECT * from vicidial_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"; -} - - - - -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 ### -} -?> + LICENSE: GPLv2 +# + + +require("dbconnect.php"); + +$page_width='750'; +$section_width='700'; +$header_font_size='3'; +$subheader_font_size='2'; +$header_selected_bold=''; +$header_nonselected_bold=''; +$users_color = '#FFFF99'; +$campaigns_color = '#FFCC99'; +$lists_color = '#FFCCCC'; +$ingroups_color = '#CC99FF'; +$remoteagent_color ='#CCFFCC'; +$usergroups_color = '#CCFFFF'; +$scripts_color = '#99FFCC'; +$filters_color = '#CCCCCC'; +$admin_color = '#FF99FF'; +$reports_color = '#99FF33'; +#$users_color = '#FFFF99'; +#$campaigns_color = '#FFFF99'; +#$lists_color = '#FFFF99'; +#$ingroups_color = '#FFFF99'; +#$remoteagent_color ='#FFFF99'; +#$usergroups_color = '#FFFF99'; +#$scripts_color = '#FFFF99'; +#$filters_color = '#FFFF99'; +#$admin_color = '#FFFF99'; +#$reports_color = '#FFFF99'; + $times_color = '#CCCC00'; + $phones_color = '#CCCC00'; + $conference_color = '#CCCC00'; + $server_color = '#CCCC00'; + $settings_color = '#CCCC00'; +$users_font = 'BLACK'; +$campaigns_font = 'BLACK'; +$lists_font = 'BLACK'; +$ingroups_font = 'BLACK'; +$remoteagent_font = 'BLACK'; +$usergroups_font = 'BLACK'; +$scripts_font = 'BLACK'; +$filters_font = 'BLACK'; +$admin_font = 'BLACK'; +$reports_font = 'BLACK'; + $times_font = 'BLACK'; + $phones_font = 'BLACK'; + $conference_font = 'BLACK'; + $server_font = 'BLACK'; + $settings_font = 'BLACK'; + +$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; +$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; +$PHP_SELF=$_SERVER['PHP_SELF']; + +if (isset($_GET["DB"])) {$DB=$_GET["DB"];} + elseif (isset($_POST["DB"])) {$DB=$_POST["DB"];} +if (isset($_GET["active"])) {$active=$_GET["active"];} + elseif (isset($_POST["active"])) {$active=$_POST["active"];} +if (isset($_GET["adaptive_dl_diff_target"])) {$adaptive_dl_diff_target=$_GET["adaptive_dl_diff_target"];} + elseif (isset($_POST["adaptive_dl_diff_target"])) {$adaptive_dl_diff_target=$_POST["adaptive_dl_diff_target"];} +if (isset($_GET["adaptive_dropped_percentage"])) {$adaptive_dropped_percentage=$_GET["adaptive_dropped_percentage"];} + elseif (isset($_POST["adaptive_dropped_percentage"])){$adaptive_dropped_percentage=$_POST["adaptive_dropped_percentage"];} +if (isset($_GET["adaptive_intensity"])) {$adaptive_intensity=$_GET["adaptive_intensity"];} + elseif (isset($_POST["adaptive_intensity"])) {$adaptive_intensity=$_POST["adaptive_intensity"];} +if (isset($_GET["adaptive_latest_server_time"])) {$adaptive_latest_server_time=$_GET["adaptive_latest_server_time"];} + elseif (isset($_POST["adaptive_latest_server_time"])){$adaptive_latest_server_time=$_POST["adaptive_latest_server_time"];} +if (isset($_GET["adaptive_maximum_level"])) {$adaptive_maximum_level=$_GET["adaptive_maximum_level"];} + elseif (isset($_POST["adaptive_maximum_level"])) {$adaptive_maximum_level=$_POST["adaptive_maximum_level"];} +if (isset($_GET["ADD"])) {$ADD=$_GET["ADD"];} + elseif (isset($_POST["ADD"])) {$ADD=$_POST["ADD"];} +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["AFLogging_enabled"])) {$AFLogging_enabled=$_GET["AFLogging_enabled"];} + elseif (isset($_POST["AFLogging_enabled"])) {$AFLogging_enabled=$_POST["AFLogging_enabled"];} +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["agentcall_manual"])) {$agentcall_manual=$_GET["agentcall_manual"];} + elseif (isset($_POST["agentcall_manual"])) {$agentcall_manual=$_POST["agentcall_manual"];} +if (isset($_GET["agentonly_callbacks"])) {$agentonly_callbacks=$_GET["agentonly_callbacks"];} + elseif (isset($_POST["agentonly_callbacks"])) {$agentonly_callbacks=$_POST["agentonly_callbacks"];} +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["agi_output"])) {$agi_output=$_GET["agi_output"];} + elseif (isset($_POST["agi_output"])) {$agi_output=$_POST["agi_output"];} +if (isset($_GET["allcalls_delay"])) {$allcalls_delay=$_GET["allcalls_delay"];} + elseif (isset($_POST["allcalls_delay"])) {$allcalls_delay=$_POST["allcalls_delay"];} +if (isset($_GET["allow_closers"])) {$allow_closers=$_GET["allow_closers"];} + elseif (isset($_POST["allow_closers"])) {$allow_closers=$_POST["allow_closers"];} +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["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["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["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["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["asterisk_version"])) {$asterisk_version=$_GET["asterisk_version"];} + elseif (isset($_POST["asterisk_version"])) {$asterisk_version=$_POST["asterisk_version"];} +if (isset($_GET["ASTmgrSECRET"])) {$ASTmgrSECRET=$_GET["ASTmgrSECRET"];} + elseif (isset($_POST["ASTmgrSECRET"])) {$ASTmgrSECRET=$_POST["ASTmgrSECRET"];} +if (isset($_GET["ASTmgrUSERNAME"])) {$ASTmgrUSERNAME=$_GET["ASTmgrUSERNAME"];} + elseif (isset($_POST["ASTmgrUSERNAME"])) {$ASTmgrUSERNAME=$_POST["ASTmgrUSERNAME"];} +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["ASTmgrUSERNAMEupdate"])) {$ASTmgrUSERNAMEupdate=$_GET["ASTmgrUSERNAMEupdate"];} + elseif (isset($_POST["ASTmgrUSERNAMEupdate"])) {$ASTmgrUSERNAMEupdate=$_POST["ASTmgrUSERNAMEupdate"];} +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($_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["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["available_only_ratio_tally"])) {$available_only_ratio_tally=$_GET["available_only_ratio_tally"];} + elseif (isset($_POST["available_only_ratio_tally"])){$available_only_ratio_tally=$_POST["available_only_ratio_tally"];} +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["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["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["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["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["campaign_cid"])) {$campaign_cid=$_GET["campaign_cid"];} + elseif (isset($_POST["campaign_cid"])) {$campaign_cid=$_POST["campaign_cid"];} +if (isset($_GET["campaign_detail"])) {$campaign_detail=$_GET["campaign_detail"];} + elseif (isset($_POST["campaign_detail"])) {$campaign_detail=$_POST["campaign_detail"];} +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["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_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["campaign_recording"])) {$campaign_recording=$_GET["campaign_recording"];} + elseif (isset($_POST["campaign_recording"])) {$campaign_recording=$_POST["campaign_recording"];} +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["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["client_browser"])) {$client_browser=$_GET["client_browser"];} + elseif (isset($_POST["client_browser"])) {$client_browser=$_POST["client_browser"];} +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["company"])) {$company=$_GET["company"];} + elseif (isset($_POST["company"])) {$company=$_POST["company"];} +if (isset($_GET["computer_ip"])) {$computer_ip=$_GET["computer_ip"];} + elseif (isset($_POST["computer_ip"])) {$computer_ip=$_POST["computer_ip"];} +if (isset($_GET["conf_exten"])) {$conf_exten=$_GET["conf_exten"];} + elseif (isset($_POST["conf_exten"])) {$conf_exten=$_POST["conf_exten"];} +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["conferencing_enabled"])) {$conferencing_enabled=$_GET["conferencing_enabled"];} + elseif (isset($_POST["conferencing_enabled"])) {$conferencing_enabled=$_POST["conferencing_enabled"];} +if (isset($_GET["CoNfIrM"])) {$CoNfIrM=$_GET["CoNfIrM"];} + elseif (isset($_POST["CoNfIrM"])) {$CoNfIrM=$_POST["CoNfIrM"];} +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_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_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_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["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_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_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["DBX_database"])) {$DBX_database=$_GET["DBX_database"];} + elseif (isset($_POST["DBX_database"])) {$DBX_database=$_POST["DBX_database"];} +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["DBX_server"])) {$DBX_server=$_GET["DBX_server"];} + elseif (isset($_POST["DBX_server"])) {$DBX_server=$_POST["DBX_server"];} +if (isset($_GET["DBX_user"])) {$DBX_user=$_GET["DBX_user"];} + elseif (isset($_POST["DBX_user"])) {$DBX_user=$_POST["DBX_user"];} +if (isset($_GET["DBY_database"])) {$DBY_database=$_GET["DBY_database"];} + elseif (isset($_POST["DBY_database"])) {$DBY_database=$_POST["DBY_database"];} +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["DBY_server"])) {$DBY_server=$_GET["DBY_server"];} + elseif (isset($_POST["DBY_server"])) {$DBY_server=$_POST["DBY_server"];} +if (isset($_GET["DBY_user"])) {$DBY_user=$_GET["DBY_user"];} + elseif (isset($_POST["DBY_user"])) {$DBY_user=$_POST["DBY_user"];} +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["delete_campaigns"])) {$delete_campaigns=$_GET["delete_campaigns"];} + elseif (isset($_POST["delete_campaigns"])) {$delete_campaigns=$_POST["delete_campaigns"];} +if (isset($_GET["delete_filters"])) {$delete_filters=$_GET["delete_filters"];} + elseif (isset($_POST["delete_filters"])) {$delete_filters=$_POST["delete_filters"];} +if (isset($_GET["delete_ingroups"])) {$delete_ingroups=$_GET["delete_ingroups"];} + elseif (isset($_POST["delete_ingroups"])) {$delete_ingroups=$_POST["delete_ingroups"];} +if (isset($_GET["delete_lists"])) {$delete_lists=$_GET["delete_lists"];} + elseif (isset($_POST["delete_lists"])) {$delete_lists=$_POST["delete_lists"];} +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["delete_scripts"])) {$delete_scripts=$_GET["delete_scripts"];} + elseif (isset($_POST["delete_scripts"])) {$delete_scripts=$_POST["delete_scripts"];} +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_users"])) {$delete_users=$_GET["delete_users"];} + elseif (isset($_POST["delete_users"])) {$delete_users=$_POST["delete_users"];} +if (isset($_GET["dial_method"])) {$dial_method=$_GET["dial_method"];} + elseif (isset($_POST["dial_method"])) {$dial_method=$_POST["dial_method"];} +if (isset($_GET["dial_prefix"])) {$dial_prefix=$_GET["dial_prefix"];} + elseif (isset($_POST["dial_prefix"])) {$dial_prefix=$_POST["dial_prefix"];} +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["dial_timeout"])) {$dial_timeout=$_GET["dial_timeout"];} + elseif (isset($_POST["dial_timeout"])) {$dial_timeout=$_POST["dial_timeout"];} +if (isset($_GET["dialplan_number"])) {$dialplan_number=$_GET["dialplan_number"];} + elseif (isset($_POST["dialplan_number"])) {$dialplan_number=$_POST["dialplan_number"];} +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["drop_exten"])) {$drop_exten=$_GET["drop_exten"];} + elseif (isset($_POST["drop_exten"])) {$drop_exten=$_POST["drop_exten"];} +if (isset($_GET["drop_message"])) {$drop_message=$_GET["drop_message"];} + elseif (isset($_POST["drop_message"])) {$drop_message=$_POST["drop_message"];} +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["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["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["ext_context"])) {$ext_context=$_GET["ext_context"];} + elseif (isset($_POST["ext_context"])) {$ext_context=$_POST["ext_context"];} +if (isset($_GET["extension"])) {$extension=$_GET["extension"];} + elseif (isset($_POST["extension"])) {$extension=$_POST["extension"];} +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["force_logout"])) {$force_logout=$_GET["force_logout"];} + elseif (isset($_POST["force_logout"])) {$force_logout=$_POST["force_logout"];} +if (isset($_GET["fronter_display"])) {$fronter_display=$_GET["fronter_display"];} + elseif (isset($_POST["fronter_display"])) {$fronter_display=$_POST["fronter_display"];} +if (isset($_GET["full_name"])) {$full_name=$_GET["full_name"];} + elseif (isset($_POST["full_name"])) {$full_name=$_POST["full_name"];} +if (isset($_GET["fullname"])) {$fullname=$_GET["fullname"];} + elseif (isset($_POST["fullname"])) {$fullname=$_POST["fullname"];} +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["group_color"])) {$group_color=$_GET["group_color"];} + elseif (isset($_POST["group_color"])) {$group_color=$_POST["group_color"];} +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["groups"])) {$groups=$_GET["groups"];} + elseif (isset($_POST["groups"])) {$groups=$_POST["groups"];} +if (isset($_GET["HKstatus"])) {$HKstatus=$_GET["HKstatus"];} + elseif (isset($_POST["HKstatus"])) {$HKstatus=$_POST["HKstatus"];} +if (isset($_GET["hopper_level"])) {$hopper_level=$_GET["hopper_level"];} + elseif (isset($_POST["hopper_level"])) {$hopper_level=$_POST["hopper_level"];} +if (isset($_GET["hotkey"])) {$hotkey=$_GET["hotkey"];} + elseif (isset($_POST["hotkey"])) {$hotkey=$_POST["hotkey"];} +if (isset($_GET["hotkeys_active"])) {$hotkeys_active=$_GET["hotkeys_active"];} + elseif (isset($_POST["hotkeys_active"])) {$hotkeys_active=$_POST["hotkeys_active"];} +if (isset($_GET["install_directory"])) {$install_directory=$_GET["install_directory"];} + elseif (isset($_POST["install_directory"])) {$install_directory=$_POST["install_directory"];} +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_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_sql"])) {$lead_filter_sql=$_GET["lead_filter_sql"];} + elseif (isset($_POST["lead_filter_sql"])) {$lead_filter_sql=$_POST["lead_filter_sql"];} +if (isset($_GET["lead_order"])) {$lead_order=$_GET["lead_order"];} + elseif (isset($_POST["lead_order"])) {$lead_order=$_POST["lead_order"];} +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["load_leads"])) {$load_leads=$_GET["load_leads"];} + elseif (isset($_POST["load_leads"])) {$load_leads=$_POST["load_leads"];} +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["local_gmt"])) {$local_gmt=$_GET["local_gmt"];} + elseif (isset($_POST["local_gmt"])) {$local_gmt=$_POST["local_gmt"];} +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["login"])) {$login=$_GET["login"];} + elseif (isset($_POST["login"])) {$login=$_POST["login"];} +if (isset($_GET["login_campaign"])) {$login_campaign=$_GET["login_campaign"];} + elseif (isset($_POST["login_campaign"])) {$login_campaign=$_POST["login_campaign"];} +if (isset($_GET["login_pass"])) {$login_pass=$_GET["login_pass"];} + elseif (isset($_POST["login_pass"])) {$login_pass=$_POST["login_pass"];} +if (isset($_GET["login_user"])) {$login_user=$_GET["login_user"];} + elseif (isset($_POST["login_user"])) {$login_user=$_POST["login_user"];} +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["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["modify_leads"])) {$modify_leads=$_GET["modify_leads"];} + elseif (isset($_POST["modify_leads"])) {$modify_leads=$_POST["modify_leads"];} +if (isset($_GET["monitor_prefix"])) {$monitor_prefix=$_GET["monitor_prefix"];} + elseif (isset($_POST["monitor_prefix"])) {$monitor_prefix=$_POST["monitor_prefix"];} +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["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["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["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["old_extension"])) {$old_extension=$_GET["old_extension"];} + elseif (isset($_POST["old_extension"])) {$old_extension=$_POST["old_extension"];} +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["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["OLDuser_group"])) {$OLDuser_group=$_GET["OLDuser_group"];} + elseif (isset($_POST["OLDuser_group"])) {$OLDuser_group=$_POST["OLDuser_group"];} +if (isset($_GET["omit_phone_code"])) {$omit_phone_code=$_GET["omit_phone_code"];} + elseif (isset($_POST["omit_phone_code"])) {$omit_phone_code=$_POST["omit_phone_code"];} +if (isset($_GET["outbound_cid"])) {$outbound_cid=$_GET["outbound_cid"];} + elseif (isset($_POST["outbound_cid"])) {$outbound_cid=$_POST["outbound_cid"];} +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["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["pass"])) {$pass=$_GET["pass"];} + elseif (isset($_POST["pass"])) {$pass=$_POST["pass"];} +if (isset($_GET["phone_ip"])) {$phone_ip=$_GET["phone_ip"];} + elseif (isset($_POST["phone_ip"])) {$phone_ip=$_POST["phone_ip"];} +if (isset($_GET["phone_login"])) {$phone_login=$_GET["phone_login"];} + elseif (isset($_POST["phone_login"])) {$phone_login=$_POST["phone_login"];} +if (isset($_GET["phone_number"])) {$phone_number=$_GET["phone_number"];} + elseif (isset($_POST["phone_number"])) {$phone_number=$_POST["phone_number"];} +if (isset($_GET["phone_pass"])) {$phone_pass=$_GET["phone_pass"];} + elseif (isset($_POST["phone_pass"])) {$phone_pass=$_POST["phone_pass"];} +if (isset($_GET["phone_type"])) {$phone_type=$_GET["phone_type"];} + elseif (isset($_POST["phone_type"])) {$phone_type=$_POST["phone_type"];} +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["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["recording_exten"])) {$recording_exten=$_GET["recording_exten"];} + elseif (isset($_POST["recording_exten"])) {$recording_exten=$_POST["recording_exten"];} +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["reset_hopper"])) {$reset_hopper=$_GET["reset_hopper"];} + elseif (isset($_POST["reset_hopper"])) {$reset_hopper=$_POST["reset_hopper"];} +if (isset($_GET["reset_list"])) {$reset_list=$_GET["reset_list"];} + elseif (isset($_POST["reset_list"])) {$reset_list=$_POST["reset_list"];} +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["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["scheduled_callbacks"])) {$scheduled_callbacks=$_GET["scheduled_callbacks"];} + elseif (isset($_POST["scheduled_callbacks"])) {$scheduled_callbacks=$_POST["scheduled_callbacks"];} +if (isset($_GET["script_comments"])) {$script_comments=$_GET["script_comments"];} + elseif (isset($_POST["script_comments"])) {$script_comments=$_POST["script_comments"];} +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_text"])) {$script_text=$_GET["script_text"];} + elseif (isset($_POST["script_text"])) {$script_text=$_POST["script_text"];} +if (isset($_GET["selectable"])) {$selectable=$_GET["selectable"];} + elseif (isset($_POST["selectable"])) {$selectable=$_POST["selectable"];} +if (isset($_GET["server_description"])) {$server_description=$_GET["server_description"];} + elseif (isset($_POST["server_description"])) {$server_description=$_POST["server_description"];} +if (isset($_GET["server_id"])) {$server_id=$_GET["server_id"];} + elseif (isset($_POST["server_id"])) {$server_id=$_POST["server_id"];} +if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} + elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} +if (isset($_GET["stage"])) {$stage=$_GET["stage"];} + elseif (isset($_POST["stage"])) {$stage=$_POST["stage"];} +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["status"])) {$status=$_GET["status"];} + elseif (isset($_POST["status"])) {$status=$_POST["status"];} +if (isset($_GET["status_name"])) {$status_name=$_GET["status_name"];} + elseif (isset($_POST["status_name"])) {$status_name=$_POST["status_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"];} +if (isset($_GET["sys_perf_log"])) {$sys_perf_log=$_GET["sys_perf_log"];} + elseif (isset($_POST["sys_perf_log"])) {$sys_perf_log=$_POST["sys_perf_log"];} +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["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["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["user"])) {$user=$_GET["user"];} + elseif (isset($_POST["user"])) {$user=$_POST["user"];} +if (isset($_GET["user_group"])) {$user_group=$_GET["user_group"];} + elseif (isset($_POST["user_group"])) {$user_group=$_POST["user_group"];} +if (isset($_GET["user_level"])) {$user_level=$_GET["user_level"];} + elseif (isset($_POST["user_level"])) {$user_level=$_POST["user_level"];} +if (isset($_GET["user_start"])) {$user_start=$_GET["user_start"];} + elseif (isset($_POST["user_start"])) {$user_start=$_POST["user_start"];} +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["vd_server_logs"])) {$vd_server_logs=$_GET["vd_server_logs"];} + elseif (isset($_POST["vd_server_logs"])) {$vd_server_logs=$_POST["vd_server_logs"];} +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["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["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["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["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["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["voicemail_ext"])) {$voicemail_ext=$_GET["voicemail_ext"];} + elseif (isset($_POST["voicemail_ext"])) {$voicemail_ext=$_POST["voicemail_ext"];} +if (isset($_GET["voicemail_exten"])) {$voicemail_exten=$_GET["voicemail_exten"];} + elseif (isset($_POST["voicemail_exten"])) {$voicemail_exten=$_POST["voicemail_exten"];} +if (isset($_GET["voicemail_id"])) {$voicemail_id=$_GET["voicemail_id"];} + elseif (isset($_POST["voicemail_id"])) {$voicemail_id=$_POST["voicemail_id"];} +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["wrapup_message"])) {$wrapup_message=$_GET["wrapup_message"];} + elseif (isset($_POST["wrapup_message"])) {$wrapup_message=$_POST["wrapup_message"];} +if (isset($_GET["wrapup_seconds"])) {$wrapup_seconds=$_GET["wrapup_seconds"];} + elseif (isset($_POST["wrapup_seconds"])) {$wrapup_seconds=$_POST["wrapup_seconds"];} +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["vicidial_balance_active"])) {$vicidial_balance_active=$_GET["vicidial_balance_active"];} + elseif (isset($_POST["vicidial_balance_active"])) {$vicidial_balance_active=$_POST["vicidial_balance_active"];} +if (isset($_GET["balance_trunks_offlimits"])) {$balance_trunks_offlimits=$_GET["balance_trunks_offlimits"];} + elseif (isset($_POST["balance_trunks_offlimits"])) {$balance_trunks_offlimits=$_POST["balance_trunks_offlimits"];} +if (isset($_GET["dedicated_trunks"])) {$dedicated_trunks=$_GET["dedicated_trunks"];} + elseif (isset($_POST["dedicated_trunks"])) {$dedicated_trunks=$_POST["dedicated_trunks"];} +if (isset($_GET["trunk_restriction"])) {$trunk_restriction=$_GET["trunk_restriction"];} + elseif (isset($_POST["trunk_restriction"])) {$trunk_restriction=$_POST["trunk_restriction"];} +if (isset($_GET["campaigns"])) {$campaigns=$_GET["campaigns"];} + elseif (isset($_POST["campaigns"])) {$campaigns=$_POST["campaigns"];} +if (isset($_GET["dial_level_override"])) {$dial_level_override=$_GET["dial_level_override"];} + elseif (isset($_POST["dial_level_override"])) {$dial_level_override=$_POST["dial_level_override"];} +if (isset($_GET["concurrent_transfers"])) {$concurrent_transfers=$_GET["concurrent_transfers"];} + elseif (isset($_POST["concurrent_transfers"])) {$concurrent_transfers=$_POST["concurrent_transfers"];} +if (isset($_GET["auto_alt_dial"])) {$auto_alt_dial=$_GET["auto_alt_dial"];} + elseif (isset($_POST["auto_alt_dial"])) {$auto_alt_dial=$_POST["auto_alt_dial"];} +if (isset($_GET["modify_users"])) {$modify_users=$_GET["modify_users"];} + elseif (isset($_POST["modify_users"])) {$modify_users=$_POST["modify_users"];} +if (isset($_GET["modify_campaigns"])) {$modify_campaigns=$_GET["modify_campaigns"];} + elseif (isset($_POST["modify_campaigns"])) {$modify_campaigns=$_POST["modify_campaigns"];} +if (isset($_GET["modify_lists"])) {$modify_lists=$_GET["modify_lists"];} + elseif (isset($_POST["modify_lists"])) {$modify_lists=$_POST["modify_lists"];} +if (isset($_GET["modify_scripts"])) {$modify_scripts=$_GET["modify_scripts"];} + elseif (isset($_POST["modify_scripts"])) {$modify_scripts=$_POST["modify_scripts"];} +if (isset($_GET["modify_filters"])) {$modify_filters=$_GET["modify_filters"];} + elseif (isset($_POST["modify_filters"])) {$modify_filters=$_POST["modify_filters"];} +if (isset($_GET["modify_ingroups"])) {$modify_ingroups=$_GET["modify_ingroups"];} + elseif (isset($_POST["modify_ingroups"])) {$modify_ingroups=$_POST["modify_ingroups"];} +if (isset($_GET["modify_usergroups"])) {$modify_usergroups=$_GET["modify_usergroups"];} + elseif (isset($_POST["modify_usergroups"])) {$modify_usergroups=$_POST["modify_usergroups"];} +if (isset($_GET["modify_remoteagents"])) {$modify_remoteagents=$_GET["modify_remoteagents"];} + elseif (isset($_POST["modify_remoteagents"])) {$modify_remoteagents=$_POST["modify_remoteagents"];} +if (isset($_GET["modify_servers"])) {$modify_servers=$_GET["modify_servers"];} + elseif (isset($_POST["modify_servers"])) {$modify_servers=$_POST["modify_servers"];} +if (isset($_GET["view_reports"])) {$view_reports=$_GET["view_reports"];} + elseif (isset($_POST["view_reports"])) {$view_reports=$_POST["view_reports"];} +if (isset($_GET["agent_pause_codes_active"])) {$agent_pause_codes_active=$_GET["agent_pause_codes_active"];} + elseif (isset($_POST["agent_pause_codes_active"])) {$agent_pause_codes_active=$_POST["agent_pause_codes_active"];} +if (isset($_GET["pause_code"])) {$pause_code=$_GET["pause_code"];} + elseif (isset($_POST["pause_code"])) {$pause_code=$_POST["pause_code"];} +if (isset($_GET["pause_code_name"])) {$pause_code_name=$_GET["pause_code_name"];} + elseif (isset($_POST["pause_code_name"])) {$pause_code_name=$_POST["pause_code_name"];} +if (isset($_GET["billable"])) {$billable=$_GET["billable"];} + elseif (isset($_POST["billable"])) {$billable=$_POST["billable"];} +if (isset($_GET["campaign_description"])) {$campaign_description=$_GET["campaign_description"];} + elseif (isset($_POST["campaign_description"])) {$campaign_description=$_POST["campaign_description"];} +if (isset($_GET["campaign_stats_refresh"])) {$campaign_stats_refresh=$_GET["campaign_stats_refresh"];} + elseif (isset($_POST["campaign_stats_refresh"])){$campaign_stats_refresh=$_POST["campaign_stats_refresh"];} +if (isset($_GET["list_description"])) {$list_description=$_GET["list_description"];} + elseif (isset($_POST["list_description"])) {$list_description=$_POST["list_description"];} +if (isset($_GET["vicidial_recording_override"])) {$vicidial_recording_override=$_GET["vicidial_recording_override"];} elseif (isset($_POST["vicidial_recording_override"])) {$vicidial_recording_override=$_POST["vicidial_recording_override"];} +if (isset($_GET["use_non_latin"])) {$use_non_latin=$_GET["use_non_latin"];} + elseif (isset($_POST["use_non_latin"])) {$use_non_latin=$_POST["use_non_latin"];} +if (isset($_GET["webroot_writable"])) {$webroot_writable=$_GET["webroot_writable"];} + elseif (isset($_POST["webroot_writable"])) {$webroot_writable=$_POST["webroot_writable"];} +if (isset($_GET["enable_queuemetrics_logging"])) {$enable_queuemetrics_logging=$_GET["enable_queuemetrics_logging"];} + elseif (isset($_POST["enable_queuemetrics_logging"])) {$enable_queuemetrics_logging=$_POST["enable_queuemetrics_logging"];} +if (isset($_GET["queuemetrics_server_ip"])) {$queuemetrics_server_ip=$_GET["queuemetrics_server_ip"];} + elseif (isset($_POST["queuemetrics_server_ip"])) {$queuemetrics_server_ip=$_POST["queuemetrics_server_ip"];} +if (isset($_GET["queuemetrics_dbname"])) {$queuemetrics_dbname=$_GET["queuemetrics_dbname"];} + elseif (isset($_POST["queuemetrics_dbname"])) {$queuemetrics_dbname=$_POST["queuemetrics_dbname"];} +if (isset($_GET["queuemetrics_login"])) {$queuemetrics_login=$_GET["queuemetrics_login"];} + elseif (isset($_POST["queuemetrics_login"])) {$queuemetrics_login=$_POST["queuemetrics_login"];} +if (isset($_GET["queuemetrics_pass"])) {$queuemetrics_pass=$_GET["queuemetrics_pass"];} + elseif (isset($_POST["queuemetrics_pass"])) {$queuemetrics_pass=$_POST["queuemetrics_pass"];} +if (isset($_GET["queuemetrics_url"])) {$queuemetrics_url=$_GET["queuemetrics_url"];} + elseif (isset($_POST["queuemetrics_url"])) {$queuemetrics_url=$_POST["queuemetrics_url"];} +if (isset($_GET["queuemetrics_log_id"])) {$queuemetrics_log_id=$_GET["queuemetrics_log_id"];} + elseif (isset($_POST["queuemetrics_log_id"])) {$queuemetrics_log_id=$_POST["queuemetrics_log_id"];} +if (isset($_GET["dial_status"])) {$dial_status=$_GET["dial_status"];} + elseif (isset($_POST["dial_status"])) {$dial_status=$_POST["dial_status"];} +if (isset($_GET["queuemetrics_eq_prepend"])) {$queuemetrics_eq_prepend=$_GET["queuemetrics_eq_prepend"];} + elseif (isset($_POST["queuemetrics_eq_prepend"])) {$queuemetrics_eq_prepend=$_POST["queuemetrics_eq_prepend"];} +if (isset($_GET["vicidial_agent_disable"])) {$vicidial_agent_disable=$_GET["vicidial_agent_disable"];} + elseif (isset($_POST["vicidial_agent_disable"])) {$vicidial_agent_disable=$_POST["vicidial_agent_disable"];} +if (isset($_GET["disable_alter_custdata"])) {$disable_alter_custdata=$_GET["disable_alter_custdata"];} + elseif (isset($_POST["disable_alter_custdata"])) {$disable_alter_custdata=$_POST["disable_alter_custdata"];} +if (isset($_GET["alter_custdata_override"])) {$alter_custdata_override=$_GET["alter_custdata_override"];} + elseif (isset($_POST["alter_custdata_override"])) {$alter_custdata_override=$_POST["alter_custdata_override"];} +if (isset($_GET["no_hopper_leads_logins"])) {$no_hopper_leads_logins=$_GET["no_hopper_leads_logins"];} + elseif (isset($_POST["no_hopper_leads_logins"])) {$no_hopper_leads_logins=$_POST["no_hopper_leads_logins"];} +if (isset($_GET["enable_sipsak_messages"])) {$enable_sipsak_messages=$_GET["enable_sipsak_messages"];} + elseif (isset($_POST["enable_sipsak_messages"])) {$enable_sipsak_messages=$_POST["enable_sipsak_messages"];} +if (isset($_GET["allow_sipsak_messages"])) {$allow_sipsak_messages=$_GET["allow_sipsak_messages"];} + elseif (isset($_POST["allow_sipsak_messages"])) {$allow_sipsak_messages=$_POST["allow_sipsak_messages"];} +if (isset($_GET["admin_home_url"])) {$admin_home_url=$_GET["admin_home_url"];} + elseif (isset($_POST["admin_home_url"])) {$admin_home_url=$_POST["admin_home_url"];} + + + if (isset($script_id)) {$script_id= strtoupper($script_id);} + if (isset($lead_filter_id)) {$lead_filter_id = strtoupper($lead_filter_id);} + +if (strlen($dial_status) > 0) + { + $ADD='28'; + $status = $dial_status; + } + +##### BEGIN VARIABLE FILTERING FOR SECURITY ##### + +if ($non_latin < 1) +{ +### DIGITS ONLY ### +$adaptive_dropped_percentage = ereg_replace("[^0-9]","",$adaptive_dropped_percentage); +$adaptive_latest_server_time = ereg_replace("[^0-9]","",$adaptive_latest_server_time); +$admin_hangup_enabled = ereg_replace("[^0-9]","",$admin_hangup_enabled); +$admin_hijack_enabled = ereg_replace("[^0-9]","",$admin_hijack_enabled); +$admin_monitor_enabled = ereg_replace("[^0-9]","",$admin_monitor_enabled); +$AFLogging_enabled = ereg_replace("[^0-9]","",$AFLogging_enabled); +$agent_choose_ingroups = ereg_replace("[^0-9]","",$agent_choose_ingroups); +$agentcall_manual = ereg_replace("[^0-9]","",$agentcall_manual); +$agentonly_callbacks = ereg_replace("[^0-9]","",$agentonly_callbacks); +$AGI_call_logging_enabled = ereg_replace("[^0-9]","",$AGI_call_logging_enabled); +$allcalls_delay = ereg_replace("[^0-9]","",$allcalls_delay); +$alter_agent_interface_options = ereg_replace("[^0-9]","",$alter_agent_interface_options); +$am_message_exten = ereg_replace("[^0-9]","",$am_message_exten); +$answer_transfer_agent = ereg_replace("[^0-9]","",$answer_transfer_agent); +$ast_admin_access = ereg_replace("[^0-9]","",$ast_admin_access); +$ast_delete_phones = ereg_replace("[^0-9]","",$ast_delete_phones); +$attempt_delay = ereg_replace("[^0-9]","",$attempt_delay); +$attempt_maximum = ereg_replace("[^0-9]","",$attempt_maximum); +$auto_dial_next_number = ereg_replace("[^0-9]","",$auto_dial_next_number); +$balance_trunks_offlimits = ereg_replace("[^0-9]","",$balance_trunks_offlimits); +$call_parking_enabled = ereg_replace("[^0-9]","",$call_parking_enabled); +$CallerID_popup_enabled = ereg_replace("[^0-9]","",$CallerID_popup_enabled); +$campaign_detail = ereg_replace("[^0-9]","",$campaign_detail); +$campaign_rec_exten = ereg_replace("[^0-9]","",$campaign_rec_exten); +$campaign_vdad_exten = ereg_replace("[^0-9]","",$campaign_vdad_exten); +$change_agent_campaign = ereg_replace("[^0-9]","",$change_agent_campaign); +$closer_default_blended = ereg_replace("[^0-9]","",$closer_default_blended); +$conf_exten = ereg_replace("[^0-9]","",$conf_exten); +$conf_on_extension = ereg_replace("[^0-9]","",$conf_on_extension); +$conferencing_enabled = ereg_replace("[^0-9]","",$conferencing_enabled); +$ct_default_start = ereg_replace("[^0-9]","",$ct_default_start); +$ct_default_stop = ereg_replace("[^0-9]","",$ct_default_stop); +$ct_friday_start = ereg_replace("[^0-9]","",$ct_friday_start); +$ct_friday_stop = ereg_replace("[^0-9]","",$ct_friday_stop); +$ct_monday_start = ereg_replace("[^0-9]","",$ct_monday_start); +$ct_monday_stop = ereg_replace("[^0-9]","",$ct_monday_stop); +$ct_saturday_start = ereg_replace("[^0-9]","",$ct_saturday_start); +$ct_saturday_stop = ereg_replace("[^0-9]","",$ct_saturday_stop); +$ct_sunday_start = ereg_replace("[^0-9]","",$ct_sunday_start); +$ct_sunday_stop = ereg_replace("[^0-9]","",$ct_sunday_stop); +$ct_thursday_start = ereg_replace("[^0-9]","",$ct_thursday_start); +$ct_thursday_stop = ereg_replace("[^0-9]","",$ct_thursday_stop); +$ct_tuesday_start = ereg_replace("[^0-9]","",$ct_tuesday_start); +$ct_tuesday_stop = ereg_replace("[^0-9]","",$ct_tuesday_stop); +$ct_wednesday_start = ereg_replace("[^0-9]","",$ct_wednesday_start); +$ct_wednesday_stop = ereg_replace("[^0-9]","",$ct_wednesday_stop); +$DBX_port = ereg_replace("[^0-9]","",$DBX_port); +$DBY_port = ereg_replace("[^0-9]","",$DBY_port); +$dedicated_trunks = ereg_replace("[^0-9]","",$dedicated_trunks); +$delete_call_times = ereg_replace("[^0-9]","",$delete_call_times); +$delete_campaigns = ereg_replace("[^0-9]","",$delete_campaigns); +$delete_filters = ereg_replace("[^0-9]","",$delete_filters); +$delete_ingroups = ereg_replace("[^0-9]","",$delete_ingroups); +$delete_lists = ereg_replace("[^0-9]","",$delete_lists); +$delete_remote_agents = ereg_replace("[^0-9]","",$delete_remote_agents); +$delete_scripts = ereg_replace("[^0-9]","",$delete_scripts); +$delete_user_groups = ereg_replace("[^0-9]","",$delete_user_groups); +$delete_users = ereg_replace("[^0-9]","",$delete_users); +$dial_timeout = ereg_replace("[^0-9]","",$dial_timeout); +$dialplan_number = ereg_replace("[^0-9]","",$dialplan_number); +$drop_call_seconds = ereg_replace("[^0-9]","",$drop_call_seconds); +$drop_exten = ereg_replace("[^0-9]","",$drop_exten); +$enable_fast_refresh = ereg_replace("[^0-9]","",$enable_fast_refresh); +$enable_persistant_mysql = ereg_replace("[^0-9]","",$enable_persistant_mysql); +$fast_refresh_rate = ereg_replace("[^0-9]","",$fast_refresh_rate); +$hopper_level = ereg_replace("[^0-9]","",$hopper_level); +$hotkey = ereg_replace("[^0-9]","",$hotkey); +$hotkeys_active = ereg_replace("[^0-9]","",$hotkeys_active); +$list_id = ereg_replace("[^0-9]","",$list_id); +$load_leads = ereg_replace("[^0-9]","",$load_leads); +$max_vicidial_trunks = ereg_replace("[^0-9]","",$max_vicidial_trunks); +$modify_call_times = ereg_replace("[^0-9]","",$modify_call_times); +$modify_users = ereg_replace("[^0-9]","",$modify_users); +$modify_campaigns = ereg_replace("[^0-9]","",$modify_campaigns); +$modify_lists = ereg_replace("[^0-9]","",$modify_lists); +$modify_scripts = ereg_replace("[^0-9]","",$modify_scripts); +$modify_filters = ereg_replace("[^0-9]","",$modify_filters); +$modify_ingroups = ereg_replace("[^0-9]","",$modify_ingroups); +$modify_usergroups = ereg_replace("[^0-9]","",$modify_usergroups); +$modify_remoteagents = ereg_replace("[^0-9]","",$modify_remoteagents); +$modify_servers = ereg_replace("[^0-9]","",$modify_servers); +$view_reports = ereg_replace("[^0-9]","",$view_reports); +$modify_leads = ereg_replace("[^0-9]","",$modify_leads); +$monitor_prefix = ereg_replace("[^0-9]","",$monitor_prefix); +$number_of_lines = ereg_replace("[^0-9]","",$number_of_lines); +$old_conf_exten = ereg_replace("[^0-9]","",$old_conf_exten); +$outbound_cid = ereg_replace("[^0-9]","",$outbound_cid); +$park_ext = ereg_replace("[^0-9]","",$park_ext); +$park_on_extension = ereg_replace("[^0-9]","",$park_on_extension); +$phone_number = ereg_replace("[^0-9]","",$phone_number); +$QUEUE_ACTION_enabled = ereg_replace("[^0-9]","",$QUEUE_ACTION_enabled); +$recording_exten = ereg_replace("[^0-9]","",$recording_exten); +$remote_agent_id = ereg_replace("[^0-9]","",$remote_agent_id); +$safe_harbor_exten = ereg_replace("[^0-9]","",$safe_harbor_exten); +$telnet_port = ereg_replace("[^0-9]","",$telnet_port); +$updater_check_enabled = ereg_replace("[^0-9]","",$updater_check_enabled); +$user_level = ereg_replace("[^0-9]","",$user_level); +$user_start = ereg_replace("[^0-9]","",$user_start); +$user_switching_enabled = ereg_replace("[^0-9]","",$user_switching_enabled); +$VDstop_rec_after_each_call = ereg_replace("[^0-9]","",$VDstop_rec_after_each_call); +$VICIDIAL_park_on_extension = ereg_replace("[^0-9]","",$VICIDIAL_park_on_extension); +$vicidial_recording = ereg_replace("[^0-9]","",$vicidial_recording); +$vicidial_transfers = ereg_replace("[^0-9]","",$vicidial_transfers); +$voicemail_button_enabled = ereg_replace("[^0-9]","",$voicemail_button_enabled); +$voicemail_dump_exten = ereg_replace("[^0-9]","",$voicemail_dump_exten); +$voicemail_ext = ereg_replace("[^0-9]","",$voicemail_ext); +$voicemail_exten = ereg_replace("[^0-9]","",$voicemail_exten); +$voicemail_id = ereg_replace("[^0-9]","",$voicemail_id); +$wrapup_seconds = ereg_replace("[^0-9]","",$wrapup_seconds); +$use_non_latin = ereg_replace("[^0-9]","",$use_non_latin); +$webroot_writable = ereg_replace("[^0-9]","",$webroot_writable); +$enable_queuemetrics_logging = ereg_replace("[^0-9]","",$enable_queuemetrics_logging); +$enable_sipsak_messages = ereg_replace("[^0-9]","",$enable_sipsak_messages); +$allow_sipsak_messages = ereg_replace("[^0-9]","",$allow_sipsak_messages); + +### 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); +$omit_phone_code = ereg_replace("[^NY]","",$omit_phone_code); +$available_only_ratio_tally = ereg_replace("[^NY]","",$available_only_ratio_tally); +$sys_perf_log = ereg_replace("[^NY]","",$sys_perf_log); +$vicidial_balance_active = ereg_replace("[^NY]","",$vicidial_balance_active); +$vd_server_logs = ereg_replace("[^NY]","",$vd_server_logs); +$agent_pause_codes_active = ereg_replace("[^NY]","",$agent_pause_codes_active); +$campaign_stats_refresh = ereg_replace("[^NY]","",$campaign_stats_refresh); +$disable_alter_custdata = ereg_replace("[^NY]","",$disable_alter_custdata); +$no_hopper_leads_logins = ereg_replace("[^NY]","",$no_hopper_leads_logins); + +### ALPHA-NUMERIC ONLY ### +$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); +$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); +$concurrent_transfers = ereg_replace("[^0-9a-zA-Z]","",$concurrent_transfers); +$billable = ereg_replace("[^0-9a-zA-Z]","",$billable); +$pause_code = ereg_replace("[^0-9a-zA-Z]","",$pause_code); +$vicidial_recording_override = ereg_replace("[^0-9a-zA-Z]","",$vicidial_recording_override); +$queuemetrics_log_id = ereg_replace("[^0-9a-zA-Z]","",$queuemetrics_log_id); + +### DIGITS and Dots +$server_ip = ereg_replace("[^\.0-9]","",$server_ip); +$auto_dial_level = ereg_replace("[^\.0-9]","",$auto_dial_level); +$adaptive_maximum_level = ereg_replace("[^\.0-9]","",$adaptive_maximum_level); +$phone_ip = ereg_replace("[^\.0-9]","",$phone_ip); +$old_server_ip = ereg_replace("[^\.0-9]","",$old_server_ip); +$computer_ip = ereg_replace("[^\.0-9]","",$computer_ip); +$queuemetrics_server_ip = ereg_replace("[^\.0-9]","",$queuemetrics_server_ip); + +### ALPHA-NUMERIC and spaces and hash and star and comma +$xferconf_a_dtmf = ereg_replace("[^ \,\*\#0-9a-zA-Z]","",$xferconf_a_dtmf); +$xferconf_b_dtmf = ereg_replace("[^ \,\*\#0-9a-zA-Z]","",$xferconf_b_dtmf); + +### ALPHACAPS-NUMERIC +$xferconf_a_number = ereg_replace("[^0-9A-Z]","",$xferconf_a_number); +$xferconf_b_number = ereg_replace("[^0-9A-Z]","",$xferconf_b_number); + +### ALPHA-NUMERIC and underscore and dash +$agi_output = ereg_replace("[^-\_0-9a-zA-Z]","",$agi_output); +$ASTmgrSECRET = ereg_replace("[^-\_0-9a-zA-Z]","",$ASTmgrSECRET); +$ASTmgrUSERNAME = ereg_replace("[^-\_0-9a-zA-Z]","",$ASTmgrUSERNAME); +$ASTmgrUSERNAMElisten = ereg_replace("[^-\_0-9a-zA-Z]","",$ASTmgrUSERNAMElisten); +$ASTmgrUSERNAMEsend = ereg_replace("[^-\_0-9a-zA-Z]","",$ASTmgrUSERNAMEsend); +$ASTmgrUSERNAMEupdate = ereg_replace("[^-\_0-9a-zA-Z]","",$ASTmgrUSERNAMEupdate); +$call_time_id = ereg_replace("[^-\_0-9a-zA-Z]","",$call_time_id); +$campaign_id = ereg_replace("[^-\_0-9a-zA-Z]","",$campaign_id); +$CoNfIrM = ereg_replace("[^-\_0-9a-zA-Z]","",$CoNfIrM); +$DBX_database = ereg_replace("[^-\_0-9a-zA-Z]","",$DBX_database); +$DBX_pass = ereg_replace("[^-\_0-9a-zA-Z]","",$DBX_pass); +$DBX_user = ereg_replace("[^-\_0-9a-zA-Z]","",$DBX_user); +$DBY_database = ereg_replace("[^-\_0-9a-zA-Z]","",$DBY_database); +$DBY_pass = ereg_replace("[^-\_0-9a-zA-Z]","",$DBY_pass); +$DBY_user = ereg_replace("[^-\_0-9a-zA-Z]","",$DBY_user); +$dial_method = ereg_replace("[^-\_0-9a-zA-Z]","",$dial_method); +$dial_status_a = ereg_replace("[^-\_0-9a-zA-Z]","",$dial_status_a); +$dial_status_b = ereg_replace("[^-\_0-9a-zA-Z]","",$dial_status_b); +$dial_status_c = ereg_replace("[^-\_0-9a-zA-Z]","",$dial_status_c); +$dial_status_d = ereg_replace("[^-\_0-9a-zA-Z]","",$dial_status_d); +$dial_status_e = ereg_replace("[^-\_0-9a-zA-Z]","",$dial_status_e); +$ext_context = ereg_replace("[^-\_0-9a-zA-Z]","",$ext_context); +$group_id = ereg_replace("[^-\_0-9a-zA-Z]","",$group_id); +$lead_filter_id = ereg_replace("[^-\_0-9a-zA-Z]","",$lead_filter_id); +$local_call_time = ereg_replace("[^-\_0-9a-zA-Z]","",$local_call_time); +$login = ereg_replace("[^-\_0-9a-zA-Z]","",$login); +$login_campaign = ereg_replace("[^-\_0-9a-zA-Z]","",$login_campaign); +$login_pass = ereg_replace("[^-\_0-9a-zA-Z]","",$login_pass); +$login_user = ereg_replace("[^-\_0-9a-zA-Z]","",$login_user); +$next_agent_call = ereg_replace("[^-\_0-9a-zA-Z]","",$next_agent_call); +$old_campaign_id = ereg_replace("[^-\_0-9a-zA-Z]","",$old_campaign_id); +$old_server_id = ereg_replace("[^-\_0-9a-zA-Z]","",$old_server_id); +$OLDuser_group = ereg_replace("[^-\_0-9a-zA-Z]","",$OLDuser_group); +$park_file_name = ereg_replace("[^-\_0-9a-zA-Z]","",$park_file_name); +$pass = ereg_replace("[^-\_0-9a-zA-Z]","",$pass); +$phone_login = ereg_replace("[^-\_0-9a-zA-Z]","",$phone_login); +$phone_pass = ereg_replace("[^-\_0-9a-zA-Z]","",$phone_pass); +$PHP_AUTH_PW = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_PW); +$PHP_AUTH_USER = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_USER); +$protocol = ereg_replace("[^-\_0-9a-zA-Z]","",$protocol); +$server_id = ereg_replace("[^-\_0-9a-zA-Z]","",$server_id); +$stage = ereg_replace("[^-\_0-9a-zA-Z]","",$stage); +$state_rule = ereg_replace("[^-\_0-9a-zA-Z]","",$state_rule); +$status = ereg_replace("[^-\_0-9a-zA-Z]","",$status); +$trunk_restriction = ereg_replace("[^-\_0-9a-zA-Z]","",$trunk_restriction); +$user = ereg_replace("[^-\_0-9a-zA-Z]","",$user); +$user_group = ereg_replace("[^-\_0-9a-zA-Z]","",$user_group); +$VICIDIAL_park_on_filename = ereg_replace("[^-\_0-9a-zA-Z]","",$VICIDIAL_park_on_filename); +$auto_alt_dial = ereg_replace("[^-\_0-9a-zA-Z]","",$auto_alt_dial); +$dial_status = ereg_replace("[^-\_0-9a-zA-Z]","",$dial_status); +$queuemetrics_eq_prepend = ereg_replace("[^-\_0-9a-zA-Z]","",$queuemetrics_eq_prepend); +$vicidial_agent_disable = ereg_replace("[^-\_0-9a-zA-Z]","",$vicidial_agent_disable); +$alter_custdata_override = ereg_replace("[^-\_0-9a-zA-Z]","",$alter_custdata_override); + +### 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 +$adaptive_dl_diff_target = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$adaptive_dl_diff_target); +$adaptive_intensity = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$adaptive_intensity); +$asterisk_version = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$asterisk_version); +$call_time_comments = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$call_time_comments); +$call_time_name = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$call_time_name); +$campaign_name = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$campaign_name); +$campaign_rec_filename = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$campaign_rec_filename); +$company = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$company); +$full_name = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$full_name); +$fullname = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$fullname); +$group_name = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$group_name); +$HKstatus = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$HKstatus); +$lead_filter_comments = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$lead_filter_comments); +$lead_filter_name = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$lead_filter_name); +$list_name = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$list_name); +$local_gmt = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$local_gmt); +$phone_type = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$phone_type); +$picture = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$picture); +$script_comments = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$script_comments); +$script_name = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$script_name); +$server_description = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$server_description); +$status = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$status); +$status_name = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$status_name); +$wrapup_message = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$wrapup_message); +$pause_code_name = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$pause_code_name); +$campaign_description = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$campaign_description); +$list_description = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$list_description); + +### ALPHA-NUMERIC and underscore and dash and slash and at and dot +$call_out_number_group = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$call_out_number_group); +$client_browser = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$client_browser); +$DBX_server = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$DBX_server); +$DBY_server = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$DBY_server); +$dtmf_send_extension = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$dtmf_send_extension); +$extension = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$extension); +$install_directory = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$install_directory); +$old_extension = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$old_extension); +$telnet_host = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$telnet_host); +$queuemetrics_dbname = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$queuemetrics_dbname); +$queuemetrics_login = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$queuemetrics_login); +$queuemetrics_pass = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$queuemetrics_pass); + +### remove semi-colons ### +$lead_filter_sql = ereg_replace(";","",$lead_filter_sql); + +### VARIABLES TO BE mysql_real_escape_string ### +# $web_form_address +# $queuemetrics_url +# $admin_home_url + +### VARIABLES not filtered at all ### +# $script_text + +} # end of non_latin + + +##### END VARIABLE FILTERING FOR SECURITY ##### + + +# AST GUI database administration +# admin.php +# +# CHANGELOG: +# 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 +# 60808-1147 - Changed filtering for and added instructions for consutative transfers +# 60816-1552 - Added allcalls_delay start delay for recordings in vicidial.php +# 60817-2226 - Fixed bug that would not allow lead recycling of non-selectable statuses +# 60821-1543 - Added option to Omit Phone Code while dialing in vicidial +# 60821-1625 - Added ALLFORCE recording option for campaign_recording +# 60823-1154 - Added fields for adaptive dialing +# 60824-1326 - Added adaptive_latest_target_gmt for ADAPT_TAPERED dial method +# 60825-1205 - Added adaptive_intensity for ADAPT_ dial methods +# 60828-1019 - Changed adaptive_latest_target_gmt to adaptive_latest_server_time +# 60828-1115 - Added adaptive_dl_diff_target and changed intensity dropdown +# 60927-1246 - Added astguiclient/admin.php functions under SERVERS tab +# 61002-1402 - Added fields for vicidial balance trunk controls +# 61003-1123 - Added functions for vicidial_server_trunks records +# 61109-1022 - Added Emergency VDAC Jam Clear function to Campaign Detail screen +# 61110-1502 - Add ability to select NONE in dial statuses, new list_id must not be < 100 +# 61122-1228 - Added user group campaign restrictions +# 61122-1535 - Changed script_text to unfiltered and added more variables to SCRIPTS +# 61129-1028 - Added headers to Users and Phones with clickable order-by titles +# 70108-1405 - Added ADAPT OVERRIDE to allow for forced dial_level changes in ADAPT dial methods +# - Screen width definable at top of script, merged server_stats into this script +# 70109-1638 - Added ALTPH2 and ADDR3 hotkey options for alt number dialing with HotKeys +# 70109-1716 - Added concurrent_transfers option to vicidial_campaigns +# 70115-1152 - Aded (CLOSER|BLEND|INBND|_C$|_B$|_I$) options for CLOSER-type campaigns +# 70115-1532 - Added auto_alt_dial field to campaign screen for auto-dialing of alt numbers +# 70116-1200 - Added auto_alt_dial_status functionality to campaign screen +# 70117-1235 - Added header formatting variables at top of script +# - Moved Call Times and Phones/Server functions to Admin section +# 70118-1706 - Added new user group displays and links +# 70123-1519 - Added user permission settings for all sections +# 70124-1346 - Fixed spelling errors and formatting consistency +# 70202-1120 - Added agent_pause_codes section to campaigns +# 70205-1204 - Added memo, last dialed, timestamp and stats-refresh fields to vicidial_campaigns/lists +# 70206-1323 - Added user setting for vicidial_recording_override +# 70212-1412 - Added system settings section +# 70214-1226 - Added QueueMetrics Log ID field to system settings section +# 70219-1102 - Changed campaign dial statuses to be one string allowing for high limit +# 70223-0957 - Added queuemetrics_eq_prepend for custom ENTERQUEUE prepending of a field +# 70302-1111 - Fixed small bug in dialable leads calculation +# 70314-1133 - Added insert selection on script forms +# 70319-1423 - Added Alter Customer Data and agent disable display functions +# 70319-1625 - Added option to allow agents to login to outbound campaigns with no leads in the hopper +# 70322-1455 - Added sipsak messages parameters +# 70402-1157 - Added HOME link and entry to system_settings table, added QM link on reports section + +# make sure you have added a user to the vicidial_users MySQL table with at least user_level 8 to access this page the first time + +$admin_version = '2.0.95'; +$build = '70402-1157'; + +$STARTtime = date("U"); +$SQLdate = date("Y-m-d H:i:s"); + + +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]; + $LOGuser_group =$row[5]; + $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]; + $LOGast_admin_access =$row[16]; + $LOGast_delete_phones =$row[17]; + $LOGdelete_scripts =$row[18]; + $LOGdelete_filters =$row[29]; + $LOGalter_agent_interface =$row[30]; + $LOGdelete_call_times =$row[32]; + $LOGmodify_call_times =$row[33]; + $LOGmodify_users =$row[34]; + $LOGmodify_campaigns =$row[35]; + $LOGmodify_lists =$row[36]; + $LOGmodify_scripts =$row[37]; + $LOGmodify_filters =$row[38]; + $LOGmodify_ingroups =$row[39]; + $LOGmodify_usergroups =$row[40]; + $LOGmodify_remoteagents =$row[41]; + $LOGmodify_servers =$row[42]; + $LOGview_reports =$row[43]; + + $stmt="SELECT allowed_campaigns from vicidial_user_groups where user_group='$LOGuser_group';"; + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + $LOGallowed_campaigns =$row[0]; + + 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='admin'; $sh='times'; echo "Agregue El Nuevo Tiempo De la Llamada";} +if ($ADD==1111111111) {$hh='admin'; $sh='times'; echo "Agregue El Nuevo Tiempo De la Llamada Del Estado";} +if ($ADD==11111111111) {$hh='admin'; $sh='phones'; echo "NUEVO TELÉFONO";} +if ($ADD==111111111111) {$hh='admin'; $sh='server'; echo "NUEVO SERVIDOR";} +if ($ADD==1111111111111) {$hh='admin'; $sh='conference'; echo "NUEVA CONFERENCIA";} +if ($ADD==11111111111111) {$hh='admin'; $sh='conference'; echo "ADD NEW VICIDIAL CONFERENCE";} +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 "New Campaña HotKey Addition";} +if ($ADD==25) {$hh='campaigns'; echo "El Nuevo Plomo De la Campaña Recicla La Adición";} +if ($ADD==26) {$hh='campaigns'; echo "Nuevo Estado Del Dial Del Alt Del Automóvil";} +if ($ADD==27) {$hh='campaigns'; echo "Nuevo Código De la Pausa Del Agente";} +if ($ADD==28) {$hh='campaigns'; echo "Estado Del Dial De la Campaña Agregado";} +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='admin'; $sh='times'; echo "Nueva Adición Del Tiempo De la Llamada";} +if ($ADD==2111111111) {$hh='admin'; $sh='times'; echo "Nueva Adición Del Tiempo De la Llamada Del Estado";} +if ($ADD==21111111111) {$hh='admin'; $sh='phones'; echo "CREANDO TELÉFONO";} +if ($ADD==211111111111) {$hh='admin'; $sh='server'; echo "CREANDO SERVIDOR";} +if ($ADD==221111111111) {$hh='admin'; $sh='server'; echo "ADICIÓN DEL NUEVO EXPEDIENTE DEL TRONCO DEL SERVIDOR VICIDIAL";} +if ($ADD==2111111111111) {$hh='admin'; $sh='conference'; echo "CREANDO CONFERENCIA";} +if ($ADD==21111111111111) {$hh='admin'; $sh='conference'; echo "ADDING NEW VICIDIAL CONFERENCE";} +if ($ADD==3) {$hh='users'; echo "Modificar Usuario";} +if ($ADD==30) {$hh='campaigns'; echo "Campaña No permitida";} +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='admin'; $sh='times'; echo "Modifique El Tiempo De la Llamada";} +if ($ADD==321111111) {$hh='admin'; $sh='times'; echo "Modifique La Lista De las Definiciones Del Estado Del Tiempo De laLlamada";} +if ($ADD==3111111111) {$hh='admin'; $sh='times'; echo "Modifique El Tiempo De la Llamada Del Estado";} +if ($ADD==31111111111) {$hh='admin'; $sh='phones'; echo "MODIFICAR EL TELÉFONO";} +if ($ADD==311111111111) {$hh='admin'; $sh='server'; echo "MODIFICAR EL SERVIDOR";} +if ($ADD==3111111111111) {$hh='admin'; $sh='conference'; echo "MODIFICAR LA CONFERENCIA";} +if ($ADD==31111111111111) {$hh='admin'; $sh='conference'; echo "MODIFY VICIDIAL CONFERENCE";} +if ($ADD==311111111111111) {$hh='admin'; $sh='settings'; echo "MODIFIQUE LOS AJUSTES DEL SISTEMA DE VICIDIAL";} +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==47) {$hh='campaigns'; echo "Modifique El Código De la Pausa Del Agente";} +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='admin'; $sh='times'; echo "Modifique El Tiempo De la Llamada";} +if ($ADD==4111111111) {$hh='admin'; $sh='times'; echo "Modifique El Tiempo De la Llamada Del Estado";} +if ($ADD==41111111111) {$hh='admin'; $sh='phones'; echo "MODIFICAR EL TELÉFONO";} +if ($ADD==411111111111) {$hh='admin'; $sh='server'; echo "MODIFICAR EL SERVIDOR";} +if ($ADD==421111111111) {$hh='admin'; $sh='server'; echo "MODIFIQUE EL EXPEDIENTE DEL TRONCO DEL SERVIDOR VICIDIAL";} +if ($ADD==4111111111111) {$hh='admin'; $sh='conference'; echo "MODIFICAR LA CONFERENCIA";} +if ($ADD==41111111111111) {$hh='admin'; $sh='conference'; echo "MODIFY VICIDIAL CONFERENCE";} +if ($ADD==411111111111111) {$hh='admin'; $sh='settings'; echo "MODIFIQUE LOS AJUSTES DEL SISTEMA DE VICIDIAL";} +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==53) {$hh='campaigns'; echo "Claro Del Atasco De la Emergencia VDAC";} +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='admin'; $sh='times'; echo "Delete Call Time";} +if ($ADD==5111111111) {$hh='admin'; $sh='times'; echo "Tiempo De la Llamada Del Estado De la Cancelación";} +if ($ADD==51111111111) {$hh='admin'; $sh='phones'; echo "DELETE PHONE";} +if ($ADD==511111111111) {$hh='admin'; $sh='server'; echo "DELETE SERVER";} +if ($ADD==5111111111111) {$hh='admin'; $sh='conference'; echo "DELETE CONFERENCE";} +if ($ADD==51111111111111) {$hh='admin'; $sh='conference'; echo "DELETE VICIDIAL CONFERENCE";} +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==63) {$hh='campaigns'; echo "Claro Del Atasco De la Emergencia VDAC";} +if ($ADD==65) {$hh='campaigns'; echo "El Plomo De la Cancelación Recicla";} +if ($ADD==66) {$hh='campaigns'; echo "Estado Auto Del Dial Del Alt De la Cancelación";} +if ($ADD==67) {$hh='campaigns'; echo "Código De la Pausa Del Agente De la Cancelación";} +if ($ADD==68) {$hh='campaigns'; echo "El Estado Del Dial De la Campaña Quitó";} +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='admin'; $sh='times'; echo "Delete Call Time";} +if ($ADD==6111111111) {$hh='admin'; $sh='times'; echo "Tiempo De la Llamada Del Estado De la Cancelación";} +if ($ADD==61111111111) {$hh='admin'; $sh='phones'; echo "DELETE PHONE";} +if ($ADD==611111111111) {$hh='admin'; $sh='server'; echo "DELETE SERVER";} +if ($ADD==621111111111) {$hh='admin'; $sh='server'; echo "EXPEDIENTE DEL TRONCO DEL SERVIDOR VICIDIAL DE LA CANCELACIÓN";} +if ($ADD==6111111111111) {$hh='admin'; $sh='conference'; echo "DELETE CONFERENCE";} +if ($ADD==61111111111111) {$hh='admin'; $sh='conference'; echo "DELETE VICIDIAL CONFERENCE";} +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='lists'; echo "Servicios repetidos Dentro De la Lista";} +if ($ADD==8111) {$hh='usergroups'; echo "Servicios repetidos Dentro Del Grupo De Usuario";} +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='admin'; $sh='times'; echo "Tiempos De la Llamada";} +if ($ADD==1000000000) {$hh='admin'; $sh='times'; echo "Tiempos De la Llamada Del Estado";} +if ($ADD==10000000000) {$hh='admin'; $sh='phones'; echo "LISTA DE TELÉFONOS";} +if ($ADD==100000000000) {$hh='admin'; $sh='server'; echo "LISTA DE SERVIDORES";} +if ($ADD==1000000000000) {$hh='admin'; $sh='conference'; echo "LISTA DE CONFERENCIAS";} +if ($ADD==10000000000000) {$hh='admin'; $sh='conference'; echo "VICIDIAL LISTA DE CONFERENCIAS";} +if ($ADD==550) {$hh='users'; echo "Formulario De Búsqueda";} +if ($ADD==551) {$hh='users'; echo "BUSCAR TELÉFONOS";} +if ($ADD==660) {$hh='users'; echo "RESULTADOS DE LA BÚSQUEDA";} +if ($ADD==661) {$hh='users'; echo "RESULTADO DE LA BÚSQUEDA DE TELÉFONOS";} +if ($ADD==99999) {$hh='users'; echo "AYUDA";} +if ($ADD==999999) {$hh='reports'; echo "INFORMES";} + +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>20) and ($ADD<70)) or ($ADD=="4A") or ($ADD=="4B") or (strlen($ADD)==12) ) + { + ##### 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++; + } + + ##### BEGIN get inbound groups listing for checkboxes ##### + if ( (($ADD>20) and ($ADD<70)) and ($ADD!=41) ) + { + $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 .= " -";} + } + ##### END get inbound groups listing for checkboxes ##### + + + ##### BEGIN get campaigns listing for checkboxes ##### + if ( ($ADD==211111) or ($ADD==311111) or ($ADD==411111) or ($ADD==511111) or ($ADD==611111) ) + { + if ( ($ADD==211111) or ($ADD==311111) or ($ADD==511111) or ($ADD==611111) ) + { + $stmt="SELECT allowed_campaigns from vicidial_user_groups where user_group='$user_group';"; + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + $allowed_campaigns = $row[0]; + $allowed_campaigns = preg_replace("/ -$/","",$allowed_campaigns); + $campaigns = explode(" ", $allowed_campaigns); + echo "<!-- $allowed_campaigns -->"; + } + + $campaigns_value=''; + $campaigns_list='<B><input type="checkbox" name="campaigns[]" value="-ALL-CAMPAIGNS-"'; + $p=0; + while ($p<100) + { + if (eregi('ALL-CAMPAIGNS',$campaigns[$p])) + { + $campaigns_list.=" CHECKED"; + $campaigns_value .= " -ALL-CAMPAIGNS- -"; + } + $p++; + } + $campaigns_list.="> ALL-CAMPAIGNS - LOS USUARIOS PUEDEN VISIÓN CUALQUIER CAMPAÑA</B><BR>\n"; + + $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); + + $o=0; + while ($campaigns_to_print > $o) + { + $rowx=mysql_fetch_row($rslt); + $campaign_id_value = $rowx[0]; + $campaign_name_value = $rowx[1]; + $campaigns_list .= "<input type=\"checkbox\" name=\"campaigns[]\" value=\"$campaign_id_value\""; + $p=0; + while ($p<100) + { + if ($campaign_id_value == $campaigns[$p]) + { + # echo "<!-- X $p|$campaign_id_value|$campaigns[$p]| -->"; + $campaigns_list .= " CHECKED"; + $campaigns_value .= " $campaign_id_value"; + } + # echo "<!-- O $p|$campaign_id_value|$campaigns[$p]| -->"; + $p++; + } + $campaigns_list .= "> $campaign_id_value - $campaign_name_value<BR>\n"; + $o++; + } + if (strlen($campaigns_value)>2) {$campaigns_value .= " -";} + } + ##### END get campaigns listing for checkboxes ##### + + + if ( (strlen($ADD)==11) or (strlen($ADD)>12) ) + { + ##### 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++; + } + } + + + +$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. + +
+
+
+Hot Keys activo - esta opción si el sistema a 1 permite que el usuario utilice la función ra'pida-dispositioning de Hot Keys 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. + +
+
+
+Invalidación de la grabación de VICIDIAL - esta opción seeliminará lo que es la opción en la campaña para la grabación.LISIADO no eliminará el ajuste de la grabación de la campaña. NUNCAinhabilitará la grabación en el cliente. ONDEMAND es el defecto ypermite que el agente comience y pare a registrar según lonecesitado. ALLCALLS comenzará la grabación en el cliente siempreque una llamada se envíe a un agente. ALLFORCE comenzará lagrabación en el cliente siempre que una llamada se envíe a un agenteque no da al agente ninguna opción para parar el registrar. ParaALLCALLS y ALLFORCE hay una opción para utilizar la grabaciónretrasa para reducir en grabaciones y carga de sistema muy cortas delrecude. + +
+
+
+El agente altera la invalidación de los datos del cliente - estaopción se eliminará lo que es la opción en la campaña paraalterarse de los datos del cliente. NOT_ACTIVE utilizará lo que estápresente el ajuste para la campaña. ALLOW_ALTER permitirá siemprepara que el agente altere los datos del cliente, no importa qué es elajuste de la campaña. El defecto es NOT_ACTIVE. + +
+
+
+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. + +
+
+
+Modifique las secciones - estas opciones permiten que el usuariovisión y modifique cada uno los expedientes de las secciones. Si elsistema a 0, el usuario puede considerar la lista de la sección, perono el detalle o la pantalla de la modificación de un expediente enesa sección. + +
+
+
+La visión divulga - esta opción permite que el usuario visión losinformes de VICIDIAL. + + + + +



+ +VICIDIAL_CAMPAIGNS 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. + +
+
+
+Descripción de la campaña - esto es un campo de la nota para lacampaña, es opcional y puede ser un máximo de 255 caracteres enlongitud. + +
+
+
+Fecha del cambio de la campaña - ésta es la vez última que losajustes para esta campaña fueron modificados de cualquier manera. + +
+
+
+La fecha pasada de la conexión de la campaña - ésta es la vezúltima que un agente fue registrado en esta campaña. + +
+
+
+Los Stats de la campaña restauran - este checkbox permitirá queusted fuerce un stats vicidial restaura, incluso si la campaña no esactiva. + +
+
+
+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. Para agregar otro estado al dial, selecciónelo de la lista drop-downy el tecleo AGREGA. Para quitar uno de los estados del dial, chasqueencendido el acoplamiento del QUITAR al lado del estado que usteddesea quitar. + +
+
+
+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. + +
+
+
+Método del dial - Este campo es la manera de definir cómo el marcar debe ocurrir. Si el MANUAL entonces el auto_dial_level es bloqueado en 0 a menos que se cambie el método del dial. Si COCIENTE entonces el normal marcando un número de líneas para los agentes activos. ADAPT_HARD_LIMIT marcará predictively hasta el porcentaje caído y después no permitirá marcar agresivo una vez que se alcance el límite de la gota hasta que va el porcentaje abajo otra vez. ADAPT_TAPERED permite para el excedente de funcionamiento el porcentaje caído por la mitad primer de la cambio - según lo definido por el call_time seleccionado para la campaña y consigue más terminante mientras que se enciende la cambio. ADAPT_AVERAGE intenta mantener un promedio o el porcentaje caído que no impone límites duros tan agresivamente como los otros dos métodos. Usted no puede cambiar el nivel auto del dial si usted está en cualesquiera de los métodos del dial del ADAPTAR. Solamente el sintonizador puede cambiar el nivel del dial cuando en modo que marca profético. + +
+
+
+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. El checkbox de la INVALIDACIÓN del ADAPTAR permite que usted fuerceun nuevo nivel del dial aunque el método del dial está en un mododel ADAPTAR. Esto es útil si hay una cambio dramática en la calidadde plomos y usted desea cambiar drástico el dial_level manualmente. + +
+
+
+Solamente cuenta disponible - este campo si el sistema a Y deja haciafuera los agentes del estado de INCALL y de la COLETA al calcular elnúmero de llamadas al dial cuando no en modo de dial MANUAL. Eldefecto es N. + +
+
+
+Límite del porcentaje de la gota - este campo es donde usted fijó ellímite del porcentaje de llamadas caídas que usted quisiera mientrasque usaba un método adaptante-profe'tico del dial, NO MANUAL o delCOCIENTE. + +
+
+
+El máximo adapta el dial llano - este campo es donde usted fijó ellímite del límite al numbr de líneas que usted quisiera marcado poragente mientras que usaba un método adaptante-profe'tico del dial, NOMANUAL o del COCIENTE. Este número puede ser más alto que el nivelauto del dial si su hardware lo apoya. El valor debe ser un númeropositivo mayor de uno y puede tener defecto 3.0 de los lugaresdecimales. + +
+
+
+El tiempo más último del servidor - este campo es utilizadosolamente por el método del dial de ADAPT_TAPERED. Usted debe entraren la hora y el minuto que usted parará el invitar de esta campaña,2100 significaría que usted parará el marcar de esta campaña en eltiempo del servidor de los 9PM. Esto permite que el algoritmo afiladodecida a cómo agresivamente al dial cerca cuánto tiempo usted tienehasta que usted será el llamar acabado. + +
+
+
+Adapte el modificante de la intensidad - este campo se utiliza paraajustar la intensidad profética más alta o más baja. El más altoun número positivo que usted selecciona, mayor va el sintonizadoraumentará la llamada que establece el paso cuando para arriba y máslentamente va el sintonizador disminuirá la llamada que establece elpaso cuando abajo. Cuanto más bajo es el número negativo que ustedseleccionan aquí, más lentamente el sintonizador aumentará lallamada que establece el paso y más rápidamente el sintonizadorbajará la llamada que establece el paso cuando va abajo. El defectoes 0. Este campo no es utilizado por los métodos del dial del MANUALo del COCIENTE. + +
+
+
+Blanco llana de la diferencia del dial - este campo se utiliza paradefinir si usted desea apuntar tener un número específico de losagentes que esperan agentes de las llamadas o el esperar de llamadas.Por ejemplo si usted siempre quisiera tener en agente del promedio unolibre tomar llamadas inmediatamente usted fijaría esto a -1, si ustedquisiera apuntar siempre tener uno invita el asimiento que espera unagente que usted fijaría esto a 1. El defecto es 0. Este campo no esutilizado por los métodos del dial del MANUAL o del COCIENTE. + +
+
+
+Transferencias concurrentes - este ajuste se utiliza para definir elnúmero de las llamadas que se pueden enviar a los agentes en el mismotiempo. Se recomienda que este ajuste está dejado en el AUTOMÓVIL. Este campo no es utilizado por el método MANUAL del dial. + +
+
+
+Alt-Nu'mero auto que marca - este ajuste se utiliza para marcarautomáticamente campos alternos del número mientras que marca en elCOCIENTE y ADAPTA métodos del dial cuando no hay contacto en elnúmero de teléfono principal para un plomo, los estados del NA, deB, de la C.C. y de N. Este ajuste no es utilizado por el métodoMANUAL del dial. + +
+
+
+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 dial plan - extensions.conf. + +
+
+
+Omita el código del teléfono - este campo permite que usted dejehacia fuera el campo del phone_code mientras que marca dentro deVICIDIAL. Por ejemplo si usted está marcando en el Reino Unido delReino Unido usted tendría 44 adentro como su campo del phone_codepara todos los plomos, pero usted apenas desea marcar 10 dígitos ensu extensions.conf dial plan para poner llamadas en vez de 44 entonces10 dígitos. El defecto es N. + +
+
+
+Campaña CallerID - este campo permite enviar de un número de encargo del callerid en las llamadas de salida. Úste es el número que demostraría para arriba en el callerid de la persona que usted está llamando. El defecto es DESCONOCIDO. Esta opción está solamente disponible si usted está utilizando PRIs - ISDN T1 o E1 - que tienen la característica de encargo del callerid se giraron. Esta característica puede también trabajar con los troncos IAX2 dependiendo de lo que admite su abastecedor. El callerID de encargo se aplica solamente a las llamadas puestas para la campaña de VICIDIAL directamente, cualquier tercer persona llama o las transferencias no enviarán el callerID de encargo. NOTA: A veces el poner DESCONOCIDO o PRIVADO en el campo rendirá enviar de su número del callerID del defecto por su portador con las llamadas. Usted puede desear probar esto y poner 0000000000 en el campo del callerid en lugar de otro si usted no desea enviarle 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. NUNCAinhabilitará la grabación en el cliente. ONDEMAND es el defecto ypermite que el agente comience y pare a registrar según lonecesitado. ALLCALLS comenzará la grabación en el cliente siempreque una llamada se envíe a un agente. ALLFORCE comenzará lagrabación en el cliente siempre que una llamada se envíe a un agenteque no da al agente ninguna opción para parar el registrar. ParaALLCALLS y ALLFORCE hay una opción para utilizar la grabaciónretrasa para reducir en grabaciones y carga de sistema muy cortas delrecude. + +
+
+
+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. + +
+
+
+La registración retrasa - para la grabación de ALLCALLS y deALLFORCE solamente. Esta voluntad del ajuste retrasa comenzar de lagrabación en todas las llamadas para el número de los segundosespecificados en este campo. El defecto es 0. + +
+
+
+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 dial plan - 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. Si usted desea permitir transferencias consultivas, un fronter a unmás cercano, usted puede colocar CXFER pues uno de lasprecolocaciones del nu'mero-a-dial y del dial string apropiado seráenviado para hacer una transferencia consultiva local, entonces lalata LEAVE-3WAY-CALL justo del agente y movimiento encendido a sullamada siguiente. Si usted desea permitir transferencias ocultas declientes a una escritura de VICIDIAL AGI para registrar o un IVR,entonces coloque AXFER en el campo del nu'mero-a-dial. Usted puedetambién especificar una extensión de encargo después del AXFER odel CXFER, por ejemplo si usted desea hacer transferencias consultivasinternas en vez de local que usted pondría CXFER90009 en el campo delnu'mero-a-dial. + +
+
+
+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 dial plan extensión que desear seguropuerto audio archivo ser localizar en en su servidor. + +
+
+
+Segundos de Wrap Up - 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 Wrap up - 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. + +
+
+
+La pausa del agente cifra activo - permite que los agentes seleccionenun código de la pausa cuando chascan encendido el botón de PAUSA envicidial.php. Los códigos de la pausa son definibles por campaña enel fondo de la pantalla del detalle de la opinión de la campaña y sealmacenan en la tabla del vicidial_agent_log. El defecto es N. + +
+
+
+Inhabilite alteran datos del cliente - si el sistema a Y, no cambiacualquiera del expediente de datos del cliente cuando lasdisposiciones de un agente la llamada. El defecto es N. + +
+
+
+Permita Ninguno-Tolva-Conduce conexiones - si el sistema a Y, permiteagentes a la conexión a la campaña incluso si no hay plomos cargadosen la tolva para esa campaña. Esta función no se necesita encampañas de CLOSER-type. El defecto es N. + + + +



+ +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. Must be a number greater than 100. + +
+
+
+Nombre de la lista - Ésta es la descripción de la lista, debe estar entre 2 y 20 caracteres en longitud. + +
+
+
+Descripción de la lista - éste es el campo de la nota para la lista,él es opcional. + +
+
+
+Fecha del cambio de la lista - ésta es la vez última que los ajustespara esta lista fueron modificados de cualquier manera. + +
+
+
+Fecha de la llamada del último de la lista - ésta es la vez últimaque conduce fue marcado de esta lista. + +
+
+
+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. Si usted desea permitir transferencias consultivas, un fronter a unmás cercano, usted puede colocar CXFER pues uno de lasprecolocaciones del nu'mero-a-dial y del dial string apropiado seráenviado para hacer una transferencia consultiva local, entonces lalata LEAVE-3WAY-CALL justo del agente y movimiento encendido a sullamada siguiente. Si usted desea permitir transferencias ocultas declientes a una escritura de VICIDIAL AGI para registrar o un IVR,entonces coloque AXFER en el campo del nu'mero-a-dial. Usted puedetambién especificar una extensión de encargo después del AXFER odel CXFER, por ejemplo si usted desea hacer transferencias consultivasinternas en vez de local que usted pondría CXFER90009 en el campo delnu'mero-a-dial. + +
+
+
+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 dial plan 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 dial plan 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 hot keys 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. Hay dos opciones especiales que usted puede utilizar conjuntamente conel número de teléfono alterno que marca, ALTPH2 de HotKey - el dialcaliente del teléfono alterno y el dial caliente ADDR3-----Address3permiten que un agente utilice un hotkey al retraso su llamada,permanecen en el mismo plomo, y marcan otro número del contacto deese conducen. + + + + + +



+ +VICIDIAL_LEAD_RECYCLE TABLA

+
+
+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. + + + + + +



+ +ESTADOS AUTO DEL DIAL DE VICIDIAL ALT

+
+
+Si se fija el campo que marca del Alt-Nu'mero auto, después losplomos que son dispositioned bajo estos estados del dial del alt delautomóvil tendrán su alt_phone y-o los campos address3 marcadosdespués de que cualesquiera de estos ninguno-contesten a estados sefijan. + + + + + +



+ +VICIDIAL CÓDIGOS DE LA PAUSA DEL AGENTE

+
+
+Si la pausa del agente cifra el campo activo se fija a activo entonceslos agentes podrá seleccionar de estos códigos de la pausa cuandochascan encendido el botón de PAUSA en sus pantallas. Estos datosentonces se almacenan en el registro vicidial del agente. El códigode la pausa debe contener solamente letras y números y ser menos de 7caracteres de largo. El nombre del código de la pausa puede estar nomás de largo de 30 caracteres. + + + + + +



+ +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. + +
+
+
+Campañas permitidas - ésta es una lista seleccionable de lascampañas a las cuales los miembros de este grupo de usuario puedenabrirse una sesión. La opción de ALL-CAMPAIGNS permite que losusuarios en este grupo consideren y se abran una sesión a cualquiercampaña en el sistema. + + + + + +



+ +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, lead_id, campaign, phone_login, group, channel_group, SQLdate, epoch, uniqueid, customer_zap_channel, server_ip, SIPexten, session_id. 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?

You can also use an iframe to load a separate window within the SCRIPT tab, here is an example with prepopulated variables: + +
+<iframe src="http://astguiclient.sf.net/test_VICIDIAL_output.php?lead_id=--A--lead_id--B--&vendor_id=--A--vendor_lead_code--B--&list_id=--A--list_id--B--&gmt_offset_now=--A--gmt_offset_now--B--&phone_code=--A--phone_code--B--&phone_number=--A--phone_number--B--&title=--A--title--B--&first_name=--A--first_name--B--&middle_initial=--A--middle_initial--B--&last_name=--A--last_name--B--&address1=--A--address1--B--&address2=--A--address2--B--&address3=--A--address3--B--&city=--A--city--B--&state=--A--state--B--&province=--A--province--B--&postal_code=--A--postal_code--B--&country_code=--A--country_code--B--&gender=--A--gender--B--&date_of_birth=--A--date_of_birth--B--&alt_phone=--A--alt_phone--B--&email=--A--email--B--&security_phrase=--A--security_phrase--B--&comments=--A--comments--B--&user=--A--user--B--&campaign=--A--campaign--B--&phone_login=--A--phone_login--B--&fronter=--A--fronter--B--&closer=--A--user--B--&group=--A--group--B--&channel_group=--A--group--B--&SQLdate=--A--SQLdate--B--&epoch=--A--epoch--B--&uniqueid=--A--uniqueid--B--&customer_zap_channel=--A--customer_zap_channel--B--&server_ip=--A--server_ip--B--&SIPexten=--A--SIPexten--B--&session_id=--A--session_id--B--&phone=--A--phone--B--" style="width:580;height:290;background-color:transparent;" scrolling="auto" frameborder="0" allowtransparency="true" id="popupFrame" name="popupFrame" width="460" height="290"> +</iframe> +
+ +
+
+
+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 +
+ +
NOTES: The Excel Lead loader functionality is enabled by a series of perl scripts and needs to have a properly configured /etc/astguiclient.conf 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. + + + + +



+ + + + + + +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 Dial plan - 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 dial plan 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 dial plan 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 dial plan que va a comprobar su voicemail. verifica con el archivo de extensions.conf antes de cambiar. + +
+
+
+Descarga Exten de VMAIL - éste es el prefijo dial plan 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 dial plan 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. + +
+
+
+Permita los mensajes de SIPSAK - si está permitido el servidorenviará mensajes al teléfono del SIP a la exhibición en laexhibición del LCD del teléfono cuando está registrado en VICIDIAL.La característica trabaja solamente con los teléfonos del SIP yrequiere el uso del sipsak ser instalada en el web server. El defectoes 0. + +
+
+
+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 dial plan del defecto usado para las escrituras que funcionan para este servidor. El defecto es 'defecto' + +
+
+
+Funcionamiento del sistema - fijar esta opción a Y permitirá laregistración del stats del funcionamiento del sistema para lamáquina del servidor incluyendo carga de sistema, procesos delsistema y canales del asterisco en uso. El defecto es N. + +
+
+
+Registros del servidor - fijar esta opción a Y permitirá laregistración de todas las escrituras relacionadas VICIDIAL a susficheros de diario del texto. Fijar esto a N parará registros de laescritura a los archivos para estos procesos, también laregistración de la pantalla del asterisco será lisiado si esto sefija a N cuando se comienza el asterisco. El defecto es Y. + +
+
+
+AGI hecho salir - fijar esta opción a NINGUNOS inhabilitará salidade todas las escrituras relacionadas VICIDIAL de AGI. Fijar esto aSTDERR enviará el AGI hecho salir al asterisco CLI. Fijar esto alARCHIVO enviará la salida a un archivo en el directorio de losregistros. Fijar esto a AMBOS enviará salida al asterisco CLI y a unfichero de diario. El defecto es ARCHIVO. + +
+
+
+El marcar del balance de VICIDIAL - fijar este campo a Y permitiráque el servidor ponga las llamadas del balance para las campañas enVICIDIAL para poder resolver el nivel definido del dial incluso si nohay agentes registrados en esa campaña en este servidor. El defectoes N. + +
+
+
+Balance Offlimits de VICIDIAL - este ajuste define el número detroncos para no permitir el balance de VICIDIAL que marca parautilizar. Por ejemplo si usted tiene 40 troncos y offlimits vicidialmáximos del balance se fijan a 10 que usted podrá solamenteutilizar 30 líneas interurbanas para marcar del balance de VICIDIAL.El defecto es 0. + + +



+ +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. + + + + +



+ +VICIDIAL_SERVER_TRUNKS TABLA

+
+
+Los troncos del servidor de VICIDIAL permiten que usted restrinja laslíneas salientes que se utilizan en este servidor para la campañaque marca sobre una base de la por-campaña. Usted tiene la opciónpara reservar un número de las líneas específico que se utilizaránpor solamente una campaña así como permitir que esa campañafuncione sobre sus líneas reservadas en cualesquiera líneas siguensiendo abiertas, según lo en las líneas totales usadas por vicidialen este servidor es de largo menos que fijar de los troncos delmáximo VICIDIAL. No tener cualesquiera de estos expedientespermitirá la campaña que marca la línea primero para tener tantaslíneas mientras que puede conseguir bajo fijar de los troncos delmáximo VICIDIAL. + + + + + +



+ +SYSTEM_SETTINGS TABLA

+
+
+Uso No-Latino - esta opción permite que usted omita la escritura dela exhibición de la tela los caracteres del uso UTF8 y que no haganinguna expresión regular de la latino-cara'cter-familia que sefiltra ni que no exhiba el formato. El defecto es 0. + +
+
+
+Webroot escribible - este ajuste permite que usted defina si losarchivos de la temperatura y los archivos de la autentificación seancolocados en el webroot en su web server. El defecto es 1. + +
+
+
+Permita la registración de QueueMetrics - este ajuste permite queusted defina si VICIDIAL inserte entradas del registro en la tabla dela base de datos del queue_log como lo hace la actividad de lascoletas del asterisco. QueueMetrics es un independiente, programa delanálisis estadístico de la cerrado-fuente. Usted debe tenerQueueMetrics instalado y configurado ya antes de permitir estacaracterística. El defecto es 0. + +
+
+
+IP del servidor de QueueMetrics - éste es el IP address de la base dedatos para su instalación de QueueMetrics. + +
+
+
+Nombre de la base de datos de QueueMetrics - éste es el nombre de labase de datos para su base de datos de QueueMetrics. + +
+
+
+Conexión de la base de datos de QueueMetrics - éste es el nombre delusuario usado para abrirse una sesión a su base de datos deQueueMetrics. + +
+
+
+Contraseña de la base de datos de QueueMetrics - ésta es lacontraseña usada para abrirse una sesión a su base de datos deQueueMetrics. + +
+
+
+URL de QueueMetrics - Ésta es la dirección del URL o del Web siteusada para conseguir a su instalación de QueueMetrics. + +
+
+
+Identificación del registro de QueueMetrics - ésta es laidentificación del servidor que todos los registros de VICIDIAL queentran la base de datos de QueueMetrics utilizarán como identificadorpara cada expediente. + +
+
+
+QueueMetrics EnterQueue prepend - este campo se utiliza para permitirprepending de una de las zonas de informaciones del vicidial_listdelante del número de teléfono del cliente para los informesmodificados para requisitos particulares de QueueMetrics. El defectono es NINGUNO no poblar cualquier cosa. + +
+
+
+El agente de VICIDIAL inhabilita la exhibición - este campo seutiliza para seleccionar cuando demostrar a un agente cuando susesión ha sido inhabilitada por el sistema, una acción del encargadoo por una medida externa. El ajuste de NOT_ACTIVE inhabilitará elmensaje en la pantalla de los agentes. El ajuste de LIVE_AGENTexhibirá solamente el mensaje lisiado cuando se ha quitado elexpediente de los vicidial_auto_calls de los agentes, por ejemplodurante un registro de estado de la máquina de la fuerza o registrode estado de la máquina de la emergencia. + +
+
+
+Permita los mensajes de SIPSAK - si el sistema a 1, éste permite queel ajuste de la tabla de los teléfonos trabaje correctamente, elservidor enviará mensajes al teléfono del SIP a la exhibición en laexhibición del LCD del teléfono cuando está registrado en VICIDIAL.Esta característica trabaja solamente con los teléfonos del SIP yrequiere el uso del sipsak ser instalada en el web server. El defectoes 0. + +
+
+
+URL casero del Admin - ésta es la dirección del URL o del Web siteque usted irá si usted chasca encendido el acoplamiento CASERO en latapa de la página de admin.php. + + + + +







+







+EL EXTREMO +
+\n"; + echo "\n"; + echo "\n"; + echo ""; + + $stmt="SELECT dial_statuses,local_call_time,lead_filter_id from vicidial_campaigns where campaign_id='$campaign_id';"; + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + $dial_statuses = $row[0]; + $local_call_time = $row[1]; + if ($lead_filter_id=='') + { + $lead_filter_id = $row[2]; + 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_statuses
\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_statuses,$camp_lists,$fSQL); + + echo "

\n"; + echo "\n"; + + exit; + } + else + { + echo "Usted no tiene permiso de visión esta página\n"; + exit; + } +} + + +###################### +# ADD=7111111 view sample script with test variables +###################### + +if ($ADD==7111111) +{ + ##### TEST VARIABLES ##### + $vendor_lead_code = 'VENDOR:LEAD;CODE'; + $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'; + $RGlead_id = '1234'; + $RGcampaign = 'TESTCAMP'; + $RGphone_login = 'gs102'; + $RGgroup = 'TESTCAMP'; + $RGchannel_group = 'TESTCAMP'; + $RGSQLdate = date("Y-m-d H:i:s"); + $RGepoch = date("U"); + $RGuniqueid = '1163095830.4136'; + $RGcustomer_zap_channel = 'Zap/1-1'; + $RGserver_ip = '10.10.10.15'; + $RGSIPexten = 'SIP/gs102'; + $RGsession_id = '8600051'; + +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]; + +if (eregi("iframe src",$script_text)) + { + $vendor_lead_code = eregi_replace(' ','+',$vendor_lead_code); + $list_id = eregi_replace(' ','+',$list_id); + $gmt_offset_now = eregi_replace(' ','+',$gmt_offset_now); + $phone_code = eregi_replace(' ','+',$phone_code); + $phone_number = eregi_replace(' ','+',$phone_number); + $title = eregi_replace(' ','+',$title); + $first_name = eregi_replace(' ','+',$first_name); + $middle_initial = eregi_replace(' ','+',$middle_initial); + $last_name = eregi_replace(' ','+',$last_name); + $address1 = eregi_replace(' ','+',$address1); + $address2 = eregi_replace(' ','+',$address2); + $address3 = eregi_replace(' ','+',$address2); + $city = eregi_replace(' ','+',$city); + $state = eregi_replace(' ','+',$state); + $province = eregi_replace(' ','+',$province); + $postal_code = eregi_replace(' ','+',$postal_code); + $country_code = eregi_replace(' ','+',$country_code); + $gender = eregi_replace(' ','+',$gender); + $date_of_birth = eregi_replace(' ','+',$date_of_birth); + $alt_phone = eregi_replace(' ','+',$alt_phone); + $email = eregi_replace(' ','+',$email); + $security_phrase = eregi_replace(' ','+',$security_phrase); + $comments = eregi_replace(' ','+',$comments); + $RGfullname = eregi_replace(' ','+',$RGfullname); + $RGuser = eregi_replace(' ','+',$RGuser); + $RGlead_id = eregi_replace(' ','+',$RGlead_id); + $RGcampaign = eregi_replace(' ','+',$RGcampaign); + $RGphone_login = eregi_replace(' ','+',$RGphone_login); + $RGgroup = eregi_replace(' ','+',$RGgroup); + $RGchannel_group = eregi_replace(' ','+',$RGchannel_group); + $RGSQLdate = eregi_replace(' ','+',$RGSQLdate); + $RGepoch = eregi_replace(' ','+',$RGepoch); + $RGuniqueid = eregi_replace(' ','+',$RGuniqueid); + $RGcustomer_zap_channel = eregi_replace(' ','+',$RGcustomer_zap_channel); + $RGserver_ip = eregi_replace(' ','+',$RGserver_ip); + $RGSIPexten = eregi_replace(' ','+',$RGSIPexten); + $RGsession_id = eregi_replace(' ','+',$RGsession_id); + } + +$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--fronter--B--',"$RGuser",$script_text); +$script_text = eregi_replace('--A--user--B--',"$RGuser",$script_text); +$script_text = eregi_replace('--A--lead_id--B--',"$RGlead_id",$script_text); +$script_text = eregi_replace('--A--campaign--B--',"$RGcampaign",$script_text); +$script_text = eregi_replace('--A--phone_login--B--',"$RGphone_login",$script_text); +$script_text = eregi_replace('--A--group--B--',"$RGgroup",$script_text); +$script_text = eregi_replace('--A--channel_group--B--',"$RGchannel_group",$script_text); +$script_text = eregi_replace('--A--SQLdate--B--',"$RGSQLdate",$script_text); +$script_text = eregi_replace('--A--epoch--B--',"$RGepoch",$script_text); +$script_text = eregi_replace('--A--uniqueid--B--',"$RGuniqueid",$script_text); +$script_text = eregi_replace('--A--customer_zap_channel--B--',"$RGcustomer_zap_channel",$script_text); +$script_text = eregi_replace('--A--server_ip--B--',"$RGserver_ip",$script_text); +$script_text = eregi_replace('--A--SIPexten--B--',"$RGSIPexten",$script_text); +$script_text = eregi_replace('--A--session_id--B--',"$RGsession_id",$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 =\"$users_color\""; $users_fc="$users_font"; $users_bold="$header_selected_bold";} + else {$users_hh=''; $users_fc='WHITE'; $users_bold="$header_nonselected_bold";} +if ($hh=='campaigns') + {$campaigns_hh="bgcolor=\"$campaigns_color\""; $campaigns_fc="$campaigns_font"; $campaigns_bold="$header_selected_bold";} + else {$campaigns_hh=''; $campaigns_fc='WHITE'; $campaigns_bold="$header_nonselected_bold";} +if ($hh=='lists') + {$lists_hh="bgcolor=\"$lists_color\""; $lists_fc="$lists_font"; $lists_bold="$header_selected_bold";} + else {$lists_hh=''; $lists_fc='WHITE'; $lists_bold="$header_nonselected_bold";} +if ($hh=='ingroups') + {$ingroups_hh="bgcolor=\"$ingroups_color\""; $ingroups_fc="$ingroups_font"; $ingroups_bold="$header_selected_bold";} + else {$ingroups_hh=''; $ingroups_fc='WHITE'; $ingroups_bold="$header_nonselected_bold";} +if ($hh=='remoteagent') + {$remoteagent_hh="bgcolor=\"$remoteagent_color\""; $remoteagent_fc="$remoteagent_font"; $remoteagent_bold="$header_selected_bold";} + else {$remoteagent_hh=''; $remoteagent_fc='WHITE'; $remoteagent_bold="$header_nonselected_bold";} +if ($hh=='usergroups') + {$usergroups_hh="bgcolor=\"$usergroups_color\""; $usergroups_fc="$usergroups_font"; $usergroups_bold="$header_selected_bold";} + else {$usergroups_hh=''; $usergroups_fc='WHITE'; $usergroups_bold="$header_nonselected_bold";} +if ($hh=='scripts') + {$scripts_hh="bgcolor=\"$scripts_color\""; $scripts_fc="$scripts_font"; $scripts_bold="$header_selected_bold";} + else {$scripts_hh=''; $scripts_fc='WHITE'; $scripts_bold="$header_nonselected_bold";} +if ($hh=='filters') + {$filters_hh="bgcolor=\"$filters_color\""; $filters_fc="$filters_font"; $filters_bold="$header_selected_bold";} + else {$filters_hh=''; $filters_fc='WHITE'; $filters_bold="$header_nonselected_bold";} +if ($hh=='admin') + {$admin_hh="bgcolor=\"$admin_color\""; $admin_fc="$admin_font"; $admin_bold="$header_selected_bold";} + else {$admin_hh=''; $admin_fc='WHITE'; $admin_bold="$header_nonselected_bold";} +if ($hh=='reports') + {$reports_hh="bgcolor=\"$reports_color\""; $reports_fc="$reports_font"; $reports_bold="$header_selected_bold";} + else {$reports_hh=''; $reports_fc='WHITE'; $reports_bold="$header_nonselected_bold";} + +?> + + + + +\n"; +echo "
English Español
BGCOLOR=#D9E6FE cellpadding=2 cellspacing=0> + + + + + + + + + + + + + + + 1) { + ?> +> + 1) { + ?> +> + 1) { + ?> +> + 1) { + ?> +> + 1) { + ?> +> + 1) { + ?> +> + 1) { + ?> +> + 1) { + ?> +> + 1) { + if ($sh=='times') {$times_sh="bgcolor=\"$times_color\""; $times_fc="$times_font";} # hard teal + else {$times_sh=''; $times_fc='BLACK';} + if ($sh=='phones') {$phones_sh="bgcolor=\"$server_color\""; $phones_fc="$phones_font";} # pink + else {$phones_sh=''; $phones_fc='BLACK';} + if ($sh=='server') {$server_sh="bgcolor=\"$server_color\""; $server_fc="$server_font";} # pink + else {$server_sh=''; $server_fc='BLACK';} + if ($sh=='conference') {$conference_sh="bgcolor=\"$server_color\""; $conference_fc="$server_font";} # pink + else {$conference_sh=''; $conference_fc='BLACK';} + if ($sh=='settings') {$settings_sh="bgcolor=\"$server_color\""; $settings_fc="$server_font";} # pink + else {$settings_sh=''; $settings_fc='BLACK';} + + ?> +> + + + + + + + 1) { + ?> + > + 1) { + ?> + > + 1) { + ?> + > + 1) { + ?> + > + 1) { + ?> + > + \n"; + echo "Le no autorizan a visión esta página. Vaya por favor detrás.\n"; + } + +} +if (strlen($reports_hh) > 1) { + ?> +> + + + + +
  VICIDIAL ADMIN - CASERO | Salir  
> SIZE=> Usuarios > SIZE=> Campañas > SIZE=> Listas > SIZE=> Escrituras > SIZE=> Filtros > SIZE=> En-Grupos > SIZE=> Grupos De Usuario > SIZE=> Agentes Alejados > SIZE=> Admin > SIZE=> Informes
>   > Demuestre A Usuarios     |     > Agregue A Nuevo Usuario     |     > Búsqueda Para Un Usuario
>   > Demuestre Las Campañas     |     > Agregue Una Nueva Campaña     |     > Campañas En tiempo real Sumarias
>   > Demuestre Las Listas     |     > Agregue Una Nueva Lista     |     > Búsqueda Para Un Plomo     |     > Agregue El Número a DNC     |     > Nuevos Plomos De la Carga
>   > Demuestre Las Escrituras     |     > Agregue Una Nueva Escritura
>   > Demuestre Los Filtros     |     > Agregue Un Filtro Nuevo
>   > Demuestre A En-Grupos     |     > Agregue A Nuevo En-Grupo
>   > Demuestre A Grupos De Usuario     |     > Agregue A Nuevo Grupo De Usuario     |     > Informe Cada hora Del Grupo
>   > Demuestre Los Agentes Alejados     |     > Agregue Los Agentes Alejados Nuevos
COLSPAN=2> SIZE=> Tiempos De la Llamada COLSPAN=2> SIZE=> Teléfonos COLSPAN=2> SIZE=> Conferencias COLSPAN=1> SIZE=> Servidores COLSPAN=3> SIZE=> Ajustes Del Sistema
>   > Demuestre Los Tiempos De la Llamada     |     > Agregue Un Nuevo Rato De la Llamada     |     > Demuestre Los Tiempos De la Llamada Del Estado     |     > Agregue Un Nuevo Rato De la Llamada Del Estado  
>   > Demuestre Los Teléfonos   |   > Agregue Un Teléfono Nuevo
> Demuestre Las Conferencias   |   > Agregue Una Nueva Conferencia   |   > Demuestre Las Conferencias de VICIDIAL   |   > Agregue Una Nueva Conferencia de VICIDIAL
> Demuestre Los Servidores   |   > Agregue Un Servidor Nuevo
> Ajustes Del Sistema
>  
+
\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"; + } + else + { + echo "Usted no tiene permiso de visión esta página\n"; + exit; + } +} + + +###################### +# ADD=11 display the ADD NEW CAMPAIGN FORM SCREEN +###################### + +if ($ADD==11) +{ + if ($LOGmodify_campaigns==1) + { + 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 "\n"; + echo "
ID De la Campaña: $NWB#vicidial_campaigns-campaign_id$NWE
Nombre de la Campaña: $NWB#vicidial_campaigns-campaign_name$NWE
Descripción De la Campaña: $NWB#vicidial_campaigns-campaign_description$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"; + } + else + { + echo "Usted no tiene permiso de visión esta página\n"; + exit; + } +} + + +###################### +# ADD=111 display the ADD NEW LIST FORM SCREEN +###################### + +if ($ADD==111) +{ + if ($LOGmodify_lists==1) + { + echo "
\n"; + echo ""; + + echo "
ADD A NEW LIST\n"; + echo "\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
Descripción De la Lista: $NWB#vicidial_lists-list_description$NWE
Campaña: $NWB#vicidial_lists-campaign_id$NWE
Activo: $NWB#vicidial_lists-active$NWE
\n"; + } + else + { + echo "Usted no tiene permiso de visión esta página\n"; + exit; + } +} + + +###################### +# 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) +{ + if ($LOGmodify_ingroups==1) + { + 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"; + } + else + { + echo "Usted no tiene permiso de visión esta página\n"; + exit; + } +} + + +###################### +# ADD=11111 display the ADD NEW REMOTE AGENTS SCREEN +###################### + +if ($ADD==11111) +{ + if ($LOGmodify_remoteagents==1) + { + 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 dial plan 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"; + } + else + { + echo "Usted no tiene permiso de visión esta página\n"; + exit; + } +} + + +###################### +# ADD=111111 display the ADD NEW USERS GROUP SCREEN +###################### + +if ($ADD==111111) +{ + if ($LOGmodify_usergroups==1) + { + 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"; + } + else + { + echo "Usted no tiene permiso de visión esta página\n"; + exit; + } +} + + +###################### +# ADD=1111111 display the ADD NEW SCRIPT SCREEN +###################### + +if ($ADD==1111111) +{ + if ($LOGmodify_scripts==1) + { + 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: "; + # BEGIN Insert Field + echo ""; + echo "
"; + # END Insert Field + echo " $NWB#vicidial_scripts-script_text$NWE
\n"; + } + else + { + echo "Usted no tiene permiso de visión esta página\n"; + exit; + } +} + + +###################### +# ADD=11111111 display the ADD NEW FILTER SCREEN +###################### + +if ($ADD==11111111) +{ + if ($LOGmodify_filters==1) + { + 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"; + } + else + { + echo "Usted no tiene permiso de visión esta página\n"; + exit; + } +} + + +###################### +# ADD=111111111 display the ADD NEW CALL TIME SCREEN +###################### + +if ($ADD==111111111) +{ + if ($LOGmodify_call_times==1) + { + 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"; + } + else + { + echo "Usted no tiene permiso de visión esta página\n"; + exit; + } +} + + +###################### +# ADD=1111111111 display the ADD NEW STATE CALL TIME SCREEN +###################### + +if ($ADD==1111111111) +{ + if ($LOGmodify_call_times==1) + { + 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"; + } + else + { + echo "Usted no tiene permiso de visión esta página\n"; + exit; + } +} + + +###################### +# ADD=11111111111 display the ADD NEW PHONE SCREEN +###################### + +if ($ADD==11111111111) +{ + if ($LOGast_admin_access==1) + { + echo "
\n"; + echo ""; + + 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 Dial plan: (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"; + } + else + { + echo "Usted no tiene permiso de visión esta página\n"; + exit; + } +} + + +###################### +# ADD=111111111111 display the ADD NEW SERVER SCREEN +###################### + +if ($ADD==111111111111) +{ + if ($LOGmodify_servers==1) + { + echo "
\n"; + 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"; + } + else + { + echo "Usted no tiene permiso de visión esta página\n"; + exit; + } +} + + +###################### +# ADD=1111111111111 display the ADD NEW CONFERENCE SCREEN +###################### + +if ($ADD==1111111111111) +{ + if ($LOGast_admin_access==1) + { + echo "
\n"; + 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"; + } + else + { + echo "Usted no tiene permiso de visión esta página\n"; + exit; + } +} + + +###################### +# ADD=11111111111111 display the ADD NEW VICIDIAL CONFERENCE SCREEN +###################### + +if ($ADD==11111111111111) +{ + if ($LOGast_admin_access==1) + { + echo "
\n"; + echo ""; + + echo "
ADD A NEW VICIDIAL CONFERENCE\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"; + } + else + { + echo "Usted no tiene permiso de visión esta página\n"; + exit; + } +} + + + +###################################################################################################### +###################################################################################################### +####### 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,campaign_description,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,campaign_changedate,campaign_stats_refresh) values('$campaign_id','$campaign_name','$campaign_description','$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','$SQLdate','Y');"; + $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 "
CAMPAIGN HOT KEY 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 "
CAMPAÚA HOT KEY NO AGREGADA - vaya por favor detrás y mire los datos que usted incorporó\n"; + echo "
hotkey must be a single character between 1 and 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 HOT KEY |$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=26 adds the new auto alt dial status to the campaign +###################### + +if ($ADD==26) +{ + $status = eregi_replace("-----.*",'',$status); + echo ""; + $stmt="SELECT count(*) from vicidial_campaigns where campaign_id='$campaign_id' and auto_alt_dial_statuses LIKE \"% $status %\";"; + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + if ($row[0] > 0) + {echo "
ESTADO AUTO DEL DIAL DEL ALT NO AGREGADO - hay ya una entrada para esta campaña con este estado\n";} + else + { + if ( (strlen($campaign_id) < 2) or (strlen($status) < 1) ) + { + echo "
ESTADO AUTO DEL DIAL DEL ALT NO AGREGADO - 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"; + } + else + { + echo "
ESTADO AUTO DEL DIAL DEL ALT AGREGADO: $campaign_id - $status\n"; + + $stmt="SELECT auto_alt_dial_statuses from vicidial_campaigns where campaign_id='$campaign_id';"; + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + + if (strlen($row[0])<2) {$row[0] = ' -';} + $auto_alt_dial_statuses = " $status$row[0]"; + $stmt="UPDATE vicidial_campaigns set auto_alt_dial_statuses='$auto_alt_dial_statuses' 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|ADD A AUTO-ALT-DIAL STATUS|$PHP_AUTH_USER|$ip|$stmt|\n"); + fclose($fp); + } + } + } +$ADD=31; +} + + +###################### +# ADD=27 adds the new campaign agent pause code entry to the system +###################### + +if ($ADD==27) +{ + echo ""; + $stmt="SELECT count(*) from vicidial_pause_codes where campaign_id='$campaign_id' and pause_code='$pause_code';"; + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + if ($row[0] > 0) + {echo "
CÓDIGO DE LA PAUSA DEL AGENTE NO AGREGADO - hay ya una entrada para esta campaña con este code\n";} + else + { + if ( (strlen($campaign_id) < 2) or (strlen($pause_code) < 1) or (strlen($pause_code) > 6) or (strlen($pause_code_name) < 2) ) + { + echo "
CÓDIGO DE LA PAUSA DEL AGENTE NO AGREGADO - Vaya por favor detrás y mire los datos que usted incorporó\n"; + echo "
pause code must be between 1 and 6 characters in length\n"; + echo "
pause code name must be between 2 and 30 characters in length\n"; + } + else + { + echo "
EL CÓDIGO DE LA PAUSA DEL AGENTE AGREGÓ: $campaign_id - $pause_code - $pause_code_name\n"; + + $stmt="INSERT INTO vicidial_pause_codes(campaign_id,pause_code,pause_code_name,billable) values('$campaign_id','$pause_code','$pause_code_name','$billable');"; + $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 AGENTE PAUSE CODE|$PHP_AUTH_USER|$ip|$stmt|\n"); + fclose($fp); + } + } + } +$ADD=31; +} + + +###################### +# ADD=28 adds new status to the campaign dial statuses +###################### + +if ($ADD==28) +{ + $status = eregi_replace("-----.*",'',$status); + echo ""; + $stmt="SELECT count(*) from vicidial_campaigns where campaign_id='$campaign_id' and dial_statuses LIKE \"% $status %\";"; + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + if ($row[0] > 0) + {echo "
ESTADO DEL DIAL DE LA CAMPAÑA NO AGREGADO - hay ya una entrada para esta campaña con este estado\n";} + else + { + if ( (strlen($campaign_id) < 2) or (strlen($status) < 1) ) + { + echo "
ESTADO DEL DIAL 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 6 caracteres en longitud\n"; + } + else + { + echo "
EL ESTADO DEL DIAL DE LA CAMPAÑA AGREGÓ: $campaign_id - $status\n"; + + $stmt="SELECT dial_statuses from vicidial_campaigns where campaign_id='$campaign_id';"; + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + + if (strlen($row[0])<2) {$row[0] = ' -';} + $dial_statuses = " $status$row[0]"; + $stmt="UPDATE vicidial_campaigns set dial_statuses='$dial_statuses' 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|NUEVA CAMPAÑA DIAL STATUS |$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 ($list_id < 100) 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"; + echo "
ID De la Lista must be greater than 100\n"; + } + else + { + echo "
LISTA AÑADIDA: $list_id\n"; + + $stmt="INSERT INTO vicidial_lists (list_id,list_name,campaign_id,active,list_description,list_changedate) values('$list_id','$list_name','$campaign_id','$active','$list_description','$SQLdate');"; + $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|$stmt|\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(user_group,group_name,allowed_campaigns) values('$user_group','$group_name','-ALL-CAMPAIGNS-');"; + $rslt=mysql_query($stmt, $link); + + echo "
GRUPO DE USUARIO AÑADIDO: $user_group\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|$stmt|\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','$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; +} + + +###################### +# ADD=21111111111 adds new phone to the system +###################### + +if ($ADD==21111111111) +{ +echo "
\n"; + 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=31111111111; +} + + +###################### +# ADD=211111111111 adds new server to the system +###################### + +if ($ADD==211111111111) +{ +echo "
\n"; + 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=311111111111; +} + + +###################### +# ADD=221111111111 adds the new vicidial server trunk record to the system +###################### + +if ($ADD==221111111111) +{ + echo ""; + $stmt="SELECT max_vicidial_trunks from servers where server_ip='$server_ip';"; + $rslt=mysql_query($stmt, $link); + $rowx=mysql_fetch_row($rslt); + $MAXvicidial_trunks = $rowx[0]; + + $stmt="SELECT sum(dedicated_trunks) from vicidial_server_trunks where server_ip='$server_ip' and campaign_id !='$campaign_id';"; + $rslt=mysql_query($stmt, $link); + $rowx=mysql_fetch_row($rslt); + $SUMvicidial_trunks = ($rowx[0] + $dedicated_trunks); + + if ($SUMvicidial_trunks > $MAXvicidial_trunks) + { + echo "
EXPEDIENTE DEL TRONCO DEL SERVIDOR DE VICIDIAL NO AGREGADO - el número de troncos vicidial es demasiado alto: $SUMvicidial_trunks / $MAXvicidial_trunks\n"; + } + else + { + $stmt="SELECT count(*) from vicidial_server_trunks where campaign_id='$campaign_id' and server_ip='$server_ip';"; + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + if ($row[0] > 0) + {echo "
EXPEDIENTE DEL TRONCO DEL SERVIDOR DE VICIDIAL NO AGREGADO - hay ya un expediente del servidor-tronco para esta campaña\n";} + else + { + if ( (strlen($campaign_id) < 2) or (strlen($server_ip) < 7) or (strlen($dedicated_trunks) < 1) or (strlen($trunk_restriction) < 1) ) + { + echo "
EXPEDIENTE DEL TRONCO DEL SERVIDOR DE VICIDIAL NO AGREGADO - Vaya por favor detrás y mire los datos que usted incorporó\n"; + echo "
la campaña debe estar entre 3 y 8 caracteres en longitud\n"; + echo "
el server_ip retrasa debe ser por lo menos 7 caracteres\n"; + echo "
los troncos deben ser un dígito a partir de la 0 a 9999\n"; + } + else + { + echo "
EL EXPEDIENTE DEL TRONCO DEL SERVIDOR DE VICIDIAL AGREGÓ: $campaign_id - $server_ip - $dedicated_trunks - $trunk_restriction\n"; + + $stmt="INSERT INTO vicidial_server_trunks(server_ip,campaign_id,dedicated_trunks,trunk_restriction) values('$server_ip','$campaign_id','$dedicated_trunks','$trunk_restriction');"; + $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 VICIDIAL TRUNK |$PHP_AUTH_USER|$ip|$stmt|\n"); + fclose($fp); + } + } + } + } +$ADD=311111111111; +} + + +###################### +# ADD=2111111111111 adds new conference to the system +###################### + +if ($ADD==2111111111111) +{ +echo "
\n"; + 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=3111111111111; +} + + +###################### +# ADD=21111111111111 adds new vicidial conference to the system +###################### + +if ($ADD==21111111111111) +{ +echo "
\n"; + echo ""; + $stmt="SELECT count(*) from vicidial_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 "
VICIDIAL CONFERENCE NOT ADDED - there is already a vicidial conference in the system with this ID and server\n";} + else + { + if ( (strlen($conf_exten) < 1) or (strlen($server_ip) < 7) ) + {echo "
VICIDIAL CONFERENCIA NO AGREGADA - vaya por favor detrás y mire los datos que usted incorporó\n";} + else + { + echo "
VICIDIAL LA CONFERENCIA AGREGÚ\n"; + + $stmt="INSERT INTO vicidial_conferences (conf_exten,server_ip) values('$conf_exten','$server_ip');"; + $rslt=mysql_query($stmt, $link); + } + } +$ADD=31111111111111; +} + + + +###################################################################################################### +###################################################################################################### +####### 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") +{ + if ($LOGmodify_users==1) + { + 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',modify_users='$modify_users',modify_campaigns='$modify_campaigns',modify_lists='$modify_lists',modify_scripts='$modify_scripts',modify_filters='$modify_filters',modify_ingroups='$modify_ingroups',modify_usergroups='$modify_usergroups',modify_remoteagents='$modify_remoteagents',modify_servers='$modify_servers',view_reports='$view_reports',vicidial_recording_override='$vicidial_recording_override',alter_custdata_override='$alter_custdata_override' 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); + } + } + } + else + { + echo "Usted no tiene permiso de visión esta página\n"; + exit; + } +$ADD=3; # go to user modification below +} + + +###################### +# ADD=4B submit user modifications to the system - ADMIN +###################### + +if ($ADD=="4B") +{ + if ($LOGmodify_users==1) + { + 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',vicidial_recording_override='$vicidial_recording_override',alter_custdata_override='$alter_custdata_override' 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); + } + } + } + else + { + echo "Usted no tiene permiso de visión esta página\n"; + exit; + } +$ADD=3; # go to user modification below +} + + + +###################### +# ADD=4 submit user modifications to the system +###################### + +if ($ADD==4) +{ + if ($LOGmodify_users==1) + { + 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); + } + } + } + else + { + echo "Usted no tiene permiso de visión esta página\n"; + exit; + } +$ADD=3; # go to user modification below +} + +###################### +# ADD=41 submit campaign modifications to the system +###################### + +if ($ADD==41) +{ + if ($LOGmodify_campaigns==1) + { + 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"; + echo "
|$campaign_name|$active|\n"; + } + else + { + echo "
CAMPAÑA MODIFICADA: $campaign_id\n"; + + if ($dial_method == 'MANUAL') + { + $auto_dial_level='0'; + $adlSQL = "auto_dial_level='0',"; + } + else + { + if ($dial_level_override > 0) + { + $adlSQL = "auto_dial_level='$auto_dial_level',"; + } + else + { + if ($dial_method == 'RATIO') + { + if ($auto_dial_level < 1) {$auto_dial_level = "1.0";} + $adlSQL = "auto_dial_level='$auto_dial_level',"; + } + else + { + $adlSQL = ""; + if ($auto_dial_level < 1) + { + $auto_dial_level = "1.0"; + $adlSQL = "auto_dial_level='$auto_dial_level',"; + } + } + } + } + $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', $adlSQL 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',allcalls_delay='$allcalls_delay',omit_phone_code='$omit_phone_code',dial_method='$dial_method',available_only_ratio_tally='$available_only_ratio_tally',adaptive_dropped_percentage='$adaptive_dropped_percentage',adaptive_maximum_level='$adaptive_maximum_level',adaptive_latest_server_time='$adaptive_latest_server_time',adaptive_intensity='$adaptive_intensity',adaptive_dl_diff_target='$adaptive_dl_diff_target',concurrent_transfers='$concurrent_transfers',auto_alt_dial='$auto_alt_dial',agent_pause_codes_active='$agent_pause_codes_active',campaign_description='$campaign_description',campaign_changedate='$SQLdate',campaign_stats_refresh='$campaign_stats_refresh',disable_alter_custdata='$disable_alter_custdata',no_hopper_leads_logins='$no_hopper_leads_logins' 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 IN('READY','QUEUE','DONE');"; + $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|$stmt|\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); + } + } + } + else + { + echo "Usted no tiene permiso de visión esta página\n"; + exit; + } +$ADD=31; # go to campaign modification form below +} + +###################### +# ADD=42 delete campaign status in the system +###################### + +if ($ADD==42) +{ + if ($LOGmodify_campaigns==1) + { + 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); + } + } + } + else + { + echo "Usted no tiene permiso de visión esta página\n"; + exit; + } +$ADD=31; # go to campaign modification form below +} + +###################### +# ADD=43 delete campaign hotkey in the system +###################### + +if ($ADD==43) +{ + if ($LOGmodify_campaigns==1) + { + echo ""; + + if ( (strlen($campaign_id) < 2) or (strlen($status) < 1) or (strlen($hotkey) < 1) ) + { + echo "
CAMPAÚA HOT KEY 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 "
the campaign hotkey needs to be at least 1 characters in length\n"; + } + else + { + echo "
LA CAMPAÚA DE ENCARGO HOT KEY 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); + } + } + } + else + { + echo "Usted no tiene permiso de visión esta página\n"; + exit; + } +$ADD=31; # go to campaign modification form below +} + +###################### +# ADD=44 submit campaign modifications to the system - Basic View +###################### + +if ($ADD==44) +{ + if ($LOGmodify_campaigns==1) + { + 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"; + + if ($dial_method == 'RATIO') + { + if ($auto_dial_level < 1) {$auto_dial_level = "1.0";} + $adlSQL = "auto_dial_level='$auto_dial_level',"; + } + else + { + if ($dial_method == 'MANUAL') + { + $auto_dial_level='0'; + $adlSQL = "auto_dial_level='0',"; + } + else + { + $adlSQL = ""; + if ($auto_dial_level < 1) + { + $auto_dial_level = "1.0"; + $adlSQL = "auto_dial_level='$auto_dial_level',"; + } + } + } + $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', $adlSQL lead_filter_id='$lead_filter_id',dial_method='$dial_method',adaptive_intensity='$adaptive_intensity',campaign_description='$campaign_description',campaign_changedate='$SQLdate' 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 IN('READY','QUEUE','DONE');;"; + $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|$stmt|\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); + } + } + } + else + { + echo "Usted no tiene permiso de visión esta página\n"; + exit; + } +$ADD=34; # go to campaign modification form below +} + +###################### +# ADD=45 modify campaign lead recycle in the system +###################### + +if ($ADD==45) +{ + if ($LOGmodify_campaigns==1) + { + 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); + } + } + } + else + { + echo "Usted no tiene permiso de visión esta página\n"; + exit; + } +$ADD=31; # go to campaign modification form below +} + +###################### +# ADD=47 modify agent pause code in the system +###################### + +if ($ADD==47) +{ + if ($LOGmodify_campaigns==1) + { + echo ""; + + if ( (strlen($campaign_id) < 2) or (strlen($pause_code) < 1) or (strlen($pause_code) > 6) or (strlen($pause_code_name) < 2) ) + { + echo "
CÓDIGO DE LA PAUSA DEL AGENTE NO MODIFICADO - Vaya por favor detrás y mire los datos que usted incorporó\n"; + echo "
pause_code must be between 1 and 6 characters in length\n"; + echo "
pause_code name must be between 2 and 30 characters in length\n"; + } + else + { + echo "
AGENTE PAUSE CODE MODIFIED: $campaign_id - $pause_code - $pause_code_name\n"; + + $stmt="UPDATE vicidial_pause_codes SET pause_code_name='$pause_code_name',billable='$billable' where campaign_id='$campaign_id' and pause_code='$pause_code';"; + $rslt=mysql_query($stmt, $link); + + ### LOG CHANGES TO LOG FILE ### + if ($WeBRooTWritablE > 0) + { + $fp = fopen ("./admin_changes_log.txt", "a"); + fwrite ($fp, "$date|MODIFY AGENTE PAUSECODE|$PHP_AUTH_USER|$ip|$stmt|\n"); + fclose($fp); + } + } + } + else + { + echo "Usted no tiene permiso de visión esta página\n"; + exit; + } +$ADD=31; # go to campaign modification form below +} + +###################### +# ADD=411 submit list modifications to the system +###################### + +if ($ADD==411) +{ + if ($LOGmodify_lists==1) + { + 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',list_description='$list_description',list_changedate='$SQLdate' 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',list_description='$list_description' where list_id='$list_id'|\n"); + fclose($fp); + } + } + } + else + { + echo "Usted no tiene permiso de visión esta página\n"; + exit; + } +$ADD=311; # go to list modification form below +} + + +###################### +# ADD=4111 modify in-group info in the system +###################### + +if ($ADD==4111) +{ + if ($LOGmodify_ingroups==1) + { + 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); + } + } + } + else + { + echo "Usted no tiene permiso de visión esta página\n"; + exit; + } +$ADD=3111; # go to in-group modification form below +} + + + +###################### +# ADD=41111 modify remote agents info in the system +###################### + +if ($ADD==41111) +{ + if ($LOGmodify_remoteagents==1) + { + 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); + } + } + } + else + { + echo "Usted no tiene permiso de visión esta página\n"; + exit; + } +$ADD=31111; # go to remote agents modification form below +} + + + +###################### +# ADD=411111 modify user group info in the system +###################### + +if ($ADD==411111) +{ + if ($LOGmodify_usergroups==1) + { + 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',allowed_campaigns='$campaigns_value' 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|$stmt|\n"); + fclose($fp); + } + } + } + else + { + echo "Usted no tiene permiso de visión esta página\n"; + exit; + } +$ADD=311111; # go to user group modification form below +} + +###################### +# ADD=4111111 modify script in the system +###################### + +if ($ADD==4111111) +{ + if ($LOGmodify_scripts==1) + { + echo "\n"; + echo "\n"; + 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='$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); + } + } + } + else + { + echo "Usted no tiene permiso de visión esta página\n"; + exit; + } +$ADD=3111111; # go to script modification form below +} + + +###################### +# ADD=41111111 modify filter in the system +###################### + +if ($ADD==41111111) +{ + if ($LOGmodify_filters==1) + { + 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); + } + } + } + else + { + echo "Usted no tiene permiso de visión esta página\n"; + exit; + } +$ADD=31111111; # go to filter modification form below +} + + +###################### +# ADD=411111111 modify call time in the system +###################### + +if ($ADD==411111111) +{ + if ($LOGmodify_call_times==1) + { + 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); + } + } + } + else + { + echo "Usted no tiene permiso de visión esta página\n"; + exit; + } +$ADD=311111111; # go to call time modification form below +} + + +###################### +# ADD=4111111111 modify state call time in the system +###################### + +if ($ADD==4111111111) +{ + if ($LOGmodify_call_times==1) + { + 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); + } + } + } + else + { + echo "Usted no tiene permiso de visión esta página\n"; + exit; + } +$ADD=3111111111; # go to state call time modification form below +} + + +###################### +# ADD=41111111111 modify phone record in the system +###################### + +if ($ADD==41111111111) +{ + if ($LOGast_admin_access==1) + { + 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', enable_sipsak_messages='$enable_sipsak_messages' where extension='$old_extension' and server_ip='$old_server_ip';"; + $rslt=mysql_query($stmt, $link); + } + } + } + else + { + echo "Usted no tiene permiso de visión esta página\n"; + exit; + } +$ADD=31111111111; # go to phone modification form below +} + + +###################### +# ADD=411111111111 modify server record in the system +###################### + +if ($ADD==411111111111) +{ + if ($LOGmodify_servers==1) + { + 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', sys_perf_log='$sys_perf_log', vd_server_logs='$vd_server_logs', agi_output='$agi_output', vicidial_balance_active='$vicidial_balance_active', balance_trunks_offlimits='$balance_trunks_offlimits' where server_id='$old_server_id';"; + $rslt=mysql_query($stmt, $link); + } + } + } + } + else + { + echo "Usted no tiene permiso de visión esta página\n"; + exit; + } +$ADD=311111111111; # go to server modification form below +} + + +###################### +# ADD=421111111111 modify vicidial server trunks record in the system +###################### + +if ($ADD==421111111111) +{ + if ($LOGmodify_servers==1) + { + echo ""; + $stmt="SELECT max_vicidial_trunks from servers where server_ip='$server_ip';"; + $rslt=mysql_query($stmt, $link); + $rowx=mysql_fetch_row($rslt); + $MAXvicidial_trunks = $rowx[0]; + + $stmt="SELECT sum(dedicated_trunks) from vicidial_server_trunks where server_ip='$server_ip' and campaign_id !='$campaign_id';"; + $rslt=mysql_query($stmt, $link); + $rowx=mysql_fetch_row($rslt); + $SUMvicidial_trunks = ($rowx[0] + $dedicated_trunks); + + if ($SUMvicidial_trunks > $MAXvicidial_trunks) + { + echo "
EXPEDIENTE DEL TRONCO DEL SERVIDOR DE VICIDIAL NO AGREGADO - el número de troncos vicidial es demasiado alto: $SUMvicidial_trunks / $MAXvicidial_trunks\n"; + } + else + { + if ( (strlen($campaign_id) < 2) or (strlen($server_ip) < 7) or (strlen($dedicated_trunks) < 1) or (strlen($trunk_restriction) < 1) ) + { + echo "
EXPEDIENTE DEL TRONCO DEL SERVIDOR DE VICIDIAL NO MODIFICADO - Vaya por favor detrás y mire los datos que usted incorporó\n"; + echo "
la campaña debe estar entre 3 y 8 caracteres en longitud\n"; + echo "
el server_ip retrasa debe ser por lo menos 7 caracteres\n"; + echo "
los troncos deben ser un dígito a partir de la 0 a 9999\n"; + } + else + { + echo "
EXPEDIENTE DEL TRONCO DEL SERVIDOR DE VICIDIAL MODIFICADO: $campaign_id - $server_ip - $dedicated_trunks - $trunk_restriction\n"; + + $stmt="UPDATE vicidial_server_trunks SET dedicated_trunks='$dedicated_trunks',trunk_restriction='$trunk_restriction' where campaign_id='$campaign_id' and server_ip='$server_ip';"; + $rslt=mysql_query($stmt, $link); + + ### LOG CHANGES TO LOG FILE ### + if ($WeBRooTWritablE > 0) + { + $fp = fopen ("./admin_changes_log.txt", "a"); + fwrite ($fp, "$date|MODIFICAR EL SERVIDOR TRUNK |$PHP_AUTH_USER|$ip|$stmt|\n"); + fclose($fp); + } + } + } + } + else + { + echo "Usted no tiene permiso de visión esta página\n"; + exit; + } +$ADD=311111111111; # go to server modification form below +} + + +###################### +# ADD=4111111111111 modify conference record in the system +###################### + +if ($ADD==4111111111111) +{ + if ($LOGast_admin_access==1) + { + 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); + } + } + } + else + { + echo "Usted no tiene permiso de visión esta página\n"; + exit; + } +$ADD=3111111111111; # go to conference modification form below +} + + +###################### +# ADD=41111111111111 modify vicidial conference record in the system +###################### + +if ($ADD==41111111111111) +{ + if ($LOGast_admin_access==1) + { + echo ""; + + $stmt="SELECT count(*) from vicidial_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 "
VICIDIAL 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 "
VICIDIAL CONFERENCIA NO MODIFICADA - vaya por favor detrás y mire los datos que usted incorporó\n";} + else + { + echo "
VICIDIAL CONFERENCIA MODIFICADA: $conf_exten\n"; + + $stmt="UPDATE vicidial_conferences set conf_exten='$conf_exten',server_ip='$server_ip',extension='$extension' where conf_exten='$old_conf_exten';"; + $rslt=mysql_query($stmt, $link); + + } + } + } + else + { + echo "Usted no tiene permiso de visión esta página\n"; + exit; + } +$ADD=31111111111111; # go to vicidial conference modification form below +} + + + +###################### +# ADD=411111111111111 modify vicidial system settings +###################### + +if ($ADD==411111111111111) +{ + if ($LOGmodify_servers==1) + { + echo ""; + + echo "
AJUSTES DEL SISTEMA DE VICIDIAL MODIFICADOS\n"; + + $stmt="UPDATE system_settings set use_non_latin='$use_non_latin',webroot_writable='$webroot_writable',enable_queuemetrics_logging='$enable_queuemetrics_logging',queuemetrics_server_ip='$queuemetrics_server_ip',queuemetrics_dbname='$queuemetrics_dbname',queuemetrics_login='$queuemetrics_login',queuemetrics_pass='$queuemetrics_pass',queuemetrics_url='$queuemetrics_url',queuemetrics_log_id='$queuemetrics_log_id',queuemetrics_eq_prepend='$queuemetrics_eq_prepend',vicidial_agent_disable='$vicidial_agent_disable',allow_sipsak_messages='$allow_sipsak_messages',admin_home_url='$admin_home_url';"; + $rslt=mysql_query($stmt, $link); + + ### LOG CHANGES TO LOG FILE ### + if ($WeBRooTWritablE > 0) + { + $fp = fopen ("./admin_changes_log.txt", "a"); + fwrite ($fp, "$date|MODIFY SYSTEM SETTINGS|$PHP_AUTH_USER|$ip|$stmt|\n"); + fclose($fp); + } + } + else + { + echo "Usted no tiene permiso de visión esta página\n"; + exit; + } +$ADD=311111111111111; # go to vicidial system settings 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=53 confirmation before Emergency VDAC Jam Clear - deletes oldest LIVE vicidial_auto_call record +###################### + +if ($ADD==53) +{ + if (eregi('IN',$stage)) + {$group_id=$campaign_id;} + echo ""; + + if (strlen($campaign_id) < 2) + { + echo "
VDAC NO DESPEJÓ PARA LA 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 CLARA DE VDAC: $campaign_id\n"; + echo "

Chasque aquí para suprimir el más viejo VIVEN expediente en VDACpara $campaign_id


\n"; + } + +# go to campaign modification below +if (eregi('IN',$stage)) + {$ADD='3111';} +else + {$ADD='31';} +} + +###################### +# 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 state 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 +} + + +###################### +# ADD=51111111111 confirmation before deletion of phone record +###################### + +if ($ADD==51111111111) +{ + echo ""; + + if ( (strlen($extension) < 2) or (strlen($server_ip) < 7) or ($LOGast_delete_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='31111111111'; # go to phone modification below +} + + +###################### +# ADD=511111111111 confirmation before deletion of server record +###################### + +if ($ADD==511111111111) +{ + echo ""; + + if ( (strlen($server_id) < 2) or (strlen($server_ip) < 7) or ($LOGast_delete_phones < 1) ) + { + echo "
SERVIDOR NOT DELETED - Vaya por favor detrás y mire los datos que usted incorporó\n"; + echo "
ID Del Servidor be at least 2 characters in length\n"; + echo "
IP Del Servidor be at least 7 characters in length\n"; + } + else + { + echo "
SERVIDOR DELETION CONFIRMATION: $server_id - $server_ip\n"; + echo "

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


\n"; + } +$ADD='311111111111'; # go to server modification below +} + + +###################### +# ADD=5111111111111 confirmation before deletion of conference record +###################### + +if ($ADD==5111111111111) +{ + echo ""; + + if ( (strlen($conf_exten) < 2) or (strlen($server_ip) < 7) or ($LOGast_delete_phones < 1) ) + { + echo "
CONFERENCE NOT DELETED - Vaya por favor detrás y mire los datos que usted incorporó\n"; + echo "
Conference must be at least 2 characters in length\n"; + echo "
IP Del Servidor be at least 7 characters in length\n"; + } + else + { + echo "
CONFERENCE DELETION CONFIRMATION: $conf_exten - $server_ip\n"; + echo "

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


\n"; + } +$ADD='3111111111111'; # go to conference modification below +} + + +###################### +# ADD=51111111111111 confirmation before deletion of vicidial conference record +###################### + +if ($ADD==51111111111111) +{ + echo ""; + + if ( (strlen($conf_exten) < 2) or (strlen($server_ip) < 7) or ($LOGast_delete_phones < 1) ) + { + echo "
VICIDIAL CONFERENCE NOT DELETED - Vaya por favor detrás y mire los datos que usted incorporó\n"; + echo "
Conference must be at least 2 characters in length\n"; + echo "
IP Del Servidor be at least 7 characters in length\n"; + } + else + { + echo "
VICIDIAL CONFERENCE DELETION CONFIRMATION: $conf_exten - $server_ip\n"; + echo "

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


\n"; + } +$ADD='31111111111111'; # go to vicidial conference 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 from a campaign +###################### + +if ($ADD==62) +{ + if ($LOGmodify_campaigns==1) + { + 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"; + } + } + else + { + echo "Usted no tiene permiso de visión esta página\n"; + exit; + } +$ADD='31'; # go to campaign modification below +} + + +###################### +# ADD=63 Emergency VDAC Jam Clear +###################### + +if ($ADD==63) +{ + if ($LOGmodify_campaigns==1) + { + if (eregi('IN',$stage)) + {$group_id=$campaign_id;} + echo ""; + + if (strlen($campaign_id) < 2) + { + echo "
VDAC NO DESPEJÓ PARA LA 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_auto_calls where status='LIVE' and campaign_id='$campaign_id' order by call_time 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|EMERGENCY VDAC CLEAR|$PHP_AUTH_USER|$ip|campaign_id='$campaign_id'|\n"); + fclose($fp); + } + echo "
DE REGISTRO PASADO DE VDAC DESPEJADA PARA LA CAMPAÑA: $campaign_id\n"; + echo "

\n"; + } + } + else + { + echo "Usted no tiene permiso de visión esta página\n"; + exit; + } +# go to campaign modification below +if (eregi('IN',$stage)) + {$ADD='3111';} +else + {$ADD='31';} +} + + +###################### +# ADD=65 delete campaign lead recycle in the system +###################### + +if ($ADD==65) +{ + if ($LOGmodify_campaigns==1) + { + 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); + } + } + } + else + { + echo "Usted no tiene permiso de visión esta página\n"; + exit; + } +$ADD=31; # go to campaign modification form below +} + + +###################### +# ADD=66 delete auto alt dial status from the campaign +###################### + +if ($ADD==66) +{ + if ($LOGmodify_campaigns==1) + { + echo ""; + $stmt="SELECT count(*) from vicidial_campaigns where campaign_id='$campaign_id' and auto_alt_dial_statuses LIKE \"% $status %\";"; + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + if ($row[0] < 1) + {echo "
ESTADO AUTO DEL DIAL DEL ALT NO SUPRIMIDO - este estado del dial del alt del automóvil no está en esta campaña\n";} + else + { + if ( (strlen($campaign_id) < 2) or (strlen($status) < 1) ) + { + echo "
ESTADO AUTO DEL DIAL DEL ALT 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"; + } + else + { + echo "
ESTADO AUTO DEL DIAL DEL ALT SUPRIMIDO: $campaign_id - $status\n"; + + $stmt="SELECT auto_alt_dial_statuses from vicidial_campaigns where campaign_id='$campaign_id';"; + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + + $auto_alt_dial_statuses = eregi_replace(" $status "," ",$row[0]); + $stmt="UPDATE vicidial_campaigns set auto_alt_dial_statuses='$auto_alt_dial_statuses' 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|DELETE AUTALTDIALSTTUS|$PHP_AUTH_USER|$ip|$stmt|\n"); + fclose($fp); + } + } + } + } + else + { + echo "Usted no tiene permiso de visión esta página\n"; + exit; + } +$ADD=31; # go to campaign modification form below +} + +###################### +# ADD=67 delete agent pause code in the system +###################### + +if ($ADD==67) +{ + if ($LOGmodify_campaigns==1) + { + echo ""; + + if ( (strlen($campaign_id) < 2) or (strlen($pause_code) < 1) ) + { + echo "
CÓDIGO DE LA PAUSA DE LA CAMPAÑA NO SUPRIMIDO - Vaya por favor detrás y mire los datos que usted incorporó\n"; + echo "
pause code must be between 1 and 6 characters in length\n"; + } + else + { + echo "
CAMPAIGN PAUSE CODE DELETED: $campaign_id - $pause_code\n"; + + $stmt="DELETE FROM vicidial_pause_codes where campaign_id='$campaign_id' and pause_code='$pause_code';"; + $rslt=mysql_query($stmt, $link); + + ### LOG CHANGES TO LOG FILE ### + if ($WeBRooTWritablE > 0) + { + $fp = fopen ("./admin_changes_log.txt", "a"); + fwrite ($fp, "$date|DELETE AGENTE PAUSECODE|$PHP_AUTH_USER|$ip|$stmt|\n"); + fclose($fp); + } + } + } + else + { + echo "Usted no tiene permiso de visión esta página\n"; + exit; + } +$ADD=31; # go to campaign modification form below +} + + +###################### +# ADD=68 remove campaign dial status +###################### + +if ($ADD==68) +{ + if ($LOGmodify_campaigns==1) + { + echo ""; + $stmt="SELECT count(*) from vicidial_campaigns where campaign_id='$campaign_id' and dial_statuses LIKE \"% $status %\";"; + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + if ($row[0] < 1) + {echo "
ESTADO DEL DIAL DE LA CAMPAÑA NO QUITADO - este estado del dial no se selecciona para esta campaña\n";} + else + { + if ( (strlen($campaign_id) < 2) or (strlen($status) < 1) ) + { + echo "
ESTADO DEL DIAL DE LA CAMPAÑA NO QUITADO - 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"; + } + else + { + echo "
EL ESTADO DEL DIAL DE LA CAMPAÑA QUITÓ: $campaign_id - $status\n"; + + $stmt="SELECT dial_statuses from vicidial_campaigns where campaign_id='$campaign_id';"; + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + + $dial_statuses = eregi_replace(" $status "," ",$row[0]); + $stmt="UPDATE vicidial_campaigns set dial_statuses='$dial_statuses' 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|DIAL STATUS REMOVED |$PHP_AUTH_USER|$ip|$stmt|\n"); + fclose($fp); + } + } + } + } + else + { + echo "Usted no tiene permiso de visión esta página\n"; + exit; + } +$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 state 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 +} + + +###################### +# ADD=61111111111 delete phone record +###################### + +if ($ADD==61111111111) +{ + echo ""; + + if ( (strlen($extension) < 2) or (strlen($server_ip) < 7) or ($CoNfIrM != 'YES') or ($LOGast_delete_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='10000000000'; # go to phone list +} + + +###################### +# ADD=611111111111 delete server record +###################### + +if ($ADD==611111111111) +{ + echo ""; + + if ( (strlen($server_id) < 2) or (strlen($server_ip) < 7) or ($CoNfIrM != 'YES') or ($LOGast_delete_phones < 1) ) + { + echo "
SERVIDOR NOT DELETED - Vaya por favor detrás y mire los datos que usted incorporó\n"; + echo "
ID Del Servidor be at least 2 characters in length\n"; + echo "
IP Del Servidor be at least 7 characters in length\n"; + } + else + { + $stmt="DELETE from servers where server_id='$server_id' 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 SERVER!!|$PHP_AUTH_USER|$ip|server_id='$server_id'|server_ip='$server_ip'|\n"); + fclose($fp); + } + echo "
SERVIDOR DELETION COMPLETED: $server_id - $server_ip\n"; + echo "

\n"; + } +$ADD='100000000000'; # go to server list +} + + +###################### +# ADD=621111111111 delete vicidial server trunk record in the system +###################### + +if ($ADD==621111111111) +{ + if ($LOGmodify_servers==1) + { + echo ""; + + if ( (strlen($campaign_id) < 2) or (strlen($server_ip) < 7) ) + { + echo "
EXPEDIENTE DEL TRONCO DEL SERVIDOR DE VICIDIAL NO SUPRIMIDO - Vaya por favor detrás y mire los datos que usted incorporó\n"; + echo "
la campaña debe estar entre 3 y 8 caracteres en longitud\n"; + echo "
el server_ip retrasa debe ser por lo menos 7 caracteres\n"; + } + else + { + echo "
EXPEDIENTE DEL TRONCO DEL SERVIDOR DE VICIDIAL SUPRIMIDO: $campaign_id - $server_ip\n"; + + $stmt="DELETE FROM vicidial_server_trunks where campaign_id='$campaign_id' and server_ip='$server_ip';"; + $rslt=mysql_query($stmt, $link); + + ### LOG CHANGES TO LOG FILE ### + if ($WeBRooTWritablE > 0) + { + $fp = fopen ("./admin_changes_log.txt", "a"); + fwrite ($fp, "$date|DELETE SERVIDOR TRUNK |$PHP_AUTH_USER|$ip|$stmt|\n"); + fclose($fp); + } + } + } + else + { + echo "Usted no tiene permiso de visión esta página\n"; + exit; + } +$ADD=311111111111; # go to server modification form below +} + + +###################### +# ADD=6111111111111 delete conference record +###################### + +if ($ADD==6111111111111) +{ + echo ""; + + if ( (strlen($conf_exten) < 2) or (strlen($server_ip) < 7) or ($CoNfIrM != 'YES') or ($LOGast_delete_phones < 1) ) + { + echo "
CONFERENCE NOT DELETED - Vaya por favor detrás y mire los datos que usted incorporó\n"; + echo "
Conference be at least 2 characters in length\n"; + echo "
IP Del Servidor be at least 7 characters in length\n"; + } + else + { + $stmt="DELETE from conferences where conf_exten='$conf_exten' 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 CONF!!!!|$PHP_AUTH_USER|$ip|conf_exten='$conf_exten'|server_ip='$server_ip'|\n"); + fclose($fp); + } + echo "
CONFERENCE DELETION COMPLETED: $conf_exten - $server_ip\n"; + echo "

\n"; + } +$ADD='1000000000000'; # go to conference list +} + + +###################### +# ADD=61111111111111 delete vicidial conference record +###################### + +if ($ADD==61111111111111) +{ + echo ""; + + if ( (strlen($conf_exten) < 2) or (strlen($server_ip) < 7) or ($CoNfIrM != 'YES') or ($LOGast_delete_phones < 1) ) + { + echo "
VICIDIAL CONFERENCE NOT DELETED - Vaya por favor detrás y mire los datos que usted incorporó\n"; + echo "
Conference be at least 2 characters in length\n"; + echo "
IP Del Servidor be at least 7 characters in length\n"; + } + else + { + $stmt="DELETE from vicidial_conferences where conf_exten='$conf_exten' 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 CONF!!!!|$PHP_AUTH_USER|$ip|conf_exten='$conf_exten'|server_ip='$server_ip'|\n"); + fclose($fp); + } + echo "
VICIDIAL CONFERENCE DELETION COMPLETED: $conf_exten - $server_ip\n"; + echo "

\n"; + } +$ADD='10000000000000'; # go to vicidial conference list +} + + + + + +###################################################################################################### +###################################################################################################### +####### 3 series, record modification forms +###################################################################################################### +###################################################################################################### + + + + +###################### +# ADD=3 modify user info in the system +###################### + +if ($ADD==3) +{ + if ($LOGmodify_users==1) + { + 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]; + $modify_users = $row[34]; + $modify_campaigns = $row[35]; + $modify_lists = $row[36]; + $modify_scripts = $row[37]; + $modify_filters = $row[38]; + $modify_ingroups = $row[39]; + $modify_usergroups = $row[40]; + $modify_remoteagents = $row[41]; + $modify_servers = $row[42]; + $view_reports = $row[43]; + $vicidial_recording_override = $row[44]; + $alter_custdata_override = $row[45]; + + 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"; + 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"; + 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
Hot Keys 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
Invalidación De la Grabación de VICIDIAL:$NWB#vicidial_users-vicidial_recording_override$NWE
El Agente Altera La Invalidación De los Datos Del Cliente: $NWB#vicidial_users-alter_custdata_override$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
Modifique A Usuarios: $NWB#vicidial_users-modify_sections$NWE
Modifique Las Campañas: $NWB#vicidial_users-modify_sections$NWE
Modifique Las Listas: $NWB#vicidial_users-modify_sections$NWE
Modifique Las Escrituras: $NWB#vicidial_users-modify_sections$NWE
Modifique Los Filtros: $NWB#vicidial_users-modify_sections$NWE
Modifique A En-Grupos: $NWB#vicidial_users-modify_sections$NWE
Modifique A Grupos De Usuario: $NWB#vicidial_users-modify_sections$NWE
Modifique Los Agentes Alejados: $NWB#vicidial_users-modify_sections$NWE
Modifique Los Servidores: $NWB#vicidial_users-modify_sections$NWE
Informes De la Visión: $NWB#vicidial_users-view_reports$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"; + } + } + else + { + echo "Usted no tiene permiso de visión esta página\n"; + exit; + } +} + + +###################### +# 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) and ( (!eregi("$campaign_id",$LOGallowed_campaigns)) and (!eregi("ALL-CAMPAIGNS",$LOGallowed_campaigns)) ) ) + {$ADD=30;} # send to not allowed screen if not in vicidial_user_groups allowed_campaigns list + +if ($ADD==31) +{ + if ($LOGmodify_users==1) + { + 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); + $campaign_name = $row[1]; + $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]; + $allcalls_delay = $row[44]; + $omit_phone_code = $row[45]; + $dial_method = $row[46]; + $available_only_ratio_tally = $row[47]; + $adaptive_dropped_percentage = $row[48]; + $adaptive_maximum_level = $row[49]; + $adaptive_latest_server_time = $row[50]; + $adaptive_intensity = $row[51]; + $adaptive_dl_diff_target = $row[52]; + $concurrent_transfers = $row[53]; + $auto_alt_dial = $row[54]; + $auto_alt_dial_statuses = $row[55]; + $agent_pause_codes_active = $row[56]; + $campaign_description = $row[57]; + $campaign_changedate = $row[58]; + $campaign_stats_refresh = $row[59]; + $campaign_logindate = $row[60]; + $dial_statuses = $row[61]; + $disable_alter_custdata = $row[62]; + $no_hopper_leads_logins = $row[63]; + + 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"; + + $stmt="SELECT * from vicidial_statuses order by status"; + $rslt=mysql_query($stmt, $link); + $statuses_to_print = mysql_num_rows($rslt); + $statuses_list=''; + + $o=0; + while ($statuses_to_print > $o) + { + $rowx=mysql_fetch_row($rslt); + $statuses_list .= "\n"; + $statname_list["$rowx[0]"] = "$rowx[1]"; + $LRstatuses_list .= "\n"; + if (eregi("Y",$rowx[2])) + {$HKstatuses_list .= "\n";} + $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 .= "\n"; + $statname_list["$rowx[0]"] = "$rowx[1]"; + $LRstatuses_list .= "\n"; + if (eregi("Y",$rowx[2])) + {$HKstatuses_list .= "\n";} + $o++; + } + + $dial_statuses = preg_replace("/ -$/","",$dial_statuses); + $Dstatuses = explode(" ", $dial_statuses); + $Ds_to_print = (count($Dstatuses) -1); + + $o=0; + while ($Ds_to_print > $o) + { + $o++; + $Dstatus = $Dstatuses[$o]; + + echo "\n"; + } + + echo "\n"; + + echo "\n"; + + echo "\n"; + + echo "\n"; + + echo "\n"; + + echo "\n"; + + echo "\n"; + + echo "\n"; + + echo "\n"; + + echo "\n"; + + echo "\n"; + + echo "\n"; + + + + echo "\n"; + + echo "\n"; + + + echo "\n"; + + echo "\n"; + + echo "\n"; + + echo "\n"; + + echo "\n"; + + echo "\n"; + + echo "\n"; + + echo "\n"; + + echo "\n"; + + echo "\n"; + + echo "\n"; + + echo "\n"; + + echo "\n"; + + echo "\n"; + + echo "\n"; + + echo "\n"; + + echo "\n"; + + echo "\n"; + + echo "\n"; + + echo "\n"; + + echo "\n"; + + 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|BLEND|INBND|_C$|_B$|_I$)", $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
Descripción De la Campaña: $NWB#vicidial_campaigns-campaign_description$NWE
Campaña Change Date: $campaign_changedate   $NWB#vicidial_campaigns-campaign_changedate$NWE
Campaña Login Date: $campaign_logindate   $NWB#vicidial_campaigns-campaign_logindate$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 $o: \n"; + echo "$Dstatus - $statname_list[$Dstatus]         \n"; + echo "QUITE
Add A Dial Estado:   \n"; + echo "     $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
Método Del Dial: $NWB#vicidial_campaigns-dial_method$NWE
Nivel del Auto-Dial: (0 = off)$NWB#vicidial_campaigns-auto_dial_level$NWE       ADAPTE LA INVALIDACIÓN
Solamente Cuenta Disponible: $NWB#vicidial_campaigns-available_only_ratio_tally$NWE
Límite Del Porcentaje De la Gota: % $NWB#vicidial_campaigns-adaptive_dropped_percentage$NWE
El Máximo Adapta El Nivel Del Dial: number only $NWB#vicidial_campaigns-adaptive_maximum_level$NWE
El Tiempo Más último Del Servidor: 4 Solamente dígitos $NWB#vicidial_campaigns-adaptive_latest_server_time$NWE
Adapte El Modificante De la Intensidad: $NWB#vicidial_campaigns-adaptive_intensity$NWE
Blanco Llana De la Diferencia Del Dial: $NWB#vicidial_campaigns-adaptive_dl_diff_target$NWE
Transferencias Concurrentes: $NWB#vicidial_campaigns-concurrent_transfers$NWE
El Marcar Auto Del Alt-Nu'mero: $NWB#vicidial_campaigns-auto_alt_dial$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
Omita El Código Del Teléfono: $NWB#vicidial_campaigns-omit_phone_code$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
La Registración Retrasa: in seconds$NWB#vicidial_campaigns-allcalls_delay$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 Wrap Up: $NWB#vicidial_campaigns-wrapup_seconds$NWE
Mensaje De Wrap Up: $NWB#vicidial_campaigns-wrapup_message$NWE
Utilice La Lista Interna de DNC: $NWB#vicidial_campaigns-use_internal_dnc$NWE
Agent Pause Codes Activo: $NWB#vicidial_campaigns-agent_pause_codes_active$NWE
Campaña Stats Refresh: $NWB#vicidial_campaigns-campaign_stats_refresh$NWE
Inhabilite Alteran Datos Del Cliente:$NWB#vicidial_campaigns-disable_alter_custdata$NWE
Permita Ninguno-Tolva-Conduce Conexiones: $NWB#vicidial_campaigns-no_hopper_leads_logins$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_statuses,$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 "Click here to see a VDAD report for this campaign

\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 "Hotkey:   \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 "

NÚMERO AUTO DEL ALT QUE MARCA PARA ESTA CAMPAÑA:   $NWB#vicidial_auto_alt_dial_statuses$NWE
\n"; + echo "\n"; + echo "\n"; + + $auto_alt_dial_statuses = preg_replace("/ -$/","",$auto_alt_dial_statuses); + $AADstatuses = explode(" ", $auto_alt_dial_statuses); + $AADs_to_print = (count($AADstatuses) -1); + + $o=0; + while ($AADs_to_print > $o) + { + if (eregi("1$|3$|5$|7$|9$", $o)) + {$bgcolor='bgcolor="#B9CBFD"';} + else + {$bgcolor='bgcolor="#9BB9FB"';} + $o++; + + echo "\n"; + echo "\n"; + } + + echo "
STATUSESELIMINAR
$AADstatuses[$o]ELIMINAR
\n"; + + echo "
AGREGUE EL ESTADO QUE MARCA DEL NUEVO DEL AUTOMÓVIL NÚMERO DEL ALT
\n"; + echo "\n"; + echo "\n"; + echo "Estado:   \n"; + echo "
\n"; + + echo "

\n"; + + + + echo "

CÓDIGOS DE LA PAUSA DEL AGENTE PARA ESTA CAMPAÑA:   $NWB#vicidial_pause_codes$NWE
\n"; + echo "\n"; + echo "\n"; + + $stmt="SELECT * from vicidial_pause_codes where campaign_id='$campaign_id' order by pause_code"; + $rslt=mysql_query($stmt, $link); + $pause_codes_to_print = mysql_num_rows($rslt); + $o=0; + while ($pause_codes_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 "
CÓDIGOS DE LA PAUSAFACTURABLEMODIFICARELIMINAR
$rowx[0]\n"; + echo "\n"; + echo "\n"; + echo "  \n"; + echo "
ELIMINAR
\n"; + + echo "
AGREGUE EL NUEVO CÓDIGO DE LA PAUSA DEL AGENTE
\n"; + echo "\n"; + echo "\n"; + echo "Código De la Pausa: \n"; + echo "Nombre Del Código De la Pausa: \n"; + echo "   Facturable: \n"; + echo "
\n"; + + echo "

\n"; + + + + + + + echo "

\n"; + echo "REGISTRE TODOS LOS AGENTES FUERA DE ESTA CAMPAÑA

\n"; + echo "EMERGENCY VDAC CLEAR FOR THIS CAMPAIGN

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

SUPRIMA ESTA CAMPAÑA\n"; + } + } + else + { + echo "Usted no tiene permiso de visión esta página\n"; + exit; + } +} + + +###################### +# ADD=34 modify campaign info in the system - Basic View +###################### + +if ( ($ADD==34) and ( (!eregi("$campaign_id",$LOGallowed_campaigns)) and (!eregi("ALL-CAMPAIGNS",$LOGallowed_campaigns)) ) ) + {$ADD=30;} # send to not allowed screen if not in vicidial_user_groups allowed_campaigns list + +if ($ADD==34) +{ + if ($LOGmodify_campaigns==1) + { + 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]; + $dial_method = $row[46]; + $adaptive_intensity = $row[51]; + $campaign_description = $row[57]; + $campaign_changedate = $row[58]; + $campaign_stats_refresh = $row[59]; + $campaign_logindate = $row[60]; + $dial_statuses = $row[61]; + + 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"; + + $stmt="SELECT * from vicidial_statuses order by status"; + $rslt=mysql_query($stmt, $link); + $statuses_to_print = mysql_num_rows($rslt); + $statuses_list=''; + + $o=0; + while ($statuses_to_print > $o) + { + $rowx=mysql_fetch_row($rslt); + $statuses_list .= "\n"; + $statname_list["$rowx[0]"] = "$rowx[1]"; + $LRstatuses_list .= "\n"; + if (eregi("Y",$rowx[2])) + {$HKstatuses_list .= "\n";} + $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 .= "\n"; + $statname_list["$rowx[0]"] = "$rowx[1]"; + $LRstatuses_list .= "\n"; + if (eregi("Y",$rowx[2])) + {$HKstatuses_list .= "\n";} + $o++; + } + + $dial_statuses = preg_replace("/ -$/","",$dial_statuses); + $Dstatuses = explode(" ", $dial_statuses); + $Ds_to_print = (count($Dstatuses) -1); + + $o=0; + while ($Ds_to_print > $o) + { + $o++; + $Dstatus = $Dstatuses[$o]; + + echo "\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
Descripción De la Campaña: $NWB#vicidial_campaigns-campaign_description$NWE
Campaña Change Date: $campaign_changedate   $NWB#vicidial_campaigns-campaign_changedate$NWE
Campaña Login Date: $campaign_logindate   $NWB#vicidial_campaigns-campaign_logindate$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 $o: \n"; + echo "$Dstatus - $statname_list[$Dstatus]         \n"; + echo "QUITE
Add A Dial Estado:   \n"; + echo "     $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
Método Del Dial: $NWB#vicidial_campaigns-dial_method$NWE
Nivel del Auto-Dial: (0 = off)$NWB#vicidial_campaigns-auto_dial_level$NWE
Adapte El Modificante De la Intensidad: $NWB#vicidial_campaigns-adaptive_intensity$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_statuses,$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 "Click here to see a VDAD report for this campaign

\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"; + } + } + else + { + echo "Usted no tiene permiso de visión esta página\n"; + exit; + } +} + + +###################### +# ADD=31 campaign not allowed +###################### + +if ($ADD==30) +{ +echo "
\n"; + echo ""; +echo "You do not have permission to view campaign $campaign_id\n"; +} + + + +###################### +# ADD=311 modify list info in the system +###################### + +if ($ADD==311) +{ + if ($LOGmodify_lists==1) + { + 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]; + $list_description = $row[4]; + $list_changedate = $row[5]; + $list_lastcalldate = $row[6]; + + # 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 "\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
Descripción De la Lista: $NWB#vicidial_lists-list_description$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
Fecha Del Cambio De la Lista: $list_changedate   $NWB#vicidial_lists-list_changedate$NWE
List Last Call Date: $list_lastcalldate   $NWB#vicidial_lists-list_lastcalldate$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"; + + echo "

Click here to see all CallBack Holds in this list

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

SUPRIMA ESTA LISTA\n"; + } + } + else + { + echo "Usted no tiene permiso de visión esta página\n"; + exit; + } +} + + + +###################### +# ADD=3111 modify in-group info in the system +###################### + +if ($ADD==3111) +{ + if ($LOGmodify_ingroups==1) + { + 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 "Click here to see a report for this campaign

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

EMERGENCY VDAC CLEAR FOR THIS IN-GROUP

\n"; + echo "

SUPRIMA A ESTE EN-GRUPO\n"; + } + } + else + { + echo "Usted no tiene permiso de visión esta página\n"; + exit; + } +} + + + +###################### +# ADD=31111 modify remote agents info in the system +###################### + +if ($ADD==31111) +{ + if ($LOGmodify_remoteagents==1) + { + 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 dial plan 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"; + } + } + else + { + echo "Usted no tiene permiso de visión esta página\n"; + exit; + } +} + + +###################### +# ADD=311111 modify user group info in the system +###################### + +if ($ADD==311111) +{ + if ($LOGmodify_usergroups==1) + { + 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 "\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
Campañas Permitidas: \n"; + echo "$campaigns_list"; + echo "$NWB#vicidial_user_groups-allowed_campaigns$NWE
\n"; + + + ### list of users in this user group + + $active_confs = 0; + $stmt="SELECT user,full_name,user_level from vicidial_users where user_group='$user_group'"; + $rsltx=mysql_query($stmt, $link); + $users_to_print = mysql_num_rows($rsltx); + + echo "
\n"; + echo "
USUARIOS DENTRO DE ESTE GRUPO DE USUARIO: $users_to_print
\n"; + echo "\n"; + echo "\n"; + + $o=0; + while ($users_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 "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + } + + echo "
USERFULL NAMELEVEL
$rowx[0]$rowx[1]$rowx[2]

\n"; + + + + echo "

Click here to see all CallBack Holds in this user group

\n"; + + if ($LOGdelete_user_groups > 0) + { + echo "

SUPRIMA A ESTE GRUPO DE USUARIO\n"; + } + } + else + { + echo "Usted no tiene permiso de visión esta página\n"; + exit; + } +} + + +###################### +# ADD=3111111 modify script info in the system +###################### + +if ($ADD==3111111) +{ + if ($LOGmodify_scripts==1) + { + 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
"; + # BEGIN Insert Field + echo ""; + echo "
"; + # END Insert Field + echo " $NWB#vicidial_scripts-script_text$NWE
\n"; + + if ($LOGdelete_scripts > 0) + { + echo "

SUPRIMA ESTA ESCRITURA\n"; + } + } + else + { + echo "Usted no tiene permiso de visión esta página\n"; + exit; + } +} + + +###################### +# ADD=31111111 modify filter info in the system +###################### + +if ($ADD==31111111) +{ + if ($LOGmodify_filters==1) + { + 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"; + } + } + else + { + echo "Usted no tiene permiso de visión esta página\n"; + exit; + } +} + + +###################### +# 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=31111111111 modify phone record in the system +###################### + +if ($ADD==31111111111) +{ + if ($LOGast_admin_access==1) + { + echo "
\n"; + 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 "\n"; + echo "
Extensión del teléfono: $NWB#phones-extension$NWE
Número De Dial plan: (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
Permita Los Mensajes de SIPSAK: $NWB#phones-enable_sipsak_messages$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 ($LOGast_delete_phones > 0) + { + echo "

SUPRIMA ESTE TELÉFONO\n"; + } + } + else + { + echo "Usted no tiene permiso de visión esta página\n"; + exit; + } +} + + +###################### +# ADD=311111111111 modify server record in the system +###################### + +if ($ADD==311111111111) +{ + if ($LOGmodify_servers==1) + { + echo "
\n"; + echo ""; + + $stmt="SELECT * from servers where server_id='$server_id' or server_ip='$server_ip';"; + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + $server_id = $row[0]; + $server_ip = $row[2]; + + 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 "\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
El Marcar Del Balance de VICIDIAL: $NWB#servers-vicidial_balance_active$NWE
Balance Offlimits de VICIDIAL: $NWB#servers-balance_trunks_offlimits$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
Funcionamiento Del Sistema: $NWB#servers-sys_perf_log$NWE
Registros Del Servidor: $NWB#servers-vd_server_logs$NWE
Salida de AGI: $NWB#servers-agi_output$NWE
\n"; + + + ### vicidial server trunk records for this server + echo "

TRONCOS DE VICIDIAL PARA ESTE SERVIDOR:   $NWB#vicidial_server_trunks$NWE
\n"; + echo "\n"; + echo "\n"; + + $stmt="SELECT * from vicidial_server_trunks where server_ip='$server_ip' order by campaign_id"; + $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 "
CAMPAÑA TRONCOS RESTRICCIÓN DELETE
$rowx[1]
\n"; + echo "\n"; + echo "\n"; + echo "
ELIMINAR
\n"; + + echo "
AGREGUE EL NUEVO EXPEDIENTE DEL TRONCO DEL SERVIDOR VICIDIAL
\n"; + echo "\n"; + echo "\n"; + echo "TRUNKS:
\n"; + echo "CAMPAÑA:
\n"; + echo "RESTRICTION:
\n"; + echo "
\n"; + + echo "

\n"; + + + ### list of phones on this server + echo "
\n"; + echo "
TELÉFONOS DENTRO DE ESTE SERVIDOR:
\n"; + echo "\n"; + echo "\n"; + + $active_phones = 0; + $inactive_phones = 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_phones++; $camp_lists .= "'$rowx[0]',";} + if (ereg("N", $rowx[1])) {$inactive_phones++;} + + 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"; + + + ### list of conferences on this server + echo "
\n"; + echo "
CONFERENCES WITHIN THIS SERVER:
\n"; + echo "\n"; + echo "\n"; + + $active_confs = 0; + $stmt="SELECT conf_exten,extension from conferences 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++; + $active_confs++; + + if (eregi("1$|3$|5$|7$|9$", $o)) + {$bgcolor='bgcolor="#B9CBFD"';} + else + {$bgcolor='bgcolor="#9BB9FB"';} + + echo "\n"; + } + + echo "
CONFERENCEEXTENSIÓN
$rowx[0]$rowx[2]

\n"; + + + ### list of vicidial conferences on this server + echo "
\n"; + echo "
VICIDIAL CONFERENCES WITHIN THIS SERVER:
\n"; + echo "\n"; + echo "\n"; + + $active_vdconfs = 0; + $stmt="SELECT conf_exten,extension from vicidial_conferences 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++; + $active_vdconfs++; + + if (eregi("1$|3$|5$|7$|9$", $o)) + {$bgcolor='bgcolor="#B9CBFD"';} + else + {$bgcolor='bgcolor="#9BB9FB"';} + + echo "\n"; + } + + echo "
VD CONFERENCEEXTENSIÓN
$rowx[0]$rowx[2]

\n"; + + + echo "
\n"; + + $camp_lists = eregi_replace(".$","",$camp_lists); + echo "Este servidor tiene $active_phones Teléfonos activos y $inactive_phones Teléfonos inactivos

\n"; + echo "Este servidor tiene $active_confs active conferences

\n"; + echo "Este servidor tiene $active_vdconfs active vicidial conferences

\n"; + echo "
\n"; + if ($LOGast_delete_phones > 0) + { + echo "

DELETE THIS SERVER\n"; + } + } + else + { + echo "Usted no tiene permiso de visión esta página\n"; + exit; + } +} + + +###################### +# ADD=3111111111111 modify conference record in the system +###################### + +if ($ADD==3111111111111) +{ + if ($LOGast_admin_access==1) + { + echo "
\n"; + 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); + $conf_exten = $row[0]; + $server_ip = $row[1]; + + 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"; + if ($LOGast_delete_phones > 0) + { + echo "

DELETE THIS CONFERENCE\n"; + } + } + else + { + echo "Usted no tiene permiso de visión esta página\n"; + exit; + } +} + + +###################### +# ADD=31111111111111 modify vicidial conference record in the system +###################### + +if ($ADD==31111111111111) +{ + if ($LOGast_admin_access==1) + { + echo "
\n"; + echo ""; + + $stmt="SELECT * from vicidial_conferences where conf_exten='$conf_exten' and server_ip='$server_ip';"; + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + $conf_exten = $row[0]; + $server_ip = $row[1]; + + echo "
MODIFY A VICIDIAL CONFERENCE RECORD: $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"; + if ($LOGast_delete_phones > 0) + { + echo "

DELETE THIS VICIDIAL CONFERENCE\n"; + } + } + else + { + echo "Usted no tiene permiso de visión esta página\n"; + exit; + } +} + + + +###################### +# ADD=311111111111111 modify vicidial system settings +###################### + +if ($ADD==311111111111111) +{ + if ($LOGmodify_servers==1) + { + echo "
\n"; + echo ""; + + $stmt="SELECT version,install_date,use_non_latin,webroot_writable,enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_url,queuemetrics_log_id,queuemetrics_eq_prepend,vicidial_agent_disable,allow_sipsak_messages,admin_home_url from system_settings;"; + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + $version = $row[0]; + $install_date = $row[1]; + $use_non_latin = $row[2]; + $webroot_writable = $row[3]; + $enable_queuemetrics_logging = $row[4]; + $queuemetrics_server_ip = $row[5]; + $queuemetrics_dbname = $row[6]; + $queuemetrics_login = $row[7]; + $queuemetrics_pass = $row[8]; + $queuemetrics_url = $row[9]; + $queuemetrics_log_id = $row[10]; + $queuemetrics_eq_prepend = $row[11]; + $vicidial_agent_disable = $row[12]; + $allow_sipsak_messages = $row[13]; + $admin_home_url = $row[14]; + + echo "
MODIFIQUE LOS AJUSTES DEL SISTEMA DE VICIDIAL\n"; + echo "\n"; + echo "
\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + + echo "\n"; + echo "
Versión: $version
Install Date: $install_date
Uso No-Latino: $NWB#settings-use_non_latin$NWE
Webroot Escribible: $NWB#settings-webroot_writable$NWE
Permita La Registración De QueueMetrics: $NWB#settings-enable_queuemetrics_logging$NWE
IP Del Servidor De QueueMetrics: $NWB#settings-queuemetrics_server_ip$NWE
Nombre del DB De QueueMetrics: $NWB#settings-queuemetrics_dbname$NWE
Conexión del DB De QueueMetrics: $NWB#settings-queuemetrics_login$NWE
Contraseña del DB De QueueMetrics: $NWB#settings-queuemetrics_pass$NWE
QueueMetrics URL: $NWB#settings-queuemetrics_url$NWE
Identificación Del Registro De QueueMetrics: $NWB#settings-queuemetrics_log_id$NWE
QueueMetrics EnterQueue Prepend: $NWB#settings-queuemetrics_eq_prepend$NWE
El Agente de VICIDIAL Inhabilita La Exhibición:$NWB#settings-vicidial_agent_disable$NWE
Permita Los Mensajes de SIPSAK: $NWB#settings-allow_sipsak_messages$NWE
URL Casero Del Admin: $NWB#settings-admin_home_url$NWE
\n"; + + echo "
\n"; + } + else + { + echo "Usted no tiene permiso de visión esta página\n"; + exit; + } +} + + + + + + + +###################### +# ADD=550 search form +###################### + +if ($ADD==550) +{ +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=660 user search results +###################### + +if ($ADD==660) +{ +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=8111 find all callbacks on hold within a user group +###################### +if ($ADD==8111) +{ + echo ""; + + $stmt="SELECT * from vicidial_callbacks where status IN('ACTIVE','LIVE') and user_group='$user_group' order by recipient,status desc,callback_time"; + $rslt=mysql_query($stmt, $link); + $cb_to_print = mysql_num_rows($rslt); + +echo "
USER GROUP 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 ""; + echo "\n"; + $o++; + } + +echo "
LEADLIST CAMPAÑAENTRY FECHACALLBACK FECHAUSERRECIPIENTESTADOGROUP
$row[1]$row[2]$row[3]$row[5]$row[6]$row[8]$row[9]$row[4]$row[11]
\n"; +} + + + +###################################################################################################### +###################################################################################################### +####### 0 series, displays and searches +###################################################################################################### +###################################################################################################### + +###################### +# ADD=0 display all active users +###################### +if ($ADD==0) +{ +echo "
\n"; +echo ""; + +$USERlink='stage=USERIDDOWN'; +$NAMElink='stage=NAMEDOWN'; +$LEVELlink='stage=LEVELDOWN'; +$GROUPlink='stage=GROUPDOWN'; +$SQLorder='order by full_name'; +if (eregi("USERIDUP",$stage)) {$SQLorder='order by user asc'; $USERlink='stage=USERIDDOWN';} +if (eregi("USERIDDOWN",$stage)) {$SQLorder='order by user desc'; $USERlink='stage=USERIDUP';} +if (eregi("NAMEUP",$stage)) {$SQLorder='order by full_name asc'; $NAMElink='stage=NAMEDOWN';} +if (eregi("NAMEDOWN",$stage)) {$SQLorder='order by full_name desc'; $NAMElink='stage=NAMEUP';} +if (eregi("LEVELUP",$stage)) {$SQLorder='order by user_level asc'; $LEVELlink='stage=LEVELDOWN';} +if (eregi("LEVELDOWN",$stage)) {$SQLorder='order by user_level desc'; $LEVELlink='stage=LEVELUP';} +if (eregi("GROUPUP",$stage)) {$SQLorder='order by user_group asc'; $GROUPlink='stage=GROUPDOWN';} +if (eregi("GROUPDOWN",$stage)) {$SQLorder='order by user_group desc'; $GROUPlink='stage=GROUPUP';} + $stmt="SELECT * from vicidial_users $SQLorder"; + $rslt=mysql_query($stmt, $link); + $people_to_print = mysql_num_rows($rslt); + +echo "
USUARIOS:\n"; +echo "
\n"; +echo ""; +echo ""; +echo ""; +echo ""; +echo ""; +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 "
USER IDFULL NAMELEVELGROUPLINKS
$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"; + 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 "
\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"; +} + +###################### +# ADD=10000000000 display all phones +###################### +if ($ADD==10000000000) +{ +echo "
\n"; +echo ""; + +$EXTENlink='stage=EXTENDOWN'; +$PROTOlink='stage=PROTODOWN'; +$SERVERlink='stage=SERVERDOWN'; +$STATUSlink='stage=STATUSDOWN'; +$SQLorder='order by extension,server_ip'; +if (eregi("EXTENUP",$stage)) {$SQLorder='order by extension asc'; $EXTENlink='stage=EXTENDOWN';} +if (eregi("EXTENDOWN",$stage)) {$SQLorder='order by extension desc'; $EXTENlink='stage=EXTENUP';} +if (eregi("PROTOUP",$stage)) {$SQLorder='order by protocol asc'; $PROTOlink='stage=PROTODOWN';} +if (eregi("PROTODOWN",$stage)) {$SQLorder='order by protocol desc'; $PROTOlink='stage=PROTOUP';} +if (eregi("SERVERUP",$stage)) {$SQLorder='order by server_ip asc'; $SERVERlink='stage=SERVERDOWN';} +if (eregi("SERVERDOWN",$stage)) {$SQLorder='order by server_ip desc'; $SERVERlink='stage=SERVERUP';} +if (eregi("STATUSUP",$stage)) {$SQLorder='order by status asc'; $STATUSlink='stage=STATUSDOWN';} +if (eregi("STATUSDOWN",$stage)) {$SQLorder='order by status desc'; $STATUSlink='stage=STATUSUP';} + $stmt="SELECT * from phones $SQLorder"; + $rslt=mysql_query($stmt, $link); + $phones_to_print = mysql_num_rows($rslt); + +echo "
LISTADOS DE TELÉFONOS:\n"; +echo "
\n"; +echo ""; +echo ""; +echo ""; +echo ""; +echo ""; +echo ""; +echo ""; +echo ""; +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 "
EXTENPROTOSERVERDIAL PLANESTADONOMBREVMAILLINKS
$row[0]$row[16]$row[5]$row[1]$row[2]$row[8]$row[11]$row[14]$row[15]MODIFICAR | ESTADÍSTICAS
\n"; +} + +###################### +# ADD=100000000000 display all servers +###################### +if ($ADD==100000000000) +{ +echo "\n"; echo "
\n"; + 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=1000000000000 display all conferences +###################### +if ($ADD==1000000000000) +{ +echo " - + - + diff --git a/agc_2-X/trunk/LANG_www/vicidial_es/new_listloader_superL.php b/agc_2-X/trunk/LANG_www/vicidial_es/new_listloader_superL.php index 970a1805..6d355b87 100644 --- a/agc_2-X/trunk/LANG_www/vicidial_es/new_listloader_superL.php +++ b/agc_2-X/trunk/LANG_www/vicidial_es/new_listloader_superL.php @@ -303,11 +303,11 @@ function ParseFileName() { - + - + diff --git a/agc_2-X/trunk/LANG_www/vicidial_es/user_stats.php b/agc_2-X/trunk/LANG_www/vicidial_es/user_stats.php index 3c5abf3c..2a8f79ae 100644 --- a/agc_2-X/trunk/LANG_www/vicidial_es/user_stats.php +++ b/agc_2-X/trunk/LANG_www/vicidial_es/user_stats.php @@ -7,6 +7,7 @@ # # 60619-1743 - Added variable filtering to eliminate SQL injection attack threat # 61201-1136 - Added recordings display and changed calls to time range with 10000 limit +# 70118-1605 - Added user group column to login/out and calls lists # header ("Content-type: text/html; charset=utf-8"); @@ -38,7 +39,7 @@ $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;"; + $stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 7 and view_reports='1';"; $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $auth=$row[0]; @@ -111,6 +112,11 @@ echo "\n"; echo "           $user - $full_name\n"; +echo " - VICIDIAL Time Sheet\n"; +echo " - User Status\n"; +echo " - Modificar Usuario\n"; + + echo "\n"; echo "
\n"; + 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"; +} + +###################### +# ADD=10000000000000 display all vicidial conferences +###################### +if ($ADD==10000000000000) +{ +echo "
\n"; + echo ""; + + $stmt="SELECT * from vicidial_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"; +} + +###################### +# ADD=999999 display reports section +###################### +if ($ADD==999999) +{ + if ($LOGview_reports==1) + { + echo "
\n"; + echo ""; + + $stmt="SELECT * from vicidial_conferences order by conf_exten"; + $rslt=mysql_query($stmt, $link); + $phones_to_print = mysql_num_rows($rslt); + + $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++; + } + + $stmt="SELECT enable_queuemetrics_logging,queuemetrics_url from system_settings;"; + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + $enable_queuemetrics_logging_LU = $row[0]; + $queuemetrics_url_LU = $row[1]; + + ?> + + + + + + VICIDIAL: ESTADÍSTICAS DEL SERVIDOR and Reports + VICIDIAL: ESTADÍSTICAS DEL SERVIDOR and Reports

+ +

+	
+	 $o)
+		{
+		echo "\n";
+		echo "\n";
+		echo "\n";
+		echo "\n";
+		echo "\n";
+		echo "\n";
+		echo "\n";
+		echo "\n";
+		echo "\n";
+		$o++;
+		}
+
+	echo "
SERVERDESCRIPCIÓNIP ADDRESSACTIVOVDAD timePARK timeCLOSER/INBOUND time
$server_id[$o]$server_description[$o]$server_ip[$o]$active[$o]LINKLINKLINK
\n"; + } + else + { + echo "Usted no tiene permiso de visión esta página\n"; + exit; + } +} + + + + + +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: $admin_version"; +echo "             CONSTRUCCION: $build
\n"; + + +?> + + +
+ + + +1) + { + if (strlen($dial_statuses)>2) + { + $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"; + + + $dial_statuses = preg_replace("/ -$/","",$dial_statuses); + $Dstatuses = explode(" ", $dial_statuses); + $Ds_to_print = (count($Dstatuses) - 0); + $Dsql = ''; + $o=0; + while ($Ds_to_print > $o) + { + $o++; + $Dsql .= "'$Dstatuses[$o]',"; + } + $Dsql = preg_replace("/,$/","",$Dsql); + + $stmt="SELECT count(*) FROM vicidial_list where called_since_last_reset='N' and status IN($Dsql) 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 "|$DB|\n"; + echo "Esta campaña tiene $active_leads Leads para ser llamados en estas listas\n"; + } + else + { + echo "ningunos estados del dial seleccionados para esta campaña\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_www/vicidial_es/admin_modify_lead.php b/agc_2-X/trunk/LANG_www/vicidial_es/admin_modify_lead.php index f8c0e7c8..0c17426a 100644 --- a/agc_2-X/trunk/LANG_www/vicidial_es/admin_modify_lead.php +++ b/agc_2-X/trunk/LANG_www/vicidial_es/admin_modify_lead.php @@ -85,6 +85,8 @@ 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"];} +if (isset($_GET["modify_logs"])) {$modify_logs=$_GET["modify_logs"];} + elseif (isset($_POST["modify_logs"])) {$modify_logs=$_POST["modify_logs"];} $PHP_AUTH_USER = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_USER); @@ -112,7 +114,7 @@ $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;"; + $stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 7 and modify_leads='1';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); @@ -216,6 +218,17 @@ $call_length = ($STARTtime - $call_began); echo "
Lead added to DNC List: $lead_id - $phone_number
\n"; } + ### update last record in vicidial_agent_log and vicidial_log tables + if (($dispo != $status) and ($modify_logs > 0)) + { + $stmt="UPDATE vicidial_log set status='" . mysql_real_escape_string($status) . "' where lead_id='" . mysql_real_escape_string($lead_id) . "' order by call_date desc limit 1"; + if ($DB) {echo "|$stmt|\n";} + $rslt=mysql_query($stmt, $link); + + $stmt="UPDATE vicidial_agent_log set status='" . mysql_real_escape_string($status) . "' where lead_id='" . mysql_real_escape_string($lead_id) . "' order by agent_log_id desc limit 1"; + if ($DB) {echo "|$stmt|\n";} + $rslt=mysql_query($stmt, $link); + } } else @@ -346,7 +359,9 @@ else echo "\n"; - echo "\n"; + echo "\n"; + + echo "\n"; echo "
Modify agent and vicidial logs
\n"; echo "


\n"; diff --git a/agc_2-X/trunk/LANG_www/vicidial_es/admin_search_lead.php b/agc_2-X/trunk/LANG_www/vicidial_es/admin_search_lead.php index 745e3ef5..536853f5 100644 --- a/agc_2-X/trunk/LANG_www/vicidial_es/admin_search_lead.php +++ b/agc_2-X/trunk/LANG_www/vicidial_es/admin_search_lead.php @@ -40,7 +40,7 @@ $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;"; + $stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 7 and modify_leads='1';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); diff --git a/agc_2-X/trunk/LANG_www/vicidial_es/dbconnect.php b/agc_2-X/trunk/LANG_www/vicidial_es/dbconnect.php index 7221b35e..5247e166 100644 --- a/agc_2-X/trunk/LANG_www/vicidial_es/dbconnect.php +++ b/agc_2-X/trunk/LANG_www/vicidial_es/dbconnect.php @@ -44,5 +44,6 @@ $local_AMP = '@'; $ext_context = 'demo'; $recording_exten = '8309'; $WeBRooTWritablE = '1'; +$non_latin = '0'; # set to 1 for UTF rules ?> diff --git a/agc_2-X/trunk/LANG_www/vicidial_es/group_hourly_stats.php b/agc_2-X/trunk/LANG_www/vicidial_es/group_hourly_stats.php index 018000d2..dce46183 100644 --- a/agc_2-X/trunk/LANG_www/vicidial_es/group_hourly_stats.php +++ b/agc_2-X/trunk/LANG_www/vicidial_es/group_hourly_stats.php @@ -28,7 +28,7 @@ if (isset($_GET["ENVIAR"])) {$ENVIAR=$_GET["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;"; + $stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 6 and view_reports='1';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); diff --git a/agc_2-X/trunk/LANG_www/vicidial_es/listloader.php b/agc_2-X/trunk/LANG_www/vicidial_es/listloader.php index f2540fe2..6fce7641 100644 --- a/agc_2-X/trunk/LANG_www/vicidial_es/listloader.php +++ b/agc_2-X/trunk/LANG_www/vicidial_es/listloader.php @@ -137,11 +137,11 @@ function ShowProgress(good, bad, total, dup, post) {
(Solamente números or leave blank for values in the file)
Lead Duplicate Check: Cheque Del Duplicado Del Plomo:
Lead Timezone Lookup: Operaciones de búsqueda De la Zona De Tiempo De Plomo:
VICIDIAL Estándar    Disposición de encargo
Lead Duplicate Check: Cheque Del Duplicado Del Plomo:
Lead Timezone Lookup: Operaciones de búsqueda De la Zona De Tiempo De Plomo:
\n"; @@ -173,10 +179,10 @@ echo "

\n"; echo "
\n"; echo "TIEMPO LOGIN/LOGOUT:\n"; -echo "\n"; -echo "\n"; +echo "
EVENTO FECHA CAMPAÑAHORAS:MINUTOS
\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'"; + $stmt="SELECT event,event_epoch,event_date,campaign_id,user_group 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); @@ -197,6 +203,7 @@ echo ""; echo "\n"; echo "\n"; + echo "\n"; echo "\n"; } if (ereg("LOGOUT", $row[0])) @@ -216,6 +223,7 @@ echo ""; echo "\n"; echo "\n"; + echo "\n"; echo "\n"; $event_start_seconds=''; $event_stop_seconds=''; @@ -256,8 +264,8 @@ echo "

\n"; echo "
\n"; echo "CALLS FOR THIS TIME PERIOD: (10000 record limit)\n"; -echo "
EVENTO FECHA CAMPAÑA GROUPHORAS:MINUTOS
EVENTO FECHA$row[0] $row[2] $row[3] $row[4]
EVENTO FECHA$row[0] $row[2] $row[3] $row[4] $event_hours_int:$event_minutes_int
\n"; -echo "\n"; +echo "
# DATE/TIME LENGTH STATUS PHONE CAMPAÑA LIST LEAD
\n"; +echo "\n"; $stmt="select * 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' order by call_date desc limit 10000;"; $rslt=mysql_query($stmt, $link); @@ -279,13 +287,14 @@ echo "\n"; echo "\n"; echo "\n"; + echo "\n"; echo "\n"; echo "\n"; } -echo "
# DATE/TIME LENGTH STATUS PHONE CAMPAÑA GROUP LIST LEAD
# DATE/TIME $row[8] $row[10] $row[3] $row[14] $row[2] $row[1]
\n"; +echo "


\n"; diff --git a/agc_2-X/trunk/LANG_www/vicidial_es/user_status.php b/agc_2-X/trunk/LANG_www/vicidial_es/user_status.php index a39e51a6..0bc09f99 100644 --- a/agc_2-X/trunk/LANG_www/vicidial_es/user_status.php +++ b/agc_2-X/trunk/LANG_www/vicidial_es/user_status.php @@ -39,7 +39,7 @@ $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;"; + $stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 7 and view_reports='1';"; $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $auth=$row[0]; @@ -75,10 +75,11 @@ $browser = getenv("HTTP_USER_AGENT"); fclose($fp); } - $stmt="SELECT full_name from vicidial_users where user='" . mysql_real_escape_string($user) . "';"; + $stmt="SELECT full_name,user_group from vicidial_users where user='" . mysql_real_escape_string($user) . "';"; $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $full_name = $row[0]; + $user_group = $row[1]; $stmt="SELECT * from vicidial_live_agents where user='" . mysql_real_escape_string($user) . "';"; $rslt=mysql_query($stmt, $link); @@ -198,9 +199,12 @@ else } -echo "           $user - $full_name - \n"; +echo "           $user - $full_name \n"; +echo "       GROUP: $user_group

\n"; echo "VICIDIAL Time Sheet\n"; +echo " - User Stats\n"; +echo " - Modificar Usuario\n"; echo "
\n"; diff --git a/agc_2-X/trunk/LANG_www/vicidial_es/welcome.php b/agc_2-X/trunk/LANG_www/vicidial_es/welcome.php new file mode 100644 index 00000000..f43e47b1 --- /dev/null +++ b/agc_2-X/trunk/LANG_www/vicidial_es/welcome.php @@ -0,0 +1,25 @@ + LICENSE: GPLv2 +# + +echo "VICIDIAL Bienvenido\n"; +echo "\n"; +echo "\n"; +echo "




"; +echo ""; +echo ""; +echo "\n"; +echo "\n"; +echo "\n"; +echo "\n"; +echo "\n"; +echo "\n"; +echo "
Recepción
 
Agent Login
 
Administration
 
\n"; +echo "\n\n"; +echo "\n\n"; +echo "\n\n"; + +?> \ No newline at end of file diff --git a/agc_2-X/trunk/bin/build_translation_www_files.pl b/agc_2-X/trunk/bin/build_translation_www_files.pl index 853c4078..f54b684d 100644 --- a/agc_2-X/trunk/bin/build_translation_www_files.pl +++ b/agc_2-X/trunk/bin/build_translation_www_files.pl @@ -363,6 +363,7 @@ foreach(@lang_list) { $file[$LINESct] =~ s/\.\/images\//\.\.\/agc\/images\//g; $file[$LINESct] =~ s/\"help.gif/\"..\/astguiclient\/help.gif/g; + $phrase_found_counter++; } if ($lang_abb !~ /^en/) { diff --git a/agc_2-X/trunk/translations/br_language.txt b/agc_2-X/trunk/translations/br_language.txt index 6491819a..119ab9c4 100644 --- a/agc_2-X/trunk/translations/br_language.txt +++ b/agc_2-X/trunk/translations/br_language.txt @@ -420,3 +420,10 @@ Agent: |Agente:| Comments: |Comentários:| ### BEGIN translation phrases for 2.0.2 release ### VOLUME|VOLUME| +### BEGIN translation phrases for 2.0.3 release ### +FAST DIAL|SELETOR RÁPIDO| +YOU MUST ENTER A PHONE NUMBER AND DIAL CODE TO USE FAST DIAL|VOCÊ DEVE DAR ENTRADA A um NÚMERO De TELEFONE E A um CÓDIGO DoSELETOR PARA USAR O SELETOR RÁPIDO| + SELECT A PAUSE CODE :| SELECIONE Um CÓDIGO Da PAUSA :| +ENTER A PAUSE CODE|DÊ ENTRADA A um CÓDIGO Da PAUSA| +YOU MUST BE PAUSED TO ENTER A PAUSE CODE IN AUTO-DIAL MODE|VOCÊ DEVE SER PAUSADO PARA DAR ENTRADA A um CÓDIGO Da PAUSA NaMODALIDADE De AUTO-DIAL| +Your session has been disabled|Sua sessão foi incapacitada| diff --git a/agc_2-X/trunk/translations/de_language.txt b/agc_2-X/trunk/translations/de_language.txt index 21237c9c..fcb18d30 100644 --- a/agc_2-X/trunk/translations/de_language.txt +++ b/agc_2-X/trunk/translations/de_language.txt @@ -207,8 +207,8 @@ CAMPAIGN CUSTOM PARKING|KAMPAGNE ANGEPASSTES PARKEN| CAMPAIGN DEFAULT PARKING|KAMPAGNE DEFAULT PARKEN| CAMPAIGN CUSTOM WEB FORM|KAMPAGNE ANGEPASSTES WEB-FORMULAR| CAMPAIGN DEFAULT WEB FORM|KAMPAGNE DEFAULT WEB-FORMULAR| -CAMPAIGN ALLOWS CLOSERS|KAMPAGNE ERLAUBT CLOSERS| -CAMPAIGN ALLOWS NO CLOSERS|KAMPAGNE ERLAUBT KEINE CLOSERS| +CAMPAIGN ALLOWS CLOSERS|KAMPAGNE ERLAUBT SUPERVISOR| +CAMPAIGN ALLOWS NO CLOSERS|KAMPAGNE ERLAUBT KEINE SUPERVISOREN| USING PREVIOUS MEETME ROOM|VERWENDEN DES VORHERGEHENDEN MEETME RAUMES| USING NEW MEETME ROOM|VERWENDEN DES NEUEN MEETME RAUMES| old QUEUE and INCALL reverted list|alte WARTESCHLANGE und INCALL umgegehrte Liste| @@ -234,8 +234,8 @@ Hangup Xfer Line|Transferleitung auflegen| Hangup Both Lines|Beide Leitungen auflegen| Hangup Customer|Kunden auflegen| Transfer - Conference|Transfer - Konferenz| -LOCAL CLOSER|LOKALER CLOSER| -INTERNAL CLOSER|INTERNER CLOSER| +LOCAL CLOSER|LOKALER SUPERVISOR| +INTERNAL CLOSER|INTERNER SUPERVISOR| Dial Blind Transfer|Wähle blinden Transfer| Dial timed out, contact your system administrator|Timeout beim wählen, bitte kontaktieren sie ihren Systemadministrator| No more leads in the hopper for campaign|Es sind keine Adressen im Hopper vorhanden| @@ -252,8 +252,8 @@ Logged in as User|Angemeldet als Benutzer| Noone is in your session|Niemand ist in ihrer Konferenz.| Customer has hung up|Kunde hat aufgelegt| End-of-call Disposition Selection|Gesprächsergebnis Auswahl| -CLOSER INBOUND GROUP SELECTION|CLOSER INBOUND GRUPPENWAHL| -Closer Inbound Group Selection|Closer Inbound Gruppenwahl| +CLOSER INBOUND GROUP SELECTION|SUPERVISOR INBOUND GRUPPENWAHL| +Closer Inbound Group Selection|Supervisor Inbound Gruppenwahl| BLENDED CALLING|GEMISCHTES ANRUFEN| outbound activated|Outbound aktiviert| Preview the Lead then|Adressenvorschau| @@ -273,7 +273,7 @@ HOT KEYS INACTIVE|TASTATURKÜRZEL DEAKTIVIERT| DIAL OVERRIDE|WÄHLVORGANG OVERRIDE| SKIP LEAD|ADRESSE ÜBERSPRINGEN| DIAL LEAD|ADRESSE WÄHLEN| -LEAD PREVIEW|PREVIEW ADRESSE| +LEAD PREVIEW|ADRESSEN VORSCHAU| PAUSE AGENT DIALING|WÄHLPAUSE| DISPOSITION CALL|ABSCHLUSS CALL| session ID| Session ID| @@ -327,7 +327,7 @@ Login|Login| User|Benutzer| Password|Passwort| VERSION|VERSION| -BUILD|BAU| +BUILD|BUILD| Server|Server| RECORD|AUFNAHME| HANGUP|AUFLEGEN| @@ -359,7 +359,7 @@ VOICEMAIL|VOICEMAIL| PAUSE|PAUSE| START|START| Pause|Pause| -Resume|Zusammenfassung| +Resume|WiederAufnehmen| Faster|Schneller| Slower|Langsamer| Initializing|Initialisierung| @@ -367,16 +367,16 @@ Invalid|Unzulässig| Username|Username| CUSTOM|ANGEPASST| Notes|Anmerkungen| -First|Zuerst| +First|Vorname| MI: |MI:| -Last|Letzte| +Last|Nachname| Address|Adresse| City|Stadt| State|Bundesland| PostCode|Postleitzahl| -Province|Provinz| +Province|Region| Vendor ID|Anbieter ID| -DialCode|WahlCode| +DialCode|Vorwahl| Alt. Phone|Alternative Telefonnummer| Show|Zeigen| Email|Email| @@ -397,7 +397,7 @@ AVAILABLE EXTENSIONS|VORHANDENE EXTENSION| FAVORITES| FAVORITEN| ### END translation phrases through 1.1.11 release ### Search Existing Leads|Suche existierende Adresse| -This option if checked will attempt to find the phone number in the system before inserting it as a new lead|Wenn diese Option ausgewählt ist wird versucht, die Telefonnummer im System zu finden, bevor eine neue Adresse eingefügt wird| +This option if checked will attempt to find the phone number in the system before inserting it as a new lead|Wenn diese Option ausgewählt ist, wird versucht, die Telefonnummer im System zu finden, bevor eine neue Adresse eingefügt wird| Finish Wrapup and Move On|Beende Nachbereitung und mache weiter| seconds remaining in wrapup|Verbleibende Sekunden der Nachbereitung| Call Wrapup:|Anruf Nachbereitung| @@ -422,4 +422,10 @@ Agent: |Agent:| Comments: |Anmerkungen:| ### BEGIN translation phrases for 2.0.2 release ### VOLUME|LAUTSTÄRKE| - +### BEGIN translation phrases for 2.0.3 release ### +FAST DIAL|SCHNELLER VORWAHLKNOPF| +YOU MUST ENTER A PHONE NUMBER AND DIAL CODE TO USE FAST DIAL|SIE MÜSSEN Eine TELEFONNUMMER UND Einen VORWAHLKNOPF-CODE EINGEBEN,UM SCHNELLEN VORWAHLKNOPF ZU BENUTZEN| + SELECT A PAUSE CODE :| WÄHLEN Sie Einen PAUSE CODE Vor :| +ENTER A PAUSE CODE|GEBEN Sie Einen PAUSE CODE Ein| +YOU MUST BE PAUSED TO ENTER A PAUSE CODE IN AUTO-DIAL MODE|SIE MÜSSEN PAUSIERT WERDEN, UM Einen PAUSE CODE Im AUTO-DIAL MODUSEINZUGEBEN| +Your session has been disabled|Ihr Lernabschnitt ist gesperrt worden| diff --git a/agc_2-X/trunk/translations/el_language.txt b/agc_2-X/trunk/translations/el_language.txt index f5cf79e7..537c3e56 100644 --- a/agc_2-X/trunk/translations/el_language.txt +++ b/agc_2-X/trunk/translations/el_language.txt @@ -420,3 +420,10 @@ Agent: |Πράκτορας:| Comments: |Σχολιάζει:| ### BEGIN translation phrases for 2.0.2 release ### VOLUME|ΟΓΚΟΣ| +### BEGIN translation phrases for 2.0.3 release ### +FAST DIAL|ΓΡΗΓΟΡΟΣ ΠΙΝΑΚΑΣ| +YOU MUST ENTER A PHONE NUMBER AND DIAL CODE TO USE FAST DIAL|ΠΡΕΠΕΙ ΝΑ ΠΛΗΚΤΡΟΛΟΓΕΣΕΤΕ έναν ΤΗΛΕΦΩΝΙΚΟ ΑΡΙΘΜΟ ΚΑΙ έναν ΚΩΔΙΚΟΠΙΝΑΚΩΝ στο ΓΡΗΓΟΡΟ ΠΙΝΑΚΑ ΧΡΗΣΗΣ| + SELECT A PAUSE CODE :| ΕΠΙΛΕΞΤΕ έναν ΚΩΔΙΚΑ ΜΙΚΡΗΣ ΔΙΑΚΟΠΉΣ :| +ENTER A PAUSE CODE|ΠΛΗΚΤΡΟΛΟΓΕΣΤΕ έναν ΚΩΔΙΚΟ ΜΙΚΡΗΣ ΔΙΑΚΟΠΉΣ| +YOU MUST BE PAUSED TO ENTER A PAUSE CODE IN AUTO-DIAL MODE|ΠΡΕΠΕΙ ΝΑ ΣΤΑΜΑΤΗΘΕΙΤΕ ΓΙΑ ΝΑ ΠΛΗΚΤΡΟΛΟΓΕΙΤΕ έναν ΚΩΔΙΚΟ ΜΙΚΡΗΣΔΙΑΚΟΠΉΣ στον ΤΡΟΠΟ αυτόματος-ΠΙΝΑΚΩΝ| +Your session has been disabled|Η σύνοδός σας έχει τεθεί εκτός λειτουργίας| diff --git a/agc_2-X/trunk/translations/es_language.txt b/agc_2-X/trunk/translations/es_language.txt index 00328be9..75adae14 100644 --- a/agc_2-X/trunk/translations/es_language.txt +++ b/agc_2-X/trunk/translations/es_language.txt @@ -422,3 +422,10 @@ Agent: |Agente:| Comments: |Comentarios:| ### BEGIN translation phrases for 2.0.2 release ### VOLUME|VOLUMEN| +### BEGIN translation phrases for 2.0.3 release ### +FAST DIAL|DIAL RÁPIDO| +YOU MUST ENTER A PHONE NUMBER AND DIAL CODE TO USE FAST DIAL|USTED DEBE INTRODUCIR Un NÚMERO De TELÉFONO Y Un CÓDIGO Del DIALPARA UTILIZAR El DIAL RÁPIDO| + SELECT A PAUSE CODE :| SELECCIONE Un CÓDIGO De la PAUSA :| +ENTER A PAUSE CODE|INTRODUZCA Un CÓDIGO De la PAUSA| +YOU MUST BE PAUSED TO ENTER A PAUSE CODE IN AUTO-DIAL MODE|USTED DEBE SER DETENIDO BREVEMENTE PARA INTRODUCIR Un CÓDIGO De la PAUSA EN AUTO-DIAL MODE| +Your session has been disabled|Se ha inhabilitado su sesión| diff --git a/agc_2-X/trunk/translations/fr_language.txt b/agc_2-X/trunk/translations/fr_language.txt index b2414fa3..a0ecf91b 100644 --- a/agc_2-X/trunk/translations/fr_language.txt +++ b/agc_2-X/trunk/translations/fr_language.txt @@ -422,3 +422,10 @@ Agent: |Agent :| Comments: |Commentaires:| ### BEGIN translation phrases for 2.0.2 release ### VOLUME|VOLUME| +### BEGIN translation phrases for 2.0.3 release ### +FAST DIAL|CADRAN RAPIDE| +YOU MUST ENTER A PHONE NUMBER AND DIAL CODE TO USE FAST DIAL|VOUS DEVEZ ÉCRIRE Un NUMÉRO De TÉLÉPHONE ET Un CODE De CADRAN POURUTILISER Le CADRAN RAPIDE| + SELECT A PAUSE CODE :| CHOISISSEZ Un CODE De PAUSE :| +ENTER A PAUSE CODE|ÉCRIVEZ Un CODE De PAUSE| +YOU MUST BE PAUSED TO ENTER A PAUSE CODE IN AUTO-DIAL MODE|VOUS DEVEZ ÊTRE FAIT UNE PAUSE POUR ÉCRIRE Un CODE De PAUSE DANS LeMODE D'AUTO-DIAL| +Your session has been disabled|Votre session a été neutralisée| diff --git a/agc_2-X/trunk/translations/it_language.txt b/agc_2-X/trunk/translations/it_language.txt index 6e47da73..9656f705 100644 --- a/agc_2-X/trunk/translations/it_language.txt +++ b/agc_2-X/trunk/translations/it_language.txt @@ -422,3 +422,10 @@ Agent: |Agente:| Comments: |Osservazioni:| ### BEGIN translation phrases for 2.0.2 release ### VOLUME|VOLUME| +### BEGIN translation phrases for 2.0.3 release ### +FAST DIAL|MANOPOLA VELOCE| +YOU MUST ENTER A PHONE NUMBER AND DIAL CODE TO USE FAST DIAL|DOVETE IMPOSTARE Un NUMERO DI TELEFONO E Un CODICE Della MANOPOLA PERUTILIZZARE La MANOPOLA VELOCE| + SELECT A PAUSE CODE :| SELEZIONI Un CODICE Di PAUSA :| +ENTER A PAUSE CODE|IMPOSTI Un CODICE Di PAUSA| +YOU MUST BE PAUSED TO ENTER A PAUSE CODE IN AUTO-DIAL MODE|DOVETE ESSERE FATTI UNA PAUSA PER IMPOSTARE Un CODICE Di PAUSA NelMODO Di AUTO-DIAL| +Your session has been disabled|La vostra sessione è stata inabilitata| diff --git a/agc_2-X/trunk/translations/pl_language.txt b/agc_2-X/trunk/translations/pl_language.txt index 9939f516..37419343 100644 --- a/agc_2-X/trunk/translations/pl_language.txt +++ b/agc_2-X/trunk/translations/pl_language.txt @@ -422,3 +422,10 @@ Agent: |Agent: | Comments: |Comments: | ### BEGIN translation phrases for 2.0.2 release ### VOLUME|VOLUME| +### BEGIN translation phrases for 2.0.3 release ### +FAST DIAL|SZYBKA TARCZA| +YOU MUST ENTER A PHONE NUMBER AND DIAL CODE TO USE FAST DIAL|WY MUSICIE WCHODZIĆ NUMER TELEFONU I TARCZA SZYFROWAĆ UŻYWAĆ SZYBKI TARCZA| + SELECT A PAUSE CODE :| WYBÓR SZYFR PRZERWY :| +ENTER A PAUSE CODE|WCHODZĄ SZYFR PRZERWY| +YOU MUST BE PAUSED TO ENTER A PAUSE CODE IN AUTO-DIAL MODE|WY MUSICIE BYĆ PRZEDŁUŻANI WCHODZIĆ SZYFR PRZERWY W TRYBIE AUTOTARCZY| +Your session has been disabled|Wasza sesja była uszkadzana| diff --git a/agc_2-X/trunk/translations/pt_language.txt b/agc_2-X/trunk/translations/pt_language.txt index d008956f..f9d553a2 100644 --- a/agc_2-X/trunk/translations/pt_language.txt +++ b/agc_2-X/trunk/translations/pt_language.txt @@ -422,3 +422,10 @@ Agent: |Agente:| Comments: |Comentários:| ### BEGIN translation phrases for 2.0.2 release ### VOLUME|VOLUME| +### BEGIN translation phrases for 2.0.3 release ### +FAST DIAL|SELETOR RÁPIDO| +YOU MUST ENTER A PHONE NUMBER AND DIAL CODE TO USE FAST DIAL|VOCÊ DEVE DAR ENTRADA A um NÚMERO De TELEFONE E A um CÓDIGO DoSELETOR PARA USAR O SELETOR RÁPIDO| + SELECT A PAUSE CODE :| SELECIONE Um CÓDIGO Da PAUSA :| +ENTER A PAUSE CODE|DÊ ENTRADA A um CÓDIGO Da PAUSA| +YOU MUST BE PAUSED TO ENTER A PAUSE CODE IN AUTO-DIAL MODE|VOCÊ DEVE SER PAUSADO PARA DAR ENTRADA A um CÓDIGO Da PAUSA NaMODALIDADE De AUTO-DIAL| +Your session has been disabled|Sua sessão foi incapacitada| diff --git a/agc_2-X/trunk/www/vicidial/welcome.php b/agc_2-X/trunk/www/vicidial/welcome.php new file mode 100644 index 00000000..f0bad6d9 --- /dev/null +++ b/agc_2-X/trunk/www/vicidial/welcome.php @@ -0,0 +1,25 @@ + LICENSE: GPLv2 +# + +echo "VICIDIAL Welcome\n"; +echo "\n"; +echo "\n"; +echo "




"; +echo ""; +echo ""; +echo "\n"; +echo "\n"; +echo "\n"; +echo "\n"; +echo "\n"; +echo "\n"; +echo "
Welcome
 
Agent Login
 
Administration
 
\n"; +echo "\n\n"; +echo "\n\n"; +echo "\n\n"; + +?> \ No newline at end of file