diff --git a/agc_2-X/branches/agc_2.0.4/LANG_www/agc/conf_exten_check.php b/agc_2-X/branches/agc_2.0.4/LANG_www/agc/conf_exten_check.php index ae3b84b5..47ec7fe6 100644 --- a/agc_2-X/branches/agc_2.0.4/LANG_www/agc/conf_exten_check.php +++ b/agc_2-X/branches/agc_2.0.4/LANG_www/agc/conf_exten_check.php @@ -1,7 +1,7 @@ LICENSE: GPLv2 +# Copyright (C) 2008 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 @@ -35,6 +35,7 @@ # 61128-2255 - Added update for manual dial vicidial_live_agents # 70319-1542 - Added agent disabled display function # 71122-0205 - Added vicidial_live_agent status output +# 80424-0442 - Added non_latin lookup from system_settings # require("dbconnect.php"); @@ -63,8 +64,28 @@ if (isset($_GET["auto_dial_level"])) {$auto_dial_level=$_GET["auto_dial_level" if (isset($_GET["campagentstdisp"])) {$campagentstdisp=$_GET["campagentstdisp"];} elseif (isset($_POST["campagentstdisp"])) {$campagentstdisp=$_POST["campagentstdisp"];} + +############################################# +##### START SYSTEM_SETTINGS LOOKUP ##### +$stmt = "SELECT use_non_latin FROM system_settings;"; +$rslt=mysql_query($stmt, $link); +if ($DB) {echo "$stmt\n";} +$qm_conf_ct = mysql_num_rows($rslt); +$i=0; +while ($i < $qm_conf_ct) + { + $row=mysql_fetch_row($rslt); + $non_latin = $row[0]; + $i++; + } +##### END SETTINGS LOOKUP ##### +########################################### + +if ($non_latin < 1) +{ $user=ereg_replace("[^0-9a-zA-Z]","",$user); $pass=ereg_replace("[^0-9a-zA-Z]","",$pass); +} # default optional vars if not set if (!isset($format)) {$format="text";} @@ -81,11 +102,12 @@ if (!isset($query_date)) {$query_date = $NOW_DATE;} $random = (rand(1000000, 9999999) + 10000000); - $stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; +$stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$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]; if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) { diff --git a/agc_2-X/branches/agc_2.0.4/LANG_www/agc/manager_send.php b/agc_2-X/branches/agc_2.0.4/LANG_www/agc/manager_send.php index 94eff7b6..e3e53530 100644 --- a/agc_2-X/branches/agc_2.0.4/LANG_www/agc/manager_send.php +++ b/agc_2-X/branches/agc_2.0.4/LANG_www/agc/manager_send.php @@ -1,7 +1,7 @@ LICENSE: GPLv2 +# Copyright (C) 2008 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 @@ -32,8 +32,8 @@ # - $agent_log_id - ('123456',...) # - $call_server_ip - ('10.10.10.15',...) # - $CalLCID - ('VD01234567890123456',...) -# - $stage - ('UP','DOWN') -# +# - $stage - ('UP','DOWN','2NDXfeR') +# - $session_id - ('8600051') # CHANGELOG: # 50401-1002 - First build of script, Hangup function only @@ -68,8 +68,14 @@ # 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 +# 80331-1433 - Added second transfer try for VICIDIAL transfers on manual dial calls +# 80402-0121 - Fixes for manual dial transfers on some systems +# 80424-0442 - Added non_latin lookup from system_settings # +$version = '2.0.4-31'; +$build = '80424-0442'; + require("dbconnect.php"); ### These are variable assignments for PHP globals off @@ -137,28 +143,48 @@ if (isset($_GET["enable_sipsak_messages"])) {$enable_sipsak_messages=$_GET["e 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["session_id"])) {$session_id=$_GET["session_id"];} + elseif (isset($_POST["session_id"])) {$session_id=$_POST["session_id"];} +############################################# +##### START SYSTEM_SETTINGS LOOKUP ##### +$stmt = "SELECT use_non_latin FROM system_settings;"; +$rslt=mysql_query($stmt, $link); +if ($DB) {echo "$stmt\n";} +$qm_conf_ct = mysql_num_rows($rslt); +$i=0; +while ($i < $qm_conf_ct) + { + $row=mysql_fetch_row($rslt); + $non_latin = $row[0]; + $i++; + } +##### END SETTINGS LOOKUP ##### +########################################### + +if ($non_latin < 1) +{ $user=ereg_replace("[^0-9a-zA-Z]","",$user); $pass=ereg_replace("[^0-9a-zA-Z]","",$pass); $secondS = ereg_replace("[^0-9]","",$secondS); +} # default optional vars if not set if (!isset($ACTION)) {$ACTION="Originate";} if (!isset($format)) {$format="alert";} if (!isset($ext_priority)) {$ext_priority="1";} -$version = '2.0.29'; -$build = '70320-1502'; $StarTtime = date("U"); $NOW_DATE = date("Y-m-d"); $NOW_TIME = date("Y-m-d H:i:s"); if (!isset($query_date)) {$query_date = $NOW_DATE;} - $stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; +$stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$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]; if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) { @@ -878,6 +904,29 @@ if ($ACTION=="RedirectXtra") if ($ACTION=="Redirect") { + ### for manual dial VICIDIAL calls send the second attempt to transfer the call + if ($stage=="2NDXfeR") + { + $local_DEF = 'Local/'; + $local_AMP = '@'; + $hangup_channel_prefix = "$local_DEF$session_id$local_AMP$ext_context"; + + $stmt="SELECT count(*) FROM live_sip_channels where server_ip = '$server_ip' and channel LIKE \"$hangup_channel_prefix%\";"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + if ($row > 0) + { + $stmt="SELECT channel FROM live_sip_channels where server_ip = '$server_ip' and channel LIKE \"$hangup_channel_prefix%\";"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + $rowx=mysql_fetch_row($rslt); + $channel=$rowx[0]; + $channel = eregi_replace("1$","2",$channel); + $queryCID = eregi_replace("^.","Q",$queryCID); + } + } + $row=''; $rowx=''; $channel_live=1; if ( (strlen($channel)<3) or (strlen($queryCID)<15) or (strlen($exten)<1) or (strlen($ext_context)<1) or (strlen($ext_priority)<1) ) diff --git a/agc_2-X/branches/agc_2.0.4/LANG_www/agc/vdc_db_query.php b/agc_2-X/branches/agc_2.0.4/LANG_www/agc/vdc_db_query.php index 129af642..2cf95474 100644 --- a/agc_2-X/branches/agc_2.0.4/LANG_www/agc/vdc_db_query.php +++ b/agc_2-X/branches/agc_2.0.4/LANG_www/agc/vdc_db_query.php @@ -1,7 +1,7 @@ LICENSE: GPLv2 +# Copyright (C) 2008 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 @@ -69,6 +69,7 @@ # - $use_internal_dnc - ('Y','N') # - $omit_phone_code - ('Y','N') # - $no_delete_sessions - ('0','1') +# - $LogouTKicKAlL - ('0','1'); # CHANGELOG: # 50629-1044 - First build of script @@ -138,10 +139,14 @@ # 71120-1520 - added LogiNCamPaigns to show only allowed campaigns for agents upon login # 71125-1751 - Added inbound-group default inbound group sending to vicidial.php # 71129-2025 - restricted callbacks count and list to campaign only +# 71226-1117 - added option to kick all calls from conference upon logout +# 80128-1159 - fixed vicidial_log bugs +# 80402-0121 - Fixes for manual dial transfers on some systems, removed /n persist flag +# 80424-0442 - Added non_latin lookup from system_settings # -$version = '2.0.4-65'; -$build = '71129-2025'; +$version = '2.0.4-69'; +$build = '80424-0442'; require("dbconnect.php"); @@ -274,14 +279,38 @@ if (isset($_GET["enable_sipsak_messages"])) {$enable_sipsak_messages=$_GET["e elseif (isset($_POST["enable_sipsak_messages"])) {$enable_sipsak_messages=$_POST["enable_sipsak_messages"];} if (isset($_GET["status"])) {$status=$_GET["status"];} elseif (isset($_POST["status"])) {$status=$_POST["status"];} +if (isset($_GET["LogouTKicKAlL"])) {$LogouTKicKAlL=$_GET["LogouTKicKAlL"];} + elseif (isset($_POST["LogouTKicKAlL"])) {$LogouTKicKAlL=$_POST["LogouTKicKAlL"];} +header ("Content-type: text/html; charset=utf-8"); +header ("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1 +header ("Pragma: no-cache"); // HTTP/1.0 + +############################################# +##### START SYSTEM_SETTINGS LOOKUP ##### +$stmt = "SELECT use_non_latin FROM system_settings;"; +$rslt=mysql_query($stmt, $link); +if ($DB) {echo "$stmt\n";} +$qm_conf_ct = mysql_num_rows($rslt); +$i=0; +while ($i < $qm_conf_ct) + { + $row=mysql_fetch_row($rslt); + $non_latin = $row[0]; + $i++; + } +##### END SETTINGS LOOKUP ##### +########################################### + +if ($non_latin < 1) +{ $user=ereg_replace("[^0-9a-zA-Z]","",$user); $pass=ereg_replace("[^0-9a-zA-Z]","",$pass); $length_in_sec = ereg_replace("[^0-9]","",$length_in_sec); $phone_code = ereg_replace("[^0-9]","",$phone_code); $phone_number = ereg_replace("[^0-9]","",$phone_number); - +} # default optional vars if not set if (!isset($format)) {$format="text";} @@ -305,6 +334,7 @@ else { $stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$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]; @@ -381,7 +411,6 @@ if ($ACTION == 'LogiNCamPaigns') $LOGallowed_campaignsSQL=''; $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); if ( (!eregi("ALL-CAMPAIGNS",$row[0])) ) @@ -392,7 +421,6 @@ if ($ACTION == 'LogiNCamPaigns') } $stmt="SELECT campaign_id,campaign_name from vicidial_campaigns where active='Y' $LOGallowed_campaignsSQL order by campaign_id"; - if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); $camps_to_print = mysql_num_rows($rslt); @@ -713,7 +741,8 @@ if ($ACTION == 'manDiaLnextCaLL') $local_AMP = '@'; $Local_out_prefix = '9'; $Local_dial_timeout = '60'; - $Local_persist = '/n'; + # $Local_persist = '/n'; + $Local_persist = ''; if ($dial_timeout > 4) {$Local_dial_timeout = $dial_timeout;} $Local_dial_timeout = ($Local_dial_timeout * 1000); if (strlen($dial_prefix) > 0) {$Local_out_prefix = "$dial_prefix";} @@ -1049,7 +1078,8 @@ if ($stage == "end") if ($format=='debug') {echo "\n";} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); - if ($row[0] > 0) + $check_inbound = $row[0]; + if ($check_inbound > 0) { ##### look for the start epoch in the vicidial_closer_log table $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;"; @@ -1072,11 +1102,8 @@ if ($stage == "end") { $length_in_sec = 0; } - $stmt = "select count(*) from vicidial_campaigns where campaign_id='$campaign' and campaign_allow_inbound='Y';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ( ($length_in_sec < 1) and ($row[0] > 0) ) + + if ( ($length_in_sec < 1) and ($check_inbound > 0) ) { ##### start epoch in the vicidial_log table, couldn't find one in vicidial_closer_log $stmt="SELECT start_epoch FROM vicidial_log where uniqueid='$uniqueid' and lead_id='$lead_id';"; @@ -1097,21 +1124,25 @@ if ($stage == "end") } else {$length_in_sec = ($StarTtime - $start_epoch);} - $stmt = "select count(*) from vicidial_campaigns where campaign_id='$campaign' and campaign_allow_inbound='Y';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0] > 0) + $closer_logged=0; + if ($check_inbound > 0) { - $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;"; + $four_hours_ago = date("Y-m-d H:i:s", mktime(date("H")-4,date("i"),date("s"),date("m"),date("d"),date("Y"))); + + $stmt = "UPDATE vicidial_closer_log set end_epoch='$StarTtime', length_in_sec='$length_in_sec' where lead_id='$lead_id' and call_date > \"$four_hours_ago\" order by start_epoch desc limit 1;"; if ($DB) {echo "$stmt\n";} $rslt=mysql_query($stmt, $link); + $affected_rows = mysql_affected_rows($link); + if ($affected_rows > 0) + { + $closer_logged=1; + echo "$uniqueid\n$channel\n"; + } } ############################################# ##### 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); @@ -1247,7 +1278,6 @@ if ($stage == "end") { $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); } @@ -1274,7 +1304,6 @@ if ($stage == "end") $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); @@ -1314,7 +1343,6 @@ if ($stage == "end") $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); @@ -1338,7 +1366,6 @@ if ($stage == "end") $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); @@ -1347,19 +1374,22 @@ if ($stage == "end") } } - ##### look for the channel in the UPDATED vicidial_manager record of the call initiation - $stmt="UPDATE vicidial_log set end_epoch='$StarTtime', length_in_sec='$length_in_sec' where uniqueid='$uniqueid' and lead_id='$lead_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); + if ($closer_logged < 1) + { + ##### update the duration and end time in the vicidial_log table + $stmt="UPDATE vicidial_log set end_epoch='$StarTtime', length_in_sec='$length_in_sec' where uniqueid='$uniqueid' and lead_id='$lead_id';"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + $affected_rows = mysql_affected_rows($link); - if ($affected_rows > 0) - { - echo "$uniqueid\n$channel\n"; - } - else - { - echo "LOG NOT ENTERED\n\n"; + if ($affected_rows > 0) + { + echo "$uniqueid\n$channel\n"; + } + else + { + echo "LOG NOT ENTERED\n\n"; + } } } @@ -1642,41 +1672,69 @@ if ($ACTION == 'VDADcheckINCOMING') $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';"; + + + $stmt = "select campaign_id,phone_number,alt_dial,call_type from vicidial_auto_calls where callerid = '$callerid' order by call_time desc limit 1;"; if ($DB) {echo "$stmt\n";} $rslt=mysql_query($stmt, $link); - - $stmt = "select count(*) from vicidial_campaigns where campaign_id='$campaign' and campaign_allow_inbound='Y';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0] > 0) + $VDAC_cid_ct = mysql_num_rows($rslt); + if ($VDAC_cid_ct > 0) { - ### update the vicidial_closer_log user to INCALL - $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;"; + $row=mysql_fetch_row($rslt); + $VDADchannel_group =$row[0]; + $dialed_number =$row[1]; + $dialed_label =$row[2]; + $call_type =$row[3]; + } + else + { + if ($WeBRooTWritablE > 0) + { + $fp = fopen ("./vicidial_debug.txt", "a"); + fwrite ($fp, "$NOW_TIME|INBND|$callerid|$user|$user_group|$list_id|$lead_id|$phone_number|$uniqueid|\n"); + fclose($fp); + } + } + + if ( ($call_type=='OUT') or ($call_type=='OUTBALANCE') ) + { + $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); - $stmt = "select campaign_id,phone_number,alt_dial from vicidial_auto_calls where callerid = '$callerid' order by call_time desc limit 1;"; + $stmt = "select campaign_script,get_call_launch,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number from vicidial_campaigns where campaign_id='$campaign';"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + $VDIG_cid_ct = mysql_num_rows($rslt); + if ($VDIG_cid_ct > 0) + { + $row=mysql_fetch_row($rslt); + $VDCL_campaign_script = $row[0]; + $VDCL_get_call_launch = $row[1]; + $VDCL_xferconf_a_dtmf = $row[2]; + $VDCL_xferconf_a_number = $row[3]; + $VDCL_xferconf_b_dtmf = $row[4]; + $VDCL_xferconf_b_number = $row[5]; + } + echo "|||||$VDCL_campaign_script|$VDCL_get_call_launch|$VDCL_xferconf_a_dtmf|$VDCL_xferconf_a_number|$VDCL_xferconf_b_dtmf|$VDCL_xferconf_b_number|\n|\n"; + + $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); - $VDADchannel_group =$row[0]; - $dialed_number =$row[1]; - $dialed_label =$row[2]; - } - else - { - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./vicidial_debug.txt", "a"); - fwrite ($fp, "$NOW_TIME|INBND|$callerid|$user|$user_group|$list_id|$lead_id|$phone_number|$uniqueid|\n"); - fclose($fp); - } + $dialed_number =$row[0]; + $dialed_label =$row[1]; } + } + else + { + ### update the vicidial_closer_log user to INCALL + $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 count(*) from vicidial_log where lead_id='$lead_id' and uniqueid='$uniqueid';"; if ($DB) {echo "$stmt\n";} @@ -1748,35 +1806,6 @@ if ($ACTION == 'VDADcheckINCOMING') } else {echo '|' . $tsr . "\n";} } - else - { - $stmt = "select campaign_script,get_call_launch,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number from vicidial_campaigns where campaign_id='$campaign';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDIG_cid_ct = mysql_num_rows($rslt); - if ($VDIG_cid_ct > 0) - { - $row=mysql_fetch_row($rslt); - $VDCL_campaign_script = $row[0]; - $VDCL_get_call_launch = $row[1]; - $VDCL_xferconf_a_dtmf = $row[2]; - $VDCL_xferconf_a_number = $row[3]; - $VDCL_xferconf_b_dtmf = $row[4]; - $VDCL_xferconf_b_number = $row[5]; - } - echo "|||||$VDCL_campaign_script|$VDCL_get_call_launch|$VDCL_xferconf_a_dtmf|$VDCL_xferconf_a_number|$VDCL_xferconf_b_dtmf|$VDCL_xferconf_b_number|\n|\n"; - - $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); $comments = eregi_replace("\n",'!N',$comments); @@ -1948,6 +1977,18 @@ else $rslt=mysql_query($stmt, $link); } + if ($LogouTKicKAlL > 0) + { + $local_DEF = 'Local/5555'; + $local_AMP = '@'; + $kick_local_channel = "$local_DEF$conf_exten$local_AMP$ext_context"; + $queryCID = "ULGH3458$StarTtime"; + + $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$queryCID','Channel: $kick_local_channel','Context: $ext_context','Exten: 8300','Priority: 1','Callerid: $queryCID','','','','$channel','$exten');"; + 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";} @@ -1968,7 +2009,6 @@ else ############################################# ##### 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); @@ -2000,12 +2040,11 @@ else # $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"; @@ -2023,7 +2062,6 @@ else $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); @@ -2101,6 +2139,7 @@ if ($ACTION == 'updateDISPO') $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) { @@ -2150,7 +2189,6 @@ if ($ACTION == 'updateDISPO') ############################################# ##### 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); @@ -2175,7 +2213,6 @@ if ($ACTION == 'updateDISPO') $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); @@ -2204,7 +2241,6 @@ if ($ACTION == 'updateLEAD') { $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); @@ -2220,7 +2256,6 @@ if ($ACTION == 'updateLEAD') $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); @@ -2290,7 +2325,6 @@ if ( ($ACTION == 'VDADpause') || ($ACTION == 'VDADready') ) ############################################# ##### 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); @@ -2317,7 +2351,6 @@ if ( ($ACTION == 'VDADpause') || ($ACTION == 'VDADready') ) $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); @@ -2424,7 +2457,6 @@ if ($ACTION == 'PauseCodeSubmit') ############################################# ##### 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); @@ -2455,7 +2487,6 @@ if ($ACTION == 'PauseCodeSubmit') $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); diff --git a/agc_2-X/branches/agc_2.0.4/LANG_www/agc/vicidial.php b/agc_2-X/branches/agc_2.0.4/LANG_www/agc/vicidial.php index ccd81ed1..0d24d76e 100644 --- a/agc_2-X/branches/agc_2.0.4/LANG_www/agc/vicidial.php +++ b/agc_2-X/branches/agc_2.0.4/LANG_www/agc/vicidial.php @@ -1,7 +1,7 @@ LICENSE: GPLv2 +# Copyright (C) 2008 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 @@ -171,10 +171,13 @@ # 71125-1751 - Changed Transfer section to allow for selection of in-groups to send calls to # 71127-0408 - Added height and width settings for easier modification of screen size # 71129-2025 - restricted callbacks count and list to campaign only +# 71226-1117 - added option to kick all calls from conference upon logout +# 80330-0823 - Added new AST_blind monitoring ability and minor cleanup for release +# 80402-0121 - Fixes for Manual Dial hangups and transfers # -$version = '2.0.4-142'; -$build = '71129-2025'; +$version = '2.0.4-145'; +$build = '80402-0121'; require("dbconnect.php"); @@ -207,6 +210,11 @@ if (isset($_GET["relogin"])) {$relogin=$_GET["relogin"];} $VD_campaign = strtoupper($VD_campaign); $VD_campaign = eregi_replace(" ",'',$VD_campaign); } + if (!isset($flag_channels)) + { + $flag_channels=0; + $flag_string=''; + } ### security strip all non-alphanumeric characters out of the variables ### $DB=ereg_replace("[^0-9a-z]","",$DB); @@ -237,6 +245,22 @@ $CIDdate = date("ymdHis"); $random = (rand(1000000, 9999999) + 10000000); +############################################# +##### START SYSTEM_SETTINGS LOOKUP ##### +$stmt = "SELECT use_non_latin FROM system_settings;"; +$rslt=mysql_query($stmt, $link); +if ($DB) {echo "$stmt\n";} +$qm_conf_ct = mysql_num_rows($rslt); +$i=0; +while ($i < $qm_conf_ct) + { + $row=mysql_fetch_row($rslt); + $non_latin = $row[0]; + $i++; + } +##### END SETTINGS LOOKUP ##### +########################################### + $conf_silent_prefix = '7'; # vicidial_conferences prefix to enter silently $HKuser_level = '5'; # minimum vicidial user_level for HotKeys $campaign_login_list = '1'; # show drop-down list of campaigns at login @@ -256,6 +280,7 @@ $volumecontrol_active = '1'; # set to 1 to allow agents to alter volume of chann $PreseT_DiaL_LinKs = '1'; # set to 1 to show a DIAL link for Dial Presets $LogiNAJAX = '1'; # set to 1 to do lookups $HidEMonitoRSessionS = '1'; # set to 1 to hide remote monitoring channels from "session calls" +$LogouTKicKAlL = '1'; # set to 1 to hangup all calls in session upon agent logout $TEST_all_statuses = '0'; # TEST variable allows all statuses in dispo screen @@ -328,13 +353,12 @@ $LOGallowed_campaignsSQL=''; if ($relogin == 'YES') { $stmt="SELECT user_group from vicidial_users where user='$VD_login' and pass='$VD_pass'"; - if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $VU_user_group=$row[0]; $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); if ( (!eregi("ALL-CAMPAIGNS",$row[0])) ) @@ -509,7 +533,6 @@ if ($user_login_first == 1) { $stmt="SELECT phone_login,phone_pass from vicidial_users where user='$VD_login' and pass='$VD_pass' and user_level > 0;"; if ($DB) {echo "|$stmt|\n";} - if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $phone_login=$row[0]; @@ -593,7 +616,6 @@ $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]; @@ -604,7 +626,6 @@ $VDloginDISPLAY=0; $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,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]; @@ -630,7 +651,6 @@ $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]; @@ -662,7 +682,6 @@ $VDloginDISPLAY=0; ##### check to see that the campaign is active $stmt="SELECT count(*) FROM vicidial_campaigns where campaign_id='$VD_campaign' and active='Y';"; if ($DB) {echo "|$stmt|\n";} - if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $CAMPactive=$row[0]; @@ -674,7 +693,6 @@ $VDloginDISPLAY=0; $VARstatusnames=''; ##### grab the statuses that can be used for dispositioning by an agent $stmt="SELECT status,status_name FROM vicidial_statuses WHERE $selectableSQL status != 'NEW' order by status limit 50;"; - if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $VD_statuses_ct = mysql_num_rows($rslt); @@ -691,7 +709,6 @@ $VDloginDISPLAY=0; ##### grab the campaign-specific statuses that can be used for dispositioning by an agent $stmt="SELECT status,status_name FROM vicidial_campaign_statuses WHERE $selectableSQL status != 'NEW' and campaign_id='$VD_campaign' order by status limit 50;"; - if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $VD_statuses_camp = mysql_num_rows($rslt); @@ -712,7 +729,6 @@ $VDloginDISPLAY=0; ##### grab the campaign-specific HotKey statuses that can be used for dispositioning by an agent $stmt="SELECT hotkey,status,status_name FROM vicidial_campaign_hotkeys WHERE selectable='Y' and status != 'NEW' and campaign_id='$VD_campaign' order by hotkey limit 9;"; - if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $HK_statuses_camp = mysql_num_rows($rslt); @@ -743,7 +759,6 @@ $VDloginDISPLAY=0; ##### grab the statuses to be dialed for your campaign as well as other campaign settings $stmt="SELECT park_ext,park_file_name,web_form_address,allow_closers,auto_dial_level,dial_timeout,dial_prefix,campaign_cid,campaign_vdad_exten,campaign_rec_exten,campaign_recording,campaign_rec_filename,campaign_script,get_call_launch,am_message_exten,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,alt_number_dialing,scheduled_callbacks,wrapup_seconds,wrapup_message,closer_campaigns,use_internal_dnc,allcalls_delay,omit_phone_code,agent_pause_codes_active,no_hopper_leads_logins,campaign_allow_inbound,manual_dial_list_id,default_xfer_group,xfer_groups FROM vicidial_campaigns where campaign_id = '$VD_campaign';"; - if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $row=mysql_fetch_row($rslt); @@ -802,7 +817,6 @@ $VDloginDISPLAY=0; { ##### grab the pause codes for this campaign $stmt="SELECT pause_code,pause_code_name FROM vicidial_pause_codes WHERE campaign_id='$VD_campaign' order by pause_code limit 50;"; - if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $VD_pause_codes = mysql_num_rows($rslt); @@ -828,7 +842,6 @@ $VDloginDISPLAY=0; { $VARingroups=''; $stmt="select group_id from vicidial_inbound_groups where active = 'Y' and group_id IN($closer_campaigns) order by group_id limit 60;"; - 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); @@ -852,7 +865,6 @@ $VDloginDISPLAY=0; { $VARxfergroups=''; $stmt="select group_id,group_name from vicidial_inbound_groups where active = 'Y' and group_id IN($xfer_groups) order by group_id limit 60;"; - if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $xfer_ct = mysql_num_rows($rslt); @@ -871,7 +883,6 @@ $VDloginDISPLAY=0; ##### grab the number of leads in the hopper for this campaign $stmt="SELECT count(*) FROM vicidial_hopper where campaign_id = '$VD_campaign' and status='READY';"; - if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $row=mysql_fetch_row($rslt); @@ -933,7 +944,6 @@ $VDloginDISPLAY=0; $authphone=0; $stmt="SELECT count(*) 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); $authphone=$row[0]; @@ -972,7 +982,6 @@ 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]; @@ -1050,7 +1059,6 @@ 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]; @@ -1104,12 +1112,10 @@ 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 ( ($campaign_allow_inbound == 'Y') || ($campaign_leads_to_call > 0) || (ereg('Y',$no_hopper_leads_logins)) ) @@ -1117,12 +1123,10 @@ else ### insert an entry into the user log for the login event $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); @@ -1139,7 +1143,6 @@ 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); @@ -1151,7 +1154,6 @@ 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"; @@ -1159,28 +1161,24 @@ 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"; $stmt="DELETE from vicidial_live_inbound_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"; @@ -1194,7 +1192,6 @@ else ############################################# ##### 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); @@ -1226,7 +1223,6 @@ else ### 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"; @@ -1237,7 +1233,6 @@ else ##### grab the campaign_weight and number of calls today on that campaign for the agent $stmt="SELECT campaign_weight,calls_today FROM vicidial_campaign_agents where user='$VD_login' and campaign_id = '$VD_campaign';"; - if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $vca_ct = mysql_num_rows($rslt); @@ -1254,7 +1249,6 @@ else $calls_today = '0'; $stmt="INSERT INTO vicidial_campaign_agents (user,campaign_id,campaign_rank,campaign_weight,calls_today) values('$VD_login','$VD_campaign','0','0','$calls_today');"; 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"; @@ -1262,7 +1256,6 @@ 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,campaign_weight,calls_today) values('$VD_login','$server_ip','$session_id','$SIP_user','PAUSED','','$VD_campaign','','','','$random','$NOW_TIME','$tsNOW_TIME','$NOW_TIME','$closer_chooser_string','$user_level','$campaign_weight','$calls_today');"; 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"; @@ -1274,14 +1267,12 @@ else $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"; @@ -1302,7 +1293,6 @@ 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"; @@ -1314,14 +1304,12 @@ else $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"; @@ -1394,7 +1382,6 @@ else ##### Agent is going to log in so insert the vicidial_agent_log entry now $stmt="INSERT INTO vicidial_agent_log (user,server_ip,event_time,campaign_id,pause_epoch,pause_sec,wait_epoch,user_group,sub_status) values('$VD_login','$server_ip','$NOW_TIME','$VD_campaign','$StarTtimE','0','$StarTtimE','$VU_user_group','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); $agent_log_id = mysql_insert_id($link); @@ -1414,7 +1401,6 @@ else ##### grab the datails of all active scripts in the system $stmt="SELECT script_id,script_name,script_text FROM vicidial_scripts WHERE active='Y' order by script_id limit 100;"; - if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $MM_scripts = mysql_num_rows($rslt); @@ -1423,8 +1409,8 @@ else { $row=mysql_fetch_row($rslt); $MMscriptid[$e] =$row[0]; - $MMscriptname[$e] = rawurlencode($row[1]); - $MMscripttext[$e] = rawurlencode($row[2]); + $MMscriptname[$e] = urlencode($row[1]); + $MMscripttext[$e] = urlencode($row[2]); $MMscriptids = "$MMscriptids'$MMscriptid[$e]',"; $MMscriptnames = "$MMscriptnames'$MMscriptname[$e]',"; $MMscripttexts = "$MMscripttexts'$MMscripttext[$e]',"; @@ -1819,10 +1805,14 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} var DispO3wayCalLxfernumber = ''; var DispO3wayCalLcamptail = ''; var PausENotifYCounTer = 0; + var RedirecTxFEr = 0; var phone_ip = ''; var enable_sipsak_messages = ''; var allow_sipsak_messages = ''; var HidEMonitoRSessionS = ''; + var LogouTKicKAlL = ''; + var flag_channels = ''; + var flag_string = ''; var DiaLControl_auto_HTML = "\"Pause\"\"Resume\""; var DiaLControl_auto_HTML_ready = "\"Pause\"\"Resume\""; var DiaLControl_auto_HTML_OFF = "\"Pause\"\"Resume\""; @@ -2342,7 +2332,16 @@ 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]; - if ( (HidEMonitoRSessionS==1) && (channelfieldA.match(/68600/)) ) + var regXFcred = new RegExp(flag_string,"g"); + if ( (channelfieldA.match(regXFcred)) && (flag_channels>0) ) + { + var chan_name_color = 'log_text_red'; + } + else + { + var chan_name_color = 'log_text'; + } + if ( (HidEMonitoRSessionS==1) && (channelfieldA.match(/ASTblind/)) ) { var hide_channel=1; } @@ -2350,11 +2349,11 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} { if (volumecontrol_active!=1) { - live_conf_HTML = live_conf_HTML + "" + loop_ct + "" + channelfieldA + "HANGUP"; + live_conf_HTML = live_conf_HTML + "" + loop_ct + "" + channelfieldA + "HANGUP"; } else { - live_conf_HTML = live_conf_HTML + "" + loop_ct + "" + channelfieldA + "HANGUP           "; + live_conf_HTML = live_conf_HTML + "" + loop_ct + "" + channelfieldA + "HANGUP           "; } } // var debugspan = document.getElementById("debugbottomspan").innerHTML; @@ -2558,6 +2557,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} // Covers the following types: XFER, VMAIL, ENTRY, CONF, PARK, FROMPARK, XfeRLOCAL, XfeRINTERNAL, XfeRBLIND, VfeRVMAIL function mainxfer_send_redirect(taskvar,taskxferconf,taskserverip,taskdebugnote) { + if (auto_dial_level == 0) {RedirecTxFEr = 1;} var xmlhttp=false; /*@cc_on @*/ /*@if (@_jscript_version >= 5) @@ -2630,7 +2630,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} } else { - xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=RedirectVD&format=text&channel=" + redirectvalue + "&call_server_ip=" + redirectserverip + "&queryCID=" + queryCID + "&exten=" + blindxferdialstring + "&ext_context=" + ext_context + "&ext_priority=1&auto_dial_level=" + auto_dial_level + "&campaign=" + campaign + "&uniqueid=" + document.vicidial_form.uniqueid.value + "&lead_id=" + document.vicidial_form.lead_id.value + "&secondS=" + VD_live_call_secondS; + xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=RedirectVD&format=text&channel=" + redirectvalue + "&call_server_ip=" + redirectserverip + "&queryCID=" + queryCID + "&exten=" + blindxferdialstring + "&ext_context=" + ext_context + "&ext_priority=1&auto_dial_level=" + auto_dial_level + "&campaign=" + campaign + "&uniqueid=" + document.vicidial_form.uniqueid.value + "&lead_id=" + document.vicidial_form.lead_id.value + "&secondS=" + VD_live_call_secondS + "&session_id=" + session_id; } } if (taskvar == 'XfeRINTERNAL') @@ -2649,25 +2649,25 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} // "90009*$group**$lead_id**$phone_number*$user*"; var redirectdestination = closerxferinternal + '90009*' + XfeRSelecT.value + '**' + document.vicidial_form.lead_id.value + '**' + document.vicidial_form.phone_number.value + '*' + user + '*'; - xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=RedirectVD&format=text&channel=" + redirectvalue + "&call_server_ip=" + redirectserverip + "&queryCID=" + queryCID + "&exten=" + redirectdestination + "&ext_context=" + ext_context + "&ext_priority=1&auto_dial_level=" + auto_dial_level + "&campaign=" + campaign + "&uniqueid=" + document.vicidial_form.uniqueid.value + "&lead_id=" + document.vicidial_form.lead_id.value + "&secondS=" + VD_live_call_secondS; + xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=RedirectVD&format=text&channel=" + redirectvalue + "&call_server_ip=" + redirectserverip + "&queryCID=" + queryCID + "&exten=" + redirectdestination + "&ext_context=" + ext_context + "&ext_priority=1&auto_dial_level=" + auto_dial_level + "&campaign=" + campaign + "&uniqueid=" + document.vicidial_form.uniqueid.value + "&lead_id=" + document.vicidial_form.lead_id.value + "&secondS=" + VD_live_call_secondS + "&session_id=" + session_id; } if (taskvar == 'XfeR') { var queryCID = "LRvdcW" + epoch_sec + user_abb; var redirectdestination = document.vicidial_form.extension_xfer.value; - xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=RedirectName&format=text&channel=" + redirectvalue + "&call_server_ip=" + redirectserverip + "&queryCID=" + queryCID + "&extenName=" + redirectdestination + "&ext_context=" + ext_context + "&ext_priority=1"; + xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=RedirectName&format=text&channel=" + redirectvalue + "&call_server_ip=" + redirectserverip + "&queryCID=" + queryCID + "&extenName=" + redirectdestination + "&ext_context=" + ext_context + "&ext_priority=1" + "&session_id=" + session_id; } if (taskvar == 'VMAIL') { var queryCID = "LVvdcW" + epoch_sec + user_abb; var redirectdestination = document.vicidial_form.extension_xfer.value; - xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=RedirectNameVmail&format=text&channel=" + redirectvalue + "&call_server_ip=" + redirectserverip + "&queryCID=" + queryCID + "&exten=" + voicemail_dump_exten + "&extenName=" + redirectdestination + "&ext_context=" + ext_context + "&ext_priority=1"; + xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=RedirectNameVmail&format=text&channel=" + redirectvalue + "&call_server_ip=" + redirectserverip + "&queryCID=" + queryCID + "&exten=" + voicemail_dump_exten + "&extenName=" + redirectdestination + "&ext_context=" + ext_context + "&ext_priority=1" + "&session_id=" + session_id; } if (taskvar == 'ENTRY') { var queryCID = "LEvdcW" + epoch_sec + user_abb; var redirectdestination = document.vicidial_form.extension_xfer_entry.value; - xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=Redirect&format=text&channel=" + redirectvalue + "&call_server_ip=" + redirectserverip + "&queryCID=" + queryCID + "&exten=" + redirectdestination + "&ext_context=" + ext_context + "&ext_priority=1"; + xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=Redirect&format=text&channel=" + redirectvalue + "&call_server_ip=" + redirectserverip + "&queryCID=" + queryCID + "&exten=" + redirectdestination + "&ext_context=" + ext_context + "&ext_priority=1" + "&session_id=" + session_id; } if (taskvar == '3WAY') { @@ -2689,7 +2689,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} DispO3wayCalLxfernumber = document.vicidial_form.xfernumber.value; DispO3wayCalLcamptail = ''; - 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=" + XfeRSelecT.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=" + XfeRSelecT.value + "&session_id=" + session_id; if (taskdebugnote == 'FIRST') { @@ -2702,7 +2702,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} var redirectdestination = taskxferconf; var redirectdestserverip = taskserverip; var parkedby = protocol + "/" + extension; - xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=RedirectToPark&format=text&channel=" + redirectdestination + "&call_server_ip=" + redirectdestserverip + "&queryCID=" + queryCID + "&exten=" + park_on_extension + "&ext_context=" + ext_context + "&ext_priority=1&extenName=park&parkedby=" + parkedby; + xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=RedirectToPark&format=text&channel=" + redirectdestination + "&call_server_ip=" + redirectdestserverip + "&queryCID=" + queryCID + "&exten=" + park_on_extension + "&ext_context=" + ext_context + "&ext_priority=1&extenName=park&parkedby=" + parkedby + "&session_id=" + session_id; document.getElementById("ParkControl").innerHTML ="\"Grab"; customerparked=1; @@ -2723,7 +2723,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} {var dest_dialstring = session_id;} } - xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=RedirectFromPark&format=text&channel=" + redirectdestination + "&call_server_ip=" + redirectdestserverip + "&queryCID=" + queryCID + "&exten=" + dest_dialstring + "&ext_context=" + ext_context + "&ext_priority=1"; + xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=RedirectFromPark&format=text&channel=" + redirectdestination + "&call_server_ip=" + redirectdestserverip + "&queryCID=" + queryCID + "&exten=" + dest_dialstring + "&ext_context=" + ext_context + "&ext_priority=1" + "&session_id=" + session_id; document.getElementById("ParkControl").innerHTML ="\"Park"; customerparked=0; @@ -2744,11 +2744,55 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} } delete xmlhttp; } + + // used to send second Redirect for manual dial calls + if (auto_dial_level == 0) + { + RedirecTxFEr = 1; + 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) + { + xmlhttp.open('POST', 'manager_send.php'); + xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8'); + xmlhttp.send(xferredirect_query + "&stage=2NDXfeR"); + xmlhttp.onreadystatechange = function() + { + if (xmlhttp.readyState == 4 && xmlhttp.status == 200) + { + Nactiveext = null; + Nactiveext = xmlhttp.responseText; + // alert(RedirecTxFEr + "|" + xmlhttp.responseText); + } + } + delete xmlhttp; + } + } + if ( (taskvar == 'XfeRLOCAL') || (taskvar == 'XfeRBLIND') || (taskvar == 'XfeRVMAIL') ) { + if (auto_dial_level == 0) {RedirecTxFEr = 1;} document.vicidial_form.callchannel.value = ''; document.vicidial_form.callserverip.value = ''; if( document.images ) { document.images['livecall'].src = image_livecall_OFF.src;} + // alert(RedirecTxFEr + "|" + auto_dial_level); dialedcall_send_hangup(); } @@ -2859,6 +2903,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} } delete xmlhttp; } + RedirecTxFEr=0; } @@ -4267,7 +4312,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} AgainCalLSecondS = VD_live_call_secondS; AgaiNCalLCID = CalLCID; var process_post_hangup=0; - if (MD_channel_look==1) + if ( (RedirecTxFEr < 1) && ( (MD_channel_look==1) || (auto_dial_level == 0) ) ) { MD_channel_look=0; DialTimeHangup(); @@ -4552,6 +4597,9 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} // Send Hangup command for any Local call that is not in the quiet(7) entry - used to stop manual dials even if no connect function DialTimeHangup() { + if (RedirecTxFEr < 1) + { + // alert("RedirecTxFEr|" + RedirecTxFEr); MD_channel_look=0; var xmlhttp=false; /*@cc_on @*/ @@ -4590,6 +4638,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} } delete xmlhttp; } + } } @@ -5238,7 +5287,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 + "&agent_log_id=" + agent_log_id + "&no_delete_sessions=" + no_delete_sessions + "&phone_ip=" + phone_ip + "&enable_sipsak_messages=" + enable_sipsak_messages; + 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 + "&LogouTKicKAlL=" + LogouTKicKAlL + "&ext_context=" + ext_context; xmlhttp.open('POST', 'vdc_db_query.php'); xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8'); xmlhttp.send(VDlogout_query); @@ -5246,7 +5295,8 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} { if (xmlhttp.readyState == 4 && xmlhttp.status == 200) { - // alert(xmlhttp.responseText); + // alert(VDlogout_query); + // alert(xmlhttp.responseText); } } delete xmlhttp; @@ -5388,10 +5438,14 @@ else var encoded = encodedvar; decoded = ''; var i = 0; - var RGnl = new RegExp("\n","g"); + var RGnl = new RegExp("[\r]\n","g"); var RGplus = new RegExp(" ","g"); var RGiframe = new RegExp("iframe","gi"); +var xtest; +xtest=unescape(encoded); +encoded=utf8_decode(xtest); + if (scriptformat == 'YES') { var SCvendor_lead_code = document.vicidial_form.vendor_lead_code.value; @@ -5563,30 +5617,64 @@ else encoded = encoded.replace(RGSIPexten, SCSIPexten); encoded = encoded.replace(RGsession_id, SCsession_id); } - while (i < encoded.length) { - var ch = encoded.charAt(i); - if (ch == "%") { - if (i < (encoded.length-2) - && HEXCHAR.indexOf(encoded.charAt(i+1)) != -1 - && HEXCHAR.indexOf(encoded.charAt(i+2)) != -1 ) { - decoded += unescape( encoded.substr(i,3) ); - i += 3; - } else { - alert( 'Bad escape combo near ...' + encoded.substr(i) ); - decoded += "%[ERR]"; - i++; - } - } else { - decoded += ch; - i++; - } - } // while - decoded = decoded.replace(RGnl, "
"); - +decoded=encoded; // simple no ? +decoded = decoded.replace(RGnl, "
"); +// while (i < encoded.length) { +// var ch = encoded.charAt(i); +// if (ch == "%") { +// if (i < (encoded.length-2) +// && HEXCHAR.indexOf(encoded.charAt(i+1)) != -1 +// && HEXCHAR.indexOf(encoded.charAt(i+2)) != -1 ) { +// decoded += unescape( encoded.substr(i,3) ); +// i += 3; +// } else { +// alert( 'Bad escape combo near ...' + encoded.substr(i) ); +// decoded += "%[ERR]"; +// i++; +// } +// } else { +// decoded += ch; +// i++; +// } +// } // while +// decoded = decoded.replace(RGnl, "
"); +// return false; }; +// ################################################################################ +// Taken form php.net Angelos +function utf8_decode(utftext) { + var string = ""; + var i = 0; + var c = c1 = c2 = 0; + + while ( i < utftext.length ) { + + c = utftext.charCodeAt(i); + + if (c < 128) { + string += String.fromCharCode(c); + i++; + } + else if((c > 191) && (c < 224)) { + c2 = utftext.charCodeAt(i+1); + string += String.fromCharCode(((c & 31) << 6) | (c2 & 63)); + i += 2; + } + else { + c2 = utftext.charCodeAt(i+1); + c3 = utftext.charCodeAt(i+2); + string += String.fromCharCode(((c & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63)); + i += 3; + } + + } + + return string; + }; + // ################################################################################ // Move the Dispo frame out of the way and change the link to maximize @@ -6304,14 +6392,15 @@ else .body_small {font-size: 11px; font-family: sans-serif;} .body_tiny {font-size: 10px; font-family: sans-serif;} .log_text {font-size: 11px; font-family: monospace;} + .log_text_red {font-size: 11px; font-family: monospace; font-weight: bold; background: #FF3333} .log_title {font-size: 12px; font-family: monospace; font-weight: bold;} .sd_text {font-size: 16px; font-family: sans-serif; font-weight: bold;} .sh_text {font-size: 14px; font-family: sans-serif; font-weight: bold;} .sb_text {font-size: 12px; font-family: sans-serif;} .sk_text {font-size: 11px; font-family: sans-serif;} .skb_text {font-size: 13px; font-family: sans-serif; font-weight: bold;} - .ON_conf {font-size: 11px; font-family: monospace; color: black ; background: #FFFF99} - .OFF_conf {font-size: 11px; font-family: monospace; color: black ; background: #FFCC77} + .ON_conf {font-size: 11px; font-family: monospace; color: black; background: #FFFF99} + .OFF_conf {font-size: 11px; font-family: monospace; color: black; background: #FFCC77} .cust_form {font-family: sans-serif; font-size: 10px; overflow: auto} --> @@ -6604,7 +6693,17 @@ Your Status:
Calls Dialing: + + + + + + + + + +     First:   MI:   Last: +  First:   MI:   Last: Address1: diff --git a/agc_2-X/branches/agc_2.0.4/LANG_www/agc_br/astguiclient.php b/agc_2-X/branches/agc_2.0.4/LANG_www/agc_br/astguiclient.php index 1fe0f403..6d1ace39 100644 --- a/agc_2-X/branches/agc_2.0.4/LANG_www/agc_br/astguiclient.php +++ b/agc_2-X/branches/agc_2.0.4/LANG_www/agc_br/astguiclient.php @@ -2837,7 +2837,7 @@ echo "\n"; "; + 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; @@ -2558,6 +2557,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} // Covers the following types: XFER, VMAIL, ENTRY, CONF, ESPERA, FROMESPERA, XfeRLOCAL, XfeRINTERNAL, XfeRBLIND, VfeRVMAIL function mainxfer_send_redirect(taskvar,taskxferconf,taskserverip,taskdebugnote) { + if (auto_dial_level == 0) {RedirecTxFEr = 1;} var xmlhttp=false; /*@cc_on @*/ /*@if (@_jscript_version >= 5) @@ -2630,7 +2630,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} } else { - xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=RedirectVD&format=text&channel=" + redirectvalue + "&call_server_ip=" + redirectserverip + "&queryCID=" + queryCID + "&exten=" + blindxferdialstring + "&ext_context=" + ext_context + "&ext_priority=1&auto_dial_level=" + auto_dial_level + "&campaign=" + campaign + "&uniqueid=" + document.vicidial_form.uniqueid.value + "&lead_id=" + document.vicidial_form.lead_id.value + "&secondS=" + VD_live_call_secondS; + xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=RedirectVD&format=text&channel=" + redirectvalue + "&call_server_ip=" + redirectserverip + "&queryCID=" + queryCID + "&exten=" + blindxferdialstring + "&ext_context=" + ext_context + "&ext_priority=1&auto_dial_level=" + auto_dial_level + "&campaign=" + campaign + "&uniqueid=" + document.vicidial_form.uniqueid.value + "&lead_id=" + document.vicidial_form.lead_id.value + "&secondS=" + VD_live_call_secondS + "&session_id=" + session_id; } } if (taskvar == 'XfeRINTERNAL') @@ -2649,25 +2649,25 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} // "90009*$group**$lead_id**$phone_number*$user*"; var redirectdestination = closerxferinternal + '90009*' + XfeRSelecT.value + '**' + document.vicidial_form.lead_id.value + '**' + document.vicidial_form.phone_number.value + '*' + user + '*'; - xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=RedirectVD&format=text&channel=" + redirectvalue + "&call_server_ip=" + redirectserverip + "&queryCID=" + queryCID + "&exten=" + redirectdestination + "&ext_context=" + ext_context + "&ext_priority=1&auto_dial_level=" + auto_dial_level + "&campaign=" + campaign + "&uniqueid=" + document.vicidial_form.uniqueid.value + "&lead_id=" + document.vicidial_form.lead_id.value + "&secondS=" + VD_live_call_secondS; + xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=RedirectVD&format=text&channel=" + redirectvalue + "&call_server_ip=" + redirectserverip + "&queryCID=" + queryCID + "&exten=" + redirectdestination + "&ext_context=" + ext_context + "&ext_priority=1&auto_dial_level=" + auto_dial_level + "&campaign=" + campaign + "&uniqueid=" + document.vicidial_form.uniqueid.value + "&lead_id=" + document.vicidial_form.lead_id.value + "&secondS=" + VD_live_call_secondS + "&session_id=" + session_id; } if (taskvar == 'XfeR') { var queryCID = "LRvdcW" + epoch_sec + user_abb; var redirectdestination = document.vicidial_form.extension_xfer.value; - xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=RedirectName&format=text&channel=" + redirectvalue + "&call_server_ip=" + redirectserverip + "&queryCID=" + queryCID + "&extenName=" + redirectdestination + "&ext_context=" + ext_context + "&ext_priority=1"; + xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=RedirectName&format=text&channel=" + redirectvalue + "&call_server_ip=" + redirectserverip + "&queryCID=" + queryCID + "&extenName=" + redirectdestination + "&ext_context=" + ext_context + "&ext_priority=1" + "&session_id=" + session_id; } if (taskvar == 'VMAIL') { var queryCID = "LVvdcW" + epoch_sec + user_abb; var redirectdestination = document.vicidial_form.extension_xfer.value; - xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=RedirectNameVmail&format=text&channel=" + redirectvalue + "&call_server_ip=" + redirectserverip + "&queryCID=" + queryCID + "&exten=" + voicemail_dump_exten + "&extenName=" + redirectdestination + "&ext_context=" + ext_context + "&ext_priority=1"; + xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=RedirectNameVmail&format=text&channel=" + redirectvalue + "&call_server_ip=" + redirectserverip + "&queryCID=" + queryCID + "&exten=" + voicemail_dump_exten + "&extenName=" + redirectdestination + "&ext_context=" + ext_context + "&ext_priority=1" + "&session_id=" + session_id; } if (taskvar == 'ENTRY') { var queryCID = "LEvdcW" + epoch_sec + user_abb; var redirectdestination = document.vicidial_form.extension_xfer_entry.value; - xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=Redirect&format=text&channel=" + redirectvalue + "&call_server_ip=" + redirectserverip + "&queryCID=" + queryCID + "&exten=" + redirectdestination + "&ext_context=" + ext_context + "&ext_priority=1"; + xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=Redirect&format=text&channel=" + redirectvalue + "&call_server_ip=" + redirectserverip + "&queryCID=" + queryCID + "&exten=" + redirectdestination + "&ext_context=" + ext_context + "&ext_priority=1" + "&session_id=" + session_id; } if (taskvar == '3WAY') { @@ -2689,7 +2689,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} DispO3wayCalLxfernumber = document.vicidial_form.xfernumber.value; DispO3wayCalLcamptail = ''; - 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=" + XfeRSelecT.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=" + XfeRSelecT.value + "&session_id=" + session_id; if (taskdebugnote == 'FIRST') { @@ -2702,7 +2702,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} var redirectdestination = taskxferconf; var redirectdestserverip = taskserverip; var parkedby = protocol + "/" + extension; - xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=RedirectToPark&format=text&channel=" + redirectdestination + "&call_server_ip=" + redirectdestserverip + "&queryCID=" + queryCID + "&exten=" + park_on_extension + "&ext_context=" + ext_context + "&ext_priority=1&extenName=park&parkedby=" + parkedby; + xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=RedirectToPark&format=text&channel=" + redirectdestination + "&call_server_ip=" + redirectdestserverip + "&queryCID=" + queryCID + "&exten=" + park_on_extension + "&ext_context=" + ext_context + "&ext_priority=1&extenName=park&parkedby=" + parkedby + "&session_id=" + session_id; document.getElementById("ParkControl").innerHTML ="\"Pegar"; customerparked=1; @@ -2723,7 +2723,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} {var dest_dialstring = session_id;} } - xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=RedirectFromPark&format=text&channel=" + redirectdestination + "&call_server_ip=" + redirectdestserverip + "&queryCID=" + queryCID + "&exten=" + dest_dialstring + "&ext_context=" + ext_context + "&ext_priority=1"; + xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=RedirectFromPark&format=text&channel=" + redirectdestination + "&call_server_ip=" + redirectdestserverip + "&queryCID=" + queryCID + "&exten=" + dest_dialstring + "&ext_context=" + ext_context + "&ext_priority=1" + "&session_id=" + session_id; document.getElementById("ParkControl").innerHTML ="\"Colocar"; customerparked=0; @@ -2744,11 +2744,55 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} } delete xmlhttp; } + + // used to send second Redirect for manual dial calls + if (auto_dial_level == 0) + { + RedirecTxFEr = 1; + 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) + { + xmlhttp.open('POST', 'manager_send.php'); + xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8'); + xmlhttp.send(xferredirect_query + "&stage=2NDXfeR"); + xmlhttp.onreadystatechange = function() + { + if (xmlhttp.readyState == 4 && xmlhttp.status == 200) + { + Nactiveext = null; + Nactiveext = xmlhttp.responseText; + // alert(RedirecTxFEr + "|" + xmlhttp.responseText); + } + } + delete xmlhttp; + } + } + if ( (taskvar == 'XfeRLOCAL') || (taskvar == 'XfeRBLIND') || (taskvar == 'XfeRVMAIL') ) { + if (auto_dial_level == 0) {RedirecTxFEr = 1;} document.vicidial_form.callchannel.value = ''; document.vicidial_form.callserverip.value = ''; if( document.images ) { document.images['livecall'].src = image_livecall_OFF.src;} + // alert(RedirecTxFEr + "|" + auto_dial_level); dialedcall_send_hangup(); } @@ -2859,6 +2903,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} } delete xmlhttp; } + RedirecTxFEr=0; } @@ -4267,7 +4312,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} AgainCalLSecondS = VD_live_call_secondS; AgaiNCalLCID = CalLCID; var process_post_hangup=0; - if (MD_channel_look==1) + if ( (RedirecTxFEr < 1) && ( (MD_channel_look==1) || (auto_dial_level == 0) ) ) { MD_channel_look=0; DialTimeHangup(); @@ -4552,6 +4597,9 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} // Send Hangup command for any Local call that is not in the quiet(7) entry - used to stop manual dials even if no connect function DialTimeHangup() { + if (RedirecTxFEr < 1) + { + // alert("RedirecTxFEr|" + RedirecTxFEr); MD_channel_look=0; var xmlhttp=false; /*@cc_on @*/ @@ -4590,6 +4638,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} } delete xmlhttp; } + } } @@ -4708,7 +4757,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} PausaCode_HTML = ''; document.vicidial_form.PausaCodeSelection.value = ''; var VD_pause_codes_ct_half = parseInt(VD_pause_codes_ct / 2); - PausaCode_HTML = "
-PAUSAR | INICIAR     Atualizar a taxa: 1000 ms Mais rápido | Mais devagar

+PAUSE | INICIAR     Atualizar a taxa: 1000 ms Mais rápido | Mais devagar

Inicializando..
Extensões Ativas
diff --git a/agc_2-X/branches/agc_2.0.4/LANG_www/agc_br/conf_exten_check.php b/agc_2-X/branches/agc_2.0.4/LANG_www/agc_br/conf_exten_check.php index eee0f698..4a7cef73 100644 --- a/agc_2-X/branches/agc_2.0.4/LANG_www/agc_br/conf_exten_check.php +++ b/agc_2-X/branches/agc_2.0.4/LANG_www/agc_br/conf_exten_check.php @@ -1,7 +1,7 @@ LICENSE: GPLv2 +# Copyright (C) 2008 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 @@ -35,6 +35,7 @@ # 61128-2255 - Added update for manual dial vicidial_live_agents # 70319-1542 - Added agent disabled display function # 71122-0205 - Added vicidial_live_agent status output +# 80424-0442 - Added non_latin lookup from system_settings # require("dbconnect.php"); @@ -63,8 +64,28 @@ if (isset($_GET["auto_dial_level"])) {$auto_dial_level=$_GET["auto_dial_level" if (isset($_GET["campagentstdisp"])) {$campagentstdisp=$_GET["campagentstdisp"];} elseif (isset($_POST["campagentstdisp"])) {$campagentstdisp=$_POST["campagentstdisp"];} + +############################################# +##### START SYSTEM_SETTINGS LOOKUP ##### +$stmt = "SELECT use_non_latin FROM system_settings;"; +$rslt=mysql_query($stmt, $link); +if ($DB) {echo "$stmt\n";} +$qm_conf_ct = mysql_num_rows($rslt); +$i=0; +while ($i < $qm_conf_ct) + { + $row=mysql_fetch_row($rslt); + $non_latin = $row[0]; + $i++; + } +##### END SETTINGS LOOKUP ##### +########################################### + +if ($non_latin < 1) +{ $user=ereg_replace("[^0-9a-zA-Z]","",$user); $pass=ereg_replace("[^0-9a-zA-Z]","",$pass); +} # default optional vars if not set if (!isset($format)) {$format="text";} @@ -81,11 +102,12 @@ if (!isset($query_date)) {$query_date = $NOW_DATE;} $random = (rand(1000000, 9999999) + 10000000); - $stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; +$stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$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]; if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) { diff --git a/agc_2-X/branches/agc_2.0.4/LANG_www/agc_br/manager_send.php b/agc_2-X/branches/agc_2.0.4/LANG_www/agc_br/manager_send.php index de1bac2b..06b04925 100644 --- a/agc_2-X/branches/agc_2.0.4/LANG_www/agc_br/manager_send.php +++ b/agc_2-X/branches/agc_2.0.4/LANG_www/agc_br/manager_send.php @@ -1,7 +1,7 @@ LICENSE: GPLv2 +# Copyright (C) 2008 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 @@ -32,8 +32,8 @@ # - $agent_log_id - ('123456',...) # - $call_server_ip - ('10.10.10.15',...) # - $CalLCID - ('VD01234567890123456',...) -# - $stage - ('UP','DOWN') -# +# - $stage - ('UP','DOWN','2NDXfeR') +# - $session_id - ('8600051') # CHANGELOG: # 50401-1002 - First build of script, Hangup function only @@ -68,8 +68,14 @@ # 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 +# 80331-1433 - Added second transfer try for VICIDIAL transfers on manual dial calls +# 80402-0121 - Fixes for manual dial transfers on some systems +# 80424-0442 - Added non_latin lookup from system_settings # +$version = '2.0.4-31'; +$build = '80424-0442'; + require("dbconnect.php"); ### These are variable assignments for PHP globals off @@ -137,28 +143,48 @@ if (isset($_GET["enable_sipsak_messages"])) {$enable_sipsak_messages=$_GET["e 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["session_id"])) {$session_id=$_GET["session_id"];} + elseif (isset($_POST["session_id"])) {$session_id=$_POST["session_id"];} +############################################# +##### START SYSTEM_SETTINGS LOOKUP ##### +$stmt = "SELECT use_non_latin FROM system_settings;"; +$rslt=mysql_query($stmt, $link); +if ($DB) {echo "$stmt\n";} +$qm_conf_ct = mysql_num_rows($rslt); +$i=0; +while ($i < $qm_conf_ct) + { + $row=mysql_fetch_row($rslt); + $non_latin = $row[0]; + $i++; + } +##### END SETTINGS LOOKUP ##### +########################################### + +if ($non_latin < 1) +{ $user=ereg_replace("[^0-9a-zA-Z]","",$user); $pass=ereg_replace("[^0-9a-zA-Z]","",$pass); $secondS = ereg_replace("[^0-9]","",$secondS); +} # default optional vars if not set if (!isset($ACTION)) {$ACTION="Originate";} if (!isset($format)) {$format="alert";} if (!isset($ext_priority)) {$ext_priority="1";} -$version = '2.0.29'; -$build = '70320-1502'; $StarTtime = date("U"); $NOW_DATE = date("Y-m-d"); $NOW_TIME = date("Y-m-d H:i:s"); if (!isset($query_date)) {$query_date = $NOW_DATE;} - $stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; +$stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$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]; if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) { @@ -878,6 +904,29 @@ if ($ACTION=="RedirectXtra") if ($ACTION=="Redirect") { + ### for manual dial VICIDISCAR calls send the second attempt to transfer the call + if ($stage=="2NDXfeR") + { + $local_DEF = 'Local/'; + $local_AMP = '@'; + $hangup_channel_prefix = "$local_DEF$session_id$local_AMP$ext_context"; + + $stmt="SELECT count(*) FROM live_sip_channels where server_ip = '$server_ip' and channel LIKE \"$hangup_channel_prefix%\";"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + if ($row > 0) + { + $stmt="SELECT channel FROM live_sip_channels where server_ip = '$server_ip' and channel LIKE \"$hangup_channel_prefix%\";"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + $rowx=mysql_fetch_row($rslt); + $channel=$rowx[0]; + $channel = eregi_replace("1$","2",$channel); + $queryCID = eregi_replace("^.","Q",$queryCID); + } + } + $row=''; $rowx=''; $channel_live=1; if ( (strlen($channel)<3) or (strlen($queryCID)<15) or (strlen($exten)<1) or (strlen($ext_context)<1) or (strlen($ext_priority)<1) ) diff --git a/agc_2-X/branches/agc_2.0.4/LANG_www/agc_br/vdc_db_query.php b/agc_2-X/branches/agc_2.0.4/LANG_www/agc_br/vdc_db_query.php index bea93986..528bf209 100644 --- a/agc_2-X/branches/agc_2.0.4/LANG_www/agc_br/vdc_db_query.php +++ b/agc_2-X/branches/agc_2.0.4/LANG_www/agc_br/vdc_db_query.php @@ -1,7 +1,7 @@ LICENSE: GPLv2 +# Copyright (C) 2008 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 @@ -69,6 +69,7 @@ # - $use_internal_dnc - ('Y','N') # - $omit_phone_code - ('Y','N') # - $no_delete_sessions - ('0','1') +# - $LogouTKicKAlL - ('0','1'); # CHANGELOG: # 50629-1044 - First build of script @@ -138,10 +139,14 @@ # 71120-1520 - added LogiNCamPaigns to show only allowed campaigns for agents upon login # 71125-1751 - Added inbound-group default inbound group sending to vicidial.php # 71129-2025 - restricted callbacks count and list to campaign only +# 71226-1117 - added option to kick all calls from conference upon logout +# 80128-1159 - fixed vicidial_log bugs +# 80402-0121 - Fixes for manual dial transfers on some systems, removed /n persist flag +# 80424-0442 - Added non_latin lookup from system_settings # -$version = '2.0.4-65'; -$build = '71129-2025'; +$version = '2.0.4-69'; +$build = '80424-0442'; require("dbconnect.php"); @@ -274,14 +279,38 @@ if (isset($_GET["enable_sipsak_messages"])) {$enable_sipsak_messages=$_GET["e elseif (isset($_POST["enable_sipsak_messages"])) {$enable_sipsak_messages=$_POST["enable_sipsak_messages"];} if (isset($_GET["status"])) {$status=$_GET["status"];} elseif (isset($_POST["status"])) {$status=$_POST["status"];} +if (isset($_GET["LogouTKicKAlL"])) {$LogouTKicKAlL=$_GET["LogouTKicKAlL"];} + elseif (isset($_POST["LogouTKicKAlL"])) {$LogouTKicKAlL=$_POST["LogouTKicKAlL"];} +header ("Content-type: text/html; charset=utf-8"); +header ("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1 +header ("Pragma: no-cache"); // HTTP/1.0 + +############################################# +##### START SYSTEM_SETTINGS LOOKUP ##### +$stmt = "SELECT use_non_latin FROM system_settings;"; +$rslt=mysql_query($stmt, $link); +if ($DB) {echo "$stmt\n";} +$qm_conf_ct = mysql_num_rows($rslt); +$i=0; +while ($i < $qm_conf_ct) + { + $row=mysql_fetch_row($rslt); + $non_latin = $row[0]; + $i++; + } +##### END SETTINGS LOOKUP ##### +########################################### + +if ($non_latin < 1) +{ $user=ereg_replace("[^0-9a-zA-Z]","",$user); $pass=ereg_replace("[^0-9a-zA-Z]","",$pass); $length_in_sec = ereg_replace("[^0-9]","",$length_in_sec); $phone_code = ereg_replace("[^0-9]","",$phone_code); $phone_number = ereg_replace("[^0-9]","",$phone_number); - +} # default optional vars if not set if (!isset($format)) {$format="text";} @@ -305,6 +334,7 @@ else { $stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$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]; @@ -381,7 +411,6 @@ if ($ACTION == 'LogiNCamPaigns') $LOGallowed_campaignsSQL=''; $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); if ( (!eregi("ALL-CAMPAIGNS",$row[0])) ) @@ -392,7 +421,6 @@ if ($ACTION == 'LogiNCamPaigns') } $stmt="SELECT campaign_id,campaign_name from vicidial_campaigns where active='Y' $LOGallowed_campaignsSQL order by campaign_id"; - if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); $camps_to_print = mysql_num_rows($rslt); @@ -713,7 +741,8 @@ if ($ACTION == 'manDiaLnextCaLL') $local_AMP = '@'; $Local_out_prefix = '9'; $Local_dial_timeout = '60'; - $Local_persist = '/n'; + # $Local_persist = '/n'; + $Local_persist = ''; if ($dial_timeout > 4) {$Local_dial_timeout = $dial_timeout;} $Local_dial_timeout = ($Local_dial_timeout * 1000); if (strlen($dial_prefix) > 0) {$Local_out_prefix = "$dial_prefix";} @@ -1049,7 +1078,8 @@ if ($stage == "end") if ($format=='debug') {echo "\n";} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); - if ($row[0] > 0) + $check_inbound = $row[0]; + if ($check_inbound > 0) { ##### look for the start epoch in the vicidial_closer_log table $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;"; @@ -1072,11 +1102,8 @@ if ($stage == "end") { $length_in_sec = 0; } - $stmt = "select count(*) from vicidial_campaigns where campaign_id='$campaign' and campaign_allow_inbound='Y';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ( ($length_in_sec < 1) and ($row[0] > 0) ) + + if ( ($length_in_sec < 1) and ($check_inbound > 0) ) { ##### start epoch in the vicidial_log table, couldn't find one in vicidial_closer_log $stmt="SELECT start_epoch FROM vicidial_log where uniqueid='$uniqueid' and lead_id='$lead_id';"; @@ -1097,21 +1124,25 @@ if ($stage == "end") } else {$length_in_sec = ($StarTtime - $start_epoch);} - $stmt = "select count(*) from vicidial_campaigns where campaign_id='$campaign' and campaign_allow_inbound='Y';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0] > 0) + $closer_logged=0; + if ($check_inbound > 0) { - $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;"; + $four_hours_ago = date("Y-m-d H:i:s", mktime(date("H")-4,date("i"),date("s"),date("m"),date("d"),date("Y"))); + + $stmt = "UPDATE vicidial_closer_log set end_epoch='$StarTtime', length_in_sec='$length_in_sec' where lead_id='$lead_id' and call_date > \"$four_hours_ago\" order by start_epoch desc limit 1;"; if ($DB) {echo "$stmt\n";} $rslt=mysql_query($stmt, $link); + $affected_rows = mysql_affected_rows($link); + if ($affected_rows > 0) + { + $closer_logged=1; + echo "$uniqueid\n$channel\n"; + } } ############################################# ##### 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); @@ -1247,7 +1278,6 @@ if ($stage == "end") { $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); } @@ -1272,9 +1302,8 @@ if ($stage == "end") $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';"; + $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); @@ -1314,7 +1343,6 @@ if ($stage == "end") $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); @@ -1336,9 +1364,8 @@ if ($stage == "end") $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';"; + $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); @@ -1347,19 +1374,22 @@ if ($stage == "end") } } - ##### look for the channel in the UPDATED vicidial_manager record of the call initiation - $stmt="UPDATE vicidial_log set end_epoch='$StarTtime', length_in_sec='$length_in_sec' where uniqueid='$uniqueid' and lead_id='$lead_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); + if ($closer_logged < 1) + { + ##### update the duration and end time in the vicidial_log table + $stmt="UPDATE vicidial_log set end_epoch='$StarTtime', length_in_sec='$length_in_sec' where uniqueid='$uniqueid' and lead_id='$lead_id';"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + $affected_rows = mysql_affected_rows($link); - if ($affected_rows > 0) - { - echo "$uniqueid\n$channel\n"; - } - else - { - echo "REGISTRO NÃO DEFINIDO\n\n"; + if ($affected_rows > 0) + { + echo "$uniqueid\n$channel\n"; + } + else + { + echo "REGISTRO NÃO DEFINIDO\n\n"; + } } } @@ -1642,41 +1672,69 @@ if ($ACTION == 'VDADcheckINCOMING') $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';"; + + + $stmt = "select campaign_id,phone_number,alt_dial,call_type from vicidial_auto_calls where callerid = '$callerid' order by call_time desc limit 1;"; if ($DB) {echo "$stmt\n";} $rslt=mysql_query($stmt, $link); - - $stmt = "select count(*) from vicidial_campaigns where campaign_id='$campaign' and campaign_allow_inbound='Y';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0] > 0) + $VDAC_cid_ct = mysql_num_rows($rslt); + if ($VDAC_cid_ct > 0) { - ### update the vicidial_closer_log user to INCALL - $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;"; + $row=mysql_fetch_row($rslt); + $VDADchannel_group =$row[0]; + $dialed_number =$row[1]; + $dialed_label =$row[2]; + $call_type =$row[3]; + } + else + { + if ($WeBRooTWritablE > 0) + { + $fp = fopen ("./vicidial_debug.txt", "a"); + fwrite ($fp, "$NOW_TIME|INBND|$callerid|$user|$user_group|$list_id|$lead_id|$phone_number|$uniqueid|\n"); + fclose($fp); + } + } + + if ( ($call_type=='OUT') or ($call_type=='OUTBALANCE') ) + { + $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); - $stmt = "select campaign_id,phone_number,alt_dial from vicidial_auto_calls where callerid = '$callerid' order by call_time desc limit 1;"; + $stmt = "select campaign_script,get_call_launch,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number from vicidial_campaigns where campaign_id='$campaign';"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + $VDIG_cid_ct = mysql_num_rows($rslt); + if ($VDIG_cid_ct > 0) + { + $row=mysql_fetch_row($rslt); + $VDCL_campaign_script = $row[0]; + $VDCL_get_call_launch = $row[1]; + $VDCL_xferconf_a_dtmf = $row[2]; + $VDCL_xferconf_a_number = $row[3]; + $VDCL_xferconf_b_dtmf = $row[4]; + $VDCL_xferconf_b_number = $row[5]; + } + echo "|||||$VDCL_campaign_script|$VDCL_get_call_launch|$VDCL_xferconf_a_dtmf|$VDCL_xferconf_a_number|$VDCL_xferconf_b_dtmf|$VDCL_xferconf_b_number|\n|\n"; + + $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); - $VDADchannel_group =$row[0]; - $dialed_number =$row[1]; - $dialed_label =$row[2]; - } - else - { - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./vicidial_debug.txt", "a"); - fwrite ($fp, "$NOW_TIME|INBND|$callerid|$user|$user_group|$list_id|$lead_id|$phone_number|$uniqueid|\n"); - fclose($fp); - } + $dialed_number =$row[0]; + $dialed_label =$row[1]; } + } + else + { + ### update the vicidial_closer_log user to INCALL + $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 count(*) from vicidial_log where lead_id='$lead_id' and uniqueid='$uniqueid';"; if ($DB) {echo "$stmt\n";} @@ -1748,35 +1806,6 @@ if ($ACTION == 'VDADcheckINCOMING') } else {echo '|' . $tsr . "\n";} } - else - { - $stmt = "select campaign_script,get_call_launch,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number from vicidial_campaigns where campaign_id='$campaign';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDIG_cid_ct = mysql_num_rows($rslt); - if ($VDIG_cid_ct > 0) - { - $row=mysql_fetch_row($rslt); - $VDCL_campaign_script = $row[0]; - $VDCL_get_call_launch = $row[1]; - $VDCL_xferconf_a_dtmf = $row[2]; - $VDCL_xferconf_a_number = $row[3]; - $VDCL_xferconf_b_dtmf = $row[4]; - $VDCL_xferconf_b_number = $row[5]; - } - echo "|||||$VDCL_campaign_script|$VDCL_get_call_launch|$VDCL_xferconf_a_dtmf|$VDCL_xferconf_a_number|$VDCL_xferconf_b_dtmf|$VDCL_xferconf_b_number|\n|\n"; - - $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); $comments = eregi_replace("\n",'!N',$comments); @@ -1948,6 +1977,18 @@ else $rslt=mysql_query($stmt, $link); } + if ($LogouTKicKAlL > 0) + { + $local_DEF = 'Local/5555'; + $local_AMP = '@'; + $kick_local_channel = "$local_DEF$conf_exten$local_AMP$ext_context"; + $queryCID = "ULGH3458$StarTtime"; + + $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$queryCID','Channel: $kick_local_channel','Context: $ext_context','Exten: 8300','Priority: 1','Callerid: $queryCID','','','','$channel','$exten');"; + 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";} @@ -1968,7 +2009,6 @@ else ############################################# ##### 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); @@ -1998,14 +2038,13 @@ else $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';"; + # $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"; @@ -2023,7 +2062,6 @@ else $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); @@ -2101,6 +2139,7 @@ if ($ACTION == 'updateDISPO') $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) { @@ -2150,7 +2189,6 @@ if ($ACTION == 'updateDISPO') ############################################# ##### 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); @@ -2175,7 +2213,6 @@ if ($ACTION == 'updateDISPO') $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); @@ -2204,7 +2241,6 @@ if ($ACTION == 'updateLEAD') { $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); @@ -2220,7 +2256,6 @@ if ($ACTION == 'updateLEAD') $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); @@ -2290,7 +2325,6 @@ if ( ($ACTION == 'VDADpause') || ($ACTION == 'VDADready') ) ############################################# ##### 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); @@ -2311,13 +2345,12 @@ if ( ($ACTION == 'VDADpause') || ($ACTION == 'VDADready') ) if ($enable_queuemetrics_logging > 0) { if (ereg('READY',$stage)) {$QMstatus='UNPAUSEALL';} - if (ereg('PAUSAR',$stage)) {$QMstatus='PAUSARALL';} + 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); @@ -2424,7 +2457,6 @@ if ($ACTION == 'PausaCodeSubmit') ############################################# ##### 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); @@ -2453,9 +2485,8 @@ if ($ACTION == 'PausaCodeSubmit') $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';"; + $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); diff --git a/agc_2-X/branches/agc_2.0.4/LANG_www/agc_br/vicidial.php b/agc_2-X/branches/agc_2.0.4/LANG_www/agc_br/vicidial.php index 20997130..666e214f 100644 --- a/agc_2-X/branches/agc_2.0.4/LANG_www/agc_br/vicidial.php +++ b/agc_2-X/branches/agc_2.0.4/LANG_www/agc_br/vicidial.php @@ -1,7 +1,7 @@ LICENSE: GPLv2 +# Copyright (C) 2008 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 @@ -171,10 +171,13 @@ # 71125-1751 - Changed Transfer section to allow for selection of in-groups to send calls to # 71127-0408 - Added height and width settings for easier modification of screen size # 71129-2025 - restricted callbacks count and list to campaign only +# 71226-1117 - added option to kick all calls from conference upon logout +# 80330-0823 - Added new AST_blind monitoring ability and minor cleanup for release +# 80402-0121 - Fixes for Manual Dial hangups and transfers # -$version = '2.0.4-142'; -$build = '71129-2025'; +$version = '2.0.4-145'; +$build = '80402-0121'; require("dbconnect.php"); @@ -207,6 +210,11 @@ if (isset($_GET["relogin"])) {$relogin=$_GET["relogin"];} $VD_campaign = strtoupper($VD_campaign); $VD_campaign = eregi_replace(" ",'',$VD_campaign); } + if (!isset($flag_channels)) + { + $flag_channels=0; + $flag_string=''; + } ### security strip all non-alphanumeric characters out of the variables ### $DB=ereg_replace("[^0-9a-z]","",$DB); @@ -237,6 +245,22 @@ $CIDdate = date("ymdHis"); $random = (rand(1000000, 9999999) + 10000000); +############################################# +##### START SYSTEM_SETTINGS LOOKUP ##### +$stmt = "SELECT use_non_latin FROM system_settings;"; +$rslt=mysql_query($stmt, $link); +if ($DB) {echo "$stmt\n";} +$qm_conf_ct = mysql_num_rows($rslt); +$i=0; +while ($i < $qm_conf_ct) + { + $row=mysql_fetch_row($rslt); + $non_latin = $row[0]; + $i++; + } +##### END SETTINGS LOOKUP ##### +########################################### + $conf_silent_prefix = '7'; # vicidial_conferences prefix to enter silently $HKuser_level = '5'; # minimum vicidial user_level for HotKeys $campaign_login_list = '1'; # show drop-down list of campaigns at login @@ -256,6 +280,7 @@ $volumecontrol_active = '1'; # set to 1 to allow agents to alter volume of chann $PreseT_DiaL_LinKs = '1'; # set to 1 to show a DISCAR link for Dial Presets $LogiNAJAX = '1'; # set to 1 to do lookups $HidEMonitoRSessionS = '1'; # set to 1 to hide remote monitoring channels from "session calls" +$LogouTKicKAlL = '1'; # set to 1 to hangup all calls in session upon agent logout $TEST_all_statuses = '0'; # TEST variable allows all statuses in dispo screen @@ -328,13 +353,12 @@ $LOGallowed_campaignsSQL=''; if ($relogin == 'YES') { $stmt="SELECT user_group from vicidial_users where user='$VD_login' and pass='$VD_pass'"; - if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $VU_user_group=$row[0]; $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); if ( (!eregi("ALL-CAMPAIGNS",$row[0])) ) @@ -509,7 +533,6 @@ echo "
0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $phone_login=$row[0]; @@ -593,7 +616,6 @@ $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]; @@ -604,7 +626,6 @@ $VDloginDISPLAY=0; $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,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]; @@ -630,7 +651,6 @@ $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]; @@ -662,7 +682,6 @@ echo " 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $CAMPactive=$row[0]; @@ -674,7 +693,6 @@ 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); @@ -691,7 +709,6 @@ 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); @@ -712,7 +729,6 @@ 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); @@ -743,7 +759,6 @@ echo " 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $row=mysql_fetch_row($rslt); @@ -802,7 +817,6 @@ 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); @@ -828,7 +842,6 @@ echo " 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $closer_ct = mysql_num_rows($rslt); @@ -852,7 +865,6 @@ echo " 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $xfer_ct = mysql_num_rows($rslt); @@ -871,7 +883,6 @@ echo " 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $row=mysql_fetch_row($rslt); @@ -933,7 +944,6 @@ echo " 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $authphone=$row[0]; @@ -972,7 +982,6 @@ 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]; @@ -1050,7 +1059,6 @@ 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]; @@ -1104,12 +1112,10 @@ 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 ( ($campaign_allow_inbound == 'Y') || ($campaign_leads_to_call > 0) || (ereg('Y',$no_hopper_leads_logins)) ) @@ -1117,12 +1123,10 @@ else ### insert an entry into the user log for the login event $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); @@ -1139,7 +1143,6 @@ 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); @@ -1151,7 +1154,6 @@ 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"; @@ -1159,28 +1161,24 @@ 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"; $stmt="DELETE from vicidial_live_inbound_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"; @@ -1194,7 +1192,6 @@ else ############################################# ##### 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); @@ -1226,7 +1223,6 @@ else ### 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"; @@ -1237,7 +1233,6 @@ else ##### grab the campaign_weight and number of calls todayligadothat campaign for the agent $stmt="SELECT campaign_weight,calls_today FROM vicidial_campaign_agents where user='$VD_login' and campaign_id = '$VD_campaign';"; - if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $vca_ct = mysql_num_rows($rslt); @@ -1254,7 +1249,6 @@ else $calls_today = '0'; $stmt="INSERT INTO vicidial_campaign_agents (user,campaign_id,campaign_rank,campaign_weight,calls_today) values('$VD_login','$VD_campaign','0','0','$calls_today');"; 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"; @@ -1262,7 +1256,6 @@ 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,campaign_weight,calls_today) values('$VD_login','$server_ip','$session_id','$SIP_user','PAUSED','','$VD_campaign','','','','$random','$NOW_TIME','$tsNOW_TIME','$NOW_TIME','$closer_chooser_string','$user_level','$campaign_weight','$calls_today');"; 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"; @@ -1274,17 +1267,15 @@ else $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';"; + $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"; + print "\n"; mysql_close($linkB); mysql_select_db("$VARDB_database", $link); @@ -1302,7 +1293,6 @@ 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"; @@ -1314,17 +1304,15 @@ else $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';"; + $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"; + print "\n"; mysql_close($linkB); mysql_select_db("$VARDB_database", $link); @@ -1394,7 +1382,6 @@ 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($link); @@ -1414,7 +1401,6 @@ echo " 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $MM_scripts = mysql_num_rows($rslt); @@ -1423,8 +1409,8 @@ echo "\"Início\""; var DiaLControl_auto_HTML_ready = "\"Pausa\"\"Início\""; var DiaLControl_auto_HTML_OFF = "\"Pausa\"\"Início\""; @@ -2342,7 +2332,16 @@ 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]; - if ( (HidEMonitoRSessionS==1) && (channelfieldA.match(/68600/)) ) + var regXFcred = new RegExp(flag_string,"g"); + if ( (channelfieldA.match(regXFcred)) && (flag_channels>0) ) + { + var chan_name_color = 'log_text_red'; + } + else + { + var chan_name_color = 'log_text'; + } + if ( (HidEMonitoRSessionS==1) && (channelfieldA.match(/ASTblind/)) ) { var hide_channel=1; } @@ -2350,11 +2349,11 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} { if (volumecontrol_active!=1) { - live_conf_HTML = live_conf_HTML + "
" + loop_ct + "" + channelfieldA + "DESLIGAR
" + loop_ct + "" + channelfieldA + "DESLIGAR
" + loop_ct + "" + channelfieldA + "DESLIGAR          
" + loop_ct + "" + channelfieldA + "DESLIGAR          
PAUSAR CODE
"; + PausaCode_HTML = " - + diff --git a/agc_2-X/branches/agc_2.0.4/LANG_www/agc_de/conf_exten_check.php b/agc_2-X/branches/agc_2.0.4/LANG_www/agc_de/conf_exten_check.php index f6d2cb2b..0ce96242 100644 --- a/agc_2-X/branches/agc_2.0.4/LANG_www/agc_de/conf_exten_check.php +++ b/agc_2-X/branches/agc_2.0.4/LANG_www/agc_de/conf_exten_check.php @@ -1,7 +1,7 @@ LICENSE: GPLv2 +# Copyright (C) 2008 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 @@ -35,6 +35,7 @@ # 61128-2255 - Added update for manual dial vicidial_live_agents # 70319-1542 - Added agent disabled display function # 71122-0205 - Added vicidial_live_agent status output +# 80424-0442 - Added non_latin lookup from system_settings # require("dbconnect.php"); @@ -63,8 +64,28 @@ if (isset($_GET["auto_dial_level"])) {$auto_dial_level=$_GET["auto_dial_level" if (isset($_GET["campagentstdisp"])) {$campagentstdisp=$_GET["campagentstdisp"];} elseif (isset($_POST["campagentstdisp"])) {$campagentstdisp=$_POST["campagentstdisp"];} + +############################################# +##### START SYSTEM_SETTINGS LOOKUP ##### +$stmt = "SELECT use_non_latin FROM system_settings;"; +$rslt=mysql_query($stmt, $link); +if ($DB) {echo "$stmt\n";} +$qm_conf_ct = mysql_num_rows($rslt); +$i=0; +while ($i < $qm_conf_ct) + { + $row=mysql_fetch_row($rslt); + $non_latin = $row[0]; + $i++; + } +##### END SETTINGS LOOKUP ##### +########################################### + +if ($non_latin < 1) +{ $user=ereg_replace("[^0-9a-zA-Z]","",$user); $pass=ereg_replace("[^0-9a-zA-Z]","",$pass); +} # default optional vars if not set if (!isset($format)) {$format="text";} @@ -81,11 +102,12 @@ if (!isset($query_date)) {$query_date = $NOW_DATE;} $random = (rand(1000000, 9999999) + 10000000); - $stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; +$stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$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]; if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) { diff --git a/agc_2-X/branches/agc_2.0.4/LANG_www/agc_de/manager_send.php b/agc_2-X/branches/agc_2.0.4/LANG_www/agc_de/manager_send.php index fcb79355..4291cb62 100644 --- a/agc_2-X/branches/agc_2.0.4/LANG_www/agc_de/manager_send.php +++ b/agc_2-X/branches/agc_2.0.4/LANG_www/agc_de/manager_send.php @@ -1,7 +1,7 @@ LICENSE: GPLv2 +# Copyright (C) 2008 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 @@ -32,8 +32,8 @@ # - $agent_log_id - ('123456',...) # - $call_server_ip - ('10.10.10.15',...) # - $CalLCID - ('VD01234567890123456',...) -# - $stage - ('UP','DOWN') -# +# - $stage - ('UP','DOWN','2NDXfeR') +# - $session_id - ('8600051') # CHANGELOG: # 50401-1002 - First build of script, Hangup function only @@ -68,8 +68,14 @@ # 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 +# 80331-1433 - Added second transfer try for VICIDIAL transfers on manual dial calls +# 80402-0121 - Fixes for manual dial transfers on some systems +# 80424-0442 - Added non_latin lookup from system_settings # +$version = '2.0.4-31'; +$build = '80424-0442'; + require("dbconnect.php"); ### These are variable assignments for PHP globals off @@ -137,28 +143,48 @@ if (isset($_GET["enable_sipsak_messages"])) {$enable_sipsak_messages=$_GET["e 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["session_id"])) {$session_id=$_GET["session_id"];} + elseif (isset($_POST["session_id"])) {$session_id=$_POST["session_id"];} +############################################# +##### START SYSTEM_SETTINGS LOOKUP ##### +$stmt = "SELECT use_non_latin FROM system_settings;"; +$rslt=mysql_query($stmt, $link); +if ($DB) {echo "$stmt\n";} +$qm_conf_ct = mysql_num_rows($rslt); +$i=0; +while ($i < $qm_conf_ct) + { + $row=mysql_fetch_row($rslt); + $non_latin = $row[0]; + $i++; + } +##### END SETTINGS LOOKUP ##### +########################################### + +if ($non_latin < 1) +{ $user=ereg_replace("[^0-9a-zA-Z]","",$user); $pass=ereg_replace("[^0-9a-zA-Z]","",$pass); $secondS = ereg_replace("[^0-9]","",$secondS); +} # default optional vars if not set if (!isset($ACTION)) {$ACTION="Originate";} if (!isset($format)) {$format="alert";} if (!isset($ext_priority)) {$ext_priority="1";} -$version = '2.0.29'; -$build = '70320-1502'; $StarTtime = date("U"); $NOW_DATE = date("Y-m-d"); $NOW_TIME = date("Y-m-d H:i:s"); if (!isset($query_date)) {$query_date = $NOW_DATE;} - $stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; +$stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$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]; if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) { @@ -878,6 +904,29 @@ if ($ACTION=="RedirectXtra") if ($ACTION=="Redirect") { + ### for manual dial VICIWÄHLEN calls send the second attempt to transfer the call + if ($stage=="2NDXfeR") + { + $local_DEF = 'Local/'; + $local_AMP = '@'; + $hangup_channel_prefix = "$local_DEF$session_id$local_AMP$ext_context"; + + $stmt="SELECT count(*) FROM live_sip_channels where server_ip = '$server_ip' and channel LIKE \"$hangup_channel_prefix%\";"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + if ($row > 0) + { + $stmt="SELECT channel FROM live_sip_channels where server_ip = '$server_ip' and channel LIKE \"$hangup_channel_prefix%\";"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + $rowx=mysql_fetch_row($rslt); + $channel=$rowx[0]; + $channel = eregi_replace("1$","2",$channel); + $queryCID = eregi_replace("^.","Q",$queryCID); + } + } + $row=''; $rowx=''; $channel_live=1; if ( (strlen($channel)<3) or (strlen($queryCID)<15) or (strlen($exten)<1) or (strlen($ext_context)<1) or (strlen($ext_priority)<1) ) diff --git a/agc_2-X/branches/agc_2.0.4/LANG_www/agc_de/vdc_db_query.php b/agc_2-X/branches/agc_2.0.4/LANG_www/agc_de/vdc_db_query.php index f40fd378..a0e46884 100644 --- a/agc_2-X/branches/agc_2.0.4/LANG_www/agc_de/vdc_db_query.php +++ b/agc_2-X/branches/agc_2.0.4/LANG_www/agc_de/vdc_db_query.php @@ -1,7 +1,7 @@ LICENSE: GPLv2 +# Copyright (C) 2008 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 @@ -69,6 +69,7 @@ # - $use_internal_dnc - ('Y','N') # - $omit_phone_code - ('Y','N') # - $no_delete_sessions - ('0','1') +# - $LogouTKicKAlL - ('0','1'); # CHANGELOG: # 50629-1044 - First build of script @@ -138,10 +139,14 @@ # 71120-1520 - added LogiNCamPaigns to show only allowed campaigns for agents upon login # 71125-1751 - Added inbound-group default inbound group sending to vicidial.php # 71129-2025 - restricted callbacks count and list to campaign only +# 71226-1117 - added option to kick all calls from conference upon logout +# 80128-1159 - fixed vicidial_log bugs +# 80402-0121 - Fixes for manual dial transfers on some systems, removed /n persist flag +# 80424-0442 - Added non_latin lookup from system_settings # -$version = '2.0.4-65'; -$build = '71129-2025'; +$version = '2.0.4-69'; +$build = '80424-0442'; require("dbconnect.php"); @@ -274,14 +279,38 @@ if (isset($_GET["enable_sipsak_messages"])) {$enable_sipsak_messages=$_GET["e elseif (isset($_POST["enable_sipsak_messages"])) {$enable_sipsak_messages=$_POST["enable_sipsak_messages"];} if (isset($_GET["status"])) {$status=$_GET["status"];} elseif (isset($_POST["status"])) {$status=$_POST["status"];} +if (isset($_GET["LogouTKicKAlL"])) {$LogouTKicKAlL=$_GET["LogouTKicKAlL"];} + elseif (isset($_POST["LogouTKicKAlL"])) {$LogouTKicKAlL=$_POST["LogouTKicKAlL"];} +header ("Content-type: text/html; charset=utf-8"); +header ("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1 +header ("Pragma: no-cache"); // HTTP/1.0 + +############################################# +##### START SYSTEM_SETTINGS LOOKUP ##### +$stmt = "SELECT use_non_latin FROM system_settings;"; +$rslt=mysql_query($stmt, $link); +if ($DB) {echo "$stmt\n";} +$qm_conf_ct = mysql_num_rows($rslt); +$i=0; +while ($i < $qm_conf_ct) + { + $row=mysql_fetch_row($rslt); + $non_latin = $row[0]; + $i++; + } +##### END SETTINGS LOOKUP ##### +########################################### + +if ($non_latin < 1) +{ $user=ereg_replace("[^0-9a-zA-Z]","",$user); $pass=ereg_replace("[^0-9a-zA-Z]","",$pass); $length_in_sec = ereg_replace("[^0-9]","",$length_in_sec); $phone_code = ereg_replace("[^0-9]","",$phone_code); $phone_number = ereg_replace("[^0-9]","",$phone_number); - +} # default optional vars if not set if (!isset($format)) {$format="text";} @@ -305,6 +334,7 @@ else { $stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$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]; @@ -381,7 +411,6 @@ if ($ACTION == 'LogiNCamPaigns') $LOGallowed_campaignsSQL=''; $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); if ( (!eregi("ALL-CAMPAIGNS",$row[0])) ) @@ -392,7 +421,6 @@ if ($ACTION == 'LogiNCamPaigns') } $stmt="SELECT campaign_id,campaign_name from vicidial_campaigns where active='Y' $LOGallowed_campaignsSQL order by campaign_id"; - if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); $camps_to_print = mysql_num_rows($rslt); @@ -713,7 +741,8 @@ if ($ACTION == 'manDiaLnextCaLL') $local_AMP = '@'; $Local_out_prefix = '9'; $Local_dial_timeout = '60'; - $Local_persist = '/n'; + # $Local_persist = '/n'; + $Local_persist = ''; if ($dial_timeout > 4) {$Local_dial_timeout = $dial_timeout;} $Local_dial_timeout = ($Local_dial_timeout * 1000); if (strlen($dial_prefix) > 0) {$Local_out_prefix = "$dial_prefix";} @@ -1049,7 +1078,8 @@ if ($stage == "end") if ($format=='debug') {echo "\n";} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); - if ($row[0] > 0) + $check_inbound = $row[0]; + if ($check_inbound > 0) { ##### look for the start epoch in the vicidial_closer_log table $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;"; @@ -1072,11 +1102,8 @@ if ($stage == "end") { $length_in_sec = 0; } - $stmt = "select count(*) from vicidial_campaigns where campaign_id='$campaign' and campaign_allow_inbound='Y';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ( ($length_in_sec < 1) and ($row[0] > 0) ) + + if ( ($length_in_sec < 1) and ($check_inbound > 0) ) { ##### start epoch in the vicidial_log table, couldn't find one in vicidial_closer_log $stmt="SELECT start_epoch FROM vicidial_log where uniqueid='$uniqueid' and lead_id='$lead_id';"; @@ -1097,21 +1124,25 @@ if ($stage == "end") } else {$length_in_sec = ($StarTtime - $start_epoch);} - $stmt = "select count(*) from vicidial_campaigns where campaign_id='$campaign' and campaign_allow_inbound='Y';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0] > 0) + $closer_logged=0; + if ($check_inbound > 0) { - $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;"; + $four_hours_ago = date("Y-m-d H:i:s", mktime(date("H")-4,date("i"),date("s"),date("m"),date("d"),date("Y"))); + + $stmt = "UPDATE vicidial_closer_log set end_epoch='$StarTtime', length_in_sec='$length_in_sec' where lead_id='$lead_id' and call_date > \"$four_hours_ago\" order by start_epoch desc limit 1;"; if ($DB) {echo "$stmt\n";} $rslt=mysql_query($stmt, $link); + $affected_rows = mysql_affected_rows($link); + if ($affected_rows > 0) + { + $closer_logged=1; + echo "$uniqueid\n$channel\n"; + } } ############################################# ##### 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); @@ -1247,7 +1278,6 @@ if ($stage == "end") { $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); } @@ -1274,7 +1304,6 @@ if ($stage == "end") $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); @@ -1314,7 +1343,6 @@ if ($stage == "end") $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); @@ -1338,7 +1366,6 @@ if ($stage == "end") $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); @@ -1347,19 +1374,22 @@ if ($stage == "end") } } - ##### look for the channel in the UPDATED vicidial_manager record of the call initiation - $stmt="UPDATE vicidial_log set end_epoch='$StarTtime', length_in_sec='$length_in_sec' where uniqueid='$uniqueid' and lead_id='$lead_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); + if ($closer_logged < 1) + { + ##### update the duration and end time in the vicidial_log table + $stmt="UPDATE vicidial_log set end_epoch='$StarTtime', length_in_sec='$length_in_sec' where uniqueid='$uniqueid' and lead_id='$lead_id';"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + $affected_rows = mysql_affected_rows($link); - if ($affected_rows > 0) - { - echo "$uniqueid\n$channel\n"; - } - else - { - echo "LOG NICHT EINGEGEBEN\n\n"; + if ($affected_rows > 0) + { + echo "$uniqueid\n$channel\n"; + } + else + { + echo "LOG NICHT EINGEGEBEN\n\n"; + } } } @@ -1642,41 +1672,69 @@ if ($ACTION == 'VDADcheckINCOMING') $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';"; + + + $stmt = "select campaign_id,phone_number,alt_dial,call_type from vicidial_auto_calls where callerid = '$callerid' order by call_time desc limit 1;"; if ($DB) {echo "$stmt\n";} $rslt=mysql_query($stmt, $link); - - $stmt = "select count(*) from vicidial_campaigns where campaign_id='$campaign' and campaign_allow_inbound='Y';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0] > 0) + $VDAC_cid_ct = mysql_num_rows($rslt); + if ($VDAC_cid_ct > 0) { - ### update the vicidial_closer_log user to INCALL - $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;"; + $row=mysql_fetch_row($rslt); + $VDADchannel_group =$row[0]; + $dialed_number =$row[1]; + $dialed_label =$row[2]; + $call_type =$row[3]; + } + else + { + if ($WeBRooTWritablE > 0) + { + $fp = fopen ("./vicidial_debug.txt", "a"); + fwrite ($fp, "$NOW_TIME|INBND|$callerid|$user|$user_group|$list_id|$lead_id|$phone_number|$uniqueid|\n"); + fclose($fp); + } + } + + if ( ($call_type=='OUT') or ($call_type=='OUTBALANCE') ) + { + $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); - $stmt = "select campaign_id,phone_number,alt_dial from vicidial_auto_calls where callerid = '$callerid' order by call_time desc limit 1;"; + $stmt = "select campaign_script,get_call_launch,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number from vicidial_campaigns where campaign_id='$campaign';"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + $VDIG_cid_ct = mysql_num_rows($rslt); + if ($VDIG_cid_ct > 0) + { + $row=mysql_fetch_row($rslt); + $VDCL_campaign_script = $row[0]; + $VDCL_get_call_launch = $row[1]; + $VDCL_xferconf_a_dtmf = $row[2]; + $VDCL_xferconf_a_number = $row[3]; + $VDCL_xferconf_b_dtmf = $row[4]; + $VDCL_xferconf_b_number = $row[5]; + } + echo "|||||$VDCL_campaign_script|$VDCL_get_call_launch|$VDCL_xferconf_a_dtmf|$VDCL_xferconf_a_number|$VDCL_xferconf_b_dtmf|$VDCL_xferconf_b_number|\n|\n"; + + $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); - $VDADchannel_group =$row[0]; - $dialed_number =$row[1]; - $dialed_label =$row[2]; - } - else - { - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./vicidial_debug.txt", "a"); - fwrite ($fp, "$NOW_TIME|INBND|$callerid|$user|$user_group|$list_id|$lead_id|$phone_number|$uniqueid|\n"); - fclose($fp); - } + $dialed_number =$row[0]; + $dialed_label =$row[1]; } + } + else + { + ### update the vicidial_closer_log user to INCALL + $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 count(*) from vicidial_log where lead_id='$lead_id' and uniqueid='$uniqueid';"; if ($DB) {echo "$stmt\n";} @@ -1748,35 +1806,6 @@ if ($ACTION == 'VDADcheckINCOMING') } else {echo '|' . $tsr . "\n";} } - else - { - $stmt = "select campaign_script,get_call_launch,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number from vicidial_campaigns where campaign_id='$campaign';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDIG_cid_ct = mysql_num_rows($rslt); - if ($VDIG_cid_ct > 0) - { - $row=mysql_fetch_row($rslt); - $VDCL_campaign_script = $row[0]; - $VDCL_get_call_launch = $row[1]; - $VDCL_xferconf_a_dtmf = $row[2]; - $VDCL_xferconf_a_number = $row[3]; - $VDCL_xferconf_b_dtmf = $row[4]; - $VDCL_xferconf_b_number = $row[5]; - } - echo "|||||$VDCL_campaign_script|$VDCL_get_call_launch|$VDCL_xferconf_a_dtmf|$VDCL_xferconf_a_number|$VDCL_xferconf_b_dtmf|$VDCL_xferconf_b_number|\n|\n"; - - $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); $comments = eregi_replace("\n",'!N',$comments); @@ -1948,6 +1977,18 @@ else $rslt=mysql_query($stmt, $link); } + if ($LogouTKicKAlL > 0) + { + $local_DEF = 'Local/5555'; + $local_AMP = '@'; + $kick_local_channel = "$local_DEF$conf_exten$local_AMP$ext_context"; + $queryCID = "ULGH3458$StarTtime"; + + $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$queryCID','Channel: $kick_local_channel','Context: $ext_context','Exten: 8300','Priority: 1','Callerid: $queryCID','','','','$channel','$exten');"; + 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";} @@ -1968,7 +2009,6 @@ else ############################################# ##### 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); @@ -2000,12 +2040,11 @@ else # $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"; @@ -2023,7 +2062,6 @@ else $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); @@ -2101,6 +2139,7 @@ if ($ACTION == 'updateDISPO') $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) { @@ -2150,7 +2189,6 @@ if ($ACTION == 'updateDISPO') ############################################# ##### 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); @@ -2175,7 +2213,6 @@ if ($ACTION == 'updateDISPO') $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); @@ -2204,7 +2241,6 @@ if ($ACTION == 'updateLEAD') { $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); @@ -2220,7 +2256,6 @@ if ($ACTION == 'updateLEAD') $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); @@ -2290,7 +2325,6 @@ if ( ($ACTION == 'VDADpause') || ($ACTION == 'VDADready') ) ############################################# ##### 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); @@ -2317,7 +2351,6 @@ if ( ($ACTION == 'VDADpause') || ($ACTION == 'VDADready') ) $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); @@ -2424,7 +2457,6 @@ if ($ACTION == 'PauseCodeSubmit') ############################################# ##### 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); @@ -2455,7 +2487,6 @@ if ($ACTION == 'PauseCodeSubmit') $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); diff --git a/agc_2-X/branches/agc_2.0.4/LANG_www/agc_de/vicidial.php b/agc_2-X/branches/agc_2.0.4/LANG_www/agc_de/vicidial.php index b72ec677..e0f6d472 100644 --- a/agc_2-X/branches/agc_2.0.4/LANG_www/agc_de/vicidial.php +++ b/agc_2-X/branches/agc_2.0.4/LANG_www/agc_de/vicidial.php @@ -1,7 +1,7 @@ LICENSE: GPLv2 +# Copyright (C) 2008 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 @@ -171,10 +171,13 @@ # 71125-1751 - Changed Transfer section to allow for selection of in-groups to send calls to # 71127-0408 - Added height and width settings for easier modification of screen size # 71129-2025 - restricted callbacks count and list to campaign only +# 71226-1117 - added option to kick all calls from conference upon logout +# 80330-0823 - Added new AST_blind monitoring ability and minor cleanup for release +# 80402-0121 - Fixes for Manual Dial hangups and transfers # -$version = '2.0.4-142'; -$build = '71129-2025'; +$version = '2.0.4-145'; +$build = '80402-0121'; require("dbconnect.php"); @@ -207,6 +210,11 @@ if (isset($_GET["relogin"])) {$relogin=$_GET["relogin"];} $VD_campaign = strtoupper($VD_campaign); $VD_campaign = eregi_replace(" ",'',$VD_campaign); } + if (!isset($flag_channels)) + { + $flag_channels=0; + $flag_string=''; + } ### security strip all non-alphanumeric characters out of the variables ### $DB=ereg_replace("[^0-9a-z]","",$DB); @@ -237,6 +245,22 @@ $CIDdate = date("ymdHis"); $random = (rand(1000000, 9999999) + 10000000); +############################################# +##### START SYSTEM_SETTINGS LOOKUP ##### +$stmt = "SELECT use_non_latin FROM system_settings;"; +$rslt=mysql_query($stmt, $link); +if ($DB) {echo "$stmt\n";} +$qm_conf_ct = mysql_num_rows($rslt); +$i=0; +while ($i < $qm_conf_ct) + { + $row=mysql_fetch_row($rslt); + $non_latin = $row[0]; + $i++; + } +##### END SETTINGS LOOKUP ##### +########################################### + $conf_silent_prefix = '7'; # vicidial_conferences prefix to enter silently $HKuser_level = '5'; # minimum vicidial user_level for HotKeys $campaign_login_list = '1'; # show drop-down list of campaigns at login @@ -256,6 +280,7 @@ $volumecontrol_active = '1'; # set to 1 to allow agents to alter volume of chann $PreseT_DiaL_LinKs = '1'; # set to 1 to show a WÄHLEN link for Dial Presets $LogiNAJAX = '1'; # set to 1 to do lookups $HidEMonitoRSessionS = '1'; # set to 1 to hide remote monitoring channels from "session calls" +$LogouTKicKAlL = '1'; # set to 1 to hangup all calls in session upon agent logout $TEST_all_statuses = '0'; # TEST variable allows all statuses in dispo screen @@ -328,13 +353,12 @@ $LOGallowed_campaignsSQL=''; if ($relogin == 'YES') { $stmt="SELECT user_group from vicidial_users where user='$VD_login' and pass='$VD_pass'"; - if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $VU_user_group=$row[0]; $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); if ( (!eregi("ALL-CAMPAIGNS",$row[0])) ) @@ -509,7 +533,6 @@ echo ""; + 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; @@ -2558,6 +2557,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} // Covers the following types: XFER, VMAIL, ENTRY, CONF, PARK, FROMPARK, XfeRLOCAL, XfeRINTERNAL, XfeRBLIND, VfeRVMAIL function mainxfer_send_redirect(taskvar,taskxferconf,taskserverip,taskdebugnote) { + if (auto_dial_level == 0) {RedirecTxFEr = 1;} var xmlhttp=false; /*@cc_on @*/ /*@if (@_jscript_version >= 5) @@ -2630,7 +2630,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} } else { - xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=RedirectVD&format=text&channel=" + redirectvalue + "&call_server_ip=" + redirectserverip + "&queryCID=" + queryCID + "&exten=" + blindxferdialstring + "&ext_context=" + ext_context + "&ext_priority=1&auto_dial_level=" + auto_dial_level + "&campaign=" + campaign + "&uniqueid=" + document.vicidial_form.uniqueid.value + "&lead_id=" + document.vicidial_form.lead_id.value + "&secondS=" + VD_live_call_secondS; + xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=RedirectVD&format=text&channel=" + redirectvalue + "&call_server_ip=" + redirectserverip + "&queryCID=" + queryCID + "&exten=" + blindxferdialstring + "&ext_context=" + ext_context + "&ext_priority=1&auto_dial_level=" + auto_dial_level + "&campaign=" + campaign + "&uniqueid=" + document.vicidial_form.uniqueid.value + "&lead_id=" + document.vicidial_form.lead_id.value + "&secondS=" + VD_live_call_secondS + "&session_id=" + session_id; } } if (taskvar == 'XfeRINTERNAL') @@ -2649,25 +2649,25 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} // "90009*$group**$lead_id**$phone_number*$user*"; var redirectdestination = closerxferinternal + '90009*' + XfeRSelecT.value + '**' + document.vicidial_form.lead_id.value + '**' + document.vicidial_form.phone_number.value + '*' + user + '*'; - xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=RedirectVD&format=text&channel=" + redirectvalue + "&call_server_ip=" + redirectserverip + "&queryCID=" + queryCID + "&exten=" + redirectdestination + "&ext_context=" + ext_context + "&ext_priority=1&auto_dial_level=" + auto_dial_level + "&campaign=" + campaign + "&uniqueid=" + document.vicidial_form.uniqueid.value + "&lead_id=" + document.vicidial_form.lead_id.value + "&secondS=" + VD_live_call_secondS; + xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=RedirectVD&format=text&channel=" + redirectvalue + "&call_server_ip=" + redirectserverip + "&queryCID=" + queryCID + "&exten=" + redirectdestination + "&ext_context=" + ext_context + "&ext_priority=1&auto_dial_level=" + auto_dial_level + "&campaign=" + campaign + "&uniqueid=" + document.vicidial_form.uniqueid.value + "&lead_id=" + document.vicidial_form.lead_id.value + "&secondS=" + VD_live_call_secondS + "&session_id=" + session_id; } if (taskvar == 'XfeR') { var queryCID = "LRvdcW" + epoch_sec + user_abb; var redirectdestination = document.vicidial_form.extension_xfer.value; - xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=RedirectName&format=text&channel=" + redirectvalue + "&call_server_ip=" + redirectserverip + "&queryCID=" + queryCID + "&extenName=" + redirectdestination + "&ext_context=" + ext_context + "&ext_priority=1"; + xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=RedirectName&format=text&channel=" + redirectvalue + "&call_server_ip=" + redirectserverip + "&queryCID=" + queryCID + "&extenName=" + redirectdestination + "&ext_context=" + ext_context + "&ext_priority=1" + "&session_id=" + session_id; } if (taskvar == 'VMAIL') { var queryCID = "LVvdcW" + epoch_sec + user_abb; var redirectdestination = document.vicidial_form.extension_xfer.value; - xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=RedirectNameVmail&format=text&channel=" + redirectvalue + "&call_server_ip=" + redirectserverip + "&queryCID=" + queryCID + "&exten=" + voicemail_dump_exten + "&extenName=" + redirectdestination + "&ext_context=" + ext_context + "&ext_priority=1"; + xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=RedirectNameVmail&format=text&channel=" + redirectvalue + "&call_server_ip=" + redirectserverip + "&queryCID=" + queryCID + "&exten=" + voicemail_dump_exten + "&extenName=" + redirectdestination + "&ext_context=" + ext_context + "&ext_priority=1" + "&session_id=" + session_id; } if (taskvar == 'ENTRY') { var queryCID = "LEvdcW" + epoch_sec + user_abb; var redirectdestination = document.vicidial_form.extension_xfer_entry.value; - xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=Redirect&format=text&channel=" + redirectvalue + "&call_server_ip=" + redirectserverip + "&queryCID=" + queryCID + "&exten=" + redirectdestination + "&ext_context=" + ext_context + "&ext_priority=1"; + xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=Redirect&format=text&channel=" + redirectvalue + "&call_server_ip=" + redirectserverip + "&queryCID=" + queryCID + "&exten=" + redirectdestination + "&ext_context=" + ext_context + "&ext_priority=1" + "&session_id=" + session_id; } if (taskvar == '3WAY') { @@ -2689,7 +2689,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} DispO3wayCalLxfernumber = document.vicidial_form.xfernumber.value; DispO3wayCalLcamptail = ''; - 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=" + XfeRSelecT.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=" + XfeRSelecT.value + "&session_id=" + session_id; if (taskdebugnote == 'FIRST') { @@ -2702,7 +2702,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} var redirectdestination = taskxferconf; var redirectdestserverip = taskserverip; var parkedby = protocol + "/" + extension; - xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=RedirectToPark&format=text&channel=" + redirectdestination + "&call_server_ip=" + redirectdestserverip + "&queryCID=" + queryCID + "&exten=" + park_on_extension + "&ext_context=" + ext_context + "&ext_priority=1&extenName=park&parkedby=" + parkedby; + xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=RedirectToPark&format=text&channel=" + redirectdestination + "&call_server_ip=" + redirectdestserverip + "&queryCID=" + queryCID + "&exten=" + park_on_extension + "&ext_context=" + ext_context + "&ext_priority=1&extenName=park&parkedby=" + parkedby + "&session_id=" + session_id; document.getElementById("ParkControl").innerHTML ="\"Geparkten"; customerparked=1; @@ -2723,7 +2723,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} {var dest_dialstring = session_id;} } - xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=RedirectFromPark&format=text&channel=" + redirectdestination + "&call_server_ip=" + redirectdestserverip + "&queryCID=" + queryCID + "&exten=" + dest_dialstring + "&ext_context=" + ext_context + "&ext_priority=1"; + xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=RedirectFromPark&format=text&channel=" + redirectdestination + "&call_server_ip=" + redirectdestserverip + "&queryCID=" + queryCID + "&exten=" + dest_dialstring + "&ext_context=" + ext_context + "&ext_priority=1" + "&session_id=" + session_id; document.getElementById("ParkControl").innerHTML ="\"Parke"; customerparked=0; @@ -2744,11 +2744,55 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} } delete xmlhttp; } + + // used to send second Redirect for manual dial calls + if (auto_dial_level == 0) + { + RedirecTxFEr = 1; + 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) + { + xmlhttp.open('POST', 'manager_send.php'); + xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8'); + xmlhttp.send(xferredirect_query + "&stage=2NDXfeR"); + xmlhttp.onreadystatechange = function() + { + if (xmlhttp.readyState == 4 && xmlhttp.status == 200) + { + Nactiveext = null; + Nactiveext = xmlhttp.responseText; + // alert(RedirecTxFEr + "|" + xmlhttp.responseText); + } + } + delete xmlhttp; + } + } + if ( (taskvar == 'XfeRLOCAL') || (taskvar == 'XfeRBLIND') || (taskvar == 'XfeRVMAIL') ) { + if (auto_dial_level == 0) {RedirecTxFEr = 1;} document.vicidial_form.callchannel.value = ''; document.vicidial_form.callserverip.value = ''; if( document.images ) { document.images['livecall'].src = image_livecall_OFF.src;} + // alert(RedirecTxFEr + "|" + auto_dial_level); dialedcall_send_hangup(); } @@ -2859,6 +2903,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} } delete xmlhttp; } + RedirecTxFEr=0; } @@ -4267,7 +4312,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} AgainCalLSecondS = VD_live_call_secondS; AgaiNCalLCID = CalLCID; var process_post_hangup=0; - if (MD_channel_look==1) + if ( (RedirecTxFEr < 1) && ( (MD_channel_look==1) || (auto_dial_level == 0) ) ) { MD_channel_look=0; DialTimeHangup(); @@ -4552,6 +4597,9 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} // Send Hangup command for any Local call that is not in the quiet(7) entry - used to stop manual dials even if no connect function DialTimeHangup() { + if (RedirecTxFEr < 1) + { + // alert("RedirecTxFEr|" + RedirecTxFEr); MD_channel_look=0; var xmlhttp=false; /*@cc_on @*/ @@ -4590,6 +4638,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} } delete xmlhttp; } + } } @@ -5238,7 +5287,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 + "&agent_log_id=" + agent_log_id + "&no_delete_sessions=" + no_delete_sessions + "&phone_ip=" + phone_ip + "&enable_sipsak_messages=" + enable_sipsak_messages; + 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 + "&LogouTKicKAlL=" + LogouTKicKAlL + "&ext_context=" + ext_context; xmlhttp.open('POST', 'vdc_db_query.php'); xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8'); xmlhttp.send(VDlogout_query); @@ -5246,7 +5295,8 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} { if (xmlhttp.readyState == 4 && xmlhttp.status == 200) { - // alert(xmlhttp.responseText); + // alert(VDlogout_query); + // alert(xmlhttp.responseText); } } delete xmlhttp; @@ -5388,10 +5438,14 @@ else var encoded = encodedvar; decoded = ''; var i = 0; - var RGnl = new RegExp("\n","g"); + var RGnl = new RegExp("[\r]\n","g"); var RGplus = new RegExp(" ","g"); var RGiframe = new RegExp("iframe","gi"); +var xtest; +xtest=unescape(encoded); +encoded=utf8_decode(xtest); + if (scriptformat == 'YES') { var SCvendor_lead_code = document.vicidial_form.vendor_lead_code.value; @@ -5563,30 +5617,64 @@ else encoded = encoded.replace(RGSIPexten, SCSIPexten); encoded = encoded.replace(RGsession_id, SCsession_id); } - while (i < encoded.length) { - var ch = encoded.charAt(i); - if (ch == "%") { - if (i < (encoded.length-2) - && HEXCHAR.indexOf(encoded.charAt(i+1)) != -1 - && HEXCHAR.indexOf(encoded.charAt(i+2)) != -1 ) { - decoded += unescape( encoded.substr(i,3) ); - i += 3; - } else { - alert( 'Bad escape combo near ...' + encoded.substr(i) ); - decoded += "%[ERR]"; - i++; - } - } else { - decoded += ch; - i++; - } - } // while - decoded = decoded.replace(RGnl, "
"); - +decoded=encoded; // simple no ? +decoded = decoded.replace(RGnl, "
"); +// while (i < encoded.length) { +// var ch = encoded.charAt(i); +// if (ch == "%") { +// if (i < (encoded.length-2) +// && HEXCHAR.indexOf(encoded.charAt(i+1)) != -1 +// && HEXCHAR.indexOf(encoded.charAt(i+2)) != -1 ) { +// decoded += unescape( encoded.substr(i,3) ); +// i += 3; +// } else { +// alert( 'Bad escape combo near ...' + encoded.substr(i) ); +// decoded += "%[ERR]"; +// i++; +// } +// } else { +// decoded += ch; +// i++; +// } +// } // while +// decoded = decoded.replace(RGnl, "
"); +// return false; }; +// ################################################################################ +// Taken form php.net Angelos +function utf8_decode(utftext) { + var string = ""; + var i = 0; + var c = c1 = c2 = 0; + + while ( i < utftext.length ) { + + c = utftext.charCodeAt(i); + + if (c < 128) { + string += String.fromCharCode(c); + i++; + } + else if((c > 191) && (c < 224)) { + c2 = utftext.charCodeAt(i+1); + string += String.fromCharCode(((c & 31) << 6) | (c2 & 63)); + i += 2; + } + else { + c2 = utftext.charCodeAt(i+1); + c3 = utftext.charCodeAt(i+2); + string += String.fromCharCode(((c & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63)); + i += 3; + } + + } + + return string; + }; + // ################################################################################ // Move the Dispo frame out of the way and change the link to maximieren @@ -6304,14 +6392,15 @@ else .body_small {font-size: 11px; font-family: sans-serif;} .body_tiny {font-size: 10px; font-family: sans-serif;} .log_text {font-size: 11px; font-family: monospace;} + .log_text_red {font-size: 11px; font-family: monospace; font-weight: bold; background: #FF3333} .log_title {font-size: 12px; font-family: monospace; font-weight: bold;} .sd_text {font-size: 16px; font-family: sans-serif; font-weight: bold;} .sh_text {font-size: 14px; font-family: sans-serif; font-weight: bold;} .sb_text {font-size: 12px; font-family: sans-serif;} .sk_text {font-size: 11px; font-family: sans-serif;} .skb_text {font-size: 13px; font-family: sans-serif; font-weight: bold;} - .ON_conf {font-size: 11px; font-family: monospace; color: black ; background: #FFFF99} - .OFF_conf {font-size: 11px; font-family: monospace; color: black ; background: #FFCC77} + .ON_conf {font-size: 11px; font-family: monospace; color: black; background: #FFFF99} + .OFF_conf {font-size: 11px; font-family: monospace; color: black; background: #FFCC77} .cust_form {font-family: sans-serif; font-size: 10px; overflow: auto} --> @@ -6604,7 +6693,17 @@ Ihr Status:
Calls Dialing: + + + + + + + + + +   - + diff --git a/agc_2-X/branches/agc_2.0.4/LANG_www/agc_el/conf_exten_check.php b/agc_2-X/branches/agc_2.0.4/LANG_www/agc_el/conf_exten_check.php index 9d5a9c1f..ab22f031 100644 --- a/agc_2-X/branches/agc_2.0.4/LANG_www/agc_el/conf_exten_check.php +++ b/agc_2-X/branches/agc_2.0.4/LANG_www/agc_el/conf_exten_check.php @@ -1,7 +1,7 @@ LICENSE: GPLv2 +# Copyright (C) 2008 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 @@ -35,6 +35,7 @@ # 61128-2255 - Added update for manual dial vicidial_live_agents # 70319-1542 - Added agent disabled display function # 71122-0205 - Added vicidial_live_agent status output +# 80424-0442 - Added non_latin lookup from system_settings # require("dbconnect.php"); @@ -63,8 +64,28 @@ if (isset($_GET["auto_dial_level"])) {$auto_dial_level=$_GET["auto_dial_level" if (isset($_GET["campagentstdisp"])) {$campagentstdisp=$_GET["campagentstdisp"];} elseif (isset($_POST["campagentstdisp"])) {$campagentstdisp=$_POST["campagentstdisp"];} + +############################################# +##### START SYSTEM_SETTINGS LOOKUP ##### +$stmt = "SELECT use_non_latin FROM system_settings;"; +$rslt=mysql_query($stmt, $link); +if ($DB) {echo "$stmt\n";} +$qm_conf_ct = mysql_num_rows($rslt); +$i=0; +while ($i < $qm_conf_ct) + { + $row=mysql_fetch_row($rslt); + $non_latin = $row[0]; + $i++; + } +##### END SETTINGS LOOKUP ##### +########################################### + +if ($non_latin < 1) +{ $user=ereg_replace("[^0-9a-zA-Z]","",$user); $pass=ereg_replace("[^0-9a-zA-Z]","",$pass); +} # default optional vars if not set if (!isset($format)) {$format="text";} @@ -81,11 +102,12 @@ if (!isset($query_date)) {$query_date = $NOW_DATE;} $random = (rand(1000000, 9999999) + 10000000); - $stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; +$stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$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]; if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) { diff --git a/agc_2-X/branches/agc_2.0.4/LANG_www/agc_el/manager_send.php b/agc_2-X/branches/agc_2.0.4/LANG_www/agc_el/manager_send.php index a66018c8..4aaf05ff 100644 --- a/agc_2-X/branches/agc_2.0.4/LANG_www/agc_el/manager_send.php +++ b/agc_2-X/branches/agc_2.0.4/LANG_www/agc_el/manager_send.php @@ -1,7 +1,7 @@ LICENSE: GPLv2 +# Copyright (C) 2008 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 @@ -32,8 +32,8 @@ # - $agent_log_id - ('123456',...) # - $call_server_ip - ('10.10.10.15',...) # - $CalLCID - ('VD01234567890123456',...) -# - $stage - ('UP','DOWN') -# +# - $stage - ('UP','DOWN','2NDXfeR') +# - $session_id - ('8600051') # CHANGELOG: # 50401-1002 - First build of script, Hangup function only @@ -68,8 +68,14 @@ # 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 +# 80331-1433 - Added second transfer try for VICIDIAL transfers on manual dial calls +# 80402-0121 - Fixes for manual dial transfers on some systems +# 80424-0442 - Added non_latin lookup from system_settings # +$version = '2.0.4-31'; +$build = '80424-0442'; + require("dbconnect.php"); ### These are variable assignments for PHP globals off @@ -137,28 +143,48 @@ if (isset($_GET["enable_sipsak_messages"])) {$enable_sipsak_messages=$_GET["e 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["session_id"])) {$session_id=$_GET["session_id"];} + elseif (isset($_POST["session_id"])) {$session_id=$_POST["session_id"];} +############################################# +##### START SYSTEM_SETTINGS LOOKUP ##### +$stmt = "SELECT use_non_latin FROM system_settings;"; +$rslt=mysql_query($stmt, $link); +if ($DB) {echo "$stmt\n";} +$qm_conf_ct = mysql_num_rows($rslt); +$i=0; +while ($i < $qm_conf_ct) + { + $row=mysql_fetch_row($rslt); + $non_latin = $row[0]; + $i++; + } +##### END SETTINGS LOOKUP ##### +########################################### + +if ($non_latin < 1) +{ $user=ereg_replace("[^0-9a-zA-Z]","",$user); $pass=ereg_replace("[^0-9a-zA-Z]","",$pass); $secondS = ereg_replace("[^0-9]","",$secondS); +} # default optional vars if not set if (!isset($ACTION)) {$ACTION="Originate";} if (!isset($format)) {$format="alert";} if (!isset($ext_priority)) {$ext_priority="1";} -$version = '2.0.29'; -$build = '70320-1502'; $StarTtime = date("U"); $NOW_DATE = date("Y-m-d"); $NOW_TIME = date("Y-m-d H:i:s"); if (!isset($query_date)) {$query_date = $NOW_DATE;} - $stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; +$stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$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]; if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) { @@ -878,6 +904,29 @@ if ($ACTION=="RedirectXtra") if ($ACTION=="Redirect") { + ### for manual dial VICIΚΛΗΣΗ calls send the second attempt to transfer the call + if ($stage=="2NDXfeR") + { + $local_DEF = 'Local/'; + $local_AMP = '@'; + $hangup_channel_prefix = "$local_DEF$session_id$local_AMP$ext_context"; + + $stmt="SELECT count(*) FROM live_sip_channels where server_ip = '$server_ip' and channel LIKE \"$hangup_channel_prefix%\";"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + if ($row > 0) + { + $stmt="SELECT channel FROM live_sip_channels where server_ip = '$server_ip' and channel LIKE \"$hangup_channel_prefix%\";"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + $rowx=mysql_fetch_row($rslt); + $channel=$rowx[0]; + $channel = eregi_replace("1$","2",$channel); + $queryCID = eregi_replace("^.","Q",$queryCID); + } + } + $row=''; $rowx=''; $channel_live=1; if ( (strlen($channel)<3) or (strlen($queryCID)<15) or (strlen($exten)<1) or (strlen($ext_context)<1) or (strlen($ext_priority)<1) ) diff --git a/agc_2-X/branches/agc_2.0.4/LANG_www/agc_el/vdc_db_query.php b/agc_2-X/branches/agc_2.0.4/LANG_www/agc_el/vdc_db_query.php index d39f9fad..aafb9b69 100644 --- a/agc_2-X/branches/agc_2.0.4/LANG_www/agc_el/vdc_db_query.php +++ b/agc_2-X/branches/agc_2.0.4/LANG_www/agc_el/vdc_db_query.php @@ -1,7 +1,7 @@ LICENSE: GPLv2 +# Copyright (C) 2008 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 @@ -69,6 +69,7 @@ # - $use_internal_dnc - ('Y','N') # - $omit_phone_code - ('Y','N') # - $no_delete_sessions - ('0','1') +# - $LogouTKicKAlL - ('0','1'); # CHANGELOG: # 50629-1044 - First build of script @@ -138,10 +139,14 @@ # 71120-1520 - added LogiNCamPaigns to show only allowed campaigns for agents upon login # 71125-1751 - Added inbound-group default inbound group sending to vicidial.php # 71129-2025 - restricted callbacks count and list to campaign only +# 71226-1117 - added option to kick all calls from conference upon logout +# 80128-1159 - fixed vicidial_log bugs +# 80402-0121 - Fixes for manual dial transfers on some systems, removed /n persist flag +# 80424-0442 - Added non_latin lookup from system_settings # -$version = '2.0.4-65'; -$build = '71129-2025'; +$version = '2.0.4-69'; +$build = '80424-0442'; require("dbconnect.php"); @@ -274,14 +279,38 @@ if (isset($_GET["enable_sipsak_messages"])) {$enable_sipsak_messages=$_GET["e elseif (isset($_POST["enable_sipsak_messages"])) {$enable_sipsak_messages=$_POST["enable_sipsak_messages"];} if (isset($_GET["status"])) {$status=$_GET["status"];} elseif (isset($_POST["status"])) {$status=$_POST["status"];} +if (isset($_GET["LogouTKicKAlL"])) {$LogouTKicKAlL=$_GET["LogouTKicKAlL"];} + elseif (isset($_POST["LogouTKicKAlL"])) {$LogouTKicKAlL=$_POST["LogouTKicKAlL"];} +header ("Content-type: text/html; charset=utf-8"); +header ("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1 +header ("Pragma: no-cache"); // HTTP/1.0 + +############################################# +##### START SYSTEM_SETTINGS LOOKUP ##### +$stmt = "SELECT use_non_latin FROM system_settings;"; +$rslt=mysql_query($stmt, $link); +if ($DB) {echo "$stmt\n";} +$qm_conf_ct = mysql_num_rows($rslt); +$i=0; +while ($i < $qm_conf_ct) + { + $row=mysql_fetch_row($rslt); + $non_latin = $row[0]; + $i++; + } +##### END SETTINGS LOOKUP ##### +########################################### + +if ($non_latin < 1) +{ $user=ereg_replace("[^0-9a-zA-Z]","",$user); $pass=ereg_replace("[^0-9a-zA-Z]","",$pass); $length_in_sec = ereg_replace("[^0-9]","",$length_in_sec); $phone_code = ereg_replace("[^0-9]","",$phone_code); $phone_number = ereg_replace("[^0-9]","",$phone_number); - +} # default optional vars if not set if (!isset($format)) {$format="text";} @@ -305,6 +334,7 @@ else { $stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$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]; @@ -381,7 +411,6 @@ if ($ACTION == 'LogiNCamPaigns') $LOGallowed_campaignsSQL=''; $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); if ( (!eregi("ALL-CAMPAIGNS",$row[0])) ) @@ -392,7 +421,6 @@ if ($ACTION == 'LogiNCamPaigns') } $stmt="SELECT campaign_id,campaign_name from vicidial_campaigns where active='Y' $LOGallowed_campaignsSQL order by campaign_id"; - if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); $camps_to_print = mysql_num_rows($rslt); @@ -713,7 +741,8 @@ if ($ACTION == 'manDiaLnextCaLL') $local_AMP = '@'; $Local_out_prefix = '9'; $Local_dial_timeout = '60'; - $Local_persist = '/n'; + # $Local_persist = '/n'; + $Local_persist = ''; if ($dial_timeout > 4) {$Local_dial_timeout = $dial_timeout;} $Local_dial_timeout = ($Local_dial_timeout * 1000); if (strlen($dial_prefix) > 0) {$Local_out_prefix = "$dial_prefix";} @@ -1049,7 +1078,8 @@ if ($stage == "end") if ($format=='debug') {echo "\n";} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); - if ($row[0] > 0) + $check_inbound = $row[0]; + if ($check_inbound > 0) { ##### look for the start epoch in the vicidial_closer_log table $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;"; @@ -1072,11 +1102,8 @@ if ($stage == "end") { $length_in_sec = 0; } - $stmt = "select count(*) from vicidial_campaigns where campaign_id='$campaign' and campaign_allow_inbound='Y';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ( ($length_in_sec < 1) and ($row[0] > 0) ) + + if ( ($length_in_sec < 1) and ($check_inbound > 0) ) { ##### start epoch in the vicidial_log table, couldn't find one in vicidial_closer_log $stmt="SELECT start_epoch FROM vicidial_log where uniqueid='$uniqueid' and lead_id='$lead_id';"; @@ -1097,21 +1124,25 @@ if ($stage == "end") } else {$length_in_sec = ($StarTtime - $start_epoch);} - $stmt = "select count(*) from vicidial_campaigns where campaign_id='$campaign' and campaign_allow_inbound='Y';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0] > 0) + $closer_logged=0; + if ($check_inbound > 0) { - $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;"; + $four_hours_ago = date("Y-m-d H:i:s", mktime(date("H")-4,date("i"),date("s"),date("m"),date("d"),date("Y"))); + + $stmt = "UPDATE vicidial_closer_log set end_epoch='$StarTtime', length_in_sec='$length_in_sec' where lead_id='$lead_id' and call_date > \"$four_hours_ago\" order by start_epoch desc limit 1;"; if ($DB) {echo "$stmt\n";} $rslt=mysql_query($stmt, $link); + $affected_rows = mysql_affected_rows($link); + if ($affected_rows > 0) + { + $closer_logged=1; + echo "$uniqueid\n$channel\n"; + } } ############################################# ##### ΕΝΑΡΞΗ 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); @@ -1247,7 +1278,6 @@ if ($stage == "end") { $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); } @@ -1274,7 +1304,6 @@ if ($stage == "end") $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); @@ -1314,7 +1343,6 @@ if ($stage == "end") $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); @@ -1338,7 +1366,6 @@ if ($stage == "end") $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); @@ -1347,19 +1374,22 @@ if ($stage == "end") } } - ##### look for the channel in the UPDATED vicidial_manager record of the call initiation - $stmt="UPDATE vicidial_log set end_epoch='$StarTtime', length_in_sec='$length_in_sec' where uniqueid='$uniqueid' and lead_id='$lead_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); + if ($closer_logged < 1) + { + ##### update the duration and end time in the vicidial_log table + $stmt="UPDATE vicidial_log set end_epoch='$StarTtime', length_in_sec='$length_in_sec' where uniqueid='$uniqueid' and lead_id='$lead_id';"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + $affected_rows = mysql_affected_rows($link); - if ($affected_rows > 0) - { - echo "$uniqueid\n$channel\n"; - } - else - { - echo "ΔΕΝ ΕΓΙΝΕ ΕΙΣΑΓΩΓΗ ΣΤΗΝ ΚΑΤΑΓΡΑΦΗ ΓΕΓΟΝΟΤΩΝ\n\n"; + if ($affected_rows > 0) + { + echo "$uniqueid\n$channel\n"; + } + else + { + echo "ΔΕΝ ΕΓΙΝΕ ΕΙΣΑΓΩΓΗ ΣΤΗΝ ΚΑΤΑΓΡΑΦΗ ΓΕΓΟΝΟΤΩΝ\n\n"; + } } } @@ -1642,41 +1672,69 @@ if ($ACTION == 'VDADcheckINCOMING') $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';"; + + + $stmt = "select campaign_id,phone_number,alt_dial,call_type from vicidial_auto_calls where callerid = '$callerid' order by call_time desc limit 1;"; if ($DB) {echo "$stmt\n";} $rslt=mysql_query($stmt, $link); - - $stmt = "select count(*) from vicidial_campaigns where campaign_id='$campaign' and campaign_allow_inbound='Y';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0] > 0) + $VDAC_cid_ct = mysql_num_rows($rslt); + if ($VDAC_cid_ct > 0) { - ### update the vicidial_closer_log user to INCALL - $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;"; + $row=mysql_fetch_row($rslt); + $VDADchannel_group =$row[0]; + $dialed_number =$row[1]; + $dialed_label =$row[2]; + $call_type =$row[3]; + } + else + { + if ($WeBRooTWritablE > 0) + { + $fp = fopen ("./vicidial_debug.txt", "a"); + fwrite ($fp, "$NOW_TIME|INBND|$callerid|$user|$user_group|$list_id|$lead_id|$phone_number|$uniqueid|\n"); + fclose($fp); + } + } + + if ( ($call_type=='OUT') or ($call_type=='OUTBALANCE') ) + { + $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); - $stmt = "select campaign_id,phone_number,alt_dial from vicidial_auto_calls where callerid = '$callerid' order by call_time desc limit 1;"; + $stmt = "select campaign_script,get_call_launch,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number from vicidial_campaigns where campaign_id='$campaign';"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + $VDIG_cid_ct = mysql_num_rows($rslt); + if ($VDIG_cid_ct > 0) + { + $row=mysql_fetch_row($rslt); + $VDCL_campaign_script = $row[0]; + $VDCL_get_call_launch = $row[1]; + $VDCL_xferconf_a_dtmf = $row[2]; + $VDCL_xferconf_a_number = $row[3]; + $VDCL_xferconf_b_dtmf = $row[4]; + $VDCL_xferconf_b_number = $row[5]; + } + echo "|||||$VDCL_campaign_script|$VDCL_get_call_launch|$VDCL_xferconf_a_dtmf|$VDCL_xferconf_a_number|$VDCL_xferconf_b_dtmf|$VDCL_xferconf_b_number|\n|\n"; + + $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); - $VDADchannel_group =$row[0]; - $dialed_number =$row[1]; - $dialed_label =$row[2]; - } - else - { - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./vicidial_debug.txt", "a"); - fwrite ($fp, "$NOW_TIME|INBND|$callerid|$user|$user_group|$list_id|$lead_id|$phone_number|$uniqueid|\n"); - fclose($fp); - } + $dialed_number =$row[0]; + $dialed_label =$row[1]; } + } + else + { + ### update the vicidial_closer_log user to INCALL + $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 count(*) from vicidial_log where lead_id='$lead_id' and uniqueid='$uniqueid';"; if ($DB) {echo "$stmt\n";} @@ -1748,35 +1806,6 @@ if ($ACTION == 'VDADcheckINCOMING') } else {echo '|' . $tsr . "\n";} } - else - { - $stmt = "select campaign_script,get_call_launch,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number from vicidial_campaigns where campaign_id='$campaign';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDIG_cid_ct = mysql_num_rows($rslt); - if ($VDIG_cid_ct > 0) - { - $row=mysql_fetch_row($rslt); - $VDCL_campaign_script = $row[0]; - $VDCL_get_call_launch = $row[1]; - $VDCL_xferconf_a_dtmf = $row[2]; - $VDCL_xferconf_a_number = $row[3]; - $VDCL_xferconf_b_dtmf = $row[4]; - $VDCL_xferconf_b_number = $row[5]; - } - echo "|||||$VDCL_campaign_script|$VDCL_get_call_launch|$VDCL_xferconf_a_dtmf|$VDCL_xferconf_a_number|$VDCL_xferconf_b_dtmf|$VDCL_xferconf_b_number|\n|\n"; - - $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); $comments = eregi_replace("\n",'!N',$comments); @@ -1948,6 +1977,18 @@ else $rslt=mysql_query($stmt, $link); } + if ($LogouTKicKAlL > 0) + { + $local_DEF = 'Local/5555'; + $local_AMP = '@'; + $kick_local_channel = "$local_DEF$conf_exten$local_AMP$ext_context"; + $queryCID = "ULGH3458$StarTtime"; + + $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$queryCID','Channel: $kick_local_channel','Context: $ext_context','Exten: 8300','Priority: 1','Callerid: $queryCID','','','','$channel','$exten');"; + 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";} @@ -1968,7 +2009,6 @@ else ############################################# ##### ΕΝΑΡΞΗ 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); @@ -2000,12 +2040,11 @@ else # $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"; @@ -2023,7 +2062,6 @@ else $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); @@ -2101,6 +2139,7 @@ if ($ACTION == 'updateDISPO') $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) { @@ -2150,7 +2189,6 @@ if ($ACTION == 'updateDISPO') ############################################# ##### ΕΝΑΡΞΗ 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); @@ -2175,7 +2213,6 @@ if ($ACTION == 'updateDISPO') $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); @@ -2204,7 +2241,6 @@ if ($ACTION == 'updateLEAD') { $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); @@ -2220,7 +2256,6 @@ if ($ACTION == 'updateLEAD') $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); @@ -2290,7 +2325,6 @@ if ( ($ACTION == 'VDADpause') || ($ACTION == 'VDADready') ) ############################################# ##### ΕΝΑΡΞΗ 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); @@ -2317,7 +2351,6 @@ if ( ($ACTION == 'VDADpause') || ($ACTION == 'VDADready') ) $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); @@ -2424,7 +2457,6 @@ if ($ACTION == 'ΠαύσηCodeSubmit') ############################################# ##### ΕΝΑΡΞΗ 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); @@ -2455,7 +2487,6 @@ if ($ACTION == 'ΠαύσηCodeSubmit') $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); diff --git a/agc_2-X/branches/agc_2.0.4/LANG_www/agc_el/vicidial.php b/agc_2-X/branches/agc_2.0.4/LANG_www/agc_el/vicidial.php index 4d71a6d7..cd2b7a73 100644 --- a/agc_2-X/branches/agc_2.0.4/LANG_www/agc_el/vicidial.php +++ b/agc_2-X/branches/agc_2.0.4/LANG_www/agc_el/vicidial.php @@ -1,7 +1,7 @@ LICENSE: GPLv2 +# Copyright (C) 2008 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 @@ -171,10 +171,13 @@ # 71125-1751 - Changed Transfer section to allow for selection of in-groups to send calls to # 71127-0408 - Added height and width settings for easier modification of screen size # 71129-2025 - restricted callbacks count and list to campaign only +# 71226-1117 - added option to kick all calls from conference upon logout +# 80330-0823 - Added new AST_blind monitoring ability and minor cleanup for release +# 80402-0121 - Fixes for Manual Dial hangups and transfers # -$version = '2.0.4-142'; -$build = '71129-2025'; +$version = '2.0.4-145'; +$build = '80402-0121'; require("dbconnect.php"); @@ -207,6 +210,11 @@ if (isset($_GET["relogin"])) {$relogin=$_GET["relogin"];} $VD_campaign = strtoupper($VD_campaign); $VD_campaign = eregi_replace(" ",'',$VD_campaign); } + if (!isset($flag_channels)) + { + $flag_channels=0; + $flag_string=''; + } ### security strip all non-alphanumeric characters out of the variables ### $DB=ereg_replace("[^0-9a-z]","",$DB); @@ -237,6 +245,22 @@ $CIDdate = date("ymdHis"); $random = (rand(1000000, 9999999) + 10000000); +############################################# +##### START SYSTEM_SETTINGS LOOKUP ##### +$stmt = "SELECT use_non_latin FROM system_settings;"; +$rslt=mysql_query($stmt, $link); +if ($DB) {echo "$stmt\n";} +$qm_conf_ct = mysql_num_rows($rslt); +$i=0; +while ($i < $qm_conf_ct) + { + $row=mysql_fetch_row($rslt); + $non_latin = $row[0]; + $i++; + } +##### END SETTINGS LOOKUP ##### +########################################### + $conf_silent_prefix = '7'; # vicidial_conferences prefix to enter silently $HKuser_level = '5'; # minimum vicidial user_level for HotKeys $campaign_login_list = '1'; # show drop-down list of campaigns at login @@ -256,6 +280,7 @@ $volumecontrol_active = '1'; # set to 1 to allow agents to alter volume of chann $PreseT_DiaL_LinKs = '1'; # set to 1 to show a ΚΛΗΣΗ link for Dial Presets $LogiNAJAX = '1'; # set to 1 to do lookups $HidEMonitoRSessionS = '1'; # set to 1 to hide remote monitoring channels from "session calls" +$LogouTKicKAlL = '1'; # set to 1 to hangup all calls in session upon agent logout $TEST_all_statuses = '0'; # TEST variable allows all statuses in dispo screen @@ -328,13 +353,12 @@ $LOGallowed_campaignsSQL=''; if ($relogin == 'YES') { $stmt="SELECT user_group from vicidial_users where user='$VD_login' and pass='$VD_pass'"; - if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $VU_user_group=$row[0]; $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); if ( (!eregi("ALL-CAMPAIGNS",$row[0])) ) @@ -509,7 +533,6 @@ echo ""; + 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; @@ -2558,6 +2557,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} // Covers the following types: XFER, VMAIL, ENTRY, CONF, ΣΤΑΘΜΕΥΣΗ, FROMΣΤΑΘΜΕΥΣΗ, XfeRLOCAL, XfeRINTERNAL, XfeRBLIND, VfeRVMAIL function mainxfer_send_redirect(taskvar,taskxferconf,taskserverip,taskdebugnote) { + if (auto_dial_level == 0) {RedirecTxFEr = 1;} var xmlhttp=false; /*@cc_on @*/ /*@if (@_jscript_version >= 5) @@ -2630,7 +2630,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} } else { - xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=RedirectVD&format=text&channel=" + redirectvalue + "&call_server_ip=" + redirectserverip + "&queryCID=" + queryCID + "&exten=" + blindxferdialstring + "&ext_context=" + ext_context + "&ext_priority=1&auto_dial_level=" + auto_dial_level + "&campaign=" + campaign + "&uniqueid=" + document.vicidial_form.uniqueid.value + "&lead_id=" + document.vicidial_form.lead_id.value + "&secondS=" + VD_live_call_secondS; + xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=RedirectVD&format=text&channel=" + redirectvalue + "&call_server_ip=" + redirectserverip + "&queryCID=" + queryCID + "&exten=" + blindxferdialstring + "&ext_context=" + ext_context + "&ext_priority=1&auto_dial_level=" + auto_dial_level + "&campaign=" + campaign + "&uniqueid=" + document.vicidial_form.uniqueid.value + "&lead_id=" + document.vicidial_form.lead_id.value + "&secondS=" + VD_live_call_secondS + "&session_id=" + session_id; } } if (taskvar == 'XfeRINTERNAL') @@ -2649,25 +2649,25 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} // "90009*$group**$lead_id**$phone_number*$user*"; var redirectdestination = closerxferinternal + '90009*' + XfeRSelecT.value + '**' + document.vicidial_form.lead_id.value + '**' + document.vicidial_form.phone_number.value + '*' + user + '*'; - xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=RedirectVD&format=text&channel=" + redirectvalue + "&call_server_ip=" + redirectserverip + "&queryCID=" + queryCID + "&exten=" + redirectdestination + "&ext_context=" + ext_context + "&ext_priority=1&auto_dial_level=" + auto_dial_level + "&campaign=" + campaign + "&uniqueid=" + document.vicidial_form.uniqueid.value + "&lead_id=" + document.vicidial_form.lead_id.value + "&secondS=" + VD_live_call_secondS; + xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=RedirectVD&format=text&channel=" + redirectvalue + "&call_server_ip=" + redirectserverip + "&queryCID=" + queryCID + "&exten=" + redirectdestination + "&ext_context=" + ext_context + "&ext_priority=1&auto_dial_level=" + auto_dial_level + "&campaign=" + campaign + "&uniqueid=" + document.vicidial_form.uniqueid.value + "&lead_id=" + document.vicidial_form.lead_id.value + "&secondS=" + VD_live_call_secondS + "&session_id=" + session_id; } if (taskvar == 'XfeR') { var queryCID = "LRvdcW" + epoch_sec + user_abb; var redirectdestination = document.vicidial_form.extension_xfer.value; - xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=RedirectName&format=text&channel=" + redirectvalue + "&call_server_ip=" + redirectserverip + "&queryCID=" + queryCID + "&extenName=" + redirectdestination + "&ext_context=" + ext_context + "&ext_priority=1"; + xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=RedirectName&format=text&channel=" + redirectvalue + "&call_server_ip=" + redirectserverip + "&queryCID=" + queryCID + "&extenName=" + redirectdestination + "&ext_context=" + ext_context + "&ext_priority=1" + "&session_id=" + session_id; } if (taskvar == 'VMAIL') { var queryCID = "LVvdcW" + epoch_sec + user_abb; var redirectdestination = document.vicidial_form.extension_xfer.value; - xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=RedirectNameVmail&format=text&channel=" + redirectvalue + "&call_server_ip=" + redirectserverip + "&queryCID=" + queryCID + "&exten=" + voicemail_dump_exten + "&extenName=" + redirectdestination + "&ext_context=" + ext_context + "&ext_priority=1"; + xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=RedirectNameVmail&format=text&channel=" + redirectvalue + "&call_server_ip=" + redirectserverip + "&queryCID=" + queryCID + "&exten=" + voicemail_dump_exten + "&extenName=" + redirectdestination + "&ext_context=" + ext_context + "&ext_priority=1" + "&session_id=" + session_id; } if (taskvar == 'ENTRY') { var queryCID = "LEvdcW" + epoch_sec + user_abb; var redirectdestination = document.vicidial_form.extension_xfer_entry.value; - xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=Redirect&format=text&channel=" + redirectvalue + "&call_server_ip=" + redirectserverip + "&queryCID=" + queryCID + "&exten=" + redirectdestination + "&ext_context=" + ext_context + "&ext_priority=1"; + xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=Redirect&format=text&channel=" + redirectvalue + "&call_server_ip=" + redirectserverip + "&queryCID=" + queryCID + "&exten=" + redirectdestination + "&ext_context=" + ext_context + "&ext_priority=1" + "&session_id=" + session_id; } if (taskvar == '3WAY') { @@ -2689,7 +2689,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} DispO3wayCalLxfernumber = document.vicidial_form.xfernumber.value; DispO3wayCalLcamptail = ''; - 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=" + XfeRSelecT.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=" + XfeRSelecT.value + "&session_id=" + session_id; if (taskdebugnote == 'FIRST') { @@ -2702,7 +2702,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} var redirectdestination = taskxferconf; var redirectdestserverip = taskserverip; var parkedby = protocol + "/" + extension; - xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=RedirectToPark&format=text&channel=" + redirectdestination + "&call_server_ip=" + redirectdestserverip + "&queryCID=" + queryCID + "&exten=" + park_on_extension + "&ext_context=" + ext_context + "&ext_priority=1&extenName=park&parkedby=" + parkedby; + xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=RedirectToPark&format=text&channel=" + redirectdestination + "&call_server_ip=" + redirectdestserverip + "&queryCID=" + queryCID + "&exten=" + park_on_extension + "&ext_context=" + ext_context + "&ext_priority=1&extenName=park&parkedby=" + parkedby + "&session_id=" + session_id; document.getElementById("ParkControl").innerHTML ="\"Αρπαγμα"; customerparked=1; @@ -2723,7 +2723,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} {var dest_dialstring = session_id;} } - xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=RedirectFromPark&format=text&channel=" + redirectdestination + "&call_server_ip=" + redirectdestserverip + "&queryCID=" + queryCID + "&exten=" + dest_dialstring + "&ext_context=" + ext_context + "&ext_priority=1"; + xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=RedirectFromPark&format=text&channel=" + redirectdestination + "&call_server_ip=" + redirectdestserverip + "&queryCID=" + queryCID + "&exten=" + dest_dialstring + "&ext_context=" + ext_context + "&ext_priority=1" + "&session_id=" + session_id; document.getElementById("ParkControl").innerHTML ="\"Στάθμευση"; customerparked=0; @@ -2744,11 +2744,55 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} } delete xmlhttp; } + + // used to send second Redirect for manual dial calls + if (auto_dial_level == 0) + { + RedirecTxFEr = 1; + 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) + { + xmlhttp.open('POST', 'manager_send.php'); + xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8'); + xmlhttp.send(xferredirect_query + "&stage=2NDXfeR"); + xmlhttp.onreadystatechange = function() + { + if (xmlhttp.readyState == 4 && xmlhttp.status == 200) + { + Nactiveext = null; + Nactiveext = xmlhttp.responseText; + // alert(RedirecTxFEr + "|" + xmlhttp.responseText); + } + } + delete xmlhttp; + } + } + if ( (taskvar == 'XfeRLOCAL') || (taskvar == 'XfeRBLIND') || (taskvar == 'XfeRVMAIL') ) { + if (auto_dial_level == 0) {RedirecTxFEr = 1;} document.vicidial_form.callchannel.value = ''; document.vicidial_form.callserverip.value = ''; if( document.images ) { document.images['livecall'].src = image_livecall_OFF.src;} + // alert(RedirecTxFEr + "|" + auto_dial_level); dialedcall_send_hangup(); } @@ -2859,6 +2903,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} } delete xmlhttp; } + RedirecTxFEr=0; } @@ -4267,7 +4312,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} AgainCalLSecondS = VD_live_call_secondS; AgaiNCalLCID = CalLCID; var process_post_hangup=0; - if (MD_channel_look==1) + if ( (RedirecTxFEr < 1) && ( (MD_channel_look==1) || (auto_dial_level == 0) ) ) { MD_channel_look=0; DialTimeHangup(); @@ -4552,6 +4597,9 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} // Send Hangup command for any Local call that is not in the quiet(7) entry - used to stop manual dials even if no connect function DialTimeHangup() { + if (RedirecTxFEr < 1) + { + // alert("RedirecTxFEr|" + RedirecTxFEr); MD_channel_look=0; var xmlhttp=false; /*@cc_on @*/ @@ -4590,6 +4638,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} } delete xmlhttp; } + } } @@ -5238,7 +5287,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 + "&agent_log_id=" + agent_log_id + "&no_delete_sessions=" + no_delete_sessions + "&phone_ip=" + phone_ip + "&enable_sipsak_messages=" + enable_sipsak_messages; + 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 + "&LogouTKicKAlL=" + LogouTKicKAlL + "&ext_context=" + ext_context; xmlhttp.open('POST', 'vdc_db_query.php'); xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8'); xmlhttp.send(VDlogout_query); @@ -5246,7 +5295,8 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} { if (xmlhttp.readyState == 4 && xmlhttp.status == 200) { - // alert(xmlhttp.responseText); + // alert(VDlogout_query); + // alert(xmlhttp.responseText); } } delete xmlhttp; @@ -5388,10 +5438,14 @@ else var encoded = encodedvar; decoded = ''; var i = 0; - var RGnl = new RegExp("\n","g"); + var RGnl = new RegExp("[\r]\n","g"); var RGplus = new RegExp(" ","g"); var RGiframe = new RegExp("iframe","gi"); +var xtest; +xtest=unescape(encoded); +encoded=utf8_decode(xtest); + if (scriptformat == 'YES') { var SCvendor_lead_code = document.vicidial_form.vendor_lead_code.value; @@ -5563,30 +5617,64 @@ else encoded = encoded.replace(RGSIPexten, SCSIPexten); encoded = encoded.replace(RGsession_id, SCsession_id); } - while (i < encoded.length) { - var ch = encoded.charAt(i); - if (ch == "%") { - if (i < (encoded.length-2) - && HEXCHAR.indexOf(encoded.charAt(i+1)) != -1 - && HEXCHAR.indexOf(encoded.charAt(i+2)) != -1 ) { - decoded += unescape( encoded.substr(i,3) ); - i += 3; - } else { - alert( 'Bad escape combo near ...' + encoded.substr(i) ); - decoded += "%[ERR]"; - i++; - } - } else { - decoded += ch; - i++; - } - } // while - decoded = decoded.replace(RGnl, "
"); - +decoded=encoded; // simple no ? +decoded = decoded.replace(RGnl, "
"); +// while (i < encoded.length) { +// var ch = encoded.charAt(i); +// if (ch == "%") { +// if (i < (encoded.length-2) +// && HEXCHAR.indexOf(encoded.charAt(i+1)) != -1 +// && HEXCHAR.indexOf(encoded.charAt(i+2)) != -1 ) { +// decoded += unescape( encoded.substr(i,3) ); +// i += 3; +// } else { +// alert( 'Bad escape combo near ...' + encoded.substr(i) ); +// decoded += "%[ERR]"; +// i++; +// } +// } else { +// decoded += ch; +// i++; +// } +// } // while +// decoded = decoded.replace(RGnl, "
"); +// return false; }; +// ################################################################################ +// Taken form php.net Angelos +function utf8_decode(utftext) { + var string = ""; + var i = 0; + var c = c1 = c2 = 0; + + while ( i < utftext.length ) { + + c = utftext.charCodeAt(i); + + if (c < 128) { + string += String.fromCharCode(c); + i++; + } + else if((c > 191) && (c < 224)) { + c2 = utftext.charCodeAt(i+1); + string += String.fromCharCode(((c & 31) << 6) | (c2 & 63)); + i += 2; + } + else { + c2 = utftext.charCodeAt(i+1); + c3 = utftext.charCodeAt(i+2); + string += String.fromCharCode(((c & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63)); + i += 3; + } + + } + + return string; + }; + // ################################################################################ // Move the Dispo frame out of the way and change the link to μεγιστοποιήστε @@ -6304,14 +6392,15 @@ else .body_small {font-size: 11px; font-family: sans-serif;} .body_tiny {font-size: 10px; font-family: sans-serif;} .log_text {font-size: 11px; font-family: monospace;} + .log_text_red {font-size: 11px; font-family: monospace; font-weight: bold; background: #FF3333} .log_title {font-size: 12px; font-family: monospace; font-weight: bold;} .sd_text {font-size: 16px; font-family: sans-serif; font-weight: bold;} .sh_text {font-size: 14px; font-family: sans-serif; font-weight: bold;} .sb_text {font-size: 12px; font-family: sans-serif;} .sk_text {font-size: 11px; font-family: sans-serif;} .skb_text {font-size: 13px; font-family: sans-serif; font-weight: bold;} - .ON_conf {font-size: 11px; font-family: monospace; color: black ; background: #FFFF99} - .OFF_conf {font-size: 11px; font-family: monospace; color: black ; background: #FFCC77} + .ON_conf {font-size: 11px; font-family: monospace; color: black; background: #FFFF99} + .OFF_conf {font-size: 11px; font-family: monospace; color: black; background: #FFCC77} .cust_form {font-family: sans-serif; font-size: 10px; overflow: auto} --> @@ -6604,7 +6693,17 @@ Your Κατάσταση: + + + + + + + + + +   - + diff --git a/agc_2-X/branches/agc_2.0.4/LANG_www/agc_en/conf_exten_check.php b/agc_2-X/branches/agc_2.0.4/LANG_www/agc_en/conf_exten_check.php index ae3b84b5..47ec7fe6 100644 --- a/agc_2-X/branches/agc_2.0.4/LANG_www/agc_en/conf_exten_check.php +++ b/agc_2-X/branches/agc_2.0.4/LANG_www/agc_en/conf_exten_check.php @@ -1,7 +1,7 @@ LICENSE: GPLv2 +# Copyright (C) 2008 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 @@ -35,6 +35,7 @@ # 61128-2255 - Added update for manual dial vicidial_live_agents # 70319-1542 - Added agent disabled display function # 71122-0205 - Added vicidial_live_agent status output +# 80424-0442 - Added non_latin lookup from system_settings # require("dbconnect.php"); @@ -63,8 +64,28 @@ if (isset($_GET["auto_dial_level"])) {$auto_dial_level=$_GET["auto_dial_level" if (isset($_GET["campagentstdisp"])) {$campagentstdisp=$_GET["campagentstdisp"];} elseif (isset($_POST["campagentstdisp"])) {$campagentstdisp=$_POST["campagentstdisp"];} + +############################################# +##### START SYSTEM_SETTINGS LOOKUP ##### +$stmt = "SELECT use_non_latin FROM system_settings;"; +$rslt=mysql_query($stmt, $link); +if ($DB) {echo "$stmt\n";} +$qm_conf_ct = mysql_num_rows($rslt); +$i=0; +while ($i < $qm_conf_ct) + { + $row=mysql_fetch_row($rslt); + $non_latin = $row[0]; + $i++; + } +##### END SETTINGS LOOKUP ##### +########################################### + +if ($non_latin < 1) +{ $user=ereg_replace("[^0-9a-zA-Z]","",$user); $pass=ereg_replace("[^0-9a-zA-Z]","",$pass); +} # default optional vars if not set if (!isset($format)) {$format="text";} @@ -81,11 +102,12 @@ if (!isset($query_date)) {$query_date = $NOW_DATE;} $random = (rand(1000000, 9999999) + 10000000); - $stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; +$stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$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]; if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) { diff --git a/agc_2-X/branches/agc_2.0.4/LANG_www/agc_en/manager_send.php b/agc_2-X/branches/agc_2.0.4/LANG_www/agc_en/manager_send.php index 94eff7b6..e3e53530 100644 --- a/agc_2-X/branches/agc_2.0.4/LANG_www/agc_en/manager_send.php +++ b/agc_2-X/branches/agc_2.0.4/LANG_www/agc_en/manager_send.php @@ -1,7 +1,7 @@ LICENSE: GPLv2 +# Copyright (C) 2008 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 @@ -32,8 +32,8 @@ # - $agent_log_id - ('123456',...) # - $call_server_ip - ('10.10.10.15',...) # - $CalLCID - ('VD01234567890123456',...) -# - $stage - ('UP','DOWN') -# +# - $stage - ('UP','DOWN','2NDXfeR') +# - $session_id - ('8600051') # CHANGELOG: # 50401-1002 - First build of script, Hangup function only @@ -68,8 +68,14 @@ # 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 +# 80331-1433 - Added second transfer try for VICIDIAL transfers on manual dial calls +# 80402-0121 - Fixes for manual dial transfers on some systems +# 80424-0442 - Added non_latin lookup from system_settings # +$version = '2.0.4-31'; +$build = '80424-0442'; + require("dbconnect.php"); ### These are variable assignments for PHP globals off @@ -137,28 +143,48 @@ if (isset($_GET["enable_sipsak_messages"])) {$enable_sipsak_messages=$_GET["e 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["session_id"])) {$session_id=$_GET["session_id"];} + elseif (isset($_POST["session_id"])) {$session_id=$_POST["session_id"];} +############################################# +##### START SYSTEM_SETTINGS LOOKUP ##### +$stmt = "SELECT use_non_latin FROM system_settings;"; +$rslt=mysql_query($stmt, $link); +if ($DB) {echo "$stmt\n";} +$qm_conf_ct = mysql_num_rows($rslt); +$i=0; +while ($i < $qm_conf_ct) + { + $row=mysql_fetch_row($rslt); + $non_latin = $row[0]; + $i++; + } +##### END SETTINGS LOOKUP ##### +########################################### + +if ($non_latin < 1) +{ $user=ereg_replace("[^0-9a-zA-Z]","",$user); $pass=ereg_replace("[^0-9a-zA-Z]","",$pass); $secondS = ereg_replace("[^0-9]","",$secondS); +} # default optional vars if not set if (!isset($ACTION)) {$ACTION="Originate";} if (!isset($format)) {$format="alert";} if (!isset($ext_priority)) {$ext_priority="1";} -$version = '2.0.29'; -$build = '70320-1502'; $StarTtime = date("U"); $NOW_DATE = date("Y-m-d"); $NOW_TIME = date("Y-m-d H:i:s"); if (!isset($query_date)) {$query_date = $NOW_DATE;} - $stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; +$stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$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]; if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) { @@ -878,6 +904,29 @@ if ($ACTION=="RedirectXtra") if ($ACTION=="Redirect") { + ### for manual dial VICIDIAL calls send the second attempt to transfer the call + if ($stage=="2NDXfeR") + { + $local_DEF = 'Local/'; + $local_AMP = '@'; + $hangup_channel_prefix = "$local_DEF$session_id$local_AMP$ext_context"; + + $stmt="SELECT count(*) FROM live_sip_channels where server_ip = '$server_ip' and channel LIKE \"$hangup_channel_prefix%\";"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + if ($row > 0) + { + $stmt="SELECT channel FROM live_sip_channels where server_ip = '$server_ip' and channel LIKE \"$hangup_channel_prefix%\";"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + $rowx=mysql_fetch_row($rslt); + $channel=$rowx[0]; + $channel = eregi_replace("1$","2",$channel); + $queryCID = eregi_replace("^.","Q",$queryCID); + } + } + $row=''; $rowx=''; $channel_live=1; if ( (strlen($channel)<3) or (strlen($queryCID)<15) or (strlen($exten)<1) or (strlen($ext_context)<1) or (strlen($ext_priority)<1) ) diff --git a/agc_2-X/branches/agc_2.0.4/LANG_www/agc_en/vdc_db_query.php b/agc_2-X/branches/agc_2.0.4/LANG_www/agc_en/vdc_db_query.php index 129af642..2cf95474 100644 --- a/agc_2-X/branches/agc_2.0.4/LANG_www/agc_en/vdc_db_query.php +++ b/agc_2-X/branches/agc_2.0.4/LANG_www/agc_en/vdc_db_query.php @@ -1,7 +1,7 @@ LICENSE: GPLv2 +# Copyright (C) 2008 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 @@ -69,6 +69,7 @@ # - $use_internal_dnc - ('Y','N') # - $omit_phone_code - ('Y','N') # - $no_delete_sessions - ('0','1') +# - $LogouTKicKAlL - ('0','1'); # CHANGELOG: # 50629-1044 - First build of script @@ -138,10 +139,14 @@ # 71120-1520 - added LogiNCamPaigns to show only allowed campaigns for agents upon login # 71125-1751 - Added inbound-group default inbound group sending to vicidial.php # 71129-2025 - restricted callbacks count and list to campaign only +# 71226-1117 - added option to kick all calls from conference upon logout +# 80128-1159 - fixed vicidial_log bugs +# 80402-0121 - Fixes for manual dial transfers on some systems, removed /n persist flag +# 80424-0442 - Added non_latin lookup from system_settings # -$version = '2.0.4-65'; -$build = '71129-2025'; +$version = '2.0.4-69'; +$build = '80424-0442'; require("dbconnect.php"); @@ -274,14 +279,38 @@ if (isset($_GET["enable_sipsak_messages"])) {$enable_sipsak_messages=$_GET["e elseif (isset($_POST["enable_sipsak_messages"])) {$enable_sipsak_messages=$_POST["enable_sipsak_messages"];} if (isset($_GET["status"])) {$status=$_GET["status"];} elseif (isset($_POST["status"])) {$status=$_POST["status"];} +if (isset($_GET["LogouTKicKAlL"])) {$LogouTKicKAlL=$_GET["LogouTKicKAlL"];} + elseif (isset($_POST["LogouTKicKAlL"])) {$LogouTKicKAlL=$_POST["LogouTKicKAlL"];} +header ("Content-type: text/html; charset=utf-8"); +header ("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1 +header ("Pragma: no-cache"); // HTTP/1.0 + +############################################# +##### START SYSTEM_SETTINGS LOOKUP ##### +$stmt = "SELECT use_non_latin FROM system_settings;"; +$rslt=mysql_query($stmt, $link); +if ($DB) {echo "$stmt\n";} +$qm_conf_ct = mysql_num_rows($rslt); +$i=0; +while ($i < $qm_conf_ct) + { + $row=mysql_fetch_row($rslt); + $non_latin = $row[0]; + $i++; + } +##### END SETTINGS LOOKUP ##### +########################################### + +if ($non_latin < 1) +{ $user=ereg_replace("[^0-9a-zA-Z]","",$user); $pass=ereg_replace("[^0-9a-zA-Z]","",$pass); $length_in_sec = ereg_replace("[^0-9]","",$length_in_sec); $phone_code = ereg_replace("[^0-9]","",$phone_code); $phone_number = ereg_replace("[^0-9]","",$phone_number); - +} # default optional vars if not set if (!isset($format)) {$format="text";} @@ -305,6 +334,7 @@ else { $stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$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]; @@ -381,7 +411,6 @@ if ($ACTION == 'LogiNCamPaigns') $LOGallowed_campaignsSQL=''; $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); if ( (!eregi("ALL-CAMPAIGNS",$row[0])) ) @@ -392,7 +421,6 @@ if ($ACTION == 'LogiNCamPaigns') } $stmt="SELECT campaign_id,campaign_name from vicidial_campaigns where active='Y' $LOGallowed_campaignsSQL order by campaign_id"; - if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); $camps_to_print = mysql_num_rows($rslt); @@ -713,7 +741,8 @@ if ($ACTION == 'manDiaLnextCaLL') $local_AMP = '@'; $Local_out_prefix = '9'; $Local_dial_timeout = '60'; - $Local_persist = '/n'; + # $Local_persist = '/n'; + $Local_persist = ''; if ($dial_timeout > 4) {$Local_dial_timeout = $dial_timeout;} $Local_dial_timeout = ($Local_dial_timeout * 1000); if (strlen($dial_prefix) > 0) {$Local_out_prefix = "$dial_prefix";} @@ -1049,7 +1078,8 @@ if ($stage == "end") if ($format=='debug') {echo "\n";} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); - if ($row[0] > 0) + $check_inbound = $row[0]; + if ($check_inbound > 0) { ##### look for the start epoch in the vicidial_closer_log table $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;"; @@ -1072,11 +1102,8 @@ if ($stage == "end") { $length_in_sec = 0; } - $stmt = "select count(*) from vicidial_campaigns where campaign_id='$campaign' and campaign_allow_inbound='Y';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ( ($length_in_sec < 1) and ($row[0] > 0) ) + + if ( ($length_in_sec < 1) and ($check_inbound > 0) ) { ##### start epoch in the vicidial_log table, couldn't find one in vicidial_closer_log $stmt="SELECT start_epoch FROM vicidial_log where uniqueid='$uniqueid' and lead_id='$lead_id';"; @@ -1097,21 +1124,25 @@ if ($stage == "end") } else {$length_in_sec = ($StarTtime - $start_epoch);} - $stmt = "select count(*) from vicidial_campaigns where campaign_id='$campaign' and campaign_allow_inbound='Y';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0] > 0) + $closer_logged=0; + if ($check_inbound > 0) { - $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;"; + $four_hours_ago = date("Y-m-d H:i:s", mktime(date("H")-4,date("i"),date("s"),date("m"),date("d"),date("Y"))); + + $stmt = "UPDATE vicidial_closer_log set end_epoch='$StarTtime', length_in_sec='$length_in_sec' where lead_id='$lead_id' and call_date > \"$four_hours_ago\" order by start_epoch desc limit 1;"; if ($DB) {echo "$stmt\n";} $rslt=mysql_query($stmt, $link); + $affected_rows = mysql_affected_rows($link); + if ($affected_rows > 0) + { + $closer_logged=1; + echo "$uniqueid\n$channel\n"; + } } ############################################# ##### 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); @@ -1247,7 +1278,6 @@ if ($stage == "end") { $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); } @@ -1274,7 +1304,6 @@ if ($stage == "end") $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); @@ -1314,7 +1343,6 @@ if ($stage == "end") $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); @@ -1338,7 +1366,6 @@ if ($stage == "end") $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); @@ -1347,19 +1374,22 @@ if ($stage == "end") } } - ##### look for the channel in the UPDATED vicidial_manager record of the call initiation - $stmt="UPDATE vicidial_log set end_epoch='$StarTtime', length_in_sec='$length_in_sec' where uniqueid='$uniqueid' and lead_id='$lead_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); + if ($closer_logged < 1) + { + ##### update the duration and end time in the vicidial_log table + $stmt="UPDATE vicidial_log set end_epoch='$StarTtime', length_in_sec='$length_in_sec' where uniqueid='$uniqueid' and lead_id='$lead_id';"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + $affected_rows = mysql_affected_rows($link); - if ($affected_rows > 0) - { - echo "$uniqueid\n$channel\n"; - } - else - { - echo "LOG NOT ENTERED\n\n"; + if ($affected_rows > 0) + { + echo "$uniqueid\n$channel\n"; + } + else + { + echo "LOG NOT ENTERED\n\n"; + } } } @@ -1642,41 +1672,69 @@ if ($ACTION == 'VDADcheckINCOMING') $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';"; + + + $stmt = "select campaign_id,phone_number,alt_dial,call_type from vicidial_auto_calls where callerid = '$callerid' order by call_time desc limit 1;"; if ($DB) {echo "$stmt\n";} $rslt=mysql_query($stmt, $link); - - $stmt = "select count(*) from vicidial_campaigns where campaign_id='$campaign' and campaign_allow_inbound='Y';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0] > 0) + $VDAC_cid_ct = mysql_num_rows($rslt); + if ($VDAC_cid_ct > 0) { - ### update the vicidial_closer_log user to INCALL - $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;"; + $row=mysql_fetch_row($rslt); + $VDADchannel_group =$row[0]; + $dialed_number =$row[1]; + $dialed_label =$row[2]; + $call_type =$row[3]; + } + else + { + if ($WeBRooTWritablE > 0) + { + $fp = fopen ("./vicidial_debug.txt", "a"); + fwrite ($fp, "$NOW_TIME|INBND|$callerid|$user|$user_group|$list_id|$lead_id|$phone_number|$uniqueid|\n"); + fclose($fp); + } + } + + if ( ($call_type=='OUT') or ($call_type=='OUTBALANCE') ) + { + $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); - $stmt = "select campaign_id,phone_number,alt_dial from vicidial_auto_calls where callerid = '$callerid' order by call_time desc limit 1;"; + $stmt = "select campaign_script,get_call_launch,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number from vicidial_campaigns where campaign_id='$campaign';"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + $VDIG_cid_ct = mysql_num_rows($rslt); + if ($VDIG_cid_ct > 0) + { + $row=mysql_fetch_row($rslt); + $VDCL_campaign_script = $row[0]; + $VDCL_get_call_launch = $row[1]; + $VDCL_xferconf_a_dtmf = $row[2]; + $VDCL_xferconf_a_number = $row[3]; + $VDCL_xferconf_b_dtmf = $row[4]; + $VDCL_xferconf_b_number = $row[5]; + } + echo "|||||$VDCL_campaign_script|$VDCL_get_call_launch|$VDCL_xferconf_a_dtmf|$VDCL_xferconf_a_number|$VDCL_xferconf_b_dtmf|$VDCL_xferconf_b_number|\n|\n"; + + $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); - $VDADchannel_group =$row[0]; - $dialed_number =$row[1]; - $dialed_label =$row[2]; - } - else - { - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./vicidial_debug.txt", "a"); - fwrite ($fp, "$NOW_TIME|INBND|$callerid|$user|$user_group|$list_id|$lead_id|$phone_number|$uniqueid|\n"); - fclose($fp); - } + $dialed_number =$row[0]; + $dialed_label =$row[1]; } + } + else + { + ### update the vicidial_closer_log user to INCALL + $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 count(*) from vicidial_log where lead_id='$lead_id' and uniqueid='$uniqueid';"; if ($DB) {echo "$stmt\n";} @@ -1748,35 +1806,6 @@ if ($ACTION == 'VDADcheckINCOMING') } else {echo '|' . $tsr . "\n";} } - else - { - $stmt = "select campaign_script,get_call_launch,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number from vicidial_campaigns where campaign_id='$campaign';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDIG_cid_ct = mysql_num_rows($rslt); - if ($VDIG_cid_ct > 0) - { - $row=mysql_fetch_row($rslt); - $VDCL_campaign_script = $row[0]; - $VDCL_get_call_launch = $row[1]; - $VDCL_xferconf_a_dtmf = $row[2]; - $VDCL_xferconf_a_number = $row[3]; - $VDCL_xferconf_b_dtmf = $row[4]; - $VDCL_xferconf_b_number = $row[5]; - } - echo "|||||$VDCL_campaign_script|$VDCL_get_call_launch|$VDCL_xferconf_a_dtmf|$VDCL_xferconf_a_number|$VDCL_xferconf_b_dtmf|$VDCL_xferconf_b_number|\n|\n"; - - $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); $comments = eregi_replace("\n",'!N',$comments); @@ -1948,6 +1977,18 @@ else $rslt=mysql_query($stmt, $link); } + if ($LogouTKicKAlL > 0) + { + $local_DEF = 'Local/5555'; + $local_AMP = '@'; + $kick_local_channel = "$local_DEF$conf_exten$local_AMP$ext_context"; + $queryCID = "ULGH3458$StarTtime"; + + $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$queryCID','Channel: $kick_local_channel','Context: $ext_context','Exten: 8300','Priority: 1','Callerid: $queryCID','','','','$channel','$exten');"; + 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";} @@ -1968,7 +2009,6 @@ else ############################################# ##### 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); @@ -2000,12 +2040,11 @@ else # $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"; @@ -2023,7 +2062,6 @@ else $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); @@ -2101,6 +2139,7 @@ if ($ACTION == 'updateDISPO') $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) { @@ -2150,7 +2189,6 @@ if ($ACTION == 'updateDISPO') ############################################# ##### 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); @@ -2175,7 +2213,6 @@ if ($ACTION == 'updateDISPO') $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); @@ -2204,7 +2241,6 @@ if ($ACTION == 'updateLEAD') { $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); @@ -2220,7 +2256,6 @@ if ($ACTION == 'updateLEAD') $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); @@ -2290,7 +2325,6 @@ if ( ($ACTION == 'VDADpause') || ($ACTION == 'VDADready') ) ############################################# ##### 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); @@ -2317,7 +2351,6 @@ if ( ($ACTION == 'VDADpause') || ($ACTION == 'VDADready') ) $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); @@ -2424,7 +2457,6 @@ if ($ACTION == 'PauseCodeSubmit') ############################################# ##### 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); @@ -2455,7 +2487,6 @@ if ($ACTION == 'PauseCodeSubmit') $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); diff --git a/agc_2-X/branches/agc_2.0.4/LANG_www/agc_en/vicidial.php b/agc_2-X/branches/agc_2.0.4/LANG_www/agc_en/vicidial.php index 21a2c4e6..fecd03d5 100644 --- a/agc_2-X/branches/agc_2.0.4/LANG_www/agc_en/vicidial.php +++ b/agc_2-X/branches/agc_2.0.4/LANG_www/agc_en/vicidial.php @@ -1,7 +1,7 @@ LICENSE: GPLv2 +# Copyright (C) 2008 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 @@ -171,10 +171,13 @@ # 71125-1751 - Changed Transfer section to allow for selection of in-groups to send calls to # 71127-0408 - Added height and width settings for easier modification of screen size # 71129-2025 - restricted callbacks count and list to campaign only +# 71226-1117 - added option to kick all calls from conference upon logout +# 80330-0823 - Added new AST_blind monitoring ability and minor cleanup for release +# 80402-0121 - Fixes for Manual Dial hangups and transfers # -$version = '2.0.4-142'; -$build = '71129-2025'; +$version = '2.0.4-145'; +$build = '80402-0121'; require("dbconnect.php"); @@ -207,6 +210,11 @@ if (isset($_GET["relogin"])) {$relogin=$_GET["relogin"];} $VD_campaign = strtoupper($VD_campaign); $VD_campaign = eregi_replace(" ",'',$VD_campaign); } + if (!isset($flag_channels)) + { + $flag_channels=0; + $flag_string=''; + } ### security strip all non-alphanumeric characters out of the variables ### $DB=ereg_replace("[^0-9a-z]","",$DB); @@ -237,6 +245,22 @@ $CIDdate = date("ymdHis"); $random = (rand(1000000, 9999999) + 10000000); +############################################# +##### START SYSTEM_SETTINGS LOOKUP ##### +$stmt = "SELECT use_non_latin FROM system_settings;"; +$rslt=mysql_query($stmt, $link); +if ($DB) {echo "$stmt\n";} +$qm_conf_ct = mysql_num_rows($rslt); +$i=0; +while ($i < $qm_conf_ct) + { + $row=mysql_fetch_row($rslt); + $non_latin = $row[0]; + $i++; + } +##### END SETTINGS LOOKUP ##### +########################################### + $conf_silent_prefix = '7'; # vicidial_conferences prefix to enter silently $HKuser_level = '5'; # minimum vicidial user_level for HotKeys $campaign_login_list = '1'; # show drop-down list of campaigns at login @@ -256,6 +280,7 @@ $volumecontrol_active = '1'; # set to 1 to allow agents to alter volume of chann $PreseT_DiaL_LinKs = '1'; # set to 1 to show a DIAL link for Dial Presets $LogiNAJAX = '1'; # set to 1 to do lookups $HidEMonitoRSessionS = '1'; # set to 1 to hide remote monitoring channels from "session calls" +$LogouTKicKAlL = '1'; # set to 1 to hangup all calls in session upon agent logout $TEST_all_statuses = '0'; # TEST variable allows all statuses in dispo screen @@ -328,13 +353,12 @@ $LOGallowed_campaignsSQL=''; if ($relogin == 'YES') { $stmt="SELECT user_group from vicidial_users where user='$VD_login' and pass='$VD_pass'"; - if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $VU_user_group=$row[0]; $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); if ( (!eregi("ALL-CAMPAIGNS",$row[0])) ) @@ -509,7 +533,6 @@ echo ""; + 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; @@ -2558,6 +2557,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} // Covers the following types: XFER, VMAIL, ENTRY, CONF, PARK, FROMPARK, XfeRLOCAL, XfeRINTERNAL, XfeRBLIND, VfeRVMAIL function mainxfer_send_redirect(taskvar,taskxferconf,taskserverip,taskdebugnote) { + if (auto_dial_level == 0) {RedirecTxFEr = 1;} var xmlhttp=false; /*@cc_on @*/ /*@if (@_jscript_version >= 5) @@ -2630,7 +2630,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} } else { - xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=RedirectVD&format=text&channel=" + redirectvalue + "&call_server_ip=" + redirectserverip + "&queryCID=" + queryCID + "&exten=" + blindxferdialstring + "&ext_context=" + ext_context + "&ext_priority=1&auto_dial_level=" + auto_dial_level + "&campaign=" + campaign + "&uniqueid=" + document.vicidial_form.uniqueid.value + "&lead_id=" + document.vicidial_form.lead_id.value + "&secondS=" + VD_live_call_secondS; + xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=RedirectVD&format=text&channel=" + redirectvalue + "&call_server_ip=" + redirectserverip + "&queryCID=" + queryCID + "&exten=" + blindxferdialstring + "&ext_context=" + ext_context + "&ext_priority=1&auto_dial_level=" + auto_dial_level + "&campaign=" + campaign + "&uniqueid=" + document.vicidial_form.uniqueid.value + "&lead_id=" + document.vicidial_form.lead_id.value + "&secondS=" + VD_live_call_secondS + "&session_id=" + session_id; } } if (taskvar == 'XfeRINTERNAL') @@ -2649,25 +2649,25 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} // "90009*$group**$lead_id**$phone_number*$user*"; var redirectdestination = closerxferinternal + '90009*' + XfeRSelecT.value + '**' + document.vicidial_form.lead_id.value + '**' + document.vicidial_form.phone_number.value + '*' + user + '*'; - xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=RedirectVD&format=text&channel=" + redirectvalue + "&call_server_ip=" + redirectserverip + "&queryCID=" + queryCID + "&exten=" + redirectdestination + "&ext_context=" + ext_context + "&ext_priority=1&auto_dial_level=" + auto_dial_level + "&campaign=" + campaign + "&uniqueid=" + document.vicidial_form.uniqueid.value + "&lead_id=" + document.vicidial_form.lead_id.value + "&secondS=" + VD_live_call_secondS; + xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=RedirectVD&format=text&channel=" + redirectvalue + "&call_server_ip=" + redirectserverip + "&queryCID=" + queryCID + "&exten=" + redirectdestination + "&ext_context=" + ext_context + "&ext_priority=1&auto_dial_level=" + auto_dial_level + "&campaign=" + campaign + "&uniqueid=" + document.vicidial_form.uniqueid.value + "&lead_id=" + document.vicidial_form.lead_id.value + "&secondS=" + VD_live_call_secondS + "&session_id=" + session_id; } if (taskvar == 'XfeR') { var queryCID = "LRvdcW" + epoch_sec + user_abb; var redirectdestination = document.vicidial_form.extension_xfer.value; - xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=RedirectName&format=text&channel=" + redirectvalue + "&call_server_ip=" + redirectserverip + "&queryCID=" + queryCID + "&extenName=" + redirectdestination + "&ext_context=" + ext_context + "&ext_priority=1"; + xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=RedirectName&format=text&channel=" + redirectvalue + "&call_server_ip=" + redirectserverip + "&queryCID=" + queryCID + "&extenName=" + redirectdestination + "&ext_context=" + ext_context + "&ext_priority=1" + "&session_id=" + session_id; } if (taskvar == 'VMAIL') { var queryCID = "LVvdcW" + epoch_sec + user_abb; var redirectdestination = document.vicidial_form.extension_xfer.value; - xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=RedirectNameVmail&format=text&channel=" + redirectvalue + "&call_server_ip=" + redirectserverip + "&queryCID=" + queryCID + "&exten=" + voicemail_dump_exten + "&extenName=" + redirectdestination + "&ext_context=" + ext_context + "&ext_priority=1"; + xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=RedirectNameVmail&format=text&channel=" + redirectvalue + "&call_server_ip=" + redirectserverip + "&queryCID=" + queryCID + "&exten=" + voicemail_dump_exten + "&extenName=" + redirectdestination + "&ext_context=" + ext_context + "&ext_priority=1" + "&session_id=" + session_id; } if (taskvar == 'ENTRY') { var queryCID = "LEvdcW" + epoch_sec + user_abb; var redirectdestination = document.vicidial_form.extension_xfer_entry.value; - xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=Redirect&format=text&channel=" + redirectvalue + "&call_server_ip=" + redirectserverip + "&queryCID=" + queryCID + "&exten=" + redirectdestination + "&ext_context=" + ext_context + "&ext_priority=1"; + xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=Redirect&format=text&channel=" + redirectvalue + "&call_server_ip=" + redirectserverip + "&queryCID=" + queryCID + "&exten=" + redirectdestination + "&ext_context=" + ext_context + "&ext_priority=1" + "&session_id=" + session_id; } if (taskvar == '3WAY') { @@ -2689,7 +2689,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} DispO3wayCalLxfernumber = document.vicidial_form.xfernumber.value; DispO3wayCalLcamptail = ''; - 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=" + XfeRSelecT.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=" + XfeRSelecT.value + "&session_id=" + session_id; if (taskdebugnote == 'FIRST') { @@ -2702,7 +2702,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} var redirectdestination = taskxferconf; var redirectdestserverip = taskserverip; var parkedby = protocol + "/" + extension; - xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=RedirectToPark&format=text&channel=" + redirectdestination + "&call_server_ip=" + redirectdestserverip + "&queryCID=" + queryCID + "&exten=" + park_on_extension + "&ext_context=" + ext_context + "&ext_priority=1&extenName=park&parkedby=" + parkedby; + xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=RedirectToPark&format=text&channel=" + redirectdestination + "&call_server_ip=" + redirectdestserverip + "&queryCID=" + queryCID + "&exten=" + park_on_extension + "&ext_context=" + ext_context + "&ext_priority=1&extenName=park&parkedby=" + parkedby + "&session_id=" + session_id; document.getElementById("ParkControl").innerHTML ="\"Grab"; customerparked=1; @@ -2723,7 +2723,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} {var dest_dialstring = session_id;} } - xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=RedirectFromPark&format=text&channel=" + redirectdestination + "&call_server_ip=" + redirectdestserverip + "&queryCID=" + queryCID + "&exten=" + dest_dialstring + "&ext_context=" + ext_context + "&ext_priority=1"; + xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=RedirectFromPark&format=text&channel=" + redirectdestination + "&call_server_ip=" + redirectdestserverip + "&queryCID=" + queryCID + "&exten=" + dest_dialstring + "&ext_context=" + ext_context + "&ext_priority=1" + "&session_id=" + session_id; document.getElementById("ParkControl").innerHTML ="\"Park"; customerparked=0; @@ -2744,11 +2744,55 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} } delete xmlhttp; } + + // used to send second Redirect for manual dial calls + if (auto_dial_level == 0) + { + RedirecTxFEr = 1; + 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) + { + xmlhttp.open('POST', 'manager_send.php'); + xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8'); + xmlhttp.send(xferredirect_query + "&stage=2NDXfeR"); + xmlhttp.onreadystatechange = function() + { + if (xmlhttp.readyState == 4 && xmlhttp.status == 200) + { + Nactiveext = null; + Nactiveext = xmlhttp.responseText; + // alert(RedirecTxFEr + "|" + xmlhttp.responseText); + } + } + delete xmlhttp; + } + } + if ( (taskvar == 'XfeRLOCAL') || (taskvar == 'XfeRBLIND') || (taskvar == 'XfeRVMAIL') ) { + if (auto_dial_level == 0) {RedirecTxFEr = 1;} document.vicidial_form.callchannel.value = ''; document.vicidial_form.callserverip.value = ''; if( document.images ) { document.images['livecall'].src = image_livecall_OFF.src;} + // alert(RedirecTxFEr + "|" + auto_dial_level); dialedcall_send_hangup(); } @@ -2859,6 +2903,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} } delete xmlhttp; } + RedirecTxFEr=0; } @@ -4267,7 +4312,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} AgainCalLSecondS = VD_live_call_secondS; AgaiNCalLCID = CalLCID; var process_post_hangup=0; - if (MD_channel_look==1) + if ( (RedirecTxFEr < 1) && ( (MD_channel_look==1) || (auto_dial_level == 0) ) ) { MD_channel_look=0; DialTimeHangup(); @@ -4552,6 +4597,9 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} // Send Hangup command for any Local call that is not in the quiet(7) entry - used to stop manual dials even if no connect function DialTimeHangup() { + if (RedirecTxFEr < 1) + { + // alert("RedirecTxFEr|" + RedirecTxFEr); MD_channel_look=0; var xmlhttp=false; /*@cc_on @*/ @@ -4590,6 +4638,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} } delete xmlhttp; } + } } @@ -5238,7 +5287,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 + "&agent_log_id=" + agent_log_id + "&no_delete_sessions=" + no_delete_sessions + "&phone_ip=" + phone_ip + "&enable_sipsak_messages=" + enable_sipsak_messages; + 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 + "&LogouTKicKAlL=" + LogouTKicKAlL + "&ext_context=" + ext_context; xmlhttp.open('POST', 'vdc_db_query.php'); xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8'); xmlhttp.send(VDlogout_query); @@ -5246,7 +5295,8 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} { if (xmlhttp.readyState == 4 && xmlhttp.status == 200) { - // alert(xmlhttp.responseText); + // alert(VDlogout_query); + // alert(xmlhttp.responseText); } } delete xmlhttp; @@ -5388,10 +5438,14 @@ else var encoded = encodedvar; decoded = ''; var i = 0; - var RGnl = new RegExp("\n","g"); + var RGnl = new RegExp("[\r]\n","g"); var RGplus = new RegExp(" ","g"); var RGiframe = new RegExp("iframe","gi"); +var xtest; +xtest=unescape(encoded); +encoded=utf8_decode(xtest); + if (scriptformat == 'YES') { var SCvendor_lead_code = document.vicidial_form.vendor_lead_code.value; @@ -5563,30 +5617,64 @@ else encoded = encoded.replace(RGSIPexten, SCSIPexten); encoded = encoded.replace(RGsession_id, SCsession_id); } - while (i < encoded.length) { - var ch = encoded.charAt(i); - if (ch == "%") { - if (i < (encoded.length-2) - && HEXCHAR.indexOf(encoded.charAt(i+1)) != -1 - && HEXCHAR.indexOf(encoded.charAt(i+2)) != -1 ) { - decoded += unescape( encoded.substr(i,3) ); - i += 3; - } else { - alert( 'Bad escape combo near ...' + encoded.substr(i) ); - decoded += "%[ERR]"; - i++; - } - } else { - decoded += ch; - i++; - } - } // while - decoded = decoded.replace(RGnl, "
"); - +decoded=encoded; // simple no ? +decoded = decoded.replace(RGnl, "
"); +// while (i < encoded.length) { +// var ch = encoded.charAt(i); +// if (ch == "%") { +// if (i < (encoded.length-2) +// && HEXCHAR.indexOf(encoded.charAt(i+1)) != -1 +// && HEXCHAR.indexOf(encoded.charAt(i+2)) != -1 ) { +// decoded += unescape( encoded.substr(i,3) ); +// i += 3; +// } else { +// alert( 'Bad escape combo near ...' + encoded.substr(i) ); +// decoded += "%[ERR]"; +// i++; +// } +// } else { +// decoded += ch; +// i++; +// } +// } // while +// decoded = decoded.replace(RGnl, "
"); +// return false; }; +// ################################################################################ +// Taken form php.net Angelos +function utf8_decode(utftext) { + var string = ""; + var i = 0; + var c = c1 = c2 = 0; + + while ( i < utftext.length ) { + + c = utftext.charCodeAt(i); + + if (c < 128) { + string += String.fromCharCode(c); + i++; + } + else if((c > 191) && (c < 224)) { + c2 = utftext.charCodeAt(i+1); + string += String.fromCharCode(((c & 31) << 6) | (c2 & 63)); + i += 2; + } + else { + c2 = utftext.charCodeAt(i+1); + c3 = utftext.charCodeAt(i+2); + string += String.fromCharCode(((c & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63)); + i += 3; + } + + } + + return string; + }; + // ################################################################################ // Move the Dispo frame out of the way and change the link to maximize @@ -6304,14 +6392,15 @@ else .body_small {font-size: 11px; font-family: sans-serif;} .body_tiny {font-size: 10px; font-family: sans-serif;} .log_text {font-size: 11px; font-family: monospace;} + .log_text_red {font-size: 11px; font-family: monospace; font-weight: bold; background: #FF3333} .log_title {font-size: 12px; font-family: monospace; font-weight: bold;} .sd_text {font-size: 16px; font-family: sans-serif; font-weight: bold;} .sh_text {font-size: 14px; font-family: sans-serif; font-weight: bold;} .sb_text {font-size: 12px; font-family: sans-serif;} .sk_text {font-size: 11px; font-family: sans-serif;} .skb_text {font-size: 13px; font-family: sans-serif; font-weight: bold;} - .ON_conf {font-size: 11px; font-family: monospace; color: black ; background: #FFFF99} - .OFF_conf {font-size: 11px; font-family: monospace; color: black ; background: #FFCC77} + .ON_conf {font-size: 11px; font-family: monospace; color: black; background: #FFFF99} + .OFF_conf {font-size: 11px; font-family: monospace; color: black; background: #FFCC77} .cust_form {font-family: sans-serif; font-size: 10px; overflow: auto} --> @@ -6604,7 +6693,17 @@ Your Status:
Calls Dialing: + + + + + + + + + +   - + diff --git a/agc_2-X/branches/agc_2.0.4/LANG_www/agc_es/conf_exten_check.php b/agc_2-X/branches/agc_2.0.4/LANG_www/agc_es/conf_exten_check.php index e7fdc4ad..ff227722 100644 --- a/agc_2-X/branches/agc_2.0.4/LANG_www/agc_es/conf_exten_check.php +++ b/agc_2-X/branches/agc_2.0.4/LANG_www/agc_es/conf_exten_check.php @@ -1,7 +1,7 @@ LICENSE: GPLv2 +# Copyright (C) 2008 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 @@ -35,6 +35,7 @@ # 61128-2255 - Added update for manual dial vicidial_live_agents # 70319-1542 - Added agent disabled display function # 71122-0205 - Added vicidial_live_agent status output +# 80424-0442 - Added non_latin lookup from system_settings # require("dbconnect.php"); @@ -63,8 +64,28 @@ if (isset($_GET["auto_dial_level"])) {$auto_dial_level=$_GET["auto_dial_level" if (isset($_GET["campagentstdisp"])) {$campagentstdisp=$_GET["campagentstdisp"];} elseif (isset($_POST["campagentstdisp"])) {$campagentstdisp=$_POST["campagentstdisp"];} + +############################################# +##### START SYSTEM_SETTINGS LOOKUP ##### +$stmt = "SELECT use_non_latin FROM system_settings;"; +$rslt=mysql_query($stmt, $link); +if ($DB) {echo "$stmt\n";} +$qm_conf_ct = mysql_num_rows($rslt); +$i=0; +while ($i < $qm_conf_ct) + { + $row=mysql_fetch_row($rslt); + $non_latin = $row[0]; + $i++; + } +##### END SETTINGS LOOKUP ##### +########################################### + +if ($non_latin < 1) +{ $user=ereg_replace("[^0-9a-zA-Z]","",$user); $pass=ereg_replace("[^0-9a-zA-Z]","",$pass); +} # default optional vars if not set if (!isset($format)) {$format="text";} @@ -81,11 +102,12 @@ if (!isset($query_date)) {$query_date = $NOW_DATE;} $random = (rand(1000000, 9999999) + 10000000); - $stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; +$stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$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]; if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) { diff --git a/agc_2-X/branches/agc_2.0.4/LANG_www/agc_es/manager_send.php b/agc_2-X/branches/agc_2.0.4/LANG_www/agc_es/manager_send.php index e56b8680..53ee5dbb 100644 --- a/agc_2-X/branches/agc_2.0.4/LANG_www/agc_es/manager_send.php +++ b/agc_2-X/branches/agc_2.0.4/LANG_www/agc_es/manager_send.php @@ -1,7 +1,7 @@ LICENSE: GPLv2 +# Copyright (C) 2008 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 @@ -32,8 +32,8 @@ # - $agent_log_id - ('123456',...) # - $call_server_ip - ('10.10.10.15',...) # - $CalLCID - ('VD01234567890123456',...) -# - $stage - ('UP','DOWN') -# +# - $stage - ('UP','DOWN','2NDXfeR') +# - $session_id - ('8600051') # CHANGELOG: # 50401-1002 - First build of script, Hangup function only @@ -68,8 +68,14 @@ # 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 +# 80331-1433 - Added second transfer try for VICIDIAL transfers on manual dial calls +# 80402-0121 - Fixes for manual dial transfers on some systems +# 80424-0442 - Added non_latin lookup from system_settings # +$version = '2.0.4-31'; +$build = '80424-0442'; + require("dbconnect.php"); ### These are variable assignments for PHP globals off @@ -137,28 +143,48 @@ if (isset($_GET["enable_sipsak_messages"])) {$enable_sipsak_messages=$_GET["e 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["session_id"])) {$session_id=$_GET["session_id"];} + elseif (isset($_POST["session_id"])) {$session_id=$_POST["session_id"];} +############################################# +##### START SYSTEM_SETTINGS LOOKUP ##### +$stmt = "SELECT use_non_latin FROM system_settings;"; +$rslt=mysql_query($stmt, $link); +if ($DB) {echo "$stmt\n";} +$qm_conf_ct = mysql_num_rows($rslt); +$i=0; +while ($i < $qm_conf_ct) + { + $row=mysql_fetch_row($rslt); + $non_latin = $row[0]; + $i++; + } +##### END SETTINGS LOOKUP ##### +########################################### + +if ($non_latin < 1) +{ $user=ereg_replace("[^0-9a-zA-Z]","",$user); $pass=ereg_replace("[^0-9a-zA-Z]","",$pass); $secondS = ereg_replace("[^0-9]","",$secondS); +} # default optional vars if not set if (!isset($ACTION)) {$ACTION="Originate";} if (!isset($format)) {$format="alert";} if (!isset($ext_priority)) {$ext_priority="1";} -$version = '2.0.29'; -$build = '70320-1502'; $StarTtime = date("U"); $NOW_DATE = date("Y-m-d"); $NOW_TIME = date("Y-m-d H:i:s"); if (!isset($query_date)) {$query_date = $NOW_DATE;} - $stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; +$stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$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]; if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) { @@ -878,6 +904,29 @@ if ($ACTION=="RedirectXtra") if ($ACTION=="Redirect") { + ### for manual dial VICIDIAL calls send the second attempt to transfer the call + if ($stage=="2NDXfeR") + { + $local_DEF = 'Local/'; + $local_AMP = '@'; + $hangup_channel_prefix = "$local_DEF$session_id$local_AMP$ext_context"; + + $stmt="SELECT count(*) FROM live_sip_channels where server_ip = '$server_ip' and channel LIKE \"$hangup_channel_prefix%\";"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + if ($row > 0) + { + $stmt="SELECT channel FROM live_sip_channels where server_ip = '$server_ip' and channel LIKE \"$hangup_channel_prefix%\";"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + $rowx=mysql_fetch_row($rslt); + $channel=$rowx[0]; + $channel = eregi_replace("1$","2",$channel); + $queryCID = eregi_replace("^.","Q",$queryCID); + } + } + $row=''; $rowx=''; $channel_live=1; if ( (strlen($channel)<3) or (strlen($queryCID)<15) or (strlen($exten)<1) or (strlen($ext_context)<1) or (strlen($ext_priority)<1) ) diff --git a/agc_2-X/branches/agc_2.0.4/LANG_www/agc_es/vdc_db_query.php b/agc_2-X/branches/agc_2.0.4/LANG_www/agc_es/vdc_db_query.php index a0cba6aa..bf76b9b6 100644 --- a/agc_2-X/branches/agc_2.0.4/LANG_www/agc_es/vdc_db_query.php +++ b/agc_2-X/branches/agc_2.0.4/LANG_www/agc_es/vdc_db_query.php @@ -1,7 +1,7 @@ LICENSE: GPLv2 +# Copyright (C) 2008 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 @@ -69,6 +69,7 @@ # - $use_internal_dnc - ('Y','N') # - $omit_phone_code - ('Y','N') # - $no_delete_sessions - ('0','1') +# - $LogouTKicKAlL - ('0','1'); # CHANGELOG: # 50629-1044 - First build of script @@ -138,10 +139,14 @@ # 71120-1520 - added LogiNCamPaigns to show only allowed campaigns for agents upon login # 71125-1751 - Added inbound-group default inbound group sending to vicidial.php # 71129-2025 - restricted callbacks count and list to campaign only +# 71226-1117 - added option to kick all calls from conference upon logout +# 80128-1159 - fixed vicidial_log bugs +# 80402-0121 - Fixes for manual dial transfers on some systems, removed /n persist flag +# 80424-0442 - Added non_latin lookup from system_settings # -$version = '2.0.4-65'; -$build = '71129-2025'; +$version = '2.0.4-69'; +$build = '80424-0442'; require("dbconnect.php"); @@ -274,14 +279,38 @@ if (isset($_GET["enable_sipsak_messages"])) {$enable_sipsak_messages=$_GET["e elseif (isset($_POST["enable_sipsak_messages"])) {$enable_sipsak_messages=$_POST["enable_sipsak_messages"];} if (isset($_GET["status"])) {$status=$_GET["status"];} elseif (isset($_POST["status"])) {$status=$_POST["status"];} +if (isset($_GET["LogouTKicKAlL"])) {$LogouTKicKAlL=$_GET["LogouTKicKAlL"];} + elseif (isset($_POST["LogouTKicKAlL"])) {$LogouTKicKAlL=$_POST["LogouTKicKAlL"];} +header ("Content-type: text/html; charset=utf-8"); +header ("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1 +header ("Pragma: no-cache"); // HTTP/1.0 + +############################################# +##### START SYSTEM_SETTINGS LOOKUP ##### +$stmt = "SELECT use_non_latin FROM system_settings;"; +$rslt=mysql_query($stmt, $link); +if ($DB) {echo "$stmt\n";} +$qm_conf_ct = mysql_num_rows($rslt); +$i=0; +while ($i < $qm_conf_ct) + { + $row=mysql_fetch_row($rslt); + $non_latin = $row[0]; + $i++; + } +##### END SETTINGS LOOKUP ##### +########################################### + +if ($non_latin < 1) +{ $user=ereg_replace("[^0-9a-zA-Z]","",$user); $pass=ereg_replace("[^0-9a-zA-Z]","",$pass); $length_in_sec = ereg_replace("[^0-9]","",$length_in_sec); $phone_code = ereg_replace("[^0-9]","",$phone_code); $phone_number = ereg_replace("[^0-9]","",$phone_number); - +} # default optional vars if not set if (!isset($format)) {$format="text";} @@ -305,6 +334,7 @@ else { $stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$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]; @@ -381,7 +411,6 @@ if ($ACTION == 'LogiNCamPaigns') $LOGallowed_campaignsSQL=''; $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); if ( (!eregi("ALL-CAMPAIGNS",$row[0])) ) @@ -392,7 +421,6 @@ if ($ACTION == 'LogiNCamPaigns') } $stmt="SELECT campaign_id,campaign_name from vicidial_campaigns where active='Y' $LOGallowed_campaignsSQL order by campaign_id"; - if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); $camps_to_print = mysql_num_rows($rslt); @@ -713,7 +741,8 @@ if ($ACTION == 'manDiaLnextCaLL') $local_AMP = '@'; $Local_out_prefix = '9'; $Local_dial_timeout = '60'; - $Local_persist = '/n'; + # $Local_persist = '/n'; + $Local_persist = ''; if ($dial_timeout > 4) {$Local_dial_timeout = $dial_timeout;} $Local_dial_timeout = ($Local_dial_timeout * 1000); if (strlen($dial_prefix) > 0) {$Local_out_prefix = "$dial_prefix";} @@ -1049,7 +1078,8 @@ if ($stage == "end") if ($format=='debug') {echo "\n";} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); - if ($row[0] > 0) + $check_inbound = $row[0]; + if ($check_inbound > 0) { ##### look for the start epoch in the vicidial_closer_log table $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;"; @@ -1072,11 +1102,8 @@ if ($stage == "end") { $length_in_sec = 0; } - $stmt = "select count(*) from vicidial_campaigns where campaign_id='$campaign' and campaign_allow_inbound='Y';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ( ($length_in_sec < 1) and ($row[0] > 0) ) + + if ( ($length_in_sec < 1) and ($check_inbound > 0) ) { ##### start epoch in the vicidial_log table, couldn't find one in vicidial_closer_log $stmt="SELECT start_epoch FROM vicidial_log where uniqueid='$uniqueid' and lead_id='$lead_id';"; @@ -1097,21 +1124,25 @@ if ($stage == "end") } else {$length_in_sec = ($StarTtime - $start_epoch);} - $stmt = "select count(*) from vicidial_campaigns where campaign_id='$campaign' and campaign_allow_inbound='Y';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0] > 0) + $closer_logged=0; + if ($check_inbound > 0) { - $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;"; + $four_hours_ago = date("Y-m-d H:i:s", mktime(date("H")-4,date("i"),date("s"),date("m"),date("d"),date("Y"))); + + $stmt = "UPDATE vicidial_closer_log set end_epoch='$StarTtime', length_in_sec='$length_in_sec' where lead_id='$lead_id' and call_date > \"$four_hours_ago\" order by start_epoch desc limit 1;"; if ($DB) {echo "$stmt\n";} $rslt=mysql_query($stmt, $link); + $affected_rows = mysql_affected_rows($link); + if ($affected_rows > 0) + { + $closer_logged=1; + echo "$uniqueid\n$channel\n"; + } } ############################################# ##### 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); @@ -1247,7 +1278,6 @@ if ($stage == "end") { $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); } @@ -1274,7 +1304,6 @@ if ($stage == "end") $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); @@ -1314,7 +1343,6 @@ if ($stage == "end") $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); @@ -1338,7 +1366,6 @@ if ($stage == "end") $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); @@ -1347,19 +1374,22 @@ if ($stage == "end") } } - ##### look for the channel in the UPDATED vicidial_manager record of the call initiation - $stmt="UPDATE vicidial_log set end_epoch='$StarTtime', length_in_sec='$length_in_sec' where uniqueid='$uniqueid' and lead_id='$lead_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); + if ($closer_logged < 1) + { + ##### update the duration and end time in the vicidial_log table + $stmt="UPDATE vicidial_log set end_epoch='$StarTtime', length_in_sec='$length_in_sec' where uniqueid='$uniqueid' and lead_id='$lead_id';"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + $affected_rows = mysql_affected_rows($link); - if ($affected_rows > 0) - { - echo "$uniqueid\n$channel\n"; - } - else - { - echo "REGISTRO NO ENTRADO\n\n"; + if ($affected_rows > 0) + { + echo "$uniqueid\n$channel\n"; + } + else + { + echo "REGISTRO NO ENTRADO\n\n"; + } } } @@ -1642,41 +1672,69 @@ if ($ACTION == 'VDADcheckINCOMING') $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';"; + + + $stmt = "select campaign_id,phone_number,alt_dial,call_type from vicidial_auto_calls where callerid = '$callerid' order by call_time desc limit 1;"; if ($DB) {echo "$stmt\n";} $rslt=mysql_query($stmt, $link); - - $stmt = "select count(*) from vicidial_campaigns where campaign_id='$campaign' and campaign_allow_inbound='Y';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0] > 0) + $VDAC_cid_ct = mysql_num_rows($rslt); + if ($VDAC_cid_ct > 0) { - ### update the vicidial_closer_log user to INCALL - $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;"; + $row=mysql_fetch_row($rslt); + $VDADchannel_group =$row[0]; + $dialed_number =$row[1]; + $dialed_label =$row[2]; + $call_type =$row[3]; + } + else + { + if ($WeBRooTWritablE > 0) + { + $fp = fopen ("./vicidial_debug.txt", "a"); + fwrite ($fp, "$NOW_TIME|INBND|$callerid|$user|$user_group|$list_id|$lead_id|$phone_number|$uniqueid|\n"); + fclose($fp); + } + } + + if ( ($call_type=='OUT') or ($call_type=='OUTBALANCE') ) + { + $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); - $stmt = "select campaign_id,phone_number,alt_dial from vicidial_auto_calls where callerid = '$callerid' order by call_time desc limit 1;"; + $stmt = "select campaign_script,get_call_launch,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number from vicidial_campaigns where campaign_id='$campaign';"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + $VDIG_cid_ct = mysql_num_rows($rslt); + if ($VDIG_cid_ct > 0) + { + $row=mysql_fetch_row($rslt); + $VDCL_campaign_script = $row[0]; + $VDCL_get_call_launch = $row[1]; + $VDCL_xferconf_a_dtmf = $row[2]; + $VDCL_xferconf_a_number = $row[3]; + $VDCL_xferconf_b_dtmf = $row[4]; + $VDCL_xferconf_b_number = $row[5]; + } + echo "|||||$VDCL_campaign_script|$VDCL_get_call_launch|$VDCL_xferconf_a_dtmf|$VDCL_xferconf_a_number|$VDCL_xferconf_b_dtmf|$VDCL_xferconf_b_number|\n|\n"; + + $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); - $VDADchannel_group =$row[0]; - $dialed_number =$row[1]; - $dialed_label =$row[2]; - } - else - { - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./vicidial_debug.txt", "a"); - fwrite ($fp, "$NOW_TIME|INBND|$callerid|$user|$user_group|$list_id|$lead_id|$phone_number|$uniqueid|\n"); - fclose($fp); - } + $dialed_number =$row[0]; + $dialed_label =$row[1]; } + } + else + { + ### update the vicidial_closer_log user to INCALL + $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 count(*) from vicidial_log where lead_id='$lead_id' and uniqueid='$uniqueid';"; if ($DB) {echo "$stmt\n";} @@ -1748,35 +1806,6 @@ if ($ACTION == 'VDADcheckINCOMING') } else {echo '|' . $tsr . "\n";} } - else - { - $stmt = "select campaign_script,get_call_launch,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number from vicidial_campaigns where campaign_id='$campaign';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDIG_cid_ct = mysql_num_rows($rslt); - if ($VDIG_cid_ct > 0) - { - $row=mysql_fetch_row($rslt); - $VDCL_campaign_script = $row[0]; - $VDCL_get_call_launch = $row[1]; - $VDCL_xferconf_a_dtmf = $row[2]; - $VDCL_xferconf_a_number = $row[3]; - $VDCL_xferconf_b_dtmf = $row[4]; - $VDCL_xferconf_b_number = $row[5]; - } - echo "|||||$VDCL_campaign_script|$VDCL_get_call_launch|$VDCL_xferconf_a_dtmf|$VDCL_xferconf_a_number|$VDCL_xferconf_b_dtmf|$VDCL_xferconf_b_number|\n|\n"; - - $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); $comments = eregi_replace("\n",'!N',$comments); @@ -1948,6 +1977,18 @@ else $rslt=mysql_query($stmt, $link); } + if ($LogouTKicKAlL > 0) + { + $local_DEF = 'Local/5555'; + $local_AMP = '@'; + $kick_local_channel = "$local_DEF$conf_exten$local_AMP$ext_context"; + $queryCID = "ULGH3458$StarTtime"; + + $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$queryCID','Channel: $kick_local_channel','Context: $ext_context','Exten: 8300','Priority: 1','Callerid: $queryCID','','','','$channel','$exten');"; + 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";} @@ -1968,7 +2009,6 @@ else ############################################# ##### 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); @@ -2000,12 +2040,11 @@ else # $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"; @@ -2023,7 +2062,6 @@ else $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); @@ -2101,6 +2139,7 @@ if ($ACTION == 'updateDISPO') $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) { @@ -2150,7 +2189,6 @@ if ($ACTION == 'updateDISPO') ############################################# ##### 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); @@ -2175,7 +2213,6 @@ if ($ACTION == 'updateDISPO') $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); @@ -2204,7 +2241,6 @@ if ($ACTION == 'updateLEAD') { $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); @@ -2220,7 +2256,6 @@ if ($ACTION == 'updateLEAD') $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); @@ -2290,7 +2325,6 @@ if ( ($ACTION == 'VDADpause') || ($ACTION == 'VDADready') ) ############################################# ##### 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); @@ -2317,7 +2351,6 @@ if ( ($ACTION == 'VDADpause') || ($ACTION == 'VDADready') ) $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); @@ -2424,7 +2457,6 @@ if ($ACTION == 'PausaCodeSubmit') ############################################# ##### 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); @@ -2455,7 +2487,6 @@ if ($ACTION == 'PausaCodeSubmit') $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); diff --git a/agc_2-X/branches/agc_2.0.4/LANG_www/agc_es/vicidial.php b/agc_2-X/branches/agc_2.0.4/LANG_www/agc_es/vicidial.php index b7272b81..92ffffce 100644 --- a/agc_2-X/branches/agc_2.0.4/LANG_www/agc_es/vicidial.php +++ b/agc_2-X/branches/agc_2.0.4/LANG_www/agc_es/vicidial.php @@ -1,7 +1,7 @@ LICENSE: GPLv2 +# Copyright (C) 2008 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 @@ -171,10 +171,13 @@ # 71125-1751 - Changed Transfer section to allow for selection of in-groups to send calls to # 71127-0408 - Added height and width settings for easier modification of screen size # 71129-2025 - restricted callbacks count and list to campaign only +# 71226-1117 - added option to kick all calls from conference upon logout +# 80330-0823 - Added new AST_blind monitoring ability and minor cleanup for release +# 80402-0121 - Fixes for Manual Dial hangups and transfers # -$version = '2.0.4-142'; -$build = '71129-2025'; +$version = '2.0.4-145'; +$build = '80402-0121'; require("dbconnect.php"); @@ -207,6 +210,11 @@ if (isset($_GET["relogin"])) {$relogin=$_GET["relogin"];} $VD_campaign = strtoupper($VD_campaign); $VD_campaign = eregi_replace(" ",'',$VD_campaign); } + if (!isset($flag_channels)) + { + $flag_channels=0; + $flag_string=''; + } ### security strip all non-alphanumeric characters out of the variables ### $DB=ereg_replace("[^0-9a-z]","",$DB); @@ -237,6 +245,22 @@ $CIDdate = date("ymdHis"); $random = (rand(1000000, 9999999) + 10000000); +############################################# +##### START SYSTEM_SETTINGS LOOKUP ##### +$stmt = "SELECT use_non_latin FROM system_settings;"; +$rslt=mysql_query($stmt, $link); +if ($DB) {echo "$stmt\n";} +$qm_conf_ct = mysql_num_rows($rslt); +$i=0; +while ($i < $qm_conf_ct) + { + $row=mysql_fetch_row($rslt); + $non_latin = $row[0]; + $i++; + } +##### END SETTINGS LOOKUP ##### +########################################### + $conf_silent_prefix = '7'; # vicidial_conferences prefix to enter silently $HKuser_level = '5'; # minimum vicidial user_level for HotKeys $campaign_login_list = '1'; # show drop-down list of campaigns at login @@ -256,6 +280,7 @@ $volumecontrol_active = '1'; # set to 1 to allow agents to alter volume of chann $PreseT_DiaL_LinKs = '1'; # set to 1 to show a DIAL link for Dial Presets $LogiNAJAX = '1'; # set to 1 to do lookups $HidEMonitoRSessionS = '1'; # set to 1 to hide remote monitoring channels from "session calls" +$LogouTKicKAlL = '1'; # set to 1 to hangup all calls in session upon agent logout $TEST_all_statuses = '0'; # TEST variable allows all statuses in dispo screen @@ -328,13 +353,12 @@ $LOGallowed_campaignsSQL=''; if ($relogin == 'YES') { $stmt="SELECT user_group from vicidial_users where user='$VD_login' and pass='$VD_pass'"; - if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $VU_user_group=$row[0]; $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); if ( (!eregi("ALL-CAMPAIGNS",$row[0])) ) @@ -509,7 +533,6 @@ echo ""; + 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; @@ -2558,6 +2557,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} // Covers the following types: XFER, VMAIL, ENTRY, CONF, PARKING, FROMPARKING, XfeRLOCAL, XfeRINTERNAL, XfeRBLIND, VfeRVMAIL function mainxfer_send_redirect(taskvar,taskxferconf,taskserverip,taskdebugnote) { + if (auto_dial_level == 0) {RedirecTxFEr = 1;} var xmlhttp=false; /*@cc_on @*/ /*@if (@_jscript_version >= 5) @@ -2630,7 +2630,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} } else { - xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=RedirectVD&format=text&channel=" + redirectvalue + "&call_server_ip=" + redirectserverip + "&queryCID=" + queryCID + "&exten=" + blindxferdialstring + "&ext_context=" + ext_context + "&ext_priority=1&auto_dial_level=" + auto_dial_level + "&campaign=" + campaign + "&uniqueid=" + document.vicidial_form.uniqueid.value + "&lead_id=" + document.vicidial_form.lead_id.value + "&secondS=" + VD_live_call_secondS; + xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=RedirectVD&format=text&channel=" + redirectvalue + "&call_server_ip=" + redirectserverip + "&queryCID=" + queryCID + "&exten=" + blindxferdialstring + "&ext_context=" + ext_context + "&ext_priority=1&auto_dial_level=" + auto_dial_level + "&campaign=" + campaign + "&uniqueid=" + document.vicidial_form.uniqueid.value + "&lead_id=" + document.vicidial_form.lead_id.value + "&secondS=" + VD_live_call_secondS + "&session_id=" + session_id; } } if (taskvar == 'XfeRINTERNAL') @@ -2649,25 +2649,25 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} // "90009*$group**$lead_id**$phone_number*$user*"; var redirectdestination = closerxferinternal + '90009*' + XfeRSelecT.value + '**' + document.vicidial_form.lead_id.value + '**' + document.vicidial_form.phone_number.value + '*' + user + '*'; - xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=RedirectVD&format=text&channel=" + redirectvalue + "&call_server_ip=" + redirectserverip + "&queryCID=" + queryCID + "&exten=" + redirectdestination + "&ext_context=" + ext_context + "&ext_priority=1&auto_dial_level=" + auto_dial_level + "&campaign=" + campaign + "&uniqueid=" + document.vicidial_form.uniqueid.value + "&lead_id=" + document.vicidial_form.lead_id.value + "&secondS=" + VD_live_call_secondS; + xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=RedirectVD&format=text&channel=" + redirectvalue + "&call_server_ip=" + redirectserverip + "&queryCID=" + queryCID + "&exten=" + redirectdestination + "&ext_context=" + ext_context + "&ext_priority=1&auto_dial_level=" + auto_dial_level + "&campaign=" + campaign + "&uniqueid=" + document.vicidial_form.uniqueid.value + "&lead_id=" + document.vicidial_form.lead_id.value + "&secondS=" + VD_live_call_secondS + "&session_id=" + session_id; } if (taskvar == 'XfeR') { var queryCID = "LRvdcW" + epoch_sec + user_abb; var redirectdestination = document.vicidial_form.extension_xfer.value; - xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=RedirectName&format=text&channel=" + redirectvalue + "&call_server_ip=" + redirectserverip + "&queryCID=" + queryCID + "&extenName=" + redirectdestination + "&ext_context=" + ext_context + "&ext_priority=1"; + xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=RedirectName&format=text&channel=" + redirectvalue + "&call_server_ip=" + redirectserverip + "&queryCID=" + queryCID + "&extenName=" + redirectdestination + "&ext_context=" + ext_context + "&ext_priority=1" + "&session_id=" + session_id; } if (taskvar == 'VMAIL') { var queryCID = "LVvdcW" + epoch_sec + user_abb; var redirectdestination = document.vicidial_form.extension_xfer.value; - xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=RedirectNameVmail&format=text&channel=" + redirectvalue + "&call_server_ip=" + redirectserverip + "&queryCID=" + queryCID + "&exten=" + voicemail_dump_exten + "&extenName=" + redirectdestination + "&ext_context=" + ext_context + "&ext_priority=1"; + xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=RedirectNameVmail&format=text&channel=" + redirectvalue + "&call_server_ip=" + redirectserverip + "&queryCID=" + queryCID + "&exten=" + voicemail_dump_exten + "&extenName=" + redirectdestination + "&ext_context=" + ext_context + "&ext_priority=1" + "&session_id=" + session_id; } if (taskvar == 'ENTRY') { var queryCID = "LEvdcW" + epoch_sec + user_abb; var redirectdestination = document.vicidial_form.extension_xfer_entry.value; - xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=Redirect&format=text&channel=" + redirectvalue + "&call_server_ip=" + redirectserverip + "&queryCID=" + queryCID + "&exten=" + redirectdestination + "&ext_context=" + ext_context + "&ext_priority=1"; + xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=Redirect&format=text&channel=" + redirectvalue + "&call_server_ip=" + redirectserverip + "&queryCID=" + queryCID + "&exten=" + redirectdestination + "&ext_context=" + ext_context + "&ext_priority=1" + "&session_id=" + session_id; } if (taskvar == '3WAY') { @@ -2689,7 +2689,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} DispO3wayCalLxfernumber = document.vicidial_form.xfernumber.value; DispO3wayCalLcamptail = ''; - 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=" + XfeRSelecT.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=" + XfeRSelecT.value + "&session_id=" + session_id; if (taskdebugnote == 'FIRST') { @@ -2702,7 +2702,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} var redirectdestination = taskxferconf; var redirectdestserverip = taskserverip; var parkedby = protocol + "/" + extension; - xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=RedirectToPark&format=text&channel=" + redirectdestination + "&call_server_ip=" + redirectdestserverip + "&queryCID=" + queryCID + "&exten=" + park_on_extension + "&ext_context=" + ext_context + "&ext_priority=1&extenName=park&parkedby=" + parkedby; + xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=RedirectToPark&format=text&channel=" + redirectdestination + "&call_server_ip=" + redirectdestserverip + "&queryCID=" + queryCID + "&exten=" + park_on_extension + "&ext_context=" + ext_context + "&ext_priority=1&extenName=park&parkedby=" + parkedby + "&session_id=" + session_id; document.getElementById("ParkControl").innerHTML ="\"Capturar"; customerparked=1; @@ -2723,7 +2723,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} {var dest_dialstring = session_id;} } - xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=RedirectFromPark&format=text&channel=" + redirectdestination + "&call_server_ip=" + redirectdestserverip + "&queryCID=" + queryCID + "&exten=" + dest_dialstring + "&ext_context=" + ext_context + "&ext_priority=1"; + xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=RedirectFromPark&format=text&channel=" + redirectdestination + "&call_server_ip=" + redirectdestserverip + "&queryCID=" + queryCID + "&exten=" + dest_dialstring + "&ext_context=" + ext_context + "&ext_priority=1" + "&session_id=" + session_id; document.getElementById("ParkControl").innerHTML ="\"Aparcar"; customerparked=0; @@ -2744,11 +2744,55 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} } delete xmlhttp; } + + // used to send second Redirect for manual dial calls + if (auto_dial_level == 0) + { + RedirecTxFEr = 1; + 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) + { + xmlhttp.open('POST', 'manager_send.php'); + xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8'); + xmlhttp.send(xferredirect_query + "&stage=2NDXfeR"); + xmlhttp.onreadystatechange = function() + { + if (xmlhttp.readyState == 4 && xmlhttp.status == 200) + { + Nactiveext = null; + Nactiveext = xmlhttp.responseText; + // alert(RedirecTxFEr + "|" + xmlhttp.responseText); + } + } + delete xmlhttp; + } + } + if ( (taskvar == 'XfeRLOCAL') || (taskvar == 'XfeRBLIND') || (taskvar == 'XfeRVMAIL') ) { + if (auto_dial_level == 0) {RedirecTxFEr = 1;} document.vicidial_form.callchannel.value = ''; document.vicidial_form.callserverip.value = ''; if( document.images ) { document.images['livecall'].src = image_livecall_OFF.src;} + // alert(RedirecTxFEr + "|" + auto_dial_level); dialedcall_send_hangup(); } @@ -2859,6 +2903,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} } delete xmlhttp; } + RedirecTxFEr=0; } @@ -4267,7 +4312,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} AgainCalLSecondS = VD_live_call_secondS; AgaiNCalLCID = CalLCID; var process_post_hangup=0; - if (MD_channel_look==1) + if ( (RedirecTxFEr < 1) && ( (MD_channel_look==1) || (auto_dial_level == 0) ) ) { MD_channel_look=0; DialTimeHangup(); @@ -4552,6 +4597,9 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} // Send Hangup command for any Local call that is not in the quiet(7) entry - used to stop manual dials even if no connect function DialTimeHangup() { + if (RedirecTxFEr < 1) + { + // alert("RedirecTxFEr|" + RedirecTxFEr); MD_channel_look=0; var xmlhttp=false; /*@cc_on @*/ @@ -4590,6 +4638,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} } delete xmlhttp; } + } } @@ -5238,7 +5287,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 + "&agent_log_id=" + agent_log_id + "&no_delete_sessions=" + no_delete_sessions + "&phone_ip=" + phone_ip + "&enable_sipsak_messages=" + enable_sipsak_messages; + 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 + "&LogouTKicKAlL=" + LogouTKicKAlL + "&ext_context=" + ext_context; xmlhttp.open('POST', 'vdc_db_query.php'); xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8'); xmlhttp.send(VDlogout_query); @@ -5246,7 +5295,8 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} { if (xmlhttp.readyState == 4 && xmlhttp.status == 200) { - // alert(xmlhttp.responseText); + // alert(VDlogout_query); + // alert(xmlhttp.responseText); } } delete xmlhttp; @@ -5388,10 +5438,14 @@ else var encoded = encodedvar; decoded = ''; var i = 0; - var RGnl = new RegExp("\n","g"); + var RGnl = new RegExp("[\r]\n","g"); var RGplus = new RegExp(" ","g"); var RGiframe = new RegExp("iframe","gi"); +var xtest; +xtest=unescape(encoded); +encoded=utf8_decode(xtest); + if (scriptformat == 'YES') { var SCvendor_lead_code = document.vicidial_form.vendor_lead_code.value; @@ -5563,30 +5617,64 @@ else encoded = encoded.replace(RGSIPexten, SCSIPexten); encoded = encoded.replace(RGsession_id, SCsession_id); } - while (i < encoded.length) { - var ch = encoded.charAt(i); - if (ch == "%") { - if (i < (encoded.length-2) - && HEXCHAR.indexOf(encoded.charAt(i+1)) != -1 - && HEXCHAR.indexOf(encoded.charAt(i+2)) != -1 ) { - decoded += unescape( encoded.substr(i,3) ); - i += 3; - } else { - alert( 'Bad escape combo near ...' + encoded.substr(i) ); - decoded += "%[ERR]"; - i++; - } - } else { - decoded += ch; - i++; - } - } // while - decoded = decoded.replace(RGnl, "
"); - +decoded=encoded; // simple no ? +decoded = decoded.replace(RGnl, "
"); +// while (i < encoded.length) { +// var ch = encoded.charAt(i); +// if (ch == "%") { +// if (i < (encoded.length-2) +// && HEXCHAR.indexOf(encoded.charAt(i+1)) != -1 +// && HEXCHAR.indexOf(encoded.charAt(i+2)) != -1 ) { +// decoded += unescape( encoded.substr(i,3) ); +// i += 3; +// } else { +// alert( 'Bad escape combo near ...' + encoded.substr(i) ); +// decoded += "%[ERR]"; +// i++; +// } +// } else { +// decoded += ch; +// i++; +// } +// } // while +// decoded = decoded.replace(RGnl, "
"); +// return false; }; +// ################################################################################ +// Taken form php.net Angelos +function utf8_decode(utftext) { + var string = ""; + var i = 0; + var c = c1 = c2 = 0; + + while ( i < utftext.length ) { + + c = utftext.charCodeAt(i); + + if (c < 128) { + string += String.fromCharCode(c); + i++; + } + else if((c > 191) && (c < 224)) { + c2 = utftext.charCodeAt(i+1); + string += String.fromCharCode(((c & 31) << 6) | (c2 & 63)); + i += 2; + } + else { + c2 = utftext.charCodeAt(i+1); + c3 = utftext.charCodeAt(i+2); + string += String.fromCharCode(((c & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63)); + i += 3; + } + + } + + return string; + }; + // ################################################################################ // Move the Dispo frame out of the way and change the link to maximice @@ -6304,14 +6392,15 @@ else .body_small {font-size: 11px; font-family: sans-serif;} .body_tiny {font-size: 10px; font-family: sans-serif;} .log_text {font-size: 11px; font-family: monospace;} + .log_text_red {font-size: 11px; font-family: monospace; font-weight: bold; background: #FF3333} .log_title {font-size: 12px; font-family: monospace; font-weight: bold;} .sd_text {font-size: 16px; font-family: sans-serif; font-weight: bold;} .sh_text {font-size: 14px; font-family: sans-serif; font-weight: bold;} .sb_text {font-size: 12px; font-family: sans-serif;} .sk_text {font-size: 11px; font-family: sans-serif;} .skb_text {font-size: 13px; font-family: sans-serif; font-weight: bold;} - .ON_conf {font-size: 11px; font-family: monospace; color: black ; background: #FFFF99} - .OFF_conf {font-size: 11px; font-family: monospace; color: black ; background: #FFCC77} + .ON_conf {font-size: 11px; font-family: monospace; color: black; background: #FFFF99} + .OFF_conf {font-size: 11px; font-family: monospace; color: black; background: #FFCC77} .cust_form {font-family: sans-serif; font-size: 10px; overflow: auto} --> @@ -6604,7 +6693,17 @@ Su Estado:
Calls Dialing: + + + + + + + + + +   - + diff --git a/agc_2-X/branches/agc_2.0.4/LANG_www/agc_fr/conf_exten_check.php b/agc_2-X/branches/agc_2.0.4/LANG_www/agc_fr/conf_exten_check.php index 415c0e14..e9e8f198 100644 --- a/agc_2-X/branches/agc_2.0.4/LANG_www/agc_fr/conf_exten_check.php +++ b/agc_2-X/branches/agc_2.0.4/LANG_www/agc_fr/conf_exten_check.php @@ -1,7 +1,7 @@ LICENSE: GPLv2 +# Copyright (C) 2008 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 @@ -35,6 +35,7 @@ # 61128-2255 - Added update for manual dial vicidial_live_agents # 70319-1542 - Added agent disabled display function # 71122-0205 - Added vicidial_live_agent status output +# 80424-0442 - Added non_latin lookup from system_settings # require("dbconnect.php"); @@ -63,8 +64,28 @@ if (isset($_GET["auto_dial_level"])) {$auto_dial_level=$_GET["auto_dial_level" if (isset($_GET["campagentstdisp"])) {$campagentstdisp=$_GET["campagentstdisp"];} elseif (isset($_POST["campagentstdisp"])) {$campagentstdisp=$_POST["campagentstdisp"];} + +############################################# +##### START SYSTEM_SETTINGS LOOKUP ##### +$stmt = "SELECT use_non_latin FROM system_settings;"; +$rslt=mysql_query($stmt, $link); +if ($DB) {echo "$stmt\n";} +$qm_conf_ct = mysql_num_rows($rslt); +$i=0; +while ($i < $qm_conf_ct) + { + $row=mysql_fetch_row($rslt); + $non_latin = $row[0]; + $i++; + } +##### END SETTINGS LOOKUP ##### +########################################### + +if ($non_latin < 1) +{ $user=ereg_replace("[^0-9a-zA-Z]","",$user); $pass=ereg_replace("[^0-9a-zA-Z]","",$pass); +} # default optional vars if not set if (!isset($format)) {$format="text";} @@ -81,11 +102,12 @@ if (!isset($query_date)) {$query_date = $NOW_DATE;} $random = (rand(1000000, 9999999) + 10000000); - $stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; +$stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$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]; if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) { diff --git a/agc_2-X/branches/agc_2.0.4/LANG_www/agc_fr/manager_send.php b/agc_2-X/branches/agc_2.0.4/LANG_www/agc_fr/manager_send.php index e0d38628..27c2b508 100644 --- a/agc_2-X/branches/agc_2.0.4/LANG_www/agc_fr/manager_send.php +++ b/agc_2-X/branches/agc_2.0.4/LANG_www/agc_fr/manager_send.php @@ -1,7 +1,7 @@ LICENSE: GPLv2 +# Copyright (C) 2008 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 @@ -32,8 +32,8 @@ # - $agent_log_id - ('123456',...) # - $call_server_ip - ('10.10.10.15',...) # - $CalLCID - ('VD01234567890123456',...) -# - $stage - ('UP','DOWN') -# +# - $stage - ('UP','DOWN','2NDXfeR') +# - $session_id - ('8600051') # CHANGELOG: # 50401-1002 - First build of script, Hangup function only @@ -68,8 +68,14 @@ # 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 +# 80331-1433 - Added second transfer try for VICIDIAL transfers on manual dial calls +# 80402-0121 - Fixes for manual dial transfers on some systems +# 80424-0442 - Added non_latin lookup from system_settings # +$version = '2.0.4-31'; +$build = '80424-0442'; + require("dbconnect.php"); ### These are variable assignments for PHP globals off @@ -137,28 +143,48 @@ if (isset($_GET["enable_sipsak_messages"])) {$enable_sipsak_messages=$_GET["e 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["session_id"])) {$session_id=$_GET["session_id"];} + elseif (isset($_POST["session_id"])) {$session_id=$_POST["session_id"];} +############################################# +##### START SYSTEM_SETTINGS LOOKUP ##### +$stmt = "SELECT use_non_latin FROM system_settings;"; +$rslt=mysql_query($stmt, $link); +if ($DB) {echo "$stmt\n";} +$qm_conf_ct = mysql_num_rows($rslt); +$i=0; +while ($i < $qm_conf_ct) + { + $row=mysql_fetch_row($rslt); + $non_latin = $row[0]; + $i++; + } +##### END SETTINGS LOOKUP ##### +########################################### + +if ($non_latin < 1) +{ $user=ereg_replace("[^0-9a-zA-Z]","",$user); $pass=ereg_replace("[^0-9a-zA-Z]","",$pass); $secondS = ereg_replace("[^0-9]","",$secondS); +} # default optional vars if not set if (!isset($ACTION)) {$ACTION="Originate";} if (!isset($format)) {$format="alert";} if (!isset($ext_priority)) {$ext_priority="1";} -$version = '2.0.29'; -$build = '70320-1502'; $StarTtime = date("U"); $NOW_DATE = date("Y-m-d"); $NOW_TIME = date("Y-m-d H:i:s"); if (!isset($query_date)) {$query_date = $NOW_DATE;} - $stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; +$stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$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]; if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) { @@ -878,6 +904,29 @@ if ($ACTION=="RedirectXtra") if ($ACTION=="Redirect") { + ### for manual dial VICICOMPOSER calls send the second attempt to transfer the call + if ($stage=="2NDXfeR") + { + $local_DEF = 'Local/'; + $local_AMP = '@'; + $hangup_channel_prefix = "$local_DEF$session_id$local_AMP$ext_context"; + + $stmt="SELECT count(*) FROM live_sip_channels where server_ip = '$server_ip' and channel LIKE \"$hangup_channel_prefix%\";"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + if ($row > 0) + { + $stmt="SELECT channel FROM live_sip_channels where server_ip = '$server_ip' and channel LIKE \"$hangup_channel_prefix%\";"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + $rowx=mysql_fetch_row($rslt); + $channel=$rowx[0]; + $channel = eregi_replace("1$","2",$channel); + $queryCID = eregi_replace("^.","Q",$queryCID); + } + } + $row=''; $rowx=''; $channel_live=1; if ( (strlen($channel)<3) or (strlen($queryCID)<15) or (strlen($exten)<1) or (strlen($ext_context)<1) or (strlen($ext_priority)<1) ) diff --git a/agc_2-X/branches/agc_2.0.4/LANG_www/agc_fr/vdc_db_query.php b/agc_2-X/branches/agc_2.0.4/LANG_www/agc_fr/vdc_db_query.php index b9b7f19f..e54939e0 100644 --- a/agc_2-X/branches/agc_2.0.4/LANG_www/agc_fr/vdc_db_query.php +++ b/agc_2-X/branches/agc_2.0.4/LANG_www/agc_fr/vdc_db_query.php @@ -1,7 +1,7 @@ LICENSE: GPLv2 +# Copyright (C) 2008 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 @@ -69,6 +69,7 @@ # - $use_internal_dnc - ('Y','N') # - $omit_phone_code - ('Y','N') # - $no_delete_sessions - ('0','1') +# - $LogouTKicKAlL - ('0','1'); # CHANGELOG: # 50629-1044 - First build of script @@ -138,10 +139,14 @@ # 71120-1520 - added LogiNCamPaigns to show only allowed campaigns for agents upon login # 71125-1751 - Added inbound-group default inbound group sending to vicidial.php # 71129-2025 - restricted callbacks count and list to campaign only +# 71226-1117 - added option to kick all calls from conference upon logout +# 80128-1159 - fixed vicidial_log bugs +# 80402-0121 - Fixes for manual dial transfers on some systems, removed /n persist flag +# 80424-0442 - Added non_latin lookup from system_settings # -$version = '2.0.4-65'; -$build = '71129-2025'; +$version = '2.0.4-69'; +$build = '80424-0442'; require("dbconnect.php"); @@ -274,14 +279,38 @@ if (isset($_GET["enable_sipsak_messages"])) {$enable_sipsak_messages=$_GET["e elseif (isset($_POST["enable_sipsak_messages"])) {$enable_sipsak_messages=$_POST["enable_sipsak_messages"];} if (isset($_GET["status"])) {$status=$_GET["status"];} elseif (isset($_POST["status"])) {$status=$_POST["status"];} +if (isset($_GET["LogouTKicKAlL"])) {$LogouTKicKAlL=$_GET["LogouTKicKAlL"];} + elseif (isset($_POST["LogouTKicKAlL"])) {$LogouTKicKAlL=$_POST["LogouTKicKAlL"];} +header ("Content-type: text/html; charset=utf-8"); +header ("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1 +header ("Pragma: no-cache"); // HTTP/1.0 + +############################################# +##### START SYSTEM_SETTINGS LOOKUP ##### +$stmt = "SELECT use_non_latin FROM system_settings;"; +$rslt=mysql_query($stmt, $link); +if ($DB) {echo "$stmt\n";} +$qm_conf_ct = mysql_num_rows($rslt); +$i=0; +while ($i < $qm_conf_ct) + { + $row=mysql_fetch_row($rslt); + $non_latin = $row[0]; + $i++; + } +##### END SETTINGS LOOKUP ##### +########################################### + +if ($non_latin < 1) +{ $user=ereg_replace("[^0-9a-zA-Z]","",$user); $pass=ereg_replace("[^0-9a-zA-Z]","",$pass); $length_in_sec = ereg_replace("[^0-9]","",$length_in_sec); $phone_code = ereg_replace("[^0-9]","",$phone_code); $phone_number = ereg_replace("[^0-9]","",$phone_number); - +} # default optional vars if not set if (!isset($format)) {$format="text";} @@ -305,6 +334,7 @@ else { $stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$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]; @@ -381,7 +411,6 @@ if ($ACTION == 'LogiNCamPaigns') $LOGallowed_campaignsSQL=''; $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); if ( (!eregi("ALL-CAMPAIGNS",$row[0])) ) @@ -392,7 +421,6 @@ if ($ACTION == 'LogiNCamPaigns') } $stmt="SELECT campaign_id,campaign_name from vicidial_campaigns where active='Y' $LOGallowed_campaignsSQL order by campaign_id"; - if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); $camps_to_print = mysql_num_rows($rslt); @@ -713,7 +741,8 @@ if ($ACTION == 'manDiaLnextCaLL') $local_AMP = '@'; $Local_out_prefix = '9'; $Local_dial_timeout = '60'; - $Local_persist = '/n'; + # $Local_persist = '/n'; + $Local_persist = ''; if ($dial_timeout > 4) {$Local_dial_timeout = $dial_timeout;} $Local_dial_timeout = ($Local_dial_timeout * 1000); if (strlen($dial_prefix) > 0) {$Local_out_prefix = "$dial_prefix";} @@ -1049,7 +1078,8 @@ if ($stage == "end") if ($format=='debug') {echo "\n";} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); - if ($row[0] > 0) + $check_inbound = $row[0]; + if ($check_inbound > 0) { ##### look for the start epoch in the vicidial_closer_log table $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;"; @@ -1072,11 +1102,8 @@ if ($stage == "end") { $length_in_sec = 0; } - $stmt = "select count(*) from vicidial_campaigns where campaign_id='$campaign' and campaign_allow_inbound='Y';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ( ($length_in_sec < 1) and ($row[0] > 0) ) + + if ( ($length_in_sec < 1) and ($check_inbound > 0) ) { ##### start epoch in the vicidial_log table, couldn't find one in vicidial_closer_log $stmt="SELECT start_epoch FROM vicidial_log where uniqueid='$uniqueid' and lead_id='$lead_id';"; @@ -1097,21 +1124,25 @@ if ($stage == "end") } else {$length_in_sec = ($StarTtime - $start_epoch);} - $stmt = "select count(*) from vicidial_campaigns where campaign_id='$campaign' and campaign_allow_inbound='Y';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0] > 0) + $closer_logged=0; + if ($check_inbound > 0) { - $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;"; + $four_hours_ago = date("Y-m-d H:i:s", mktime(date("H")-4,date("i"),date("s"),date("m"),date("d"),date("Y"))); + + $stmt = "UPDATE vicidial_closer_log set end_epoch='$StarTtime', length_in_sec='$length_in_sec' where lead_id='$lead_id' and call_date > \"$four_hours_ago\" order by start_epoch desc limit 1;"; if ($DB) {echo "$stmt\n";} $rslt=mysql_query($stmt, $link); + $affected_rows = mysql_affected_rows($link); + if ($affected_rows > 0) + { + $closer_logged=1; + echo "$uniqueid\n$channel\n"; + } } ############################################# ##### 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); @@ -1247,7 +1278,6 @@ if ($stage == "end") { $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); } @@ -1274,7 +1304,6 @@ if ($stage == "end") $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); @@ -1314,7 +1343,6 @@ if ($stage == "end") $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); @@ -1338,7 +1366,6 @@ if ($stage == "end") $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); @@ -1347,19 +1374,22 @@ if ($stage == "end") } } - ##### look for the channel in the UPDATED vicidial_manager record of the call initiation - $stmt="UPDATE vicidial_log set end_epoch='$StarTtime', length_in_sec='$length_in_sec' where uniqueid='$uniqueid' and lead_id='$lead_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); + if ($closer_logged < 1) + { + ##### update the duration and end time in the vicidial_log table + $stmt="UPDATE vicidial_log set end_epoch='$StarTtime', length_in_sec='$length_in_sec' where uniqueid='$uniqueid' and lead_id='$lead_id';"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + $affected_rows = mysql_affected_rows($link); - if ($affected_rows > 0) - { - echo "$uniqueid\n$channel\n"; - } - else - { - echo "NOTATION NON ENTRÉE\n\n"; + if ($affected_rows > 0) + { + echo "$uniqueid\n$channel\n"; + } + else + { + echo "NOTATION NON ENTRÉE\n\n"; + } } } @@ -1642,41 +1672,69 @@ if ($ACTION == 'VDADcheckINCOMING') $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';"; + + + $stmt = "select campaign_id,phone_number,alt_dial,call_type from vicidial_auto_calls where callerid = '$callerid' order by call_time desc limit 1;"; if ($DB) {echo "$stmt\n";} $rslt=mysql_query($stmt, $link); - - $stmt = "select count(*) from vicidial_campaigns where campaign_id='$campaign' and campaign_allow_inbound='Y';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0] > 0) + $VDAC_cid_ct = mysql_num_rows($rslt); + if ($VDAC_cid_ct > 0) { - ### update the vicidial_closer_log user to INCALL - $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;"; + $row=mysql_fetch_row($rslt); + $VDADchannel_group =$row[0]; + $dialed_number =$row[1]; + $dialed_label =$row[2]; + $call_type =$row[3]; + } + else + { + if ($WeBRooTWritablE > 0) + { + $fp = fopen ("./vicidial_debug.txt", "a"); + fwrite ($fp, "$NOW_TIME|INBND|$callerid|$user|$user_group|$list_id|$lead_id|$phone_number|$uniqueid|\n"); + fclose($fp); + } + } + + if ( ($call_type=='OUT') or ($call_type=='OUTBALANCE') ) + { + $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); - $stmt = "select campaign_id,phone_number,alt_dial from vicidial_auto_calls where callerid = '$callerid' order by call_time desc limit 1;"; + $stmt = "select campaign_script,get_call_launch,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number from vicidial_campaigns where campaign_id='$campaign';"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + $VDIG_cid_ct = mysql_num_rows($rslt); + if ($VDIG_cid_ct > 0) + { + $row=mysql_fetch_row($rslt); + $VDCL_campaign_script = $row[0]; + $VDCL_get_call_launch = $row[1]; + $VDCL_xferconf_a_dtmf = $row[2]; + $VDCL_xferconf_a_number = $row[3]; + $VDCL_xferconf_b_dtmf = $row[4]; + $VDCL_xferconf_b_number = $row[5]; + } + echo "|||||$VDCL_campaign_script|$VDCL_get_call_launch|$VDCL_xferconf_a_dtmf|$VDCL_xferconf_a_number|$VDCL_xferconf_b_dtmf|$VDCL_xferconf_b_number|\n|\n"; + + $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); - $VDADchannel_group =$row[0]; - $dialed_number =$row[1]; - $dialed_label =$row[2]; - } - else - { - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./vicidial_debug.txt", "a"); - fwrite ($fp, "$NOW_TIME|INBND|$callerid|$user|$user_group|$list_id|$lead_id|$phone_number|$uniqueid|\n"); - fclose($fp); - } + $dialed_number =$row[0]; + $dialed_label =$row[1]; } + } + else + { + ### update the vicidial_closer_log user to INCALL + $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 count(*) from vicidial_log where lead_id='$lead_id' and uniqueid='$uniqueid';"; if ($DB) {echo "$stmt\n";} @@ -1748,35 +1806,6 @@ if ($ACTION == 'VDADcheckINCOMING') } else {echo '|' . $tsr . "\n";} } - else - { - $stmt = "select campaign_script,get_call_launch,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number from vicidial_campaigns where campaign_id='$campaign';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDIG_cid_ct = mysql_num_rows($rslt); - if ($VDIG_cid_ct > 0) - { - $row=mysql_fetch_row($rslt); - $VDCL_campaign_script = $row[0]; - $VDCL_get_call_launch = $row[1]; - $VDCL_xferconf_a_dtmf = $row[2]; - $VDCL_xferconf_a_number = $row[3]; - $VDCL_xferconf_b_dtmf = $row[4]; - $VDCL_xferconf_b_number = $row[5]; - } - echo "|||||$VDCL_campaign_script|$VDCL_get_call_launch|$VDCL_xferconf_a_dtmf|$VDCL_xferconf_a_number|$VDCL_xferconf_b_dtmf|$VDCL_xferconf_b_number|\n|\n"; - - $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); $comments = eregi_replace("\n",'!N',$comments); @@ -1948,6 +1977,18 @@ else $rslt=mysql_query($stmt, $link); } + if ($LogouTKicKAlL > 0) + { + $local_DEF = 'Local/5555'; + $local_AMP = '@'; + $kick_local_channel = "$local_DEF$conf_exten$local_AMP$ext_context"; + $queryCID = "ULGH3458$StarTtime"; + + $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$queryCID','Channel: $kick_local_channel','Context: $ext_context','Exten: 8300','Priority: 1','Callerid: $queryCID','','','','$channel','$exten');"; + 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";} @@ -1968,7 +2009,6 @@ else ############################################# ##### 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); @@ -2000,12 +2040,11 @@ else # $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"; @@ -2023,7 +2062,6 @@ else $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); @@ -2101,6 +2139,7 @@ if ($ACTION == 'updateDISPO') $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) { @@ -2150,7 +2189,6 @@ if ($ACTION == 'updateDISPO') ############################################# ##### 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); @@ -2175,7 +2213,6 @@ if ($ACTION == 'updateDISPO') $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); @@ -2204,7 +2241,6 @@ if ($ACTION == 'updateLEAD') { $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); @@ -2220,7 +2256,6 @@ if ($ACTION == 'updateLEAD') $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); @@ -2290,7 +2325,6 @@ if ( ($ACTION == 'VDADpause') || ($ACTION == 'VDADready') ) ############################################# ##### 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); @@ -2317,7 +2351,6 @@ if ( ($ACTION == 'VDADpause') || ($ACTION == 'VDADready') ) $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); @@ -2424,7 +2457,6 @@ if ($ACTION == 'PauseCodeSubmit') ############################################# ##### 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); @@ -2455,7 +2487,6 @@ if ($ACTION == 'PauseCodeSubmit') $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); diff --git a/agc_2-X/branches/agc_2.0.4/LANG_www/agc_fr/vicidial.php b/agc_2-X/branches/agc_2.0.4/LANG_www/agc_fr/vicidial.php index 16774d12..dcbb703e 100644 --- a/agc_2-X/branches/agc_2.0.4/LANG_www/agc_fr/vicidial.php +++ b/agc_2-X/branches/agc_2.0.4/LANG_www/agc_fr/vicidial.php @@ -1,7 +1,7 @@ LICENSE: GPLv2 +# Copyright (C) 2008 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 @@ -171,10 +171,13 @@ # 71125-1751 - Changed Transfer section to allow for selection of in-groups to send calls to # 71127-0408 - Added height and width settings for easier modification of screen size # 71129-2025 - restricted callbacks count and list to campaign only +# 71226-1117 - added option to kick all calls from conference upon logout +# 80330-0823 - Added new AST_blind monitoring ability and minor cleanup for release +# 80402-0121 - Fixes for Manual Dial hangups and transfers # -$version = '2.0.4-142'; -$build = '71129-2025'; +$version = '2.0.4-145'; +$build = '80402-0121'; require("dbconnect.php"); @@ -207,6 +210,11 @@ if (isset($_GET["relogin"])) {$relogin=$_GET["relogin"];} $VD_campaign = strtoupper($VD_campaign); $VD_campaign = eregi_replace(" ",'',$VD_campaign); } + if (!isset($flag_channels)) + { + $flag_channels=0; + $flag_string=''; + } ### security strip all non-alphanumeric characters out of the variables ### $DB=ereg_replace("[^0-9a-z]","",$DB); @@ -237,6 +245,22 @@ $CIDdate = date("ymdHis"); $random = (rand(1000000, 9999999) + 10000000); +############################################# +##### START SYSTEM_SETTINGS LOOKUP ##### +$stmt = "SELECT use_non_latin FROM system_settings;"; +$rslt=mysql_query($stmt, $link); +if ($DB) {echo "$stmt\n";} +$qm_conf_ct = mysql_num_rows($rslt); +$i=0; +while ($i < $qm_conf_ct) + { + $row=mysql_fetch_row($rslt); + $non_latin = $row[0]; + $i++; + } +##### END SETTINGS LOOKUP ##### +########################################### + $conf_silent_prefix = '7'; # vicidial_conferences prefix to enter silently $HKuser_level = '5'; # minimum vicidial user_level for HotKeys $campaign_login_list = '1'; # show drop-down list of campaigns at login @@ -256,6 +280,7 @@ $volumecontrol_active = '1'; # set to 1 to allow agents to alter volume of chann $PreseT_DiaL_LinKs = '1'; # set to 1 to show a COMPOSER link for Dial Presets $LogiNAJAX = '1'; # set to 1 to do lookups $HidEMonitoRSessionS = '1'; # set to 1 to hide remote monitoring channels from "session calls" +$LogouTKicKAlL = '1'; # set to 1 to hangup all calls in session upon agent logout $TEST_all_statuses = '0'; # TEST variable allows all statuses in dispo screen @@ -328,13 +353,12 @@ $LOGallowed_campaignsSQL=''; if ($relogin == 'YES') { $stmt="SELECT user_group from vicidial_users where user='$VD_login' and pass='$VD_pass'"; - if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $VU_user_group=$row[0]; $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); if ( (!eregi("ALL-CAMPAIGNS",$row[0])) ) @@ -509,7 +533,6 @@ echo ""; + 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; @@ -2558,6 +2557,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} // 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,taskdebugnote) { + if (auto_dial_level == 0) {RedirecTxFEr = 1;} var xmlhttp=false; /*@cc_on @*/ /*@if (@_jscript_version >= 5) @@ -2630,7 +2630,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} } else { - xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=RedirectVD&format=text&channel=" + redirectvalue + "&call_server_ip=" + redirectserverip + "&queryCID=" + queryCID + "&exten=" + blindxferdialstring + "&ext_context=" + ext_context + "&ext_priority=1&auto_dial_level=" + auto_dial_level + "&campaign=" + campaign + "&uniqueid=" + document.vicidial_form.uniqueid.value + "&lead_id=" + document.vicidial_form.lead_id.value + "&secondS=" + VD_live_call_secondS; + xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=RedirectVD&format=text&channel=" + redirectvalue + "&call_server_ip=" + redirectserverip + "&queryCID=" + queryCID + "&exten=" + blindxferdialstring + "&ext_context=" + ext_context + "&ext_priority=1&auto_dial_level=" + auto_dial_level + "&campaign=" + campaign + "&uniqueid=" + document.vicidial_form.uniqueid.value + "&lead_id=" + document.vicidial_form.lead_id.value + "&secondS=" + VD_live_call_secondS + "&session_id=" + session_id; } } if (taskvar == 'XfeRINTERNAL') @@ -2649,25 +2649,25 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} // "90009*$group**$lead_id**$phone_number*$user*"; var redirectdestination = closerxferinternal + '90009*' + XfeRSelecT.value + '**' + document.vicidial_form.lead_id.value + '**' + document.vicidial_form.phone_number.value + '*' + user + '*'; - xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=RedirectVD&format=text&channel=" + redirectvalue + "&call_server_ip=" + redirectserverip + "&queryCID=" + queryCID + "&exten=" + redirectdestination + "&ext_context=" + ext_context + "&ext_priority=1&auto_dial_level=" + auto_dial_level + "&campaign=" + campaign + "&uniqueid=" + document.vicidial_form.uniqueid.value + "&lead_id=" + document.vicidial_form.lead_id.value + "&secondS=" + VD_live_call_secondS; + xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=RedirectVD&format=text&channel=" + redirectvalue + "&call_server_ip=" + redirectserverip + "&queryCID=" + queryCID + "&exten=" + redirectdestination + "&ext_context=" + ext_context + "&ext_priority=1&auto_dial_level=" + auto_dial_level + "&campaign=" + campaign + "&uniqueid=" + document.vicidial_form.uniqueid.value + "&lead_id=" + document.vicidial_form.lead_id.value + "&secondS=" + VD_live_call_secondS + "&session_id=" + session_id; } if (taskvar == 'XfeR') { var queryCID = "LRvdcW" + epoch_sec + user_abb; var redirectdestination = document.vicidial_form.extension_xfer.value; - xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=RedirectName&format=text&channel=" + redirectvalue + "&call_server_ip=" + redirectserverip + "&queryCID=" + queryCID + "&extenName=" + redirectdestination + "&ext_context=" + ext_context + "&ext_priority=1"; + xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=RedirectName&format=text&channel=" + redirectvalue + "&call_server_ip=" + redirectserverip + "&queryCID=" + queryCID + "&extenName=" + redirectdestination + "&ext_context=" + ext_context + "&ext_priority=1" + "&session_id=" + session_id; } if (taskvar == 'VMAIL') { var queryCID = "LVvdcW" + epoch_sec + user_abb; var redirectdestination = document.vicidial_form.extension_xfer.value; - xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=RedirectNameVmail&format=text&channel=" + redirectvalue + "&call_server_ip=" + redirectserverip + "&queryCID=" + queryCID + "&exten=" + voicemail_dump_exten + "&extenName=" + redirectdestination + "&ext_context=" + ext_context + "&ext_priority=1"; + xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=RedirectNameVmail&format=text&channel=" + redirectvalue + "&call_server_ip=" + redirectserverip + "&queryCID=" + queryCID + "&exten=" + voicemail_dump_exten + "&extenName=" + redirectdestination + "&ext_context=" + ext_context + "&ext_priority=1" + "&session_id=" + session_id; } if (taskvar == 'ENTRY') { var queryCID = "LEvdcW" + epoch_sec + user_abb; var redirectdestination = document.vicidial_form.extension_xfer_entry.value; - xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=Redirect&format=text&channel=" + redirectvalue + "&call_server_ip=" + redirectserverip + "&queryCID=" + queryCID + "&exten=" + redirectdestination + "&ext_context=" + ext_context + "&ext_priority=1"; + xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=Redirect&format=text&channel=" + redirectvalue + "&call_server_ip=" + redirectserverip + "&queryCID=" + queryCID + "&exten=" + redirectdestination + "&ext_context=" + ext_context + "&ext_priority=1" + "&session_id=" + session_id; } if (taskvar == '3WAY') { @@ -2689,7 +2689,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} DispO3wayCalLxfernumber = document.vicidial_form.xfernumber.value; DispO3wayCalLcamptail = ''; - 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=" + XfeRSelecT.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=" + XfeRSelecT.value + "&session_id=" + session_id; if (taskdebugnote == 'FIRST') { @@ -2702,7 +2702,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} var redirectdestination = taskxferconf; var redirectdestserverip = taskserverip; var parkedby = protocol + "/" + extension; - xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=RedirectToPark&format=text&channel=" + redirectdestination + "&call_server_ip=" + redirectdestserverip + "&queryCID=" + queryCID + "&exten=" + park_on_extension + "&ext_context=" + ext_context + "&ext_priority=1&extenName=park&parkedby=" + parkedby; + xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=RedirectToPark&format=text&channel=" + redirectdestination + "&call_server_ip=" + redirectdestserverip + "&queryCID=" + queryCID + "&exten=" + park_on_extension + "&ext_context=" + ext_context + "&ext_priority=1&extenName=park&parkedby=" + parkedby + "&session_id=" + session_id; document.getElementById("ParkControl").innerHTML ="\"Recup."; customerparked=1; @@ -2723,7 +2723,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} {var dest_dialstring = session_id;} } - xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=RedirectFromPark&format=text&channel=" + redirectdestination + "&call_server_ip=" + redirectdestserverip + "&queryCID=" + queryCID + "&exten=" + dest_dialstring + "&ext_context=" + ext_context + "&ext_priority=1"; + xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=RedirectFromPark&format=text&channel=" + redirectdestination + "&call_server_ip=" + redirectdestserverip + "&queryCID=" + queryCID + "&exten=" + dest_dialstring + "&ext_context=" + ext_context + "&ext_priority=1" + "&session_id=" + session_id; document.getElementById("ParkControl").innerHTML ="\"Mettre"; customerparked=0; @@ -2744,11 +2744,55 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} } delete xmlhttp; } + + // used to send second Redirect for manual dial calls + if (auto_dial_level == 0) + { + RedirecTxFEr = 1; + 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) + { + xmlhttp.open('POST', 'manager_send.php'); + xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8'); + xmlhttp.send(xferredirect_query + "&stage=2NDXfeR"); + xmlhttp.onreadystatechange = function() + { + if (xmlhttp.readyState == 4 && xmlhttp.status == 200) + { + Nactiveext = null; + Nactiveext = xmlhttp.responseText; + // alert(RedirecTxFEr + "|" + xmlhttp.responseText); + } + } + delete xmlhttp; + } + } + if ( (taskvar == 'XfeRLOCAL') || (taskvar == 'XfeRBLIND') || (taskvar == 'XfeRVMAIL') ) { + if (auto_dial_level == 0) {RedirecTxFEr = 1;} document.vicidial_form.callchannel.value = ''; document.vicidial_form.callserverip.value = ''; if( document.images ) { document.images['livecall'].src = image_livecall_OFF.src;} + // alert(RedirecTxFEr + "|" + auto_dial_level); dialedcall_send_hangup(); } @@ -2859,6 +2903,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} } delete xmlhttp; } + RedirecTxFEr=0; } @@ -4267,7 +4312,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} AgainCalLSecondS = VD_live_call_secondS; AgaiNCalLCID = CalLCID; var process_post_hangup=0; - if (MD_channel_look==1) + if ( (RedirecTxFEr < 1) && ( (MD_channel_look==1) || (auto_dial_level == 0) ) ) { MD_channel_look=0; DialTimeHangup(); @@ -4552,6 +4597,9 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} // Send Hangup command for any Local call that is not in the quiet(7) entry - used to stop manual dials even if no connect function DialTimeHangup() { + if (RedirecTxFEr < 1) + { + // alert("RedirecTxFEr|" + RedirecTxFEr); MD_channel_look=0; var xmlhttp=false; /*@cc_on @*/ @@ -4590,6 +4638,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} } delete xmlhttp; } + } } @@ -5238,7 +5287,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 + "&agent_log_id=" + agent_log_id + "&no_delete_sessions=" + no_delete_sessions + "&phone_ip=" + phone_ip + "&enable_sipsak_messages=" + enable_sipsak_messages; + 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 + "&LogouTKicKAlL=" + LogouTKicKAlL + "&ext_context=" + ext_context; xmlhttp.open('POST', 'vdc_db_query.php'); xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8'); xmlhttp.send(VDlogout_query); @@ -5246,7 +5295,8 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} { if (xmlhttp.readyState == 4 && xmlhttp.status == 200) { - // alert(xmlhttp.responseText); + // alert(VDlogout_query); + // alert(xmlhttp.responseText); } } delete xmlhttp; @@ -5388,10 +5438,14 @@ else var encoded = encodedvar; decoded = ''; var i = 0; - var RGnl = new RegExp("\n","g"); + var RGnl = new RegExp("[\r]\n","g"); var RGplus = new RegExp(" ","g"); var RGiframe = new RegExp("iframe","gi"); +var xtest; +xtest=unescape(encoded); +encoded=utf8_decode(xtest); + if (scriptformat == 'YES') { var SCvendor_lead_code = document.vicidial_form.vendor_lead_code.value; @@ -5563,30 +5617,64 @@ else encoded = encoded.replace(RGSIPexten, SCSIPexten); encoded = encoded.replace(RGsession_id, SCsession_id); } - while (i < encoded.length) { - var ch = encoded.charAt(i); - if (ch == "%") { - if (i < (encoded.length-2) - && HEXCHAR.indexOf(encoded.charAt(i+1)) != -1 - && HEXCHAR.indexOf(encoded.charAt(i+2)) != -1 ) { - decoded += unescape( encoded.substr(i,3) ); - i += 3; - } else { - alert( 'Bad escape combo near ...' + encoded.substr(i) ); - decoded += "%[ERR]"; - i++; - } - } else { - decoded += ch; - i++; - } - } // while - decoded = decoded.replace(RGnl, "
"); - +decoded=encoded; // simple no ? +decoded = decoded.replace(RGnl, "
"); +// while (i < encoded.length) { +// var ch = encoded.charAt(i); +// if (ch == "%") { +// if (i < (encoded.length-2) +// && HEXCHAR.indexOf(encoded.charAt(i+1)) != -1 +// && HEXCHAR.indexOf(encoded.charAt(i+2)) != -1 ) { +// decoded += unescape( encoded.substr(i,3) ); +// i += 3; +// } else { +// alert( 'Bad escape combo near ...' + encoded.substr(i) ); +// decoded += "%[ERR]"; +// i++; +// } +// } else { +// decoded += ch; +// i++; +// } +// } // while +// decoded = decoded.replace(RGnl, "
"); +// return false; }; +// ################################################################################ +// Taken form php.net Angelos +function utf8_decode(utftext) { + var string = ""; + var i = 0; + var c = c1 = c2 = 0; + + while ( i < utftext.length ) { + + c = utftext.charCodeAt(i); + + if (c < 128) { + string += String.fromCharCode(c); + i++; + } + else if((c > 191) && (c < 224)) { + c2 = utftext.charCodeAt(i+1); + string += String.fromCharCode(((c & 31) << 6) | (c2 & 63)); + i += 2; + } + else { + c2 = utftext.charCodeAt(i+1); + c3 = utftext.charCodeAt(i+2); + string += String.fromCharCode(((c & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63)); + i += 3; + } + + } + + return string; + }; + // ################################################################################ // Move the Dispo frame out of the way and change the link to agrandir @@ -6304,14 +6392,15 @@ else .body_small {font-size: 11px; font-family: sans-serif;} .body_tiny {font-size: 10px; font-family: sans-serif;} .log_text {font-size: 11px; font-family: monospace;} + .log_text_red {font-size: 11px; font-family: monospace; font-weight: bold; background: #FF3333} .log_title {font-size: 12px; font-family: monospace; font-weight: bold;} .sd_text {font-size: 16px; font-family: sans-serif; font-weight: bold;} .sh_text {font-size: 14px; font-family: sans-serif; font-weight: bold;} .sb_text {font-size: 12px; font-family: sans-serif;} .sk_text {font-size: 11px; font-family: sans-serif;} .skb_text {font-size: 13px; font-family: sans-serif; font-weight: bold;} - .ON_conf {font-size: 11px; font-family: monospace; color: black ; background: #FFFF99} - .OFF_conf {font-size: 11px; font-family: monospace; color: black ; background: #FFCC77} + .ON_conf {font-size: 11px; font-family: monospace; color: black; background: #FFFF99} + .OFF_conf {font-size: 11px; font-family: monospace; color: black; background: #FFCC77} .cust_form {font-family: sans-serif; font-size: 10px; overflow: auto} --> @@ -6604,7 +6693,17 @@ Votre Statut:
Calls Dialing: + + + + + + + + + +   - + diff --git a/agc_2-X/branches/agc_2.0.4/LANG_www/agc_it/active_list_refresh.php b/agc_2-X/branches/agc_2.0.4/LANG_www/agc_it/active_list_refresh.php index ba71cd44..f66df010 100644 --- a/agc_2-X/branches/agc_2.0.4/LANG_www/agc_it/active_list_refresh.php +++ b/agc_2-X/branches/agc_2.0.4/LANG_www/agc_it/active_list_refresh.php @@ -125,7 +125,7 @@ if (!isset($query_date)) {$query_date = $NOW_DATE;} if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) { - echo "Non valido Utentename/Parola d`accesso: |$user|$pass|\n"; + echo "Utentename/Password non validi: |$user|$pass|\n"; exit; } else @@ -133,7 +133,7 @@ if (!isset($query_date)) {$query_date = $NOW_DATE;} if( (strlen($server_ip)<6) or (!isset($server_ip)) or ( (strlen($session_name)<12) or (!isset($session_name)) ) ) { - echo "Non valido server_ip: |$server_ip| or Non valido session_name: |$session_name|\n"; + echo "ip del server non valido: |$server_ip| or Nome sessione non valido: |$session_name|\n"; exit; } else @@ -145,7 +145,7 @@ if (!isset($query_date)) {$query_date = $NOW_DATE;} $SNauth=$row[0]; if($SNauth==0) { - echo "Non valido session_name: |$session_name|$server_ip|\n"; + echo "Nome sessione non valido: |$session_name|$server_ip|\n"; exit; } else @@ -159,7 +159,7 @@ if ($format=='table') { echo "\n"; echo "\n"; -echo "\n"; +echo "\n"; echo "Visualizza Lista: "; if ($ADD==1) {echo "Interni Attivi";} if ($ADD==2) {echo "Interni Occupati";} @@ -214,7 +214,7 @@ if ($ADD==1) if ( ($format=='menu') or ($format=='selectlist') ) { echo "<OPTION "; - if ($row[0]=="$selectedext") {echo "SELECTED ";} + if ($row[0]=="$selectedext") {echo "SELEZIONATO ";} echo "VALUE=\"$row[0]\">"; echo "$row[0] - $row[1]"; echo "</OPTION>\n"; @@ -271,7 +271,7 @@ if ($ADD==2) if ( ($format=='menu') or ($format=='selectlist') ) { echo "<OPTION "; - if ($row[0]=="$selectedext") {echo "SELECTED ";} + if ($row[0]=="$selectedext") {echo "SELEZIONATO ";} echo "VALUE=\"$row[0]\">"; echo "$row[0]"; echo "</OPTION>\n"; @@ -327,7 +327,7 @@ if ($ADD==3) if ( ($format=='menu') or ($format=='selectlist') ) { echo "<OPTION "; - if ($row[0]=="$selectedtrunk") {echo "SELECTED ";} + if ($row[0]=="$selectedtrunk") {echo "SELEZIONATO ";} echo "VALUE=\"$row[0]\">"; echo "$row[0] - $row[1]"; echo "</OPTION>\n"; @@ -383,7 +383,7 @@ if ($ADD==4) if ( ($format=='menu') or ($format=='selectlist') ) { echo "<OPTION "; - if ($row[0]=="$selectedlocal") {echo "SELECTED ";} + if ($row[0]=="$selectedlocal") {echo "SELEZIONATO ";} echo "VALUE=\"$row[0]\">"; echo "$row[0] - $row[1]"; echo "</OPTION>\n"; @@ -440,7 +440,7 @@ if ($ADD==5) if ( ($format=='menu') or ($format=='selectlist') ) { echo "<OPTION "; - if ($row[0]=="$selectedext") {echo "SELECTED ";} + if ($row[0]=="$selectedext") {echo "SELEZIONATO ";} echo "VALUE=\"$row[0]\">"; echo "$row[0] - $row[1]"; echo "</OPTION>\n"; diff --git a/agc_2-X/branches/agc_2.0.4/LANG_www/agc_it/astguiclient.php b/agc_2-X/branches/agc_2.0.4/LANG_www/agc_it/astguiclient.php index 94d90a1e..c525d932 100644 --- a/agc_2-X/branches/agc_2.0.4/LANG_www/agc_it/astguiclient.php +++ b/agc_2-X/branches/agc_2.0.4/LANG_www/agc_it/astguiclient.php @@ -105,7 +105,7 @@ if ($force_logout) Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\""); Header("HTTP/1.0 401 Unauthorized"); } - echo "Ora siete non Loggati . Grazie\n"; + echo "Ora non sei collegato. Grazie\n"; exit; } @@ -143,7 +143,7 @@ $agcDIR = eregi_replace('astguiclient.php','',$agcDIR); { header ("Content-type: text/html; charset=utf-8"); - echo "<title>web client astGUIclient: Inizio attività\n"; + echo "web client astGUIclient: Login\n"; echo "\n"; echo "\n"; echo "
PAUSE CODE
"; var loop_ct = 0; while (loop_ct < VD_pause_codes_ct) { @@ -5238,7 +5287,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 + "&agent_log_id=" + agent_log_id + "&no_delete_sessions=" + no_delete_sessions + "&phone_ip=" + phone_ip + "&enable_sipsak_messages=" + enable_sipsak_messages; + 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 + "&LogouTKicKAlL=" + LogouTKicKAlL + "&ext_context=" + ext_context; xmlhttp.open('POST', 'vdc_db_query.php'); xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8'); xmlhttp.send(VDlogout_query); @@ -5246,7 +5295,8 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} { if (xmlhttp.readyState == 4 && xmlhttp.status == 200) { - // alert(xmlhttp.responseText); + // alert(VDlogout_query); + // alert(xmlhttp.responseText); } } delete xmlhttp; @@ -5388,10 +5438,14 @@ else var encoded = encodedvar; decoded = ''; var i = 0; - var RGnl = new RegExp("\n","g"); + var RGnl = new RegExp("[\r]\n","g"); var RGplus = new RegExp(" ","g"); var RGiframe = new RegExp("iframe","gi"); +var xtest; +xtest=unescape(encoded); +encoded=utf8_decode(xtest); + if (scriptformat == 'YES') { var SCvendor_lead_code = document.vicidial_form.vendor_lead_code.value; @@ -5563,30 +5617,64 @@ else encoded = encoded.replace(RGSIPexten, SCSIPexten); encoded = encoded.replace(RGsession_id, SCsession_id); } - while (i < encoded.length) { - var ch = encoded.charAt(i); - if (ch == "%") { - if (i < (encoded.length-2) - && HEXCHAR.indexOf(encoded.charAt(i+1)) != -1 - && HEXCHAR.indexOf(encoded.charAt(i+2)) != -1 ) { - decoded += unescape( encoded.substr(i,3) ); - i += 3; - } else { - alert( 'Bad escape combo near ...' + encoded.substr(i) ); - decoded += "%[ERR]"; - i++; - } - } else { - decoded += ch; - i++; - } - } // while - decoded = decoded.replace(RGnl, "
"); - +decoded=encoded; // simple no ? +decoded = decoded.replace(RGnl, "
"); +// while (i < encoded.length) { +// var ch = encoded.charAt(i); +// if (ch == "%") { +// if (i < (encoded.length-2) +// && HEXCHAR.indexOf(encoded.charAt(i+1)) != -1 +// && HEXCHAR.indexOf(encoded.charAt(i+2)) != -1 ) { +// decoded += unescape( encoded.substr(i,3) ); +// i += 3; +// } else { +// alert( 'Bad escape combo near ...' + encoded.substr(i) ); +// decoded += "%[ERR]"; +// i++; +// } +// } else { +// decoded += ch; +// i++; +// } +// } // while +// decoded = decoded.replace(RGnl, "
"); +// return false; }; +// ################################################################################ +// Taken form php.net Angelos +function utf8_decode(utftext) { + var string = ""; + var i = 0; + var c = c1 = c2 = 0; + + while ( i < utftext.length ) { + + c = utftext.charCodeAt(i); + + if (c < 128) { + string += String.fromCharCode(c); + i++; + } + else if((c > 191) && (c < 224)) { + c2 = utftext.charCodeAt(i+1); + string += String.fromCharCode(((c & 31) << 6) | (c2 & 63)); + i += 2; + } + else { + c2 = utftext.charCodeAt(i+1); + c3 = utftext.charCodeAt(i+2); + string += String.fromCharCode(((c & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63)); + i += 3; + } + + } + + return string; + }; + // ################################################################################ // Move the Dispo frame out of the way and change the link to maximizar @@ -6304,14 +6392,15 @@ else .body_small {font-size: 11px; font-family: sans-serif;} .body_tiny {font-size: 10px; font-family: sans-serif;} .log_text {font-size: 11px; font-family: monospace;} + .log_text_red {font-size: 11px; font-family: monospace; font-weight: bold; background: #FF3333} .log_title {font-size: 12px; font-family: monospace; font-weight: bold;} .sd_text {font-size: 16px; font-family: sans-serif; font-weight: bold;} .sh_text {font-size: 14px; font-family: sans-serif; font-weight: bold;} .sb_text {font-size: 12px; font-family: sans-serif;} .sk_text {font-size: 11px; font-family: sans-serif;} .skb_text {font-size: 13px; font-family: sans-serif; font-weight: bold;} - .ON_conf {font-size: 11px; font-family: monospace; color: black ; background: #FFFF99} - .OFF_conf {font-size: 11px; font-family: monospace; color: black ; background: #FFCC77} + .ON_conf {font-size: 11px; font-family: monospace; color: black; background: #FFFF99} + .OFF_conf {font-size: 11px; font-family: monospace; color: black; background: #FFCC77} .cust_form {font-family: sans-serif; font-size: 10px; overflow: auto} --> @@ -6604,7 +6693,17 @@ Your Status:
Calls Dialing: + + + + + + + + + +  
Título:   Primeiro:   MI:  Ultimo:   Primeiro:   MI:  Ultimo:
Endereço1: 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $phone_login=$row[0]; @@ -593,7 +616,6 @@ $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]; @@ -604,7 +626,6 @@ $VDloginDISPLAY=0; $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,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]; @@ -630,7 +651,6 @@ $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]; @@ -662,7 +682,6 @@ echo " 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $CAMPactive=$row[0]; @@ -674,7 +693,6 @@ 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); @@ -691,7 +709,6 @@ 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); @@ -712,7 +729,6 @@ 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); @@ -743,7 +759,6 @@ echo " 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $row=mysql_fetch_row($rslt); @@ -802,7 +817,6 @@ 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); @@ -828,7 +842,6 @@ echo " 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $closer_ct = mysql_num_rows($rslt); @@ -852,7 +865,6 @@ echo " 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $xfer_ct = mysql_num_rows($rslt); @@ -871,7 +883,6 @@ echo " 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $row=mysql_fetch_row($rslt); @@ -933,7 +944,6 @@ echo " 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $authphone=$row[0]; @@ -972,7 +982,6 @@ 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]; @@ -1050,7 +1059,6 @@ 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]; @@ -1104,12 +1112,10 @@ 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 ( ($campaign_allow_inbound == 'Y') || ($campaign_leads_to_call > 0) || (ereg('Y',$no_hopper_leads_logins)) ) @@ -1117,12 +1123,10 @@ else ### insert an entry into the user log for the login event $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); @@ -1139,7 +1143,6 @@ 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); @@ -1151,7 +1154,6 @@ 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"; @@ -1159,28 +1161,24 @@ 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"; $stmt="DELETE from vicidial_live_inbound_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"; @@ -1194,7 +1192,6 @@ else ############################################# ##### 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); @@ -1226,7 +1223,6 @@ else ### 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"; @@ -1237,7 +1233,6 @@ else ##### grab the campaign_weight and number of calls today an that campaign for the agent $stmt="SELECT campaign_weight,calls_today FROM vicidial_campaign_agents where user='$VD_login' and campaign_id = '$VD_campaign';"; - if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $vca_ct = mysql_num_rows($rslt); @@ -1254,7 +1249,6 @@ else $calls_today = '0'; $stmt="INSERT INTO vicidial_campaign_agents (user,campaign_id,campaign_rank,campaign_weight,calls_today) values('$VD_login','$VD_campaign','0','0','$calls_today');"; 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"; @@ -1262,7 +1256,6 @@ 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,campaign_weight,calls_today) values('$VD_login','$server_ip','$session_id','$SIP_user','PAUSED','','$VD_campaign','','','','$random','$NOW_TIME','$tsNOW_TIME','$NOW_TIME','$closer_chooser_string','$user_level','$campaign_weight','$calls_today');"; 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"; @@ -1274,14 +1267,12 @@ else $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"; @@ -1302,7 +1293,6 @@ 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"; @@ -1314,14 +1304,12 @@ else $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"; @@ -1394,7 +1382,6 @@ 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($link); @@ -1414,7 +1401,6 @@ echo " 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $MM_scripts = mysql_num_rows($rslt); @@ -1423,8 +1409,8 @@ echo "\"WiederAufnehmen\""; var DiaLControl_auto_HTML_ready = "\"Pause\"\"WiederAufnehmen\""; var DiaLControl_auto_HTML_OFF = "\"Pause\"\"WiederAufnehmen\""; @@ -2342,7 +2332,16 @@ 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]; - if ( (HidEMonitoRSessionS==1) && (channelfieldA.match(/68600/)) ) + var regXFcred = new RegExp(flag_string,"g"); + if ( (channelfieldA.match(regXFcred)) && (flag_channels>0) ) + { + var chan_name_color = 'log_text_red'; + } + else + { + var chan_name_color = 'log_text'; + } + if ( (HidEMonitoRSessionS==1) && (channelfieldA.match(/ASTblind/)) ) { var hide_channel=1; } @@ -2350,11 +2349,11 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} { if (volumecontrol_active!=1) { - live_conf_HTML = live_conf_HTML + "
" + loop_ct + "" + channelfieldA + "AUFLEGEN
" + loop_ct + "" + channelfieldA + "AUFLEGEN
" + loop_ct + "" + channelfieldA + "AUFLEGEN          
" + loop_ct + "" + channelfieldA + "AUFLEGEN          
Kunden Information:
Titel:   Vorname:   MI:  Nachname:   Vorname:   MI:  Nachname:
Adresse1: 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $phone_login=$row[0]; @@ -593,7 +616,6 @@ $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]; @@ -604,7 +626,6 @@ $VDloginDISPLAY=0; $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,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]; @@ -630,7 +651,6 @@ $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]; @@ -662,7 +682,6 @@ echo " 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $CAMPactive=$row[0]; @@ -674,7 +693,6 @@ 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); @@ -691,7 +709,6 @@ 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); @@ -712,7 +729,6 @@ 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); @@ -743,7 +759,6 @@ echo " 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $row=mysql_fetch_row($rslt); @@ -802,7 +817,6 @@ 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); @@ -828,7 +842,6 @@ echo " 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $closer_ct = mysql_num_rows($rslt); @@ -852,7 +865,6 @@ echo " 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $xfer_ct = mysql_num_rows($rslt); @@ -871,7 +883,6 @@ echo " 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $row=mysql_fetch_row($rslt); @@ -933,7 +944,6 @@ echo " 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $authphone=$row[0]; @@ -972,7 +982,6 @@ 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]; @@ -1050,7 +1059,6 @@ 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]; @@ -1104,12 +1112,10 @@ 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 ( ($campaign_allow_inbound == 'Y') || ($campaign_leads_to_call > 0) || (ereg('Y',$no_hopper_leads_logins)) ) @@ -1117,12 +1123,10 @@ else ### insert an entry into the user log for the login event $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); @@ -1139,7 +1143,6 @@ 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); @@ -1151,7 +1154,6 @@ 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"; @@ -1159,28 +1161,24 @@ 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"; $stmt="DELETE from vicidial_live_inbound_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"; @@ -1194,7 +1192,6 @@ else ############################################# ##### ΕΝΑΡΞΗ 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); @@ -1226,7 +1223,6 @@ else ### 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"; @@ -1237,7 +1233,6 @@ else ##### grab the campaign_weight and number of calls today στο that campaign for the agent $stmt="SELECT campaign_weight,calls_today FROM vicidial_campaign_agents where user='$VD_login' and campaign_id = '$VD_campaign';"; - if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $vca_ct = mysql_num_rows($rslt); @@ -1254,7 +1249,6 @@ else $calls_today = '0'; $stmt="INSERT INTO vicidial_campaign_agents (user,campaign_id,campaign_rank,campaign_weight,calls_today) values('$VD_login','$VD_campaign','0','0','$calls_today');"; 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"; @@ -1262,7 +1256,6 @@ 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,campaign_weight,calls_today) values('$VD_login','$server_ip','$session_id','$SIP_user','PAUSED','','$VD_campaign','','','','$random','$NOW_TIME','$tsNOW_TIME','$NOW_TIME','$closer_chooser_string','$user_level','$campaign_weight','$calls_today');"; 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"; @@ -1274,14 +1267,12 @@ else $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"; @@ -1302,7 +1293,6 @@ 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"; @@ -1314,14 +1304,12 @@ else $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"; @@ -1394,7 +1382,6 @@ 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($link); @@ -1414,7 +1401,6 @@ echo " 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $MM_scripts = mysql_num_rows($rslt); @@ -1423,8 +1409,8 @@ echo "\"Επανάληψη\""; var DiaLControl_auto_HTML_ready = "\"Παύση\"\"Επανάληψη\""; var DiaLControl_auto_HTML_OFF = "\"Παύση\"\"Επανάληψη\""; @@ -2342,7 +2332,16 @@ 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]; - if ( (HidEMonitoRSessionS==1) && (channelfieldA.match(/68600/)) ) + var regXFcred = new RegExp(flag_string,"g"); + if ( (channelfieldA.match(regXFcred)) && (flag_channels>0) ) + { + var chan_name_color = 'log_text_red'; + } + else + { + var chan_name_color = 'log_text'; + } + if ( (HidEMonitoRSessionS==1) && (channelfieldA.match(/ASTblind/)) ) { var hide_channel=1; } @@ -2350,11 +2349,11 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} { if (volumecontrol_active!=1) { - live_conf_HTML = live_conf_HTML + "
" + loop_ct + "" + channelfieldA + "ΚΛΕΙΣΙΜΟ
" + loop_ct + "" + channelfieldA + "ΚΛΕΙΣΙΜΟ
" + loop_ct + "" + channelfieldA + "ΚΛΕΙΣΙΜΟ          
" + loop_ct + "" + channelfieldA + "ΚΛΕΙΣΙΜΟ          
Πληροφορίες Πελάτη:
Τίτλος:   Πρώτο:   Μσ:  Επίθετο:   Πρώτο:   Μσ:  Επίθετο:
Διεύθυνση1: 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $phone_login=$row[0]; @@ -593,7 +616,6 @@ $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]; @@ -604,7 +626,6 @@ $VDloginDISPLAY=0; $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,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]; @@ -630,7 +651,6 @@ $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]; @@ -662,7 +682,6 @@ echo " 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $CAMPactive=$row[0]; @@ -674,7 +693,6 @@ 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); @@ -691,7 +709,6 @@ 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); @@ -712,7 +729,6 @@ 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); @@ -743,7 +759,6 @@ echo " 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $row=mysql_fetch_row($rslt); @@ -802,7 +817,6 @@ 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); @@ -828,7 +842,6 @@ echo " 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $closer_ct = mysql_num_rows($rslt); @@ -852,7 +865,6 @@ echo " 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $xfer_ct = mysql_num_rows($rslt); @@ -871,7 +883,6 @@ echo " 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $row=mysql_fetch_row($rslt); @@ -933,7 +944,6 @@ echo " 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $authphone=$row[0]; @@ -972,7 +982,6 @@ 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]; @@ -1050,7 +1059,6 @@ 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]; @@ -1104,12 +1112,10 @@ 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 ( ($campaign_allow_inbound == 'Y') || ($campaign_leads_to_call > 0) || (ereg('Y',$no_hopper_leads_logins)) ) @@ -1117,12 +1123,10 @@ else ### insert an entry into the user log for the login event $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); @@ -1139,7 +1143,6 @@ 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); @@ -1151,7 +1154,6 @@ 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"; @@ -1159,28 +1161,24 @@ 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"; $stmt="DELETE from vicidial_live_inbound_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"; @@ -1194,7 +1192,6 @@ else ############################################# ##### 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); @@ -1226,7 +1223,6 @@ else ### 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"; @@ -1237,7 +1233,6 @@ else ##### grab the campaign_weight and number of calls today on that campaign for the agent $stmt="SELECT campaign_weight,calls_today FROM vicidial_campaign_agents where user='$VD_login' and campaign_id = '$VD_campaign';"; - if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $vca_ct = mysql_num_rows($rslt); @@ -1254,7 +1249,6 @@ else $calls_today = '0'; $stmt="INSERT INTO vicidial_campaign_agents (user,campaign_id,campaign_rank,campaign_weight,calls_today) values('$VD_login','$VD_campaign','0','0','$calls_today');"; 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"; @@ -1262,7 +1256,6 @@ 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,campaign_weight,calls_today) values('$VD_login','$server_ip','$session_id','$SIP_user','PAUSED','','$VD_campaign','','','','$random','$NOW_TIME','$tsNOW_TIME','$NOW_TIME','$closer_chooser_string','$user_level','$campaign_weight','$calls_today');"; 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"; @@ -1274,14 +1267,12 @@ else $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"; @@ -1302,7 +1293,6 @@ 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"; @@ -1314,14 +1304,12 @@ else $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"; @@ -1394,7 +1382,6 @@ 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($link); @@ -1414,7 +1401,6 @@ echo " 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $MM_scripts = mysql_num_rows($rslt); @@ -1423,8 +1409,8 @@ echo "\"Resume\""; var DiaLControl_auto_HTML_ready = "\"Pause\"\"Resume\""; var DiaLControl_auto_HTML_OFF = "\"Pause\"\"Resume\""; @@ -2342,7 +2332,16 @@ 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]; - if ( (HidEMonitoRSessionS==1) && (channelfieldA.match(/68600/)) ) + var regXFcred = new RegExp(flag_string,"g"); + if ( (channelfieldA.match(regXFcred)) && (flag_channels>0) ) + { + var chan_name_color = 'log_text_red'; + } + else + { + var chan_name_color = 'log_text'; + } + if ( (HidEMonitoRSessionS==1) && (channelfieldA.match(/ASTblind/)) ) { var hide_channel=1; } @@ -2350,11 +2349,11 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} { if (volumecontrol_active!=1) { - live_conf_HTML = live_conf_HTML + "
" + loop_ct + "" + channelfieldA + "HANGUP
" + loop_ct + "" + channelfieldA + "HANGUP
" + loop_ct + "" + channelfieldA + "HANGUP          
" + loop_ct + "" + channelfieldA + "HANGUP          
Customer Information:
Title:   First:   MI:   Last:   First:   MI:   Last:
Address1: 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $phone_login=$row[0]; @@ -593,7 +616,6 @@ $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]; @@ -604,7 +626,6 @@ $VDloginDISPLAY=0; $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,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]; @@ -630,7 +651,6 @@ $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]; @@ -662,7 +682,6 @@ echo " 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $CAMPactive=$row[0]; @@ -674,7 +693,6 @@ 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); @@ -691,7 +709,6 @@ 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); @@ -712,7 +729,6 @@ 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); @@ -743,7 +759,6 @@ echo " 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $row=mysql_fetch_row($rslt); @@ -802,7 +817,6 @@ 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); @@ -828,7 +842,6 @@ echo " 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $closer_ct = mysql_num_rows($rslt); @@ -852,7 +865,6 @@ echo " 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $xfer_ct = mysql_num_rows($rslt); @@ -871,7 +883,6 @@ echo " 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $row=mysql_fetch_row($rslt); @@ -933,7 +944,6 @@ echo " 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $authphone=$row[0]; @@ -972,7 +982,6 @@ 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]; @@ -1050,7 +1059,6 @@ 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]; @@ -1104,12 +1112,10 @@ 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 ( ($campaign_allow_inbound == 'Y') || ($campaign_leads_to_call > 0) || (ereg('Y',$no_hopper_leads_logins)) ) @@ -1117,12 +1123,10 @@ else ### insert an entry into the user log for the login event $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); @@ -1139,7 +1143,6 @@ 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); @@ -1151,7 +1154,6 @@ 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"; @@ -1159,28 +1161,24 @@ 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"; $stmt="DELETE from vicidial_live_inbound_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"; @@ -1194,7 +1192,6 @@ else ############################################# ##### 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); @@ -1226,7 +1223,6 @@ else ### 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"; @@ -1237,7 +1233,6 @@ else ##### grab the campaign_weight and number of calls today en that campaign for the agent $stmt="SELECT campaign_weight,calls_today FROM vicidial_campaign_agents where user='$VD_login' and campaign_id = '$VD_campaign';"; - if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $vca_ct = mysql_num_rows($rslt); @@ -1254,7 +1249,6 @@ else $calls_today = '0'; $stmt="INSERT INTO vicidial_campaign_agents (user,campaign_id,campaign_rank,campaign_weight,calls_today) values('$VD_login','$VD_campaign','0','0','$calls_today');"; 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"; @@ -1262,7 +1256,6 @@ 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,campaign_weight,calls_today) values('$VD_login','$server_ip','$session_id','$SIP_user','PAUSED','','$VD_campaign','','','','$random','$NOW_TIME','$tsNOW_TIME','$NOW_TIME','$closer_chooser_string','$user_level','$campaign_weight','$calls_today');"; 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"; @@ -1274,14 +1267,12 @@ else $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"; @@ -1302,7 +1293,6 @@ 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"; @@ -1314,14 +1304,12 @@ else $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"; @@ -1394,7 +1382,6 @@ 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($link); @@ -1414,7 +1401,6 @@ echo " 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $MM_scripts = mysql_num_rows($rslt); @@ -1423,8 +1409,8 @@ echo "\"Comienzo\""; var DiaLControl_auto_HTML_ready = "\"Pausa\"\"Comienzo\""; var DiaLControl_auto_HTML_OFF = "\"Pausa\"\"Comienzo\""; @@ -2342,7 +2332,16 @@ 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]; - if ( (HidEMonitoRSessionS==1) && (channelfieldA.match(/68600/)) ) + var regXFcred = new RegExp(flag_string,"g"); + if ( (channelfieldA.match(regXFcred)) && (flag_channels>0) ) + { + var chan_name_color = 'log_text_red'; + } + else + { + var chan_name_color = 'log_text'; + } + if ( (HidEMonitoRSessionS==1) && (channelfieldA.match(/ASTblind/)) ) { var hide_channel=1; } @@ -2350,11 +2349,11 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} { if (volumecontrol_active!=1) { - live_conf_HTML = live_conf_HTML + "
" + loop_ct + "" + channelfieldA + "COLGAR
" + loop_ct + "" + channelfieldA + "COLGAR
" + loop_ct + "" + channelfieldA + "COLGAR          
" + loop_ct + "" + channelfieldA + "COLGAR          
Información Del Cliente:
Título:   Primero:   IM:   Último:   Primero:   IM:   Último:
Dirección1: 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $phone_login=$row[0]; @@ -593,7 +616,6 @@ $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]; @@ -604,7 +626,6 @@ $VDloginDISPLAY=0; $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,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]; @@ -630,7 +651,6 @@ $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]; @@ -662,7 +682,6 @@ echo " 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $CAMPactive=$row[0]; @@ -674,7 +693,6 @@ 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); @@ -691,7 +709,6 @@ 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); @@ -712,7 +729,6 @@ 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); @@ -743,7 +759,6 @@ echo " 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $row=mysql_fetch_row($rslt); @@ -802,7 +817,6 @@ 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); @@ -828,7 +842,6 @@ echo " 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $closer_ct = mysql_num_rows($rslt); @@ -852,7 +865,6 @@ echo " 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $xfer_ct = mysql_num_rows($rslt); @@ -871,7 +883,6 @@ echo " 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $row=mysql_fetch_row($rslt); @@ -933,7 +944,6 @@ echo " 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $authphone=$row[0]; @@ -972,7 +982,6 @@ 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]; @@ -1050,7 +1059,6 @@ 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]; @@ -1104,12 +1112,10 @@ 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 ( ($campaign_allow_inbound == 'Y') || ($campaign_leads_to_call > 0) || (ereg('Y',$no_hopper_leads_logins)) ) @@ -1117,12 +1123,10 @@ else ### insert an entry into the user log for the login event $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); @@ -1139,7 +1143,6 @@ 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); @@ -1151,7 +1154,6 @@ 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"; @@ -1159,28 +1161,24 @@ 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"; $stmt="DELETE from vicidial_live_inbound_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"; @@ -1194,7 +1192,6 @@ else ############################################# ##### 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); @@ -1226,7 +1223,6 @@ else ### 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"; @@ -1237,7 +1233,6 @@ else ##### grab the campaign_weight and number of calls today sur that campaign for the agent $stmt="SELECT campaign_weight,calls_today FROM vicidial_campaign_agents where user='$VD_login' and campaign_id = '$VD_campaign';"; - if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $vca_ct = mysql_num_rows($rslt); @@ -1254,7 +1249,6 @@ else $calls_today = '0'; $stmt="INSERT INTO vicidial_campaign_agents (user,campaign_id,campaign_rank,campaign_weight,calls_today) values('$VD_login','$VD_campaign','0','0','$calls_today');"; 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"; @@ -1262,7 +1256,6 @@ 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,campaign_weight,calls_today) values('$VD_login','$server_ip','$session_id','$SIP_user','PAUSED','','$VD_campaign','','','','$random','$NOW_TIME','$tsNOW_TIME','$NOW_TIME','$closer_chooser_string','$user_level','$campaign_weight','$calls_today');"; 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"; @@ -1274,14 +1267,12 @@ else $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"; @@ -1302,7 +1293,6 @@ 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"; @@ -1314,14 +1304,12 @@ else $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"; @@ -1394,7 +1382,6 @@ 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($link); @@ -1414,7 +1401,6 @@ echo " 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $MM_scripts = mysql_num_rows($rslt); @@ -1423,8 +1409,8 @@ echo "\"Résumé\""; var DiaLControl_auto_HTML_ready = "\"Pause\"\"Résumé\""; var DiaLControl_auto_HTML_OFF = "\"Pause\"\"Résumé\""; @@ -2342,7 +2332,16 @@ 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]; - if ( (HidEMonitoRSessionS==1) && (channelfieldA.match(/68600/)) ) + var regXFcred = new RegExp(flag_string,"g"); + if ( (channelfieldA.match(regXFcred)) && (flag_channels>0) ) + { + var chan_name_color = 'log_text_red'; + } + else + { + var chan_name_color = 'log_text'; + } + if ( (HidEMonitoRSessionS==1) && (channelfieldA.match(/ASTblind/)) ) { var hide_channel=1; } @@ -2350,11 +2349,11 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} { if (volumecontrol_active!=1) { - live_conf_HTML = live_conf_HTML + "
" + loop_ct + "" + channelfieldA + "RACCROCHER
" + loop_ct + "" + channelfieldA + "RACCROCHER
" + loop_ct + "" + channelfieldA + "RACCROCHER          
" + loop_ct + "" + channelfieldA + "RACCROCHER          
Informations Client:
Titre:   Prenom:   Mi:  Nom:   Prenom:   Mi:  Nom:
Adresse1:
\n"; @@ -153,19 +153,19 @@ echo "
\n"; echo "


"; echo ""; - echo ""; + echo ""; echo "\n"; echo "\n"; - echo ""; + echo ""; echo "\n"; - echo ""; + echo ""; echo "\n"; - echo ""; + echo ""; echo "\n"; - echo ""; + echo ""; echo "\n"; echo "\n"; - echo "\n"; + echo "\n"; echo "
Inizio attività Login
 
Inizio attività dell`Utente:
Login Utente:
Parola d`accesso Dell`Utente:
Password Utente:
Inizio attività Telefono:
Login Telefono:
Parola d`accesso del Telefono:
Password Telefono:

VERSIONE: $version       CONFIGURAZIONE: $build

VERSIONE: $version       BUILD: $build
\n"; echo "\n\n"; echo "\n\n"; @@ -185,7 +185,7 @@ echo "
0) { - fwrite ($fp, "VICICHIAMA|GOOD|$date|$user|$pass|$ip|$browser|$LOGfullname|\n"); + fwrite ($fp, "VICIDial|GOOD|$date|$user|$pass|$ip|$browser|$LOGfullname|\n"); fclose($fp); } } @@ -193,7 +193,7 @@ echo " 0) { - fwrite ($fp, "VICICHIAMA|FAIL|$date|$user|$pass|$ip|$browser|$LOGfullname|\n"); + fwrite ($fp, "VICIDial|FAIL|$date|$user|$pass|$ip|$browser|$LOGfullname|\n"); fclose($fp); } } @@ -204,11 +204,11 @@ header ("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1 header ("Pragma: no-cache"); // HTTP/1.0 echo "\n"; echo "\n"; -echo "\n"; +echo "\n"; if ( (strlen($phone_login)<2) or (strlen($phone_pass)<2) ) { -echo "web client astGUIclient: Inizio attività Telefono\n"; +echo "web client astGUIclient: Login Telefono\n"; echo "\n"; echo "\n"; echo "\n"; @@ -220,15 +220,15 @@ echo "\n"; echo "\n"; echo "


"; echo ""; -echo ""; +echo ""; echo "\n"; echo "\n"; -echo ""; +echo ""; echo "\n"; -echo ""; +echo ""; echo "\n"; echo "\n"; -echo "\n"; +echo "\n"; echo "
Inizio attività Telefono Login Telefono
 
Inizio attività Telefono:
Login Telefono:
Parola d`accesso del Telefono:
Password Telefono:

VERSIONE: $version       CONFIGURAZIONE: $build

VERSIONE: $version       BUILD: $build
\n"; echo "\n\n"; echo "\n\n"; @@ -245,7 +245,7 @@ $row=mysql_fetch_row($rslt); $authphone=$row[0]; if (!$authphone) { - echo "web client astGUIclient: Inizio attività Telefono\n"; + echo "web client astGUIclient: Login Telefono\n"; echo "\n"; echo "\n"; echo "\n"; @@ -257,15 +257,15 @@ echo "
\n"; echo "


"; echo ""; - echo ""; + echo ""; echo "\n"; - echo "\n"; - echo ""; + echo "\n"; + echo ""; echo "\n"; - echo ""; + echo ""; echo "\n"; echo "\n"; - echo "\n"; + echo "\n"; echo "
Inizio attività Telefono Login Telefono
 
Spiacente, la vostra password e login non sono attivi in questo sistema, riprova di nuovo:
 
Inizio attività Telefono:
 
Spiacente, il telefono inserito non e` attivo in questo sistema, riprova di nuovo:
 
Login Telefono:
Parola d`accesso del Telefono:
Password Telefono:

VERSIONE: $version       CONFIGURAZIONE: $build

VERSIONE: $version       BUILD: $build
\n"; echo "\n\n"; echo "\n\n"; @@ -390,7 +390,7 @@ else } else { - echo "\n"; + echo "\n"; } ### gather phone extensions and fullnames for favorites editor ### @@ -716,7 +716,7 @@ if ($enable_fast_refresh < 1) {echo "var refresh_interval = 1000;\n";} } // ################################################################################ -// LIVE TRUNK LIST FOR ATTACCA/HIJACK MENU FUNCTIONS +// LIVE TRUNK LIST FOR RIAGGANCIA/HIJACK MENU FUNCTIONS function refresh_busytrunkhangup() { document.getElementById("TrunkHangupContent").innerHTML = Nactiveext; @@ -763,7 +763,7 @@ if ($enable_fast_refresh < 1) {echo "var refresh_interval = 1000;\n";} } // ################################################################################ -// LIVE LOCAL LIST FOR ATTACCA/HIJACK MENU FUNCTIONS +// LIVE LOCAL LIST FOR RIAGGANCIA/HIJACK MENU FUNCTIONS function refresh_busylocalhangup() { document.getElementById("LocalHangupContent").innerHTML = Nactiveext; @@ -885,7 +885,7 @@ if ($enable_fast_refresh < 1) {echo "var refresh_interval = 1000;\n";} else { bsr_continue=0; - alert("Potete soltanto monitorare i canali Zap:\n" + listenvalue); + alert("Puoi soltanto monitorare i canali Zap:\n" + listenvalue); } } if (bsr_continue == '1') @@ -1195,7 +1195,7 @@ if ($enable_fast_refresh < 1) {echo "var refresh_interval = 1000;\n";} { recLIST = recLIST + "|" + monitorchannelvalue; filename = filedate + "_" + user_abb; - var rec_start_html = "
Stop Registrazione"; + var rec_start_html = "Ferma Registrazione"; document.getElementById(taskspan).innerHTML = rec_start_html; } @@ -1257,7 +1257,7 @@ if ($enable_fast_refresh < 1) {echo "var refresh_interval = 1000;\n";} recLIST = recLIST + "|" + taskconfrec; filename = filedate + "_" + user_abb; var channelrec = "Local/" + taskconfrec + "@" + ext_context; - var conf_rec_start_html = "Stop Registrazione"; + var conf_rec_start_html = "Ferma Registrazione"; document.getElementById(taskconfspan).innerHTML = conf_rec_start_html; } @@ -1384,7 +1384,7 @@ if ($enable_fast_refresh < 1) {echo "var refresh_interval = 1000;\n";} var conv_start=3; if (live_calls > 0) { - var live_calls_HTML = "CHIAMATE ATTIVE SU QUESTO TELEFONO:
"; + var live_calls_HTML = "CHIAMATE IN CORSO SU QUESTO TELEFONO:
#CANALE CLIENTCANALE REMOTORegistrazioneATTACCATRASFPARK
"; if ( (LCAcount > live_calls) || (LCAcount < live_calls) ) { LCAe[0]=''; LCAe[1]=''; LCAe[2]=''; LCAe[3]=''; LCAe[4]=''; LCAe[5]=''; @@ -1410,11 +1410,11 @@ if ($enable_fast_refresh < 1) {echo "var refresh_interval = 1000;\n";} var regx = new RegExp("\\|"+channelfieldBtrunk_array[1],"ig"); if (recLIST.match(regx)) - {live_calls_HTML = live_calls_HTML + "Stop Registrazione";} + {live_calls_HTML = live_calls_HTML + "Ferma Registrazione";} else {live_calls_HTML = live_calls_HTML + "Registrazione";} - live_calls_HTML = live_calls_HTML + ""; + live_calls_HTML = live_calls_HTML + ""; if (LCAe[ARY_ct].length < 1) {LCAe[ARY_ct] = channelfieldA_array[1]; LCAcontent_change++; LCAalter++;} @@ -1531,7 +1531,7 @@ if ($enable_fast_refresh < 1) {echo "var refresh_interval = 1000;\n";} var conv_start=0; if (out_calls > 0) { - var out_log_HTML = "
#CANALE CLIENTCANALE REMOTORegistrazioneRIAGGANCIATRASFATTESA
ATTACCATRASFPARK
RIAGGANCIATRASFATTESA
" + var out_log_HTML = "
# DATE/TIME DI CHIAMATANUMEROLUNGHEZZA (M:SS)
" while (loop_ct < out_calls) { loop_ct++; @@ -1559,7 +1559,7 @@ if ($enable_fast_refresh < 1) {echo "var refresh_interval = 1000;\n";} var conv_start=0; if (in_calls > 0) { - var in_log_HTML = "
# DATA/ORA CHIAMATANUMEROLUNGHEZZA (M:SS)
" + var in_log_HTML = "
# DATE/TIME DI CHIAMATAIN-NUMEROCALLERIDLUNGHEZZA
" while (loop_ct < in_calls) { loop_ct++; @@ -1634,7 +1634,7 @@ if ($enable_fast_refresh < 1) {echo "var refresh_interval = 1000;\n";} var conv_start=-1; if (parked_count > 0) { - var park_HTML = "
# DATA/ORA CHIAMATAIN-NUMEROCALLERIDLUNGHEZZA
" + var park_HTML = "
#CHANNEL
  CHIAMATA ID
PARCHEGGIATO DA
  TEMPO PARCHEGGIATO
ATTACCATRASFRIPRENDI
" while (loop_ct < parked_count) { loop_ct++; @@ -1650,7 +1650,7 @@ if ($enable_fast_refresh < 1) {echo "var refresh_interval = 1000;\n";} var park_call_id = park_array[1]; var parked_by = park_array[3]; var parked_time = park_array[4]; - park_HTML = park_HTML + ""; + park_HTML = park_HTML + ""; } park_HTML = park_HTML + "
#CHANNEL
  CHIAMATA ID
MESSO IN ATTESA DA
  TEMPO IN ATTESA
RIAGGANCIATRASFRIPRENDI
" + loop_ct + "" + park_channel + "
  " + park_call_id + "
" + parked_by + "
  " + parked_time + "
ATTACCATRASFRIPRENDI
" + loop_ct + "" + park_channel + "
  " + park_call_id + "
" + parked_by + "
  " + parked_time + "
RIAGGANCIATRASFRIPRENDI
"; @@ -1762,7 +1762,7 @@ if ($enable_fast_refresh < 1) {echo "var refresh_interval = 1000;\n";} show_reglink=1; reglink = "Register"; } - var conf_head_HTML = "CONFERENZA " + head_conf + "    Registrato a: " + head_reg + "   " + reglink + "         Entra in Conferenza
Aggiorna     Registrazione         Trasmetta DTMF         Chiama dalla Conferenza
"; + var conf_head_HTML = "CONFERENZA " + head_conf + "    Registrato a: " + head_reg + "   " + reglink + "         Entra in Conferenza
Aggiorna     Registrazione         Trasmetti Tono Tastiera         Chiama dalla Conferenza
"; document.getElementById("ConfereNceHeaderContent").innerHTML = conf_head_HTML; check_for_conf_calls(head_conf,taskrefresh); @@ -1823,7 +1823,7 @@ if ($enable_fast_refresh < 1) {echo "var refresh_interval = 1000;\n";} var LMAcontent_change=0; var LMAcontent_match=0; var conv_start=-1; - var live_conf_HTML = "CHIAMATE ATTIVE IN QUESTA CONFERENZA:
"; + var live_conf_HTML = "CHIAMATE IN CORSO IN QUESTA CONFERENZA:
#CANALE REMOTOATTACCATRASF
"; if ( (LMAcount > live_conf_calls) || (LMAcount < live_conf_calls) || (LMAforce > 0)) { LMAe[0]=''; LMAe[1]=''; LMAe[2]=''; LMAe[3]=''; LMAe[4]=''; LMAe[5]=''; @@ -1839,7 +1839,7 @@ if ($enable_fast_refresh < 1) {echo "var 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 + ""; + live_conf_HTML = live_conf_HTML + ""; if (!LMAe[ARY_ct]) {LMAe[ARY_ct] = channelfieldA; LMAcontent_change++; LMAalter++;} @@ -2061,7 +2061,7 @@ if ($enable_fast_refresh < 1) {echo "var refresh_interval = 1000;\n";} } // ################################################################################ -// Send Originate command to manager to direct user to Casella del voicemail +// Send Originate command to manager to direct user to Casella Voicemail function SendCheckVoiceMail() { var xmlhttp=false; @@ -2288,7 +2288,7 @@ if ($enable_fast_refresh < 1) {echo "var refresh_interval = 1000;\n";} var VD_favlist_ct_half = parseInt(favlistCT / 2); if (VD_favlist_ct_half < 30) {VD_favlist_ct_half = 30;} var favlist_sec_col = 0; - var favedit_HTML = "
#CANALE REMOTORIAGGANCIATRASF
" + loop_ct + "" + channelfieldA + "ATTACCATRASF
" + loop_ct + "" + channelfieldA + "RIAGGANCIATRASF
INTERNI DISPONIBILI FAVORITI
"; + var favedit_HTML = "
- + - - + +
INTERNI DISPONIBILI PREFERITI
"; loop_ct = 0; while (loop_ct < favlistCT) { @@ -2385,7 +2385,7 @@ if ($enable_fast_refresh < 1) {echo "var refresh_interval = 1000;\n";} hideDiv('MainPanel'); showDiv('LogouTBox'); - document.getElementById("LogouTBoxLink").innerHTML = "FAI CLICK QUI PER LOGGARTI DI NUOVO \n"; + document.getElementById("LogouTBoxLink").innerHTML = "FAI CLICK QUI PER AUTENTICARTI DI NUOVO\n"; logout_stop_timeouts = 1; @@ -2716,14 +2716,14 @@ echo "\n";
-LOGOUT
\n"; ?> +LOGOUT
\n"; ?>
Pannello PrincipalePannello Linee Attive Pannello Linee Attive Pannello ConferenzeControlla la VoicemailChimate AttiveControlla Posta VocaleChimata in corso
@@ -2732,59 +2732,59 @@ echo "\n"; -
TRUNK ATTACCA

+
TRUNK RIAGGANCIA

Active Trunks Menu
Disconnetti il Trunk   |   Dirotta il Trunk   |   Ascolta il Trunk   |   Aggiorna   |   - Tornate alla schermata principale + Torna alla schermata principale
-
DISCONNETTI LOCALI

+
DISCONNETTI LOCALE

Menu Locale Attivo
Disconnetti locale   |   - Dirotta il Locale   |   - Ascolta il locale   |   + Dirotta Locale   |   + Ascolta locale   |   Aggiorna   |   - Tornate alla schermata principale + Torna alla schermata principale
- - +
TRASFERIMENTO CHIAMATA ATTIVA
Canale trasferito: Canale
Interni:
Menu degli Interni
+ -
TRASFERIMENTO CHIAMATA IN CORSO
Canale trasferito: Canale
Interni:
Menu Interni

Invia all` interno selezionato

Invia alla VoiceMail selezionata

Invia a questo numero :


Aggiorna


- Tornate alla schermata principale

+ Torna alla schermata principale

Conferenze:
(Seleziona il numero sopra per inviarlo ad una conferenza)
Invia anche il mio canale
Menu Conferenza
+
Conferenze:
(Seleziona un numero per inviarlo ad una conferenza)
Invia anche il mio canale
Menu Conferenze
- +
Chiamata Interni locali
Chiamata proveniente da: Canale
Interni:
Menu degli Interni
Interni:
Menu Interni

Chiama l` interno selezionato

- Chiama la Voice Mail selezionata

+ Chiama la VoiceMail selezionata

Aggiorna


- Tornate alla schermata principale

+ Torna alla schermata principale

- - + - +
CHIAMATE PARCHEGGIATE:
- Tornate alla schermata principale

+
CHIAMATE IN ATTESA:
+ Torna alla schermata principale

@@ -2796,17 +2796,17 @@ echo "\n";
VOICEMAIL     NUOVO:     VECCHIO:             Chiamata Manuale       CHIAMA
CHIAMATE PARCHEGGIATE: 0                INTERNI DI CHIAMATA LOCALE
CHIAMATE IN ATTESA: 0                INTERNI DI CHIAMATA LOCALE
CHIAMATE OUTBOUND:
CHIAMATE INBOUND:
VERSIONEE web del astGUIclient: CONFIGURAZIONE:
Versione di astGUIclient web-client: BUILD:
- +
FAVORITI       modifica
$h) @@ -2824,10 +2824,10 @@ echo "\n"; -
PREFERITI       modifica
+
FAVORITI
- - + +
PREFERITI

 
SALVA I CAMBIAMENTI - richiede Logout
TORNA SCHERMATA PRECEDENTE- ignora i cambiamenti fatti
SALVA I CAMBIAMENTI AI PREFERITI - richiede Logout
TORNA ALLA SCHERMATA PRECEDENTE- ignora i cambiamenti fatti
@@ -2837,7 +2837,7 @@ echo "\n"; @@ -2877,7 +2877,7 @@ echo "\n";
-Seleziona una stanza sulla sinistra per informazioni sulla conferenza +Seleziona una conferenza sulla sinistra per informazioni su di essa
diff --git a/agc_2-X/branches/agc_2.0.4/LANG_www/agc_it/call_log_display.php b/agc_2-X/branches/agc_2.0.4/LANG_www/agc_it/call_log_display.php index b05f0b42..62b06cf6 100644 --- a/agc_2-X/branches/agc_2.0.4/LANG_www/agc_it/call_log_display.php +++ b/agc_2-X/branches/agc_2.0.4/LANG_www/agc_it/call_log_display.php @@ -73,7 +73,7 @@ if (!isset($query_date)) {$query_date = $NOW_DATE;} if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) { - echo "Non valido Utentename/Parola d`accesso: |$user|$pass|\n"; + echo "Utentename/Password non validi: |$user|$pass|\n"; exit; } else @@ -81,7 +81,7 @@ if (!isset($query_date)) {$query_date = $NOW_DATE;} if( (strlen($server_ip)<6) or (!isset($server_ip)) or ( (strlen($session_name)<12) or (!isset($session_name)) ) ) { - echo "Non valido server_ip: |$server_ip| or Non valido session_name: |$session_name|\n"; + echo "ip del server non valido: |$server_ip| or Nome sessione non valido: |$session_name|\n"; exit; } else @@ -93,7 +93,7 @@ if (!isset($query_date)) {$query_date = $NOW_DATE;} $SNauth=$row[0]; if($SNauth==0) { - echo "Non valido session_name: |$session_name|$server_ip|\n"; + echo "Nome sessione non valido: |$session_name|$server_ip|\n"; exit; } else @@ -107,7 +107,7 @@ if ($format=='debug') { echo "\n"; echo "\n"; -echo "\n"; +echo "\n"; echo "Visualizza il Call Log"; echo "\n"; echo "\n"; @@ -120,7 +120,7 @@ echo " if ( (strlen($exten)<1) or (strlen($protocol)<3) ) { $channel_live=0; - echo "Exten $exten non è valido o protocollo $protocol non è valido\n"; + echo "Exten $exten non e` valido o protocollo $protocol non e` valido\n"; exit; } else diff --git a/agc_2-X/branches/agc_2.0.4/LANG_www/agc_it/conf_exten_check.php b/agc_2-X/branches/agc_2.0.4/LANG_www/agc_it/conf_exten_check.php index b6175b03..5ea9909b 100644 --- a/agc_2-X/branches/agc_2.0.4/LANG_www/agc_it/conf_exten_check.php +++ b/agc_2-X/branches/agc_2.0.4/LANG_www/agc_it/conf_exten_check.php @@ -1,7 +1,7 @@ LICENSE: GPLv2 +# Copyright (C) 2008 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 @@ -35,6 +35,7 @@ # 61128-2255 - Added update for manual dial vicidial_live_agents # 70319-1542 - Added agent disabled display function # 71122-0205 - Added vicidial_live_agent status output +# 80424-0442 - Added non_latin lookup from system_settings # require("dbconnect.php"); @@ -63,8 +64,28 @@ if (isset($_GET["auto_dial_level"])) {$auto_dial_level=$_GET["auto_dial_level" if (isset($_GET["campagentstdisp"])) {$campagentstdisp=$_GET["campagentstdisp"];} elseif (isset($_POST["campagentstdisp"])) {$campagentstdisp=$_POST["campagentstdisp"];} + +############################################# +##### START SYSTEM_SETTINGS LOOKUP ##### +$stmt = "SELECT use_non_latin FROM system_settings;"; +$rslt=mysql_query($stmt, $link); +if ($DB) {echo "$stmt\n";} +$qm_conf_ct = mysql_num_rows($rslt); +$i=0; +while ($i < $qm_conf_ct) + { + $row=mysql_fetch_row($rslt); + $non_latin = $row[0]; + $i++; + } +##### END SETTINGS LOOKUP ##### +########################################### + +if ($non_latin < 1) +{ $user=ereg_replace("[^0-9a-zA-Z]","",$user); $pass=ereg_replace("[^0-9a-zA-Z]","",$pass); +} # default optional vars if not set if (!isset($format)) {$format="text";} @@ -81,15 +102,16 @@ if (!isset($query_date)) {$query_date = $NOW_DATE;} $random = (rand(1000000, 9999999) + 10000000); - $stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; +$stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$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]; if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) { - echo "Non valido Utentename/Parola d`accesso: |$user|$pass|\n"; + echo "Utentename/Password non validi: |$user|$pass|\n"; exit; } else @@ -97,7 +119,7 @@ $random = (rand(1000000, 9999999) + 10000000); if( (strlen($server_ip)<6) or (!isset($server_ip)) or ( (strlen($session_name)<12) or (!isset($session_name)) ) ) { - echo "Non valido server_ip: |$server_ip| or Non valido session_name: |$session_name|\n"; + echo "ip del server non valido: |$server_ip| or Nome sessione non valido: |$session_name|\n"; exit; } else @@ -109,7 +131,7 @@ $random = (rand(1000000, 9999999) + 10000000); $SNauth=$row[0]; if($SNauth==0) { - echo "Non valido session_name: |$session_name|$server_ip|\n"; + echo "Nome sessione non valido: |$session_name|$server_ip|\n"; exit; } else @@ -123,7 +145,7 @@ if ($format=='debug') { echo "\n"; echo "\n"; -echo "\n"; +echo "\n"; echo "Controllo interni della conferenza"; echo "\n"; echo "\n"; @@ -138,7 +160,7 @@ echo " if (strlen($conf_exten)<1) { $channel_live=0; - echo "Conf Exten $conf_exten non è valido\n"; + echo "Conf Exten $conf_exten non e` valido\n"; exit; } else @@ -216,7 +238,7 @@ echo " if ($Acount < 1) {$Alogin='DEAD_VLA';} if ($AexternalDEAD > 0) {$Alogin='DEAD_EXTERNAL';} - echo 'DateTime: ' . $NOW_TIME . '|UnixTime: ' . $StarTtime . '|Logged-in: ' . $Alogin . '|CampCalls: ' . $RingCalls . '|Status: ' . $Astatus . "|\n"; + echo 'DateTime: ' . $NOW_TIME . '|UnixTime: ' . $StarTtime . '|Logged-in: ' . $Alogin . '|CampCalls: ' . $RingCalls . '|Stato: ' . $Astatus . "|\n"; } $total_conf=0; @@ -270,7 +292,7 @@ echo " if ( (strlen($conf_exten)<1) || (strlen($exten)<1) ) { $channel_live=0; - echo "Conf Exten $conf_exten non è valido or Exten $exten non è valido\n"; + echo "Conf Exten $conf_exten non e` valido or Exten $exten non e` valido\n"; exit; } else @@ -279,7 +301,7 @@ echo " if ($format=='debug') {echo "\n";} $rslt=mysql_query($stmt, $link); } - echo "Conferenza $conf_exten è stato registrato $exten\n"; + echo "Conferenza $conf_exten e` stato registrato a $exten\n"; } diff --git a/agc_2-X/branches/agc_2.0.4/LANG_www/agc_it/inbound_popup.php b/agc_2-X/branches/agc_2.0.4/LANG_www/agc_it/inbound_popup.php index c80ce26b..29f6b6d9 100644 --- a/agc_2-X/branches/agc_2.0.4/LANG_www/agc_it/inbound_popup.php +++ b/agc_2-X/branches/agc_2.0.4/LANG_www/agc_it/inbound_popup.php @@ -85,7 +85,7 @@ if ( (eregi("^Zap",$channel)) and (!eregi("-",$channel)) ) {$channel = "$channel if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) { - echo "Non valido Utentename/Parola d`accesso: |$user|$pass|\n"; + echo "Utentename/Password non validi: |$user|$pass|\n"; exit; } else @@ -93,7 +93,7 @@ if ( (eregi("^Zap",$channel)) and (!eregi("-",$channel)) ) {$channel = "$channel if( (strlen($server_ip)<6) or (!isset($server_ip)) or ( (strlen($session_name)<12) or (!isset($session_name)) ) ) { - echo "Non valido server_ip: |$server_ip| or Non valido session_name: |$session_name|\n"; + echo "ip del server non valido: |$server_ip| or Nome sessione non valido: |$session_name|\n"; exit; } else @@ -105,7 +105,7 @@ if ( (eregi("^Zap",$channel)) and (!eregi("-",$channel)) ) {$channel = "$channel $SNauth=$row[0]; if($SNauth==0) { - echo "Non valido session_name: |$session_name|$server_ip|\n"; + echo "Nome sessione non valido: |$session_name|$server_ip|\n"; exit; } else @@ -124,7 +124,7 @@ while ( (strlen($user_abb) > 4) and ($forever_stop < 200) ) echo "\n"; echo "\n"; -echo "\n"; +echo "\n"; ?> CHIAMATA INBOUND ATTIVA"; +echo "CHIAMATA INBOUND IN CORSO"; echo "\n"; echo "\n"; echo "\n"; -echo "

CHIAMATA INBOUND ATTIVA

\n"; +echo "

CHIAMATA INBOUND IN CORSO

\n"; echo "$NOW_TIME

\n"; } @@ -265,7 +265,7 @@ echo "$NOW_TIME

\n"; if (strlen($uniqueid)<9) { $channel_live=0; - echo "Uniqueid $uniqueid non è valido\n"; + echo "Uniqueid $uniqueid non e` valido\n"; exit; } else @@ -321,8 +321,8 @@ echo "$NOW_TIME

\n"; echo "
\n"; echo "\n"; echo "\n"; echo "
-PAUSA | INIZIO     Aggiorna i tempi: 1000 ms Più velocemente | Più lento

+PAUSE | INIZIO     Frequenza di aggiornamento: 1000 ms Piu` veloce | Piu` lento

Inizializzazione..
Interni Attivi
@@ -2858,7 +2858,7 @@ echo "\n";
I Dati vanno inseriti qui

- I Dati vanno inseriti qui

Azione Del Trunk + I Dati vanno inseriti qui

Azione Trunk
I Dati vanno inseriti qui

Azione Locale
Numero chiamato: $row[8]
Note: $row[9]|$row[10]|$row[11]|$row[12]|$row[13]|
\n"; - echo "ATTACCA - \n"; - echo "INVIA AL MIO VOICEMAIL\n"; + echo "RIAGGANCIA - \n"; + echo "INVIA ALLA MIA VOICEMAIL\n"; echo "
\n"; diff --git a/agc_2-X/branches/agc_2.0.4/LANG_www/agc_it/live_exten_check.php b/agc_2-X/branches/agc_2.0.4/LANG_www/agc_it/live_exten_check.php index 7c71701d..7cd4e78e 100644 --- a/agc_2-X/branches/agc_2.0.4/LANG_www/agc_it/live_exten_check.php +++ b/agc_2-X/branches/agc_2.0.4/LANG_www/agc_it/live_exten_check.php @@ -74,7 +74,7 @@ if (!isset($query_date)) {$query_date = $NOW_DATE;} if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) { - echo "Non valido Utentename/Parola d`accesso: |$user|$pass|\n"; + echo "Utentename/Password non validi: |$user|$pass|\n"; exit; } else @@ -82,7 +82,7 @@ if (!isset($query_date)) {$query_date = $NOW_DATE;} if( (strlen($server_ip)<6) or (!isset($server_ip)) or ( (strlen($session_name)<12) or (!isset($session_name)) ) ) { - echo "Non valido server_ip: |$server_ip| or Non valido session_name: |$session_name|\n"; + echo "ip del server non valido: |$server_ip| or Nome sessione non valido: |$session_name|\n"; exit; } else @@ -94,7 +94,7 @@ if (!isset($query_date)) {$query_date = $NOW_DATE;} $SNauth=$row[0]; if($SNauth==0) { - echo "Non valido session_name: |$session_name|$server_ip|\n"; + echo "Nome sessione non valido: |$session_name|$server_ip|\n"; exit; } else @@ -108,7 +108,7 @@ if ($format=='debug') { echo "\n"; echo "\n"; -echo "\n"; +echo "\n"; echo "Controllo Interni Attivi "; echo "\n"; echo "\n"; @@ -131,7 +131,7 @@ echo "$row[0]|"; if ( (strlen($exten)<1) or (strlen($protocol)<3) ) { $channel_live=0; - echo "Exten $exten non è valido o protocollo $protocol non è valido\n"; + echo "Exten $exten non e` valido o protocollo $protocol non e` valido\n"; exit; } else diff --git a/agc_2-X/branches/agc_2.0.4/LANG_www/agc_it/manager_send.php b/agc_2-X/branches/agc_2.0.4/LANG_www/agc_it/manager_send.php index 9644e5dd..3ef71c4b 100644 --- a/agc_2-X/branches/agc_2.0.4/LANG_www/agc_it/manager_send.php +++ b/agc_2-X/branches/agc_2.0.4/LANG_www/agc_it/manager_send.php @@ -1,7 +1,7 @@ LICENSE: GPLv2 +# Copyright (C) 2008 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 @@ -32,8 +32,8 @@ # - $agent_log_id - ('123456',...) # - $call_server_ip - ('10.10.10.15',...) # - $CalLCID - ('VD01234567890123456',...) -# - $stage - ('UP','DOWN') -# +# - $stage - ('UP','DOWN','2NDXfeR') +# - $session_id - ('8600051') # CHANGELOG: # 50401-1002 - First build of script, Hangup function only @@ -68,8 +68,14 @@ # 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 +# 80331-1433 - Added second transfer try for VICIDIAL transfers on manual dial calls +# 80402-0121 - Fixes for manual dial transfers on some systems +# 80424-0442 - Added non_latin lookup from system_settings # +$version = '2.0.4-31'; +$build = '80424-0442'; + require("dbconnect.php"); ### These are variable assignments for PHP globals off @@ -137,32 +143,52 @@ if (isset($_GET["enable_sipsak_messages"])) {$enable_sipsak_messages=$_GET["e 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["session_id"])) {$session_id=$_GET["session_id"];} + elseif (isset($_POST["session_id"])) {$session_id=$_POST["session_id"];} +############################################# +##### START SYSTEM_SETTINGS LOOKUP ##### +$stmt = "SELECT use_non_latin FROM system_settings;"; +$rslt=mysql_query($stmt, $link); +if ($DB) {echo "$stmt\n";} +$qm_conf_ct = mysql_num_rows($rslt); +$i=0; +while ($i < $qm_conf_ct) + { + $row=mysql_fetch_row($rslt); + $non_latin = $row[0]; + $i++; + } +##### END SETTINGS LOOKUP ##### +########################################### + +if ($non_latin < 1) +{ $user=ereg_replace("[^0-9a-zA-Z]","",$user); $pass=ereg_replace("[^0-9a-zA-Z]","",$pass); $secondS = ereg_replace("[^0-9]","",$secondS); +} # default optional vars if not set if (!isset($ACTION)) {$ACTION="Originate";} if (!isset($format)) {$format="alert";} if (!isset($ext_priority)) {$ext_priority="1";} -$version = '2.0.29'; -$build = '70320-1502'; $StarTtime = date("U"); $NOW_DATE = date("Y-m-d"); $NOW_TIME = date("Y-m-d H:i:s"); if (!isset($query_date)) {$query_date = $NOW_DATE;} - $stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; +$stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$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]; if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) { - echo "Non valido Utentename/Parola d`accesso: |$user|$pass|\n"; + echo "Utentename/Password non validi: |$user|$pass|\n"; exit; } else @@ -170,7 +196,7 @@ if (!isset($query_date)) {$query_date = $NOW_DATE;} if( (strlen($server_ip)<6) or (!isset($server_ip)) or ( (strlen($session_name)<12) or (!isset($session_name)) ) ) { - echo "Non valido server_ip: |$server_ip| or Non valido session_name: |$session_name|\n"; + echo "ip del server non valido: |$server_ip| or Nome sessione non valido: |$session_name|\n"; exit; } else @@ -182,7 +208,7 @@ if (!isset($query_date)) {$query_date = $NOW_DATE;} $SNauth=$row[0]; if($SNauth==0) { - echo "Non valido session_name: |$session_name|$server_ip|\n"; + echo "Nome sessione non valido: |$session_name|$server_ip|\n"; exit; } else @@ -196,8 +222,8 @@ if ($format=='debug') { echo "\n"; echo "\n"; -echo "\n"; -echo "Il Responsabile invia a: "; +echo "<!-- VERSIONE: $version BUILD: $build ACTION: $ACTION server_ip: $server_ip-->\n"; +echo "<title>Invio Manager: "; if ($ACTION=="Originate") {echo "Originate";} if ($ACTION=="Redirect") {echo "Redirect";} if ($ACTION=="RedirectName") {echo "RedirectName";} @@ -220,14 +246,14 @@ if ($ACTION=="SysCIDOriginate") { if ( (strlen($exten)<1) or (strlen($channel)<1) or (strlen($ext_context)<1) or (strlen($queryCID)<1) ) { - echo "Exten $exten non è valido or queryCID $queryCID non è valido, Originate comando non inserito\n"; + echo "Exten $exten non e` valido or queryCID $queryCID non e` valido, Originate comando non inserito\n"; } else { $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$queryCID','Channel: $channel','Context: $ext_context','Exten: $exten','Priority: $ext_priority','Callerid: $queryCID','','','','','');"; if ($format=='debug') {echo "\n<!-- $stmt -->";} $rslt=mysql_query($stmt, $link); - echo "Originate comando inviato a Exten $exten Canale $channel su $server_ip\n"; + echo "Originate comando inviato per Exten $exten Canale $channel su $server_ip\n"; } } @@ -241,12 +267,12 @@ if ($ACTION=="OriginateName") if ( (strlen($channel)<3) or (strlen($queryCID)<15) or (strlen($extenName)<1) or (strlen($ext_context)<1) or (strlen($ext_priority)<1) ) { $channel_live=0; - echo "Una di queste variabili non è valido:\n"; - echo "Canale $channel deve essere più grande di 2 caratteri\n"; - echo "queryCID $queryCID deve essere più grande di 14 caratteri\n"; - echo "extenName $extenName deve essere regolato\n"; - echo "ext_context $ext_context deve essere regolato\n"; - echo "ext_priority $ext_priority deve essere regolato\n"; + echo "Una di queste variabili non e` valido:\n"; + echo "Canale $channel deve essere piu` grande di 2 caratteri\n"; + echo "queryCID $queryCID deve essere piu` grande di 14 caratteri\n"; + echo "extenName $extenName deve essere settato\n"; + echo "ext_context $ext_context deve essere settato\n"; + echo "ext_priority $ext_priority deve essere settato\n"; echo "\nOriginateName Action non trasmesso\n"; } else @@ -269,13 +295,13 @@ if ($ACTION=="OriginateNameVmail") if ( (strlen($channel)<3) or (strlen($queryCID)<15) or (strlen($extenName)<1) or (strlen($exten)<1) or (strlen($ext_context)<1) or (strlen($ext_priority)<1) ) { $channel_live=0; - echo "Una di queste variabili non è valido:\n"; - echo "Canale $channel deve essere più grande di 2 caratteri\n"; - echo "queryCID $queryCID deve essere più grande di 14 caratteri\n"; - echo "extenName $extenName deve essere regolato\n"; - echo "exten $exten deve essere regolato\n"; - echo "ext_context $ext_context deve essere regolato\n"; - echo "ext_priority $ext_priority deve essere regolato\n"; + echo "Una di queste variabili non e` valido:\n"; + echo "Canale $channel deve essere piu` grande di 2 caratteri\n"; + echo "queryCID $queryCID deve essere piu` grande di 14 caratteri\n"; + echo "extenName $extenName deve essere settato\n"; + echo "exten $exten deve essere settato\n"; + echo "ext_context $ext_context deve essere settato\n"; + echo "ext_priority $ext_priority deve essere settato\n"; echo "\nOriginateNameVmail Action non trasmesso\n"; } else @@ -312,7 +338,7 @@ if ($ACTION=="Originate") { if ( (strlen($exten)<1) or (strlen($channel)<1) or (strlen($ext_context)<1) or (strlen($queryCID)<10) ) { - echo "Exten $exten non è valido or queryCID $queryCID non è valido, Originate comando non inserito\n"; + echo "Exten $exten non e` valido or queryCID $queryCID non e` valido, Originate comando non inserito\n"; } else { @@ -323,7 +349,7 @@ if ($ACTION=="Originate") $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$queryCID','Channel: $channel','Context: $ext_context','Exten: $exten','Priority: $ext_priority','Callerid: $outCID','','','','','');"; if ($format=='debug') {echo "\n<!-- $stmt -->";} $rslt=mysql_query($stmt, $link); - echo "Originate comando inviato a Exten $exten Canale $channel su $server_ip\n"; + echo "Originate comando inviato per Exten $exten Canale $channel su $server_ip\n"; } } @@ -339,7 +365,7 @@ if ($ACTION=="HangupConfDial") if ( (strlen($exten)<3) or (strlen($queryCID)<15) or (strlen($ext_context)<1) ) { $channel_live=0; - echo "conference $exten non è valido or ext_context $ext_context or queryCID $queryCID non è valido, Hangup comando non inserito\n"; + echo "conference $exten non e` valido or ext_context $ext_context or queryCID $queryCID non e` valido, Hangup comando non inserito\n"; } else { @@ -376,7 +402,7 @@ if ($ACTION=="Hangup") if ( (strlen($channel)<3) or (strlen($queryCID)<15) ) { $channel_live=0; - echo "Canale $channel non è valido or queryCID $queryCID non è valido, Hangup comando non inserito\n"; + echo "Canale $channel non e` valido or queryCID $queryCID non e` valido, Hangup comando non inserito\n"; } else { @@ -406,7 +432,7 @@ if ($ACTION=="Hangup") $rowx=mysql_fetch_row($rslt); if ($rowx[0]==0) { - echo "Call $CalLCID $channel non è attivo su $call_server_ip, Checking Live Canale...\n"; + echo "Call $CalLCID $channel non e` attivo su $call_server_ip, Checking Live Canale...\n"; $stmt="SELECT count(*) FROM live_channels where server_ip = '$call_server_ip' and channel='$channel' and extension LIKE \"%$exten\";"; if ($format=='debug') {echo "\n<!-- $stmt -->";} @@ -415,7 +441,7 @@ if ($ACTION=="Hangup") if ($row[0]==0) { $channel_live=0; - echo "Canale $channel non è attivo su $call_server_ip, Hangup comando non inserito $rowx[0]\n$stmt\n"; + echo "Canale $channel non e` attivo su $call_server_ip, Hangup comando non inserito $rowx[0]\n$stmt\n"; } else { @@ -428,7 +454,7 @@ if ($ACTION=="Hangup") $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$call_server_ip','','Hangup','$queryCID','Channel: $channel','','','','','','','','','');"; if ($format=='debug') {echo "\n<!-- $stmt -->";} $rslt=mysql_query($stmt, $link); - echo "Hangup comando inviato a Canale $channel su $call_server_ip\n"; + echo "Hangup comando inviato per Canale $channel su $call_server_ip\n"; } } } @@ -444,16 +470,16 @@ if ($ACTION=="RedirectVD") if ( (strlen($channel)<3) or (strlen($queryCID)<15) or (strlen($exten)<1) or (strlen($campaign)<1) or (strlen($ext_context)<1) or (strlen($ext_priority)<1) or (strlen($uniqueid)<2) or (strlen($lead_id)<1) ) { $channel_live=0; - echo "Una di queste variabili non è valido:\n"; - echo "Canale $channel deve essere più grande di 2 caratteri\n"; - echo "queryCID $queryCID deve essere più grande di 14 caratteri\n"; - echo "exten $exten deve essere regolato\n"; - echo "ext_context $ext_context deve essere regolato\n"; - echo "ext_priority $ext_priority deve essere regolato\n"; - echo "auto_dial_level $auto_dial_level deve essere regolato\n"; - echo "campaign $campaign deve essere regolato\n"; - echo "uniqueid $uniqueid deve essere regolato\n"; - echo "lead_id $lead_id deve essere regolato\n"; + echo "Una di queste variabili non e` valido:\n"; + echo "Canale $channel deve essere piu` grande di 2 caratteri\n"; + echo "queryCID $queryCID deve essere piu` grande di 14 caratteri\n"; + echo "exten $exten deve essere settato\n"; + echo "ext_context $ext_context deve essere settato\n"; + echo "ext_priority $ext_priority deve essere settato\n"; + echo "auto_dial_level $auto_dial_level deve essere settato\n"; + echo "campaign $campaign deve essere settato\n"; + echo "uniqueid $uniqueid deve essere settato\n"; + echo "lead_id $lead_id deve essere settato\n"; echo "\nRedirectVD Action non trasmesso\n"; } else @@ -491,14 +517,14 @@ if ($ACTION=="RedirectToPark") if ( (strlen($channel)<3) or (strlen($queryCID)<15) or (strlen($exten)<1) or (strlen($extenName)<1) or (strlen($ext_context)<1) or (strlen($ext_priority)<1) or (strlen($parkedby)<1) ) { $channel_live=0; - echo "Una di queste variabili non è valido:\n"; - echo "Canale $channel deve essere più grande di 2 caratteri\n"; - echo "queryCID $queryCID deve essere più grande di 14 caratteri\n"; - echo "exten $exten deve essere regolato\n"; - echo "extenName $extenName deve essere regolato\n"; - echo "ext_context $ext_context deve essere regolato\n"; - echo "ext_priority $ext_priority deve essere regolato\n"; - echo "parkedby $parkedby deve essere regolato\n"; + echo "Una di queste variabili non e` valido:\n"; + echo "Canale $channel deve essere piu` grande di 2 caratteri\n"; + echo "queryCID $queryCID deve essere piu` grande di 14 caratteri\n"; + echo "exten $exten deve essere settato\n"; + echo "extenName $extenName deve essere settato\n"; + echo "ext_context $ext_context deve essere settato\n"; + echo "ext_priority $ext_priority deve essere settato\n"; + echo "parkedby $parkedby deve essere settato\n"; echo "\nRedirectToPark Action non trasmesso\n"; } else @@ -516,12 +542,12 @@ if ($ACTION=="RedirectFromPark") if ( (strlen($channel)<3) or (strlen($queryCID)<15) or (strlen($exten)<1) or (strlen($ext_context)<1) or (strlen($ext_priority)<1) ) { $channel_live=0; - echo "Una di queste variabili non è valido:\n"; - echo "Canale $channel deve essere più grande di 2 caratteri\n"; - echo "queryCID $queryCID deve essere più grande di 14 caratteri\n"; - echo "exten $exten deve essere regolato\n"; - echo "ext_context $ext_context deve essere regolato\n"; - echo "ext_priority $ext_priority deve essere regolato\n"; + echo "Una di queste variabili non e` valido:\n"; + echo "Canale $channel deve essere piu` grande di 2 caratteri\n"; + echo "queryCID $queryCID deve essere piu` grande di 14 caratteri\n"; + echo "exten $exten deve essere settato\n"; + echo "ext_context $ext_context deve essere settato\n"; + echo "ext_priority $ext_priority deve essere settato\n"; echo "\nRedirectFromPark Action non trasmesso\n"; } else @@ -539,12 +565,12 @@ if ($ACTION=="RedirectName") if ( (strlen($channel)<3) or (strlen($queryCID)<15) or (strlen($extenName)<1) or (strlen($ext_context)<1) or (strlen($ext_priority)<1) ) { $channel_live=0; - echo "Una di queste variabili non è valido:\n"; - echo "Canale $channel deve essere più grande di 2 caratteri\n"; - echo "queryCID $queryCID deve essere più grande di 14 caratteri\n"; - echo "extenName $extenName deve essere regolato\n"; - echo "ext_context $ext_context deve essere regolato\n"; - echo "ext_priority $ext_priority deve essere regolato\n"; + echo "Una di queste variabili non e` valido:\n"; + echo "Canale $channel deve essere piu` grande di 2 caratteri\n"; + echo "queryCID $queryCID deve essere piu` grande di 14 caratteri\n"; + echo "extenName $extenName deve essere settato\n"; + echo "ext_context $ext_context deve essere settato\n"; + echo "ext_priority $ext_priority deve essere settato\n"; echo "\nRedirectName Action non trasmesso\n"; } else @@ -567,13 +593,13 @@ if ($ACTION=="RedirectNameVmail") if ( (strlen($channel)<3) or (strlen($queryCID)<15) or (strlen($extenName)<1) or (strlen($exten)<1) or (strlen($ext_context)<1) or (strlen($ext_priority)<1) ) { $channel_live=0; - echo "Una di queste variabili non è valido:\n"; - echo "Canale $channel deve essere più grande di 2 caratteri\n"; - echo "queryCID $queryCID deve essere più grande di 14 caratteri\n"; - echo "extenName $extenName deve essere regolato\n"; - echo "exten $exten deve essere regolato\n"; - echo "ext_context $ext_context deve essere regolato\n"; - echo "ext_priority $ext_priority deve essere regolato\n"; + echo "Una di queste variabili non e` valido:\n"; + echo "Canale $channel deve essere piu` grande di 2 caratteri\n"; + echo "queryCID $queryCID deve essere piu` grande di 14 caratteri\n"; + echo "extenName $extenName deve essere settato\n"; + echo "exten $exten deve essere settato\n"; + echo "ext_context $ext_context deve essere settato\n"; + echo "ext_priority $ext_priority deve essere settato\n"; echo "\nRedirectNameVmail Action non trasmesso\n"; } else @@ -601,13 +627,13 @@ if ($ACTION=="RedirectXtraCX") { $channel_liveX=0; $channel_liveY=0; - echo "Una di queste variabili non è valido:\n"; - echo "Canale $channel deve essere più grande di 2 caratteri\n"; - echo "ExtraCanale $extrachannel deve essere più grande di 2 caratteri\n"; - echo "queryCID $queryCID deve essere più grande di 14 caratteri\n"; - echo "exten $exten deve essere regolato\n"; - echo "ext_context $ext_context deve essere regolato\n"; - echo "ext_priority $ext_priority deve essere regolato\n"; + echo "Una di queste variabili non e` valido:\n"; + echo "Canale $channel deve essere piu` grande di 2 caratteri\n"; + echo "ExtraCanale $extrachannel deve essere piu` grande di 2 caratteri\n"; + echo "queryCID $queryCID deve essere piu` grande di 14 caratteri\n"; + echo "exten $exten deve essere settato\n"; + echo "ext_context $ext_context deve essere settato\n"; + echo "ext_priority $ext_priority deve essere settato\n"; echo "\nRedirect Action non trasmesso\n"; if (ereg("SECOND|FIRST|DEBUG",$filename)) { @@ -636,8 +662,8 @@ if ($ACTION=="RedirectXtraCX") if ($rowx[0]==0) { $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";} + echo "Canale $channel non e` attivo su $call_server_ip, Redirect comando non inserito\n"; + if (ereg("SECOND|FIRST|DEBUG",$filename)) {$DBout .= "$channel non e` attivo su $call_server_ip";} } } $stmt="SELECT count(*) FROM live_channels where server_ip = '$server_ip' and channel='$extrachannel';"; @@ -653,8 +679,8 @@ if ($ACTION=="RedirectXtraCX") if ($rowx[0]==0) { $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";} + echo "Canale $channel non e` attivo su $server_ip, Redirect comando non inserito\n"; + if (ereg("SECOND|FIRST|DEBUG",$filename)) {$DBout .= "$channel non e` attivo su $server_ip";} } } if ( ($channel_liveX==1) && ($channel_liveY==1) ) @@ -699,7 +725,7 @@ if ($ACTION=="RedirectXtraCX") if ($format=='debug') {echo "\n<!-- $stmt -->";} $rslt=mysql_query($stmt, $link); - echo "RedirectXtraCX comando inviato a Canale $channel su $call_server_ip and \nHungup $extrachannel su $server_ip\n"; + echo "RedirectXtraCX comando inviato per 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";} } } @@ -738,13 +764,13 @@ if ($ACTION=="RedirectXtra") { $channel_liveX=0; $channel_liveY=0; - echo "Una di queste variabili non è valido:\n"; - echo "Canale $channel deve essere più grande di 2 caratteri\n"; - echo "ExtraCanale $extrachannel deve essere più grande di 2 caratteri\n"; - echo "queryCID $queryCID deve essere più grande di 14 caratteri\n"; - echo "exten $exten deve essere regolato\n"; - echo "ext_context $ext_context deve essere regolato\n"; - echo "ext_priority $ext_priority deve essere regolato\n"; + echo "Una di queste variabili non e` valido:\n"; + echo "Canale $channel deve essere piu` grande di 2 caratteri\n"; + echo "ExtraCanale $extrachannel deve essere piu` grande di 2 caratteri\n"; + echo "queryCID $queryCID deve essere piu` grande di 14 caratteri\n"; + echo "exten $exten deve essere settato\n"; + echo "ext_context $ext_context deve essere settato\n"; + echo "ext_priority $ext_priority deve essere settato\n"; echo "\nRedirect Action non trasmesso\n"; if (ereg("SECOND|FIRST|DEBUG",$filename)) { @@ -774,8 +800,8 @@ if ($ACTION=="RedirectXtra") else { $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";} + echo "Impossibile trovare conferenze vuote su $server_ip, Redirect comando non inserito\n"; + if (ereg("SECOND|FIRST|DEBUG",$filename)) {$DBout .= "Impossibile trovare conferenze vuote su $server_ip";} } } @@ -794,8 +820,8 @@ if ($ACTION=="RedirectXtra") if ($rowx[0]==0) { $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";} + echo "Canale $channel non e` attivo su $call_server_ip, Redirect comando non inserito\n"; + if (ereg("SECOND|FIRST|DEBUG",$filename)) {$DBout .= "$channel non e` attivo su $call_server_ip";} } } $stmt="SELECT count(*) FROM live_channels where server_ip = '$server_ip' and channel='$extrachannel';"; @@ -811,8 +837,8 @@ if ($ACTION=="RedirectXtra") if ($rowx[0]==0) { $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";} + echo "Canale $channel non e` attivo su $server_ip, Redirect comando non inserito\n"; + if (ereg("SECOND|FIRST|DEBUG",$filename)) {$DBout .= "$channel non e` attivo su $server_ip";} } } if ( ($channel_liveX==1) && ($channel_liveY==1) ) @@ -823,7 +849,7 @@ if ($ACTION=="RedirectXtra") if ($format=='debug') {echo "\n<!-- $stmt -->";} $rslt=mysql_query($stmt, $link); - echo "RedirectXtra comando inviato a Canale $channel and \nExtraCanale $extrachannel\n to $exten su $server_ip\n"; + echo "RedirectXtra comando inviato per 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 @@ -848,7 +874,7 @@ if ($ACTION=="RedirectXtra") if ($format=='debug') {echo "\n<!-- $stmt -->";} $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"; + echo "RedirectXtra comando inviato per 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";} } } @@ -878,17 +904,40 @@ if ($ACTION=="RedirectXtra") if ($ACTION=="Redirect") { + ### for manual dial VICIDial calls send the second attempt to transfer the call + if ($stage=="2NDXfeR") + { + $local_DEF = 'Local/'; + $local_AMP = '@'; + $hangup_channel_prefix = "$local_DEF$session_id$local_AMP$ext_context"; + + $stmt="SELECT count(*) FROM live_sip_channels where server_ip = '$server_ip' and channel LIKE \"$hangup_channel_prefix%\";"; + if ($format=='debug') {echo "\n<!-- $stmt -->";} + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + if ($row > 0) + { + $stmt="SELECT channel FROM live_sip_channels where server_ip = '$server_ip' and channel LIKE \"$hangup_channel_prefix%\";"; + if ($format=='debug') {echo "\n<!-- $stmt -->";} + $rslt=mysql_query($stmt, $link); + $rowx=mysql_fetch_row($rslt); + $channel=$rowx[0]; + $channel = eregi_replace("1$","2",$channel); + $queryCID = eregi_replace("^.","Q",$queryCID); + } + } + $row=''; $rowx=''; $channel_live=1; if ( (strlen($channel)<3) or (strlen($queryCID)<15) or (strlen($exten)<1) or (strlen($ext_context)<1) or (strlen($ext_priority)<1) ) { $channel_live=0; - echo "Una di queste variabili non è valido:\n"; - echo "Canale $channel deve essere più grande di 2 caratteri\n"; - echo "queryCID $queryCID deve essere più grande di 14 caratteri\n"; - echo "exten $exten deve essere regolato\n"; - echo "ext_context $ext_context deve essere regolato\n"; - echo "ext_priority $ext_priority deve essere regolato\n"; + echo "Una di queste variabili non e` valido:\n"; + echo "Canale $channel deve essere piu` grande di 2 caratteri\n"; + echo "queryCID $queryCID deve essere piu` grande di 14 caratteri\n"; + echo "exten $exten deve essere settato\n"; + echo "ext_context $ext_context deve essere settato\n"; + echo "ext_priority $ext_priority deve essere settato\n"; echo "\nRedirect Action non trasmesso\n"; } else @@ -907,7 +956,7 @@ if ($ACTION=="Redirect") if ($rowx[0]==0) { $channel_live=0; - echo "Canale $channel non è attivo su $server_ip, Redirect comando non inserito\n"; + echo "Canale $channel non e` attivo su $server_ip, Redirect comando non inserito\n"; } } if ($channel_live==1) @@ -916,7 +965,7 @@ if ($ACTION=="Redirect") if ($format=='debug') {echo "\n<!-- $stmt -->";} $rslt=mysql_query($stmt, $link); - echo "Redirect comando inviato a Canale $channel su $server_ip\n"; + echo "Redirect comando inviato per Canale $channel su $server_ip\n"; } } } @@ -938,7 +987,7 @@ if ( ($ACTION=="Monitor") || ($ACTION=="StopMonitor") ) if ( (strlen($channel)<3) or (strlen($queryCID)<15) or (strlen($filename)<15) ) { $channel_live=0; - echo "Canale $channel non è valido or queryCID $queryCID non è valido or filename: $filename non è valido, $ACTION comando non inserito\n"; + echo "Canale $channel non e` valido or queryCID $queryCID non e` valido or filename: $filename non e` valido, $ACTION comando non inserito\n"; } else { @@ -955,7 +1004,7 @@ if ( ($ACTION=="Monitor") || ($ACTION=="StopMonitor") ) if ($rowx[0]==0) { $channel_live=0; - echo "Canale $channel non è attivo su $server_ip, $ACTION comando non inserito\n"; + echo "Canale $channel non e` attivo su $server_ip, $ACTION comando non inserito\n"; } } if ($channel_live==1) @@ -997,7 +1046,7 @@ if ( ($ACTION=="Monitor") || ($ACTION=="StopMonitor") ) } } - echo "$ACTION comando inviato a Canale $channel su $server_ip\nFilename: $filename\nRecorDing_ID: $recording_id\n"; + echo "$ACTION comando inviato per Canale $channel su $server_ip\nFilename: $filename\nRecorDing_ID: $recording_id\n"; } } } @@ -1017,7 +1066,7 @@ if ( ($ACTION=="MonitorConf") || ($ACTION=="StopMonitorConf") ) if ( (strlen($exten)<3) or (strlen($channel)<4) or (strlen($filename)<15) ) { $channel_live=0; - echo "Canale $channel non è valido or exten $exten non è valido or filename: $filename non è valido, $ACTION comando non inserito\n"; + echo "Canale $channel non e` valido or exten $exten non e` valido or filename: $filename non e` valido, $ACTION comando non inserito\n"; } else { @@ -1081,7 +1130,7 @@ if ( ($ACTION=="MonitorConf") || ($ACTION=="StopMonitorConf") ) } } - echo "$ACTION comando inviato a Canale $channel su $server_ip\nFilename: $filename\nRecorDing_ID: $recording_id\n LA REGISTRAZIONE DURERÀ FINO A 60 MINUTI\n"; + echo "$ACTION comando inviato per Canale $channel su $server_ip\nFilename: $filename\nRecorDing_ID: $recording_id\n LA REGISTRAZIONE DURERA` FINO A 60 MINUTI\n"; } } @@ -1096,7 +1145,7 @@ if ($ACTION=="VolumeControl") { if ( (strlen($exten)<1) or (strlen($channel)<1) or (strlen($stage)<1) or (strlen($queryCID)<1) ) { - echo "Conferenza $exten, Stage $stage non è valido or queryCID $queryCID non è valido, Originate comando non inserito\n"; + echo "Conferenza $exten, Stage $stage non e` valido or queryCID $queryCID non e` valido, Originate comando non inserito\n"; } else { @@ -1112,7 +1161,7 @@ if ($ACTION=="VolumeControl") $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$queryCID','Channel: $volume_local_channel','Context: $ext_context','Exten: 8300','Priority: 1','Callerid: $queryCID','','','','$channel','$exten');"; if ($format=='debug') {echo "\n<!-- $stmt -->";} $rslt=mysql_query($stmt, $link); - echo "Volume comando inviato a Conferenza $exten, Stage $stage Canale $channel su $server_ip\n"; + echo "Volume comando inviato per Conferenza $exten, Stage $stage Canale $channel su $server_ip\n"; } } diff --git a/agc_2-X/branches/agc_2.0.4/LANG_www/agc_it/park_calls_display.php b/agc_2-X/branches/agc_2.0.4/LANG_www/agc_it/park_calls_display.php index 5d246559..704cbbc5 100644 --- a/agc_2-X/branches/agc_2.0.4/LANG_www/agc_it/park_calls_display.php +++ b/agc_2-X/branches/agc_2.0.4/LANG_www/agc_it/park_calls_display.php @@ -64,14 +64,14 @@ if (!isset($query_date)) {$query_date = $NOW_DATE;} if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0) ) { - echo "Non valido Utentename/Parola d`accesso: |$user|$pass|\n"; + echo "Utentename/Password non validi: |$user|$pass|\n"; exit; } else { if( (strlen($server_ip)<6) or (!isset($server_ip)) or ( (strlen($session_name)<12) or (!isset($session_name)) ) ) { - echo "Non valido server_ip: |$server_ip| or Non valido session_name: |$session_name|\n"; + echo "ip del server non valido: |$server_ip| or Nome sessione non valido: |$session_name|\n"; exit; } else @@ -83,7 +83,7 @@ if (!isset($query_date)) {$query_date = $NOW_DATE;} $SNauth=$row[0]; if($SNauth==0) { - echo "Non valido session_name: |$session_name|$server_ip|\n"; + echo "Nome sessione non valido: |$session_name|$server_ip|\n"; exit; } else @@ -97,8 +97,8 @@ if ($format=='debug') { echo "<html>\n"; echo "<head>\n"; -echo "<!-- VERSIONE: $version CONFIGURAZIONE: $build EXTEN: $exten server_ip: $server_ip-->\n"; -echo "<title>Display Chiamate Parcheggiate"; +echo "<!-- VERSIONE: $version BUILD: $build EXTEN: $exten server_ip: $server_ip-->\n"; +echo "<title>Display Chiamate in Attesa"; echo "\n"; echo "\n"; echo "\n"; @@ -110,7 +110,7 @@ echo " if ( (strlen($exten)<1) or (strlen($protocol)<3) ) { $channel_live=0; - echo "Exten $exten non è valido o protocollo $protocol non è valido\n"; + echo "Exten $exten non e` valido o protocollo $protocol non e` valido\n"; exit; } else diff --git a/agc_2-X/branches/agc_2.0.4/LANG_www/agc_it/vdc_db_query.php b/agc_2-X/branches/agc_2.0.4/LANG_www/agc_it/vdc_db_query.php index 91f09062..9f6e0341 100644 --- a/agc_2-X/branches/agc_2.0.4/LANG_www/agc_it/vdc_db_query.php +++ b/agc_2-X/branches/agc_2.0.4/LANG_www/agc_it/vdc_db_query.php @@ -1,7 +1,7 @@ LICENSE: GPLv2 +# Copyright (C) 2008 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 @@ -69,6 +69,7 @@ # - $use_internal_dnc - ('Y','N') # - $omit_phone_code - ('Y','N') # - $no_delete_sessions - ('0','1') +# - $LogouTKicKAlL - ('0','1'); # CHANGELOG: # 50629-1044 - First build of script @@ -138,10 +139,14 @@ # 71120-1520 - added LogiNCamPaigns to show only allowed campaigns for agents upon login # 71125-1751 - Added inbound-group default inbound group sending to vicidial.php # 71129-2025 - restricted callbacks count and list to campaign only +# 71226-1117 - added option to kick all calls from conference upon logout +# 80128-1159 - fixed vicidial_log bugs +# 80402-0121 - Fixes for manual dial transfers on some systems, removed /n persist flag +# 80424-0442 - Added non_latin lookup from system_settings # -$version = '2.0.4-65'; -$build = '71129-2025'; +$version = '2.0.4-69'; +$build = '80424-0442'; require("dbconnect.php"); @@ -274,14 +279,38 @@ if (isset($_GET["enable_sipsak_messages"])) {$enable_sipsak_messages=$_GET["e elseif (isset($_POST["enable_sipsak_messages"])) {$enable_sipsak_messages=$_POST["enable_sipsak_messages"];} if (isset($_GET["status"])) {$status=$_GET["status"];} elseif (isset($_POST["status"])) {$status=$_POST["status"];} +if (isset($_GET["LogouTKicKAlL"])) {$LogouTKicKAlL=$_GET["LogouTKicKAlL"];} + elseif (isset($_POST["LogouTKicKAlL"])) {$LogouTKicKAlL=$_POST["LogouTKicKAlL"];} +header ("Content-type: text/html; charset=utf-8"); +header ("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1 +header ("Pragma: no-cache"); // HTTP/1.0 + +############################################# +##### START SYSTEM_SETTINGS LOOKUP ##### +$stmt = "SELECT use_non_latin FROM system_settings;"; +$rslt=mysql_query($stmt, $link); +if ($DB) {echo "$stmt\n";} +$qm_conf_ct = mysql_num_rows($rslt); +$i=0; +while ($i < $qm_conf_ct) + { + $row=mysql_fetch_row($rslt); + $non_latin = $row[0]; + $i++; + } +##### END SETTINGS LOOKUP ##### +########################################### + +if ($non_latin < 1) +{ $user=ereg_replace("[^0-9a-zA-Z]","",$user); $pass=ereg_replace("[^0-9a-zA-Z]","",$pass); $length_in_sec = ereg_replace("[^0-9]","",$length_in_sec); $phone_code = ereg_replace("[^0-9]","",$phone_code); $phone_number = ereg_replace("[^0-9]","",$phone_number); - +} # default optional vars if not set if (!isset($format)) {$format="text";} @@ -305,20 +334,21 @@ else { $stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$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]; if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) { - echo "Non valido Utentename/Parola d`accesso: |$user|$pass|\n"; + echo "Utentename/Password non validi: |$user|$pass|\n"; exit; } else { if( (strlen($server_ip)<6) or (!isset($server_ip)) or ( (strlen($session_name)<12) or (!isset($session_name)) ) ) { - echo "Non valido server_ip: |$server_ip| or Non valido session_name: |$session_name|\n"; + echo "ip del server non valido: |$server_ip| or Nome sessione non valido: |$session_name|\n"; exit; } else @@ -330,7 +360,7 @@ else $SNauth=$row[0]; if($SNauth==0) { - echo "Non valido session_name: |$session_name|$server_ip|\n"; + echo "Nome sessione non valido: |$session_name|$server_ip|\n"; exit; } else @@ -345,7 +375,7 @@ if ($format=='debug') { echo "\n"; echo "\n"; -echo "\n"; +echo "\n"; echo "VICIDiaL Script per query su Database"; echo "\n"; echo "\n"; @@ -370,7 +400,7 @@ if ($ACTION == 'LogiNCamPaigns') else { echo "\n"; @@ -446,21 +470,21 @@ echo " echo "\n"; echo "


"; echo ""; -echo ""; +echo ""; echo "\n"; echo "\n"; -echo ""; +echo ""; echo "\n"; -echo ""; +echo ""; echo "\n"; -echo ""; +echo ""; echo "\n"; -echo ""; +echo ""; echo "\n"; echo ""; echo "\n"; echo "\n"; -echo "\n"; +echo "\n"; echo "
Re-login attività Re-Login
 
Inizio attività Telefono:
Login Telefono:
Parola d`accesso del Telefono:
Password Telefono:
Inizio attività dell`Utente:
Login Utente:
Parola d`accesso Dell`Utente:
Password Utente:
Campagna: $camp_form_code

VERSIONE: $version       CONFIGURAZIONE: $build

VERSIONE: $version       BUILD: $build
\n"; echo "\n\n"; echo "\n\n"; @@ -472,7 +496,7 @@ if ($user_login_first == 1) { if ( (strlen($VD_login)<1) or (strlen($VD_pass)<1) or (strlen($VD_campaign)<1) ) { - echo "Web client di VICICHIAMA: Inizio attività della Campagna\n"; + echo "VICIDial web client: Login Campagna\n"; echo "\n"; echo "\n"; echo "\n"; @@ -482,21 +506,21 @@ echo "
\n"; #echo "\n"; #echo "\n"; - echo "

Inizio attività dell`Utente

"; + echo "

Login Utente

"; echo ""; echo ""; - echo ""; + echo ""; echo "\n"; echo "\n"; - echo ""; + echo ""; echo "\n"; - echo ""; + echo ""; echo "\n"; echo ""; echo "\n"; echo "\n"; - echo "\n"; + echo "\n"; echo "
Inizio attività della Campagna Login Campagna
 
Inizio attività dell`Utente:
Login Utente:
Parola d`accesso Dell`Utente:
Password Utente:
Campagna: $camp_form_code
  \n"; echo "

VERSIONE: $version       CONFIGURAZIONE: $build

VERSIONE: $version       BUILD: $build
\n"; echo "\n\n"; echo "\n\n"; @@ -509,13 +533,12 @@ echo "
0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $phone_login=$row[0]; $phone_pass=$row[1]; - echo "Web client di VICICHIAMA: Inizio attività\n"; + echo "VICIDial web client: Login\n"; echo "\n"; echo "\n"; echo "\n"; @@ -525,22 +548,22 @@ echo "
\n"; echo "


"; echo ""; - echo ""; + echo ""; echo "\n"; echo "\n"; - echo ""; + echo ""; echo "\n"; - echo ""; + echo ""; echo "\n"; - echo ""; + echo ""; echo "\n"; - echo ""; + echo ""; echo "\n"; echo ""; echo "\n"; echo "\n"; - echo "\n"; + echo "\n"; echo "
Inizio attività Login
 
Inizio attività Telefono:
Login Telefono:
Parola d`accesso del Telefono:
Password Telefono:
Inizio attività dell`Utente:
Login Utente:
Parola d`accesso Dell`Utente:
Password Utente:
Campagna: $camp_form_code
  \n"; echo "

VERSIONE: $version       CONFIGURAZIONE: $build

VERSIONE: $version       BUILD: $build
\n"; echo "\n\n"; echo "\n\n"; @@ -553,7 +576,7 @@ echo "
Web client di VICICHIAMA: Inizio attività Telefono\n"; +echo "VICIDial web client: Login Telefono\n"; echo "\n"; echo "\n"; echo "\n"; @@ -563,16 +586,16 @@ echo "\n"; echo "


"; echo ""; -echo ""; +echo ""; echo "\n"; echo "\n"; -echo ""; +echo ""; echo "\n"; -echo ""; +echo ""; echo "\n"; echo "\n"; -echo "\n"; +echo "\n"; echo "
Inizio attività Telefono Login Telefono
 
Inizio attività Telefono:
Login Telefono:
Parola d`accesso del Telefono:
Password Telefono:
  \n"; echo "

VERSIONE: $version       CONFIGURAZIONE: $build

VERSIONE: $version       BUILD: $build
\n"; echo "\n\n"; echo "\n\n"; @@ -593,7 +616,6 @@ $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]; @@ -604,7 +626,6 @@ $VDloginDISPLAY=0; $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,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]; @@ -630,14 +651,13 @@ $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]; if ( (!eregi(" $VD_campaign ",$LOGallowed_campaigns)) and (!eregi("ALL-CAMPAIGNS",$LOGallowed_campaigns)) ) { - echo "Web client di VICICHIAMA: VICICHIAMA Inizio attività della Campagna\n"; + echo "VICIDial web client: VICIDial Login Campagna\n"; echo "\n"; echo "\n"; echo "\n"; @@ -648,8 +668,8 @@ echo "
\n"; echo "\n"; echo "\n"; - echo "Inizio attività: \n
"; - echo "Parola d`accesso:
\n"; + echo "Login: \n
"; + echo "Password:
\n"; echo "Campagna: $camp_form_code
\n"; echo "   \n"; echo "\n"; @@ -662,7 +682,6 @@ echo "
0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $CAMPactive=$row[0]; @@ -674,7 +693,6 @@ 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); @@ -691,7 +709,6 @@ 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); @@ -712,7 +729,6 @@ 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); @@ -743,7 +759,6 @@ echo " 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $row=mysql_fetch_row($rslt); @@ -802,7 +817,6 @@ 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); @@ -828,7 +842,6 @@ echo " 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $closer_ct = mysql_num_rows($rslt); @@ -852,7 +865,6 @@ echo " 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $xfer_ct = mysql_num_rows($rslt); @@ -871,18 +883,17 @@ echo " 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $row=mysql_fetch_row($rslt); $campaign_leads_to_call = $row[0]; - print "\n"; + print "\n"; } else { $VDloginDISPLAY=1; - $VDdisplayMESSAGE = "La campagna non attiva, prova di nuovo
"; + $VDdisplayMESSAGE = "Campagna non attiva, prova di nuovo
"; } } else @@ -893,12 +904,12 @@ echo "
Web client di VICICHIAMA: Inizio attività della Campagna\n"; + echo "VICIDial web client: Login Campagna\n"; echo "\n"; echo "\n"; echo "\n"; @@ -911,18 +922,18 @@ echo "

$VDdisplayMESSAGE

"; echo ""; echo ""; - echo ""; + echo ""; echo "\n"; echo "\n"; - echo ""; + echo ""; echo "\n"; - echo ""; + echo ""; echo "\n"; echo ""; echo "\n"; echo "\n"; - echo "\n"; + echo "\n"; echo "
Inizio attività della Campagna Login Campagna
 
Inizio attività dell`Utente:
Login Utente:
Parola d`accesso Dell`Utente:
Password Utente:
Campagna: $camp_form_code
  \n"; echo "

VERSIONE: $version       CONFIGURAZIONE: $build

VERSIONE: $version       BUILD: $build
\n"; echo "\n\n"; echo "\n\n"; @@ -933,13 +944,12 @@ echo "
0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $authphone=$row[0]; if (!$authphone) { - echo "Web client di VICICHIAMA: Inizio attività Telefono Error\n"; + echo "VICIDial web client: Login Telefono Error\n"; echo "\n"; echo "\n"; echo "\n"; @@ -952,15 +962,15 @@ echo "
\n"; echo "


"; echo ""; - echo ""; + echo ""; echo "\n"; - echo "\n"; - echo ""; + echo "\n"; + echo ""; echo "\n"; - echo ""; + echo ""; echo "\n"; echo "\n"; - echo "\n"; + echo "\n"; echo "
Inizio attività Error Login Error
 
Spiacente, la vostra password e login non sono attivi in questo sistema, riprova di nuovo:
 
Inizio attività Telefono:
 
Spiacente, il telefono inserito non e` attivo in questo sistema, riprova di nuovo:
 
Login Telefono:
Parola d`accesso del Telefono:
Password Telefono:

VERSIONE: $version       CONFIGURAZIONE: $build

VERSIONE: $version       BUILD: $build
\n"; echo "\n\n"; echo "\n\n"; @@ -969,10 +979,9 @@ echo "
Web client di VICICHIAMA\n"; + 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]; @@ -1050,7 +1059,6 @@ 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]; @@ -1060,20 +1068,20 @@ else { $VICIDiaL_park_on_extension = "$park_ext"; $VICIDiaL_park_on_filename = "$park_file_name"; - print "\n"; + print "\n"; } - print "\n"; + print "\n"; # If a web form address is not set, use the default one if (strlen($web_form_address)>0) { $VICIDiaL_web_form_address = "$web_form_address"; - print "\n"; + print "\n"; } else { $VICIDiaL_web_form_address = "$VICIDiaL_web_URL"; - print "\n"; + print "\n"; $VICIDiaL_web_form_address_enc = rawurlencode($VICIDiaL_web_form_address); } @@ -1104,12 +1112,10 @@ 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 ( ($campaign_allow_inbound == 'Y') || ($campaign_leads_to_call > 0) || (ereg('Y',$no_hopper_leads_logins)) ) @@ -1117,12 +1123,10 @@ else ### insert an entry into the user log for the login event $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); @@ -1139,7 +1143,6 @@ 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); @@ -1151,7 +1154,6 @@ 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"; @@ -1159,33 +1161,29 @@ 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"; + 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"; + 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"; $stmt="DELETE from vicidial_live_inbound_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"; - # print "You have logged in as user: $VD_login su phone: $SIP_user vai alla campagna: $VD_campaign
\n"; + # print "You have logged in as user: $VD_login su phone: $SIP_user nella campagna: $VD_campaign
\n"; $VICIDiaL_is_logged_in=1; ### set the callerID for manager middleware-app to connect the phone to the user @@ -1194,7 +1192,6 @@ else ############################################# ##### 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); @@ -1226,18 +1223,16 @@ else ### 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"; if ($auto_dial_level > 0) { - print "\n"; + print "\n"; ##### grab the campaign_weight and number of calls today su that campaign for the agent $stmt="SELECT campaign_weight,calls_today FROM vicidial_campaign_agents where user='$VD_login' and campaign_id = '$VD_campaign';"; - if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $vca_ct = mysql_num_rows($rslt); @@ -1254,7 +1249,6 @@ else $calls_today = '0'; $stmt="INSERT INTO vicidial_campaign_agents (user,campaign_id,campaign_rank,campaign_weight,calls_today) values('$VD_login','$VD_campaign','0','0','$calls_today');"; 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"; @@ -1262,7 +1256,6 @@ 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,campaign_weight,calls_today) values('$VD_login','$server_ip','$session_id','$SIP_user','PAUSED','','$VD_campaign','','','','$random','$NOW_TIME','$tsNOW_TIME','$NOW_TIME','$closer_chooser_string','$user_level','$campaign_weight','$calls_today');"; 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"; @@ -1274,17 +1267,15 @@ else $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';"; + $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"; + print "\n"; mysql_close($linkB); mysql_select_db("$VARDB_database", $link); @@ -1298,11 +1289,10 @@ else } else { - print "\n"; + print "\n"; $stmt="INSERT INTO vicidial_live_agents (user,server_ip,conf_exten,extension,status,lead_id,campaign_id,uniqueid,callerid,channel,random_id,last_call_time,last_update_time,last_call_finish,user_level) 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"; @@ -1314,17 +1304,15 @@ else $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';"; + $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"; + print "\n"; mysql_close($linkB); mysql_select_db("$VARDB_database", $link); @@ -1333,19 +1321,19 @@ else } else { - echo "Web client di VICICHIAMA: VICICHIAMA Inizio attività della Campagna\n"; + echo "VICIDial web client: VICIDial Login Campagna\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n";echo "\n"; echo "
English Italiano
\n"; - echo "Spiacenti, non contatti da richiamare per questa campagna\n"; + echo "Spiacenti, non ci sono contatti da chiamare per questa campagna\n"; echo "
\n"; echo "\n"; echo "\n"; echo "\n"; - echo "Inizio attività: \n
"; - echo "Parola d`accesso:
\n"; + echo "Login: \n
"; + echo "Password:
\n"; echo "Campagna: $camp_form_code
\n"; echo "   \n"; echo "\n"; @@ -1356,7 +1344,7 @@ echo "
Web client di VICICHIAMA: VICICHIAMA Inizio attività della Campagna\n"; + echo "VICIDial web client: VICIDial Login Campagna\n"; echo "\n"; echo "\n"; echo "\n"; @@ -1367,8 +1355,8 @@ echo "
\n"; echo "\n"; echo "\n"; - echo "Inizio attività: \n
"; - echo "Parola d`accesso:
\n"; + echo "Login: \n
"; + echo "Password:
\n"; echo "Campagna: $camp_form_code
\n"; echo "   \n"; echo "\n"; @@ -1394,7 +1382,6 @@ 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($link); @@ -1414,7 +1401,6 @@ echo " 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $MM_scripts = mysql_num_rows($rslt); @@ -1423,8 +1409,8 @@ echo "\"Riprendi\""; var DiaLControl_auto_HTML_ready = "\"Pausa\"\"Riprendi\""; var DiaLControl_auto_HTML_OFF = "\"Pausa\"\"Riprendi\""; @@ -2155,7 +2145,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} MD_channel_look=1; XDcheck = 'YES'; - // document.getElementById("HangupXferLine").innerHTML ="\"Attacca"; + // document.getElementById("HangupXferLine").innerHTML ="\"Aggancia"; } } } @@ -2284,11 +2274,11 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} var CamPCalLs = CamPCalLs_array[1]; if (AGLogiN != 'N') { - document.getElementById("AgentStatusStatus").innerHTML = AGLogiN; + document.getElementById("AgentStatoStato").innerHTML = AGLogiN; } if (CamPCalLs != 'N') { - document.getElementById("AgentStatusCalls").innerHTML = CamPCalLs; + document.getElementById("AgentStatoCalls").innerHTML = CamPCalLs; } if ( (AGLogiN == 'DEAD_VLA') && ( (vicidial_agent_disable == 'LIVE_AGENT') || (vicidial_agent_disable == 'ALL') ) ) { @@ -2299,7 +2289,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} showDiv('AgenTDisablEBoX'); } } - var VLAStatuS_array = check_time_array[4].split("Status: "); + var VLAStatuS_array = check_time_array[4].split("Stato: "); var VLAStatuS = VLAStatuS_array[1]; if ( (VLAStatuS == 'PAUSED') && (AutoDialWaiting == 1) ) { @@ -2326,7 +2316,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} var LMAcontent_change=0; var LMAcontent_match=0; var conv_start=-1; - var live_conf_HTML = "CHIAMATE ATTIVE NELLA VOSTRA SESSIONE:
>"; + var live_conf_HTML = "CHIAMATE ATTIVE NELLA VOSTRA SESSIONE:
#CANALE REMOTOATTACCAVOLUME
>"; if ( (LMAcount > live_conf_calls) || (LMAcount < live_conf_calls) || (LMAforce > 0)) { LMAe[0]=''; LMAe[1]=''; LMAe[2]=''; LMAe[3]=''; LMAe[4]=''; LMAe[5]=''; @@ -2342,7 +2332,16 @@ 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]; - if ( (HidEMonitoRSessionS==1) && (channelfieldA.match(/68600/)) ) + var regXFcred = new RegExp(flag_string,"g"); + if ( (channelfieldA.match(regXFcred)) && (flag_channels>0) ) + { + var chan_name_color = 'log_text_red'; + } + else + { + var chan_name_color = 'log_text'; + } + if ( (HidEMonitoRSessionS==1) && (channelfieldA.match(/ASTblind/)) ) { var hide_channel=1; } @@ -2350,11 +2349,11 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} { if (volumecontrol_active!=1) { - live_conf_HTML = live_conf_HTML + ""; + 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; @@ -2493,11 +2492,11 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} // filename = filedate + "_" + user_abb; var query_recording_exten = recording_exten; var channelrec = "Local/" + conf_silent_prefix + '' + taskconfrec + "@" + ext_context; - var conf_rec_start_html = "\"Stop"; + var conf_rec_start_html = "\"Ferma"; if (campaign_recording == 'ALLFORCE') { - document.getElementById("RecorDControl").innerHTML = "\"Inizia"; + document.getElementById("RecorDControl").innerHTML = "\"Inizia"; } else { @@ -2509,10 +2508,10 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} filename = taskconffile; var query_recording_exten = session_id; var channelrec = "Local/" + conf_silent_prefix + '' + taskconfrec + "@" + ext_context; - var conf_rec_start_html = "\"Inizia"; + var conf_rec_start_html = "\"Inizia"; if (campaign_recording == 'ALLFORCE') { - document.getElementById("RecorDControl").innerHTML = "\"Inizia"; + document.getElementById("RecorDControl").innerHTML = "\"Inizia"; } else { @@ -2555,9 +2554,10 @@ 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 +// Covers the following types: XFER, VMAIL, ENTRY, CONF, ATTESA, FROMATTESA, XfeRLOCAL, XfeRINTERNAL, XfeRBLIND, VfeRVMAIL function mainxfer_send_redirect(taskvar,taskxferconf,taskserverip,taskdebugnote) { + if (auto_dial_level == 0) {RedirecTxFEr = 1;} var xmlhttp=false; /*@cc_on @*/ /*@if (@_jscript_version >= 5) @@ -2626,11 +2626,11 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} { xferredirect_query=''; taskvar = 'NOTHING'; - alert("Il numero per il trasferimento deve avere più di 1 carattere:" + blindxferdialstring); + alert("Il numero per il trasferimento deve avere piu` di 1 carattere:" + blindxferdialstring); } else { - xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=RedirectVD&format=text&channel=" + redirectvalue + "&call_server_ip=" + redirectserverip + "&queryCID=" + queryCID + "&exten=" + blindxferdialstring + "&ext_context=" + ext_context + "&ext_priority=1&auto_dial_level=" + auto_dial_level + "&campaign=" + campaign + "&uniqueid=" + document.vicidial_form.uniqueid.value + "&lead_id=" + document.vicidial_form.lead_id.value + "&secondS=" + VD_live_call_secondS; + xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=RedirectVD&format=text&channel=" + redirectvalue + "&call_server_ip=" + redirectserverip + "&queryCID=" + queryCID + "&exten=" + blindxferdialstring + "&ext_context=" + ext_context + "&ext_priority=1&auto_dial_level=" + auto_dial_level + "&campaign=" + campaign + "&uniqueid=" + document.vicidial_form.uniqueid.value + "&lead_id=" + document.vicidial_form.lead_id.value + "&secondS=" + VD_live_call_secondS + "&session_id=" + session_id; } } if (taskvar == 'XfeRINTERNAL') @@ -2649,25 +2649,25 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} // "90009*$group**$lead_id**$phone_number*$user*"; var redirectdestination = closerxferinternal + '90009*' + XfeRSelecT.value + '**' + document.vicidial_form.lead_id.value + '**' + document.vicidial_form.phone_number.value + '*' + user + '*'; - xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=RedirectVD&format=text&channel=" + redirectvalue + "&call_server_ip=" + redirectserverip + "&queryCID=" + queryCID + "&exten=" + redirectdestination + "&ext_context=" + ext_context + "&ext_priority=1&auto_dial_level=" + auto_dial_level + "&campaign=" + campaign + "&uniqueid=" + document.vicidial_form.uniqueid.value + "&lead_id=" + document.vicidial_form.lead_id.value + "&secondS=" + VD_live_call_secondS; + xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=RedirectVD&format=text&channel=" + redirectvalue + "&call_server_ip=" + redirectserverip + "&queryCID=" + queryCID + "&exten=" + redirectdestination + "&ext_context=" + ext_context + "&ext_priority=1&auto_dial_level=" + auto_dial_level + "&campaign=" + campaign + "&uniqueid=" + document.vicidial_form.uniqueid.value + "&lead_id=" + document.vicidial_form.lead_id.value + "&secondS=" + VD_live_call_secondS + "&session_id=" + session_id; } if (taskvar == 'XfeR') { var queryCID = "LRvdcW" + epoch_sec + user_abb; var redirectdestination = document.vicidial_form.extension_xfer.value; - xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=RedirectName&format=text&channel=" + redirectvalue + "&call_server_ip=" + redirectserverip + "&queryCID=" + queryCID + "&extenName=" + redirectdestination + "&ext_context=" + ext_context + "&ext_priority=1"; + xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=RedirectName&format=text&channel=" + redirectvalue + "&call_server_ip=" + redirectserverip + "&queryCID=" + queryCID + "&extenName=" + redirectdestination + "&ext_context=" + ext_context + "&ext_priority=1" + "&session_id=" + session_id; } if (taskvar == 'VMAIL') { var queryCID = "LVvdcW" + epoch_sec + user_abb; var redirectdestination = document.vicidial_form.extension_xfer.value; - xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=RedirectNameVmail&format=text&channel=" + redirectvalue + "&call_server_ip=" + redirectserverip + "&queryCID=" + queryCID + "&exten=" + voicemail_dump_exten + "&extenName=" + redirectdestination + "&ext_context=" + ext_context + "&ext_priority=1"; + xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=RedirectNameVmail&format=text&channel=" + redirectvalue + "&call_server_ip=" + redirectserverip + "&queryCID=" + queryCID + "&exten=" + voicemail_dump_exten + "&extenName=" + redirectdestination + "&ext_context=" + ext_context + "&ext_priority=1" + "&session_id=" + session_id; } if (taskvar == 'ENTRY') { var queryCID = "LEvdcW" + epoch_sec + user_abb; var redirectdestination = document.vicidial_form.extension_xfer_entry.value; - xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=Redirect&format=text&channel=" + redirectvalue + "&call_server_ip=" + redirectserverip + "&queryCID=" + queryCID + "&exten=" + redirectdestination + "&ext_context=" + ext_context + "&ext_priority=1"; + xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=Redirect&format=text&channel=" + redirectvalue + "&call_server_ip=" + redirectserverip + "&queryCID=" + queryCID + "&exten=" + redirectdestination + "&ext_context=" + ext_context + "&ext_priority=1" + "&session_id=" + session_id; } if (taskvar == '3WAY') { @@ -2689,7 +2689,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} DispO3wayCalLxfernumber = document.vicidial_form.xfernumber.value; DispO3wayCalLcamptail = ''; - 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=" + XfeRSelecT.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=" + XfeRSelecT.value + "&session_id=" + session_id; if (taskdebugnote == 'FIRST') { @@ -2702,9 +2702,9 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} var redirectdestination = taskxferconf; var redirectdestserverip = taskserverip; var parkedby = protocol + "/" + extension; - xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=RedirectToPark&format=text&channel=" + redirectdestination + "&call_server_ip=" + redirectdestserverip + "&queryCID=" + queryCID + "&exten=" + park_on_extension + "&ext_context=" + ext_context + "&ext_priority=1&extenName=park&parkedby=" + parkedby; + xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=RedirectToPark&format=text&channel=" + redirectdestination + "&call_server_ip=" + redirectdestserverip + "&queryCID=" + queryCID + "&exten=" + park_on_extension + "&ext_context=" + ext_context + "&ext_priority=1&extenName=park&parkedby=" + parkedby + "&session_id=" + session_id; - document.getElementById("ParkControl").innerHTML ="\"Riprendi"; + document.getElementById("ParkControl").innerHTML ="\"Riprendi"; customerparked=1; } if (taskvar == 'FROMParK') @@ -2723,9 +2723,9 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} {var dest_dialstring = session_id;} } - xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=RedirectFromPark&format=text&channel=" + redirectdestination + "&call_server_ip=" + redirectdestserverip + "&queryCID=" + queryCID + "&exten=" + dest_dialstring + "&ext_context=" + ext_context + "&ext_priority=1"; + xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=RedirectFromPark&format=text&channel=" + redirectdestination + "&call_server_ip=" + redirectdestserverip + "&queryCID=" + queryCID + "&exten=" + dest_dialstring + "&ext_context=" + ext_context + "&ext_priority=1" + "&session_id=" + session_id; - document.getElementById("ParkControl").innerHTML ="\"Parcheggia"; + document.getElementById("ParkControl").innerHTML ="\"Metti"; customerparked=0; } @@ -2744,11 +2744,55 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} } delete xmlhttp; } + + // used to send second Redirect for manual dial calls + if (auto_dial_level == 0) + { + RedirecTxFEr = 1; + 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) + { + xmlhttp.open('POST', 'manager_send.php'); + xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8'); + xmlhttp.send(xferredirect_query + "&stage=2NDXfeR"); + xmlhttp.onreadystatechange = function() + { + if (xmlhttp.readyState == 4 && xmlhttp.status == 200) + { + Nactiveext = null; + Nactiveext = xmlhttp.responseText; + // alert(RedirecTxFEr + "|" + xmlhttp.responseText); + } + } + delete xmlhttp; + } + } + if ( (taskvar == 'XfeRLOCAL') || (taskvar == 'XfeRBLIND') || (taskvar == 'XfeRVMAIL') ) { + if (auto_dial_level == 0) {RedirecTxFEr = 1;} document.vicidial_form.callchannel.value = ''; document.vicidial_form.callserverip.value = ''; if( document.images ) { document.images['livecall'].src = image_livecall_OFF.src;} + // alert(RedirecTxFEr + "|" + auto_dial_level); dialedcall_send_hangup(); } @@ -2776,7 +2820,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} { reselect_alt_dial = 1; alt_dial_active = 1; - var man_status = "Chiama Alt Numero: TELEFONO PRINCIPALE or ALT TELEFONO or INDIRIZZO3 or CONTATTO FINITO"; + var man_status = "Chiama Numero Altern.: NUMERO PRINCIPALE or NUMERO ALTERNATIVO or INDIRIZZO3 or Termina Contatto"; document.getElementById("MainStatuSSpan").innerHTML = man_status; } } @@ -2829,13 +2873,13 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} else { MDlogEPOCH = MDlogResponse_array[1]; - // alert("VICICHIAMA Call log entered:\n" + document.vicidial_form.uniqueid.value); + // alert("VICIDial Call log entered:\n" + document.vicidial_form.uniqueid.value); if ( (taskMDstage != "start") && (VDstop_rec_after_each_call == 1) ) { - var conf_rec_start_html = "\"Inizia"; + var conf_rec_start_html = "\"Inizia"; if ( (campaign_recording == 'NEVER') || (campaign_recording == 'ALLFORCE') ) { - document.getElementById("RecorDControl").innerHTML = "\"Inizia"; + document.getElementById("RecorDControl").innerHTML = "\"Inizia"; } else {document.getElementById("RecorDControl").innerHTML = conf_rec_start_html;} @@ -2859,6 +2903,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} } delete xmlhttp; } + RedirecTxFEr=0; } @@ -2899,7 +2944,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} var CBcounT = xmlhttp.responseText; if (CBcounT == 0) {var CBprint = "NO";} else {var CBprint = CBcounT;} - document.getElementById("CBstatusSpan").innerHTML ="" + CBprint + " RICHIAMATE ATTIVE"; + document.getElementById("CBstatusSpan").innerHTML ="" + CBprint + " RICHIAMI ATTIVI"; } } @@ -2914,7 +2959,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} { if ( (AutoDialWaiting == 1) || (VD_live_customer_call==1) || (alt_dial_active==1) ) { - alert("DOVETE ESSERE IN PAUSA PER CONTROLLARE LE RICHIAMATE IN MODALITA AUTOMATICA"); + alert("DEVI ESSERE IN PAUSA PER CONTROLLARE I RICHIAMI IN MODALITA AUTOCHIAMA"); } else { @@ -2956,7 +3001,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} var CB_calls = all_CBs_array[0]; var loop_ct=0; var conv_start=0; - var CB_HTML = "
#CANALE REMOTORIAGGANCIAVOLUME
" + loop_ct + "" + channelfieldA + "ATTACCA
" + loop_ct + "" + channelfieldA + "RIAGGANCIA
" + loop_ct + "" + channelfieldA + "ATTACCA          
" + loop_ct + "" + channelfieldA + "RIAGGANCIA          
" + var CB_HTML = "
# CHIAMATABACK DATE/TIMENUMERONAMESTATUSCAMPAIGNLAST DATE/TIME DI CHIAMATA COMMENTS
" while (loop_ct < CB_calls) { loop_ct++; @@ -3024,7 +3069,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} { if ( (AutoDialWaiting == 1) || (VD_live_customer_call==1) || (alt_dial_active==1) ) { - alert("DEVI METTERE IN PAUSA LA CHIAMATA MANUALE PER ESEGUIRE UNA CHIAMATA DEL CONTATTO IN AUTOMATICO"); + alert("DEVI ESSERE IN PAUSA PER EFFETTUARE UNA CHIAMATA MANUALE QUANDO SEI IN MODALITA` AUTOCHIAMA"); } else { @@ -3082,7 +3127,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} if ( (MDDiaLCodEform.length < 1) || (MDPhonENumbeRform.length < 5) ) { - alert("DOVETE IMPOSTARE Un NUMERO DI TELEFONO E Un CODICE Della MANOPOLA PERUTILIZZARE La MANOPOLA VELOCE"); + alert("DEVI INSERIRE UN NUMERO DI TELEFONO E UN CODICE PER USARE LA CHIAMATA VELOCE"); } else { @@ -3154,7 +3199,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} var dispnum = lead_dial_number; var status_display_number = '(' + dispnum.substring(0,3) + ')' + dispnum.substring(3,6) + '-' + dispnum.substring(6,10); - document.getElementById("MainStatuSSpan").innerHTML = " In Chiamata: " + status_display_number + " UID: " + CIDcheck + "   Attendi lo squillo... " + MD_ring_secondS + " secondi"; + document.getElementById("MainStatuSSpan").innerHTML = " In Chiamata: " + status_display_number + " UID: " + CIDcheck + "   In attesa dello Squillo... " + MD_ring_secondS + " secondi"; // alert("channel not found yet:\n" + campaign); } else @@ -3180,17 +3225,17 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} XD_live_call_secondS = 0; MD_channel_look=0; - document.getElementById("MainStatuSSpan").innerHTML = " Chiamata l`altro chiamante: " + document.vicidial_form.xfernumber.value + " UID: " + CIDcheck; + document.getElementById("MainStatuSSpan").innerHTML = " Chiamata la terza parte della conferenza a 3: " + document.vicidial_form.xfernumber.value + " UID: " + CIDcheck; - document.getElementById("Leave3WayCall").innerHTML ="\"LASCIA"; + document.getElementById("Leave3WayCall").innerHTML ="\"LASCIA"; document.getElementById("DialWithCustomer").innerHTML ="\"Chiama"; - document.getElementById("ParkCustomerDial").innerHTML ="\"Parcheggia"; + document.getElementById("ParkCustomerDial").innerHTML ="\"Metti"; - document.getElementById("HangupXferLine").innerHTML ="\"Attacca"; + document.getElementById("HangupXferLine").innerHTML ="\"Aggancia"; - document.getElementById("HangupBothLines").innerHTML ="\"Attacca"; + document.getElementById("HangupBothLines").innerHTML ="\"Aggancia"; xferchannellive=1; XDcheck = ''; @@ -3224,15 +3269,15 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} document.getElementById("MainStatuSSpan").innerHTML = " Chiamato: " + status_display_number + " UID: " + CIDcheck + "  "; - document.getElementById("ParkControl").innerHTML ="\"Parcheggia"; + document.getElementById("ParkControl").innerHTML ="\"Metti"; - document.getElementById("HangupControl").innerHTML = "\"Disconnetti"; + document.getElementById("HangupControl").innerHTML = "\"Aggancia"; document.getElementById("XferControl").innerHTML = "\"Trasferimento"; - document.getElementById("LocalCloser").innerHTML = "\"LOCALE"; + document.getElementById("LocalCloser").innerHTML = "\"OPERATORE"; - document.getElementById("DialBlindTransfer").innerHTML = "\"Effettua"; + document.getElementById("DialBlindTransfer").innerHTML = "\"Effettua"; document.getElementById("DialBlindVMail").innerHTML = "\"Blind"; @@ -3240,7 +3285,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} document.getElementById("VolumeDownSpan").innerHTML = ""; - // INSERT VICICHIAMA_LOG ENTRY FOR THIS CHIAMATA PROCESS + // INSERT VICIDial_LOG ENTRY FOR THIS CHIAMATA PROCESS DialLog("start"); custchannellive=1; @@ -3256,7 +3301,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} { MD_channel_look=0; MD_ring_secondS=0; - alert("Tempo di chiamata scaduto, contatta l`amministratore del sistema\n"); + alert("Tempo di chiamata scaduto, contatta l`amministratore di sistema\n"); } } @@ -3272,13 +3317,13 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} { reselect_preview_dial = 1; var man_preview = 'YES'; - var man_status = "Anteprima del contatto CHIAMA CONTATTO or SALTA CONTATTO"; + var man_status = "Anteprima del contatto, quindi CHIAMA CONTATTO or SALTA CONTATTO"; } else { reselect_preview_dial = 0; var man_preview = 'NO'; - var man_status = "Attendi lo squillo..."; + var man_status = "In attesa dello Squillo..."; } var xmlhttp=false; @@ -3319,7 +3364,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} if ( (MDnextCID == "LISTA DI CHIAMATA VUOTA") || (MDnextCID == "DNC NUMERO") ) { if (MDnextCID == "LISTA DI CHIAMATA VUOTA") - {alert("Non ci sono contatti nella lista per la campagna:\n" + campaign);} + {alert("Non ci sono contatti da chiamare per la campagna:\n" + campaign);} else {alert("This phone number is in the DNC list:\n" + mdnPhonENumbeR);} } @@ -3420,8 +3465,8 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} "&source_id=" + source_id + '' + webform_session; -// $VICICHIAMA_web_QUERY_STRING =~ s/ /+/gi; -// $VICICHIAMA_web_QUERY_STRING =~ s/\`|\~|\:|\;|\#|\'|\"|\{|\}|\(|\)|\*|\^|\%|\$|\!|\%|\r|\t|\n//gi; +// $VICIDial_web_QUERY_STRING =~ s/ /+/gi; +// $VICIDial_web_QUERY_STRING =~ s/\`|\~|\:|\;|\#|\'|\"|\{|\}|\(|\)|\*|\^|\%|\$|\!|\%|\r|\t|\n//gi; var regWFspace = new RegExp(" ","ig"); web_form_vars = web_form_vars.replace(regWF, ''); @@ -3436,9 +3481,9 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} document.getElementById("CusTInfOSpaN").innerHTML = " PREVIOUS CHIAMATABACK "; document.getElementById("CusTInfOSpaN").style.background = CusTCB_bgcolor; document.getElementById("CBcommentsBoxA").innerHTML = "Ultima Chiamata:" + CBentry_time; - document.getElementById("CBcommentsBoxB").innerHTML = "Chiamata ripetuta:" + CBcallback_time; - document.getElementById("CBcommentsBoxC").innerHTML = "Agente:" + CBuser; - document.getElementById("CBcommentsBoxD").innerHTML = "Osservazioni:
" + CBcomments; + document.getElementById("CBcommentsBoxB").innerHTML = "Richiamo:" + CBcallback_time; + document.getElementById("CBcommentsBoxC").innerHTML = "Operatore:" + CBuser; + document.getElementById("CBcommentsBoxD").innerHTML = "Note:
" + CBcomments; showDiv('CBcommentsBox'); } @@ -3448,7 +3493,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} else {web_form_vars = '?' + web_form_vars} - document.getElementById("WebFormSpan").innerHTML = "\"Interfacccia\n"; + document.getElementById("WebFormSpan").innerHTML = "\"Web\n"; if (document.vicidial_form.LeadPreview.checked==false) { @@ -3456,7 +3501,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} MD_channel_look=1; custchannellive=1; - document.getElementById("HangupControl").innerHTML = "\"Disconnetti"; + document.getElementById("HangupControl").innerHTML = "\"Aggancia"; if ( (campaign_recording == 'ALLCALLS') || (campaign_recording == 'ALLFORCE') ) {all_record = 'YES';} @@ -3501,7 +3546,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} { if (manual_dial_in_progress==1) { - alert('NON PUOI SALTARE UNA RICHIAMATA O FARE UNA CHIAMATA. DEVI CHIAMARE IL CONTATTO'); + alert('NON PUOI SALTARE UN RICHIAMO O UNA CHIAMATA. DEVI CHIAMARE IL CONTATTO'); } else { @@ -3545,7 +3590,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} MDSnextCID = MDSnextResponse_array[0]; if (MDSnextCID == "LEAD NOT REVERTED") { - alert("Il contatto non è ritornato, c`è un errore :\n" + MDSnextResponse); + alert("Il contatto non e` ritornato, c`e` un errore:\n" + MDSnextResponse); } else { @@ -3662,7 +3707,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} MDnextCID = MDOnextResponse_array[0]; if (MDnextCID == " CHIAMATA NOT PLACED") { - alert("chiamata non effettuata, c`è un errore:\n" + MDOnextResponse); + alert("chiamata non effettuata, c`e` un errore:\n" + MDOnextResponse); } else { @@ -3672,9 +3717,9 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} var dispnum = manDiaLonly_num; var status_display_number = '(' + dispnum.substring(0,3) + ')' + dispnum.substring(3,6) + '-' + dispnum.substring(6,10); - document.getElementById("MainStatuSSpan").innerHTML = " In Chiamata: " + status_display_number + " UID: " + MDnextCID + "   Attendi lo squillo..."; + document.getElementById("MainStatuSSpan").innerHTML = " In Chiamata: " + status_display_number + " UID: " + MDnextCID + "   In attesa dello Squillo..."; - document.getElementById("HangupControl").innerHTML = "\"Disconnetti"; + document.getElementById("HangupControl").innerHTML = "\"Aggancia"; if ( (campaign_recording == 'ALLCALLS') || (campaign_recording == 'ALLFORCE') ) {all_record = 'YES';} @@ -3923,7 +3968,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} VD_live_customer_call = 1; VD_live_call_secondS = 0; - // INSERT VICICHIAMA_LOG ENTRY FOR THIS CHIAMATA PROCESS + // INSERT VICIDial_LOG ENTRY FOR THIS CHIAMATA PROCESS // DialLog("start"); custchannellive=1; @@ -3976,9 +4021,9 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} document.getElementById("CusTInfOSpaN").innerHTML = " PREVIOUS CHIAMATABACK "; document.getElementById("CusTInfOSpaN").style.background = CusTCB_bgcolor; document.getElementById("CBcommentsBoxA").innerHTML = "Ultima Chiamata:" + CBentry_time; - document.getElementById("CBcommentsBoxB").innerHTML = "Chiamata ripetuta:" + CBcallback_time; - document.getElementById("CBcommentsBoxC").innerHTML = "Agente:" + CBuser; - document.getElementById("CBcommentsBoxD").innerHTML = "Osservazioni:
" + CBcomments; + document.getElementById("CBcommentsBoxB").innerHTML = "Richiamo:" + CBcallback_time; + document.getElementById("CBcommentsBoxC").innerHTML = "Operatore:" + CBuser; + document.getElementById("CBcommentsBoxD").innerHTML = "Note:
" + CBcomments; showDiv('CBcommentsBox'); } @@ -3994,15 +4039,15 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} document.getElementById("MainStatuSSpan").innerHTML = " In entrata: " + status_display_number + " Group- " + VDIC_data_VDIG[1] + "   " + VDIC_fronter; } - document.getElementById("ParkControl").innerHTML ="\"Parcheggia"; + document.getElementById("ParkControl").innerHTML ="\"Metti"; - document.getElementById("HangupControl").innerHTML = "\"Disconnetti"; + document.getElementById("HangupControl").innerHTML = "\"Aggancia"; document.getElementById("XferControl").innerHTML = "\"Trasferimento"; - document.getElementById("LocalCloser").innerHTML = "\"LOCALE"; + document.getElementById("LocalCloser").innerHTML = "\"OPERATORE"; - document.getElementById("DialBlindTransfer").innerHTML = "\"Effettua"; + document.getElementById("DialBlindTransfer").innerHTML = "\"Effettua"; document.getElementById("DialBlindVMail").innerHTML = "\"Blind"; @@ -4082,7 +4127,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} else {web_form_vars = '?' + web_form_vars} - document.getElementById("WebFormSpan").innerHTML = "\"Interfacccia\n"; + document.getElementById("WebFormSpan").innerHTML = "\"Web\n"; if ( (campaign_recording == 'ALLCALLS') || (campaign_recording == 'ALLFORCE') ) {all_record = 'YES';} @@ -4196,11 +4241,11 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} if (taskrefresh == 'OUT') { - document.getElementById("WebFormSpan").innerHTML = "\"Interfacccia\n"; + document.getElementById("WebFormSpan").innerHTML = "\"Web\n"; } else { - document.getElementById("WebFormSpan").innerHTML = "\"Interfacccia\n"; + document.getElementById("WebFormSpan").innerHTML = "\"Web\n"; } } @@ -4267,7 +4312,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} AgainCalLSecondS = VD_live_call_secondS; AgaiNCalLCID = CalLCID; var process_post_hangup=0; - if (MD_channel_look==1) + if ( (RedirecTxFEr < 1) && ( (MD_channel_look==1) || (auto_dial_level == 0) ) ) { MD_channel_look=0; DialTimeHangup(); @@ -4330,7 +4375,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} MD_ring_secondS = 0; CalLCID = ''; - // UPDATE VICICHIAMA_LOG ENTRY FOR THIS CHIAMATA PROCESS + // UPDATE VICIDial_LOG ENTRY FOR THIS CHIAMATA PROCESS DialLog("end"); if (dispowindow == 'NO') { @@ -4376,12 +4421,12 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} lastcustserverip=''; if( document.images ) { document.images['livecall'].src = image_livecall_OFF.src;} - document.getElementById("WebFormSpan").innerHTML = "\"Interfacccia"; - document.getElementById("ParkControl").innerHTML = "\"Parcheggia"; - document.getElementById("HangupControl").innerHTML = "\"Disconnetti"; + document.getElementById("WebFormSpan").innerHTML = "\"Web"; + document.getElementById("ParkControl").innerHTML = "\"Metti"; + document.getElementById("HangupControl").innerHTML = "\"Aggancia"; document.getElementById("XferControl").innerHTML = "\"Trasferimento"; - document.getElementById("LocalCloser").innerHTML = "\"LOCALE"; - document.getElementById("DialBlindTransfer").innerHTML = "\"Effettua"; + document.getElementById("LocalCloser").innerHTML = "\"OPERATORE"; + document.getElementById("DialBlindTransfer").innerHTML = "\"Effettua"; document.getElementById("DialBlindVMail").innerHTML = "\"Blind"; document.getElementById("VolumeUpSpan").innerHTML = ""; document.getElementById("VolumeDownSpan").innerHTML = ""; @@ -4536,15 +4581,15 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} document.vicidial_form.xferchannel.value = ""; lastxferchannel=''; - document.getElementById("Leave3WayCall").innerHTML ="\"LASCIA"; + document.getElementById("Leave3WayCall").innerHTML ="\"LASCIA"; document.getElementById("DialWithCustomer").innerHTML ="\"Chiama"; - document.getElementById("ParkCustomerDial").innerHTML ="\"Parcheggia"; + document.getElementById("ParkCustomerDial").innerHTML ="\"Metti"; - document.getElementById("HangupXferLine").innerHTML ="\"Attacca"; + document.getElementById("HangupXferLine").innerHTML ="\"Aggancia"; - document.getElementById("HangupBothLines").innerHTML ="\"Attacca"; + document.getElementById("HangupBothLines").innerHTML ="\"Aggancia"; } } @@ -4552,6 +4597,9 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} // Send Hangup command for any Local call that is not in the quiet(7) entry - used to stop manual dials even if no connect function DialTimeHangup() { + if (RedirecTxFEr < 1) + { + // alert("RedirecTxFEr|" + RedirecTxFEr); MD_channel_look=0; var xmlhttp=false; /*@cc_on @*/ @@ -4590,6 +4638,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} } delete xmlhttp; } + } } @@ -4669,7 +4718,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} { AgentDispoing = 1; var VD_statuses_ct_half = parseInt(VD_statuses_ct / 2); - var dispo_HTML = "
# DATA/ORA RICHIAMONUMERONAMESTATOCAMPAIGNDATA/ORA ULTIMA CHIAMATA NOTE
CHIAMATA DISPOSITION
"; + var dispo_HTML = "
ESITO CHIAMATA
"; var loop_ct = 0; while (loop_ct < VD_statuses_ct) { @@ -4699,7 +4748,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} { if ( (AutoDialWaiting == 1) || (VD_live_customer_call==1) || (alt_dial_active==1) ) { - alert("DOVETE ESSERE FATTI UNA PAUSA PER IMPOSTARE Un CODICE Di PAUSA NelMODO Di AUTO-CHIAMA"); + alert("DEVI ESSERE IN PAUSA PER INSERIRE UN CODICE PAUSA IN MODALITA` AUTOCHIAMA"); } else { @@ -4708,7 +4757,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} PausaCode_HTML = ''; document.vicidial_form.PausaCodeSelection.value = ''; var VD_pause_codes_ct_half = parseInt(VD_pause_codes_ct / 2); - PausaCode_HTML = "
PAUSA CODE
"; + PausaCode_HTML = "
PAUSE CODE
"; var loop_ct = 0; while (loop_ct < VD_pause_codes_ct) { @@ -4728,7 +4777,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} { var DispoChoice = document.vicidial_form.DispoSelection.value; - if (DispoChoice.length < 1) {alert("Selezionare una Disposizione");} + if (DispoChoice.length < 1) {alert("Devi selezionare un esito");} else { document.getElementById("CusTInfOSpaN").innerHTML = ""; @@ -4752,7 +4801,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} var DispoChoice = document.vicidial_form.DispoSelection.value; - if (DispoChoice.length < 1) {alert("Selezionare una Disposizione");} + if (DispoChoice.length < 1) {alert("Devi selezionare un esito");} else { document.getElementById("CusTInfOSpaN").innerHTML = ""; @@ -4841,7 +4890,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} hideDiv('DispoButtonHideC'); document.getElementById("DispoSelectBox").style.top = 1; document.getElementById("DispoSelectMaxMin").innerHTML = "minimizza"; - document.getElementById("DispoSelectHAspan").innerHTML = "Attacca ancora"; + document.getElementById("DispoSelectHAspan").innerHTML = "Aggancia di nuovo"; CBcommentsBoxhide(); @@ -4985,7 +5034,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} dialedcall_send_hangup(); } // ################################################################################ -// Mostra message that there are no voice channels in the VICICHIAMA session +// Mostra message that there are no voice channels in the VICIDial session function NoneInSession() { showDiv('NoneInSessionBox'); @@ -5208,12 +5257,12 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} function LogouT() { if (MD_channel_look==1) - {alert("Non potete disconnettervi durante una chiamata in attesa. \nAttendere 50 secondi finchè la chiamata non è risposta");} + {alert("Non puoi disconnetterti durante un tentativo di chiamata. \nAttendere 50 secondi se non c`e` risposta");} else { if (VD_live_customer_call==1) { - alert("CHIAMATA ATTIVA IN CORSO! Attaccate e poi sconettetevi.\n" + VD_live_customer_call); + alert("CHIAMATA ATTIVA IN CORSO! Riaggancia e quindi puoi disconnetterti.\n" + VD_live_customer_call); } else { @@ -5238,7 +5287,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 + "&agent_log_id=" + agent_log_id + "&no_delete_sessions=" + no_delete_sessions + "&phone_ip=" + phone_ip + "&enable_sipsak_messages=" + enable_sipsak_messages; + 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 + "&LogouTKicKAlL=" + LogouTKicKAlL + "&ext_context=" + ext_context; xmlhttp.open('POST', 'vdc_db_query.php'); xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8'); xmlhttp.send(VDlogout_query); @@ -5246,7 +5295,8 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} { if (xmlhttp.readyState == 4 && xmlhttp.status == 200) { - // alert(xmlhttp.responseText); + // alert(VDlogout_query); + // alert(xmlhttp.responseText); } } delete xmlhttp; @@ -5255,7 +5305,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} hideDiv('MainPanel'); showDiv('LogouTBox'); - document.getElementById("LogouTBoxLink").innerHTML = "FAI CLICK QUI PER LOGGARTI DI NUOVO \n"; + document.getElementById("LogouTBoxLink").innerHTML = "FAI CLICK QUI PER AUTENTICARTI DI NUOVO\n"; logout_stop_timeouts = 1; @@ -5388,10 +5438,14 @@ else var encoded = encodedvar; decoded = ''; var i = 0; - var RGnl = new RegExp("\n","g"); + var RGnl = new RegExp("[\r]\n","g"); var RGplus = new RegExp(" ","g"); var RGiframe = new RegExp("iframe","gi"); +var xtest; +xtest=unescape(encoded); +encoded=utf8_decode(xtest); + if (scriptformat == 'YES') { var SCvendor_lead_code = document.vicidial_form.vendor_lead_code.value; @@ -5563,30 +5617,64 @@ else encoded = encoded.replace(RGSIPexten, SCSIPexten); encoded = encoded.replace(RGsession_id, SCsession_id); } - while (i < encoded.length) { - var ch = encoded.charAt(i); - if (ch == "%") { - if (i < (encoded.length-2) - && HEXCHAR.indexOf(encoded.charAt(i+1)) != -1 - && HEXCHAR.indexOf(encoded.charAt(i+2)) != -1 ) { - decoded += unescape( encoded.substr(i,3) ); - i += 3; - } else { - alert( 'Bad escape combo near ...' + encoded.substr(i) ); - decoded += "%[ERR]"; - i++; - } - } else { - decoded += ch; - i++; - } - } // while - decoded = decoded.replace(RGnl, "
"); - +decoded=encoded; // simple no ? +decoded = decoded.replace(RGnl, "
"); +// while (i < encoded.length) { +// var ch = encoded.charAt(i); +// if (ch == "%") { +// if (i < (encoded.length-2) +// && HEXCHAR.indexOf(encoded.charAt(i+1)) != -1 +// && HEXCHAR.indexOf(encoded.charAt(i+2)) != -1 ) { +// decoded += unescape( encoded.substr(i,3) ); +// i += 3; +// } else { +// alert( 'Bad escape combo near ...' + encoded.substr(i) ); +// decoded += "%[ERR]"; +// i++; +// } +// } else { +// decoded += ch; +// i++; +// } +// } // while +// decoded = decoded.replace(RGnl, "
"); +// return false; }; +// ################################################################################ +// Taken form php.net Angelos +function utf8_decode(utftext) { + var string = ""; + var i = 0; + var c = c1 = c2 = 0; + + while ( i < utftext.length ) { + + c = utftext.charCodeAt(i); + + if (c < 128) { + string += String.fromCharCode(c); + i++; + } + else if((c > 191) && (c < 224)) { + c2 = utftext.charCodeAt(i+1); + string += String.fromCharCode(((c & 31) << 6) | (c2 & 63)); + i += 2; + } + else { + c2 = utftext.charCodeAt(i+1); + c3 = utftext.charCodeAt(i+2); + string += String.fromCharCode(((c & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63)); + i += 3; + } + + } + + return string; + }; + // ################################################################################ // Move the Dispo frame out of the way and change the link to ingrandisci @@ -5644,7 +5732,7 @@ else CallBackDatEForM = document.vicidial_form.CallBackDatESelectioN.value; CallBackCommenTs = document.vicidial_form.CallBackCommenTsField.value; if (CallBackDatEForM.length < 2) - {alert("Dovete scegliere una data");} + {alert("Devi scegliere una data");} else { @@ -5713,7 +5801,7 @@ else { CallBackrecipient = 'ANYONE'; } - document.getElementById("CallBackDatEPrinT").innerHTML = "Selezioni una data sotto"; + document.getElementById("CallBackDatEPrinT").innerHTML = "Seleziona una data qui sotto"; document.vicidial_form.CallBackOnlyMe.checked=false; document.vicidial_form.CallBackDatESelectioN.value = ''; document.vicidial_form.CallBackCommenTsField.value = ''; @@ -5773,7 +5861,7 @@ else if (agentcall_manual != '1') {hideDiv('ManuaLDiaLButtons');} if (agentcallsstatus != '1') - {hideDiv('AgentStatusSpan');} + {hideDiv('AgentStatoSpan');} if ( (auto_dial_level != 0) || (manual_dial_preview != 1) ) {clearDiv('DiaLLeaDPrevieW');} if (alt_phone_dialing != 1) @@ -5784,7 +5872,7 @@ else if (agent_pause_codes_active=='Y') { - document.getElementById("PausaCodeLinkSpan").innerHTML = "IMPOSTI Un CODICE Di PAUSA"; + document.getElementById("PausaCodeLinkSpan").innerHTML = "INSERIRE UN CODICE PAUSA"; } if (VICIDiaL_allow_closers < 1) { @@ -5793,7 +5881,7 @@ else document.getElementById("sessionIDspan").innerHTML = session_id; if ( (campaign_recording == 'NEVER') || (campaign_recording == 'ALLFORCE') ) { - document.getElementById("RecorDControl").innerHTML = "\"Inizia"; + document.getElementById("RecorDControl").innerHTML = "\"Inizia"; } if (INgroupCOUNT > 0) { @@ -6019,7 +6107,7 @@ else if (Cmon == 1) {Cmon = "FEB";} if (Cmon == 2) {Cmon = "MAR";} if (Cmon == 3) {Cmon = "APR";} - if (Cmon == 4) {Cmon = "POS";} + if (Cmon == 4) {Cmon = "MAG";} if (Cmon == 5) {Cmon = "GIU";} if (Cmon == 6) {Cmon = "LUG";} if (Cmon == 7) {Cmon = "AGO";} @@ -6134,7 +6222,7 @@ else } if (divvar == 'DiaLDiaLAltPhonE') { - var buildDivHTML = " ALT CHIAMATE
"; + var buildDivHTML = " CHIAMA NUMERO ALTERNATIVO
"; document.getElementById("DiaLDiaLAltPhonEHide").innerHTML = buildDivHTML; } } @@ -6155,7 +6243,7 @@ else if (divvar == 'DiaLDiaLAltPhonE') { document.getElementById("DiaLDiaLAltPhonEHide").innerHTML = ''; - var buildDivHTML = " ALT CHIAMATE
"; + var buildDivHTML = " CHIAMA NUMERO ALTERNATIVO
"; document.getElementById(divvar).innerHTML = buildDivHTML; if (reselect_alt_dial==1) {document.vicidial_form.DiaLAltPhonE.checked=true} @@ -6168,14 +6256,14 @@ else if (divvar == 'SHOW') { conf_channels_xtra_display = 1; - document.getElementById("busycallsdisplay").innerHTML = "Nascondete le informazioni sul canale della conferenza"; + document.getElementById("busycallsdisplay").innerHTML = "Nascondi le informazioni sul canale della conferenza"; LMAe[0]=''; LMAe[1]=''; LMAe[2]=''; LMAe[3]=''; LMAe[4]=''; LMAe[5]=''; LMAcount=0; } else { conf_channels_xtra_display = 0; - document.getElementById("busycallsdisplay").innerHTML = "Mostrate le informazioni sul canale della conferenza

 "; + document.getElementById("busycallsdisplay").innerHTML = "Mostra le informazioni sul canale della conferenza

 "; document.getElementById("outboundcallsspan").innerHTML = ''; LMAe[0]=''; LMAe[1]=''; LMAe[2]=''; LMAe[3]=''; LMAe[4]=''; LMAe[5]=''; LMAcount=0; @@ -6194,7 +6282,7 @@ else { hideDiv('HotKeyEntriesBox'); hot_keys_active = 0; - document.getElementById("hotkeysdisplay").innerHTML = "\"TASTI"; + document.getElementById("hotkeysdisplay").innerHTML = "\"TASTI"; } } @@ -6217,7 +6305,7 @@ else while (loop_ct < XFgroupCOUNT) { if (VARxfergroups[loop_ct] == LIVE_default_xfer_group) - {XfeR_SelecT = 'SELECTED ';} + {XfeR_SelecT = 'SELEZIONATO ';} else {XfeR_SelecT = '';} live_XfeR_HTML = live_XfeR_HTML + "\n"; loop_ct++; @@ -6239,7 +6327,7 @@ else { if (showxfervar != 'OFF') { - alert('NON AVETE PERMESSI PER TRASFERIRE CHIAMATE'); + alert('NON HAI L`AUTORIZZAZIONE PER TRASFERIRE CHIAMATE'); } } } @@ -6304,14 +6392,15 @@ else .body_small {font-size: 11px; font-family: sans-serif;} .body_tiny {font-size: 10px; font-family: sans-serif;} .log_text {font-size: 11px; font-family: monospace;} + .log_text_red {font-size: 11px; font-family: monospace; font-weight: bold; background: #FF3333} .log_title {font-size: 12px; font-family: monospace; font-weight: bold;} .sd_text {font-size: 16px; font-family: sans-serif; font-weight: bold;} .sh_text {font-size: 14px; font-family: sans-serif; font-weight: bold;} .sb_text {font-size: 12px; font-family: sans-serif;} .sk_text {font-size: 11px; font-family: sans-serif;} .skb_text {font-size: 13px; font-family: sans-serif; font-weight: bold;} - .ON_conf {font-size: 11px; font-family: monospace; color: black ; background: #FFFF99} - .OFF_conf {font-size: 11px; font-family: monospace; color: black ; background: #FFCC77} + .ON_conf {font-size: 11px; font-family: monospace; color: black; background: #FFFF99} + .OFF_conf {font-size: 11px; font-family: monospace; color: black; background: #FFCC77} .cust_form {font-family: sans-serif; font-size: 10px; overflow: auto} --> @@ -6328,7 +6417,7 @@ echo "\n";
- + LOGOUT\n"; ?>
@@ -6336,25 +6425,25 @@ echo "\n"; height=30> - + - - + +
VICICHIAMAVICIDial SCRIPT VALIGN=MIDDLE ALIGN=CENTER>   LIVE     ID di sessione: Chimate Attive VALIGN=MIDDLE ALIGN=CENTER>   LIVE     ID sessione: Chimata in corso
- height=>

VICICHIAMA
+ height=>

VICIDial
-Chiamata Manuale       MANOPOLA VELOCE
+Chiamata Manuale       CHIAMATA VELOCE
-X RICHIAMATE ATTIVE
+X RICHIAMI ATTIVI
@@ -6376,7 +6465,7 @@ echo "\n"; - height=460>
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. + height=460>
RICHIAMI PER L`OPERATORE :
Selezionare un richiamo per chiamare il cliente ora. Una volta cliccata, la riga sara` rimossa dalla lista.

  @@ -6387,15 +6476,15 @@ echo "\n"; - height=460>
NUOVA CHIAMATA MANUALE PER IL CONTATTO :

Inserisci le informazioni sotto per il nuovo contatto da chiamare. + height=460>
NUOVA CHIAMATA MANUALE PER IL CONTATTO :

Inserisci le informazioni per il nuovo contatto da chiamare.
\n"; + echo "Nota: prefisso di chiamata $dial_prefix sara` aggiunto all`inizio di questo numero
\n"; } ?> - Note: all new manual dial leads will go into list

+ Nota: tutti i nuovi contatti chiamati manualmente andranno nella lista

@@ -6406,13 +6495,13 @@ echo "\n"; - + -
Codice di Chiamata:   (E solitamente un 1 negli USA e Canada)
Cerca Contatti esistenti:   (Questa opzione tenterà di trovare il numero di telefono nel sistema prima di inserire un nuovo contatto)  (Questa opzione tentera` 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 per favore)

@@ -6429,8 +6518,8 @@ echo "\n"; - -Vostro Status:
Calls Dialing: + +Tuo stato:
Calls Dialing:
@@ -6443,17 +6532,17 @@ Vostro Status:
Calls Dialing:
- LOCALE PIÙ VICINO - Attacca la linea trasferita - Attacca ciascun linea + OPERATORE LOCALE + Aggancia la linea trasferita + Aggancia entrambe le linee
Numero da chiamare   CHIAMATA AUTOMATICA   - LASCIA LA CONFERENZA - Effettua il trasferimento cieco + LASCIA LA CONFERENZA A 3 + Effettua il trasferimento cieco D1 D2 @@ -6462,7 +6551,7 @@ Vostro Status:
Calls Dialing:   channel Chiama il Cliente - Parcheggia il cliente in chiamata + Metti in attesa il cliente in chiamata Blind Transfer VMail Message
@@ -6473,7 +6562,7 @@ Vostro Status:
Calls Dialing: height=70> -
Contatto disposto come:

+
Esito Contatto:

-
@@ -6481,8 +6570,8 @@ Vostro Status:
Calls Dialing: height=70> - + @@ -6498,7 +6587,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:
tasti funzione per esiti: + Se attivo, premi il tasto corrispondente all`esito desiderato e la chiamata sara` riagganciata automaticamente:
height=70> - +
Le Informazioni Precedenti Di Chiamata ripetuta: Informazioni richiamo precedente: close
@@ -6513,33 +6602,33 @@ Vostro Status:
Calls Dialing: - height=500>
Nessuno è nella vostra sessione:
+ height=500>
Nessuno e` nella tua sessione:
Torna Indietro

- Ancora Operatore di chiamata + Chiama l`operatore di nuovo
- height=500>
Il cliente ha attaccato:
+ height=500>
Il cliente ha riagganciato:
Torna Indietro

- Termina e disponi la chiamata + Termina e dai un esito alla chiamata
- height=550>
Chiamata tempo di pausa: secondi restanti prima di nuova chiamata

+ height=550>
Tempo di riposo: secondi di riposo restanti



- Tempo scaduto, sbrigarsi + Termina riposo e continua
- height=500>
La vostra sessione è stata inabilitata
LOGOUT

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

Torna Indietro
@@ -6556,12 +6645,12 @@ Vostro Status:
Calls Dialing: - height=47>
Tutti i cambiamenti fatti sulle informazioni del cliente sotto non saranno effettuate, cambiare le informazioni prima di attaccare.
+ height=47>
Tutti i cambiamenti fatti sulle informazioni del cliente sotto non saranno salvati, bisogna effettuare le modifiche prima di riagganciare.
- height=460>
DISPOSIZIONE CHIAMATA :       Attacca ancora       minimizza
- Selezione di fine chiamata + height=460>
ESITO CHIAMATA :       Aggancia di nuovo       minimizza
+ Selezione Esito di fine chiamata
PAUSA OPERATORE
PULISCI SCHERMATA | @@ -6573,7 +6662,7 @@ Vostro Status:
Calls Dialing: - height=460>
SELEZIONI Un CODICE Di PAUSA :
+ height=460>
SELEZIONARE UN CODICE PAUSA:
Pausa Code Selection

  @@ -6581,12 +6670,12 @@ Vostro Status:
Calls Dialing: - height=460>
Selezionate una richiamata :
+ height=460>
Selezionare una data di richiamo! :
- Selezioni una data sotto   + Seleziona una data qui sotto       - Hour: + Ora:   - Minutes: + Minuti:   RICHIAMO PERSONALE (nessun altro potra` richiamarlo)
";} ?> - Commenti del CB :

+ Note Richiamo:

INVIA

@@ -6624,8 +6723,8 @@ Vostro Status:
Calls Dialing: - height=460>
SELEZIONE DI GRUPPO INBOUND PIÙ VICINO
- Selezione di Gruppo Inbound più vicino + height=460>> +> 1) { @@ -4140,7 +4174,9 @@ if ($ADD==11) echo "\n"; echo "\n"; echo "\n"; - echo "\n"; + echo "\n"; echo "\n"; echo "> +> 1) { @@ -4140,7 +4174,9 @@ if ($ADD==11) echo "\n"; echo "\n"; echo "\n"; - echo "\n"; + echo "\n"; echo "\n"; echo "> +> 1) { @@ -4144,7 +4178,9 @@ if ($ADD==11) echo "\n"; echo "\n"; echo "\n"; - echo "\n"; + echo "\n"; echo "\n"; echo "> +> 1) { @@ -4140,7 +4174,9 @@ if ($ADD==11) echo "\n"; echo "\n"; echo "\n"; - echo "\n"; + echo "\n"; echo "\n"; echo "> +> 1) { @@ -4140,7 +4174,9 @@ if ($ADD==11) echo "\n"; echo "\n"; echo "\n"; - echo "\n"; + echo "\n"; echo "\n"; 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]; + +?> +
+
SELEZIONE OPERATORE INBOUND
+ Selezione OPERATORE Inbound
CHIAMATA MESCOLATA(outbound attivato)
RESET | @@ -6640,24 +6739,24 @@ Vostro Status:
Calls Dialing: Canale SOLTANTO LE MIE RICHIAMATE
";} + {echo " RICHIAMO PERSONALE (nessun altro potra` richiamarlo)
";} ?> - height=>
VICICHIAMA SCRIPT
+ height=>
VICIDial SCRIPT
0) && ( ($user_level>=$HKuser_level) or ($VU_hotkeys_active > 0) ) ) { ?> -TASTI FUNZIONE INATTIVI +TASTI FUNZIONE DISATTIVATI ->"; + 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; @@ -2558,6 +2557,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} // Covers the following types: XFER, VMAIL, ENTRY, CONF, PARKING, FROMPARKING, XfeRLOCAL, XfeRINTERNAL, XfeRBLIND, VfeRVMAIL function mainxfer_send_redirect(taskvar,taskxferconf,taskserverip,taskdebugnote) { + if (auto_dial_level == 0) {RedirecTxFEr = 1;} var xmlhttp=false; /*@cc_on @*/ /*@if (@_jscript_version >= 5) @@ -2630,7 +2630,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} } else { - xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=RedirectVD&format=text&channel=" + redirectvalue + "&call_server_ip=" + redirectserverip + "&queryCID=" + queryCID + "&exten=" + blindxferdialstring + "&ext_context=" + ext_context + "&ext_priority=1&auto_dial_level=" + auto_dial_level + "&campaign=" + campaign + "&uniqueid=" + document.vicidial_form.uniqueid.value + "&lead_id=" + document.vicidial_form.lead_id.value + "&secondS=" + VD_live_call_secondS; + xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=RedirectVD&format=text&channel=" + redirectvalue + "&call_server_ip=" + redirectserverip + "&queryCID=" + queryCID + "&exten=" + blindxferdialstring + "&ext_context=" + ext_context + "&ext_priority=1&auto_dial_level=" + auto_dial_level + "&campaign=" + campaign + "&uniqueid=" + document.vicidial_form.uniqueid.value + "&lead_id=" + document.vicidial_form.lead_id.value + "&secondS=" + VD_live_call_secondS + "&session_id=" + session_id; } } if (taskvar == 'XfeRINTERNAL') @@ -2649,25 +2649,25 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} // "90009*$group**$lead_id**$phone_number*$user*"; var redirectdestination = closerxferinternal + '90009*' + XfeRSelecT.value + '**' + document.vicidial_form.lead_id.value + '**' + document.vicidial_form.phone_number.value + '*' + user + '*'; - xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=RedirectVD&format=text&channel=" + redirectvalue + "&call_server_ip=" + redirectserverip + "&queryCID=" + queryCID + "&exten=" + redirectdestination + "&ext_context=" + ext_context + "&ext_priority=1&auto_dial_level=" + auto_dial_level + "&campaign=" + campaign + "&uniqueid=" + document.vicidial_form.uniqueid.value + "&lead_id=" + document.vicidial_form.lead_id.value + "&secondS=" + VD_live_call_secondS; + xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=RedirectVD&format=text&channel=" + redirectvalue + "&call_server_ip=" + redirectserverip + "&queryCID=" + queryCID + "&exten=" + redirectdestination + "&ext_context=" + ext_context + "&ext_priority=1&auto_dial_level=" + auto_dial_level + "&campaign=" + campaign + "&uniqueid=" + document.vicidial_form.uniqueid.value + "&lead_id=" + document.vicidial_form.lead_id.value + "&secondS=" + VD_live_call_secondS + "&session_id=" + session_id; } if (taskvar == 'XfeR') { var queryCID = "LRvdcW" + epoch_sec + user_abb; var redirectdestination = document.vicidial_form.extension_xfer.value; - xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=RedirectName&format=text&channel=" + redirectvalue + "&call_server_ip=" + redirectserverip + "&queryCID=" + queryCID + "&extenName=" + redirectdestination + "&ext_context=" + ext_context + "&ext_priority=1"; + xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=RedirectName&format=text&channel=" + redirectvalue + "&call_server_ip=" + redirectserverip + "&queryCID=" + queryCID + "&extenName=" + redirectdestination + "&ext_context=" + ext_context + "&ext_priority=1" + "&session_id=" + session_id; } if (taskvar == 'VMAIL') { var queryCID = "LVvdcW" + epoch_sec + user_abb; var redirectdestination = document.vicidial_form.extension_xfer.value; - xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=RedirectNameVmail&format=text&channel=" + redirectvalue + "&call_server_ip=" + redirectserverip + "&queryCID=" + queryCID + "&exten=" + voicemail_dump_exten + "&extenName=" + redirectdestination + "&ext_context=" + ext_context + "&ext_priority=1"; + xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=RedirectNameVmail&format=text&channel=" + redirectvalue + "&call_server_ip=" + redirectserverip + "&queryCID=" + queryCID + "&exten=" + voicemail_dump_exten + "&extenName=" + redirectdestination + "&ext_context=" + ext_context + "&ext_priority=1" + "&session_id=" + session_id; } if (taskvar == 'ENTRY') { var queryCID = "LEvdcW" + epoch_sec + user_abb; var redirectdestination = document.vicidial_form.extension_xfer_entry.value; - xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=Redirect&format=text&channel=" + redirectvalue + "&call_server_ip=" + redirectserverip + "&queryCID=" + queryCID + "&exten=" + redirectdestination + "&ext_context=" + ext_context + "&ext_priority=1"; + xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=Redirect&format=text&channel=" + redirectvalue + "&call_server_ip=" + redirectserverip + "&queryCID=" + queryCID + "&exten=" + redirectdestination + "&ext_context=" + ext_context + "&ext_priority=1" + "&session_id=" + session_id; } if (taskvar == '3WAY') { @@ -2689,7 +2689,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} DispO3wayCalLxfernumber = document.vicidial_form.xfernumber.value; DispO3wayCalLcamptail = ''; - 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=" + XfeRSelecT.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=" + XfeRSelecT.value + "&session_id=" + session_id; if (taskdebugnote == 'FIRST') { @@ -2702,7 +2702,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} var redirectdestination = taskxferconf; var redirectdestserverip = taskserverip; var parkedby = protocol + "/" + extension; - xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=RedirectToPark&format=text&channel=" + redirectdestination + "&call_server_ip=" + redirectdestserverip + "&queryCID=" + queryCID + "&exten=" + park_on_extension + "&ext_context=" + ext_context + "&ext_priority=1&extenName=park&parkedby=" + parkedby; + xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=RedirectToPark&format=text&channel=" + redirectdestination + "&call_server_ip=" + redirectdestserverip + "&queryCID=" + queryCID + "&exten=" + park_on_extension + "&ext_context=" + ext_context + "&ext_priority=1&extenName=park&parkedby=" + parkedby + "&session_id=" + session_id; document.getElementById("ParkControl").innerHTML ="\"Przejmij"; customerparked=1; @@ -2723,7 +2723,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} {var dest_dialstring = session_id;} } - xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=RedirectFromPark&format=text&channel=" + redirectdestination + "&call_server_ip=" + redirectdestserverip + "&queryCID=" + queryCID + "&exten=" + dest_dialstring + "&ext_context=" + ext_context + "&ext_priority=1"; + xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=RedirectFromPark&format=text&channel=" + redirectdestination + "&call_server_ip=" + redirectdestserverip + "&queryCID=" + queryCID + "&exten=" + dest_dialstring + "&ext_context=" + ext_context + "&ext_priority=1" + "&session_id=" + session_id; document.getElementById("ParkControl").innerHTML ="\"Zawieś"; customerparked=0; @@ -2744,11 +2744,55 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} } delete xmlhttp; } + + // used to send second Redirect for manual dial calls + if (auto_dial_level == 0) + { + RedirecTxFEr = 1; + 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) + { + xmlhttp.open('POST', 'manager_send.php'); + xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8'); + xmlhttp.send(xferredirect_query + "&stage=2NDXfeR"); + xmlhttp.onreadystatechange = function() + { + if (xmlhttp.readyState == 4 && xmlhttp.status == 200) + { + Nactiveext = null; + Nactiveext = xmlhttp.responseText; + // alert(RedirecTxFEr + "|" + xmlhttp.responseText); + } + } + delete xmlhttp; + } + } + if ( (taskvar == 'XfeRLOCAL') || (taskvar == 'XfeRBLIND') || (taskvar == 'XfeRVMAIL') ) { + if (auto_dial_level == 0) {RedirecTxFEr = 1;} document.vicidial_form.callchannel.value = ''; document.vicidial_form.callserverip.value = ''; if( document.images ) { document.images['livecall'].src = image_livecall_OFF.src;} + // alert(RedirecTxFEr + "|" + auto_dial_level); dialedcall_send_hangup(); } @@ -2859,6 +2903,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} } delete xmlhttp; } + RedirecTxFEr=0; } @@ -4267,7 +4312,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} AgainCalLSecondS = VD_live_call_secondS; AgaiNCalLCID = CalLCID; var process_post_hangup=0; - if (MD_channel_look==1) + if ( (RedirecTxFEr < 1) && ( (MD_channel_look==1) || (auto_dial_level == 0) ) ) { MD_channel_look=0; DialTimeHangup(); @@ -4552,6 +4597,9 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} // Send Hangup command for any Local call that is not in the quiet(7) entry - used to stop manual dials even if no connect function DialTimeHangup() { + if (RedirecTxFEr < 1) + { + // alert("RedirecTxFEr|" + RedirecTxFEr); MD_channel_look=0; var xmlhttp=false; /*@cc_on @*/ @@ -4590,6 +4638,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} } delete xmlhttp; } + } } @@ -5238,7 +5287,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 + "&agent_log_id=" + agent_log_id + "&no_delete_sessions=" + no_delete_sessions + "&phone_ip=" + phone_ip + "&enable_sipsak_messages=" + enable_sipsak_messages; + 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 + "&LogouTKicKAlL=" + LogouTKicKAlL + "&ext_context=" + ext_context; xmlhttp.open('POST', 'vdc_db_query.php'); xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8'); xmlhttp.send(VDlogout_query); @@ -5246,7 +5295,8 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} { if (xmlhttp.readyState == 4 && xmlhttp.status == 200) { - // alert(xmlhttp.responseText); + // alert(VDlogout_query); + // alert(xmlhttp.responseText); } } delete xmlhttp; @@ -5388,10 +5438,14 @@ else var encoded = encodedvar; decoded = ''; var i = 0; - var RGnl = new RegExp("\n","g"); + var RGnl = new RegExp("[\r]\n","g"); var RGplus = new RegExp(" ","g"); var RGiframe = new RegExp("iframe","gi"); +var xtest; +xtest=unescape(encoded); +encoded=utf8_decode(xtest); + if (scriptformat == 'YES') { var SCvendor_lead_code = document.vicidial_form.vendor_lead_code.value; @@ -5563,30 +5617,64 @@ else encoded = encoded.replace(RGSIPexten, SCSIPexten); encoded = encoded.replace(RGsession_id, SCsession_id); } - while (i < encoded.length) { - var ch = encoded.charAt(i); - if (ch == "%") { - if (i < (encoded.length-2) - && HEXCHAR.indexOf(encoded.charAt(i+1)) != -1 - && HEXCHAR.indexOf(encoded.charAt(i+2)) != -1 ) { - decoded += unescape( encoded.substr(i,3) ); - i += 3; - } else { - alert( 'Bad escape combo near ...' + encoded.substr(i) ); - decoded += "%[ERR]"; - i++; - } - } else { - decoded += ch; - i++; - } - } // while - decoded = decoded.replace(RGnl, "
"); - +decoded=encoded; // simple no ? +decoded = decoded.replace(RGnl, "
"); +// while (i < encoded.length) { +// var ch = encoded.charAt(i); +// if (ch == "%") { +// if (i < (encoded.length-2) +// && HEXCHAR.indexOf(encoded.charAt(i+1)) != -1 +// && HEXCHAR.indexOf(encoded.charAt(i+2)) != -1 ) { +// decoded += unescape( encoded.substr(i,3) ); +// i += 3; +// } else { +// alert( 'Bad escape combo near ...' + encoded.substr(i) ); +// decoded += "%[ERR]"; +// i++; +// } +// } else { +// decoded += ch; +// i++; +// } +// } // while +// decoded = decoded.replace(RGnl, "
"); +// return false; }; +// ################################################################################ +// Taken form php.net Angelos +function utf8_decode(utftext) { + var string = ""; + var i = 0; + var c = c1 = c2 = 0; + + while ( i < utftext.length ) { + + c = utftext.charCodeAt(i); + + if (c < 128) { + string += String.fromCharCode(c); + i++; + } + else if((c > 191) && (c < 224)) { + c2 = utftext.charCodeAt(i+1); + string += String.fromCharCode(((c & 31) << 6) | (c2 & 63)); + i += 2; + } + else { + c2 = utftext.charCodeAt(i+1); + c3 = utftext.charCodeAt(i+2); + string += String.fromCharCode(((c & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63)); + i += 3; + } + + } + + return string; + }; + // ################################################################################ // Move the Dispo frame out of the way and change the link to maksymalizuj @@ -6304,14 +6392,15 @@ else .body_small {font-size: 11px; font-family: sans-serif;} .body_tiny {font-size: 10px; font-family: sans-serif;} .log_text {font-size: 11px; font-family: monospace;} + .log_text_red {font-size: 11px; font-family: monospace; font-weight: bold; background: #FF3333} .log_title {font-size: 12px; font-family: monospace; font-weight: bold;} .sd_text {font-size: 16px; font-family: sans-serif; font-weight: bold;} .sh_text {font-size: 14px; font-family: sans-serif; font-weight: bold;} .sb_text {font-size: 12px; font-family: sans-serif;} .sk_text {font-size: 11px; font-family: sans-serif;} .skb_text {font-size: 13px; font-family: sans-serif; font-weight: bold;} - .ON_conf {font-size: 11px; font-family: monospace; color: black ; background: #FFFF99} - .OFF_conf {font-size: 11px; font-family: monospace; color: black ; background: #FFCC77} + .ON_conf {font-size: 11px; font-family: monospace; color: black; background: #FFFF99} + .OFF_conf {font-size: 11px; font-family: monospace; color: black; background: #FFCC77} .cust_form {font-family: sans-serif; font-size: 10px; overflow: auto} --> @@ -6604,7 +6693,17 @@ Twój Status:
Calls Dialing: + + + + + + + + + +   - + diff --git a/agc_2-X/branches/agc_2.0.4/LANG_www/agc_pt/conf_exten_check.php b/agc_2-X/branches/agc_2.0.4/LANG_www/agc_pt/conf_exten_check.php index ed42c28f..d0281645 100644 --- a/agc_2-X/branches/agc_2.0.4/LANG_www/agc_pt/conf_exten_check.php +++ b/agc_2-X/branches/agc_2.0.4/LANG_www/agc_pt/conf_exten_check.php @@ -1,7 +1,7 @@ LICENSE: GPLv2 +# Copyright (C) 2008 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 @@ -35,6 +35,7 @@ # 61128-2255 - Added update for manual dial vicidial_live_agents # 70319-1542 - Added agent disabled display function # 71122-0205 - Added vicidial_live_agent status output +# 80424-0442 - Added non_latin lookup from system_settings # require("dbconnect.php"); @@ -63,8 +64,28 @@ if (isset($_GET["auto_dial_level"])) {$auto_dial_level=$_GET["auto_dial_level" if (isset($_GET["campagentstdisp"])) {$campagentstdisp=$_GET["campagentstdisp"];} elseif (isset($_POST["campagentstdisp"])) {$campagentstdisp=$_POST["campagentstdisp"];} + +############################################# +##### START SYSTEM_SETTINGS LOOKUP ##### +$stmt = "SELECT use_non_latin FROM system_settings;"; +$rslt=mysql_query($stmt, $link); +if ($DB) {echo "$stmt\n";} +$qm_conf_ct = mysql_num_rows($rslt); +$i=0; +while ($i < $qm_conf_ct) + { + $row=mysql_fetch_row($rslt); + $non_latin = $row[0]; + $i++; + } +##### END SETTINGS LOOKUP ##### +########################################### + +if ($non_latin < 1) +{ $user=ereg_replace("[^0-9a-zA-Z]","",$user); $pass=ereg_replace("[^0-9a-zA-Z]","",$pass); +} # default optional vars if not set if (!isset($format)) {$format="text";} @@ -81,11 +102,12 @@ if (!isset($query_date)) {$query_date = $NOW_DATE;} $random = (rand(1000000, 9999999) + 10000000); - $stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; +$stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$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]; if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) { diff --git a/agc_2-X/branches/agc_2.0.4/LANG_www/agc_pt/manager_send.php b/agc_2-X/branches/agc_2.0.4/LANG_www/agc_pt/manager_send.php index 0823f931..7570f609 100644 --- a/agc_2-X/branches/agc_2.0.4/LANG_www/agc_pt/manager_send.php +++ b/agc_2-X/branches/agc_2.0.4/LANG_www/agc_pt/manager_send.php @@ -1,7 +1,7 @@ LICENSE: GPLv2 +# Copyright (C) 2008 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 @@ -32,8 +32,8 @@ # - $agent_log_id - ('123456',...) # - $call_server_ip - ('10.10.10.15',...) # - $CalLCID - ('VD01234567890123456',...) -# - $stage - ('UP','DOWN') -# +# - $stage - ('UP','DOWN','2NDXfeR') +# - $session_id - ('8600051') # CHANGELOG: # 50401-1002 - First build of script, Hangup function only @@ -68,8 +68,14 @@ # 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 +# 80331-1433 - Added second transfer try for VICIDIAL transfers on manual dial calls +# 80402-0121 - Fixes for manual dial transfers on some systems +# 80424-0442 - Added non_latin lookup from system_settings # +$version = '2.0.4-31'; +$build = '80424-0442'; + require("dbconnect.php"); ### These are variable assignments for PHP globals off @@ -137,28 +143,48 @@ if (isset($_GET["enable_sipsak_messages"])) {$enable_sipsak_messages=$_GET["e 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["session_id"])) {$session_id=$_GET["session_id"];} + elseif (isset($_POST["session_id"])) {$session_id=$_POST["session_id"];} +############################################# +##### START SYSTEM_SETTINGS LOOKUP ##### +$stmt = "SELECT use_non_latin FROM system_settings;"; +$rslt=mysql_query($stmt, $link); +if ($DB) {echo "$stmt\n";} +$qm_conf_ct = mysql_num_rows($rslt); +$i=0; +while ($i < $qm_conf_ct) + { + $row=mysql_fetch_row($rslt); + $non_latin = $row[0]; + $i++; + } +##### END SETTINGS LOOKUP ##### +########################################### + +if ($non_latin < 1) +{ $user=ereg_replace("[^0-9a-zA-Z]","",$user); $pass=ereg_replace("[^0-9a-zA-Z]","",$pass); $secondS = ereg_replace("[^0-9]","",$secondS); +} # default optional vars if not set if (!isset($ACTION)) {$ACTION="Originate";} if (!isset($format)) {$format="alert";} if (!isset($ext_priority)) {$ext_priority="1";} -$version = '2.0.29'; -$build = '70320-1502'; $StarTtime = date("U"); $NOW_DATE = date("Y-m-d"); $NOW_TIME = date("Y-m-d H:i:s"); if (!isset($query_date)) {$query_date = $NOW_DATE;} - $stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; +$stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$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]; if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) { @@ -878,6 +904,29 @@ if ($ACTION=="RedirectXtra") if ($ACTION=="Redirect") { + ### for manual dial VICISELETOR calls send the second attempt to transfer the call + if ($stage=="2NDXfeR") + { + $local_DEF = 'Local/'; + $local_AMP = '@'; + $hangup_channel_prefix = "$local_DEF$session_id$local_AMP$ext_context"; + + $stmt="SELECT count(*) FROM live_sip_channels where server_ip = '$server_ip' and channel LIKE \"$hangup_channel_prefix%\";"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + if ($row > 0) + { + $stmt="SELECT channel FROM live_sip_channels where server_ip = '$server_ip' and channel LIKE \"$hangup_channel_prefix%\";"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + $rowx=mysql_fetch_row($rslt); + $channel=$rowx[0]; + $channel = eregi_replace("1$","2",$channel); + $queryCID = eregi_replace("^.","Q",$queryCID); + } + } + $row=''; $rowx=''; $channel_live=1; if ( (strlen($channel)<3) or (strlen($queryCID)<15) or (strlen($exten)<1) or (strlen($ext_context)<1) or (strlen($ext_priority)<1) ) diff --git a/agc_2-X/branches/agc_2.0.4/LANG_www/agc_pt/vdc_db_query.php b/agc_2-X/branches/agc_2.0.4/LANG_www/agc_pt/vdc_db_query.php index 26896576..644ad796 100644 --- a/agc_2-X/branches/agc_2.0.4/LANG_www/agc_pt/vdc_db_query.php +++ b/agc_2-X/branches/agc_2.0.4/LANG_www/agc_pt/vdc_db_query.php @@ -1,7 +1,7 @@ LICENSE: GPLv2 +# Copyright (C) 2008 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 @@ -69,6 +69,7 @@ # - $use_internal_dnc - ('Y','N') # - $omit_phone_code - ('Y','N') # - $no_delete_sessions - ('0','1') +# - $LogouTKicKAlL - ('0','1'); # CHANGELOG: # 50629-1044 - First build of script @@ -138,10 +139,14 @@ # 71120-1520 - added LogiNCamPaigns to show only allowed campaigns for agents upon login # 71125-1751 - Added inbound-group default inbound group sending to vicidial.php # 71129-2025 - restricted callbacks count and list to campaign only +# 71226-1117 - added option to kick all calls from conference upon logout +# 80128-1159 - fixed vicidial_log bugs +# 80402-0121 - Fixes for manual dial transfers on some systems, removed /n persist flag +# 80424-0442 - Added non_latin lookup from system_settings # -$version = '2.0.4-65'; -$build = '71129-2025'; +$version = '2.0.4-69'; +$build = '80424-0442'; require("dbconnect.php"); @@ -274,14 +279,38 @@ if (isset($_GET["enable_sipsak_messages"])) {$enable_sipsak_messages=$_GET["e elseif (isset($_POST["enable_sipsak_messages"])) {$enable_sipsak_messages=$_POST["enable_sipsak_messages"];} if (isset($_GET["status"])) {$status=$_GET["status"];} elseif (isset($_POST["status"])) {$status=$_POST["status"];} +if (isset($_GET["LogouTKicKAlL"])) {$LogouTKicKAlL=$_GET["LogouTKicKAlL"];} + elseif (isset($_POST["LogouTKicKAlL"])) {$LogouTKicKAlL=$_POST["LogouTKicKAlL"];} +header ("Content-type: text/html; charset=utf-8"); +header ("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1 +header ("Pragma: no-cache"); // HTTP/1.0 + +############################################# +##### START SYSTEM_SETTINGS LOOKUP ##### +$stmt = "SELECT use_non_latin FROM system_settings;"; +$rslt=mysql_query($stmt, $link); +if ($DB) {echo "$stmt\n";} +$qm_conf_ct = mysql_num_rows($rslt); +$i=0; +while ($i < $qm_conf_ct) + { + $row=mysql_fetch_row($rslt); + $non_latin = $row[0]; + $i++; + } +##### END SETTINGS LOOKUP ##### +########################################### + +if ($non_latin < 1) +{ $user=ereg_replace("[^0-9a-zA-Z]","",$user); $pass=ereg_replace("[^0-9a-zA-Z]","",$pass); $length_in_sec = ereg_replace("[^0-9]","",$length_in_sec); $phone_code = ereg_replace("[^0-9]","",$phone_code); $phone_number = ereg_replace("[^0-9]","",$phone_number); - +} # default optional vars if not set if (!isset($format)) {$format="text";} @@ -305,6 +334,7 @@ else { $stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$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]; @@ -381,7 +411,6 @@ if ($ACTION == 'LogiNCamPaigns') $LOGallowed_campaignsSQL=''; $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); if ( (!eregi("ALL-CAMPAIGNS",$row[0])) ) @@ -392,7 +421,6 @@ if ($ACTION == 'LogiNCamPaigns') } $stmt="SELECT campaign_id,campaign_name from vicidial_campaigns where active='Y' $LOGallowed_campaignsSQL order by campaign_id"; - if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); $camps_to_print = mysql_num_rows($rslt); @@ -713,7 +741,8 @@ if ($ACTION == 'manDiaLnextCaLL') $local_AMP = '@'; $Local_out_prefix = '9'; $Local_dial_timeout = '60'; - $Local_persist = '/n'; + # $Local_persist = '/n'; + $Local_persist = ''; if ($dial_timeout > 4) {$Local_dial_timeout = $dial_timeout;} $Local_dial_timeout = ($Local_dial_timeout * 1000); if (strlen($dial_prefix) > 0) {$Local_out_prefix = "$dial_prefix";} @@ -1049,7 +1078,8 @@ if ($stage == "end") if ($format=='debug') {echo "\n";} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); - if ($row[0] > 0) + $check_inbound = $row[0]; + if ($check_inbound > 0) { ##### look for the start epoch in the vicidial_closer_log table $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;"; @@ -1072,11 +1102,8 @@ if ($stage == "end") { $length_in_sec = 0; } - $stmt = "select count(*) from vicidial_campaigns where campaign_id='$campaign' and campaign_allow_inbound='Y';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ( ($length_in_sec < 1) and ($row[0] > 0) ) + + if ( ($length_in_sec < 1) and ($check_inbound > 0) ) { ##### start epoch in the vicidial_log table, couldn't find one in vicidial_closer_log $stmt="SELECT start_epoch FROM vicidial_log where uniqueid='$uniqueid' and lead_id='$lead_id';"; @@ -1097,21 +1124,25 @@ if ($stage == "end") } else {$length_in_sec = ($StarTtime - $start_epoch);} - $stmt = "select count(*) from vicidial_campaigns where campaign_id='$campaign' and campaign_allow_inbound='Y';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0] > 0) + $closer_logged=0; + if ($check_inbound > 0) { - $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;"; + $four_hours_ago = date("Y-m-d H:i:s", mktime(date("H")-4,date("i"),date("s"),date("m"),date("d"),date("Y"))); + + $stmt = "UPDATE vicidial_closer_log set end_epoch='$StarTtime', length_in_sec='$length_in_sec' where lead_id='$lead_id' and call_date > \"$four_hours_ago\" order by start_epoch desc limit 1;"; if ($DB) {echo "$stmt\n";} $rslt=mysql_query($stmt, $link); + $affected_rows = mysql_affected_rows($link); + if ($affected_rows > 0) + { + $closer_logged=1; + echo "$uniqueid\n$channel\n"; + } } ############################################# ##### 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); @@ -1247,7 +1278,6 @@ if ($stage == "end") { $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); } @@ -1274,7 +1304,6 @@ if ($stage == "end") $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); @@ -1314,7 +1343,6 @@ if ($stage == "end") $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); @@ -1338,7 +1366,6 @@ if ($stage == "end") $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); @@ -1347,19 +1374,22 @@ if ($stage == "end") } } - ##### look for the channel in the UPDATED vicidial_manager record of the call initiation - $stmt="UPDATE vicidial_log set end_epoch='$StarTtime', length_in_sec='$length_in_sec' where uniqueid='$uniqueid' and lead_id='$lead_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); + if ($closer_logged < 1) + { + ##### update the duration and end time in the vicidial_log table + $stmt="UPDATE vicidial_log set end_epoch='$StarTtime', length_in_sec='$length_in_sec' where uniqueid='$uniqueid' and lead_id='$lead_id';"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + $affected_rows = mysql_affected_rows($link); - if ($affected_rows > 0) - { - echo "$uniqueid\n$channel\n"; - } - else - { - echo "REGISTRO NÃO ENTRADO\n\n"; + if ($affected_rows > 0) + { + echo "$uniqueid\n$channel\n"; + } + else + { + echo "REGISTRO NÃO ENTRADO\n\n"; + } } } @@ -1642,41 +1672,69 @@ if ($ACTION == 'VDADcheckINCOMING') $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';"; + + + $stmt = "select campaign_id,phone_number,alt_dial,call_type from vicidial_auto_calls where callerid = '$callerid' order by call_time desc limit 1;"; if ($DB) {echo "$stmt\n";} $rslt=mysql_query($stmt, $link); - - $stmt = "select count(*) from vicidial_campaigns where campaign_id='$campaign' and campaign_allow_inbound='Y';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0] > 0) + $VDAC_cid_ct = mysql_num_rows($rslt); + if ($VDAC_cid_ct > 0) { - ### update the vicidial_closer_log user to INCALL - $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;"; + $row=mysql_fetch_row($rslt); + $VDADchannel_group =$row[0]; + $dialed_number =$row[1]; + $dialed_label =$row[2]; + $call_type =$row[3]; + } + else + { + if ($WeBRooTWritablE > 0) + { + $fp = fopen ("./vicidial_debug.txt", "a"); + fwrite ($fp, "$NOW_TIME|INBND|$callerid|$user|$user_group|$list_id|$lead_id|$phone_number|$uniqueid|\n"); + fclose($fp); + } + } + + if ( ($call_type=='OUT') or ($call_type=='OUTBALANCE') ) + { + $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); - $stmt = "select campaign_id,phone_number,alt_dial from vicidial_auto_calls where callerid = '$callerid' order by call_time desc limit 1;"; + $stmt = "select campaign_script,get_call_launch,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number from vicidial_campaigns where campaign_id='$campaign';"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + $VDIG_cid_ct = mysql_num_rows($rslt); + if ($VDIG_cid_ct > 0) + { + $row=mysql_fetch_row($rslt); + $VDCL_campaign_script = $row[0]; + $VDCL_get_call_launch = $row[1]; + $VDCL_xferconf_a_dtmf = $row[2]; + $VDCL_xferconf_a_number = $row[3]; + $VDCL_xferconf_b_dtmf = $row[4]; + $VDCL_xferconf_b_number = $row[5]; + } + echo "|||||$VDCL_campaign_script|$VDCL_get_call_launch|$VDCL_xferconf_a_dtmf|$VDCL_xferconf_a_number|$VDCL_xferconf_b_dtmf|$VDCL_xferconf_b_number|\n|\n"; + + $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); - $VDADchannel_group =$row[0]; - $dialed_number =$row[1]; - $dialed_label =$row[2]; - } - else - { - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./vicidial_debug.txt", "a"); - fwrite ($fp, "$NOW_TIME|INBND|$callerid|$user|$user_group|$list_id|$lead_id|$phone_number|$uniqueid|\n"); - fclose($fp); - } + $dialed_number =$row[0]; + $dialed_label =$row[1]; } + } + else + { + ### update the vicidial_closer_log user to INCALL + $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 count(*) from vicidial_log where lead_id='$lead_id' and uniqueid='$uniqueid';"; if ($DB) {echo "$stmt\n";} @@ -1748,35 +1806,6 @@ if ($ACTION == 'VDADcheckINCOMING') } else {echo '|' . $tsr . "\n";} } - else - { - $stmt = "select campaign_script,get_call_launch,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number from vicidial_campaigns where campaign_id='$campaign';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDIG_cid_ct = mysql_num_rows($rslt); - if ($VDIG_cid_ct > 0) - { - $row=mysql_fetch_row($rslt); - $VDCL_campaign_script = $row[0]; - $VDCL_get_call_launch = $row[1]; - $VDCL_xferconf_a_dtmf = $row[2]; - $VDCL_xferconf_a_number = $row[3]; - $VDCL_xferconf_b_dtmf = $row[4]; - $VDCL_xferconf_b_number = $row[5]; - } - echo "|||||$VDCL_campaign_script|$VDCL_get_call_launch|$VDCL_xferconf_a_dtmf|$VDCL_xferconf_a_number|$VDCL_xferconf_b_dtmf|$VDCL_xferconf_b_number|\n|\n"; - - $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); $comments = eregi_replace("\n",'!N',$comments); @@ -1948,6 +1977,18 @@ else $rslt=mysql_query($stmt, $link); } + if ($LogouTKicKAlL > 0) + { + $local_DEF = 'Local/5555'; + $local_AMP = '@'; + $kick_local_channel = "$local_DEF$conf_exten$local_AMP$ext_context"; + $queryCID = "ULGH3458$StarTtime"; + + $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$queryCID','Channel: $kick_local_channel','Context: $ext_context','Exten: 8300','Priority: 1','Callerid: $queryCID','','','','$channel','$exten');"; + 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";} @@ -1968,7 +2009,6 @@ else ############################################# ##### 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); @@ -2000,12 +2040,11 @@ else # $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"; @@ -2023,7 +2062,6 @@ else $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); @@ -2101,6 +2139,7 @@ if ($ACTION == 'updateDISPO') $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) { @@ -2150,7 +2189,6 @@ if ($ACTION == 'updateDISPO') ############################################# ##### 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); @@ -2175,7 +2213,6 @@ if ($ACTION == 'updateDISPO') $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); @@ -2204,7 +2241,6 @@ if ($ACTION == 'updateLEAD') { $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); @@ -2220,7 +2256,6 @@ if ($ACTION == 'updateLEAD') $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); @@ -2290,7 +2325,6 @@ if ( ($ACTION == 'VDADpause') || ($ACTION == 'VDADready') ) ############################################# ##### 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); @@ -2317,7 +2351,6 @@ if ( ($ACTION == 'VDADpause') || ($ACTION == 'VDADready') ) $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); @@ -2424,7 +2457,6 @@ if ($ACTION == 'PausaCodeSubmit') ############################################# ##### 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); @@ -2455,7 +2487,6 @@ if ($ACTION == 'PausaCodeSubmit') $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); diff --git a/agc_2-X/branches/agc_2.0.4/LANG_www/agc_pt/vicidial.php b/agc_2-X/branches/agc_2.0.4/LANG_www/agc_pt/vicidial.php index fea99d54..6cd84ca0 100644 --- a/agc_2-X/branches/agc_2.0.4/LANG_www/agc_pt/vicidial.php +++ b/agc_2-X/branches/agc_2.0.4/LANG_www/agc_pt/vicidial.php @@ -1,7 +1,7 @@ LICENSE: GPLv2 +# Copyright (C) 2008 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 @@ -171,10 +171,13 @@ # 71125-1751 - Changed Transfer section to allow for selection of in-groups to send calls to # 71127-0408 - Added height and width settings for easier modification of screen size # 71129-2025 - restricted callbacks count and list to campaign only +# 71226-1117 - added option to kick all calls from conference upon logout +# 80330-0823 - Added new AST_blind monitoring ability and minor cleanup for release +# 80402-0121 - Fixes for Manual Dial hangups and transfers # -$version = '2.0.4-142'; -$build = '71129-2025'; +$version = '2.0.4-145'; +$build = '80402-0121'; require("dbconnect.php"); @@ -207,6 +210,11 @@ if (isset($_GET["relogin"])) {$relogin=$_GET["relogin"];} $VD_campaign = strtoupper($VD_campaign); $VD_campaign = eregi_replace(" ",'',$VD_campaign); } + if (!isset($flag_channels)) + { + $flag_channels=0; + $flag_string=''; + } ### security strip all non-alphanumeric characters out of the variables ### $DB=ereg_replace("[^0-9a-z]","",$DB); @@ -237,6 +245,22 @@ $CIDdate = date("ymdHis"); $random = (rand(1000000, 9999999) + 10000000); +############################################# +##### START SYSTEM_SETTINGS LOOKUP ##### +$stmt = "SELECT use_non_latin FROM system_settings;"; +$rslt=mysql_query($stmt, $link); +if ($DB) {echo "$stmt\n";} +$qm_conf_ct = mysql_num_rows($rslt); +$i=0; +while ($i < $qm_conf_ct) + { + $row=mysql_fetch_row($rslt); + $non_latin = $row[0]; + $i++; + } +##### END SETTINGS LOOKUP ##### +########################################### + $conf_silent_prefix = '7'; # vicidial_conferences prefix to enter silently $HKuser_level = '5'; # minimum vicidial user_level for HotKeys $campaign_login_list = '1'; # show drop-down list of campaigns at login @@ -256,6 +280,7 @@ $volumecontrol_active = '1'; # set to 1 to allow agents to alter volume of chann $PreseT_DiaL_LinKs = '1'; # set to 1 to show a SELETOR link for Dial Presets $LogiNAJAX = '1'; # set to 1 to do lookups $HidEMonitoRSessionS = '1'; # set to 1 to hide remote monitoring channels from "session calls" +$LogouTKicKAlL = '1'; # set to 1 to hangup all calls in session upon agent logout $TEST_all_statuses = '0'; # TEST variable allows all statuses in dispo screen @@ -328,13 +353,12 @@ $LOGallowed_campaignsSQL=''; if ($relogin == 'YES') { $stmt="SELECT user_group from vicidial_users where user='$VD_login' and pass='$VD_pass'"; - if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $VU_user_group=$row[0]; $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); if ( (!eregi("ALL-CAMPAIGNS",$row[0])) ) @@ -509,7 +533,6 @@ echo ""; + 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; @@ -2558,6 +2557,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} // Covers the following types: XFER, VMAIL, ENTRY, CONF, PARQUE, FROMPARQUE, XfeRLOCAL, XfeRINTERNAL, XfeRBLIND, VfeRVMAIL function mainxfer_send_redirect(taskvar,taskxferconf,taskserverip,taskdebugnote) { + if (auto_dial_level == 0) {RedirecTxFEr = 1;} var xmlhttp=false; /*@cc_on @*/ /*@if (@_jscript_version >= 5) @@ -2630,7 +2630,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} } else { - xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=RedirectVD&format=text&channel=" + redirectvalue + "&call_server_ip=" + redirectserverip + "&queryCID=" + queryCID + "&exten=" + blindxferdialstring + "&ext_context=" + ext_context + "&ext_priority=1&auto_dial_level=" + auto_dial_level + "&campaign=" + campaign + "&uniqueid=" + document.vicidial_form.uniqueid.value + "&lead_id=" + document.vicidial_form.lead_id.value + "&secondS=" + VD_live_call_secondS; + xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=RedirectVD&format=text&channel=" + redirectvalue + "&call_server_ip=" + redirectserverip + "&queryCID=" + queryCID + "&exten=" + blindxferdialstring + "&ext_context=" + ext_context + "&ext_priority=1&auto_dial_level=" + auto_dial_level + "&campaign=" + campaign + "&uniqueid=" + document.vicidial_form.uniqueid.value + "&lead_id=" + document.vicidial_form.lead_id.value + "&secondS=" + VD_live_call_secondS + "&session_id=" + session_id; } } if (taskvar == 'XfeRINTERNAL') @@ -2649,25 +2649,25 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} // "90009*$group**$lead_id**$phone_number*$user*"; var redirectdestination = closerxferinternal + '90009*' + XfeRSelecT.value + '**' + document.vicidial_form.lead_id.value + '**' + document.vicidial_form.phone_number.value + '*' + user + '*'; - xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=RedirectVD&format=text&channel=" + redirectvalue + "&call_server_ip=" + redirectserverip + "&queryCID=" + queryCID + "&exten=" + redirectdestination + "&ext_context=" + ext_context + "&ext_priority=1&auto_dial_level=" + auto_dial_level + "&campaign=" + campaign + "&uniqueid=" + document.vicidial_form.uniqueid.value + "&lead_id=" + document.vicidial_form.lead_id.value + "&secondS=" + VD_live_call_secondS; + xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=RedirectVD&format=text&channel=" + redirectvalue + "&call_server_ip=" + redirectserverip + "&queryCID=" + queryCID + "&exten=" + redirectdestination + "&ext_context=" + ext_context + "&ext_priority=1&auto_dial_level=" + auto_dial_level + "&campaign=" + campaign + "&uniqueid=" + document.vicidial_form.uniqueid.value + "&lead_id=" + document.vicidial_form.lead_id.value + "&secondS=" + VD_live_call_secondS + "&session_id=" + session_id; } if (taskvar == 'XfeR') { var queryCID = "LRvdcW" + epoch_sec + user_abb; var redirectdestination = document.vicidial_form.extension_xfer.value; - xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=RedirectName&format=text&channel=" + redirectvalue + "&call_server_ip=" + redirectserverip + "&queryCID=" + queryCID + "&extenName=" + redirectdestination + "&ext_context=" + ext_context + "&ext_priority=1"; + xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=RedirectName&format=text&channel=" + redirectvalue + "&call_server_ip=" + redirectserverip + "&queryCID=" + queryCID + "&extenName=" + redirectdestination + "&ext_context=" + ext_context + "&ext_priority=1" + "&session_id=" + session_id; } if (taskvar == 'VMAIL') { var queryCID = "LVvdcW" + epoch_sec + user_abb; var redirectdestination = document.vicidial_form.extension_xfer.value; - xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=RedirectNameVmail&format=text&channel=" + redirectvalue + "&call_server_ip=" + redirectserverip + "&queryCID=" + queryCID + "&exten=" + voicemail_dump_exten + "&extenName=" + redirectdestination + "&ext_context=" + ext_context + "&ext_priority=1"; + xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=RedirectNameVmail&format=text&channel=" + redirectvalue + "&call_server_ip=" + redirectserverip + "&queryCID=" + queryCID + "&exten=" + voicemail_dump_exten + "&extenName=" + redirectdestination + "&ext_context=" + ext_context + "&ext_priority=1" + "&session_id=" + session_id; } if (taskvar == 'ENTRY') { var queryCID = "LEvdcW" + epoch_sec + user_abb; var redirectdestination = document.vicidial_form.extension_xfer_entry.value; - xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=Redirect&format=text&channel=" + redirectvalue + "&call_server_ip=" + redirectserverip + "&queryCID=" + queryCID + "&exten=" + redirectdestination + "&ext_context=" + ext_context + "&ext_priority=1"; + xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=Redirect&format=text&channel=" + redirectvalue + "&call_server_ip=" + redirectserverip + "&queryCID=" + queryCID + "&exten=" + redirectdestination + "&ext_context=" + ext_context + "&ext_priority=1" + "&session_id=" + session_id; } if (taskvar == '3WAY') { @@ -2689,7 +2689,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} DispO3wayCalLxfernumber = document.vicidial_form.xfernumber.value; DispO3wayCalLcamptail = ''; - 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=" + XfeRSelecT.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=" + XfeRSelecT.value + "&session_id=" + session_id; if (taskdebugnote == 'FIRST') { @@ -2702,7 +2702,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} var redirectdestination = taskxferconf; var redirectdestserverip = taskserverip; var parkedby = protocol + "/" + extension; - xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=RedirectToPark&format=text&channel=" + redirectdestination + "&call_server_ip=" + redirectdestserverip + "&queryCID=" + queryCID + "&exten=" + park_on_extension + "&ext_context=" + ext_context + "&ext_priority=1&extenName=park&parkedby=" + parkedby; + xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=RedirectToPark&format=text&channel=" + redirectdestination + "&call_server_ip=" + redirectdestserverip + "&queryCID=" + queryCID + "&exten=" + park_on_extension + "&ext_context=" + ext_context + "&ext_priority=1&extenName=park&parkedby=" + parkedby + "&session_id=" + session_id; document.getElementById("ParkControl").innerHTML ="\"Chamada"; customerparked=1; @@ -2723,7 +2723,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} {var dest_dialstring = session_id;} } - xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=RedirectFromPark&format=text&channel=" + redirectdestination + "&call_server_ip=" + redirectdestserverip + "&queryCID=" + queryCID + "&exten=" + dest_dialstring + "&ext_context=" + ext_context + "&ext_priority=1"; + xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=RedirectFromPark&format=text&channel=" + redirectdestination + "&call_server_ip=" + redirectdestserverip + "&queryCID=" + queryCID + "&exten=" + dest_dialstring + "&ext_context=" + ext_context + "&ext_priority=1" + "&session_id=" + session_id; document.getElementById("ParkControl").innerHTML ="\"Chamada"; customerparked=0; @@ -2744,11 +2744,55 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} } delete xmlhttp; } + + // used to send second Redirect for manual dial calls + if (auto_dial_level == 0) + { + RedirecTxFEr = 1; + 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) + { + xmlhttp.open('POST', 'manager_send.php'); + xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8'); + xmlhttp.send(xferredirect_query + "&stage=2NDXfeR"); + xmlhttp.onreadystatechange = function() + { + if (xmlhttp.readyState == 4 && xmlhttp.status == 200) + { + Nactiveext = null; + Nactiveext = xmlhttp.responseText; + // alert(RedirecTxFEr + "|" + xmlhttp.responseText); + } + } + delete xmlhttp; + } + } + if ( (taskvar == 'XfeRLOCAL') || (taskvar == 'XfeRBLIND') || (taskvar == 'XfeRVMAIL') ) { + if (auto_dial_level == 0) {RedirecTxFEr = 1;} document.vicidial_form.callchannel.value = ''; document.vicidial_form.callserverip.value = ''; if( document.images ) { document.images['livecall'].src = image_livecall_OFF.src;} + // alert(RedirecTxFEr + "|" + auto_dial_level); dialedcall_send_hangup(); } @@ -2859,6 +2903,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} } delete xmlhttp; } + RedirecTxFEr=0; } @@ -4267,7 +4312,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} AgainCalLSecondS = VD_live_call_secondS; AgaiNCalLCID = CalLCID; var process_post_hangup=0; - if (MD_channel_look==1) + if ( (RedirecTxFEr < 1) && ( (MD_channel_look==1) || (auto_dial_level == 0) ) ) { MD_channel_look=0; DialTimeHangup(); @@ -4552,6 +4597,9 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} // Send Hangup command for any Local call that is not in the quiet(7) entry - used to stop manual dials even if no connect function DialTimeHangup() { + if (RedirecTxFEr < 1) + { + // alert("RedirecTxFEr|" + RedirecTxFEr); MD_channel_look=0; var xmlhttp=false; /*@cc_on @*/ @@ -4590,6 +4638,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} } delete xmlhttp; } + } } @@ -5238,7 +5287,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 + "&agent_log_id=" + agent_log_id + "&no_delete_sessions=" + no_delete_sessions + "&phone_ip=" + phone_ip + "&enable_sipsak_messages=" + enable_sipsak_messages; + 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 + "&LogouTKicKAlL=" + LogouTKicKAlL + "&ext_context=" + ext_context; xmlhttp.open('POST', 'vdc_db_query.php'); xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8'); xmlhttp.send(VDlogout_query); @@ -5246,7 +5295,8 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} { if (xmlhttp.readyState == 4 && xmlhttp.status == 200) { - // alert(xmlhttp.responseText); + // alert(VDlogout_query); + // alert(xmlhttp.responseText); } } delete xmlhttp; @@ -5388,10 +5438,14 @@ else var encoded = encodedvar; decoded = ''; var i = 0; - var RGnl = new RegExp("\n","g"); + var RGnl = new RegExp("[\r]\n","g"); var RGplus = new RegExp(" ","g"); var RGiframe = new RegExp("iframe","gi"); +var xtest; +xtest=unescape(encoded); +encoded=utf8_decode(xtest); + if (scriptformat == 'YES') { var SCvendor_lead_code = document.vicidial_form.vendor_lead_code.value; @@ -5563,30 +5617,64 @@ else encoded = encoded.replace(RGSIPexten, SCSIPexten); encoded = encoded.replace(RGsession_id, SCsession_id); } - while (i < encoded.length) { - var ch = encoded.charAt(i); - if (ch == "%") { - if (i < (encoded.length-2) - && HEXCHAR.indexOf(encoded.charAt(i+1)) != -1 - && HEXCHAR.indexOf(encoded.charAt(i+2)) != -1 ) { - decoded += unescape( encoded.substr(i,3) ); - i += 3; - } else { - alert( 'Bad escape combo near ...' + encoded.substr(i) ); - decoded += "%[ERR]"; - i++; - } - } else { - decoded += ch; - i++; - } - } // while - decoded = decoded.replace(RGnl, "
"); - +decoded=encoded; // simple no ? +decoded = decoded.replace(RGnl, "
"); +// while (i < encoded.length) { +// var ch = encoded.charAt(i); +// if (ch == "%") { +// if (i < (encoded.length-2) +// && HEXCHAR.indexOf(encoded.charAt(i+1)) != -1 +// && HEXCHAR.indexOf(encoded.charAt(i+2)) != -1 ) { +// decoded += unescape( encoded.substr(i,3) ); +// i += 3; +// } else { +// alert( 'Bad escape combo near ...' + encoded.substr(i) ); +// decoded += "%[ERR]"; +// i++; +// } +// } else { +// decoded += ch; +// i++; +// } +// } // while +// decoded = decoded.replace(RGnl, "
"); +// return false; }; +// ################################################################################ +// Taken form php.net Angelos +function utf8_decode(utftext) { + var string = ""; + var i = 0; + var c = c1 = c2 = 0; + + while ( i < utftext.length ) { + + c = utftext.charCodeAt(i); + + if (c < 128) { + string += String.fromCharCode(c); + i++; + } + else if((c > 191) && (c < 224)) { + c2 = utftext.charCodeAt(i+1); + string += String.fromCharCode(((c & 31) << 6) | (c2 & 63)); + i += 2; + } + else { + c2 = utftext.charCodeAt(i+1); + c3 = utftext.charCodeAt(i+2); + string += String.fromCharCode(((c & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63)); + i += 3; + } + + } + + return string; + }; + // ################################################################################ // Move the Dispo frame out of the way and change the link to maximize @@ -6304,14 +6392,15 @@ else .body_small {font-size: 11px; font-family: sans-serif;} .body_tiny {font-size: 10px; font-family: sans-serif;} .log_text {font-size: 11px; font-family: monospace;} + .log_text_red {font-size: 11px; font-family: monospace; font-weight: bold; background: #FF3333} .log_title {font-size: 12px; font-family: monospace; font-weight: bold;} .sd_text {font-size: 16px; font-family: sans-serif; font-weight: bold;} .sh_text {font-size: 14px; font-family: sans-serif; font-weight: bold;} .sb_text {font-size: 12px; font-family: sans-serif;} .sk_text {font-size: 11px; font-family: sans-serif;} .skb_text {font-size: 13px; font-family: sans-serif; font-weight: bold;} - .ON_conf {font-size: 11px; font-family: monospace; color: black ; background: #FFFF99} - .OFF_conf {font-size: 11px; font-family: monospace; color: black ; background: #FFCC77} + .ON_conf {font-size: 11px; font-family: monospace; color: black; background: #FFFF99} + .OFF_conf {font-size: 11px; font-family: monospace; color: black; background: #FFCC77} .cust_form {font-family: sans-serif; font-size: 10px; overflow: auto} --> @@ -6604,7 +6693,17 @@ Seu Status:
Calls Dialing: + + + + + + + + + +   - + diff --git a/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial/AST_CLOSERstats.php b/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial/AST_CLOSERstats.php index ec53f93f..30477687 100644 --- a/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial/AST_CLOSERstats.php +++ b/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial/AST_CLOSERstats.php @@ -10,6 +10,7 @@ # 60905-1326 - Added queue time stats # 71008-1436 - Added shift to be defined in dbconnect.php # 71025-0021 - Added status breakdown +# 71218-1155 - added end_date for multi-day reports # require("dbconnect.php"); @@ -20,7 +21,9 @@ $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"];} + elseif (isset($_POST["query_date"])) {$query_date=$_POST["query_date"];} +if (isset($_GET["end_date"])) {$end_date=$_GET["end_date"];} + elseif (isset($_POST["end_date"])) {$end_date=$_POST["end_date"];} if (isset($_GET["shift"])) {$shift=$_GET["shift"];} elseif (isset($_POST["shift"])) {$shift=$_POST["shift"];} if (isset($_GET["submit"])) {$submit=$_GET["submit"];} @@ -52,6 +55,7 @@ $NOW_TIME = date("Y-m-d H:i:s"); $STARTtime = date("U"); if (!isset($group)) {$group = '';} if (!isset($query_date)) {$query_date = $NOW_DATE;} +if (!isset($end_date)) {$end_date = $NOW_DATE;} $stmt="select group_id from vicidial_inbound_groups;"; $rslt=mysql_query($stmt, $link); @@ -82,6 +86,7 @@ echo "\n" echo "VICIDIAL: VDAD Closer Stats\n"; echo "\n"; echo "\n"; +echo " to \n"; echo "\n"; +echo " to \n"; echo "\n"; +echo "\n"; +echo " to \n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; +echo "\n"; echo "\n"; } echo "         \n"; -echo "STOP | "; -echo "SLOW | "; -echo "GO"; +echo "STOP | "; +echo "SLOW | "; +echo "GO"; echo "       MODIFY | \n"; echo "SUMMARY | \n"; echo "REPORTS \n"; @@ -276,10 +305,6 @@ 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'"); -} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $DIALlev = $row[0]; @@ -309,10 +334,6 @@ 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]; @@ -322,10 +343,6 @@ 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),min(status_category_1),sum(status_category_count_1),min(status_category_2),sum(status_category_count_2),min(status_category_3),sum(status_category_count_3),min(status_category_4),sum(status_category_count_4) 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]; @@ -357,10 +374,6 @@ 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]; @@ -436,31 +449,39 @@ echo ""; echo ""; @@ -469,34 +490,38 @@ echo "
Versione del webclient di VICICHIAMA:     CONFIGURAZIONE:               Server:              
-Mostrate le informazioni sul canale della conferenza

 
+> @@ -6670,42 +6769,42 @@ Vostro Status:
Calls Dialing: - +
Versione di VICIDial web-client:     BUILD:               Server:              
+Mostra le informazioni sul canale della conferenza

 
id="MainTable"> - + @@ -6722,12 +6821,12 @@ IDENTIFICAZIONE Registrazione:
STATUS:
STATO:
Chiama il numero seguente
ANTEPRIMA CONTATTO
- ALT CHIAMATE
+ CHIAMA NUMERO ALTERNATIVO
-REGISTRAZIONE DOCUMENTO:
+FILE REGISTRAZIONE:

-IDENTIFICAZIONE Registrazione:
+ID Registrazione:
-Inizia la Registrazione
+Inizia Registrazione

-Interfacccia Web
+Web Form

-Parcheggia la chiamata
+Metti in attesa la chiamata
Trasferimento - Conferenza

-Disconnetti il cliente
+Aggancia il cliente

-
Trasmetta DTMF

+
Trasmetti Tono Tastiera

- + - + - + @@ -6735,19 +6834,19 @@ IDENTIFICAZIONE Registrazione: Indirizzo2: - - + + - + - + - +
secondi:   Canale:   Tempo Di Cust:   Canale:   Ora Cliente:
Informazioni Cliente: Dati Cliente:
Titolo:   Primo:   Mi:  Ultimo:   Nome:   MI:   Cognome:
Indirizzo1:   Indirizzo3:
Città:   Stato:   Codice postale: Citta`:   Stato:   CAP:
Provincia:   ID Fornitore:
Telefono:   Prefisso:   Alt. Telefono:   Prefisso:   Num. Alternativo:
Mostra:   Email:
Osservazioni: Note:
diff --git a/agc_2-X/branches/agc_2.0.4/LANG_www/agc_it/voicemail_check.php b/agc_2-X/branches/agc_2.0.4/LANG_www/agc_it/voicemail_check.php index 1e0023d4..370ae6b6 100644 --- a/agc_2-X/branches/agc_2.0.4/LANG_www/agc_it/voicemail_check.php +++ b/agc_2-X/branches/agc_2.0.4/LANG_www/agc_it/voicemail_check.php @@ -61,7 +61,7 @@ if (!isset($query_date)) {$query_date = $NOW_DATE;} if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) { - echo "Non valido Utentename/Parola d`accesso: |$user|$pass|\n"; + echo "Utentename/Password non validi: |$user|$pass|\n"; exit; } else @@ -69,7 +69,7 @@ if (!isset($query_date)) {$query_date = $NOW_DATE;} if( (strlen($server_ip)<6) or (!isset($server_ip)) or ( (strlen($session_name)<12) or (!isset($session_name)) ) ) { - echo "Non valido server_ip: |$server_ip| or Non valido session_name: |$session_name|\n"; + echo "ip del server non valido: |$server_ip| or Nome sessione non valido: |$session_name|\n"; exit; } else @@ -81,7 +81,7 @@ if (!isset($query_date)) {$query_date = $NOW_DATE;} $SNauth=$row[0]; if($SNauth==0) { - echo "Non valido session_name: |$session_name|$server_ip|\n"; + echo "Nome sessione non valido: |$session_name|$server_ip|\n"; exit; } else @@ -95,7 +95,7 @@ if ($format=='debug') { echo "\n"; echo "\n"; -echo "\n"; +echo "\n"; echo "Controllo Voicemail"; echo "\n"; echo "\n"; @@ -107,7 +107,7 @@ echo " if (strlen($vmail_box)<1) { $channel_live=0; - echo "Casella del voicemail $vmail_box non è valido\n"; + echo "Casella Voicemail $vmail_box non e` valido\n"; exit; } else diff --git a/agc_2-X/branches/agc_2.0.4/LANG_www/agc_pl/conf_exten_check.php b/agc_2-X/branches/agc_2.0.4/LANG_www/agc_pl/conf_exten_check.php index a27ec4cf..bcc2f9ba 100644 --- a/agc_2-X/branches/agc_2.0.4/LANG_www/agc_pl/conf_exten_check.php +++ b/agc_2-X/branches/agc_2.0.4/LANG_www/agc_pl/conf_exten_check.php @@ -1,7 +1,7 @@ LICENSE: GPLv2 +# Copyright (C) 2008 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 @@ -35,6 +35,7 @@ # 61128-2255 - Added update for manual dial vicidial_live_agents # 70319-1542 - Added agent disabled display function # 71122-0205 - Added vicidial_live_agent status output +# 80424-0442 - Added non_latin lookup from system_settings # require("dbconnect.php"); @@ -63,8 +64,28 @@ if (isset($_GET["auto_dial_level"])) {$auto_dial_level=$_GET["auto_dial_level" if (isset($_GET["campagentstdisp"])) {$campagentstdisp=$_GET["campagentstdisp"];} elseif (isset($_POST["campagentstdisp"])) {$campagentstdisp=$_POST["campagentstdisp"];} + +############################################# +##### START SYSTEM_SETTINGS LOOKUP ##### +$stmt = "SELECT use_non_latin FROM system_settings;"; +$rslt=mysql_query($stmt, $link); +if ($DB) {echo "$stmt\n";} +$qm_conf_ct = mysql_num_rows($rslt); +$i=0; +while ($i < $qm_conf_ct) + { + $row=mysql_fetch_row($rslt); + $non_latin = $row[0]; + $i++; + } +##### END SETTINGS LOOKUP ##### +########################################### + +if ($non_latin < 1) +{ $user=ereg_replace("[^0-9a-zA-Z]","",$user); $pass=ereg_replace("[^0-9a-zA-Z]","",$pass); +} # default optional vars if not set if (!isset($format)) {$format="text";} @@ -81,11 +102,12 @@ if (!isset($query_date)) {$query_date = $NOW_DATE;} $random = (rand(1000000, 9999999) + 10000000); - $stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; +$stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$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]; if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) { diff --git a/agc_2-X/branches/agc_2.0.4/LANG_www/agc_pl/manager_send.php b/agc_2-X/branches/agc_2.0.4/LANG_www/agc_pl/manager_send.php index 8932ad9b..49b84829 100644 --- a/agc_2-X/branches/agc_2.0.4/LANG_www/agc_pl/manager_send.php +++ b/agc_2-X/branches/agc_2.0.4/LANG_www/agc_pl/manager_send.php @@ -1,7 +1,7 @@ LICENSE: GPLv2 +# Copyright (C) 2008 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 @@ -32,8 +32,8 @@ # - $agent_log_id - ('123456',...) # - $call_server_ip - ('10.10.10.15',...) # - $CalLCID - ('VD01234567890123456',...) -# - $stage - ('UP','DOWN') -# +# - $stage - ('UP','DOWN','2NDXfeR') +# - $session_id - ('8600051') # CHANGELOG: # 50401-1002 - First build of script, Hangup function only @@ -68,8 +68,14 @@ # 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 +# 80331-1433 - Added second transfer try for VICIDIAL transfers on manual dial calls +# 80402-0121 - Fixes for manual dial transfers on some systems +# 80424-0442 - Added non_latin lookup from system_settings # +$version = '2.0.4-31'; +$build = '80424-0442'; + require("dbconnect.php"); ### These are variable assignments for PHP globals off @@ -137,28 +143,48 @@ if (isset($_GET["enable_sipsak_messages"])) {$enable_sipsak_messages=$_GET["e 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["session_id"])) {$session_id=$_GET["session_id"];} + elseif (isset($_POST["session_id"])) {$session_id=$_POST["session_id"];} +############################################# +##### START SYSTEM_SETTINGS LOOKUP ##### +$stmt = "SELECT use_non_latin FROM system_settings;"; +$rslt=mysql_query($stmt, $link); +if ($DB) {echo "$stmt\n";} +$qm_conf_ct = mysql_num_rows($rslt); +$i=0; +while ($i < $qm_conf_ct) + { + $row=mysql_fetch_row($rslt); + $non_latin = $row[0]; + $i++; + } +##### END SETTINGS LOOKUP ##### +########################################### + +if ($non_latin < 1) +{ $user=ereg_replace("[^0-9a-zA-Z]","",$user); $pass=ereg_replace("[^0-9a-zA-Z]","",$pass); $secondS = ereg_replace("[^0-9]","",$secondS); +} # default optional vars if not set if (!isset($ACTION)) {$ACTION="Originate";} if (!isset($format)) {$format="alert";} if (!isset($ext_priority)) {$ext_priority="1";} -$version = '2.0.29'; -$build = '70320-1502'; $StarTtime = date("U"); $NOW_DATE = date("Y-m-d"); $NOW_TIME = date("Y-m-d H:i:s"); if (!isset($query_date)) {$query_date = $NOW_DATE;} - $stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; +$stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$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]; if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) { @@ -878,6 +904,29 @@ if ($ACTION=="RedirectXtra") if ($ACTION=="Redirect") { + ### for manual dial VICIWYBIERZ calls send the second attempt to transfer the call + if ($stage=="2NDXfeR") + { + $local_DEF = 'Local/'; + $local_AMP = '@'; + $hangup_channel_prefix = "$local_DEF$session_id$local_AMP$ext_context"; + + $stmt="SELECT count(*) FROM live_sip_channels where server_ip = '$server_ip' and channel LIKE \"$hangup_channel_prefix%\";"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + if ($row > 0) + { + $stmt="SELECT channel FROM live_sip_channels where server_ip = '$server_ip' and channel LIKE \"$hangup_channel_prefix%\";"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + $rowx=mysql_fetch_row($rslt); + $channel=$rowx[0]; + $channel = eregi_replace("1$","2",$channel); + $queryCID = eregi_replace("^.","Q",$queryCID); + } + } + $row=''; $rowx=''; $channel_live=1; if ( (strlen($channel)<3) or (strlen($queryCID)<15) or (strlen($exten)<1) or (strlen($ext_context)<1) or (strlen($ext_priority)<1) ) diff --git a/agc_2-X/branches/agc_2.0.4/LANG_www/agc_pl/vdc_db_query.php b/agc_2-X/branches/agc_2.0.4/LANG_www/agc_pl/vdc_db_query.php index 5c66d12a..7207c550 100644 --- a/agc_2-X/branches/agc_2.0.4/LANG_www/agc_pl/vdc_db_query.php +++ b/agc_2-X/branches/agc_2.0.4/LANG_www/agc_pl/vdc_db_query.php @@ -1,7 +1,7 @@ LICENSE: GPLv2 +# Copyright (C) 2008 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 @@ -69,6 +69,7 @@ # - $use_internal_dnc - ('Y','N') # - $omit_phone_code - ('Y','N') # - $no_delete_sessions - ('0','1') +# - $LogouTKicKAlL - ('0','1'); # CHANGELOG: # 50629-1044 - First build of script @@ -138,10 +139,14 @@ # 71120-1520 - added LogiNCamPaigns to show only allowed campaigns for agents upon login # 71125-1751 - Added inbound-group default inbound group sending to vicidial.php # 71129-2025 - restricted callbacks count and list to campaign only +# 71226-1117 - added option to kick all calls from conference upon logout +# 80128-1159 - fixed vicidial_log bugs +# 80402-0121 - Fixes for manual dial transfers on some systems, removed /n persist flag +# 80424-0442 - Added non_latin lookup from system_settings # -$version = '2.0.4-65'; -$build = '71129-2025'; +$version = '2.0.4-69'; +$build = '80424-0442'; require("dbconnect.php"); @@ -274,14 +279,38 @@ if (isset($_GET["enable_sipsak_messages"])) {$enable_sipsak_messages=$_GET["e elseif (isset($_POST["enable_sipsak_messages"])) {$enable_sipsak_messages=$_POST["enable_sipsak_messages"];} if (isset($_GET["status"])) {$status=$_GET["status"];} elseif (isset($_POST["status"])) {$status=$_POST["status"];} +if (isset($_GET["LogouTKicKAlL"])) {$LogouTKicKAlL=$_GET["LogouTKicKAlL"];} + elseif (isset($_POST["LogouTKicKAlL"])) {$LogouTKicKAlL=$_POST["LogouTKicKAlL"];} +header ("Content-type: text/html; charset=utf-8"); +header ("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1 +header ("Pragma: no-cache"); // HTTP/1.0 + +############################################# +##### START SYSTEM_SETTINGS LOOKUP ##### +$stmt = "SELECT use_non_latin FROM system_settings;"; +$rslt=mysql_query($stmt, $link); +if ($DB) {echo "$stmt\n";} +$qm_conf_ct = mysql_num_rows($rslt); +$i=0; +while ($i < $qm_conf_ct) + { + $row=mysql_fetch_row($rslt); + $non_latin = $row[0]; + $i++; + } +##### END SETTINGS LOOKUP ##### +########################################### + +if ($non_latin < 1) +{ $user=ereg_replace("[^0-9a-zA-Z]","",$user); $pass=ereg_replace("[^0-9a-zA-Z]","",$pass); $length_in_sec = ereg_replace("[^0-9]","",$length_in_sec); $phone_code = ereg_replace("[^0-9]","",$phone_code); $phone_number = ereg_replace("[^0-9]","",$phone_number); - +} # default optional vars if not set if (!isset($format)) {$format="text";} @@ -305,6 +334,7 @@ else { $stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$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]; @@ -381,7 +411,6 @@ if ($ACTION == 'LogiNCamPaigns') $LOGallowed_campaignsSQL=''; $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); if ( (!eregi("ALL-CAMPAIGNS",$row[0])) ) @@ -392,7 +421,6 @@ if ($ACTION == 'LogiNCamPaigns') } $stmt="SELECT campaign_id,campaign_name from vicidial_campaigns where active='Y' $LOGallowed_campaignsSQL order by campaign_id"; - if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); $camps_to_print = mysql_num_rows($rslt); @@ -713,7 +741,8 @@ if ($ACTION == 'manDiaLnextCaLL') $local_AMP = '@'; $Local_out_prefix = '9'; $Local_dial_timeout = '60'; - $Local_persist = '/n'; + # $Local_persist = '/n'; + $Local_persist = ''; if ($dial_timeout > 4) {$Local_dial_timeout = $dial_timeout;} $Local_dial_timeout = ($Local_dial_timeout * 1000); if (strlen($dial_prefix) > 0) {$Local_out_prefix = "$dial_prefix";} @@ -1049,7 +1078,8 @@ if ($stage == "end") if ($format=='debug') {echo "\n";} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); - if ($row[0] > 0) + $check_inbound = $row[0]; + if ($check_inbound > 0) { ##### look for the start epoch in the vicidial_closer_log table $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;"; @@ -1072,11 +1102,8 @@ if ($stage == "end") { $length_in_sec = 0; } - $stmt = "select count(*) from vicidial_campaigns where campaign_id='$campaign' and campaign_allow_inbound='Y';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ( ($length_in_sec < 1) and ($row[0] > 0) ) + + if ( ($length_in_sec < 1) and ($check_inbound > 0) ) { ##### start epoch in the vicidial_log table, couldn't find one in vicidial_closer_log $stmt="SELECT start_epoch FROM vicidial_log where uniqueid='$uniqueid' and lead_id='$lead_id';"; @@ -1097,21 +1124,25 @@ if ($stage == "end") } else {$length_in_sec = ($StarTtime - $start_epoch);} - $stmt = "select count(*) from vicidial_campaigns where campaign_id='$campaign' and campaign_allow_inbound='Y';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0] > 0) + $closer_logged=0; + if ($check_inbound > 0) { - $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;"; + $four_hours_ago = date("Y-m-d H:i:s", mktime(date("H")-4,date("i"),date("s"),date("m"),date("d"),date("Y"))); + + $stmt = "UPDATE vicidial_closer_log set end_epoch='$StarTtime', length_in_sec='$length_in_sec' where lead_id='$lead_id' and call_date > \"$four_hours_ago\" order by start_epoch desc limit 1;"; if ($DB) {echo "$stmt\n";} $rslt=mysql_query($stmt, $link); + $affected_rows = mysql_affected_rows($link); + if ($affected_rows > 0) + { + $closer_logged=1; + echo "$uniqueid\n$channel\n"; + } } ############################################# ##### 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); @@ -1247,7 +1278,6 @@ if ($stage == "end") { $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); } @@ -1274,7 +1304,6 @@ if ($stage == "end") $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); @@ -1314,7 +1343,6 @@ if ($stage == "end") $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); @@ -1338,7 +1366,6 @@ if ($stage == "end") $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); @@ -1347,19 +1374,22 @@ if ($stage == "end") } } - ##### look for the channel in the UPDATED vicidial_manager record of the call initiation - $stmt="UPDATE vicidial_log set end_epoch='$StarTtime', length_in_sec='$length_in_sec' where uniqueid='$uniqueid' and lead_id='$lead_id';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); + if ($closer_logged < 1) + { + ##### update the duration and end time in the vicidial_log table + $stmt="UPDATE vicidial_log set end_epoch='$StarTtime', length_in_sec='$length_in_sec' where uniqueid='$uniqueid' and lead_id='$lead_id';"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + $affected_rows = mysql_affected_rows($link); - if ($affected_rows > 0) - { - echo "$uniqueid\n$channel\n"; - } - else - { - echo "Dziennik nie zapisany\n\n"; + if ($affected_rows > 0) + { + echo "$uniqueid\n$channel\n"; + } + else + { + echo "Dziennik nie zapisany\n\n"; + } } } @@ -1642,41 +1672,69 @@ if ($ACTION == 'VDADcheckINCOMING') $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';"; + + + $stmt = "select campaign_id,phone_number,alt_dial,call_type from vicidial_auto_calls where callerid = '$callerid' order by call_time desc limit 1;"; if ($DB) {echo "$stmt\n";} $rslt=mysql_query($stmt, $link); - - $stmt = "select count(*) from vicidial_campaigns where campaign_id='$campaign' and campaign_allow_inbound='Y';"; - if ($format=='debug') {echo "\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0] > 0) + $VDAC_cid_ct = mysql_num_rows($rslt); + if ($VDAC_cid_ct > 0) { - ### update the vicidial_closer_log user to INCALL - $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;"; + $row=mysql_fetch_row($rslt); + $VDADchannel_group =$row[0]; + $dialed_number =$row[1]; + $dialed_label =$row[2]; + $call_type =$row[3]; + } + else + { + if ($WeBRooTWritablE > 0) + { + $fp = fopen ("./vicidial_debug.txt", "a"); + fwrite ($fp, "$NOW_TIME|INBND|$callerid|$user|$user_group|$list_id|$lead_id|$phone_number|$uniqueid|\n"); + fclose($fp); + } + } + + if ( ($call_type=='OUT') or ($call_type=='OUTBALANCE') ) + { + $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); - $stmt = "select campaign_id,phone_number,alt_dial from vicidial_auto_calls where callerid = '$callerid' order by call_time desc limit 1;"; + $stmt = "select campaign_script,get_call_launch,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number from vicidial_campaigns where campaign_id='$campaign';"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + $VDIG_cid_ct = mysql_num_rows($rslt); + if ($VDIG_cid_ct > 0) + { + $row=mysql_fetch_row($rslt); + $VDCL_campaign_script = $row[0]; + $VDCL_get_call_launch = $row[1]; + $VDCL_xferconf_a_dtmf = $row[2]; + $VDCL_xferconf_a_number = $row[3]; + $VDCL_xferconf_b_dtmf = $row[4]; + $VDCL_xferconf_b_number = $row[5]; + } + echo "|||||$VDCL_campaign_script|$VDCL_get_call_launch|$VDCL_xferconf_a_dtmf|$VDCL_xferconf_a_number|$VDCL_xferconf_b_dtmf|$VDCL_xferconf_b_number|\n|\n"; + + $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); - $VDADchannel_group =$row[0]; - $dialed_number =$row[1]; - $dialed_label =$row[2]; - } - else - { - if ($WeBRooTWritablE > 0) - { - $fp = fopen ("./vicidial_debug.txt", "a"); - fwrite ($fp, "$NOW_TIME|INBND|$callerid|$user|$user_group|$list_id|$lead_id|$phone_number|$uniqueid|\n"); - fclose($fp); - } + $dialed_number =$row[0]; + $dialed_label =$row[1]; } + } + else + { + ### update the vicidial_closer_log user to INCALL + $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 count(*) from vicidial_log where lead_id='$lead_id' and uniqueid='$uniqueid';"; if ($DB) {echo "$stmt\n";} @@ -1748,35 +1806,6 @@ if ($ACTION == 'VDADcheckINCOMING') } else {echo '|' . $tsr . "\n";} } - else - { - $stmt = "select campaign_script,get_call_launch,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number from vicidial_campaigns where campaign_id='$campaign';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $VDIG_cid_ct = mysql_num_rows($rslt); - if ($VDIG_cid_ct > 0) - { - $row=mysql_fetch_row($rslt); - $VDCL_campaign_script = $row[0]; - $VDCL_get_call_launch = $row[1]; - $VDCL_xferconf_a_dtmf = $row[2]; - $VDCL_xferconf_a_number = $row[3]; - $VDCL_xferconf_b_dtmf = $row[4]; - $VDCL_xferconf_b_number = $row[5]; - } - echo "|||||$VDCL_campaign_script|$VDCL_get_call_launch|$VDCL_xferconf_a_dtmf|$VDCL_xferconf_a_number|$VDCL_xferconf_b_dtmf|$VDCL_xferconf_b_number|\n|\n"; - - $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); $comments = eregi_replace("\n",'!N',$comments); @@ -1948,6 +1977,18 @@ else $rslt=mysql_query($stmt, $link); } + if ($LogouTKicKAlL > 0) + { + $local_DEF = 'Local/5555'; + $local_AMP = '@'; + $kick_local_channel = "$local_DEF$conf_exten$local_AMP$ext_context"; + $queryCID = "ULGH3458$StarTtime"; + + $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$queryCID','Channel: $kick_local_channel','Context: $ext_context','Exten: 8300','Priority: 1','Callerid: $queryCID','','','','$channel','$exten');"; + 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";} @@ -1968,7 +2009,6 @@ else ############################################# ##### 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); @@ -2000,12 +2040,11 @@ else # $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"; @@ -2023,7 +2062,6 @@ else $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); @@ -2101,6 +2139,7 @@ if ($ACTION == 'updateDISPO') $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) { @@ -2150,7 +2189,6 @@ if ($ACTION == 'updateDISPO') ############################################# ##### 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); @@ -2175,7 +2213,6 @@ if ($ACTION == 'updateDISPO') $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); @@ -2204,7 +2241,6 @@ if ($ACTION == 'updateLEAD') { $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); @@ -2220,7 +2256,6 @@ if ($ACTION == 'updateLEAD') $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); @@ -2290,7 +2325,6 @@ if ( ($ACTION == 'VDADpause') || ($ACTION == 'VDADready') ) ############################################# ##### 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); @@ -2317,7 +2351,6 @@ if ( ($ACTION == 'VDADpause') || ($ACTION == 'VDADready') ) $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); @@ -2424,7 +2457,6 @@ if ($ACTION == 'PrzerwaCodeSubmit') ############################################# ##### 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); @@ -2455,7 +2487,6 @@ if ($ACTION == 'PrzerwaCodeSubmit') $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); diff --git a/agc_2-X/branches/agc_2.0.4/LANG_www/agc_pl/vicidial.php b/agc_2-X/branches/agc_2.0.4/LANG_www/agc_pl/vicidial.php index 82d9ef8d..d5846697 100644 --- a/agc_2-X/branches/agc_2.0.4/LANG_www/agc_pl/vicidial.php +++ b/agc_2-X/branches/agc_2.0.4/LANG_www/agc_pl/vicidial.php @@ -1,7 +1,7 @@ LICENSE: GPLv2 +# Copyright (C) 2008 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 @@ -171,10 +171,13 @@ # 71125-1751 - Changed Transfer section to allow for selection of in-groups to send calls to # 71127-0408 - Added height and width settings for easier modification of screen size # 71129-2025 - restricted callbacks count and list to campaign only +# 71226-1117 - added option to kick all calls from conference upon logout +# 80330-0823 - Added new AST_blind monitoring ability and minor cleanup for release +# 80402-0121 - Fixes for Manual Dial hangups and transfers # -$version = '2.0.4-142'; -$build = '71129-2025'; +$version = '2.0.4-145'; +$build = '80402-0121'; require("dbconnect.php"); @@ -207,6 +210,11 @@ if (isset($_GET["relogin"])) {$relogin=$_GET["relogin"];} $VD_campaign = strtoupper($VD_campaign); $VD_campaign = eregi_replace(" ",'',$VD_campaign); } + if (!isset($flag_channels)) + { + $flag_channels=0; + $flag_string=''; + } ### security strip all non-alphanumeric characters out of the variables ### $DB=ereg_replace("[^0-9a-z]","",$DB); @@ -237,6 +245,22 @@ $CIDdate = date("ymdHis"); $random = (rand(1000000, 9999999) + 10000000); +############################################# +##### START SYSTEM_SETTINGS LOOKUP ##### +$stmt = "SELECT use_non_latin FROM system_settings;"; +$rslt=mysql_query($stmt, $link); +if ($DB) {echo "$stmt\n";} +$qm_conf_ct = mysql_num_rows($rslt); +$i=0; +while ($i < $qm_conf_ct) + { + $row=mysql_fetch_row($rslt); + $non_latin = $row[0]; + $i++; + } +##### END SETTINGS LOOKUP ##### +########################################### + $conf_silent_prefix = '7'; # vicidial_conferences prefix to enter silently $HKuser_level = '5'; # minimum vicidial user_level for HotKeys $campaign_login_list = '1'; # show drop-down list of campaigns at login @@ -256,6 +280,7 @@ $volumecontrol_active = '1'; # set to 1 to allow agents to alter volume of chann $PreseT_DiaL_LinKs = '1'; # set to 1 to show a WYBIERZ link for Dial Presets $LogiNAJAX = '1'; # set to 1 to do lookups $HidEMonitoRSessionS = '1'; # set to 1 to hide remote monitoring channels from "session calls" +$LogouTKicKAlL = '1'; # set to 1 to hangup all calls in session upon agent logout $TEST_all_statuses = '0'; # TEST variable allows all statuses in dispo screen @@ -328,13 +353,12 @@ $LOGallowed_campaignsSQL=''; if ($relogin == 'YES') { $stmt="SELECT user_group from vicidial_users where user='$VD_login' and pass='$VD_pass'"; - if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $VU_user_group=$row[0]; $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); if ( (!eregi("ALL-CAMPAIGNS",$row[0])) ) @@ -509,7 +533,6 @@ echo "
0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $phone_login=$row[0]; @@ -593,7 +616,6 @@ $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]; @@ -604,7 +626,6 @@ $VDloginDISPLAY=0; $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,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]; @@ -630,7 +651,6 @@ $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]; @@ -662,7 +682,6 @@ echo " 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $CAMPactive=$row[0]; @@ -674,7 +693,6 @@ 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); @@ -691,7 +709,6 @@ 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); @@ -712,7 +729,6 @@ 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); @@ -743,7 +759,6 @@ echo " 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $row=mysql_fetch_row($rslt); @@ -802,7 +817,6 @@ 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); @@ -828,7 +842,6 @@ echo " 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $closer_ct = mysql_num_rows($rslt); @@ -852,7 +865,6 @@ echo " 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $xfer_ct = mysql_num_rows($rslt); @@ -871,7 +883,6 @@ echo " 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $row=mysql_fetch_row($rslt); @@ -933,7 +944,6 @@ echo " 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $authphone=$row[0]; @@ -972,7 +982,6 @@ 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]; @@ -1050,7 +1059,6 @@ 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]; @@ -1104,12 +1112,10 @@ 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 ( ($campaign_allow_inbound == 'Y') || ($campaign_leads_to_call > 0) || (ereg('Y',$no_hopper_leads_logins)) ) @@ -1117,12 +1123,10 @@ else ### insert an entry into the user log for the login event $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); @@ -1139,7 +1143,6 @@ 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); @@ -1151,7 +1154,6 @@ 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"; @@ -1159,28 +1161,24 @@ 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"; $stmt="DELETE from vicidial_live_inbound_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"; @@ -1194,7 +1192,6 @@ else ############################################# ##### 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); @@ -1226,7 +1223,6 @@ else ### 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"; @@ -1237,7 +1233,6 @@ else ##### grab the campaign_weight and number of calls today na that campaign for the agent $stmt="SELECT campaign_weight,calls_today FROM vicidial_campaign_agents where user='$VD_login' and campaign_id = '$VD_campaign';"; - if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $vca_ct = mysql_num_rows($rslt); @@ -1254,7 +1249,6 @@ else $calls_today = '0'; $stmt="INSERT INTO vicidial_campaign_agents (user,campaign_id,campaign_rank,campaign_weight,calls_today) values('$VD_login','$VD_campaign','0','0','$calls_today');"; 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"; @@ -1262,7 +1256,6 @@ 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,campaign_weight,calls_today) values('$VD_login','$server_ip','$session_id','$SIP_user','PAUSED','','$VD_campaign','','','','$random','$NOW_TIME','$tsNOW_TIME','$NOW_TIME','$closer_chooser_string','$user_level','$campaign_weight','$calls_today');"; 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"; @@ -1274,14 +1267,12 @@ else $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"; @@ -1302,7 +1293,6 @@ 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"; @@ -1314,14 +1304,12 @@ else $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"; @@ -1394,7 +1382,6 @@ 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($link); @@ -1414,7 +1401,6 @@ echo " 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $MM_scripts = mysql_num_rows($rslt); @@ -1423,8 +1409,8 @@ echo "\"Ponów\""; var DiaLControl_auto_HTML_ready = "\"Przerwa\"\"Ponów\""; var DiaLControl_auto_HTML_OFF = "\"Przerwa\"\"Ponów\""; @@ -2342,7 +2332,16 @@ 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]; - if ( (HidEMonitoRSessionS==1) && (channelfieldA.match(/68600/)) ) + var regXFcred = new RegExp(flag_string,"g"); + if ( (channelfieldA.match(regXFcred)) && (flag_channels>0) ) + { + var chan_name_color = 'log_text_red'; + } + else + { + var chan_name_color = 'log_text'; + } + if ( (HidEMonitoRSessionS==1) && (channelfieldA.match(/ASTblind/)) ) { var hide_channel=1; } @@ -2350,11 +2349,11 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} { if (volumecontrol_active!=1) { - live_conf_HTML = live_conf_HTML + "
" + loop_ct + "" + channelfieldA + "ROZŁĄCZ
" + loop_ct + "" + channelfieldA + "ROZŁĄCZ
" + loop_ct + "" + channelfieldA + "ROZŁĄCZ          
" + loop_ct + "" + channelfieldA + "ROZŁĄCZ          
Informacje o kliencie:
Tytuł:   Imię:   2 Imię:   Nazwisko:   Imię:   2 Imię:   Nazwisko:
Adres1: 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $phone_login=$row[0]; @@ -593,7 +616,6 @@ $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]; @@ -604,7 +626,6 @@ $VDloginDISPLAY=0; $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,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]; @@ -630,7 +651,6 @@ $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]; @@ -662,7 +682,6 @@ echo " 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $CAMPactive=$row[0]; @@ -674,7 +693,6 @@ 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); @@ -691,7 +709,6 @@ 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); @@ -712,7 +729,6 @@ 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); @@ -743,7 +759,6 @@ echo " 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $row=mysql_fetch_row($rslt); @@ -802,7 +817,6 @@ 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); @@ -828,7 +842,6 @@ echo " 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $closer_ct = mysql_num_rows($rslt); @@ -852,7 +865,6 @@ echo " 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $xfer_ct = mysql_num_rows($rslt); @@ -871,7 +883,6 @@ echo " 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $row=mysql_fetch_row($rslt); @@ -933,7 +944,6 @@ echo " 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $authphone=$row[0]; @@ -972,7 +982,6 @@ 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]; @@ -1050,7 +1059,6 @@ 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]; @@ -1104,12 +1112,10 @@ 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 ( ($campaign_allow_inbound == 'Y') || ($campaign_leads_to_call > 0) || (ereg('Y',$no_hopper_leads_logins)) ) @@ -1117,12 +1123,10 @@ else ### insert an entry into the user log for the login event $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); @@ -1139,7 +1143,6 @@ 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); @@ -1151,7 +1154,6 @@ 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"; @@ -1159,28 +1161,24 @@ 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"; $stmt="DELETE from vicidial_live_inbound_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"; @@ -1194,7 +1192,6 @@ else ############################################# ##### 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); @@ -1226,7 +1223,6 @@ else ### 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"; @@ -1237,7 +1233,6 @@ else ##### grab the campaign_weight and number of calls today em that campaign for the agent $stmt="SELECT campaign_weight,calls_today FROM vicidial_campaign_agents where user='$VD_login' and campaign_id = '$VD_campaign';"; - if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $vca_ct = mysql_num_rows($rslt); @@ -1254,7 +1249,6 @@ else $calls_today = '0'; $stmt="INSERT INTO vicidial_campaign_agents (user,campaign_id,campaign_rank,campaign_weight,calls_today) values('$VD_login','$VD_campaign','0','0','$calls_today');"; 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"; @@ -1262,7 +1256,6 @@ 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,campaign_weight,calls_today) values('$VD_login','$server_ip','$session_id','$SIP_user','PAUSED','','$VD_campaign','','','','$random','$NOW_TIME','$tsNOW_TIME','$NOW_TIME','$closer_chooser_string','$user_level','$campaign_weight','$calls_today');"; 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"; @@ -1274,14 +1267,12 @@ else $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"; @@ -1302,7 +1293,6 @@ 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"; @@ -1314,14 +1304,12 @@ else $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"; @@ -1394,7 +1382,6 @@ 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($link); @@ -1414,7 +1401,6 @@ echo " 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $MM_scripts = mysql_num_rows($rslt); @@ -1423,8 +1409,8 @@ echo "\"Resumo\""; var DiaLControl_auto_HTML_ready = "\"Pausa\"\"Resumo\""; var DiaLControl_auto_HTML_OFF = "\"Pausa\"\"Resumo\""; @@ -2342,7 +2332,16 @@ 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]; - if ( (HidEMonitoRSessionS==1) && (channelfieldA.match(/68600/)) ) + var regXFcred = new RegExp(flag_string,"g"); + if ( (channelfieldA.match(regXFcred)) && (flag_channels>0) ) + { + var chan_name_color = 'log_text_red'; + } + else + { + var chan_name_color = 'log_text'; + } + if ( (HidEMonitoRSessionS==1) && (channelfieldA.match(/ASTblind/)) ) { var hide_channel=1; } @@ -2350,11 +2349,11 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} { if (volumecontrol_active!=1) { - live_conf_HTML = live_conf_HTML + "
" + loop_ct + "" + channelfieldA + "HANGUP
" + loop_ct + "" + channelfieldA + "HANGUP
" + loop_ct + "" + channelfieldA + "HANGUP          
" + loop_ct + "" + channelfieldA + "HANGUP          
Informação Do Cliente:
Título:   Primeiramente:   Mi:  Último:   Primeiramente:   Mi:  Último:
Endereço1: "; if ($adastats<2) { - echo "+ VIEW MORE SETTINGS"; + echo "+ VIEW MORE SETTINGS"; } if ($UGdisplay>0) { - echo "       HIDE USER GROUP"; + echo "       HIDE USER GROUP"; } else { - echo "       VIEW USER GROUP"; + echo "       VIEW USER GROUP"; } if ($UidORname>0) { - echo "       SHOW AGENT ID"; + echo "       SHOW AGENT ID"; } else { - echo "       SHOW AGENT NAME"; + echo "       SHOW AGENT NAME"; } if ($SERVdisplay>0) { - echo "       HIDE SERVER INFO"; + echo "       HIDE SERVER INFO"; } else { - echo "       SHOW SERVER INFO"; + echo "       SHOW SERVER INFO"; + } +if ($CALLSdisplay>0) + { + echo "       HIDE WAITING CALLS DETAIL"; + } +else + { + echo "       SHOW WAITING CALLS DETAIL"; } echo "
"; echo "\n\n"; } ################################################################################### -###### OUTBOUND CALLS +###### INBOUND/OUTBOUND CALLS ################################################################################### if ($campaign_allow_inbound > 0) { $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]); $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') );"; + $stmtB="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 IN('OUT','OUTBALANCE')) ) order by campaign_id,call_time;"; } 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;"; + $stmtB="from vicidial_auto_calls where status NOT IN('XFER') $groupSQL order by campaign_id,call_time;"; } -if ($non_latin > 0) -{ -$rslt=mysql_query("SET NAMES 'UTF8'"); -} +if ($CALLSdisplay > 0) + { + $stmtA = "SELECT status,campaign_id,phone_number,server_ip,UNIX_TIMESTAMP(call_time),call_type"; + } +else + { + $stmtA = "SELECT status"; + } + + +$k=0; +$stmt = "$stmtA $stmtB"; $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $parked_to_print = mysql_num_rows($rslt); @@ -511,7 +536,20 @@ $parked_to_print = mysql_num_rows($rslt); $row=mysql_fetch_row($rslt); if (eregi("LIVE",$row[0])) - {$out_live++;} + { + $out_live++; + + if ($CALLSdisplay > 0) + { + $CDstatus[$k] = $row[0]; + $CDcampaign_id[$k] = $row[1]; + $CDphone_number[$k] = $row[2]; + $CDserver_ip[$k] = $row[3]; + $CDcall_time[$k] = $row[4]; + $CDcall_type[$k] = $row[5]; + $k++; + } + } else { if (eregi("CLOSER",$row[0])) @@ -519,6 +557,7 @@ $parked_to_print = mysql_num_rows($rslt); else {$out_ring++;} } + $out_total++; $i++; } @@ -542,6 +581,51 @@ $parked_to_print = mysql_num_rows($rslt); } + +################################################################################### +###### CALLS WAITING +################################################################################### + +$Cecho = ''; +$Cecho .= "VICIDIAL: Calls Waiting $NOW_TIME\n"; +$Cecho .= "+--------+--------------+--------------+-----------------+---------+------------+\n"; +$Cecho .= "| STATUS | CAMPAIGN | PHONE NUMBER | SERVER_IP | DIALTIME| CALL TYPE |\n"; +$Cecho .= "+--------+--------------+--------------+-----------------+---------+------------+\n"; + +$p=0; +while($p<$k) + { + $Cstatus = sprintf("%-6s", $CDstatus[$p]); + $Ccampaign_id = sprintf("%-12s", $CDcampaign_id[$p]); + $Cphone_number = sprintf("%-12s", $CDphone_number[$p]); + $Cserver_ip = sprintf("%-15s", $CDserver_ip[$p]); + $Ccall_type = sprintf("%-10s", $CDcall_type[$p]); + + $Ccall_time_S = ($STARTtime - $CDcall_time[$p]); + $Ccall_time_M = ($Ccall_time_S / 60); + $Ccall_time_M = round($Ccall_time_M, 2); + $Ccall_time_M_int = intval("$Ccall_time_M"); + $Ccall_time_SEC = ($Ccall_time_M - $Ccall_time_M_int); + $Ccall_time_SEC = ($Ccall_time_SEC * 60); + $Ccall_time_SEC = round($Ccall_time_SEC, 0); + if ($Ccall_time_SEC < 10) {$Ccall_time_SEC = "0$Ccall_time_SEC";} + $Ccall_time_MS = "$Ccall_time_M_int:$Ccall_time_SEC"; + $Ccall_time_MS = sprintf("%7s", $Ccall_time_MS); + + $G = ''; $EG = ''; + if ($CDcall_type[$p] == 'IN') + { + $G=""; $EG=''; + } + $Cecho .= "| $G$Cstatus$EG | $G$Ccampaign_id$EG | $G$Cphone_number$EG | $G$Cserver_ip$EG | $G$Ccall_time_MS$EG | $G$Ccall_type$EG |\n"; + + $p++; + } +$Cecho .= "+--------+--------------+--------------+-----------------+---------+------------+\n\n"; + +if ($p<1) + {$Cecho='';} + ################################################################################### ###### TIME ON SYSTEM ################################################################################### @@ -552,7 +636,7 @@ $agent_paused=0; $agent_total=0; $Aecho = ''; -$Aecho .= "VICIDIAL: Agents Time On Calls Campaign: $group $NOW_TIME\n\n"; +$Aecho .= "VICIDIAL: Agents Time On Calls Campaign: $group $NOW_TIME\n"; $HDbegin = "+"; @@ -560,9 +644,9 @@ $HTbegin = "|"; $HDstation = "------------+"; $HTstation = " STATION |"; $HDuser = "--------------------+"; -$HTuser = " USER |"; +$HTuser = " USER |"; $HDusergroup = "--------------+"; -$HTusergroup = " USER GROUP |"; +$HTusergroup = " USER GROUP |"; $HDsessionid = "------------------+"; $HTsessionid = " SESSIONID |"; $HDbarge = "-------+"; @@ -574,9 +658,9 @@ $HTserver_ip = " SERVER IP |"; $HDcall_server_ip = "-----------------+"; $HTcall_server_ip = " CALL SERVER IP |"; $HDtime = "---------+"; -$HTtime = " MM:SS |"; +$HTtime = " MM:SS |"; $HDcampaign = "------------+"; -$HTcampaign = " CAMPAIGN |"; +$HTcampaign = " CAMPAIGN |"; if ($UGdisplay < 1) { @@ -635,10 +719,6 @@ $stmt="select extension,vicidial_live_agents.user,conf_exten,status,server_ip,UN #$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); @@ -740,7 +820,7 @@ $talking_to_print = mysql_num_rows($rslt); } if (eregi("PAUSED",$row[3])) { - if ($call_time_M_int >= 30) + if ($call_time_M_int >= 360) {$i++; continue;} else { @@ -813,6 +893,7 @@ $talking_to_print = mysql_num_rows($rslt); echo "
";
 		echo "";
+		echo "$Cecho";
 		echo "$Aecho";
 	}
 	else
diff --git a/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial/admin.php b/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial/admin.php
index 7fc0228a..978928b9 100644
--- a/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial/admin.php
+++ b/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial/admin.php
@@ -680,6 +680,22 @@ if (strlen($dial_status) > 0)
 	$status = $dial_status;
 	}
 
+#############################################
+##### START SYSTEM_SETTINGS LOOKUP #####
+$stmt = "SELECT use_non_latin FROM system_settings;";
+$rslt=mysql_query($stmt, $link);
+if ($DB) {echo "$stmt\n";}
+$qm_conf_ct = mysql_num_rows($rslt);
+$i=0;
+while ($i < $qm_conf_ct)
+	{
+	$row=mysql_fetch_row($rslt);
+	$non_latin =					$row[0];
+	$i++;
+	}
+##### END SETTINGS LOOKUP #####
+###########################################
+
 ######################################################################################################
 ######################################################################################################
 #######   Form variable filtering for security and data integrity
@@ -1141,12 +1157,13 @@ $list_mix_container = ereg_replace(";","",$list_mix_container);
 # 71116-0942 - Added campaign_rank and fewest_calls as methods for agent call routing
 # 71122-1135 - Added default transfer group for campaigns and inbound groups
 # 71125-1751 - Added allowable transfer groups to campaign detail screen
-#
+# 80330-0814 - Added CBHOLD block on selecting, added user stats/status links
+# 80424-0442 - Added non_latin system_settings lookup at top to override dbconnect setting
 # 
 # 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.4-119';
-$build = '71125-1751';
+$admin_version = '2.0.4-121';
+$build = '80424-0442';
 
 $STARTtime = date("U");
 $SQLdate = date("Y-m-d H:i:s");
@@ -1169,11 +1186,28 @@ if ($force_logout)
     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);
+#############################################
+##### START SYSTEM_SETTINGS LOOKUP #####
+$stmt = "SELECT use_non_latin FROM system_settings;";
+$rslt=mysql_query($stmt, $link);
+if ($DB) {echo "$stmt\n";}
+$qm_conf_ct = mysql_num_rows($rslt);
+$i=0;
+while ($i < $qm_conf_ct)
+	{
 	$row=mysql_fetch_row($rslt);
-	$auth=$row[0];
+	$non_latin =					$row[0];
+	$i++;
+	}
+##### END SETTINGS LOOKUP #####
+###########################################
+
+$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";}
+if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");}
+$rslt=mysql_query($stmt, $link);
+$row=mysql_fetch_row($rslt);
+$auth=$row[0];
 
 if ($WeBRooTWritablE > 0)
 	{$fp = fopen ("./project_auth_entries.txt", "a");}
@@ -3861,7 +3895,7 @@ $admin_home_url_LU =	$row[0];
 
  1) { 
 	?>
-
>   > Show Users     |     > Add A New User     |     > Copy User     |     > Search For A User
>   > Show Users     |     > Add A New User     |     > Copy User     |     > Search For A User     |     > User Stats     |     > User Status
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
Local Call Time: $NWB#vicidial_campaigns-local_call_time$NWE
Voicemail: $NWB#vicidial_campaigns-voicemail_ext$NWE
Script: \n"; echo "\n"; echo "\n"; - echo "\n"; + echo "\n"; echo "\n"; echo "\n"; echo "\n"; @@ -8837,6 +8873,7 @@ if ($ADD==31) $dial_status_d = $row[6]; $dial_status_e = $row[7]; $lead_order = $row[8]; + $web_form_address = $row[11]; $allow_closers = $row[12]; $hopper_level = $row[13]; $auto_dial_level = $row[14]; @@ -8931,12 +8968,14 @@ if ($ADD==31) $rslt=mysql_query($stmt, $link); $statuses_to_print = mysql_num_rows($rslt); $statuses_list=''; + $dial_statuses_list=''; $o=0; while ($statuses_to_print > $o) { $rowx=mysql_fetch_row($rslt); $statuses_list .= "\n"; + if ($rowx[0] != 'CBHOLD') {$dial_statuses_list .= "\n";} $statname_list["$rowx[0]"] = "$rowx[1]"; $LRstatuses_list .= "\n"; if (eregi("Y",$rowx[2])) @@ -8953,6 +8992,7 @@ if ($ADD==31) { $rowx=mysql_fetch_row($rslt); $statuses_list .= "\n"; + if ($rowx[0] != 'CBHOLD') {$dial_statuses_list .= "\n";} $statname_list["$rowx[0]"] = "$rowx[1]"; $LRstatuses_list .= "\n"; if (eregi("Y",$rowx[2])) @@ -9034,7 +9074,7 @@ if ($ADD==31) echo "\n"; echo "\n"; echo "\n"; - echo "\n"; + echo "\n"; echo "\n"; echo "\n"; @@ -9061,7 +9101,7 @@ if ($ADD==31) echo "\n"; @@ -9306,7 +9346,7 @@ if ($ADD==31) } - + ##### CAMPAIGN CUSTOM STATUSES ##### if ($SUB==22) { @@ -9386,7 +9426,7 @@ if ($ADD==31) echo "
\n"; } - + ##### CAMPAIGN HOTKEYS ##### if ($SUB==23) { echo "
CUSTOM HOT KEYS WITHIN THIS CAMPAIGN:   $NWB#vicidial_campaign_hotkeys$NWE
\n"; @@ -9436,7 +9476,7 @@ if ($ADD==31) echo "
\n"; } - + ##### CAMPAIGN LEAD RECYCLING ##### if ($SUB==25) { echo "

LEAD RECYCLING WITHIN THIS CAMPAIGN:   $NWB#vicidial_lead_recycle$NWE
\n"; @@ -9483,7 +9523,7 @@ if ($ADD==31) echo "
\n"; } - + ##### CAMPAIGN AUTO-ALT-NUMBER DIALING ##### if ($SUB==26) { echo "

AUTO ALT NUMBER DIALING FOR THIS CAMPAIGN:   $NWB#vicidial_auto_alt_dial_statuses$NWE
\n"; @@ -9520,7 +9560,7 @@ if ($ADD==31) echo "
\n"; } - + ##### CAMPAIGN PAUSE CODES ##### if ($SUB==27) { echo "

AGENT PAUSE CODES FOR THIS CAMPAIGN:   $NWB#vicidial_pause_codes$NWE
\n"; @@ -9650,12 +9690,13 @@ if ($ADD==34) $rslt=mysql_query($stmt, $link); $statuses_to_print = mysql_num_rows($rslt); $statuses_list=''; - + $dial_statuses_list=''; $o=0; while ($statuses_to_print > $o) { $rowx=mysql_fetch_row($rslt); $statuses_list .= "\n"; + if ($rowx[0] != 'CBHOLD') {$dial_statuses_list .= "\n";} $statname_list["$rowx[0]"] = "$rowx[1]"; $LRstatuses_list .= "\n"; if (eregi("Y",$rowx[2])) @@ -9672,6 +9713,7 @@ if ($ADD==34) { $rowx=mysql_fetch_row($rslt); $statuses_list .= "\n"; + if ($rowx[0] != 'CBHOLD') {$dial_statuses_list .= "\n";} $statname_list["$rowx[0]"] = "$rowx[1]"; $LRstatuses_list .= "\n"; if (eregi("Y",$rowx[2])) @@ -9775,7 +9817,7 @@ if ($ADD==34) echo "\n"; @@ -9947,6 +9989,7 @@ if ( ($ADD==34) or ($ADD==31) ) { if ($LOGmodify_campaigns==1) { + ##### CAMPAIGN LIST MIX SETTINGS ##### if ($SUB==29) { ##### get list_id listings for dynamic pulldown @@ -10073,7 +10116,7 @@ if ( ($ADD==34) or ($ADD==31) ) echo "\n"; echo "ADD   \n"; echo "REMOVE\n"; @@ -10134,7 +10177,7 @@ if ( ($ADD==34) or ($ADD==31) ) echo "$mixlists_list"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; @@ -10962,7 +11005,7 @@ if ($ADD==3111) 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
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
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
Web Form: $NWB#vicidial_campaigns-web_form_address$NWE
Allow Closers: $NWB#vicidial_campaigns-allow_closers$NWE
Allow Inbound and Blended: $NWB#vicidial_campaigns-campaign_allow_inbound$NWE
Add A Dial Status:   \n"; echo "     $NWB#vicidial_campaigns-dial_status$NWE
Add A Dial Status:   \n"; echo "     $NWB#vicidial_campaigns-dial_status$NWE
Dial Status:  
\n"; echo "\n"; echo "\n"; - echo "\n"; + echo "\n"; echo "\n"; echo "\n"; echo "\n"; diff --git a/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial/admin_modify_lead.php b/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial/admin_modify_lead.php index f8a285ec..d32a8551 100644 --- a/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial/admin_modify_lead.php +++ b/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial/admin_modify_lead.php @@ -1,13 +1,28 @@ LICENSE: GPLv2 +# AST GUI database administration modify lead in vicidial_list +# admin_modify_lead.php +# +# this is the administration lead information modifier screen, the administrator +# just needs to enter the leadID and then they can view and modify the +# information in the record for that lead +# +# Copyright (C) 2008 Matt Florell LICENSE: GPLv2 # - # CHANGES # +# 60419-1705 - Added ability to change lead callback record from USERONLY to ANYONE or USERONLY-user +# 60421-1459 - check GET/POST vars lines with isset to not trigger PHP NOTICES +# 60609-1112 - Added DNC list addition if status changed to DNC +# 60619-1539 - Added variable filtering to eliminate SQL injection attack threat +# 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 +# 70424-1128 - Added campaign-specific statuses, reformatted recordings list # 70702-1259 - Added recording location link and truncation # 70906-2132 - Added closer_log records display +# 80428-0144 - UTF8 cleanup # require("dbconnect.php"); @@ -98,35 +113,32 @@ if (isset($_GET["modify_logs"])) {$modify_logs=$_GET["modify_logs"];} $PHP_AUTH_USER = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_USER); $PHP_AUTH_PW = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_PW); - - -### AST GUI database administration modify lead in vicidial_list -### admin_modify_lead.php - -# this is the administration lead information modifier screen, the administrator just needs to enter the leadID and then they can view and modify the information in the record for that lead - -# CHANGES -# -# 60419-1705 - Added ability to change lead callback record from USERONLY to ANYONE or USERONLY-user -# 60421-1459 - check GET/POST vars lines with isset to not trigger PHP NOTICES -# 60609-1112 - Added DNC list addition if status changed to DNC -# 60619-1539 - Added variable filtering to eliminate SQL injection attack threat -# 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 -# 70424-1128 - Added campaign-specific statuses, reformatted recordings list -# - $STARTtime = date("U"); $TODAY = date("Y-m-d"); $NOW_TIME = date("Y-m-d H:i:s"); - - $stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 7 and modify_leads='1';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); +############################################# +##### START SYSTEM_SETTINGS LOOKUP ##### +$stmt = "SELECT use_non_latin FROM system_settings;"; +$rslt=mysql_query($stmt, $link); +if ($DB) {echo "$stmt\n";} +$qm_conf_ct = mysql_num_rows($rslt); +$i=0; +while ($i < $qm_conf_ct) + { $row=mysql_fetch_row($rslt); - $auth=$row[0]; + $non_latin = $row[0]; + $i++; + } +##### END SETTINGS LOOKUP ##### +########################################### + +$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";} +if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} +$rslt=mysql_query($stmt, $link); +$row=mysql_fetch_row($rslt); +$auth=$row[0]; if ($WeBRooTWritablE > 0) {$fp = fopen ("./project_auth_entries.txt", "a");} diff --git a/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial/listloader.pl b/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial/listloader.pl index d926368b..d58321cb 100644 --- a/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial/listloader.pl +++ b/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial/listloader.pl @@ -1,8 +1,8 @@ #!/usr/bin/perl -### listloader.pl version 0.4 *DBI-version* +### listloader.pl version 2.0.4 *DBI-version* ### -### Copyright (C) 2007 Matt Florell,Joe Johnson LICENSE: GPLv2 +### Copyright (C) 2008 Matt Florell,Joe Johnson LICENSE: GPLv2 ### # # @@ -18,6 +18,7 @@ # 70205-1703 - Defaulted phone_code to 1 if not populated # 70417-1059 - Fixed default phone_code bug # 70510-1518 - Added campaign and system duplicate check and phonecode override +# 80428-0144 - UTF8 cleanup # ### begin parsing run-time options ### @@ -148,6 +149,23 @@ $pulldate="$year-$mon-$mday $hour:$min:$sec"; $inSD = $pulldate0; $dsec = ( ( ($hour * 3600) + ($min * 60) ) + $sec ); +############################################# +##### START SYSTEM_SETTINGS LOOKUP ##### +$stmtA = "SELECT use_non_latin FROM system_settings;"; +$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; +$sthA->execute or die "executing: $stmtA ", $dbhA->errstr; +$sthArows=$sthA->rows; +if ($sthArows > 0) + { + @aryA = $sthA->fetchrow_array; + $non_latin = "$aryA[0]"; + } +$sthA->finish(); +##### END SETTINGS LOOKUP ##### +########################################### + + +if ($non_latin > 0) {$affected_rows = $dbhA->do("SET NAMES 'UTF8'");} ### Grab Server values from the database $stmtA = "SELECT local_gmt FROM servers where server_ip = '$server_ip';"; diff --git a/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial/listloader_super.pl b/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial/listloader_super.pl index 167fff5e..9f6f8d52 100644 --- a/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial/listloader_super.pl +++ b/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial/listloader_super.pl @@ -1,8 +1,8 @@ #!/usr/bin/perl -### listloader_super.pl version 0.4 *DBI-version* +### listloader_super.pl version 2.0.4 *DBI-version* ### -### Copyright (C) 2007 Matt Florell,Joe Johnson LICENSE: GPLv2 +### Copyright (C) 2008 Matt Florell,Joe Johnson LICENSE: GPLv2 ### # # @@ -17,6 +17,7 @@ # 70205-1703 - Defaulted phone_code to 1 if not populated # 70417-1059 - Fixed default phone_code bug # 70510-1518 - Added campaign and system duplicate check and phonecode override +# 80428-0144 - UTF8 cleanup # ### begin parsing run-time options ### @@ -149,21 +150,38 @@ $pulldate="$year-$mon-$mday $hour:$min:$sec"; $inSD = $pulldate0; $dsec = ( ( ($hour * 3600) + ($min * 60) ) + $sec ); +############################################# +##### START SYSTEM_SETTINGS LOOKUP ##### +$stmtA = "SELECT use_non_latin FROM system_settings;"; +$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; +$sthA->execute or die "executing: $stmtA ", $dbhA->errstr; +$sthArows=$sthA->rows; +if ($sthArows > 0) + { + @aryA = $sthA->fetchrow_array; + $non_latin = "$aryA[0]"; + } +$sthA->finish(); +##### END SETTINGS LOOKUP ##### +########################################### - ### Grab Server values from the database - $stmtA = "SELECT local_gmt FROM servers where server_ip = '$server_ip';"; - $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; - $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; - $sthArows=$sthA->rows; - $rec_count=0; - while ($sthArows > $rec_count) - { - @aryA = $sthA->fetchrow_array; - $DBSERVER_GMT = "$aryA[0]"; - if ($DBSERVER_GMT) {$SERVER_GMT = $DBSERVER_GMT;} - $rec_count++; - } - $sthA->finish(); + +if ($non_latin > 0) {$affected_rows = $dbhA->do("SET NAMES 'UTF8'");} + +### Grab Server values from the database +$stmtA = "SELECT local_gmt FROM servers where server_ip = '$server_ip';"; +$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; +$sthA->execute or die "executing: $stmtA ", $dbhA->errstr; +$sthArows=$sthA->rows; +$rec_count=0; +while ($sthArows > $rec_count) + { + @aryA = $sthA->fetchrow_array; + $DBSERVER_GMT = "$aryA[0]"; + if ($DBSERVER_GMT) {$SERVER_GMT = $DBSERVER_GMT;} + $rec_count++; + } +$sthA->finish(); $LOCAL_GMT_OFF = $SERVER_GMT; $LOCAL_GMT_OFF_STD = $SERVER_GMT; diff --git a/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial/new_listloader_superL.php b/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial/new_listloader_superL.php index 629321ed..3a25a101 100644 --- a/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial/new_listloader_superL.php +++ b/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial/new_listloader_superL.php @@ -1,7 +1,7 @@ LICENSE: GPLv2 +# Copyright (C) 2008 Matt Florell,Joe Johnson LICENSE: GPLv2 # # AST GUI lead loader from formatted file # @@ -19,11 +19,12 @@ # 61128-1149 - added postal code GMT lookup and duplicate check options # 70417-1059 - Fixed default phone_code bug # 70510-1518 - Added campaign and system duplicate check and phonecode override +# 80428-0417 - UTF8 changes # # 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.4'; -$build = '70510-1518'; +$version = '2.0.4-24'; +$build = '80428-0417'; require("dbconnect.php"); @@ -113,10 +114,28 @@ if (isset($_GET["phone_code_override"])) {$phone_code_override=$_GET["phone_co # $country_field=$_GET["country_field"]; if (!$country_field) {$country_field=$_POST["country_field"];} +############################################# +##### START SYSTEM_SETTINGS LOOKUP ##### +$stmt = "SELECT use_non_latin FROM system_settings;"; +$rslt=mysql_query($stmt, $link); +if ($DB) {echo "$stmt\n";} +$qm_conf_ct = mysql_num_rows($rslt); +$i=0; +while ($i < $qm_conf_ct) + { + $row=mysql_fetch_row($rslt); + $non_latin = $row[0]; + $i++; + } +##### END SETTINGS LOOKUP ##### +########################################### + +if ($non_latin < 1) +{ $PHP_AUTH_USER = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_USER); $PHP_AUTH_PW = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_PW); $list_id_override = ereg_replace("[^0-9]","",$list_id_override); - +} $STARTtime = date("U"); $TODAY = date("Y-m-d"); @@ -125,6 +144,7 @@ $FILE_datetime = $STARTtime; $stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 7;"; if ($DB) {echo "|$stmt|\n";} +if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $auth=$row[0]; @@ -144,6 +164,9 @@ $browser = getenv("HTTP_USER_AGENT"); else { header ("Content-type: text/html; charset=utf-8"); + header ("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1 + header ("Pragma: no-cache"); // HTTP/1.0 + if($auth>0) { $office_no=strtoupper($PHP_AUTH_USER); diff --git a/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_de/AST_CLOSERstats.php b/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_de/AST_CLOSERstats.php index 35c1298b..a56f4551 100644 --- a/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_de/AST_CLOSERstats.php +++ b/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_de/AST_CLOSERstats.php @@ -10,6 +10,7 @@ # 60905-1326 - Added queue time stats # 71008-1436 - Added shift to be defined in dbconnect.php # 71025-0021 - Added status breakdown +# 71218-1155 - added end_date for multi-day reports # require("dbconnect.php"); @@ -20,7 +21,9 @@ $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"];} + elseif (isset($_POST["query_date"])) {$query_date=$_POST["query_date"];} +if (isset($_GET["end_date"])) {$end_date=$_GET["end_date"];} + elseif (isset($_POST["end_date"])) {$end_date=$_POST["end_date"];} if (isset($_GET["shift"])) {$shift=$_GET["shift"];} elseif (isset($_POST["shift"])) {$shift=$_POST["shift"];} if (isset($_GET["submit"])) {$submit=$_GET["submit"];} @@ -52,6 +55,7 @@ $NOW_TIME = date("Y-m-d H:i:s"); $STARTtime = date("U"); if (!isset($group)) {$group = '';} if (!isset($query_date)) {$query_date = $NOW_DATE;} +if (!isset($end_date)) {$end_date = $NOW_DATE;} $stmt="select group_id from vicidial_inbound_groups;"; $rslt=mysql_query($stmt, $link); @@ -82,6 +86,7 @@ echo "\n" echo "VICIDIAL: VDAD Genauerer Notfall\n"; echo "
\n"; echo "\n"; +echo " to \n"; echo "\n"; +echo " to \n"; echo "\n"; +echo "\n"; +echo " to \n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; +echo "\n"; echo "\n"; } echo "         \n"; -echo "STOP | "; -echo "SLOW | "; -echo "GO"; +echo "STOP | "; +echo "SLOW | "; +echo "GO"; echo "       ÄNDERN Sie | \n"; echo "SUMMARY | \n"; echo "REPORTS \n"; @@ -276,10 +305,6 @@ 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'"); -} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $DIALlev = $row[0]; @@ -309,10 +334,6 @@ 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]; @@ -322,10 +343,6 @@ 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),min(status_category_1),sum(status_category_count_1),min(status_category_2),sum(status_category_count_2),min(status_category_3),sum(status_category_count_3),min(status_category_4),sum(status_category_count_4) 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]; @@ -357,10 +374,6 @@ 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]; @@ -436,31 +449,39 @@ echo "
"; echo ""; @@ -469,34 +490,38 @@ 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
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
"; if ($adastats<2) { - echo "+ VIEW MORE SETTINGS"; + echo "+ VIEW MORE SETTINGS"; } if ($UGdisplay>0) { - echo "       Verberge USER GROUP"; + echo "       Verberge USER GROUP"; } else { - echo "       VIEW USER GROUP"; + echo "       VIEW USER GROUP"; } if ($UidORname>0) { - echo "       Zeige MITTELID"; + echo "       Zeige MITTELID"; } else { - echo "       Zeige MITTELNAME"; + echo "       Zeige MITTELNAME"; } if ($SERVdisplay>0) { - echo "       Verberge BEDIENERINFO"; + echo "       Verberge BEDIENERINFO"; } else { - echo "       Zeige BEDIENERINFO"; + echo "       Zeige BEDIENERINFO"; + } +if ($CALLSdisplay>0) + { + echo "       Verberge WAITING CALLS DETAIL"; + } +else + { + echo "       Zeige WAITING CALLS DETAIL"; } echo "
"; echo "\n\n"; } ################################################################################### -###### OUTBOUND CALLS +###### INBOUND/OUTBOUND CALLS ################################################################################### if ($campaign_allow_inbound > 0) { $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]); $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') );"; + $stmtB="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 IN('OUT','OUTBALANCE')) ) order by campaign_id,call_time;"; } 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;"; + $stmtB="from vicidial_auto_calls where status NOT IN('XFER') $groupSQL order by campaign_id,call_time;"; } -if ($non_latin > 0) -{ -$rslt=mysql_query("SET NAMES 'UTF8'"); -} +if ($CALLSdisplay > 0) + { + $stmtA = "SELECT status,campaign_id,phone_number,server_ip,UNIX_TIMESTAMP(call_time),call_type"; + } +else + { + $stmtA = "SELECT status"; + } + + +$k=0; +$stmt = "$stmtA $stmtB"; $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $parked_to_print = mysql_num_rows($rslt); @@ -511,7 +536,20 @@ $parked_to_print = mysql_num_rows($rslt); $row=mysql_fetch_row($rslt); if (eregi("LIVE",$row[0])) - {$out_live++;} + { + $out_live++; + + if ($CALLSdisplay > 0) + { + $CDstatus[$k] = $row[0]; + $CDcampaign_id[$k] = $row[1]; + $CDphone_number[$k] = $row[2]; + $CDserver_ip[$k] = $row[3]; + $CDcall_time[$k] = $row[4]; + $CDcall_type[$k] = $row[5]; + $k++; + } + } else { if (eregi("CLOSER",$row[0])) @@ -519,6 +557,7 @@ $parked_to_print = mysql_num_rows($rslt); else {$out_ring++;} } + $out_total++; $i++; } @@ -542,6 +581,51 @@ $parked_to_print = mysql_num_rows($rslt); } + +################################################################################### +###### CALLS WAITING +################################################################################### + +$Cecho = ''; +$Cecho .= "VICIDIAL: Calls Waiting $NOW_TIME\n"; +$Cecho .= "+--------+--------------+--------------+-----------------+---------+------------+\n"; +$Cecho .= "| STATUS | CAMPAIGN | PHONE NUMBER | SERVER_IP | DIALTIME| CALL TYPE |\n"; +$Cecho .= "+--------+--------------+--------------+-----------------+---------+------------+\n"; + +$p=0; +while($p<$k) + { + $Cstatus = sprintf("%-6s", $CDstatus[$p]); + $Ccampaign_id = sprintf("%-12s", $CDcampaign_id[$p]); + $Cphone_number = sprintf("%-12s", $CDphone_number[$p]); + $Cserver_ip = sprintf("%-15s", $CDserver_ip[$p]); + $Ccall_type = sprintf("%-10s", $CDcall_type[$p]); + + $Ccall_time_S = ($STARTtime - $CDcall_time[$p]); + $Ccall_time_M = ($Ccall_time_S / 60); + $Ccall_time_M = round($Ccall_time_M, 2); + $Ccall_time_M_int = intval("$Ccall_time_M"); + $Ccall_time_SEC = ($Ccall_time_M - $Ccall_time_M_int); + $Ccall_time_SEC = ($Ccall_time_SEC * 60); + $Ccall_time_SEC = round($Ccall_time_SEC, 0); + if ($Ccall_time_SEC < 10) {$Ccall_time_SEC = "0$Ccall_time_SEC";} + $Ccall_time_MS = "$Ccall_time_M_int:$Ccall_time_SEC"; + $Ccall_time_MS = sprintf("%7s", $Ccall_time_MS); + + $G = ''; $EG = ''; + if ($CDcall_type[$p] == 'IN') + { + $G=""; $EG=''; + } + $Cecho .= "| $G$Cstatus$EG | $G$Ccampaign_id$EG | $G$Cphone_number$EG | $G$Cserver_ip$EG | $G$Ccall_time_MS$EG | $G$Ccall_type$EG |\n"; + + $p++; + } +$Cecho .= "+--------+--------------+--------------+-----------------+---------+------------+\n\n"; + +if ($p<1) + {$Cecho='';} + ################################################################################### ###### TIME ON SYSTEM ################################################################################### @@ -552,7 +636,7 @@ $agent_paused=0; $agent_total=0; $Aecho = ''; -$Aecho .= "VICIDIAL: Agents Time On Calls Kampagne: $group $NOW_TIME\n\n"; +$Aecho .= "VICIDIAL: Agents Time On Calls Kampagne: $group $NOW_TIME\n"; $HDbegin = "+"; @@ -560,9 +644,9 @@ $HTbegin = "|"; $HDstation = "------------+"; $HTstation = " STATION |"; $HDuser = "--------------------+"; -$HTuser = " USER |"; +$HTuser = " USER |"; $HDusergroup = "--------------+"; -$HTusergroup = " USER GROUP |"; +$HTusergroup = " USER GROUP |"; $HDsessionid = "------------------+"; $HTsessionid = " SESSIONID |"; $HDbarge = "-------+"; @@ -574,9 +658,9 @@ $HTserver_ip = " BEDIENERIP |"; $HDcall_server_ip = "-----------------+"; $HTcall_server_ip = " CALL BEDIENERIP |"; $HDtime = "---------+"; -$HTtime = " MM:SS |"; +$HTtime = " MM:SS |"; $HDcampaign = "------------+"; -$HTcampaign = " CAMPAIGN |"; +$HTcampaign = " CAMPAIGN |"; if ($UGdisplay < 1) { @@ -635,10 +719,6 @@ $stmt="select extension,vicidial_live_agents.user,conf_exten,status,server_ip,UN #$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); @@ -740,7 +820,7 @@ $talking_to_print = mysql_num_rows($rslt); } if (eregi("PAUSED",$row[3])) { - if ($call_time_M_int >= 30) + if ($call_time_M_int >= 360) {$i++; continue;} else { @@ -813,6 +893,7 @@ $talking_to_print = mysql_num_rows($rslt); echo "
";
 		echo "";
+		echo "$Cecho";
 		echo "$Aecho";
 	}
 	else
diff --git a/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_de/admin.php b/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_de/admin.php
index b4f3166a..b209a00a 100644
--- a/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_de/admin.php
+++ b/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_de/admin.php
@@ -680,6 +680,22 @@ if (strlen($dial_status) > 0)
 	$status = $dial_status;
 	}
 
+#############################################
+##### START SYSTEM_SETTINGS LOOKUP #####
+$stmt = "SELECT use_non_latin FROM system_settings;";
+$rslt=mysql_query($stmt, $link);
+if ($DB) {echo "$stmt\n";}
+$qm_conf_ct = mysql_num_rows($rslt);
+$i=0;
+while ($i < $qm_conf_ct)
+	{
+	$row=mysql_fetch_row($rslt);
+	$non_latin =					$row[0];
+	$i++;
+	}
+##### END SETTINGS LOOKUP #####
+###########################################
+
 ######################################################################################################
 ######################################################################################################
 #######   Form variable filtering for security and data integrity
@@ -1141,12 +1157,13 @@ $list_mix_container = ereg_replace(";","",$list_mix_container);
 # 71116-0942 - Added campaign_rank and fewest_calls as methods for agent call routing
 # 71122-1135 - Added default transfer group for campaigns and inbound groups
 # 71125-1751 - Added allowable transfer groups to campaign detail screen
-#
+# 80330-0814 - Added CBHOLD block on selecting, added user stats/status links
+# 80424-0442 - Added non_latin system_settings lookup at top to override dbconnect setting
 # 
 # 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.4-119';
-$build = '71125-1751';
+$admin_version = '2.0.4-121';
+$build = '80424-0442';
 
 $STARTtime = date("U");
 $SQLdate = date("Y-m-d H:i:s");
@@ -1169,11 +1186,28 @@ if ($force_logout)
     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);
+#############################################
+##### START SYSTEM_SETTINGS LOOKUP #####
+$stmt = "SELECT use_non_latin FROM system_settings;";
+$rslt=mysql_query($stmt, $link);
+if ($DB) {echo "$stmt\n";}
+$qm_conf_ct = mysql_num_rows($rslt);
+$i=0;
+while ($i < $qm_conf_ct)
+	{
 	$row=mysql_fetch_row($rslt);
-	$auth=$row[0];
+	$non_latin =					$row[0];
+	$i++;
+	}
+##### END SETTINGS LOOKUP #####
+###########################################
+
+$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";}
+if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");}
+$rslt=mysql_query($stmt, $link);
+$row=mysql_fetch_row($rslt);
+$auth=$row[0];
 
 if ($WeBRooTWritablE > 0)
 	{$fp = fopen ("./project_auth_entries.txt", "a");}
@@ -3861,7 +3895,7 @@ $admin_home_url_LU =	$row[0];
 
  1) { 
 	?>
-
>   > Zeigen Sie Benutzer     |     > Addieren Sie Einen Neuen Benutzer     |     > Copy Benutzer     |     > Suche Nach Einem Benutzer
>   > Zeigen Sie Benutzer     |     > Addieren Sie Einen Neuen Benutzer     |     > Copy Benutzer     |     > Suche Nach Einem Benutzer     |     > User Stats     |     > User Status
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
Ortsgespräch-Zeit: $NWB#vicidial_campaigns-local_call_time$NWE
Voicemail: $NWB#vicidial_campaigns-voicemail_ext$NWE
Index: \n"; echo "\n"; echo "\n"; - echo "\n"; + echo "\n"; echo "\n"; echo "\n"; echo "\n"; @@ -8837,6 +8873,7 @@ if ($ADD==31) $dial_status_d = $row[6]; $dial_status_e = $row[7]; $lead_order = $row[8]; + $web_form_address = $row[11]; $allow_closers = $row[12]; $hopper_level = $row[13]; $auto_dial_level = $row[14]; @@ -8931,12 +8968,14 @@ if ($ADD==31) $rslt=mysql_query($stmt, $link); $statuses_to_print = mysql_num_rows($rslt); $statuses_list=''; + $dial_statuses_list=''; $o=0; while ($statuses_to_print > $o) { $rowx=mysql_fetch_row($rslt); $statuses_list .= "\n"; + if ($rowx[0] != 'CBHOLD') {$dial_statuses_list .= "\n";} $statname_list["$rowx[0]"] = "$rowx[1]"; $LRstatuses_list .= "\n"; if (eregi("Y",$rowx[2])) @@ -8953,6 +8992,7 @@ if ($ADD==31) { $rowx=mysql_fetch_row($rslt); $statuses_list .= "\n"; + if ($rowx[0] != 'CBHOLD') {$dial_statuses_list .= "\n";} $statname_list["$rowx[0]"] = "$rowx[1]"; $LRstatuses_list .= "\n"; if (eregi("Y",$rowx[2])) @@ -9034,7 +9074,7 @@ if ($ADD==31) echo "\n"; echo "\n"; echo "\n"; - echo "\n"; + echo "\n"; echo "\n"; echo "\n"; @@ -9061,7 +9101,7 @@ if ($ADD==31) echo "\n"; @@ -9306,7 +9346,7 @@ if ($ADD==31) } - + ##### CAMPAIGN CUSTOM STATUSES ##### if ($SUB==22) { @@ -9386,7 +9426,7 @@ if ($ADD==31) echo "
\n"; } - + ##### CAMPAIGN HOTKEYS ##### if ($SUB==23) { echo "
GEWOHNHEIT HOT KEYS INNERHALB DIESER KAMPAGNE:   $NWB#vicidial_campaign_hotkeys$NWE
\n"; @@ -9436,7 +9476,7 @@ if ($ADD==31) echo "
\n"; } - + ##### CAMPAIGN LEAD RECYCLING ##### if ($SUB==25) { echo "

LEITUNG, DIE INNERHALB DIESER KAMPAGNE AUFBEREITET:   $NWB#vicidial_lead_recycle$NWE
\n"; @@ -9483,7 +9523,7 @@ if ($ADD==31) echo "
\n"; } - + ##### CAMPAIGN AUTO-ALT-NUMBER DIALING ##### if ($SUB==26) { echo "

SELBSTALT ZAHL, DIE FÜR DIESE KAMPAGNE WÄHLT:   $NWB#vicidial_auto_alt_dial_statuses$NWE
\n"; @@ -9520,7 +9560,7 @@ if ($ADD==31) echo "
\n"; } - + ##### CAMPAIGN PAUSE CODES ##### if ($SUB==27) { echo "

MITTEL-PAUSE CODES FÜR DIESE KAMPAGNE:   $NWB#vicidial_pause_codes$NWE
\n"; @@ -9650,12 +9690,13 @@ if ($ADD==34) $rslt=mysql_query($stmt, $link); $statuses_to_print = mysql_num_rows($rslt); $statuses_list=''; - + $dial_statuses_list=''; $o=0; while ($statuses_to_print > $o) { $rowx=mysql_fetch_row($rslt); $statuses_list .= "\n"; + if ($rowx[0] != 'CBHOLD') {$dial_statuses_list .= "\n";} $statname_list["$rowx[0]"] = "$rowx[1]"; $LRstatuses_list .= "\n"; if (eregi("Y",$rowx[2])) @@ -9672,6 +9713,7 @@ if ($ADD==34) { $rowx=mysql_fetch_row($rslt); $statuses_list .= "\n"; + if ($rowx[0] != 'CBHOLD') {$dial_statuses_list .= "\n";} $statname_list["$rowx[0]"] = "$rowx[1]"; $LRstatuses_list .= "\n"; if (eregi("Y",$rowx[2])) @@ -9775,7 +9817,7 @@ if ($ADD==34) echo "\n"; @@ -9947,6 +9989,7 @@ if ( ($ADD==34) or ($ADD==31) ) { if ($LOGmodify_campaigns==1) { + ##### CAMPAIGN LIST MIX SETTINGS ##### if ($SUB==29) { ##### get list_id listings for dynamic pulldown @@ -10073,7 +10116,7 @@ if ( ($ADD==34) or ($ADD==31) ) echo "\n"; echo "ADD   \n"; echo "ENTFERNEN Sie\n"; @@ -10134,7 +10177,7 @@ if ( ($ADD==34) or ($ADD==31) ) echo "$mixlists_list"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; @@ -10962,7 +11005,7 @@ if ($ADD==3111) 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
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
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
Netz-Form: $NWB#vicidial_campaigns-web_form_address$NWE
Erlauben Sie Closers: $NWB#vicidial_campaigns-allow_closers$NWE
Erlauben Sie Inbound und gemischt:$NWB#vicidial_campaigns-campaign_allow_inbound$NWE
Add A Dial Status:   \n"; echo "     $NWB#vicidial_campaigns-dial_status$NWE
Add A Dial Status:   \n"; echo "     $NWB#vicidial_campaigns-dial_status$NWE
Dial Status:  
\n"; echo "\n"; echo "\n"; - echo "\n"; + echo "\n"; echo "\n"; echo "\n"; echo "\n"; diff --git a/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_de/admin_modify_lead.php b/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_de/admin_modify_lead.php index 4ad70e26..1a8793ce 100644 --- a/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_de/admin_modify_lead.php +++ b/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_de/admin_modify_lead.php @@ -1,13 +1,28 @@ LICENSE: GPLv2 +# AST GUI database administration modify lead in vicidial_list +# admin_modify_lead.php +# +# this is the administration lead information modifier screen, the administrator +# just needs to enter the leadID and then they can view and modify the +# information in the record for that lead +# +# Copyright (C) 2008 Matt Florell LICENSE: GPLv2 # - # CHANGES # +# 60419-1705 - Added ability to change lead callback record from USERONLY to ANYONE or USERONLY-user +# 60421-1459 - check GET/POST vars lines with isset to not trigger PHP NOTICES +# 60609-1112 - Added DNC list addition if status changed to DNC +# 60619-1539 - Added variable filtering to eliminate SQL injection attack threat +# 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 +# 70424-1128 - Added campaign-specific statuses, reformatted recordings list # 70702-1259 - Added recording location link and truncation # 70906-2132 - Added closer_log records display +# 80428-0144 - UTF8 cleanup # require("dbconnect.php"); @@ -98,35 +113,32 @@ if (isset($_GET["modify_logs"])) {$modify_logs=$_GET["modify_logs"];} $PHP_AUTH_USER = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_USER); $PHP_AUTH_PW = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_PW); - - -### AST GUI database administration modify lead in vicidial_list -### admin_modify_lead.php - -# this is the administration lead information modifier screen, the administrator just needs to enter the leadID and then they can view and modify the information in the record for that lead - -# CHANGES -# -# 60419-1705 - Added ability to change lead callback record from USERONLY to ANYONE or USERONLY-user -# 60421-1459 - check GET/POST vars lines with isset to not trigger PHP NOTICES -# 60609-1112 - Added DNC list addition if status changed to DNC -# 60619-1539 - Added variable filtering to eliminate SQL injection attack threat -# 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 -# 70424-1128 - Added campaign-specific statuses, reformatted recordings list -# - $STARTtime = date("U"); $TODAY = date("Y-m-d"); $NOW_TIME = date("Y-m-d H:i:s"); - - $stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 7 and modify_leads='1';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); +############################################# +##### START SYSTEM_SETTINGS LOOKUP ##### +$stmt = "SELECT use_non_latin FROM system_settings;"; +$rslt=mysql_query($stmt, $link); +if ($DB) {echo "$stmt\n";} +$qm_conf_ct = mysql_num_rows($rslt); +$i=0; +while ($i < $qm_conf_ct) + { $row=mysql_fetch_row($rslt); - $auth=$row[0]; + $non_latin = $row[0]; + $i++; + } +##### END SETTINGS LOOKUP ##### +########################################### + +$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";} +if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} +$rslt=mysql_query($stmt, $link); +$row=mysql_fetch_row($rslt); +$auth=$row[0]; if ($WeBRooTWritablE > 0) {$fp = fopen ("./project_auth_entries.txt", "a");} diff --git a/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_de/listloader.pl b/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_de/listloader.pl index d926368b..d58321cb 100644 --- a/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_de/listloader.pl +++ b/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_de/listloader.pl @@ -1,8 +1,8 @@ #!/usr/bin/perl -### listloader.pl version 0.4 *DBI-version* +### listloader.pl version 2.0.4 *DBI-version* ### -### Copyright (C) 2007 Matt Florell,Joe Johnson LICENSE: GPLv2 +### Copyright (C) 2008 Matt Florell,Joe Johnson LICENSE: GPLv2 ### # # @@ -18,6 +18,7 @@ # 70205-1703 - Defaulted phone_code to 1 if not populated # 70417-1059 - Fixed default phone_code bug # 70510-1518 - Added campaign and system duplicate check and phonecode override +# 80428-0144 - UTF8 cleanup # ### begin parsing run-time options ### @@ -148,6 +149,23 @@ $pulldate="$year-$mon-$mday $hour:$min:$sec"; $inSD = $pulldate0; $dsec = ( ( ($hour * 3600) + ($min * 60) ) + $sec ); +############################################# +##### START SYSTEM_SETTINGS LOOKUP ##### +$stmtA = "SELECT use_non_latin FROM system_settings;"; +$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; +$sthA->execute or die "executing: $stmtA ", $dbhA->errstr; +$sthArows=$sthA->rows; +if ($sthArows > 0) + { + @aryA = $sthA->fetchrow_array; + $non_latin = "$aryA[0]"; + } +$sthA->finish(); +##### END SETTINGS LOOKUP ##### +########################################### + + +if ($non_latin > 0) {$affected_rows = $dbhA->do("SET NAMES 'UTF8'");} ### Grab Server values from the database $stmtA = "SELECT local_gmt FROM servers where server_ip = '$server_ip';"; diff --git a/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_de/listloader_super.pl b/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_de/listloader_super.pl index 167fff5e..9f6f8d52 100644 --- a/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_de/listloader_super.pl +++ b/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_de/listloader_super.pl @@ -1,8 +1,8 @@ #!/usr/bin/perl -### listloader_super.pl version 0.4 *DBI-version* +### listloader_super.pl version 2.0.4 *DBI-version* ### -### Copyright (C) 2007 Matt Florell,Joe Johnson LICENSE: GPLv2 +### Copyright (C) 2008 Matt Florell,Joe Johnson LICENSE: GPLv2 ### # # @@ -17,6 +17,7 @@ # 70205-1703 - Defaulted phone_code to 1 if not populated # 70417-1059 - Fixed default phone_code bug # 70510-1518 - Added campaign and system duplicate check and phonecode override +# 80428-0144 - UTF8 cleanup # ### begin parsing run-time options ### @@ -149,21 +150,38 @@ $pulldate="$year-$mon-$mday $hour:$min:$sec"; $inSD = $pulldate0; $dsec = ( ( ($hour * 3600) + ($min * 60) ) + $sec ); +############################################# +##### START SYSTEM_SETTINGS LOOKUP ##### +$stmtA = "SELECT use_non_latin FROM system_settings;"; +$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; +$sthA->execute or die "executing: $stmtA ", $dbhA->errstr; +$sthArows=$sthA->rows; +if ($sthArows > 0) + { + @aryA = $sthA->fetchrow_array; + $non_latin = "$aryA[0]"; + } +$sthA->finish(); +##### END SETTINGS LOOKUP ##### +########################################### - ### Grab Server values from the database - $stmtA = "SELECT local_gmt FROM servers where server_ip = '$server_ip';"; - $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; - $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; - $sthArows=$sthA->rows; - $rec_count=0; - while ($sthArows > $rec_count) - { - @aryA = $sthA->fetchrow_array; - $DBSERVER_GMT = "$aryA[0]"; - if ($DBSERVER_GMT) {$SERVER_GMT = $DBSERVER_GMT;} - $rec_count++; - } - $sthA->finish(); + +if ($non_latin > 0) {$affected_rows = $dbhA->do("SET NAMES 'UTF8'");} + +### Grab Server values from the database +$stmtA = "SELECT local_gmt FROM servers where server_ip = '$server_ip';"; +$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; +$sthA->execute or die "executing: $stmtA ", $dbhA->errstr; +$sthArows=$sthA->rows; +$rec_count=0; +while ($sthArows > $rec_count) + { + @aryA = $sthA->fetchrow_array; + $DBSERVER_GMT = "$aryA[0]"; + if ($DBSERVER_GMT) {$SERVER_GMT = $DBSERVER_GMT;} + $rec_count++; + } +$sthA->finish(); $LOCAL_GMT_OFF = $SERVER_GMT; $LOCAL_GMT_OFF_STD = $SERVER_GMT; diff --git a/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_de/new_listloader_superL.php b/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_de/new_listloader_superL.php index bdd3feb9..d5a419a0 100644 --- a/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_de/new_listloader_superL.php +++ b/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_de/new_listloader_superL.php @@ -1,7 +1,7 @@ LICENSE: GPLv2 +# Copyright (C) 2008 Matt Florell,Joe Johnson LICENSE: GPLv2 # # AST GUI lead loader from formatted file # @@ -19,11 +19,12 @@ # 61128-1149 - added postal code GMT lookup and duplicate check options # 70417-1059 - Fixed default phone_code bug # 70510-1518 - Added campaign and system duplicate check and phonecode override +# 80428-0417 - UTF8 changes # # 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.4'; -$build = '70510-1518'; +$version = '2.0.4-24'; +$build = '80428-0417'; require("dbconnect.php"); @@ -113,10 +114,28 @@ if (isset($_GET["phone_code_override"])) {$phone_code_override=$_GET["phone_co # $country_field=$_GET["country_field"]; if (!$country_field) {$country_field=$_POST["country_field"];} +############################################# +##### START SYSTEM_SETTINGS LOOKUP ##### +$stmt = "SELECT use_non_latin FROM system_settings;"; +$rslt=mysql_query($stmt, $link); +if ($DB) {echo "$stmt\n";} +$qm_conf_ct = mysql_num_rows($rslt); +$i=0; +while ($i < $qm_conf_ct) + { + $row=mysql_fetch_row($rslt); + $non_latin = $row[0]; + $i++; + } +##### END SETTINGS LOOKUP ##### +########################################### + +if ($non_latin < 1) +{ $PHP_AUTH_USER = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_USER); $PHP_AUTH_PW = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_PW); $list_id_override = ereg_replace("[^0-9]","",$list_id_override); - +} $STARTtime = date("U"); $TODAY = date("Y-m-d"); @@ -125,6 +144,7 @@ $FILE_datetime = $STARTtime; $stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 7;"; if ($DB) {echo "|$stmt|\n";} +if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $auth=$row[0]; @@ -144,6 +164,9 @@ $browser = getenv("HTTP_USER_AGENT"); else { header ("Content-type: text/html; charset=utf-8"); + header ("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1 + header ("Pragma: no-cache"); // HTTP/1.0 + if($auth>0) { $office_no=strtoupper($PHP_AUTH_USER); diff --git a/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_el/AST_CLOSERstats.php b/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_el/AST_CLOSERstats.php index b10caf49..9923235a 100644 --- a/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_el/AST_CLOSERstats.php +++ b/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_el/AST_CLOSERstats.php @@ -10,6 +10,7 @@ # 60905-1326 - Added queue time stats # 71008-1436 - Added shift to be defined in dbconnect.php # 71025-0021 - Added status breakdown +# 71218-1155 - added end_date for multi-day reports # require("dbconnect.php"); @@ -20,7 +21,9 @@ $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"];} + elseif (isset($_POST["query_date"])) {$query_date=$_POST["query_date"];} +if (isset($_GET["end_date"])) {$end_date=$_GET["end_date"];} + elseif (isset($_POST["end_date"])) {$end_date=$_POST["end_date"];} if (isset($_GET["shift"])) {$shift=$_GET["shift"];} elseif (isset($_POST["shift"])) {$shift=$_POST["shift"];} if (isset($_GET["submit"])) {$submit=$_GET["submit"];} @@ -52,6 +55,7 @@ $NOW_TIME = date("Y-m-d H:i:s"); $STARTtime = date("U"); if (!isset($group)) {$group = '';} if (!isset($query_date)) {$query_date = $NOW_DATE;} +if (!isset($end_date)) {$end_date = $NOW_DATE;} $stmt="select group_id from vicidial_inbound_groups;"; $rslt=mysql_query($stmt, $link); @@ -82,6 +86,7 @@ echo "\n" echo "VICIDIAL: Στατιστικά VDAD Closer\n"; echo "
\n"; echo "\n"; +echo " to \n"; echo "\n"; +echo " to \n"; echo "\n"; +echo "\n"; +echo " to \n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; +echo "\n"; echo "\n"; } echo "         \n"; -echo "STOP | "; -echo "SLOW | "; -echo "GO"; +echo "STOP | "; +echo "SLOW | "; +echo "GO"; echo "       ΤΡΟΠΟΠΟΙΗΣΗ | \n"; echo "SUMMARY | \n"; echo "ΑΝΑΦΟΡΕΣ \n"; @@ -276,10 +305,6 @@ 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'"); -} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $DIALlev = $row[0]; @@ -309,10 +334,6 @@ 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]; @@ -322,10 +343,6 @@ 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),min(status_category_1),sum(status_category_count_1),min(status_category_2),sum(status_category_count_2),min(status_category_3),sum(status_category_count_3),min(status_category_4),sum(status_category_count_4) 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]; @@ -357,10 +374,6 @@ 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]; @@ -436,31 +449,39 @@ echo "
"; echo ""; @@ -469,34 +490,38 @@ 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
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
"; if ($adastats<2) { - echo "+ VIEW MORE SETTINGS"; + echo "+ VIEW MORE SETTINGS"; } if ($UGdisplay>0) { - echo "       ΑΠΟΚΡΥΨΗ USER GROUP"; + echo "       ΑΠΟΚΡΥΨΗ USER GROUP"; } else { - echo "       VIEW USER GROUP"; + echo "       VIEW USER GROUP"; } if ($UidORname>0) { - echo "       ΕΜΦΑΝΙΣΗ ΧΕΙΡΙΣΤΗΣID"; + echo "       ΕΜΦΑΝΙΣΗ ΧΕΙΡΙΣΤΗΣID"; } else { - echo "       ΕΜΦΑΝΙΣΗ ΧΕΙΡΙΣΤΗΣNAME"; + echo "       ΕΜΦΑΝΙΣΗ ΧΕΙΡΙΣΤΗΣNAME"; } if ($SERVdisplay>0) { - echo "       ΑΠΟΚΡΥΨΗ ΔΙΑΚΟΜΙΣΤΗΣ INFO"; + echo "       ΑΠΟΚΡΥΨΗ ΔΙΑΚΟΜΙΣΤΗΣ INFO"; } else { - echo "       ΕΜΦΑΝΙΣΗ ΔΙΑΚΟΜΙΣΤΗΣ INFO"; + echo "       ΕΜΦΑΝΙΣΗ ΔΙΑΚΟΜΙΣΤΗΣ INFO"; + } +if ($CALLSdisplay>0) + { + echo "       ΑΠΟΚΡΥΨΗ WAITING CALLS DETAIL"; + } +else + { + echo "       ΕΜΦΑΝΙΣΗ WAITING CALLS DETAIL"; } echo "
"; echo "\n\n"; } ################################################################################### -###### OUTBOUND CALLS +###### INBOUND/OUTBOUND CALLS ################################################################################### if ($campaign_allow_inbound > 0) { $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]); $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') );"; + $stmtB="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 IN('OUT','OUTBALANCE')) ) order by campaign_id,call_time;"; } 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;"; + $stmtB="from vicidial_auto_calls where status NOT IN('XFER') $groupSQL order by campaign_id,call_time;"; } -if ($non_latin > 0) -{ -$rslt=mysql_query("SET NAMES 'UTF8'"); -} +if ($CALLSdisplay > 0) + { + $stmtA = "SELECT status,campaign_id,phone_number,server_ip,UNIX_TIMESTAMP(call_time),call_type"; + } +else + { + $stmtA = "SELECT status"; + } + + +$k=0; +$stmt = "$stmtA $stmtB"; $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $parked_to_print = mysql_num_rows($rslt); @@ -511,7 +536,20 @@ $parked_to_print = mysql_num_rows($rslt); $row=mysql_fetch_row($rslt); if (eregi("LIVE",$row[0])) - {$out_live++;} + { + $out_live++; + + if ($CALLSdisplay > 0) + { + $CDstatus[$k] = $row[0]; + $CDcampaign_id[$k] = $row[1]; + $CDphone_number[$k] = $row[2]; + $CDserver_ip[$k] = $row[3]; + $CDcall_time[$k] = $row[4]; + $CDcall_type[$k] = $row[5]; + $k++; + } + } else { if (eregi("CLOSER",$row[0])) @@ -519,6 +557,7 @@ $parked_to_print = mysql_num_rows($rslt); else {$out_ring++;} } + $out_total++; $i++; } @@ -542,6 +581,51 @@ $parked_to_print = mysql_num_rows($rslt); } + +################################################################################### +###### CALLS WAITING +################################################################################### + +$Cecho = ''; +$Cecho .= "VICIDIAL: Calls Waiting $NOW_TIME\n"; +$Cecho .= "+--------+--------------+--------------+-----------------+---------+------------+\n"; +$Cecho .= "| STATUS | CAMPAIGN | PHONE NUMBER | SERVER_IP | DIALTIME| CALL TYPE |\n"; +$Cecho .= "+--------+--------------+--------------+-----------------+---------+------------+\n"; + +$p=0; +while($p<$k) + { + $Cstatus = sprintf("%-6s", $CDstatus[$p]); + $Ccampaign_id = sprintf("%-12s", $CDcampaign_id[$p]); + $Cphone_number = sprintf("%-12s", $CDphone_number[$p]); + $Cserver_ip = sprintf("%-15s", $CDserver_ip[$p]); + $Ccall_type = sprintf("%-10s", $CDcall_type[$p]); + + $Ccall_time_S = ($STARTtime - $CDcall_time[$p]); + $Ccall_time_M = ($Ccall_time_S / 60); + $Ccall_time_M = round($Ccall_time_M, 2); + $Ccall_time_M_int = intval("$Ccall_time_M"); + $Ccall_time_SEC = ($Ccall_time_M - $Ccall_time_M_int); + $Ccall_time_SEC = ($Ccall_time_SEC * 60); + $Ccall_time_SEC = round($Ccall_time_SEC, 0); + if ($Ccall_time_SEC < 10) {$Ccall_time_SEC = "0$Ccall_time_SEC";} + $Ccall_time_MS = "$Ccall_time_M_int:$Ccall_time_SEC"; + $Ccall_time_MS = sprintf("%7s", $Ccall_time_MS); + + $G = ''; $EG = ''; + if ($CDcall_type[$p] == 'IN') + { + $G=""; $EG=''; + } + $Cecho .= "| $G$Cstatus$EG | $G$Ccampaign_id$EG | $G$Cphone_number$EG | $G$Cserver_ip$EG | $G$Ccall_time_MS$EG | $G$Ccall_type$EG |\n"; + + $p++; + } +$Cecho .= "+--------+--------------+--------------+-----------------+---------+------------+\n\n"; + +if ($p<1) + {$Cecho='';} + ################################################################################### ###### TIME ON SYSTEM ################################################################################### @@ -552,7 +636,7 @@ $agent_paused=0; $agent_total=0; $Aecho = ''; -$Aecho .= "VICIDIAL: Agents Time On Calls Εκστρατεία: $group $NOW_TIME\n\n"; +$Aecho .= "VICIDIAL: Agents Time On Calls Εκστρατεία: $group $NOW_TIME\n"; $HDbegin = "+"; @@ -560,9 +644,9 @@ $HTbegin = "|"; $HDstation = "------------+"; $HTstation = " STATION |"; $HDuser = "--------------------+"; -$HTuser = " USER |"; +$HTuser = " USER |"; $HDusergroup = "--------------+"; -$HTusergroup = " USER GROUP |"; +$HTusergroup = " USER GROUP |"; $HDsessionid = "------------------+"; $HTsessionid = " SESSIONID |"; $HDbarge = "-------+"; @@ -574,9 +658,9 @@ $HTserver_ip = " ΔΙΑΚΟΜΙΣΤΗΣ IP |"; $HDcall_server_ip = "-----------------+"; $HTcall_server_ip = " CALL ΔΙΑΚΟΜΙΣΤΗΣ IP |"; $HDtime = "---------+"; -$HTtime = " MM:SS |"; +$HTtime = " MM:SS |"; $HDcampaign = "------------+"; -$HTcampaign = " CAMPAIGN |"; +$HTcampaign = " CAMPAIGN |"; if ($UGdisplay < 1) { @@ -635,10 +719,6 @@ $stmt="select extension,vicidial_live_agents.user,conf_exten,status,server_ip,UN #$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); @@ -740,7 +820,7 @@ $talking_to_print = mysql_num_rows($rslt); } if (eregi("PAUSED",$row[3])) { - if ($call_time_M_int >= 30) + if ($call_time_M_int >= 360) {$i++; continue;} else { @@ -813,6 +893,7 @@ $talking_to_print = mysql_num_rows($rslt); echo "
";
 		echo "";
+		echo "$Cecho";
 		echo "$Aecho";
 	}
 	else
diff --git a/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_el/admin.php b/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_el/admin.php
index 0c2f9dbf..8901edb6 100644
--- a/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_el/admin.php
+++ b/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_el/admin.php
@@ -680,6 +680,22 @@ if (strlen($dial_status) > 0)
 	$status = $dial_status;
 	}
 
+#############################################
+##### START SYSTEM_SETTINGS LOOKUP #####
+$stmt = "SELECT use_non_latin FROM system_settings;";
+$rslt=mysql_query($stmt, $link);
+if ($DB) {echo "$stmt\n";}
+$qm_conf_ct = mysql_num_rows($rslt);
+$i=0;
+while ($i < $qm_conf_ct)
+	{
+	$row=mysql_fetch_row($rslt);
+	$non_latin =					$row[0];
+	$i++;
+	}
+##### END SETTINGS LOOKUP #####
+###########################################
+
 ######################################################################################################
 ######################################################################################################
 #######   Form variable filtering for security and data integrity
@@ -1141,12 +1157,13 @@ $list_mix_container = ereg_replace(";","",$list_mix_container);
 # 71116-0942 - Added campaign_rank and fewest_calls as methods for agent call routing
 # 71122-1135 - Added default transfer group for campaigns and inbound groups
 # 71125-1751 - Added allowable transfer groups to campaign detail screen
-#
+# 80330-0814 - Added CBHOLD block on selecting, added user stats/status links
+# 80424-0442 - Added non_latin system_settings lookup at top to override dbconnect setting
 # 
 # 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.4-119';
-$build = '71125-1751';
+$admin_version = '2.0.4-121';
+$build = '80424-0442';
 
 $STARTtime = date("U");
 $SQLdate = date("Y-m-d H:i:s");
@@ -1169,11 +1186,28 @@ if ($force_logout)
     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);
+#############################################
+##### START SYSTEM_SETTINGS LOOKUP #####
+$stmt = "SELECT use_non_latin FROM system_settings;";
+$rslt=mysql_query($stmt, $link);
+if ($DB) {echo "$stmt\n";}
+$qm_conf_ct = mysql_num_rows($rslt);
+$i=0;
+while ($i < $qm_conf_ct)
+	{
 	$row=mysql_fetch_row($rslt);
-	$auth=$row[0];
+	$non_latin =					$row[0];
+	$i++;
+	}
+##### END SETTINGS LOOKUP #####
+###########################################
+
+$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";}
+if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");}
+$rslt=mysql_query($stmt, $link);
+$row=mysql_fetch_row($rslt);
+$auth=$row[0];
 
 if ($WeBRooTWritablE > 0)
 	{$fp = fopen ("./project_auth_entries.txt", "a");}
@@ -3865,7 +3899,7 @@ $admin_home_url_LU =	$row[0];
 
  1) { 
 	?>
-
>   > Παρουσιάστε χρήστες     |     > Προσθέστε έναν νέο χρήστη     |     > Χρήστης αντιγράφων     |     > Αναζήτηση ενός χρήστη
>   > Παρουσιάστε χρήστες     |     > Προσθέστε έναν νέο χρήστη     |     > Χρήστης αντιγράφων     |     > Αναζήτηση ενός χρήστη     |     > User Stats     |     > User Status
Επίπεδο 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-local_call_time$NWE
ΦΩΝΗΤΙΚΟ ΤΑΧΥΔΡΟΜΕΙΟ: $NWB#vicidial_campaigns-voicemail_ext$NWE
Βοηθός: \n"; echo "\n"; echo "\n"; - echo "\n"; + echo "\n"; echo "\n"; echo "\n"; echo "\n"; @@ -8841,6 +8877,7 @@ if ($ADD==31) $dial_status_d = $row[6]; $dial_status_e = $row[7]; $lead_order = $row[8]; + $web_form_address = $row[11]; $allow_closers = $row[12]; $hopper_level = $row[13]; $auto_dial_level = $row[14]; @@ -8935,12 +8972,14 @@ if ($ADD==31) $rslt=mysql_query($stmt, $link); $statuses_to_print = mysql_num_rows($rslt); $statuses_list=''; + $dial_statuses_list=''; $o=0; while ($statuses_to_print > $o) { $rowx=mysql_fetch_row($rslt); $statuses_list .= "\n"; + if ($rowx[0] != 'CBHOLD') {$dial_statuses_list .= "\n";} $statname_list["$rowx[0]"] = "$rowx[1]"; $LRstatuses_list .= "\n"; if (eregi("Y",$rowx[2])) @@ -8957,6 +8996,7 @@ if ($ADD==31) { $rowx=mysql_fetch_row($rslt); $statuses_list .= "\n"; + if ($rowx[0] != 'CBHOLD') {$dial_statuses_list .= "\n";} $statname_list["$rowx[0]"] = "$rowx[1]"; $LRstatuses_list .= "\n"; if (eregi("Y",$rowx[2])) @@ -9038,7 +9078,7 @@ if ($ADD==31) echo "\n"; echo "\n"; echo "\n"; - echo "\n"; + echo "\n"; echo "\n"; echo "\n"; @@ -9065,7 +9105,7 @@ if ($ADD==31) echo "\n"; @@ -9319,7 +9359,7 @@ if ($ADD==31) } - + ##### CAMPAIGN CUSTOM STATUSES ##### if ($SUB==22) { @@ -9399,7 +9439,7 @@ if ($ADD==31) echo "
\n"; } - + ##### CAMPAIGN HOTKEYS ##### if ($SUB==23) { echo "
ΠΡΟΣΑΡΜΟΣΜΕΝΑ ΚΛΕΙΔΙΑ ΣΤΗΝ ΕΚΣΤΡΑΤΕΙΑ:   $NWB#vicidial_campaign_hotkeys$NWE
\n"; @@ -9449,7 +9489,7 @@ if ($ADD==31) echo "
\n"; } - + ##### CAMPAIGN LEAD RECYCLING ##### if ($SUB==25) { echo "

ΑΝΑΚΥΚΛΩΣΗ ΟΔΗΓΟΥ ΜΕΣΑ ΣΕ ΑΥΤΗΝ ΤΗΝ ΕΚΣΤΡΑΤΕΙΑ:   $NWB#vicidial_lead_recycle$NWE
\n"; @@ -9496,7 +9536,7 @@ if ($ADD==31) echo "
\n"; } - + ##### CAMPAIGN AUTO-ALT-NUMBER DIALING ##### if ($SUB==26) { echo "

ΑΥΤΟΜΑΤΟΣ ΣΧΗΜΑΤΙΣΜΌΣ ΑΡΙΘΜΟΎ ALT ΓΙΑ ΑΥΤΉΝ ΤΗΝ ΕΚΣΤΡΑΤΕΊΑ:   $NWB#vicidial_auto_alt_dial_statuses$NWE
\n"; @@ -9533,7 +9573,7 @@ if ($ADD==31) echo "
\n"; } - + ##### CAMPAIGN ΚΩΔΙΚΕΣ ΜΙΚΡΗΣ ΔΙΑΚΟΠΉΣ ##### if ($SUB==27) { echo "

ΚΩΔΙΚΕΣ ΜΙΚΡΗΣ ΔΙΑΚΟΠΉΣ ΠΡΑΚΤΟΡΩΝ ΓΙΑ ΑΥΤΗΝ ΤΗΝ ΕΚΣΤΡΑΤΕΙΑ:   $NWB#vicidial_pause_codes$NWE
\n"; @@ -9663,12 +9703,13 @@ if ($ADD==34) $rslt=mysql_query($stmt, $link); $statuses_to_print = mysql_num_rows($rslt); $statuses_list=''; - + $dial_statuses_list=''; $o=0; while ($statuses_to_print > $o) { $rowx=mysql_fetch_row($rslt); $statuses_list .= "\n"; + if ($rowx[0] != 'CBHOLD') {$dial_statuses_list .= "\n";} $statname_list["$rowx[0]"] = "$rowx[1]"; $LRstatuses_list .= "\n"; if (eregi("Y",$rowx[2])) @@ -9685,6 +9726,7 @@ if ($ADD==34) { $rowx=mysql_fetch_row($rslt); $statuses_list .= "\n"; + if ($rowx[0] != 'CBHOLD') {$dial_statuses_list .= "\n";} $statname_list["$rowx[0]"] = "$rowx[1]"; $LRstatuses_list .= "\n"; if (eregi("Y",$rowx[2])) @@ -9788,7 +9830,7 @@ if ($ADD==34) echo "\n"; @@ -9962,6 +10004,7 @@ if ( ($ADD==34) or ($ADD==31) ) { if ($LOGmodify_campaigns==1) { + ##### CAMPAIGN LIST MIX SETTINGS ##### if ($SUB==29) { ##### get list_id listings for dynamic pulldown @@ -10088,7 +10131,7 @@ if ( ($ADD==34) or ($ADD==31) ) echo "\n"; echo "ADD   \n"; echo "ΑΦΑΙΡΕΣΤΕ\n"; @@ -10149,7 +10192,7 @@ if ( ($ADD==34) or ($ADD==31) ) echo "$mixlists_list"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; @@ -10977,7 +11020,7 @@ if ($ADD==3111) 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-group_color$NWE
Ενεργή:$NWB#vicidial_inbound_groups-active$NWE
Ιστο-σελίδα: $NWB#vicidial_inbound_groups-web_form_address$NWE
ΦΩΝΗΤΙΚΟ ΤΑΧΥΔΡΟΜΕΙΟ: $NWB#vicidial_inbound_groups-voicemail_ext$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
Ιστο-σελίδα: $NWB#vicidial_campaigns-web_form_address$NWE
Επιτρέπω τους Closers: $NWB#vicidial_campaigns-allow_closers$NWE
Επιτρέψτε πλησίον και συνδύασε:$NWB#vicidial_campaigns-campaign_allow_inbound$NWE
Add A Dial Κατάσταση:   \n"; echo "     $NWB#vicidial_campaigns-dial_status$NWE
Add A Dial Κατάσταση:   \n"; echo "     $NWB#vicidial_campaigns-dial_status$NWE
Dial Κατάσταση:  
\n"; echo "\n"; echo "\n"; - echo "\n"; + echo "\n"; echo "\n"; echo "\n"; echo "\n"; diff --git a/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_el/admin_modify_lead.php b/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_el/admin_modify_lead.php index 76af1164..9f7748fe 100644 --- a/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_el/admin_modify_lead.php +++ b/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_el/admin_modify_lead.php @@ -1,13 +1,28 @@ LICENSE: GPLv2 +# AST GUI database administration modify lead in vicidial_list +# admin_modify_lead.php +# +# this is the administration lead information modifier screen, the administrator +# just needs to enter the leadID and then they can view and modify the +# information in the record for that lead +# +# Copyright (C) 2008 Matt Florell LICENSE: GPLv2 # - # CHANGES # +# 60419-1705 - Added ability to change lead callback record from USERONLY to ANYONE or USERONLY-user +# 60421-1459 - check GET/POST vars lines with isset to not trigger PHP NOTICES +# 60609-1112 - Added DNC list addition if status changed to DNC +# 60619-1539 - Added variable filtering to eliminate SQL injection attack threat +# 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 +# 70424-1128 - Added campaign-specific statuses, reformatted recordings list # 70702-1259 - Added recording location link and truncation # 70906-2132 - Added closer_log records display +# 80428-0144 - UTF8 cleanup # require("dbconnect.php"); @@ -98,35 +113,32 @@ if (isset($_GET["modify_logs"])) {$modify_logs=$_GET["modify_logs"];} $PHP_AUTH_USER = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_USER); $PHP_AUTH_PW = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_PW); - - -### AST GUI database administration modify lead in vicidial_list -### admin_modify_lead.php - -# this is the administration lead information modifier screen, the administrator just needs to enter the leadID and then they can view and modify the information in the record for that lead - -# CHANGES -# -# 60419-1705 - Added ability to change lead callback record from USERONLY to ANYONE or USERONLY-user -# 60421-1459 - check GET/POST vars lines with isset to not trigger PHP NOTICES -# 60609-1112 - Added DNC list addition if status changed to DNC -# 60619-1539 - Added variable filtering to eliminate SQL injection attack threat -# 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 -# 70424-1128 - Added campaign-specific statuses, reformatted recordings list -# - $STARTtime = date("U"); $TODAY = date("Y-m-d"); $NOW_TIME = date("Y-m-d H:i:s"); - - $stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 7 and modify_leads='1';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); +############################################# +##### START SYSTEM_SETTINGS LOOKUP ##### +$stmt = "SELECT use_non_latin FROM system_settings;"; +$rslt=mysql_query($stmt, $link); +if ($DB) {echo "$stmt\n";} +$qm_conf_ct = mysql_num_rows($rslt); +$i=0; +while ($i < $qm_conf_ct) + { $row=mysql_fetch_row($rslt); - $auth=$row[0]; + $non_latin = $row[0]; + $i++; + } +##### END SETTINGS LOOKUP ##### +########################################### + +$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";} +if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} +$rslt=mysql_query($stmt, $link); +$row=mysql_fetch_row($rslt); +$auth=$row[0]; if ($WeBRooTWritablE > 0) {$fp = fopen ("./project_auth_entries.txt", "a");} diff --git a/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_el/listloader.pl b/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_el/listloader.pl index d926368b..d58321cb 100644 --- a/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_el/listloader.pl +++ b/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_el/listloader.pl @@ -1,8 +1,8 @@ #!/usr/bin/perl -### listloader.pl version 0.4 *DBI-version* +### listloader.pl version 2.0.4 *DBI-version* ### -### Copyright (C) 2007 Matt Florell,Joe Johnson LICENSE: GPLv2 +### Copyright (C) 2008 Matt Florell,Joe Johnson LICENSE: GPLv2 ### # # @@ -18,6 +18,7 @@ # 70205-1703 - Defaulted phone_code to 1 if not populated # 70417-1059 - Fixed default phone_code bug # 70510-1518 - Added campaign and system duplicate check and phonecode override +# 80428-0144 - UTF8 cleanup # ### begin parsing run-time options ### @@ -148,6 +149,23 @@ $pulldate="$year-$mon-$mday $hour:$min:$sec"; $inSD = $pulldate0; $dsec = ( ( ($hour * 3600) + ($min * 60) ) + $sec ); +############################################# +##### START SYSTEM_SETTINGS LOOKUP ##### +$stmtA = "SELECT use_non_latin FROM system_settings;"; +$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; +$sthA->execute or die "executing: $stmtA ", $dbhA->errstr; +$sthArows=$sthA->rows; +if ($sthArows > 0) + { + @aryA = $sthA->fetchrow_array; + $non_latin = "$aryA[0]"; + } +$sthA->finish(); +##### END SETTINGS LOOKUP ##### +########################################### + + +if ($non_latin > 0) {$affected_rows = $dbhA->do("SET NAMES 'UTF8'");} ### Grab Server values from the database $stmtA = "SELECT local_gmt FROM servers where server_ip = '$server_ip';"; diff --git a/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_el/listloader_super.pl b/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_el/listloader_super.pl index 167fff5e..9f6f8d52 100644 --- a/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_el/listloader_super.pl +++ b/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_el/listloader_super.pl @@ -1,8 +1,8 @@ #!/usr/bin/perl -### listloader_super.pl version 0.4 *DBI-version* +### listloader_super.pl version 2.0.4 *DBI-version* ### -### Copyright (C) 2007 Matt Florell,Joe Johnson LICENSE: GPLv2 +### Copyright (C) 2008 Matt Florell,Joe Johnson LICENSE: GPLv2 ### # # @@ -17,6 +17,7 @@ # 70205-1703 - Defaulted phone_code to 1 if not populated # 70417-1059 - Fixed default phone_code bug # 70510-1518 - Added campaign and system duplicate check and phonecode override +# 80428-0144 - UTF8 cleanup # ### begin parsing run-time options ### @@ -149,21 +150,38 @@ $pulldate="$year-$mon-$mday $hour:$min:$sec"; $inSD = $pulldate0; $dsec = ( ( ($hour * 3600) + ($min * 60) ) + $sec ); +############################################# +##### START SYSTEM_SETTINGS LOOKUP ##### +$stmtA = "SELECT use_non_latin FROM system_settings;"; +$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; +$sthA->execute or die "executing: $stmtA ", $dbhA->errstr; +$sthArows=$sthA->rows; +if ($sthArows > 0) + { + @aryA = $sthA->fetchrow_array; + $non_latin = "$aryA[0]"; + } +$sthA->finish(); +##### END SETTINGS LOOKUP ##### +########################################### - ### Grab Server values from the database - $stmtA = "SELECT local_gmt FROM servers where server_ip = '$server_ip';"; - $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; - $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; - $sthArows=$sthA->rows; - $rec_count=0; - while ($sthArows > $rec_count) - { - @aryA = $sthA->fetchrow_array; - $DBSERVER_GMT = "$aryA[0]"; - if ($DBSERVER_GMT) {$SERVER_GMT = $DBSERVER_GMT;} - $rec_count++; - } - $sthA->finish(); + +if ($non_latin > 0) {$affected_rows = $dbhA->do("SET NAMES 'UTF8'");} + +### Grab Server values from the database +$stmtA = "SELECT local_gmt FROM servers where server_ip = '$server_ip';"; +$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; +$sthA->execute or die "executing: $stmtA ", $dbhA->errstr; +$sthArows=$sthA->rows; +$rec_count=0; +while ($sthArows > $rec_count) + { + @aryA = $sthA->fetchrow_array; + $DBSERVER_GMT = "$aryA[0]"; + if ($DBSERVER_GMT) {$SERVER_GMT = $DBSERVER_GMT;} + $rec_count++; + } +$sthA->finish(); $LOCAL_GMT_OFF = $SERVER_GMT; $LOCAL_GMT_OFF_STD = $SERVER_GMT; diff --git a/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_el/new_listloader_superL.php b/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_el/new_listloader_superL.php index d3c0060d..1f9c688d 100644 --- a/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_el/new_listloader_superL.php +++ b/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_el/new_listloader_superL.php @@ -1,7 +1,7 @@ LICENSE: GPLv2 +# Copyright (C) 2008 Matt Florell,Joe Johnson LICENSE: GPLv2 # # AST GUI lead loader from formatted file # @@ -19,11 +19,12 @@ # 61128-1149 - added postal code GMT lookup and duplicate check options # 70417-1059 - Fixed default phone_code bug # 70510-1518 - Added campaign and system duplicate check and phonecode override +# 80428-0417 - UTF8 changes # # 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.4'; -$build = '70510-1518'; +$version = '2.0.4-24'; +$build = '80428-0417'; require("dbconnect.php"); @@ -113,10 +114,28 @@ if (isset($_GET["phone_code_override"])) {$phone_code_override=$_GET["phone_co # $country_field=$_GET["country_field"]; if (!$country_field) {$country_field=$_POST["country_field"];} +############################################# +##### START SYSTEM_SETTINGS LOOKUP ##### +$stmt = "SELECT use_non_latin FROM system_settings;"; +$rslt=mysql_query($stmt, $link); +if ($DB) {echo "$stmt\n";} +$qm_conf_ct = mysql_num_rows($rslt); +$i=0; +while ($i < $qm_conf_ct) + { + $row=mysql_fetch_row($rslt); + $non_latin = $row[0]; + $i++; + } +##### END SETTINGS LOOKUP ##### +########################################### + +if ($non_latin < 1) +{ $PHP_AUTH_USER = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_USER); $PHP_AUTH_PW = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_PW); $list_id_override = ereg_replace("[^0-9]","",$list_id_override); - +} $STARTtime = date("U"); $TODAY = date("Y-m-d"); @@ -125,6 +144,7 @@ $FILE_datetime = $STARTtime; $stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 7;"; if ($DB) {echo "|$stmt|\n";} +if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $auth=$row[0]; @@ -144,6 +164,9 @@ $browser = getenv("HTTP_USER_AGENT"); else { header ("Content-type: text/html; charset=utf-8"); + header ("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1 + header ("Pragma: no-cache"); // HTTP/1.0 + if($auth>0) { $office_no=strtoupper($PHP_AUTH_USER); diff --git a/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_en/AST_CLOSERstats.php b/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_en/AST_CLOSERstats.php index ec53f93f..30477687 100644 --- a/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_en/AST_CLOSERstats.php +++ b/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_en/AST_CLOSERstats.php @@ -10,6 +10,7 @@ # 60905-1326 - Added queue time stats # 71008-1436 - Added shift to be defined in dbconnect.php # 71025-0021 - Added status breakdown +# 71218-1155 - added end_date for multi-day reports # require("dbconnect.php"); @@ -20,7 +21,9 @@ $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"];} + elseif (isset($_POST["query_date"])) {$query_date=$_POST["query_date"];} +if (isset($_GET["end_date"])) {$end_date=$_GET["end_date"];} + elseif (isset($_POST["end_date"])) {$end_date=$_POST["end_date"];} if (isset($_GET["shift"])) {$shift=$_GET["shift"];} elseif (isset($_POST["shift"])) {$shift=$_POST["shift"];} if (isset($_GET["submit"])) {$submit=$_GET["submit"];} @@ -52,6 +55,7 @@ $NOW_TIME = date("Y-m-d H:i:s"); $STARTtime = date("U"); if (!isset($group)) {$group = '';} if (!isset($query_date)) {$query_date = $NOW_DATE;} +if (!isset($end_date)) {$end_date = $NOW_DATE;} $stmt="select group_id from vicidial_inbound_groups;"; $rslt=mysql_query($stmt, $link); @@ -82,6 +86,7 @@ echo "\n" echo "VICIDIAL: VDAD Closer Stats\n"; echo "
\n"; echo "\n"; +echo " to \n"; echo "\n"; +echo " to \n"; echo "\n"; +echo "\n"; +echo " to \n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; +echo "\n"; echo "\n"; } echo "         \n"; -echo "STOP | "; -echo "SLOW | "; -echo "GO"; +echo "STOP | "; +echo "SLOW | "; +echo "GO"; echo "       MODIFY | \n"; echo "SUMMARY | \n"; echo "REPORTS \n"; @@ -276,10 +305,6 @@ 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'"); -} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $DIALlev = $row[0]; @@ -309,10 +334,6 @@ 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]; @@ -322,10 +343,6 @@ 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),min(status_category_1),sum(status_category_count_1),min(status_category_2),sum(status_category_count_2),min(status_category_3),sum(status_category_count_3),min(status_category_4),sum(status_category_count_4) 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]; @@ -357,10 +374,6 @@ 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]; @@ -436,31 +449,39 @@ echo "
"; echo ""; @@ -469,34 +490,38 @@ 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-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
"; if ($adastats<2) { - echo "+ VIEW MORE SETTINGS"; + echo "+ VIEW MORE SETTINGS"; } if ($UGdisplay>0) { - echo "       HIDE USER GROUP"; + echo "       HIDE USER GROUP"; } else { - echo "       VIEW USER GROUP"; + echo "       VIEW USER GROUP"; } if ($UidORname>0) { - echo "       SHOW AGENT ID"; + echo "       SHOW AGENT ID"; } else { - echo "       SHOW AGENT NAME"; + echo "       SHOW AGENT NAME"; } if ($SERVdisplay>0) { - echo "       HIDE SERVER INFO"; + echo "       HIDE SERVER INFO"; } else { - echo "       SHOW SERVER INFO"; + echo "       SHOW SERVER INFO"; + } +if ($CALLSdisplay>0) + { + echo "       HIDE WAITING CALLS DETAIL"; + } +else + { + echo "       SHOW WAITING CALLS DETAIL"; } echo "
"; echo "\n\n"; } ################################################################################### -###### OUTBOUND CALLS +###### INBOUND/OUTBOUND CALLS ################################################################################### if ($campaign_allow_inbound > 0) { $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]); $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') );"; + $stmtB="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 IN('OUT','OUTBALANCE')) ) order by campaign_id,call_time;"; } 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;"; + $stmtB="from vicidial_auto_calls where status NOT IN('XFER') $groupSQL order by campaign_id,call_time;"; } -if ($non_latin > 0) -{ -$rslt=mysql_query("SET NAMES 'UTF8'"); -} +if ($CALLSdisplay > 0) + { + $stmtA = "SELECT status,campaign_id,phone_number,server_ip,UNIX_TIMESTAMP(call_time),call_type"; + } +else + { + $stmtA = "SELECT status"; + } + + +$k=0; +$stmt = "$stmtA $stmtB"; $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $parked_to_print = mysql_num_rows($rslt); @@ -511,7 +536,20 @@ $parked_to_print = mysql_num_rows($rslt); $row=mysql_fetch_row($rslt); if (eregi("LIVE",$row[0])) - {$out_live++;} + { + $out_live++; + + if ($CALLSdisplay > 0) + { + $CDstatus[$k] = $row[0]; + $CDcampaign_id[$k] = $row[1]; + $CDphone_number[$k] = $row[2]; + $CDserver_ip[$k] = $row[3]; + $CDcall_time[$k] = $row[4]; + $CDcall_type[$k] = $row[5]; + $k++; + } + } else { if (eregi("CLOSER",$row[0])) @@ -519,6 +557,7 @@ $parked_to_print = mysql_num_rows($rslt); else {$out_ring++;} } + $out_total++; $i++; } @@ -542,6 +581,51 @@ $parked_to_print = mysql_num_rows($rslt); } + +################################################################################### +###### CALLS WAITING +################################################################################### + +$Cecho = ''; +$Cecho .= "VICIDIAL: Calls Waiting $NOW_TIME\n"; +$Cecho .= "+--------+--------------+--------------+-----------------+---------+------------+\n"; +$Cecho .= "| STATUS | CAMPAIGN | PHONE NUMBER | SERVER_IP | DIALTIME| CALL TYPE |\n"; +$Cecho .= "+--------+--------------+--------------+-----------------+---------+------------+\n"; + +$p=0; +while($p<$k) + { + $Cstatus = sprintf("%-6s", $CDstatus[$p]); + $Ccampaign_id = sprintf("%-12s", $CDcampaign_id[$p]); + $Cphone_number = sprintf("%-12s", $CDphone_number[$p]); + $Cserver_ip = sprintf("%-15s", $CDserver_ip[$p]); + $Ccall_type = sprintf("%-10s", $CDcall_type[$p]); + + $Ccall_time_S = ($STARTtime - $CDcall_time[$p]); + $Ccall_time_M = ($Ccall_time_S / 60); + $Ccall_time_M = round($Ccall_time_M, 2); + $Ccall_time_M_int = intval("$Ccall_time_M"); + $Ccall_time_SEC = ($Ccall_time_M - $Ccall_time_M_int); + $Ccall_time_SEC = ($Ccall_time_SEC * 60); + $Ccall_time_SEC = round($Ccall_time_SEC, 0); + if ($Ccall_time_SEC < 10) {$Ccall_time_SEC = "0$Ccall_time_SEC";} + $Ccall_time_MS = "$Ccall_time_M_int:$Ccall_time_SEC"; + $Ccall_time_MS = sprintf("%7s", $Ccall_time_MS); + + $G = ''; $EG = ''; + if ($CDcall_type[$p] == 'IN') + { + $G=""; $EG=''; + } + $Cecho .= "| $G$Cstatus$EG | $G$Ccampaign_id$EG | $G$Cphone_number$EG | $G$Cserver_ip$EG | $G$Ccall_time_MS$EG | $G$Ccall_type$EG |\n"; + + $p++; + } +$Cecho .= "+--------+--------------+--------------+-----------------+---------+------------+\n\n"; + +if ($p<1) + {$Cecho='';} + ################################################################################### ###### TIME ON SYSTEM ################################################################################### @@ -552,7 +636,7 @@ $agent_paused=0; $agent_total=0; $Aecho = ''; -$Aecho .= "VICIDIAL: Agents Time On Calls Campaign: $group $NOW_TIME\n\n"; +$Aecho .= "VICIDIAL: Agents Time On Calls Campaign: $group $NOW_TIME\n"; $HDbegin = "+"; @@ -560,9 +644,9 @@ $HTbegin = "|"; $HDstation = "------------+"; $HTstation = " STATION |"; $HDuser = "--------------------+"; -$HTuser = " USER |"; +$HTuser = " USER |"; $HDusergroup = "--------------+"; -$HTusergroup = " USER GROUP |"; +$HTusergroup = " USER GROUP |"; $HDsessionid = "------------------+"; $HTsessionid = " SESSIONID |"; $HDbarge = "-------+"; @@ -574,9 +658,9 @@ $HTserver_ip = " SERVER IP |"; $HDcall_server_ip = "-----------------+"; $HTcall_server_ip = " CALL SERVER IP |"; $HDtime = "---------+"; -$HTtime = " MM:SS |"; +$HTtime = " MM:SS |"; $HDcampaign = "------------+"; -$HTcampaign = " CAMPAIGN |"; +$HTcampaign = " CAMPAIGN |"; if ($UGdisplay < 1) { @@ -635,10 +719,6 @@ $stmt="select extension,vicidial_live_agents.user,conf_exten,status,server_ip,UN #$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); @@ -740,7 +820,7 @@ $talking_to_print = mysql_num_rows($rslt); } if (eregi("PAUSED",$row[3])) { - if ($call_time_M_int >= 30) + if ($call_time_M_int >= 360) {$i++; continue;} else { @@ -813,6 +893,7 @@ $talking_to_print = mysql_num_rows($rslt); echo "
";
 		echo "";
+		echo "$Cecho";
 		echo "$Aecho";
 	}
 	else
diff --git a/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_en/admin.php b/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_en/admin.php
index 7fc0228a..978928b9 100644
--- a/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_en/admin.php
+++ b/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_en/admin.php
@@ -680,6 +680,22 @@ if (strlen($dial_status) > 0)
 	$status = $dial_status;
 	}
 
+#############################################
+##### START SYSTEM_SETTINGS LOOKUP #####
+$stmt = "SELECT use_non_latin FROM system_settings;";
+$rslt=mysql_query($stmt, $link);
+if ($DB) {echo "$stmt\n";}
+$qm_conf_ct = mysql_num_rows($rslt);
+$i=0;
+while ($i < $qm_conf_ct)
+	{
+	$row=mysql_fetch_row($rslt);
+	$non_latin =					$row[0];
+	$i++;
+	}
+##### END SETTINGS LOOKUP #####
+###########################################
+
 ######################################################################################################
 ######################################################################################################
 #######   Form variable filtering for security and data integrity
@@ -1141,12 +1157,13 @@ $list_mix_container = ereg_replace(";","",$list_mix_container);
 # 71116-0942 - Added campaign_rank and fewest_calls as methods for agent call routing
 # 71122-1135 - Added default transfer group for campaigns and inbound groups
 # 71125-1751 - Added allowable transfer groups to campaign detail screen
-#
+# 80330-0814 - Added CBHOLD block on selecting, added user stats/status links
+# 80424-0442 - Added non_latin system_settings lookup at top to override dbconnect setting
 # 
 # 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.4-119';
-$build = '71125-1751';
+$admin_version = '2.0.4-121';
+$build = '80424-0442';
 
 $STARTtime = date("U");
 $SQLdate = date("Y-m-d H:i:s");
@@ -1169,11 +1186,28 @@ if ($force_logout)
     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);
+#############################################
+##### START SYSTEM_SETTINGS LOOKUP #####
+$stmt = "SELECT use_non_latin FROM system_settings;";
+$rslt=mysql_query($stmt, $link);
+if ($DB) {echo "$stmt\n";}
+$qm_conf_ct = mysql_num_rows($rslt);
+$i=0;
+while ($i < $qm_conf_ct)
+	{
 	$row=mysql_fetch_row($rslt);
-	$auth=$row[0];
+	$non_latin =					$row[0];
+	$i++;
+	}
+##### END SETTINGS LOOKUP #####
+###########################################
+
+$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";}
+if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");}
+$rslt=mysql_query($stmt, $link);
+$row=mysql_fetch_row($rslt);
+$auth=$row[0];
 
 if ($WeBRooTWritablE > 0)
 	{$fp = fopen ("./project_auth_entries.txt", "a");}
@@ -3861,7 +3895,7 @@ $admin_home_url_LU =	$row[0];
 
  1) { 
 	?>
-
>   > Show Users     |     > Add A New User     |     > Copy User     |     > Search For A User
>   > Show Users     |     > Add A New User     |     > Copy User     |     > Search For A User     |     > User Stats     |     > User Status
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
Local Call Time: $NWB#vicidial_campaigns-local_call_time$NWE
Voicemail: $NWB#vicidial_campaigns-voicemail_ext$NWE
Script: \n"; echo "\n"; echo "\n"; - echo "\n"; + echo "\n"; echo "\n"; echo "\n"; echo "\n"; @@ -8837,6 +8873,7 @@ if ($ADD==31) $dial_status_d = $row[6]; $dial_status_e = $row[7]; $lead_order = $row[8]; + $web_form_address = $row[11]; $allow_closers = $row[12]; $hopper_level = $row[13]; $auto_dial_level = $row[14]; @@ -8931,12 +8968,14 @@ if ($ADD==31) $rslt=mysql_query($stmt, $link); $statuses_to_print = mysql_num_rows($rslt); $statuses_list=''; + $dial_statuses_list=''; $o=0; while ($statuses_to_print > $o) { $rowx=mysql_fetch_row($rslt); $statuses_list .= "\n"; + if ($rowx[0] != 'CBHOLD') {$dial_statuses_list .= "\n";} $statname_list["$rowx[0]"] = "$rowx[1]"; $LRstatuses_list .= "\n"; if (eregi("Y",$rowx[2])) @@ -8953,6 +8992,7 @@ if ($ADD==31) { $rowx=mysql_fetch_row($rslt); $statuses_list .= "\n"; + if ($rowx[0] != 'CBHOLD') {$dial_statuses_list .= "\n";} $statname_list["$rowx[0]"] = "$rowx[1]"; $LRstatuses_list .= "\n"; if (eregi("Y",$rowx[2])) @@ -9034,7 +9074,7 @@ if ($ADD==31) echo "\n"; echo "\n"; echo "\n"; - echo "\n"; + echo "\n"; echo "\n"; echo "\n"; @@ -9061,7 +9101,7 @@ if ($ADD==31) echo "\n"; @@ -9306,7 +9346,7 @@ if ($ADD==31) } - + ##### CAMPAIGN CUSTOM STATUSES ##### if ($SUB==22) { @@ -9386,7 +9426,7 @@ if ($ADD==31) echo "
\n"; } - + ##### CAMPAIGN HOTKEYS ##### if ($SUB==23) { echo "
CUSTOM HOT KEYS WITHIN THIS CAMPAIGN:   $NWB#vicidial_campaign_hotkeys$NWE
\n"; @@ -9436,7 +9476,7 @@ if ($ADD==31) echo "
\n"; } - + ##### CAMPAIGN LEAD RECYCLING ##### if ($SUB==25) { echo "

LEAD RECYCLING WITHIN THIS CAMPAIGN:   $NWB#vicidial_lead_recycle$NWE
\n"; @@ -9483,7 +9523,7 @@ if ($ADD==31) echo "
\n"; } - + ##### CAMPAIGN AUTO-ALT-NUMBER DIALING ##### if ($SUB==26) { echo "

AUTO ALT NUMBER DIALING FOR THIS CAMPAIGN:   $NWB#vicidial_auto_alt_dial_statuses$NWE
\n"; @@ -9520,7 +9560,7 @@ if ($ADD==31) echo "
\n"; } - + ##### CAMPAIGN PAUSE CODES ##### if ($SUB==27) { echo "

AGENT PAUSE CODES FOR THIS CAMPAIGN:   $NWB#vicidial_pause_codes$NWE
\n"; @@ -9650,12 +9690,13 @@ if ($ADD==34) $rslt=mysql_query($stmt, $link); $statuses_to_print = mysql_num_rows($rslt); $statuses_list=''; - + $dial_statuses_list=''; $o=0; while ($statuses_to_print > $o) { $rowx=mysql_fetch_row($rslt); $statuses_list .= "\n"; + if ($rowx[0] != 'CBHOLD') {$dial_statuses_list .= "\n";} $statname_list["$rowx[0]"] = "$rowx[1]"; $LRstatuses_list .= "\n"; if (eregi("Y",$rowx[2])) @@ -9672,6 +9713,7 @@ if ($ADD==34) { $rowx=mysql_fetch_row($rslt); $statuses_list .= "\n"; + if ($rowx[0] != 'CBHOLD') {$dial_statuses_list .= "\n";} $statname_list["$rowx[0]"] = "$rowx[1]"; $LRstatuses_list .= "\n"; if (eregi("Y",$rowx[2])) @@ -9775,7 +9817,7 @@ if ($ADD==34) echo "\n"; @@ -9947,6 +9989,7 @@ if ( ($ADD==34) or ($ADD==31) ) { if ($LOGmodify_campaigns==1) { + ##### CAMPAIGN LIST MIX SETTINGS ##### if ($SUB==29) { ##### get list_id listings for dynamic pulldown @@ -10073,7 +10116,7 @@ if ( ($ADD==34) or ($ADD==31) ) echo "\n"; echo "ADD   \n"; echo "REMOVE\n"; @@ -10134,7 +10177,7 @@ if ( ($ADD==34) or ($ADD==31) ) echo "$mixlists_list"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; @@ -10962,7 +11005,7 @@ if ($ADD==3111) 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
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
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
Web Form: $NWB#vicidial_campaigns-web_form_address$NWE
Allow Closers: $NWB#vicidial_campaigns-allow_closers$NWE
Allow Inbound and Blended: $NWB#vicidial_campaigns-campaign_allow_inbound$NWE
Add A Dial Status:   \n"; echo "     $NWB#vicidial_campaigns-dial_status$NWE
Add A Dial Status:   \n"; echo "     $NWB#vicidial_campaigns-dial_status$NWE
Dial Status:  
\n"; echo "\n"; echo "\n"; - echo "\n"; + echo "\n"; echo "\n"; echo "\n"; echo "\n"; diff --git a/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_en/admin_modify_lead.php b/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_en/admin_modify_lead.php index f8a285ec..d32a8551 100644 --- a/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_en/admin_modify_lead.php +++ b/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_en/admin_modify_lead.php @@ -1,13 +1,28 @@ LICENSE: GPLv2 +# AST GUI database administration modify lead in vicidial_list +# admin_modify_lead.php +# +# this is the administration lead information modifier screen, the administrator +# just needs to enter the leadID and then they can view and modify the +# information in the record for that lead +# +# Copyright (C) 2008 Matt Florell LICENSE: GPLv2 # - # CHANGES # +# 60419-1705 - Added ability to change lead callback record from USERONLY to ANYONE or USERONLY-user +# 60421-1459 - check GET/POST vars lines with isset to not trigger PHP NOTICES +# 60609-1112 - Added DNC list addition if status changed to DNC +# 60619-1539 - Added variable filtering to eliminate SQL injection attack threat +# 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 +# 70424-1128 - Added campaign-specific statuses, reformatted recordings list # 70702-1259 - Added recording location link and truncation # 70906-2132 - Added closer_log records display +# 80428-0144 - UTF8 cleanup # require("dbconnect.php"); @@ -98,35 +113,32 @@ if (isset($_GET["modify_logs"])) {$modify_logs=$_GET["modify_logs"];} $PHP_AUTH_USER = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_USER); $PHP_AUTH_PW = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_PW); - - -### AST GUI database administration modify lead in vicidial_list -### admin_modify_lead.php - -# this is the administration lead information modifier screen, the administrator just needs to enter the leadID and then they can view and modify the information in the record for that lead - -# CHANGES -# -# 60419-1705 - Added ability to change lead callback record from USERONLY to ANYONE or USERONLY-user -# 60421-1459 - check GET/POST vars lines with isset to not trigger PHP NOTICES -# 60609-1112 - Added DNC list addition if status changed to DNC -# 60619-1539 - Added variable filtering to eliminate SQL injection attack threat -# 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 -# 70424-1128 - Added campaign-specific statuses, reformatted recordings list -# - $STARTtime = date("U"); $TODAY = date("Y-m-d"); $NOW_TIME = date("Y-m-d H:i:s"); - - $stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 7 and modify_leads='1';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); +############################################# +##### START SYSTEM_SETTINGS LOOKUP ##### +$stmt = "SELECT use_non_latin FROM system_settings;"; +$rslt=mysql_query($stmt, $link); +if ($DB) {echo "$stmt\n";} +$qm_conf_ct = mysql_num_rows($rslt); +$i=0; +while ($i < $qm_conf_ct) + { $row=mysql_fetch_row($rslt); - $auth=$row[0]; + $non_latin = $row[0]; + $i++; + } +##### END SETTINGS LOOKUP ##### +########################################### + +$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";} +if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} +$rslt=mysql_query($stmt, $link); +$row=mysql_fetch_row($rslt); +$auth=$row[0]; if ($WeBRooTWritablE > 0) {$fp = fopen ("./project_auth_entries.txt", "a");} diff --git a/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_en/listloader.pl b/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_en/listloader.pl index d926368b..d58321cb 100644 --- a/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_en/listloader.pl +++ b/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_en/listloader.pl @@ -1,8 +1,8 @@ #!/usr/bin/perl -### listloader.pl version 0.4 *DBI-version* +### listloader.pl version 2.0.4 *DBI-version* ### -### Copyright (C) 2007 Matt Florell,Joe Johnson LICENSE: GPLv2 +### Copyright (C) 2008 Matt Florell,Joe Johnson LICENSE: GPLv2 ### # # @@ -18,6 +18,7 @@ # 70205-1703 - Defaulted phone_code to 1 if not populated # 70417-1059 - Fixed default phone_code bug # 70510-1518 - Added campaign and system duplicate check and phonecode override +# 80428-0144 - UTF8 cleanup # ### begin parsing run-time options ### @@ -148,6 +149,23 @@ $pulldate="$year-$mon-$mday $hour:$min:$sec"; $inSD = $pulldate0; $dsec = ( ( ($hour * 3600) + ($min * 60) ) + $sec ); +############################################# +##### START SYSTEM_SETTINGS LOOKUP ##### +$stmtA = "SELECT use_non_latin FROM system_settings;"; +$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; +$sthA->execute or die "executing: $stmtA ", $dbhA->errstr; +$sthArows=$sthA->rows; +if ($sthArows > 0) + { + @aryA = $sthA->fetchrow_array; + $non_latin = "$aryA[0]"; + } +$sthA->finish(); +##### END SETTINGS LOOKUP ##### +########################################### + + +if ($non_latin > 0) {$affected_rows = $dbhA->do("SET NAMES 'UTF8'");} ### Grab Server values from the database $stmtA = "SELECT local_gmt FROM servers where server_ip = '$server_ip';"; diff --git a/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_en/listloader_super.pl b/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_en/listloader_super.pl index 167fff5e..9f6f8d52 100644 --- a/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_en/listloader_super.pl +++ b/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_en/listloader_super.pl @@ -1,8 +1,8 @@ #!/usr/bin/perl -### listloader_super.pl version 0.4 *DBI-version* +### listloader_super.pl version 2.0.4 *DBI-version* ### -### Copyright (C) 2007 Matt Florell,Joe Johnson LICENSE: GPLv2 +### Copyright (C) 2008 Matt Florell,Joe Johnson LICENSE: GPLv2 ### # # @@ -17,6 +17,7 @@ # 70205-1703 - Defaulted phone_code to 1 if not populated # 70417-1059 - Fixed default phone_code bug # 70510-1518 - Added campaign and system duplicate check and phonecode override +# 80428-0144 - UTF8 cleanup # ### begin parsing run-time options ### @@ -149,21 +150,38 @@ $pulldate="$year-$mon-$mday $hour:$min:$sec"; $inSD = $pulldate0; $dsec = ( ( ($hour * 3600) + ($min * 60) ) + $sec ); +############################################# +##### START SYSTEM_SETTINGS LOOKUP ##### +$stmtA = "SELECT use_non_latin FROM system_settings;"; +$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; +$sthA->execute or die "executing: $stmtA ", $dbhA->errstr; +$sthArows=$sthA->rows; +if ($sthArows > 0) + { + @aryA = $sthA->fetchrow_array; + $non_latin = "$aryA[0]"; + } +$sthA->finish(); +##### END SETTINGS LOOKUP ##### +########################################### - ### Grab Server values from the database - $stmtA = "SELECT local_gmt FROM servers where server_ip = '$server_ip';"; - $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; - $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; - $sthArows=$sthA->rows; - $rec_count=0; - while ($sthArows > $rec_count) - { - @aryA = $sthA->fetchrow_array; - $DBSERVER_GMT = "$aryA[0]"; - if ($DBSERVER_GMT) {$SERVER_GMT = $DBSERVER_GMT;} - $rec_count++; - } - $sthA->finish(); + +if ($non_latin > 0) {$affected_rows = $dbhA->do("SET NAMES 'UTF8'");} + +### Grab Server values from the database +$stmtA = "SELECT local_gmt FROM servers where server_ip = '$server_ip';"; +$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; +$sthA->execute or die "executing: $stmtA ", $dbhA->errstr; +$sthArows=$sthA->rows; +$rec_count=0; +while ($sthArows > $rec_count) + { + @aryA = $sthA->fetchrow_array; + $DBSERVER_GMT = "$aryA[0]"; + if ($DBSERVER_GMT) {$SERVER_GMT = $DBSERVER_GMT;} + $rec_count++; + } +$sthA->finish(); $LOCAL_GMT_OFF = $SERVER_GMT; $LOCAL_GMT_OFF_STD = $SERVER_GMT; diff --git a/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_en/new_listloader_superL.php b/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_en/new_listloader_superL.php index 629321ed..3a25a101 100644 --- a/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_en/new_listloader_superL.php +++ b/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_en/new_listloader_superL.php @@ -1,7 +1,7 @@ LICENSE: GPLv2 +# Copyright (C) 2008 Matt Florell,Joe Johnson LICENSE: GPLv2 # # AST GUI lead loader from formatted file # @@ -19,11 +19,12 @@ # 61128-1149 - added postal code GMT lookup and duplicate check options # 70417-1059 - Fixed default phone_code bug # 70510-1518 - Added campaign and system duplicate check and phonecode override +# 80428-0417 - UTF8 changes # # 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.4'; -$build = '70510-1518'; +$version = '2.0.4-24'; +$build = '80428-0417'; require("dbconnect.php"); @@ -113,10 +114,28 @@ if (isset($_GET["phone_code_override"])) {$phone_code_override=$_GET["phone_co # $country_field=$_GET["country_field"]; if (!$country_field) {$country_field=$_POST["country_field"];} +############################################# +##### START SYSTEM_SETTINGS LOOKUP ##### +$stmt = "SELECT use_non_latin FROM system_settings;"; +$rslt=mysql_query($stmt, $link); +if ($DB) {echo "$stmt\n";} +$qm_conf_ct = mysql_num_rows($rslt); +$i=0; +while ($i < $qm_conf_ct) + { + $row=mysql_fetch_row($rslt); + $non_latin = $row[0]; + $i++; + } +##### END SETTINGS LOOKUP ##### +########################################### + +if ($non_latin < 1) +{ $PHP_AUTH_USER = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_USER); $PHP_AUTH_PW = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_PW); $list_id_override = ereg_replace("[^0-9]","",$list_id_override); - +} $STARTtime = date("U"); $TODAY = date("Y-m-d"); @@ -125,6 +144,7 @@ $FILE_datetime = $STARTtime; $stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 7;"; if ($DB) {echo "|$stmt|\n";} +if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $auth=$row[0]; @@ -144,6 +164,9 @@ $browser = getenv("HTTP_USER_AGENT"); else { header ("Content-type: text/html; charset=utf-8"); + header ("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1 + header ("Pragma: no-cache"); // HTTP/1.0 + if($auth>0) { $office_no=strtoupper($PHP_AUTH_USER); diff --git a/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_es/AST_CLOSERstats.php b/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_es/AST_CLOSERstats.php index 93a7bc05..64225756 100644 --- a/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_es/AST_CLOSERstats.php +++ b/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_es/AST_CLOSERstats.php @@ -10,6 +10,7 @@ # 60905-1326 - Added queue time stats # 71008-1436 - Added shift to be defined in dbconnect.php # 71025-0021 - Added status breakdown +# 71218-1155 - added end_date for multi-day reports # require("dbconnect.php"); @@ -20,7 +21,9 @@ $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"];} + elseif (isset($_POST["query_date"])) {$query_date=$_POST["query_date"];} +if (isset($_GET["end_date"])) {$end_date=$_GET["end_date"];} + elseif (isset($_POST["end_date"])) {$end_date=$_POST["end_date"];} if (isset($_GET["shift"])) {$shift=$_GET["shift"];} elseif (isset($_POST["shift"])) {$shift=$_POST["shift"];} if (isset($_GET["submit"])) {$submit=$_GET["submit"];} @@ -52,6 +55,7 @@ $NOW_TIME = date("Y-m-d H:i:s"); $STARTtime = date("U"); if (!isset($group)) {$group = '';} if (!isset($query_date)) {$query_date = $NOW_DATE;} +if (!isset($end_date)) {$end_date = $NOW_DATE;} $stmt="select group_id from vicidial_inbound_groups;"; $rslt=mysql_query($stmt, $link); @@ -82,6 +86,7 @@ echo "\n" echo "VICIDIAL: Estadísticas de VDAD Closer\n"; echo "
\n"; echo "\n"; +echo " to \n"; echo "\n"; +echo " to \n"; echo "\n"; +echo "\n"; +echo " to \n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; +echo "\n"; echo "\n"; } echo "         \n"; -echo "STOP | "; -echo "SLOW | "; -echo "GO"; +echo "STOP | "; +echo "SLOW | "; +echo "GO"; echo "       MODIFICAR | \n"; echo "SUMMARY | \n"; echo "INFORMES \n"; @@ -276,10 +305,6 @@ 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'"); -} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $DIALlev = $row[0]; @@ -309,10 +334,6 @@ 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]; @@ -322,10 +343,6 @@ 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),min(status_category_1),sum(status_category_count_1),min(status_category_2),sum(status_category_count_2),min(status_category_3),sum(status_category_count_3),min(status_category_4),sum(status_category_count_4) 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]; @@ -357,10 +374,6 @@ 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]; @@ -436,31 +449,39 @@ echo "
"; echo ""; @@ -469,34 +490,38 @@ 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
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
"; if ($adastats<2) { - echo "+ VIEW MORE SETTINGS"; + echo "+ VIEW MORE SETTINGS"; } if ($UGdisplay>0) { - echo "       PIEL USER GROUP"; + echo "       PIEL USER GROUP"; } else { - echo "       VIEW USER GROUP"; + echo "       VIEW USER GROUP"; } if ($UidORname>0) { - echo "       DEMOSTRACIÓN AGENTE ID"; + echo "       DEMOSTRACIÓN AGENTE ID"; } else { - echo "       DEMOSTRACIÓN AGENTE NAME"; + echo "       DEMOSTRACIÓN AGENTE NAME"; } if ($SERVdisplay>0) { - echo "       PIEL SERVIDOR INFO"; + echo "       PIEL SERVIDOR INFO"; } else { - echo "       DEMOSTRACIÓN SERVIDOR INFO"; + echo "       DEMOSTRACIÓN SERVIDOR INFO"; + } +if ($CALLSdisplay>0) + { + echo "       PIEL WAITING CALLS DETAIL"; + } +else + { + echo "       DEMOSTRACIÓN WAITING CALLS DETAIL"; } echo "
"; echo "\n\n"; } ################################################################################### -###### OUTBOUND CALLS +###### INBOUND/OUTBOUND CALLS ################################################################################### if ($campaign_allow_inbound > 0) { $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]); $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') );"; + $stmtB="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 IN('OUT','OUTBALANCE')) ) order by campaign_id,call_time;"; } 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;"; + $stmtB="from vicidial_auto_calls where status NOT IN('XFER') $groupSQL order by campaign_id,call_time;"; } -if ($non_latin > 0) -{ -$rslt=mysql_query("SET NAMES 'UTF8'"); -} +if ($CALLSdisplay > 0) + { + $stmtA = "SELECT status,campaign_id,phone_number,server_ip,UNIX_TIMESTAMP(call_time),call_type"; + } +else + { + $stmtA = "SELECT status"; + } + + +$k=0; +$stmt = "$stmtA $stmtB"; $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $parked_to_print = mysql_num_rows($rslt); @@ -511,7 +536,20 @@ $parked_to_print = mysql_num_rows($rslt); $row=mysql_fetch_row($rslt); if (eregi("LIVE",$row[0])) - {$out_live++;} + { + $out_live++; + + if ($CALLSdisplay > 0) + { + $CDstatus[$k] = $row[0]; + $CDcampaign_id[$k] = $row[1]; + $CDphone_number[$k] = $row[2]; + $CDserver_ip[$k] = $row[3]; + $CDcall_time[$k] = $row[4]; + $CDcall_type[$k] = $row[5]; + $k++; + } + } else { if (eregi("CLOSER",$row[0])) @@ -519,6 +557,7 @@ $parked_to_print = mysql_num_rows($rslt); else {$out_ring++;} } + $out_total++; $i++; } @@ -542,6 +581,51 @@ $parked_to_print = mysql_num_rows($rslt); } + +################################################################################### +###### CALLS WAITING +################################################################################### + +$Cecho = ''; +$Cecho .= "VICIDIAL: Calls Waiting $NOW_TIME\n"; +$Cecho .= "+--------+--------------+--------------+-----------------+---------+------------+\n"; +$Cecho .= "| STATUS | CAMPAIGN | PHONE NUMBER | SERVER_IP | DIALTIME| CALL TYPE |\n"; +$Cecho .= "+--------+--------------+--------------+-----------------+---------+------------+\n"; + +$p=0; +while($p<$k) + { + $Cstatus = sprintf("%-6s", $CDstatus[$p]); + $Ccampaign_id = sprintf("%-12s", $CDcampaign_id[$p]); + $Cphone_number = sprintf("%-12s", $CDphone_number[$p]); + $Cserver_ip = sprintf("%-15s", $CDserver_ip[$p]); + $Ccall_type = sprintf("%-10s", $CDcall_type[$p]); + + $Ccall_time_S = ($STARTtime - $CDcall_time[$p]); + $Ccall_time_M = ($Ccall_time_S / 60); + $Ccall_time_M = round($Ccall_time_M, 2); + $Ccall_time_M_int = intval("$Ccall_time_M"); + $Ccall_time_SEC = ($Ccall_time_M - $Ccall_time_M_int); + $Ccall_time_SEC = ($Ccall_time_SEC * 60); + $Ccall_time_SEC = round($Ccall_time_SEC, 0); + if ($Ccall_time_SEC < 10) {$Ccall_time_SEC = "0$Ccall_time_SEC";} + $Ccall_time_MS = "$Ccall_time_M_int:$Ccall_time_SEC"; + $Ccall_time_MS = sprintf("%7s", $Ccall_time_MS); + + $G = ''; $EG = ''; + if ($CDcall_type[$p] == 'IN') + { + $G=""; $EG=''; + } + $Cecho .= "| $G$Cstatus$EG | $G$Ccampaign_id$EG | $G$Cphone_number$EG | $G$Cserver_ip$EG | $G$Ccall_time_MS$EG | $G$Ccall_type$EG |\n"; + + $p++; + } +$Cecho .= "+--------+--------------+--------------+-----------------+---------+------------+\n\n"; + +if ($p<1) + {$Cecho='';} + ################################################################################### ###### TIME ON SYSTEM ################################################################################### @@ -552,7 +636,7 @@ $agent_paused=0; $agent_total=0; $Aecho = ''; -$Aecho .= "VICIDIAL: Agents Time On Calls Campaña: $group $NOW_TIME\n\n"; +$Aecho .= "VICIDIAL: Agents Time On Calls Campaña: $group $NOW_TIME\n"; $HDbegin = "+"; @@ -560,9 +644,9 @@ $HTbegin = "|"; $HDstation = "------------+"; $HTstation = " STATION |"; $HDuser = "--------------------+"; -$HTuser = " USER |"; +$HTuser = " USER |"; $HDusergroup = "--------------+"; -$HTusergroup = " USER GROUP |"; +$HTusergroup = " USER GROUP |"; $HDsessionid = "------------------+"; $HTsessionid = " SESSIONID |"; $HDbarge = "-------+"; @@ -574,9 +658,9 @@ $HTserver_ip = " SERVIDOR IP |"; $HDcall_server_ip = "-----------------+"; $HTcall_server_ip = " CALL SERVIDOR IP |"; $HDtime = "---------+"; -$HTtime = " MM:SS |"; +$HTtime = " MM:SS |"; $HDcampaign = "------------+"; -$HTcampaign = " CAMPAIGN |"; +$HTcampaign = " CAMPAIGN |"; if ($UGdisplay < 1) { @@ -635,10 +719,6 @@ $stmt="select extension,vicidial_live_agents.user,conf_exten,status,server_ip,UN #$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); @@ -740,7 +820,7 @@ $talking_to_print = mysql_num_rows($rslt); } if (eregi("PAUSED",$row[3])) { - if ($call_time_M_int >= 30) + if ($call_time_M_int >= 360) {$i++; continue;} else { @@ -813,6 +893,7 @@ $talking_to_print = mysql_num_rows($rslt); echo "
";
 		echo "";
+		echo "$Cecho";
 		echo "$Aecho";
 	}
 	else
diff --git a/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_es/admin.php b/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_es/admin.php
index 5fa5509c..8a6a5b04 100644
--- a/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_es/admin.php
+++ b/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_es/admin.php
@@ -680,6 +680,22 @@ if (strlen($dial_status) > 0)
 	$status = $dial_status;
 	}
 
+#############################################
+##### START SYSTEM_SETTINGS LOOKUP #####
+$stmt = "SELECT use_non_latin FROM system_settings;";
+$rslt=mysql_query($stmt, $link);
+if ($DB) {echo "$stmt\n";}
+$qm_conf_ct = mysql_num_rows($rslt);
+$i=0;
+while ($i < $qm_conf_ct)
+	{
+	$row=mysql_fetch_row($rslt);
+	$non_latin =					$row[0];
+	$i++;
+	}
+##### END SETTINGS LOOKUP #####
+###########################################
+
 ######################################################################################################
 ######################################################################################################
 #######   Form variable filtering for security and data integrity
@@ -1141,12 +1157,13 @@ $list_mix_container = ereg_replace(";","",$list_mix_container);
 # 71116-0942 - Added campaign_rank and fewest_calls as methods for agent call routing
 # 71122-1135 - Added default transfer group for campaigns and inbound groups
 # 71125-1751 - Added allowable transfer groups to campaign detail screen
-#
+# 80330-0814 - Added CBHOLD block on selecting, added user stats/status links
+# 80424-0442 - Added non_latin system_settings lookup at top to override dbconnect setting
 # 
 # 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.4-119';
-$build = '71125-1751';
+$admin_version = '2.0.4-121';
+$build = '80424-0442';
 
 $STARTtime = date("U");
 $SQLdate = date("Y-m-d H:i:s");
@@ -1169,11 +1186,28 @@ if ($force_logout)
     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);
+#############################################
+##### START SYSTEM_SETTINGS LOOKUP #####
+$stmt = "SELECT use_non_latin FROM system_settings;";
+$rslt=mysql_query($stmt, $link);
+if ($DB) {echo "$stmt\n";}
+$qm_conf_ct = mysql_num_rows($rslt);
+$i=0;
+while ($i < $qm_conf_ct)
+	{
 	$row=mysql_fetch_row($rslt);
-	$auth=$row[0];
+	$non_latin =					$row[0];
+	$i++;
+	}
+##### END SETTINGS LOOKUP #####
+###########################################
+
+$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";}
+if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");}
+$rslt=mysql_query($stmt, $link);
+$row=mysql_fetch_row($rslt);
+$auth=$row[0];
 
 if ($WeBRooTWritablE > 0)
 	{$fp = fopen ("./project_auth_entries.txt", "a");}
@@ -3861,7 +3895,7 @@ $admin_home_url_LU =	$row[0];
 
  1) { 
 	?>
-
>   > Demuestre A Usuarios     |     > Agregue A Nuevo Usuario     |     > Usuario Del Copy     |     > Búsqueda Para Un Usuario
>   > Demuestre A Usuarios     |     > Agregue A Nuevo Usuario     |     > Usuario Del Copy     |     > Búsqueda Para Un Usuario     |     > User Stats     |     > User Status
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
Franja horaria de llamada: $NWB#vicidial_campaigns-local_call_time$NWE
Buzón de Voz: $NWB#vicidial_campaigns-voicemail_ext$NWE
Escritura: \n"; echo "\n"; echo "\n"; - echo "\n"; + echo "\n"; echo "\n"; echo "\n"; echo "\n"; @@ -8837,6 +8873,7 @@ if ($ADD==31) $dial_status_d = $row[6]; $dial_status_e = $row[7]; $lead_order = $row[8]; + $web_form_address = $row[11]; $allow_closers = $row[12]; $hopper_level = $row[13]; $auto_dial_level = $row[14]; @@ -8931,12 +8968,14 @@ if ($ADD==31) $rslt=mysql_query($stmt, $link); $statuses_to_print = mysql_num_rows($rslt); $statuses_list=''; + $dial_statuses_list=''; $o=0; while ($statuses_to_print > $o) { $rowx=mysql_fetch_row($rslt); $statuses_list .= "\n"; + if ($rowx[0] != 'CBHOLD') {$dial_statuses_list .= "\n";} $statname_list["$rowx[0]"] = "$rowx[1]"; $LRstatuses_list .= "\n"; if (eregi("Y",$rowx[2])) @@ -8953,6 +8992,7 @@ if ($ADD==31) { $rowx=mysql_fetch_row($rslt); $statuses_list .= "\n"; + if ($rowx[0] != 'CBHOLD') {$dial_statuses_list .= "\n";} $statname_list["$rowx[0]"] = "$rowx[1]"; $LRstatuses_list .= "\n"; if (eregi("Y",$rowx[2])) @@ -9034,7 +9074,7 @@ if ($ADD==31) echo "\n"; echo "\n"; echo "\n"; - echo "\n"; + echo "\n"; echo "\n"; echo "\n"; @@ -9061,7 +9101,7 @@ if ($ADD==31) echo "\n"; @@ -9306,7 +9346,7 @@ if ($ADD==31) } - + ##### CAMPAIGN CUSTOM STATUSES ##### if ($SUB==22) { @@ -9386,7 +9426,7 @@ if ($ADD==31) echo "
\n"; } - + ##### CAMPAIGN HOTKEYS ##### if ($SUB==23) { echo "
PERSONALIZAR ACCEDOS DIRECTOS PARA ESTA CAMPAÑA:   $NWB#vicidial_campaign_hotkeys$NWE
\n"; @@ -9436,7 +9476,7 @@ if ($ADD==31) echo "
\n"; } - + ##### CAMPAIGN LEAD RECYCLING ##### if ($SUB==25) { echo "

PLOMO QUE RECICLA DENTRO DE ESTA CAMPAÑA:   $NWB#vicidial_lead_recycle$NWE
\n"; @@ -9483,7 +9523,7 @@ if ($ADD==31) echo "
\n"; } - + ##### CAMPAIGN AUTO-ALT-NUMBER DIALING ##### if ($SUB==26) { echo "

NÚMERO AUTO DEL ALT QUE MARCA PARA ESTA CAMPAÑA:   $NWB#vicidial_auto_alt_dial_statuses$NWE
\n"; @@ -9520,7 +9560,7 @@ if ($ADD==31) echo "
\n"; } - + ##### CAMPAIGN CÓDIGOS DE LA PAUSA ##### if ($SUB==27) { echo "

CÓDIGOS DE LA PAUSA DEL AGENTE PARA ESTA CAMPAÑA:   $NWB#vicidial_pause_codes$NWE
\n"; @@ -9650,12 +9690,13 @@ if ($ADD==34) $rslt=mysql_query($stmt, $link); $statuses_to_print = mysql_num_rows($rslt); $statuses_list=''; - + $dial_statuses_list=''; $o=0; while ($statuses_to_print > $o) { $rowx=mysql_fetch_row($rslt); $statuses_list .= "\n"; + if ($rowx[0] != 'CBHOLD') {$dial_statuses_list .= "\n";} $statname_list["$rowx[0]"] = "$rowx[1]"; $LRstatuses_list .= "\n"; if (eregi("Y",$rowx[2])) @@ -9672,6 +9713,7 @@ if ($ADD==34) { $rowx=mysql_fetch_row($rslt); $statuses_list .= "\n"; + if ($rowx[0] != 'CBHOLD') {$dial_statuses_list .= "\n";} $statname_list["$rowx[0]"] = "$rowx[1]"; $LRstatuses_list .= "\n"; if (eregi("Y",$rowx[2])) @@ -9775,7 +9817,7 @@ if ($ADD==34) echo "\n"; @@ -9947,6 +9989,7 @@ if ( ($ADD==34) or ($ADD==31) ) { if ($LOGmodify_campaigns==1) { + ##### CAMPAIGN LIST MIX SETTINGS ##### if ($SUB==29) { ##### get list_id listings for dynamic pulldown @@ -10073,7 +10116,7 @@ if ( ($ADD==34) or ($ADD==31) ) echo "\n"; echo "ADD   \n"; echo "QUITE\n"; @@ -10134,7 +10177,7 @@ if ( ($ADD==34) or ($ADD==31) ) echo "$mixlists_list"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; @@ -10962,7 +11005,7 @@ if ($ADD==3111) 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
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
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
Formulario Web: $NWB#vicidial_campaigns-web_form_address$NWE
Permitir Closers: $NWB#vicidial_campaigns-allow_closers$NWE
Permita de entrada y mezclado:$NWB#vicidial_campaigns-campaign_allow_inbound$NWE
Add A Dial Estado:   \n"; echo "     $NWB#vicidial_campaigns-dial_status$NWE
Add A Dial Estado:   \n"; echo "     $NWB#vicidial_campaigns-dial_status$NWE
Dial Estado:  
\n"; echo "\n"; echo "\n"; - echo "\n"; + echo "\n"; echo "\n"; echo "\n"; echo "\n"; diff --git a/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_es/admin_modify_lead.php b/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_es/admin_modify_lead.php index b28d98c4..94c19c68 100644 --- a/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_es/admin_modify_lead.php +++ b/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_es/admin_modify_lead.php @@ -1,13 +1,28 @@ LICENSE: GPLv2 +# AST GUI database administration modify lead in vicidial_list +# admin_modify_lead.php +# +# this is the administration lead information modifier screen, the administrator +# just needs to enter the leadID and then they can view and modify the +# information in the record for that lead +# +# Copyright (C) 2008 Matt Florell LICENSE: GPLv2 # - # CHANGES # +# 60419-1705 - Added ability to change lead callback record from USERONLY to ANYONE or USERONLY-user +# 60421-1459 - check GET/POST vars lines with isset to not trigger PHP NOTICES +# 60609-1112 - Added DNC list addition if status changed to DNC +# 60619-1539 - Added variable filtering to eliminate SQL injection attack threat +# 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 +# 70424-1128 - Added campaign-specific statuses, reformatted recordings list # 70702-1259 - Added recording location link and truncation # 70906-2132 - Added closer_log records display +# 80428-0144 - UTF8 cleanup # require("dbconnect.php"); @@ -98,35 +113,32 @@ if (isset($_GET["modify_logs"])) {$modify_logs=$_GET["modify_logs"];} $PHP_AUTH_USER = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_USER); $PHP_AUTH_PW = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_PW); - - -### AST GUI database administration modify lead in vicidial_list -### admin_modify_lead.php - -# this is the administration lead information modifier screen, the administrator just needs to enter the leadID and then they can view and modify the information in the record for that lead - -# CHANGES -# -# 60419-1705 - Added ability to change lead callback record from USERONLY to ANYONE or USERONLY-user -# 60421-1459 - check GET/POST vars lines with isset to not trigger PHP NOTICES -# 60609-1112 - Added DNC list addition if status changed to DNC -# 60619-1539 - Added variable filtering to eliminate SQL injection attack threat -# 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 -# 70424-1128 - Added campaign-specific statuses, reformatted recordings list -# - $STARTtime = date("U"); $TODAY = date("Y-m-d"); $NOW_TIME = date("Y-m-d H:i:s"); - - $stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 7 and modify_leads='1';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); +############################################# +##### START SYSTEM_SETTINGS LOOKUP ##### +$stmt = "SELECT use_non_latin FROM system_settings;"; +$rslt=mysql_query($stmt, $link); +if ($DB) {echo "$stmt\n";} +$qm_conf_ct = mysql_num_rows($rslt); +$i=0; +while ($i < $qm_conf_ct) + { $row=mysql_fetch_row($rslt); - $auth=$row[0]; + $non_latin = $row[0]; + $i++; + } +##### END SETTINGS LOOKUP ##### +########################################### + +$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";} +if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} +$rslt=mysql_query($stmt, $link); +$row=mysql_fetch_row($rslt); +$auth=$row[0]; if ($WeBRooTWritablE > 0) {$fp = fopen ("./project_auth_entries.txt", "a");} diff --git a/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_es/listloader.pl b/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_es/listloader.pl index d926368b..d58321cb 100644 --- a/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_es/listloader.pl +++ b/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_es/listloader.pl @@ -1,8 +1,8 @@ #!/usr/bin/perl -### listloader.pl version 0.4 *DBI-version* +### listloader.pl version 2.0.4 *DBI-version* ### -### Copyright (C) 2007 Matt Florell,Joe Johnson LICENSE: GPLv2 +### Copyright (C) 2008 Matt Florell,Joe Johnson LICENSE: GPLv2 ### # # @@ -18,6 +18,7 @@ # 70205-1703 - Defaulted phone_code to 1 if not populated # 70417-1059 - Fixed default phone_code bug # 70510-1518 - Added campaign and system duplicate check and phonecode override +# 80428-0144 - UTF8 cleanup # ### begin parsing run-time options ### @@ -148,6 +149,23 @@ $pulldate="$year-$mon-$mday $hour:$min:$sec"; $inSD = $pulldate0; $dsec = ( ( ($hour * 3600) + ($min * 60) ) + $sec ); +############################################# +##### START SYSTEM_SETTINGS LOOKUP ##### +$stmtA = "SELECT use_non_latin FROM system_settings;"; +$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; +$sthA->execute or die "executing: $stmtA ", $dbhA->errstr; +$sthArows=$sthA->rows; +if ($sthArows > 0) + { + @aryA = $sthA->fetchrow_array; + $non_latin = "$aryA[0]"; + } +$sthA->finish(); +##### END SETTINGS LOOKUP ##### +########################################### + + +if ($non_latin > 0) {$affected_rows = $dbhA->do("SET NAMES 'UTF8'");} ### Grab Server values from the database $stmtA = "SELECT local_gmt FROM servers where server_ip = '$server_ip';"; diff --git a/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_es/listloader_super.pl b/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_es/listloader_super.pl index 167fff5e..9f6f8d52 100644 --- a/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_es/listloader_super.pl +++ b/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_es/listloader_super.pl @@ -1,8 +1,8 @@ #!/usr/bin/perl -### listloader_super.pl version 0.4 *DBI-version* +### listloader_super.pl version 2.0.4 *DBI-version* ### -### Copyright (C) 2007 Matt Florell,Joe Johnson LICENSE: GPLv2 +### Copyright (C) 2008 Matt Florell,Joe Johnson LICENSE: GPLv2 ### # # @@ -17,6 +17,7 @@ # 70205-1703 - Defaulted phone_code to 1 if not populated # 70417-1059 - Fixed default phone_code bug # 70510-1518 - Added campaign and system duplicate check and phonecode override +# 80428-0144 - UTF8 cleanup # ### begin parsing run-time options ### @@ -149,21 +150,38 @@ $pulldate="$year-$mon-$mday $hour:$min:$sec"; $inSD = $pulldate0; $dsec = ( ( ($hour * 3600) + ($min * 60) ) + $sec ); +############################################# +##### START SYSTEM_SETTINGS LOOKUP ##### +$stmtA = "SELECT use_non_latin FROM system_settings;"; +$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; +$sthA->execute or die "executing: $stmtA ", $dbhA->errstr; +$sthArows=$sthA->rows; +if ($sthArows > 0) + { + @aryA = $sthA->fetchrow_array; + $non_latin = "$aryA[0]"; + } +$sthA->finish(); +##### END SETTINGS LOOKUP ##### +########################################### - ### Grab Server values from the database - $stmtA = "SELECT local_gmt FROM servers where server_ip = '$server_ip';"; - $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; - $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; - $sthArows=$sthA->rows; - $rec_count=0; - while ($sthArows > $rec_count) - { - @aryA = $sthA->fetchrow_array; - $DBSERVER_GMT = "$aryA[0]"; - if ($DBSERVER_GMT) {$SERVER_GMT = $DBSERVER_GMT;} - $rec_count++; - } - $sthA->finish(); + +if ($non_latin > 0) {$affected_rows = $dbhA->do("SET NAMES 'UTF8'");} + +### Grab Server values from the database +$stmtA = "SELECT local_gmt FROM servers where server_ip = '$server_ip';"; +$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; +$sthA->execute or die "executing: $stmtA ", $dbhA->errstr; +$sthArows=$sthA->rows; +$rec_count=0; +while ($sthArows > $rec_count) + { + @aryA = $sthA->fetchrow_array; + $DBSERVER_GMT = "$aryA[0]"; + if ($DBSERVER_GMT) {$SERVER_GMT = $DBSERVER_GMT;} + $rec_count++; + } +$sthA->finish(); $LOCAL_GMT_OFF = $SERVER_GMT; $LOCAL_GMT_OFF_STD = $SERVER_GMT; diff --git a/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_es/new_listloader_superL.php b/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_es/new_listloader_superL.php index 2c481864..1bffdbb9 100644 --- a/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_es/new_listloader_superL.php +++ b/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_es/new_listloader_superL.php @@ -1,7 +1,7 @@ LICENSE: GPLv2 +# Copyright (C) 2008 Matt Florell,Joe Johnson LICENSE: GPLv2 # # AST GUI lead loader from formatted file # @@ -19,11 +19,12 @@ # 61128-1149 - added postal code GMT lookup and duplicate check options # 70417-1059 - Fixed default phone_code bug # 70510-1518 - Added campaign and system duplicate check and phonecode override +# 80428-0417 - UTF8 changes # # 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.4'; -$build = '70510-1518'; +$version = '2.0.4-24'; +$build = '80428-0417'; require("dbconnect.php"); @@ -113,10 +114,28 @@ if (isset($_GET["phone_code_override"])) {$phone_code_override=$_GET["phone_co # $country_field=$_GET["country_field"]; if (!$country_field) {$country_field=$_POST["country_field"];} +############################################# +##### START SYSTEM_SETTINGS LOOKUP ##### +$stmt = "SELECT use_non_latin FROM system_settings;"; +$rslt=mysql_query($stmt, $link); +if ($DB) {echo "$stmt\n";} +$qm_conf_ct = mysql_num_rows($rslt); +$i=0; +while ($i < $qm_conf_ct) + { + $row=mysql_fetch_row($rslt); + $non_latin = $row[0]; + $i++; + } +##### END SETTINGS LOOKUP ##### +########################################### + +if ($non_latin < 1) +{ $PHP_AUTH_USER = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_USER); $PHP_AUTH_PW = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_PW); $list_id_override = ereg_replace("[^0-9]","",$list_id_override); - +} $STARTtime = date("U"); $TODAY = date("Y-m-d"); @@ -125,6 +144,7 @@ $FILE_datetime = $STARTtime; $stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 7;"; if ($DB) {echo "|$stmt|\n";} +if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $auth=$row[0]; @@ -144,6 +164,9 @@ $browser = getenv("HTTP_USER_AGENT"); else { header ("Content-type: text/html; charset=utf-8"); + header ("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1 + header ("Pragma: no-cache"); // HTTP/1.0 + if($auth>0) { $office_no=strtoupper($PHP_AUTH_USER); diff --git a/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_it/AST_CLOSERstats.php b/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_it/AST_CLOSERstats.php new file mode 100644 index 00000000..2bbc3252 --- /dev/null +++ b/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_it/AST_CLOSERstats.php @@ -0,0 +1,622 @@ + LICENSE: GPLv2 +### +# CHANGES +# +# 60619-1714 - Added variable filtering to eliminate SQL injection attack threat +# - Added required user/pass to gain access to this page +# 60905-1326 - Added queue time stats +# 71008-1436 - Added shift to be defined in dbconnect.php +# 71025-0021 - Added status breakdown +# 71218-1155 - added end_date for multi-day reports +# + +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_date"])) {$end_date=$_GET["end_date"];} + elseif (isset($_POST["end_date"])) {$end_date=$_POST["end_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["INVIA"])) {$INVIA=$_GET["INVIA"];} + elseif (isset($_POST["INVIA"])) {$INVIA=$_POST["INVIA"];} + +$PHP_AUTH_USER = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_USER); +$PHP_AUTH_PW = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_PW); + +if (strlen($shift)<2) {$shift='ALL';} + + $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 "Username/Password non validi: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n"; + exit; + } + +$NOW_DATE = date("Y-m-d"); +$NOW_TIME = date("Y-m-d H:i:s"); +$STARTtime = date("U"); +if (!isset($group)) {$group = '';} +if (!isset($query_date)) {$query_date = $NOW_DATE;} +if (!isset($end_date)) {$end_date = $NOW_DATE;} + +$stmt="select group_id from vicidial_inbound_groups;"; +$rslt=mysql_query($stmt, $link); +if ($DB) {echo "$stmt\n";} +$groups_to_print = mysql_num_rows($rslt); +$i=0; +while ($i < $groups_to_print) + { + $row=mysql_fetch_row($rslt); + $groups[$i] =$row[0]; + $i++; + } +?> + + + + + +\n"; +echo "VICIDIAL: Estadísticas de VDAD Closer\n"; +echo "
\n"; +echo "\n"; +echo " to \n"; +echo "\n"; +echo "\n"; +echo "\n"; +echo "           MODIFICA | REPORT \n"; +echo "\n\n"; + +echo "
\n\n";
+
+
+if (!$group)
+{
+echo "\n\n";
+echo "PER FAVORE SELEZIONA UN GRUPPO INBOUND E UN INTERVALLO DI TEMPO, POI PREMI INVIA\n";
+}
+
+else
+{
+if ($shift == 'AM') 
+	{
+	$time_BEGIN=$AM_shift_BEGIN;
+	$time_END=$AM_shift_END;
+	if (strlen($time_BEGIN) < 6) {$time_BEGIN = "03:45:00";}   
+	if (strlen($time_END) < 6) {$time_END = "15:15:00";}
+	}
+if ($shift == 'PM') 
+	{
+	$time_BEGIN=$PM_shift_BEGIN;
+	$time_END=$PM_shift_END;
+	if (strlen($time_BEGIN) < 6) {$time_BEGIN = "15:15:00";}
+	if (strlen($time_END) < 6) {$time_END = "23:15:00";}
+	}
+if ($shift == 'ALL') 
+	{
+	if (strlen($time_BEGIN) < 6) {$time_BEGIN = "00:00:00";}
+	if (strlen($time_END) < 6) {$time_END = "23:59:59";}
+	}
+$query_date_BEGIN = "$query_date $time_BEGIN";   
+$query_date_END = "$end_date $time_END";
+
+
+
+echo "VICIDIAL: Estadísticas de Auto-dial en CLOSER                      $NOW_TIME\n";
+
+echo "\n";
+echo "Intervallo Di Tempo: $query_date_BEGIN to $query_date_END\n\n";
+echo "---------- TOTALI\n";
+
+$stmt="select count(*),sum(length_in_sec) from vicidial_closer_log where call_date >= '$query_date_BEGIN' and call_date <= '$query_date_END' and campaign_id='" . mysql_real_escape_string($group) . "';";
+$rslt=mysql_query($stmt, $link);
+if ($DB) {echo "$stmt\n";}
+$row=mysql_fetch_row($rslt);
+
+$TOTALcalls =	sprintf("%10s", $row[0]);
+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);
+	}
+
+echo "Totale Chiamate Effettuate Per Questa Campagna: $TOTALcalls\n";
+echo "Average Call Length for all Calls:            $average_hold_seconds seconds\n";
+
+echo "\n";
+echo "---------- ABBATTUTE\n";
+
+$stmt="select count(*),sum(length_in_sec) from vicidial_closer_log where call_date >= '$query_date_BEGIN' and call_date <= '$query_date_END' and campaign_id='" . mysql_real_escape_string($group) . "' and status='DROP' and (length_in_sec <= 999 or length_in_sec is null);";
+$rslt=mysql_query($stmt, $link);
+if ($DB) {echo "$stmt\n";}
+$row=mysql_fetch_row($rslt);
+
+$DROPcalls =	sprintf("%10s", $row[0]);
+if ( ($DROPcalls < 1) or ($TOTALcalls < 1) )
+	{$DROPpercent = '0';}
+else
+	{
+	$DROPpercent = (($DROPcalls / $TOTALcalls) * 100);
+	$DROPpercent = round($DROPpercent, 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);
+	}
+
+echo "Totale Chiamate ABBATTUTE: $DROPcalls  $DROPpercent%\n";
+echo "Average hold time for DROP Calls:             $average_hold_seconds seconds\n";
+
+
+
+##############################
+#########  CALL STATUS STATS
+
+$TOTALcalls = 0;
+
+echo "\n";
+echo "---------- CALL STATUS STATS\n";
+echo "+--------+----------------------+------------+\n";
+echo "| STATUS | DESCRIZIONE          | 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 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_closer_log where call_date >= '$query_date_BEGIN' and call_date <= '$query_date_END' 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";
+
+
+
+
+echo "\n";
+echo "---------- QUEUE STATS\n";
+
+$stmt="select count(*),sum(queue_seconds) from vicidial_closer_log where call_date >= '$query_date_BEGIN' and call_date <= '$query_date_END' and campaign_id='" . mysql_real_escape_string($group) . "' and (queue_seconds > 0);";
+$rslt=mysql_query($stmt, $link);
+if ($DB) {echo "$stmt\n";}
+$row=mysql_fetch_row($rslt);
+
+$QUEUEcalls =	sprintf("%10s", $row[0]);
+if ( ($QUEUEcalls < 1) or ($TOTALcalls < 1) )
+	{$QUEUEpercent = '0';}
+else
+	{
+	$QUEUEpercent = (($QUEUEcalls / $TOTALcalls) * 100);
+	$QUEUEpercent = round($QUEUEpercent, 0);
+	}
+
+if ( ($row[0] < 1) or ($row[1] < 1) )
+	{$average_queue_seconds = '         0';}
+else
+	{
+	$average_queue_seconds = ($row[1] / $row[0]);
+	$average_queue_seconds = round($average_queue_seconds, 2);
+	$average_queue_seconds = sprintf("%10.2f", $average_queue_seconds);
+	}
+
+if ( ($TOTALcalls < 1) or ($row[1] < 1) )
+	{$average_total_queue_seconds = '         0';}
+else
+	{
+	$average_total_queue_seconds = ($row[1] / $TOTALcalls);
+	$average_total_queue_seconds = round($average_total_queue_seconds, 2);
+	$average_total_queue_seconds = sprintf("%10.2f", $average_total_queue_seconds);
+	}
+
+echo "Total Calls That entered Queue:               $QUEUEcalls  $QUEUEpercent%\n";
+echo "Average QUEUE Length for queue calls:         $average_queue_seconds seconds\n";
+echo "Average QUEUE Length across all calls:        $average_total_queue_seconds seconds\n";
+
+
+##############################
+#########  USER STATS
+
+$TOTagents=0;
+$TOTcalls=0;
+$TOTtime=0;
+$TOTavg=0;
+
+echo "\n";
+echo "---------- STATISTICHE OPERATORE\n";
+echo "+--------------------------+------------+----------+--------+\n";
+echo "| AGENT                    | CALLS      | TEMPO M   | MEDIA M |\n";
+echo "+--------------------------+------------+----------+--------+\n";
+
+$stmt="select vicidial_closer_log.user,full_name,count(*),sum(length_in_sec),avg(length_in_sec) from vicidial_closer_log,vicidial_users where call_date >= '$query_date_BEGIN' and call_date <= '$query_date_END' and  campaign_id='" . mysql_real_escape_string($group) . "' and vicidial_closer_log.user is not null and length_in_sec is not null and length_in_sec > 0 and vicidial_closer_log.user=vicidial_users.user group by vicidial_closer_log.user;";
+$rslt=mysql_query($stmt, $link);
+if ($DB) {echo "$stmt\n";}
+$users_to_print = mysql_num_rows($rslt);
+$i=0;
+while ($i < $users_to_print)
+	{
+	$row=mysql_fetch_row($rslt);
+
+	$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);}
+	$USERcalls =	sprintf("%10s", $row[2]);
+	$USERtotTALK =	$row[3];
+	$USERavgTALK =	$row[4];
+
+	$USERtotTALK_M = ($USERtotTALK / 60);
+	$USERtotTALK_M = round($USERtotTALK_M, 2);
+	$USERtotTALK_M_int = intval("$USERtotTALK_M");
+	$USERtotTALK_S = ($USERtotTALK_M - $USERtotTALK_M_int);
+	$USERtotTALK_S = ($USERtotTALK_S * 60);
+	$USERtotTALK_S = round($USERtotTALK_S, 0);
+	if ($USERtotTALK_S < 10) {$USERtotTALK_S = "0$USERtotTALK_S";}
+	$USERtotTALK_MS = "$USERtotTALK_M_int:$USERtotTALK_S";
+	$USERtotTALK_MS =		sprintf("%8s", $USERtotTALK_MS);
+
+	$USERavgTALK_M = ($USERavgTALK / 60);
+	$USERavgTALK_M = round($USERavgTALK_M, 2);
+	$USERavgTALK_M_int = intval("$USERavgTALK_M");
+	$USERavgTALK_S = ($USERavgTALK_M - $USERavgTALK_M_int);
+	$USERavgTALK_S = ($USERavgTALK_S * 60);
+	$USERavgTALK_S = round($USERavgTALK_S, 0);
+	if ($USERavgTALK_S < 10) {$USERavgTALK_S = "0$USERavgTALK_S";}
+	$USERavgTALK_MS = "$USERavgTALK_M_int:$USERavgTALK_S";
+	$USERavgTALK_MS =		sprintf("%6s", $USERavgTALK_MS);
+
+	echo "| $user - $full_name | $USERcalls | $USERtotTALK_MS | $USERavgTALK_MS |\n";
+
+	$i++;
+	}
+
+if (!$TOTcalls) {$TOTcalls = 1;}
+$TOTavg = ($TOTtime / $TOTcalls);
+$TOTavg = round($TOTavg, 0);
+$TOTavg_M = ($TOTavg / 60);
+$TOTavg_M = round($TOTavg_M, 2);
+$TOTavg_M_int = intval("$TOTavg_M");
+$TOTavg_S = ($TOTavg_M - $TOTavg_M_int);
+$TOTavg_S = ($TOTavg_S * 60);
+$TOTavg_S = round($TOTavg_S, 0);
+if ($TOTavg_S < 10) {$TOTavg_S = "0$TOTavg_S";}
+$TOTavg_MS = "$TOTavg_M_int:$TOTavg_S";
+$TOTavg =		sprintf("%6s", $TOTavg_MS);
+
+$TOTtime_M = ($TOTtime / 60);
+$TOTtime_M = round($TOTtime_M, 2);
+$TOTtime_M_int = intval("$TOTtime_M");
+$TOTtime_S = ($TOTtime_M - $TOTtime_M_int);
+$TOTtime_S = ($TOTtime_S * 60);
+$TOTtime_S = round($TOTtime_S, 0);
+if ($TOTtime_S < 10) {$TOTtime_S = "0$TOTtime_S";}
+$TOTtime_MS = "$TOTtime_M_int:$TOTtime_S";
+$TOTtime =		sprintf("%6s", $TOTtime_MS);
+
+$TOTagents =		sprintf("%10s", $i);
+$TOTcalls =			sprintf("%10s", $TOTcalls);
+$TOTtime =			sprintf("%8s", $TOTtime);
+$TOTavg =			sprintf("%6s", $TOTavg);
+
+echo "+--------------------------+------------+----------+--------+\n";
+echo "| TOTALE Operatori: $TOTagents | $TOTcalls | $TOTtime | $TOTavg |\n";
+echo "+--------------------------+------------+----------+--------+\n";
+
+
+##############################
+#########  TIME STATS
+
+echo "\n";
+echo "---------- STATISTICHE TEMPO\n";
+
+echo "\n";
+
+$hi_hour_count=0;
+$last_full_record=0;
+$i=0;
+$h=0;
+while ($i <= 96)
+	{
+	$stmt="select count(*) from vicidial_closer_log where call_date >= '$query_date $h:00:00' and call_date <= '$query_date $h:14:59' and campaign_id='" . mysql_real_escape_string($group) . "';";
+	$rslt=mysql_query($stmt, $link);
+	if ($DB) {echo "$stmt\n";}
+	$row=mysql_fetch_row($rslt);
+	$hour_count[$i] = $row[0];
+	if ($hour_count[$i] > $hi_hour_count) {$hi_hour_count = $hour_count[$i];}
+	if ($hour_count[$i] > 0) {$last_full_record = $i;}
+	$stmt="select count(*) from vicidial_closer_log where call_date >= '$query_date $h:00:00' and call_date <= '$query_date $h:14:59' and campaign_id='" . mysql_real_escape_string($group) . "' and status='DROP';";
+	$rslt=mysql_query($stmt, $link);
+	if ($DB) {echo "$stmt\n";}
+	$row=mysql_fetch_row($rslt);
+	$drop_count[$i] = $row[0];
+	$i++;
+
+
+	$stmt="select count(*) from vicidial_closer_log where call_date >= '$query_date $h:15:00' and call_date <= '$query_date $h:29:59' and campaign_id='$group';";
+	$rslt=mysql_query($stmt, $link);
+	if ($DB) {echo "$stmt\n";}
+	$row=mysql_fetch_row($rslt);
+	$hour_count[$i] = $row[0];
+	if ($hour_count[$i] > $hi_hour_count) {$hi_hour_count = $hour_count[$i];}
+	if ($hour_count[$i] > 0) {$last_full_record = $i;}
+	$stmt="select count(*) from vicidial_closer_log where call_date >= '$query_date $h:15:00' and call_date <= '$query_date $h:29:59' and campaign_id='" . mysql_real_escape_string($group) . "' and status='DROP';";
+	$rslt=mysql_query($stmt, $link);
+	if ($DB) {echo "$stmt\n";}
+	$row=mysql_fetch_row($rslt);
+	$drop_count[$i] = $row[0];
+	$i++;
+
+	$stmt="select count(*) from vicidial_closer_log where call_date >= '$query_date $h:30:00' and call_date <= '$query_date $h:44:59' and campaign_id='" . mysql_real_escape_string($group) . "';";
+	$rslt=mysql_query($stmt, $link);
+	if ($DB) {echo "$stmt\n";}
+	$row=mysql_fetch_row($rslt);
+	$hour_count[$i] = $row[0];
+	if ($hour_count[$i] > $hi_hour_count) {$hi_hour_count = $hour_count[$i];}
+	if ($hour_count[$i] > 0) {$last_full_record = $i;}
+	$stmt="select count(*) from vicidial_closer_log where call_date >= '$query_date $h:30:00' and call_date <= '$query_date $h:44:59' and campaign_id='" . mysql_real_escape_string($group) . "' and status='DROP';";
+	$rslt=mysql_query($stmt, $link);
+	if ($DB) {echo "$stmt\n";}
+	$row=mysql_fetch_row($rslt);
+	$drop_count[$i] = $row[0];
+	$i++;
+
+	$stmt="select count(*) from vicidial_closer_log where call_date >= '$query_date $h:45:00' and call_date <= '$query_date $h:59:59' and campaign_id='" . mysql_real_escape_string($group) . "';";
+	$rslt=mysql_query($stmt, $link);
+	if ($DB) {echo "$stmt\n";}
+	$row=mysql_fetch_row($rslt);
+	$hour_count[$i] = $row[0];
+	if ($hour_count[$i] > $hi_hour_count) {$hi_hour_count = $hour_count[$i];}
+	if ($hour_count[$i] > 0) {$last_full_record = $i;}
+	$stmt="select count(*) from vicidial_closer_log where call_date >= '$query_date $h:45:00' and call_date <= '$query_date $h:59:59' and campaign_id='" . mysql_real_escape_string($group) . "' and status='DROP';";
+	$rslt=mysql_query($stmt, $link);
+	if ($DB) {echo "$stmt\n";}
+	$row=mysql_fetch_row($rslt);
+	$drop_count[$i] = $row[0];
+	$i++;
+	$h++;
+	}
+
+if ($hi_hour_count < 1)
+	{$hour_multiplier = 0;}
+else
+	{
+	$hour_multiplier = (100 / $hi_hour_count);
+	#$hour_multiplier = round($hour_multiplier, 0);
+	}
+
+echo "\n";
+echo "GRAFICO AD INCREMENTO DI 15 MINUTI DEL TOTALE DELLE CHIAMATE EFFETTUATE PER QUESTA CAMPAGNA\n";
+
+$k=1;
+$Mk=0;
+$call_scale = '0';
+while ($k <= 102) 
+	{
+	if ($Mk >= 5) 
+		{
+		$Mk=0;
+		if ( ($k < 1) or ($hour_multiplier <= 0) )
+			{$scale_num = 100;}
+		else
+			{
+			$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\n";
+
+
+
+
+
+$ENDtime = date("U");
+$RUNtime = ($ENDtime - $STARTtime);
+echo "\nRun Time: $RUNtime seconds\n";
+}
+
+
+
+?>
+
+ + \ No newline at end of file diff --git a/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_it/AST_VDADstats.php b/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_it/AST_VDADstats.php new file mode 100644 index 00000000..0550bb86 --- /dev/null +++ b/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_it/AST_VDADstats.php @@ -0,0 +1,652 @@ + LICENSE: GPLv2 +### +# CHANGES +# +# 60619-1718 - Added variable filtering to eliminate SQL injection attack threat +# - Added required user/pass to gain access to this page +# 61215-1139 - Added drop percentage of answered and round-2 decimal +# 71008-1436 - Added shift to be defined in dbconnect.php +# 71218-1155 - added end_date for multi-day reports +# + +header ("Content-type: text/html; charset=utf-8"); + +require("dbconnect.php"); + +$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; +$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; +$PHP_SELF=$_SERVER['PHP_SELF']; +if (isset($_GET["group"])) {$group=$_GET["group"];} + elseif (isset($_POST["group"])) {$group=$_POST["group"];} +if (isset($_GET["query_date"])) {$query_date=$_GET["query_date"];} + elseif (isset($_POST["query_date"])) {$query_date=$_POST["query_date"];} +if (isset($_GET["end_date"])) {$end_date=$_GET["end_date"];} + elseif (isset($_POST["end_date"])) {$end_date=$_POST["end_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["INVIA"])) {$INVIA=$_GET["INVIA"];} + elseif (isset($_POST["INVIA"])) {$INVIA=$_POST["INVIA"];} + +$PHP_AUTH_USER = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_USER); +$PHP_AUTH_PW = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_PW); + +if (strlen($shift)<2) {$shift='ALL';} + + $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 "Username/Password non validi: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n"; + exit; + } + +$NOW_DATE = date("Y-m-d"); +$NOW_TIME = date("Y-m-d H:i:s"); +$STARTtime = date("U"); +if (!isset($group)) {$group = '';} +if (!isset($query_date)) {$query_date = $NOW_DATE;} +if (!isset($end_date)) {$end_date = $NOW_DATE;} + +$stmt="select campaign_id from vicidial_campaigns;"; +$rslt=mysql_query($stmt, $link); +if ($DB) {echo "$stmt\n";} +$groups_to_print = mysql_num_rows($rslt); +$i=0; +while ($i < $groups_to_print) + { + $row=mysql_fetch_row($rslt); + $groups[$i] =$row[0]; + $i++; + } +?> + + + + + +\n"; +echo "VICIDIAL: VDAD Stats\n"; +echo "
\n"; +echo "\n"; +echo " to \n"; +echo "\n"; +echo "\n"; +echo "\n"; +echo "           MODIFICA | REPORT \n"; +echo "\n\n"; + +echo "
\n\n";
+
+
+if (!$group)
+{
+echo "\n\n";
+echo "PER FAVORE SELEZIONA UNA CAMPAGNA E UNA DATA, POI PREMI INVIA\n";
+}
+
+else
+{
+if ($shift == 'AM') 
+	{
+	$time_BEGIN=$AM_shift_BEGIN;
+	$time_END=$AM_shift_END;
+	if (strlen($time_BEGIN) < 6) {$time_BEGIN = "03:45:00";}   
+	if (strlen($time_END) < 6) {$time_END = "15:15:00";}
+	}
+if ($shift == 'PM') 
+	{
+	$time_BEGIN=$PM_shift_BEGIN;
+	$time_END=$PM_shift_END;
+	if (strlen($time_BEGIN) < 6) {$time_BEGIN = "15:15:00";}
+	if (strlen($time_END) < 6) {$time_END = "23:15:00";}
+	}
+if ($shift == 'ALL') 
+	{
+	if (strlen($time_BEGIN) < 6) {$time_BEGIN = "00:00:00";}
+	if (strlen($time_END) < 6) {$time_END = "23:59:59";}
+	}
+$query_date_BEGIN = "$query_date $time_BEGIN";   
+$query_date_END = "$end_date $time_END";
+
+
+
+echo "VICIDIAL: Statistiche Auto-Dial                             $NOW_TIME\n";
+
+echo "\n";
+echo "Intervallo Di Tempo: $query_date_BEGIN to $query_date_END\n\n";
+echo "---------- TOTALI\n";
+
+$stmt="select count(*),sum(length_in_sec) from vicidial_log where call_date >= '$query_date_BEGIN' and call_date <= '$query_date_END' and campaign_id='" . mysql_real_escape_string($group) . "';";
+$rslt=mysql_query($stmt, $link);
+if ($DB) {echo "$stmt\n";}
+$row=mysql_fetch_row($rslt);
+
+$TOTALcalls =	sprintf("%10s", $row[0]);
+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, 2);
+	$average_hold_seconds =	sprintf("%10s", $average_hold_seconds);
+	}
+echo "Totale Chiamate Effettuate Per Questa Campagna: $TOTALcalls\n";
+echo "Durata Media per Tutte Le Chiamate In Secondi: $average_hold_seconds\n";
+
+echo "\n";
+echo "---------- ABBATTUTE\n";
+
+$stmt="select count(*),sum(length_in_sec) from vicidial_log where call_date >= '$query_date_BEGIN' and call_date <= '$query_date_END' and campaign_id='" . mysql_real_escape_string($group) . "' and status='DROP' and (length_in_sec <= 60 or length_in_sec is null);";
+$rslt=mysql_query($stmt, $link);
+if ($DB) {echo "$stmt\n";}
+$row=mysql_fetch_row($rslt);
+$DROPcalls =	sprintf("%10s", $row[0]);
+$DROPcallsRAW =	$row[0];
+$DROPseconds =	$row[1];
+
+$stmt="select count(*) from vicidial_log where call_date >= '$query_date_BEGIN' and call_date <= '$query_date_END' and campaign_id='" . mysql_real_escape_string($group) . "' and status NOT IN('NA','B');";
+$rslt=mysql_query($stmt, $link);
+if ($DB) {echo "$stmt\n";}
+$row=mysql_fetch_row($rslt);
+$ANSWERcalls =	$row[0];
+
+if ( ($DROPcalls < 1) or ($TOTALcalls < 1) )
+	{$DROPpercent = '0';}
+else
+	{
+	$DROPpercent = (($DROPcallsRAW / $TOTALcalls) * 100);
+	$DROPpercent = round($DROPpercent, 2);
+	}
+
+if ( ($DROPcalls < 1) or ($ANSWERcalls < 1) )
+	{$DROPANSWERpercent = '0';}
+else
+	{
+	$DROPANSWERpercent = (($DROPcallsRAW / $ANSWERcalls) * 100);
+	$DROPANSWERpercent = round($DROPANSWERpercent, 2);
+	}
+
+if ( ($DROPseconds < 1) or ($DROPcallsRAW < 1) )
+	{$average_hold_seconds = '         0';}
+else
+	{
+	$average_hold_seconds = ($DROPseconds / $DROPcallsRAW);
+	$average_hold_seconds = round($average_hold_seconds, 2);
+	$average_hold_seconds =	sprintf("%10s", $average_hold_seconds);
+	}
+
+echo "Totale Chiamate ABBATTUTE: $DROPcalls  $DROPpercent%\n";
+echo "Percentuale Di Chiamate ABBATTUTE Su Chiamate Con Risposta:   $DROPcalls / $ANSWERcalls  $DROPANSWERpercent%\n";
+echo "Durata Media Chiamate ABBATTUTE in secondi:    $average_hold_seconds\n";
+
+echo "\n";
+echo "---------- NESSUNA RISPOSTA AUTO-DIAL\n";
+
+$stmt="select count(*),sum(length_in_sec) from vicidial_log where call_date >= '$query_date_BEGIN' and call_date <= '$query_date_END' and campaign_id='" . mysql_real_escape_string($group) . "' and status IN('NA','B') and (length_in_sec <= 60 or length_in_sec is null);";
+$rslt=mysql_query($stmt, $link);
+if ($DB) {echo "$stmt\n";}
+$row=mysql_fetch_row($rslt);
+
+$NAcalls =	sprintf("%10s", $row[0]);
+if ( ($NAcalls < 1) or ($TOTALcalls < 1) )
+	{$NApercent = '0';}
+else
+	{
+	$NApercent = (($NAcalls / $TOTALcalls) * 100);
+	$NApercent = round($NApercent, 2);
+	}
+
+if ( ($row[0] < 1) or ($row[1] < 1) )
+	{$average_na_seconds = '         0';}
+else
+	{
+	$average_na_seconds = ($row[1] / $row[0]);
+	$average_na_seconds = round($average_na_seconds, 2);
+	$average_na_seconds =	sprintf("%10s", $average_na_seconds);
+	}
+
+echo "Totale Chiamate Senza Risposta - occupato, disconnesso, fuori posto...: $NAcalls  $NApercent%\n";
+echo "Durata Media Chiamate Senza Risposta in secondi:       $average_na_seconds\n";
+
+
+##############################
+#########  CALL STATUS STATS
+
+$TOTALcalls = 0;
+
+echo "\n";
+echo "---------- CALL STATUS STATS\n";
+echo "+--------+----------------------+------------+\n";
+echo "| STATUS | DESCRIZIONE          | 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_BEGIN' and call_date <= '$query_date_END' 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
+
+$TOTagents=0;
+$TOTcalls=0;
+$TOTtime=0;
+$TOTavg=0;
+
+echo "\n";
+echo "---------- STATISTICHE OPERATORE\n";
+echo "+--------------------------+------------+----------+--------+\n";
+echo "| AGENT                    | CALLS      | TEMPO M   | MEDIA 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_BEGIN' and call_date <= '$query_date_END' 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 > 0 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);
+$i=0;
+while ($i < $users_to_print)
+	{
+	$row=mysql_fetch_row($rslt);
+
+	$TOTcalls = ($TOTcalls + $row[2]);
+	$TOTtime = ($TOTtime + $row[3]);
+
+	$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];
+
+	$USERtotTALK_M = ($USERtotTALK / 60);
+	$USERtotTALK_M = round($USERtotTALK_M, 2);
+	$USERtotTALK_M_int = intval("$USERtotTALK_M");
+	$USERtotTALK_S = ($USERtotTALK_M - $USERtotTALK_M_int);
+	$USERtotTALK_S = ($USERtotTALK_S * 60);
+	$USERtotTALK_S = round($USERtotTALK_S, 0);
+	if ($USERtotTALK_S < 10) {$USERtotTALK_S = "0$USERtotTALK_S";}
+	$USERtotTALK_MS = "$USERtotTALK_M_int:$USERtotTALK_S";
+	$USERtotTALK_MS =		sprintf("%6s", $USERtotTALK_MS);
+
+	$USERavgTALK_M = ($USERavgTALK / 60);
+	$USERavgTALK_M = round($USERavgTALK_M, 2);
+	$USERavgTALK_M_int = intval("$USERavgTALK_M");
+	$USERavgTALK_S = ($USERavgTALK_M - $USERavgTALK_M_int);
+	$USERavgTALK_S = ($USERavgTALK_S * 60);
+	$USERavgTALK_S = round($USERavgTALK_S, 0);
+	if ($USERavgTALK_S < 10) {$USERavgTALK_S = "0$USERavgTALK_S";}
+	$USERavgTALK_MS = "$USERavgTALK_M_int:$USERavgTALK_S";
+	$USERavgTALK_MS =		sprintf("%6s", $USERavgTALK_MS);
+
+	echo "| $user - $full_name | $USERcalls |   $USERtotTALK_MS | $USERavgTALK_MS |\n";
+
+	$i++;
+	}
+
+if (!$TOTcalls) {$TOTcalls = 1;}
+$TOTavg = ($TOTtime / $TOTcalls);
+$TOTavg = round($TOTavg, 0);
+$TOTavg_M = ($TOTavg / 60);
+$TOTavg_M = round($TOTavg_M, 2);
+$TOTavg_M_int = intval("$TOTavg_M");
+$TOTavg_S = ($TOTavg_M - $TOTavg_M_int);
+$TOTavg_S = ($TOTavg_S * 60);
+$TOTavg_S = round($TOTavg_S, 0);
+if ($TOTavg_S < 10) {$TOTavg_S = "0$TOTavg_S";}
+$TOTavg_MS = "$TOTavg_M_int:$TOTavg_S";
+$TOTavg =		sprintf("%6s", $TOTavg_MS);
+
+$TOTtime_M = ($TOTtime / 60);
+$TOTtime_M = round($TOTtime_M, 2);
+$TOTtime_M_int = intval("$TOTtime_M");
+$TOTtime_S = ($TOTtime_M - $TOTtime_M_int);
+$TOTtime_S = ($TOTtime_S * 60);
+$TOTtime_S = round($TOTtime_S, 0);
+if ($TOTtime_S < 10) {$TOTtime_S = "0$TOTtime_S";}
+$TOTtime_MS = "$TOTtime_M_int:$TOTtime_S";
+$TOTtime =		sprintf("%6s", $TOTtime_MS);
+
+$TOTagents =		sprintf("%10s", $i);
+$TOTcalls =			sprintf("%10s", $TOTcalls);
+$TOTtime =			sprintf("%8s", $TOTtime);
+$TOTavg =			sprintf("%6s", $TOTavg);
+
+$stmt="select avg(wait_sec) from vicidial_agent_log where event_time >= '$query_date_BEGIN' and event_time <= '$query_date_END' and campaign_id='" . mysql_real_escape_string($group) . "';";
+$rslt=mysql_query($stmt, $link);
+if ($DB) {echo "$stmt\n";}
+$row=mysql_fetch_row($rslt);
+
+$AVGwait = $row[0];
+$AVGwait_M = ($AVGwait / 60);
+$AVGwait_M = round($AVGwait_M, 2);
+$AVGwait_M_int = intval("$AVGwait_M");
+$AVGwait_S = ($AVGwait_M - $AVGwait_M_int);
+$AVGwait_S = ($AVGwait_S * 60);
+$AVGwait_S = round($AVGwait_S, 0);
+if ($AVGwait_S < 10) {$AVGwait_S = "0$AVGwait_S";}
+$AVGwait_MS = "$AVGwait_M_int:$AVGwait_S";
+$AVGwait =		sprintf("%6s", $AVGwait_MS);
+
+echo "+--------------------------+------------+----------+--------+\n";
+echo "| TOTALE Operatori: $TOTagents | $TOTcalls | $TOTtime | $TOTavg |\n";
+echo "+--------------------------+------------+----------+--------+\n";
+echo "| Tempo Medio di Attesa Tra Due Chiamate                    $AVGwait |\n";
+echo "+-----------------------------------------------------------+\n";
+
+##############################
+#########  TIME STATS
+
+echo "\n";
+echo "---------- STATISTICHE TEMPO\n";
+
+echo "\n";
+
+$hi_hour_count=0;
+$last_full_record=0;
+$i=0;
+$h=0;
+while ($i <= 96)
+	{
+	$stmt="select count(*) from vicidial_log where call_date >= '$query_date $h:00:00' and call_date <= '$query_date $h:14:59' and campaign_id='" . mysql_real_escape_string($group) . "';";
+	$rslt=mysql_query($stmt, $link);
+	if ($DB) {echo "$stmt\n";}
+	$row=mysql_fetch_row($rslt);
+	$hour_count[$i] = $row[0];
+	if ($hour_count[$i] > $hi_hour_count) {$hi_hour_count = $hour_count[$i];}
+	if ($hour_count[$i] > 0) {$last_full_record = $i;}
+	$stmt="select count(*) from vicidial_log where call_date >= '$query_date $h:00:00' and call_date <= '$query_date $h:14:59' and campaign_id='" . mysql_real_escape_string($group) . "' and status='DROP';";
+	$rslt=mysql_query($stmt, $link);
+	if ($DB) {echo "$stmt\n";}
+	$row=mysql_fetch_row($rslt);
+	$drop_count[$i] = $row[0];
+	$i++;
+
+
+	$stmt="select count(*) from vicidial_log where call_date >= '$query_date $h:15:00' and call_date <= '$query_date $h:29:59' and campaign_id='" . mysql_real_escape_string($group) . "';";
+	$rslt=mysql_query($stmt, $link);
+	if ($DB) {echo "$stmt\n";}
+	$row=mysql_fetch_row($rslt);
+	$hour_count[$i] = $row[0];
+	if ($hour_count[$i] > $hi_hour_count) {$hi_hour_count = $hour_count[$i];}
+	if ($hour_count[$i] > 0) {$last_full_record = $i;}
+	$stmt="select count(*) from vicidial_log where call_date >= '$query_date $h:15:00' and call_date <= '$query_date $h:29:59' and campaign_id='" . mysql_real_escape_string($group) . "' and status='DROP';";
+	$rslt=mysql_query($stmt, $link);
+	if ($DB) {echo "$stmt\n";}
+	$row=mysql_fetch_row($rslt);
+	$drop_count[$i] = $row[0];
+	$i++;
+
+	$stmt="select count(*) from vicidial_log where call_date >= '$query_date $h:30:00' and call_date <= '$query_date $h:44:59' and campaign_id='" . mysql_real_escape_string($group) . "';";
+	$rslt=mysql_query($stmt, $link);
+	if ($DB) {echo "$stmt\n";}
+	$row=mysql_fetch_row($rslt);
+	$hour_count[$i] = $row[0];
+	if ($hour_count[$i] > $hi_hour_count) {$hi_hour_count = $hour_count[$i];}
+	if ($hour_count[$i] > 0) {$last_full_record = $i;}
+	$stmt="select count(*) from vicidial_log where call_date >= '$query_date $h:30:00' and call_date <= '$query_date $h:44:59' and campaign_id='" . mysql_real_escape_string($group) . "' and status='DROP';";
+	$rslt=mysql_query($stmt, $link);
+	if ($DB) {echo "$stmt\n";}
+	$row=mysql_fetch_row($rslt);
+	$drop_count[$i] = $row[0];
+	$i++;
+
+	$stmt="select count(*) from vicidial_log where call_date >= '$query_date $h:45:00' and call_date <= '$query_date $h:59:59' and campaign_id='" . mysql_real_escape_string($group) . "';";
+	$rslt=mysql_query($stmt, $link);
+	if ($DB) {echo "$stmt\n";}
+	$row=mysql_fetch_row($rslt);
+	$hour_count[$i] = $row[0];
+	if ($hour_count[$i] > $hi_hour_count) {$hi_hour_count = $hour_count[$i];}
+	if ($hour_count[$i] > 0) {$last_full_record = $i;}
+	$stmt="select count(*) from vicidial_log where call_date >= '$query_date $h:45:00' and call_date <= '$query_date $h:59:59' and campaign_id='" . mysql_real_escape_string($group) . "' and status='DROP';";
+	$rslt=mysql_query($stmt, $link);
+	if ($DB) {echo "$stmt\n";}
+	$row=mysql_fetch_row($rslt);
+	$drop_count[$i] = $row[0];
+	$i++;
+	$h++;
+	}
+
+if ($hi_hour_count < 1)
+	{$hour_multiplier = 0;}
+else
+	{
+	$hour_multiplier = (100 / $hi_hour_count);
+	#$hour_multiplier = round($hour_multiplier, 0);
+	}
+
+echo "\n";
+echo "GRAFICO AD INCREMENTO DI 15 MINUTI DEL TOTALE DELLE CHIAMATE EFFETTUATE PER QUESTA CAMPAGNA\n";
+
+$k=1;
+$Mk=0;
+$call_scale = '0';
+while ($k <= 102) 
+	{
+	if ($Mk >= 5) 
+		{
+		$Mk=0;
+		if ( ($k < 1) or ($hour_multiplier <= 0) )
+			{$scale_num = 100;}
+		else
+			{
+			$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";
+
+
+
+
+
+
+$ENDtime = date("U");
+$RUNtime = ($ENDtime - $STARTtime);
+echo "\nRun Time: $RUNtime seconds\n";
+
+}
+
+
+
+?>
+
+ + \ No newline at end of file diff --git a/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_it/AST_VICIDIAL_hopperlist.php b/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_it/AST_VICIDIAL_hopperlist.php new file mode 100644 index 00000000..a8931c89 --- /dev/null +++ b/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_it/AST_VICIDIAL_hopperlist.php @@ -0,0 +1,169 @@ + LICENSE: GPLv2 +### +# CHANGES +# +# 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 +# 71029-0852 - Added list_id to the output +# 71030-2118 - Added priority to display +# + +require("dbconnect.php"); + +$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; +$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; +$PHP_SELF=$_SERVER['PHP_SELF']; +if (isset($_GET["group"])) {$group=$_GET["group"];} + elseif (isset($_POST["group"])) {$group=$_POST["group"];} +if (isset($_GET["submit"])) {$submit=$_GET["submit"];} + elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];} +if (isset($_GET["INVIA"])) {$INVIA=$_GET["INVIA"];} + elseif (isset($_POST["INVIA"])) {$INVIA=$_POST["INVIA"];} + +$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' and modify_campaigns='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 "Username/Password non validi: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n"; + exit; + } + +$NOW_DATE = date("Y-m-d"); +$NOW_TIME = date("Y-m-d H:i:s"); +$STARTtime = date("U"); +if (!isset($group)) {$group = '';} +if (!isset($query_date)) {$query_date = $NOW_DATE;} +if (!isset($server_ip)) {$server_ip = '10.10.10.15';} + +$stmt="select campaign_id,campaign_name from vicidial_campaigns order by campaign_id;"; +$rslt=mysql_query($stmt, $link); +if ($DB) {echo "$stmt\n";} +$campaigns_to_print = mysql_num_rows($rslt); +$i=0; +while ($i < $campaigns_to_print) + { + $row=mysql_fetch_row($rslt); + $campaign_id[$i] =$row[0]; + $campaign_name[$i] =$row[1]; + $i++; + } +?> + + + + + +\n"; +echo "VICIDIAL: Coda Chiamate\n"; +echo "
\n"; +#echo "\n"; +#echo "\n"; +echo "\n"; +echo "\n"; +echo "           MODIFICA \n"; +echo "\n\n"; + +echo "
\n\n";
+
+
+if (!$group)
+{
+echo "\n\n";
+echo "PER FAVORE SELEZIONA UNA CAMPAGNA E PREMI INVIA\n";
+}
+
+else
+{
+
+
+echo "VICIDIAL: Coda Contatti Da Chiamare In Tempo Reale                      $NOW_TIME\n";
+
+echo "\n";
+echo "---------- TOTALI\n";
+
+$stmt="select count(*) from vicidial_hopper where campaign_id='" . mysql_real_escape_string($group) . "';";
+$rslt=mysql_query($stmt, $link);
+if ($DB) {echo "$stmt\n";}
+$row=mysql_fetch_row($rslt);
+
+$TOTALcalls =	sprintf("%10s", $row[0]);
+
+echo "Totale Contatti Nella Coda Chiamate In Questo Istante:       $TOTALcalls\n";
+
+
+##############################
+#########  LEAD STATS
+
+echo "\n";
+echo "---------- LEADS IN HOPPER\n";
+echo "+------+--------+-----------+------------+------------+-------+--------+-------+--------+-------+\n";
+echo "|ORDER |PRIORITY| LEAD ID   | ID LISTA    | 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,alt_dial,vicidial_hopper.list_id,vicidial_hopper.priority 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 priority desc,hopper_id limit 2000;";
+$rslt=mysql_query($stmt, $link);
+if ($DB) {echo "$stmt\n";}
+$users_to_print = mysql_num_rows($rslt);
+$i=0;
+while ($i < $users_to_print)
+	{
+	$row=mysql_fetch_row($rslt);
+
+	$FMT_i =		sprintf("%-4s", $i);
+	$lead_id =		sprintf("%-9s", $row[0]);
+	$phone_number =	sprintf("%-10s", $row[1]);
+	$state =		sprintf("%-5s", $row[2]);
+	$status =		sprintf("%-6s", $row[3]);
+	$count =		sprintf("%-5s", $row[4]);
+	$gmt =			sprintf("%-6s", $row[5]);
+	$hopper_id =	sprintf("%-6s", $row[6]);
+	$alt_dial =		sprintf("%-5s", $row[7]);
+	$list_id =		sprintf("%-10s", $row[8]);
+	$priority =		sprintf("%-6s", $row[9]);
+
+if ($DB) {echo "| $FMT_i | $priority | $lead_id | $list_id | $phone_number | $state | $status | $count | $gmt | $hopper_id |\n";}
+else {echo "| $FMT_i | $priority | $lead_id | $list_id | $phone_number | $state | $status | $count | $gmt | $alt_dial |\n";}
+
+	$i++;
+	}
+
+echo "+------+--------+-----------+------------+------------+-------+--------+-------+--------+-------+\n";
+
+
+}
+
+
+
+?>
+
+ + \ No newline at end of file diff --git a/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_it/AST_admin_log_display.php b/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_it/AST_admin_log_display.php new file mode 100644 index 00000000..4de478e1 --- /dev/null +++ b/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_it/AST_admin_log_display.php @@ -0,0 +1,118 @@ + LICENSE: GPLv2 +### + +require("dbconnect.php"); + +$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; +$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; +$PHP_SELF=$_SERVER['PHP_SELF']; +if (isset($_GET["query_date"])) {$query_date=$_GET["query_date"];} + elseif (isset($_POST["query_date"])) {$query_date=$_POST["query_date"];} +if (isset($_GET["submit"])) {$submit=$_GET["submit"];} + elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];} +if (isset($_GET["INVIA"])) {$INVIA=$_GET["INVIA"];} + elseif (isset($_POST["INVIA"])) {$INVIA=$_POST["INVIA"];} + +$PHP_AUTH_USER = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_USER); +$PHP_AUTH_PW = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_PW); +$query_date = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$query_date); + +# AST GUI database administration +# AST_admin_log_display.php +# +# CHANGES +# 50325-0932 - First build +# 51123-1443 - removed globals=on requirement +# 60421-1229 - check GET/POST vars lines with isset to not trigger PHP NOTICES +# 60620-1044 - Added variable filtering to eliminate SQL injection attack threat +# + +$version = '0.0.4'; +$build = '60620-1044'; + +$STARTtime = date("U"); + + $stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 8 and view_reports='1';"; + 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 "Username/Password non validi: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n"; + exit; + } + else + { + + if($auth>0) + { + $office_no=strtoupper($PHP_AUTH_USER); + $password=strtoupper($PHP_AUTH_PW); + $stmt="SELECT full_name from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW'"; + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + $LOGfullname=$row[0]; + fwrite ($fp, "VICIDIAL|GOOD|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|$LOGfullname|\n"); + fclose($fp); + } + else + { + fwrite ($fp, "VICIDIAL|FAIL|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|\n"); + fclose($fp); + } + } + +echo "\n"; +echo "\n"; +echo "\n"; +echo "\n"; +echo "VICIDIAL ADMIN LOG DISPLAY"; +echo "\n"; + +# Fri, 25 Mar 2005 + +$DAY_DATE = date("j"); +if ($DAY_DATE < 10) +# {$GREP_DATE = date("D, j M Y");} + {$GREP_DATE = date("D, 0j M Y");} +else + {$GREP_DATE = date("D, j M Y");} + +$NOW_DATE = date("Y-m-d"); +$NOW_TIME = date("Y-m-d H:i:s"); +$STARTtime = date("U"); +if (!$query_date) {$query_date = $GREP_DATE;} + +$Gquery_date = eregi_replace(" ",'\ ',$query_date); +echo "\n"; + +echo "
\n"; +echo "\n"; +echo "\n"; +echo "\n\n"; + +echo "
\n\n";
+
+
+echo "VICIDIAL ADMIN CHANGE LOG                             $NOW_TIME\n";
+
+#passthru("grep $Gquery_date /home/www/htdocs/vicidial/admin_changes_log.txt");
+passthru("grep $Gquery_date $WeBServeRRooT/vicidial/admin_changes_log.txt");
+
+
+?>
+
+ + \ No newline at end of file diff --git a/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_it/AST_agent_performance.php b/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_it/AST_agent_performance.php new file mode 100644 index 00000000..5480b0eb --- /dev/null +++ b/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_it/AST_agent_performance.php @@ -0,0 +1,257 @@ + LICENSE: GPLv2 +### +# CHANGES +# +# 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"); + +$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["INVIA"])) {$INVIA=$_GET["INVIA"];} + elseif (isset($_POST["INVIA"])) {$INVIA=$_POST["INVIA"];} + +$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'");} + $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 "Username/Password non validi: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n"; + exit; + } + +$NOW_DATE = date("Y-m-d"); +$NOW_TIME = date("Y-m-d H:i:s"); +$STARTtime = date("U"); +if (!isset($group)) {$group = '';} +if (!isset($query_date)) {$query_date = $NOW_DATE;} + +$stmt="select campaign_id from vicidial_campaigns;"; +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 Performance\n"; +echo "
\n"; +echo "\n"; +echo "\n"; +echo "\n"; +echo "\n"; +echo "           MODIFICA | REPORT \n"; +echo "\n\n"; + +echo "
\n";
+
+
+if (!$group)
+{
+echo "\n";
+echo "PLEASE SELECT A SERVER AND DATE-TIME ABOVE AND CLICK INVIA\n";
+echo " NOTE: stats taken from 6 hour shift specified\n";
+}
+
+else
+{
+if ($shift == 'AM') 
+	{
+	$query_date_BEGIN = "$query_date 08:45:00";   
+	$query_date_END = "$query_date 15:33:00";
+	$time_BEGIN = "08:45:00";   
+	$time_END = "15:33:00";
+	}
+if ($shift == 'PM') 
+	{
+	$query_date_BEGIN = "$query_date 15:33:00";   
+	$query_date_END = "$query_date 23:15:00";
+	$time_BEGIN = "15:33:00";   
+	$time_END = "23:15:00";
+	}
+
+echo "VICIDIAL: Agent Performance                             $NOW_TIME\n";
+
+echo "Intervallo Di Tempo: $query_date_BEGIN to $query_date_END\n\n";
+echo "---------- AGENTS Dettagliatas -------------\n\n";
+
+echo "+-----------------+----------+--------+--------+--------+------+------+------+------+------+------+------+\n";
+echo "| USER NAME       | ID       | CALLS  | TALK   | TALKAVG| A    | B    | DC   | DNC  | N    | NI   | SALE |\n";
+echo "+-----------------+----------+--------+--------+--------+------+------+------+------+------+------+------+\n";
+
+$stmt="select count(*) as calls,sum(length_in_sec) as talk,full_name,vicidial_users.user,avg(length_in_sec) from vicidial_users,vicidial_log where call_date <= '$query_date_END' and call_date >= '$query_date_BEGIN' and vicidial_users.user=vicidial_log.user and campaign_id='" . mysql_real_escape_string($group) . "' group by full_name order by calls desc limit 1000;";
+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]);
+
+	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];
+
+	$USERtotTALK_M = ($USERtotTALK / 60);
+	$USERtotTALK_M = round($USERtotTALK_M, 2);
+	$USERtotTALK_M_int = intval("$USERtotTALK_M");
+	$USERtotTALK_S = ($USERtotTALK_M - $USERtotTALK_M_int);
+	$USERtotTALK_S = ($USERtotTALK_S * 60);
+	$USERtotTALK_S = round($USERtotTALK_S, 0);
+	if ($USERtotTALK_S < 10) {$USERtotTALK_S = "0$USERtotTALK_S";}
+	$USERtotTALK_MS = "$USERtotTALK_M_int:$USERtotTALK_S";
+	$pfUSERtotTALK_MS[$i] =		sprintf("%6s", $USERtotTALK_MS);
+
+	$USERavgTALK_M = ($USERavgTALK / 60);
+	$USERavgTALK_M = round($USERavgTALK_M, 2);
+	$USERavgTALK_M_int = intval("$USERavgTALK_M");
+	$USERavgTALK_S = ($USERavgTALK_M - $USERavgTALK_M_int);
+	$USERavgTALK_S = ($USERavgTALK_S * 60);
+	$USERavgTALK_S = round($USERavgTALK_S, 0);
+	if ($USERavgTALK_S < 10) {$USERavgTALK_S = "0$USERavgTALK_S";}
+	$USERavgTALK_MS = "$USERavgTALK_M_int:$USERavgTALK_S";
+	$pfUSERavgTALK_MS[$i] =		sprintf("%6s", $USERavgTALK_MS);
+	$i++;
+	}
+
+$k=0;
+while($k < $i)
+	{
+	$ctA[$k]="0   "; $ctB[$k]="0   "; $ctDC[$k]="0   "; $ctDNC[$k]="0   "; $ctN[$k]="0   "; $ctNI[$k]="0   "; $ctSALE[$k]="0   "; 
+	$stmt="select count(*),status from vicidial_log where call_date <= '$query_date_END' and call_date >= '$query_date_BEGIN' and user='$user[$k]' and campaign_id='" . mysql_real_escape_string($group) . "' group by status;";
+	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') || ($row[1] == 'XFER') ) {$ctSALE[$k]=sprintf("%-4s", $row[0]);	$TOT_SALE = ($TOT_SALE + $row[0]);}
+		$m++;
+		}
+	echo "| $full_name[$k] | $user[$k] | $calls[$k] | $pfUSERtotTALK_MS[$k] | $pfUSERavgTALK_MS[$k] | $ctA[$k] | $ctB[$k] | $ctDC[$k] | $ctDNC[$k] | $ctN[$k] | $ctNI[$k] | $ctSALE[$k] |\n";
+
+
+
+	$k++;
+	}
+
+	$TOTcalls =	sprintf("%-7s", $TOTcalls);
+
+	$TOTtotTALK_M = ($TOTtotTALK / 60);
+	$TOTtotTALK_M = round($TOTtotTALK_M, 2);
+	$TOTtotTALK_M_int = intval("$TOTtotTALK_M");
+	$TOTtotTALK_S = ($TOTtotTALK_M - $TOTtotTALK_M_int);
+	$TOTtotTALK_S = ($TOTtotTALK_S * 60);
+	$TOTtotTALK_S = round($TOTtotTALK_S, 0);
+	if ($TOTtotTALK_S < 10) {$TOTtotTALK_S = "0$TOTtotTALK_S";}
+	$TOTtotTALK_MS = "$TOTtotTALK_M_int:$TOTtotTALK_S";
+	$TOTtotTALK_MS =		sprintf("%7s", $TOTtotTALK_MS);
+		while(strlen($TOTtotTALK_MS)>7) {$TOTtotTALK_MS = substr("$TOTtotTALK_MS", 0, -1);}
+
+	$TOT_A = sprintf("%-5s", $TOT_A);
+	$TOT_B = sprintf("%-5s", $TOT_B);
+	$TOT_DC = sprintf("%-5s", $TOT_DC);
+	$TOT_DNC = sprintf("%-5s", $TOT_DNC);
+	$TOT_N = sprintf("%-5s", $TOT_N);
+	$TOT_NI = sprintf("%-5s", $TOT_NI);
+	$TOT_SALE = sprintf("%-5s", $TOT_SALE);
+
+echo "+-----------------+----------+--------+--------+--------+------+------+------+------+------+------+------+\n";
+echo "|  TOTALI                    | $TOTcalls| $TOTtotTALK_MS|        | $TOT_A| $TOT_B| $TOT_DC| $TOT_DNC| $TOT_N| $TOT_NI| $TOT_SALE|\n";
+echo "+-----------------+----------+--------+--------+--------+------+------+------+------+------+------+------+\n";
+
+echo "\n";
+
+}
+
+
+
+?>
+
+
\ No newline at end of file
diff --git a/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_it/AST_agent_performance_detail.php b/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_it/AST_agent_performance_detail.php
new file mode 100644
index 00000000..ecf767d8
--- /dev/null
+++ b/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_it/AST_agent_performance_detail.php
@@ -0,0 +1,576 @@
+    LICENSE: GPLv2
+###
+# CHANGES
+#
+# 71119-2359 - First build
+# 71121-0144 - Replace existing AST_agent_performance_detail.php script with this one
+#            - Fixed zero division bug
+# 71218-1155 - added end_date for multi-day reports
+# 80428-0144 - UTF8 cleanup
+#
+
+require("dbconnect.php");
+
+$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER'];
+$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW'];
+$PHP_SELF=$_SERVER['PHP_SELF'];
+if (isset($_GET["query_date"]))				{$query_date=$_GET["query_date"];}
+	elseif (isset($_POST["query_date"]))	{$query_date=$_POST["query_date"];}
+if (isset($_GET["end_date"]))				{$end_date=$_GET["end_date"];}
+	elseif (isset($_POST["end_date"]))		{$end_date=$_POST["end_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"];}
+if (isset($_GET["INVIA"]))				{$INVIA=$_GET["INVIA"];}
+	elseif (isset($_POST["INVIA"]))	{$INVIA=$_POST["INVIA"];}
+
+if (strlen($shift)<2) {$shift='ALL';}
+
+#############################################
+##### START SYSTEM_SETTINGS LOOKUP #####
+$stmt = "SELECT use_non_latin FROM system_settings;";
+$rslt=mysql_query($stmt, $link);
+if ($DB) {echo "$stmt\n";}
+$qm_conf_ct = mysql_num_rows($rslt);
+$i=0;
+while ($i < $qm_conf_ct)
+	{
+	$row=mysql_fetch_row($rslt);
+	$non_latin =					$row[0];
+	$i++;
+	}
+##### END SETTINGS LOOKUP #####
+###########################################
+
+$PHP_AUTH_USER = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_USER);
+$PHP_AUTH_PW = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_PW);
+
+$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];
+
+  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 "Username/Password non validi: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n";
+    exit;
+	}
+
+$NOW_DATE = date("Y-m-d");
+$NOW_TIME = date("Y-m-d H:i:s");
+$STARTtime = date("U");
+if (!isset($group)) {$group = '';}
+if (!isset($query_date)) {$query_date = $NOW_DATE;}
+if (!isset($end_date)) {$end_date = $NOW_DATE;}
+
+$stmt="select campaign_id from vicidial_campaigns;";
+$rslt=mysql_query($stmt, $link);
+if ($DB) {echo "$stmt\n";}
+$campaigns_to_print = mysql_num_rows($rslt);
+$i=0;
+while ($i < $campaigns_to_print)
+	{
+	$row=mysql_fetch_row($rslt);
+	$groups[$i] =$row[0];
+	$i++;
+	}
+$stmt="select user_group from vicidial_user_groups;";
+$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++;
+	}
+?>
+
+
+
+
+
+\n";
+echo "VICIDIAL: Agent Performance\n";
+echo "
\n"; +echo "\n"; +echo " to \n"; +echo "\n"; +echo "\n"; +echo "\n"; +echo "\n"; +echo "           MODIFICA | REPORT \n"; +echo "\n\n"; + +echo "
\n";
+
+
+if (!$group)
+{
+echo "\n";
+echo "PER FAVORE SELEZIONA UNA CAMPAGNA E UNA DATA E PREMI INVIA\n";
+echo " NOTE: stats taken from shift specified\n";
+}
+
+else
+{
+if ($shift == 'AM') 
+	{
+	$time_BEGIN=$AM_shift_BEGIN;
+	$time_END=$AM_shift_END;
+	if (strlen($time_BEGIN) < 6) {$time_BEGIN = "03:45:00";}   
+	if (strlen($time_END) < 6) {$time_END = "15:15:00";}
+	}
+if ($shift == 'PM') 
+	{
+	$time_BEGIN=$PM_shift_BEGIN;
+	$time_END=$PM_shift_END;
+	if (strlen($time_BEGIN) < 6) {$time_BEGIN = "15:15:00";}
+	if (strlen($time_END) < 6) {$time_END = "23:15:00";}
+	}
+if ($shift == 'ALL') 
+	{
+	if (strlen($time_BEGIN) < 6) {$time_BEGIN = "00:00:00";}
+	if (strlen($time_END) < 6) {$time_END = "23:59:59";}
+	}
+$query_date_BEGIN = "$query_date $time_BEGIN";   
+$query_date_END = "$end_date $time_END";
+
+if (strlen($user_group)>0) {$ugSQL="and vicidial_agent_log.user_group='$user_group'";}
+else {$ugSQL='';}
+
+echo "VICIDIAL: Agent Performance Dettagliata                        $NOW_TIME\n";
+
+echo "Intervallo Di Tempo: $query_date_BEGIN to $query_date_END\n\n";
+echo "---------- AGENTS Dettagliatas -------------\n\n";
+
+
+
+
+
+$statuses='-';
+$statusesTXT='';
+$statusesHEAD='';
+$statusesHTML='';
+$statusesARY[0]='';
+$j=0;
+$users='-';
+$usersARY[0]='';
+$user_namesARY[0]='';
+$k=0;
+
+$stmt="select count(*) as calls,sum(talk_sec) as talk,full_name,vicidial_users.user,sum(pause_sec),sum(wait_sec),sum(dispo_sec),status 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<36000 and wait_sec<36000 and talk_sec<36000 and dispo_sec<36000 $ugSQL group by full_name,status order by status desc,full_name limit 100000;";
+$rslt=mysql_query($stmt, $link);
+if ($DB) {echo "$stmt\n";}
+$rows_to_print = mysql_num_rows($rslt);
+$i=0;
+while ($i < $rows_to_print)
+	{
+	$row=mysql_fetch_row($rslt);
+	$row[0] = ($row[0] - 1);	# subtract 1 for login/logout event compensation
+	
+	$calls[$i] =		$row[0];
+	$talk_sec[$i] =		$row[1];
+	$full_name[$i] =	$row[2];
+	$user[$i] =			$row[3];
+	$pause_sec[$i] =	$row[4];
+	$wait_sec[$i] =		$row[5];
+	$dispo_sec[$i] =	$row[6];
+	$status[$i] =		$row[7];
+	if ( (!eregi("-$status[$i]-", $statuses)) and (strlen($status[$i])>0) )
+		{
+		$statusesTXT = sprintf("%8s", $status[$i]);
+		$statusesHEAD .= "----------+";
+		$statusesHTML .= " $statusesTXT |";
+		$statuses .= "$status[$i]-";
+		$statusesARY[$j] = $status[$i];
+		$j++;
+		}
+	if (!eregi("-$user[$i]-", $users))
+		{
+		$users .= "$user[$i]-";
+		$usersARY[$k] = $user[$i];
+		$user_namesARY[$k] = $full_name[$i];
+		$k++;
+		}
+
+	$i++;
+	}
+
+
+echo "+-----------------+----------+--------+---------+--------+--------+--------+--------+--------+--------+--------+--------+$statusesHEAD\n";
+echo "| USER NAME       | ID       | CALLS  | TIME    | PAUSE  | PAUSAVG| WAIT   | WAITAVG| TALK   | TALKAVG| DISPO  | DISPAVG|$statusesHTML\n";
+echo "+-----------------+----------+--------+---------+--------+--------+--------+--------+--------+--------+--------+--------+$statusesHEAD\n";
+
+
+### BEGIN loop through each user ###
+$m=0;
+while ($m < $k)
+	{
+	$Suser=$usersARY[$m];
+	$Sfull_name=$user_namesARY[$m];
+	$Stime=0;
+	$Scalls=0;
+	$Stalk_sec=0;
+	$Spause_sec=0;
+	$Swait_sec=0;
+	$Sdispo_sec=0;
+	$SstatusesHTML='';
+
+	### BEGIN loop through each status ###
+	$n=0;
+	while ($n < $j)
+		{
+		$Sstatus=$statusesARY[$n];
+		$SstatusTXT='';
+		### BEGIN loop through each stat line ###
+		$i=0; $status_found=0;
+		while ($i < $rows_to_print)
+			{
+			if ( ($Suser=="$user[$i]") and ($Sstatus=="$status[$i]") )
+				{
+				$Scalls =		($Scalls + $calls[$i]);
+				$Stalk_sec =	($Stalk_sec + $talk_sec[$i]);
+				$Spause_sec =	($Spause_sec + $pause_sec[$i]);
+				$Swait_sec =	($Swait_sec + $wait_sec[$i]);
+				$Sdispo_sec =	($Sdispo_sec + $dispo_sec[$i]);
+				$SstatusTXT = sprintf("%8s", $calls[$i]);
+				$SstatusesHTML .= " $SstatusTXT |";
+				$status_found++;
+				}
+			$i++;
+			}
+		if ($status_found < 1)
+			{
+			$SstatusesHTML .= "        0 |";
+			}
+		### END loop through each stat line ###
+		$n++;
+		}
+	### END loop through each status ###
+	$Stime = ($Stalk_sec + $Spause_sec + $Swait_sec + $Sdispo_sec);
+	$TOTcalls=($TOTcalls + $Scalls);
+	$TOTtime=($TOTtime + $Stime);
+	$TOTtotTALK=($TOTtotTALK + $Stalk_sec);
+	$TOTtotWAIT=($TOTtotWAIT + $Swait_sec);
+	$TOTtotPAUSE=($TOTtotPAUSE + $Spause_sec);
+	$TOTtotDISPO=($TOTtotDISPO + $Sdispo_sec);
+	$Stime = ($Stalk_sec + $Spause_sec + $Swait_sec + $Sdispo_sec);
+	if ( ($Scalls > 0) and ($Stalk_sec > 0) ) {$Stalk_avg = ($Stalk_sec/$Scalls);}
+		else {$Stalk_avg=0;}
+	if ( ($Scalls > 0) and ($Spause_sec > 0) ) {$Spause_avg = ($Spause_sec/$Scalls);}
+		else {$Spause_avg=0;}
+	if ( ($Scalls > 0) and ($Swait_sec > 0) ) {$Swait_avg = ($Swait_sec/$Scalls);}
+		else {$Swait_avg=0;}
+	if ( ($Scalls > 0) and ($Sdispo_sec > 0) ) {$Sdispo_avg = ($Sdispo_sec/$Scalls);}
+		else {$Sdispo_avg=0;}
+
+	$Scalls =	sprintf("%6s", $Scalls);
+
+	if ($non_latin < 1)
+	{
+   	 $Sfull_name=	sprintf("%-15s", $Sfull_name); 
+		while(strlen($Sfull_name)>15) {$Sfull_name = substr("$Sfull_name", 0, -1);}
+	 $Suser =		sprintf("%-8s", $Suser);
+        while(strlen($Suser)>8) {$Suser = substr("$Suser", 0, -1);}
+       }
+	else
+	{	
+        $Sfull_name=	sprintf("%-45s", $Sfull_name); 
+	 while(mb_strlen($Sfull_name,'utf-8')>15) {$Sfull_name = mb_substr("$Sfull_name", 0, -1,'utf-8');}
+
+ 		$Suser =	sprintf("%-24s", $Suser);
+	 while(mb_strlen($Suser,'utf-8')>8) {$Suser = mb_substr("$Suser", 0, -1,'utf-8');}
+	}
+
+	$USERtime_M = ($Stime / 60);
+	$USERtime_M = round($USERtime_M, 2);
+	$USERtime_M_int = intval("$USERtime_M");
+	$USERtime_S = ($USERtime_M - $USERtime_M_int);
+	$USERtime_S = ($USERtime_S * 60);
+	$USERtime_S = round($USERtime_S, 0);
+	if ($USERtime_S < 10) {$USERtime_S = "0$USERtime_S";}
+	$USERtime_MS = "$USERtime_M_int:$USERtime_S";
+	$pfUSERtime_MS =		sprintf("%7s", $USERtime_MS);
+
+	$USERtotTALK_M = ($Stalk_sec / 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 =		sprintf("%6s", $USERtotTALK_MS);
+
+	$USERavgTALK_M = ($Stalk_avg / 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 =		sprintf("%6s", $USERavgTALK_MS);
+
+	$USERtotPAUSE_M = ($Spause_sec / 60);
+	$USERtotPAUSE_M = round($USERtotPAUSE_M, 2);
+	$USERtotPAUSE_M_int = intval("$USERtotPAUSE_M");
+	$USERtotPAUSE_S = ($USERtotPAUSE_M - $USERtotPAUSE_M_int);
+	$USERtotPAUSE_S = ($USERtotPAUSE_S * 60);
+	$USERtotPAUSE_S = round($USERtotPAUSE_S, 0);
+	if ($USERtotPAUSE_S < 10) {$USERtotPAUSE_S = "0$USERtotPAUSE_S";}
+	$USERtotPAUSE_MS = "$USERtotPAUSE_M_int:$USERtotPAUSE_S";
+	$pfUSERtotPAUSE_MS =		sprintf("%6s", $USERtotPAUSE_MS);
+
+	$USERavgPAUSE_M = ($Spause_avg / 60);
+	$USERavgPAUSE_M = round($USERavgPAUSE_M, 2);
+	$USERavgPAUSE_M_int = intval("$USERavgPAUSE_M");
+	$USERavgPAUSE_S = ($USERavgPAUSE_M - $USERavgPAUSE_M_int);
+	$USERavgPAUSE_S = ($USERavgPAUSE_S * 60);
+	$USERavgPAUSE_S = round($USERavgPAUSE_S, 0);
+	if ($USERavgPAUSE_S < 10) {$USERavgPAUSE_S = "0$USERavgPAUSE_S";}
+	$USERavgPAUSE_MS = "$USERavgPAUSE_M_int:$USERavgPAUSE_S";
+	$pfUSERavgPAUSE_MS =		sprintf("%6s", $USERavgPAUSE_MS);
+
+	$USERtotWAIT_M = ($Swait_sec / 60);
+	$USERtotWAIT_M = round($USERtotWAIT_M, 2);
+	$USERtotWAIT_M_int = intval("$USERtotWAIT_M");
+	$USERtotWAIT_S = ($USERtotWAIT_M - $USERtotWAIT_M_int);
+	$USERtotWAIT_S = ($USERtotWAIT_S * 60);
+	$USERtotWAIT_S = round($USERtotWAIT_S, 0);
+	if ($USERtotWAIT_S < 10) {$USERtotWAIT_S = "0$USERtotWAIT_S";}
+	$USERtotWAIT_MS = "$USERtotWAIT_M_int:$USERtotWAIT_S";
+	$pfUSERtotWAIT_MS =		sprintf("%6s", $USERtotWAIT_MS);
+
+	$USERavgWAIT_M = ($Swait_avg / 60);
+	$USERavgWAIT_M = round($USERavgWAIT_M, 2);
+	$USERavgWAIT_M_int = intval("$USERavgWAIT_M");
+	$USERavgWAIT_S = ($USERavgWAIT_M - $USERavgWAIT_M_int);
+	$USERavgWAIT_S = ($USERavgWAIT_S * 60);
+	$USERavgWAIT_S = round($USERavgWAIT_S, 0);
+	if ($USERavgWAIT_S < 10) {$USERavgWAIT_S = "0$USERavgWAIT_S";}
+	$USERavgWAIT_MS = "$USERavgWAIT_M_int:$USERavgWAIT_S";
+	$pfUSERavgWAIT_MS =		sprintf("%6s", $USERavgWAIT_MS);
+	
+	$USERtotDISPO_M = ($Sdispo_sec / 60);
+	$USERtotDISPO_M = round($USERtotDISPO_M, 2);
+	$USERtotDISPO_M_int = intval("$USERtotDISPO_M");
+	$USERtotDISPO_S = ($USERtotDISPO_M - $USERtotDISPO_M_int);
+	$USERtotDISPO_S = ($USERtotDISPO_S * 60);
+	$USERtotDISPO_S = round($USERtotDISPO_S, 0);
+	if ($USERtotDISPO_S < 10) {$USERtotDISPO_S = "0$USERtotDISPO_S";}
+	$USERtotDISPO_MS = "$USERtotDISPO_M_int:$USERtotDISPO_S";
+	$pfUSERtotDISPO_MS =		sprintf("%6s", $USERtotDISPO_MS);
+
+	$USERavgDISPO_M = ($Sdispo_avg / 60);
+	$USERavgDISPO_M = round($USERavgDISPO_M, 2);
+	$USERavgDISPO_M_int = intval("$USERavgDISPO_M");
+	$USERavgDISPO_S = ($USERavgDISPO_M - $USERavgDISPO_M_int);
+	$USERavgDISPO_S = ($USERavgDISPO_S * 60);
+	$USERavgDISPO_S = round($USERavgDISPO_S, 0);
+	if ($USERavgDISPO_S < 10) {$USERavgDISPO_S = "0$USERavgDISPO_S";}
+	$USERavgDISPO_MS = "$USERavgDISPO_M_int:$USERavgDISPO_S";
+	$pfUSERavgDISPO_MS =		sprintf("%6s", $USERavgDISPO_MS);
+
+	echo "| $Sfull_name | $Suser | $Scalls | $pfUSERtime_MS | $pfUSERtotPAUSE_MS | $pfUSERavgPAUSE_MS | $pfUSERtotWAIT_MS | $pfUSERavgWAIT_MS | $pfUSERtotTALK_MS | $pfUSERavgTALK_MS | $pfUSERtotDISPO_MS | $pfUSERavgDISPO_MS |$SstatusesHTML\n";
+	$m++;
+	}
+### END loop through each user ###
+
+
+###### LAST LINE FORMATTING ##########
+### BEGIN loop through each status ###
+$SUMstatusesHTML='';
+$n=0;
+while ($n < $j)
+	{
+	$Scalls=0;
+	$Sstatus=$statusesARY[$n];
+	$SUMstatusTXT='';
+	### BEGIN loop through each stat line ###
+	$i=0; $status_found=0;
+	while ($i < $rows_to_print)
+		{
+		if ($Sstatus=="$status[$i]")
+			{
+			$Scalls =		($Scalls + $calls[$i]);
+			$status_found++;
+			}
+		$i++;
+		}
+	### END loop through each stat line ###
+	if ($status_found < 1)
+		{
+		$SUMstatusesHTML .= "        0 |";
+		}
+	else
+		{
+		$SUMstatusTXT = sprintf("%8s", $Scalls);
+		$SUMstatusesHTML .= " $SUMstatusTXT |";
+		}
+	$n++;
+	}
+### END loop through each status ###
+
+
+	$TOTcalls =	sprintf("%7s", $TOTcalls);
+	$TOT_AGENTS = sprintf("%-4s", $m);
+
+	$TOTtime_M = ($TOTtime / 60);
+	$TOTtime_M = round($TOTtime_M, 2);
+	$TOTtime_M_int = intval("$TOTtime_M");
+	$TOTtime_S = ($TOTtime_M - $TOTtime_M_int);
+	$TOTtime_S = ($TOTtime_S * 60);
+	$TOTtime_S = round($TOTtime_S, 0);
+	if ($TOTtime_S < 10) {$TOTtime_S = "0$TOTtime_S";}
+	$TOTtime_MS = "$TOTtime_M_int:$TOTtime_S";
+	$TOTtime_MS =		sprintf("%8s", $TOTtime_MS);
+		while(strlen($TOTtime_MS)>8) {$TOTtime_MS = substr("$TOTtime_MS", 0, -1);}
+
+	$TOTtotTALK_M = ($TOTtotTALK / 60);
+	$TOTtotTALK_M = round($TOTtotTALK_M, 2);
+	$TOTtotTALK_M_int = intval("$TOTtotTALK_M");
+	$TOTtotTALK_S = ($TOTtotTALK_M - $TOTtotTALK_M_int);
+	$TOTtotTALK_S = ($TOTtotTALK_S * 60);
+	$TOTtotTALK_S = round($TOTtotTALK_S, 0);
+	if ($TOTtotTALK_S < 10) {$TOTtotTALK_S = "0$TOTtotTALK_S";}
+	$TOTtotTALK_MS = "$TOTtotTALK_M_int:$TOTtotTALK_S";
+	$TOTtotTALK_MS =		sprintf("%8s", $TOTtotTALK_MS);
+		while(strlen($TOTtotTALK_MS)>8) {$TOTtotTALK_MS = substr("$TOTtotTALK_MS", 0, -1);}
+
+	$TOTtotDISPO_M = ($TOTtotDISPO / 60);
+	$TOTtotDISPO_M = round($TOTtotDISPO_M, 2);
+	$TOTtotDISPO_M_int = intval("$TOTtotDISPO_M");
+	$TOTtotDISPO_S = ($TOTtotDISPO_M - $TOTtotDISPO_M_int);
+	$TOTtotDISPO_S = ($TOTtotDISPO_S * 60);
+	$TOTtotDISPO_S = round($TOTtotDISPO_S, 0);
+	if ($TOTtotDISPO_S < 10) {$TOTtotDISPO_S = "0$TOTtotDISPO_S";}
+	$TOTtotDISPO_MS = "$TOTtotDISPO_M_int:$TOTtotDISPO_S";
+	$TOTtotDISPO_MS =		sprintf("%8s", $TOTtotDISPO_MS);
+		while(strlen($TOTtotDISPO_MS)>8) {$TOTtotDISPO_MS = substr("$TOTtotDISPO_MS", 0, -1);}
+
+	$TOTtotPAUSE_M = ($TOTtotPAUSE / 60);
+	$TOTtotPAUSE_M = round($TOTtotPAUSE_M, 2);
+	$TOTtotPAUSE_M_int = intval("$TOTtotPAUSE_M");
+	$TOTtotPAUSE_S = ($TOTtotPAUSE_M - $TOTtotPAUSE_M_int);
+	$TOTtotPAUSE_S = ($TOTtotPAUSE_S * 60);
+	$TOTtotPAUSE_S = round($TOTtotPAUSE_S, 0);
+	if ($TOTtotPAUSE_S < 10) {$TOTtotPAUSE_S = "0$TOTtotPAUSE_S";}
+	$TOTtotPAUSE_MS = "$TOTtotPAUSE_M_int:$TOTtotPAUSE_S";
+	$TOTtotPAUSE_MS =		sprintf("%8s", $TOTtotPAUSE_MS);
+		while(strlen($TOTtotPAUSE_MS)>8) {$TOTtotPAUSE_MS = substr("$TOTtotPAUSE_MS", 0, -1);}
+
+	$TOTtotWAIT_M = ($TOTtotWAIT / 60);
+	$TOTtotWAIT_M = round($TOTtotWAIT_M, 2);
+	$TOTtotWAIT_M_int = intval("$TOTtotWAIT_M");
+	$TOTtotWAIT_S = ($TOTtotWAIT_M - $TOTtotWAIT_M_int);
+	$TOTtotWAIT_S = ($TOTtotWAIT_S * 60);
+	$TOTtotWAIT_S = round($TOTtotWAIT_S, 0);
+	if ($TOTtotWAIT_S < 10) {$TOTtotWAIT_S = "0$TOTtotWAIT_S";}
+	$TOTtotWAIT_MS = "$TOTtotWAIT_M_int:$TOTtotWAIT_S";
+	$TOTtotWAIT_MS =		sprintf("%8s", $TOTtotWAIT_MS);
+		while(strlen($TOTtotWAIT_MS)>8) {$TOTtotWAIT_MS = substr("$TOTtotWAIT_MS", 0, -1);}
+
+
+	$TOTavgTALK_M = ( ($TOTtotTALK / $TOTcalls) / 60);
+	$TOTavgTALK_M = round($TOTavgTALK_M, 2);
+	$TOTavgTALK_M_int = intval("$TOTavgTALK_M");
+	$TOTavgTALK_S = ($TOTavgTALK_M - $TOTavgTALK_M_int);
+	$TOTavgTALK_S = ($TOTavgTALK_S * 60);
+	$TOTavgTALK_S = round($TOTavgTALK_S, 0);
+	if ($TOTavgTALK_S < 10) {$TOTavgTALK_S = "0$TOTavgTALK_S";}
+	$TOTavgTALK_MS = "$TOTavgTALK_M_int:$TOTavgTALK_S";
+	$TOTavgTALK_MS =		sprintf("%6s", $TOTavgTALK_MS);
+		while(strlen($TOTavgTALK_MS)>6) {$TOTavgTALK_MS = substr("$TOTavgTALK_MS", 0, -1);}
+
+	$TOTavgDISPO_M = ( ($TOTtotDISPO / $TOTcalls) / 60);
+	$TOTavgDISPO_M = round($TOTavgDISPO_M, 2);
+	$TOTavgDISPO_M_int = intval("$TOTavgDISPO_M");
+	$TOTavgDISPO_S = ($TOTavgDISPO_M - $TOTavgDISPO_M_int);
+	$TOTavgDISPO_S = ($TOTavgDISPO_S * 60);
+	$TOTavgDISPO_S = round($TOTavgDISPO_S, 0);
+	if ($TOTavgDISPO_S < 10) {$TOTavgDISPO_S = "0$TOTavgDISPO_S";}
+	$TOTavgDISPO_MS = "$TOTavgDISPO_M_int:$TOTavgDISPO_S";
+	$TOTavgDISPO_MS =		sprintf("%6s", $TOTavgDISPO_MS);
+		while(strlen($TOTavgDISPO_MS)>6) {$TOTavgDISPO_MS = substr("$TOTavgDISPO_MS", 0, -1);}
+
+	$TOTavgPAUSE_M = ( ($TOTtotPAUSE / $TOTcalls) / 60);
+	$TOTavgPAUSE_M = round($TOTavgPAUSE_M, 2);
+	$TOTavgPAUSE_M_int = intval("$TOTavgPAUSE_M");
+	$TOTavgPAUSE_S = ($TOTavgPAUSE_M - $TOTavgPAUSE_M_int);
+	$TOTavgPAUSE_S = ($TOTavgPAUSE_S * 60);
+	$TOTavgPAUSE_S = round($TOTavgPAUSE_S, 0);
+	if ($TOTavgPAUSE_S < 10) {$TOTavgPAUSE_S = "0$TOTavgPAUSE_S";}
+	$TOTavgPAUSE_MS = "$TOTavgPAUSE_M_int:$TOTavgPAUSE_S";
+	$TOTavgPAUSE_MS =		sprintf("%6s", $TOTavgPAUSE_MS);
+		while(strlen($TOTavgPAUSE_MS)>6) {$TOTavgPAUSE_MS = substr("$TOTavgPAUSE_MS", 0, -1);}
+
+	$TOTavgWAIT_M = ( ($TOTtotWAIT / $TOTcalls) / 60);
+	$TOTavgWAIT_M = round($TOTavgWAIT_M, 2);
+	$TOTavgWAIT_M_int = intval("$TOTavgWAIT_M");
+	$TOTavgWAIT_S = ($TOTavgWAIT_M - $TOTavgWAIT_M_int);
+	$TOTavgWAIT_S = ($TOTavgWAIT_S * 60);
+	$TOTavgWAIT_S = round($TOTavgWAIT_S, 0);
+	if ($TOTavgWAIT_S < 10) {$TOTavgWAIT_S = "0$TOTavgWAIT_S";}
+	$TOTavgWAIT_MS = "$TOTavgWAIT_M_int:$TOTavgWAIT_S";
+	$TOTavgWAIT_MS =		sprintf("%6s", $TOTavgWAIT_MS);
+		while(strlen($TOTavgWAIT_MS)>6) {$TOTavgWAIT_MS = substr("$TOTavgWAIT_MS", 0, -1);}
+
+
+echo "+-----------------+----------+--------+---------+--------+--------+--------+--------+--------+--------+--------+--------+$statusesHEAD\n";
+echo "|  TOTALI        AGENTS:$TOT_AGENTS | $TOTcalls| $TOTtime_MS|$TOTtotPAUSE_MS| $TOTavgPAUSE_MS |$TOTtotWAIT_MS| $TOTavgWAIT_MS |$TOTtotTALK_MS| $TOTavgTALK_MS |$TOTtotDISPO_MS| $TOTavgDISPO_MS |$SUMstatusesHTML\n";
+echo "+----------------------------+--------+---------+--------+--------+--------+--------+--------+--------+--------+--------+$statusesHEAD\n";
+
+echo "\n";
+
+}
+
+
+?>
+
+
\ No newline at end of file
diff --git a/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_it/AST_agent_time_sheet.php b/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_it/AST_agent_time_sheet.php
new file mode 100644
index 00000000..3ebde894
--- /dev/null
+++ b/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_it/AST_agent_time_sheet.php
@@ -0,0 +1,286 @@
+    LICENSE: GPLv2
+###
+# CHANGES
+#
+# 60619-1729 - Added variable filtering to eliminate SQL injection attack threat
+#            - Added required user/pass to gain access to this page
+#
+
+require("dbconnect.php");
+
+$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER'];
+$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW'];
+$PHP_SELF=$_SERVER['PHP_SELF'];
+if (isset($_GET["agent"]))				{$agent=$_GET["agent"];}
+	elseif (isset($_POST["agent"]))		{$agent=$_POST["agent"];}
+if (isset($_GET["query_date"]))				{$query_date=$_GET["query_date"];}
+	elseif (isset($_POST["query_date"]))		{$query_date=$_POST["query_date"];}
+if (isset($_GET["calls_summary"]))				{$calls_summary=$_GET["calls_summary"];}
+	elseif (isset($_POST["calls_summary"]))		{$calls_summary=$_POST["calls_summary"];}
+if (isset($_GET["submit"]))				{$submit=$_GET["submit"];}
+	elseif (isset($_POST["submit"]))		{$submit=$_POST["submit"];}
+if (isset($_GET["INVIA"]))				{$INVIA=$_GET["INVIA"];}
+	elseif (isset($_POST["INVIA"]))		{$INVIA=$_POST["INVIA"];}
+
+$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 "Username/Password non validi: |$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 " - Modifica Utente\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 INVIA\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 "Intervallo Di Tempo: $query_date_BEGIN to $query_date_END\n\n";
+echo "---------- AGENT TIME SHEET: $agent - $full_name -------------\n\n";
+
+if ($calls_summary)
+	{
+	$stmt="select count(*) as calls,sum(talk_sec) as talk,avg(talk_sec),sum(pause_sec),avg(pause_sec),sum(wait_sec),avg(wait_sec),sum(dispo_sec),avg(dispo_sec) from vicidial_agent_log where event_time <= '" . mysql_real_escape_string($query_date_END) . "' and event_time >= '" . mysql_real_escape_string($query_date_BEGIN) . "' and user='" . mysql_real_escape_string($agent) . "' and pause_sec<48800 and wait_sec<48800 and talk_sec<48800 and dispo_sec<48800 limit 1;";
+	$rslt=mysql_query($stmt, $link);
+	if ($DB) {echo "$stmt\n";}
+	$row=mysql_fetch_row($rslt);
+
+	$TOTAL_TIME = ($row[1] + $row[3] + $row[5] + $row[7]);
+
+		$TOTAL_TIME_H = ($TOTAL_TIME / 3600);
+		$TOTAL_TIME_H = round($TOTAL_TIME_H, 2);
+		$TOTAL_TIME_H_int = intval("$TOTAL_TIME_H");
+		$TOTAL_TIME_M = ($TOTAL_TIME_H - $TOTAL_TIME_H_int);
+		$TOTAL_TIME_M = ($TOTAL_TIME_M * 60);
+		$TOTAL_TIME_M = round($TOTAL_TIME_M, 2);
+		$TOTAL_TIME_M_int = intval("$TOTAL_TIME_M");
+		$TOTAL_TIME_S = ($TOTAL_TIME_M - $TOTAL_TIME_M_int);
+		$TOTAL_TIME_S = ($TOTAL_TIME_S * 60);
+		$TOTAL_TIME_S = round($TOTAL_TIME_S, 0);
+		if ($TOTAL_TIME_S < 10) {$TOTAL_TIME_S = "0$TOTAL_TIME_S";}
+		if ($TOTAL_TIME_M_int < 10) {$TOTAL_TIME_M_int = "0$TOTAL_TIME_M_int";}
+		$TOTAL_TIME_HMS = "$TOTAL_TIME_H_int:$TOTAL_TIME_M_int:$TOTAL_TIME_S";
+		$pfTOTAL_TIME_HMS =		sprintf("%8s", $TOTAL_TIME_HMS);
+
+		$TALK_TIME_H = ($row[1] / 3600);
+		$TALK_TIME_H = round($TALK_TIME_H, 2);
+		$TALK_TIME_H_int = intval("$TALK_TIME_H");
+		$TALK_TIME_M = ($TALK_TIME_H - $TALK_TIME_H_int);
+		$TALK_TIME_M = ($TALK_TIME_M * 60);
+		$TALK_TIME_M = round($TALK_TIME_M, 2);
+		$TALK_TIME_M_int = intval("$TALK_TIME_M");
+		$TALK_TIME_S = ($TALK_TIME_M - $TALK_TIME_M_int);
+		$TALK_TIME_S = ($TALK_TIME_S * 60);
+		$TALK_TIME_S = round($TALK_TIME_S, 0);
+		if ($TALK_TIME_S < 10) {$TALK_TIME_S = "0$TALK_TIME_S";}
+		if ($TALK_TIME_M_int < 10) {$TALK_TIME_M_int = "0$TALK_TIME_M_int";}
+		$TALK_TIME_HMS = "$TALK_TIME_H_int:$TALK_TIME_M_int:$TALK_TIME_S";
+		$pfTALK_TIME_HMS =		sprintf("%8s", $TALK_TIME_HMS);
+
+		$PAUSE_TIME_H = ($row[3] / 3600);
+		$PAUSE_TIME_H = round($PAUSE_TIME_H, 2);
+		$PAUSE_TIME_H_int = intval("$PAUSE_TIME_H");
+		$PAUSE_TIME_M = ($PAUSE_TIME_H - $PAUSE_TIME_H_int);
+		$PAUSE_TIME_M = ($PAUSE_TIME_M * 60);
+		$PAUSE_TIME_M = round($PAUSE_TIME_M, 2);
+		$PAUSE_TIME_M_int = intval("$PAUSE_TIME_M");
+		$PAUSE_TIME_S = ($PAUSE_TIME_M - $PAUSE_TIME_M_int);
+		$PAUSE_TIME_S = ($PAUSE_TIME_S * 60);
+		$PAUSE_TIME_S = round($PAUSE_TIME_S, 0);
+		if ($PAUSE_TIME_S < 10) {$PAUSE_TIME_S = "0$PAUSE_TIME_S";}
+		if ($PAUSE_TIME_M_int < 10) {$PAUSE_TIME_M_int = "0$PAUSE_TIME_M_int";}
+		$PAUSE_TIME_HMS = "$PAUSE_TIME_H_int:$PAUSE_TIME_M_int:$PAUSE_TIME_S";
+		$pfPAUSE_TIME_HMS =		sprintf("%8s", $PAUSE_TIME_HMS);
+
+		$WAIT_TIME_H = ($row[5] / 3600);
+		$WAIT_TIME_H = round($WAIT_TIME_H, 2);
+		$WAIT_TIME_H_int = intval("$WAIT_TIME_H");
+		$WAIT_TIME_M = ($WAIT_TIME_H - $WAIT_TIME_H_int);
+		$WAIT_TIME_M = ($WAIT_TIME_M * 60);
+		$WAIT_TIME_M = round($WAIT_TIME_M, 2);
+		$WAIT_TIME_M_int = intval("$WAIT_TIME_M");
+		$WAIT_TIME_S = ($WAIT_TIME_M - $WAIT_TIME_M_int);
+		$WAIT_TIME_S = ($WAIT_TIME_S * 60);
+		$WAIT_TIME_S = round($WAIT_TIME_S, 0);
+		if ($WAIT_TIME_S < 10) {$WAIT_TIME_S = "0$WAIT_TIME_S";}
+		if ($WAIT_TIME_M_int < 10) {$WAIT_TIME_M_int = "0$WAIT_TIME_M_int";}
+		$WAIT_TIME_HMS = "$WAIT_TIME_H_int:$WAIT_TIME_M_int:$WAIT_TIME_S";
+		$pfWAIT_TIME_HMS =		sprintf("%8s", $WAIT_TIME_HMS);
+
+		$WRAPUP_TIME_H = ($row[7] / 3600);
+		$WRAPUP_TIME_H = round($WRAPUP_TIME_H, 2);
+		$WRAPUP_TIME_H_int = intval("$WRAPUP_TIME_H");
+		$WRAPUP_TIME_M = ($WRAPUP_TIME_H - $WRAPUP_TIME_H_int);
+		$WRAPUP_TIME_M = ($WRAPUP_TIME_M * 60);
+		$WRAPUP_TIME_M = round($WRAPUP_TIME_M, 2);
+		$WRAPUP_TIME_M_int = intval("$WRAPUP_TIME_M");
+		$WRAPUP_TIME_S = ($WRAPUP_TIME_M - $WRAPUP_TIME_M_int);
+		$WRAPUP_TIME_S = ($WRAPUP_TIME_S * 60);
+		$WRAPUP_TIME_S = round($WRAPUP_TIME_S, 0);
+		if ($WRAPUP_TIME_S < 10) {$WRAPUP_TIME_S = "0$WRAPUP_TIME_S";}
+		if ($WRAPUP_TIME_M_int < 10) {$WRAPUP_TIME_M_int = "0$WRAPUP_TIME_M_int";}
+		$WRAPUP_TIME_HMS = "$WRAPUP_TIME_H_int:$WRAPUP_TIME_M_int:$WRAPUP_TIME_S";
+		$pfWRAPUP_TIME_HMS =		sprintf("%8s", $WRAPUP_TIME_HMS);
+
+		$TALK_AVG_M = ($row[2] / 60);
+		$TALK_AVG_M = round($TALK_AVG_M, 2);
+		$TALK_AVG_M_int = intval("$TALK_AVG_M");
+		$TALK_AVG_S = ($TALK_AVG_M - $TALK_AVG_M_int);
+		$TALK_AVG_S = ($TALK_AVG_S * 60);
+		$TALK_AVG_S = round($TALK_AVG_S, 0);
+		if ($TALK_AVG_S < 10) {$TALK_AVG_S = "0$TALK_AVG_S";}
+		$TALK_AVG_MS = "$TALK_AVG_M_int:$TALK_AVG_S";
+		$pfTALK_AVG_MS =		sprintf("%6s", $TALK_AVG_MS);
+
+		$PAUSE_AVG_M = ($row[4] / 60);
+		$PAUSE_AVG_M = round($PAUSE_AVG_M, 2);
+		$PAUSE_AVG_M_int = intval("$PAUSE_AVG_M");
+		$PAUSE_AVG_S = ($PAUSE_AVG_M - $PAUSE_AVG_M_int);
+		$PAUSE_AVG_S = ($PAUSE_AVG_S * 60);
+		$PAUSE_AVG_S = round($PAUSE_AVG_S, 0);
+		if ($PAUSE_AVG_S < 10) {$PAUSE_AVG_S = "0$PAUSE_AVG_S";}
+		$PAUSE_AVG_MS = "$PAUSE_AVG_M_int:$PAUSE_AVG_S";
+		$pfPAUSE_AVG_MS =		sprintf("%6s", $PAUSE_AVG_MS);
+
+		$WAIT_AVG_M = ($row[6] / 60);
+		$WAIT_AVG_M = round($WAIT_AVG_M, 2);
+		$WAIT_AVG_M_int = intval("$WAIT_AVG_M");
+		$WAIT_AVG_S = ($WAIT_AVG_M - $WAIT_AVG_M_int);
+		$WAIT_AVG_S = ($WAIT_AVG_S * 60);
+		$WAIT_AVG_S = round($WAIT_AVG_S, 0);
+		if ($WAIT_AVG_S < 10) {$WAIT_AVG_S = "0$WAIT_AVG_S";}
+		$WAIT_AVG_MS = "$WAIT_AVG_M_int:$WAIT_AVG_S";
+		$pfWAIT_AVG_MS =		sprintf("%6s", $WAIT_AVG_MS);
+
+		$WRAPUP_AVG_M = ($row[8] / 60);
+		$WRAPUP_AVG_M = round($WRAPUP_AVG_M, 2);
+		$WRAPUP_AVG_M_int = intval("$WRAPUP_AVG_M");
+		$WRAPUP_AVG_S = ($WRAPUP_AVG_M - $WRAPUP_AVG_M_int);
+		$WRAPUP_AVG_S = ($WRAPUP_AVG_S * 60);
+		$WRAPUP_AVG_S = round($WRAPUP_AVG_S, 0);
+		if ($WRAPUP_AVG_S < 10) {$WRAPUP_AVG_S = "0$WRAPUP_AVG_S";}
+		$WRAPUP_AVG_MS = "$WRAPUP_AVG_M_int:$WRAPUP_AVG_S";
+		$pfWRAPUP_AVG_MS =		sprintf("%6s", $WRAPUP_AVG_MS);
+
+	echo "TOTALE CHIAMATE TAKEN: $row[0]\n";
+	echo "TALK TIME:               $pfTALK_TIME_HMS     AVERAGE: $pfTALK_AVG_MS\n";
+	echo "PAUSE TIME:              $pfPAUSE_TIME_HMS     AVERAGE: $pfPAUSE_AVG_MS\n";
+	echo "WAIT TIME:               $pfWAIT_TIME_HMS     AVERAGE: $pfWAIT_AVG_MS\n";
+	echo "WRAPUP TIME:             $pfWRAPUP_TIME_HMS     AVERAGE: $pfWRAPUP_AVG_MS\n";
+	echo "----------------------------------------------------------------\n";
+	echo "TOTAL ACTIVE AGENT TIME: $pfTOTAL_TIME_HMS\n";
+
+	echo "\n";
+	}
+else
+	{
+	echo "Call Activity Summary\n\n";
+
+	}
+
+$stmt="select event_time,UNIX_TIMESTAMP(event_time) from vicidial_agent_log where event_time <= '" . mysql_real_escape_string($query_date_END) . "' and event_time >= '" . mysql_real_escape_string($query_date_BEGIN) . "' and user='" . mysql_real_escape_string($agent) . "' order by event_time limit 1;";
+$rslt=mysql_query($stmt, $link);
+if ($DB) {echo "$stmt\n";}
+$row=mysql_fetch_row($rslt);
+
+echo "FIRST LOGIN:          $row[0]\n";
+$start = $row[1];
+
+$stmt="select event_time,UNIX_TIMESTAMP(event_time) from vicidial_agent_log where event_time <= '" . mysql_real_escape_string($query_date_END) . "' and event_time >= '" . mysql_real_escape_string($query_date_BEGIN) . "' and user='" . mysql_real_escape_string($agent) . "' order by event_time desc limit 1;";
+$rslt=mysql_query($stmt, $link);
+if ($DB) {echo "$stmt\n";}
+$row=mysql_fetch_row($rslt);
+
+echo "LAST LOG ACTIVITY:    $row[0]\n";
+$end = $row[1];
+
+$login_time = ($end - $start);
+	$LOGIN_TIME_H = ($login_time / 3600);
+	$LOGIN_TIME_H = round($LOGIN_TIME_H, 2);
+	$LOGIN_TIME_H_int = intval("$LOGIN_TIME_H");
+	$LOGIN_TIME_M = ($LOGIN_TIME_H - $LOGIN_TIME_H_int);
+	$LOGIN_TIME_M = ($LOGIN_TIME_M * 60);
+	$LOGIN_TIME_M = round($LOGIN_TIME_M, 2);
+	$LOGIN_TIME_M_int = intval("$LOGIN_TIME_M");
+	$LOGIN_TIME_S = ($LOGIN_TIME_M - $LOGIN_TIME_M_int);
+	$LOGIN_TIME_S = ($LOGIN_TIME_S * 60);
+	$LOGIN_TIME_S = round($LOGIN_TIME_S, 0);
+	if ($LOGIN_TIME_S < 10) {$LOGIN_TIME_S = "0$LOGIN_TIME_S";}
+	if ($LOGIN_TIME_M_int < 10) {$LOGIN_TIME_M_int = "0$LOGIN_TIME_M_int";}
+	$LOGIN_TIME_HMS = "$LOGIN_TIME_H_int:$LOGIN_TIME_M_int:$LOGIN_TIME_S";
+	$pfLOGIN_TIME_HMS =		sprintf("%8s", $LOGIN_TIME_HMS);
+
+echo "-----------------------------------------\n";
+echo "TOTAL LOGGED-IN TIME:    $pfLOGIN_TIME_HMS\n";
+
+}
+
+
+
+?>
+
+
\ No newline at end of file
diff --git a/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_it/AST_inboundEXTstats.php b/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_it/AST_inboundEXTstats.php
new file mode 100644
index 00000000..1dedbeab
--- /dev/null
+++ b/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_it/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["INVIA"]))					{$INVIA=$_GET["INVIA"];}
+	elseif (isset($_POST["INVIA"]))		{$INVIA=$_POST["INVIA"];}
+
+$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 "Username/Password non validi: |$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: Statistiche Chiamate In Entrata\n";
+echo "
\n"; +echo "\n"; +echo "\n"; +echo "\n"; +echo "\n"; +echo "\n\n"; + +echo "
\n\n";
+
+
+if (!$group)
+{
+echo "\n\n";
+echo "SELEZIONARE UN NUMERO E UNA DATA QUI IN ALTO E CLICCARE SU INVIA\n";
+}
+
+else
+{
+
+
+echo "ASTERISK: Statistiche Chiamate In Entrata                      $NOW_TIME\n";
+
+echo "\n";
+echo "---------- TOTALI\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 "Totale chiamate ricevute da questo numero:       $TOTALcalls\n";
+echo "Average Call Length(seconds) for all Calls:   $average_hold_seconds\n";
+
+echo "\n";
+echo "---------- ABBATTUTE\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 "---------- STATISTICHE TEMPO\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 "GRAFICO AD INCREMENTO DI 15 MINUTI DEL TOTALE DELLE CHIAMATE\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/branches/agc_2.0.4/LANG_www/vicidial_it/AST_server_performance.php b/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_it/AST_server_performance.php new file mode 100644 index 00000000..032f7523 --- /dev/null +++ b/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_it/AST_server_performance.php @@ -0,0 +1,306 @@ + LICENSE: GPLv2 +# +# CHANGES +# +# 60619-1732 - Added variable filtering to eliminate SQL injection attack threat +# - Added required user/pass to gain access to this page +# 70417-1106 - Changed time frame to be definable per time range on a single day +# - Fixed vertical scaling issues +# + +require("dbconnect.php"); + +$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; +$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; +$PHP_SELF=$_SERVER['PHP_SELF']; +if (isset($_GET["query_date"])) {$query_date=$_GET["query_date"];} + elseif (isset($_POST["query_date"])) {$query_date=$_POST["query_date"];} +if (isset($_GET["begin_query_time"])) {$begin_query_time=$_GET["begin_query_time"];} + elseif (isset($_POST["begin_query_time"])) {$begin_query_time=$_POST["begin_query_time"];} +if (isset($_GET["end_query_time"])) {$end_query_time=$_GET["end_query_time"];} + elseif (isset($_POST["end_query_time"])) {$end_query_time=$_POST["end_query_time"];} +if (isset($_GET["group"])) {$group=$_GET["group"];} + elseif (isset($_POST["group"])) {$group=$_POST["group"];} +if (isset($_GET["submit"])) {$submit=$_GET["submit"];} + elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];} +if (isset($_GET["INVIA"])) {$INVIA=$_GET["INVIA"];} + elseif (isset($_POST["INVIA"])) {$INVIA=$_POST["INVIA"];} + +$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' and modify_servers='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 "Username/Password non validi: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n"; + exit; + } + +# path from root to where ploticus files will be stored +$PLOTroot = "vicidial/ploticus"; +$DOCroot = "$WeBServeRRooT/$PLOTroot/"; + +$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($begin_query_time)) {$begin_query_time = '09:00:00';} +if (!isset($end_query_time)) {$end_query_time = '15:30:00';} +if (!isset($group)) {$group = '';} + +$stmt="select server_ip from servers;"; +$rslt=mysql_query($stmt, $link); +if ($DB) {echo "$stmt\n";} +$servers_to_print = mysql_num_rows($rslt); +$i=0; +while ($i < $servers_to_print) + { + $row=mysql_fetch_row($rslt); + $groups[$i] =$row[0]; + $i++; + } +?> + + + + + +\n"; +echo "VICIDIAL: Server Performance\n"; +echo "
\n"; +echo "Date:   \n"; +echo "Time: \n"; +echo "to \n"; +echo "Server: \n"; +echo "\n"; +echo "             REPORT \n"; +echo "\n\n"; + +echo "
\n";
+
+
+if (!$group)
+{
+echo "\n";
+echo "PER FAVORE SELEZIONA UN SERVER, UNA DATA, UN INTERVALLO DI TEMPO E PREMI INVIA\n";
+}
+
+else
+{
+
+$query_date_BEGIN = "$query_date $begin_query_time";   
+$query_date_END = "$query_date $end_query_time";
+$time_BEGIN = "$begin_query_time";   
+$time_END = "$end_query_time";
+
+echo "VICIDIAL: Server Performance                             $NOW_TIME\n";
+
+echo "Intervallo Di Tempo: $query_date_BEGIN to $query_date_END\n\n";
+echo "---------- TOTALI, PEAKS and AVERAGES\n";
+
+$stmt="select AVG(sysload),AVG(channels_total),MAX(sysload),MAX(channels_total),MAX(processes) from server_performance where start_time <= '" . mysql_real_escape_string($query_date_END) . "' and start_time >= '" . mysql_real_escape_string($query_date_BEGIN) . "' and server_ip='" . mysql_real_escape_string($group) . "';";
+$rslt=mysql_query($stmt, $link);
+if ($DB) {echo "$stmt\n";}
+$row=mysql_fetch_row($rslt);
+$AVGload =	sprintf("%10s", $row[0]);
+$AVGchannels =	sprintf("%10s", $row[1]);
+$HIGHload =	$row[2];
+	$HIGHmulti = intval($HIGHload / 100);
+$HIGHchannels =	$row[3];
+$HIGHprocesses =$row[4];
+if ($row[2] > $row[3]) {$HIGHlimit = $row[2];}
+else {$HIGHlimit = $row[3];}
+if ($HIGHlimit < $row[4]) {$HIGHlimit = $row[4];}
+
+$stmt="select AVG(cpu_user_percent),AVG(cpu_system_percent),AVG(cpu_idle_percent) from server_performance where start_time <= '" . mysql_real_escape_string($query_date_END) . "' and start_time >= '" . mysql_real_escape_string($query_date_BEGIN) . "' and server_ip='" . mysql_real_escape_string($group) . "';";
+$rslt=mysql_query($stmt, $link);
+if ($DB) {echo "$stmt\n";}
+$row=mysql_fetch_row($rslt);
+$AVGcpuUSER =	sprintf("%10s", $row[0]);
+$AVGcpuSYSTEM =	sprintf("%10s", $row[1]);
+$AVGcpuIDLE =	sprintf("%10s", $row[2]);
+
+$stmt="select count(*),SUM(length_in_min) from call_log where extension NOT IN('8365','8366','8367') and  start_time <= '" . mysql_real_escape_string($query_date_END) . "' and start_time >= '" . mysql_real_escape_string($query_date_BEGIN) . "' and server_ip='" . mysql_real_escape_string($group) . "';";
+$rslt=mysql_query($stmt, $link);
+if ($DB) {echo "$stmt\n";}
+$row=mysql_fetch_row($rslt);
+$TOTALcalls =	sprintf("%10s", $row[0]);
+$OFFHOOKtime =	sprintf("%10s", $row[1]);
+
+
+echo "Total Calls in/out on this server:        $TOTALcalls\n";
+echo "Total Off-Hook time on this server (min): $OFFHOOKtime\n";
+echo "Average/Peak channels in use for server:  $AVGchannels / $HIGHchannels\n";
+echo "Average/Peak load for server:             $AVGload / $HIGHload\n";
+echo "Average USER process cpu percentage:      $AVGcpuUSER %\n";
+echo "Average SYSTEM process cpu percentage:    $AVGcpuSYSTEM %\n";
+echo "Average IDLE process cpu percentage:      $AVGcpuIDLE %\n";
+
+echo "\n";
+echo "---------- LINE GRAPH:\n";
+
+
+
+##############################
+#########  Graph stats
+
+$DAT = '.dat';
+$HTM = '.htm';
+$PNG = '.png';
+$filedate = date("Y-m-d_His");
+$DATfile = "$group$query_date$shift$filedate$DAT";
+$HTMfile = "$group$query_date$shift$filedate$HTM";
+$PNGfile = "$group$query_date$shift$filedate$PNG";
+
+$HTMfp = fopen ("$DOCroot/$HTMfile", "a");
+$DATfp = fopen ("$DOCroot/$DATfile", "a");
+
+$stmt="select DATE_FORMAT(start_time,'%H:%i:%s') as timex,sysload,processes,channels_total,live_recordings,cpu_user_percent,cpu_system_percent from server_performance where server_ip='" . mysql_real_escape_string($group) . "' and start_time <= '" . mysql_real_escape_string($query_date_END) . "' and start_time >= '" . mysql_real_escape_string($query_date_BEGIN) . "' order by timex;";
+$rslt=mysql_query($stmt, $link);
+if ($DB) {echo "$stmt\n";}
+$rows_to_print = mysql_num_rows($rslt);
+$i=0;
+while ($i < $rows_to_print)
+	{
+	$row=mysql_fetch_row($rslt);
+	$row[5] = intval(($row[5] + $row[6]) * $HIGHmulti);
+	$row[6] = intval($row[6] * $HIGHmulti);
+	fwrite ($DATfp, "$row[5]\t$row[6]\t$row[0]\t$row[1]\t$row[2]\t$row[3]\n");
+	$i++;
+	}
+fclose($DATfp);
+
+$rows_to_max = ($rows_to_print + 100);
+
+#print "rows: $i\n";
+
+$time_scale_abb = '5 minutes';
+$time_scale_tick = '1 minute';
+if ($i > 1000) {$time_scale_abb = '10 minutes';   $time_scale_tick = '2 minutes';}
+if ($i > 2000) {$time_scale_abb = '20 minutes';   $time_scale_tick = '4 minutes';}
+if ($i > 3000) {$time_scale_abb = '30 minutes';   $time_scale_tick = '5 minutes';}
+if ($i > 4000) {$time_scale_abb = '40 minutes';   $time_scale_tick = '10 minutes';}
+if ($i > 5000) {$time_scale_abb = '60 minutes';   $time_scale_tick = '15 minutes';}
+if ($i > 6000) {$time_scale_abb = '90 minutes';   $time_scale_tick = '15 minutes';}
+if ($i > 7000) {$time_scale_abb = '120 minutes';   $time_scale_tick = '30 minutes';}
+
+$HTMcontent  = '';
+$HTMcontent .= "#proc page\n";
+$HTMcontent .= "#if @DEVICE in png,gif\n";
+$HTMcontent .= "   scale: 0.6\n";
+$HTMcontent .= "\n";
+$HTMcontent .= "#endif\n";
+$HTMcontent .= "#proc getdata\n";
+$HTMcontent .= "file: $DOCroot/$DATfile\n";
+$HTMcontent .= "fieldnames: userproc sysproc time load processes channels\n";
+$HTMcontent .= "\n";
+$HTMcontent .= "#proc areadef\n";
+$HTMcontent .= "title: Server $group   $query_date_BEGIN to $query_date_END\n";
+$HTMcontent .= "titledetails: size=14  align=C\n";
+$HTMcontent .= "rectangle: 1 1 14 7\n";
+$HTMcontent .= "xscaletype: time hh:mm:ss\n";
+$HTMcontent .= "xrange: $time_BEGIN $time_END\n";
+$HTMcontent .= "yrange: 0 $HIGHlimit\n";
+$HTMcontent .= "\n";
+$HTMcontent .= "#proc xaxis\n";
+$HTMcontent .= "stubs: inc $time_scale_abb\n";
+$HTMcontent .= "minorticinc: $time_scale_tick\n";
+$HTMcontent .= "stubformat: hh:mm:ssa\n";
+$HTMcontent .= "\n";
+$HTMcontent .= "#proc yaxis\n";
+$HTMcontent .= "stubs: inc 50\n";
+$HTMcontent .= "grid: color=yellow\n";
+$HTMcontent .= "gridskip: min\n";
+$HTMcontent .= "ticincrement: 100 1000\n";
+$HTMcontent .= "\n";
+$HTMcontent .= "#proc lineplot\n";
+$HTMcontent .= "xfield: time\n";
+$HTMcontent .= "yfield: userproc\n";
+$HTMcontent .= "linedetails: color=purple width=.5\n";
+$HTMcontent .= "fill: lavender\n";
+$HTMcontent .= "legendlabel: user proc%\n";
+$HTMcontent .= "maxinpoints: $rows_to_max\n";
+$HTMcontent .= "\n";
+$HTMcontent .= "#proc lineplot\n";
+$HTMcontent .= "xfield: time\n";
+$HTMcontent .= "yfield: sysproc\n";
+$HTMcontent .= "linedetails: color=yelloworange width=.5\n";
+$HTMcontent .= "fill: dullyellow\n";
+$HTMcontent .= "legendlabel: system proc%\n";
+$HTMcontent .= "maxinpoints: $rows_to_max\n";
+$HTMcontent .= "\n";
+$HTMcontent .= "#proc curvefit\n";
+$HTMcontent .= "xfield: time\n";
+$HTMcontent .= "yfield: load\n";
+$HTMcontent .= "linedetails: color=blue width=.5\n";
+$HTMcontent .= "legendlabel: load\n";
+$HTMcontent .= "maxinpoints: $rows_to_max\n";
+$HTMcontent .= "\n";
+$HTMcontent .= "#proc curvefit\n";
+$HTMcontent .= "xfield: time\n";
+$HTMcontent .= "yfield: processes\n";
+$HTMcontent .= "linedetails: color=red width=.5\n";
+$HTMcontent .= "legendlabel: processes\n";
+$HTMcontent .= "maxinpoints: $rows_to_max\n";
+$HTMcontent .= "\n";
+$HTMcontent .= "#proc curvefit\n";
+$HTMcontent .= "xfield: time\n";
+$HTMcontent .= "yfield: channels\n";
+$HTMcontent .= "linedetails: color=green width=.5\n";
+$HTMcontent .= "legendlabel: channels\n";
+$HTMcontent .= "maxinpoints: $rows_to_max\n";
+$HTMcontent .= "\n";
+$HTMcontent .= "#proc legend\n";
+$HTMcontent .= "location: max-2 max\n";
+$HTMcontent .= "seglen: 0.2\n";
+$HTMcontent .= "\n";
+
+fwrite ($HTMfp, "$HTMcontent");
+fclose($HTMfp);
+
+
+passthru("/usr/local/bin/pl -png $DOCroot/$HTMfile -o $DOCroot/$PNGfile");
+
+sleep(1);
+
+echo "
\n"; +echo "\n"; +echo "\n"; + + +echo ""; + +} + + + +?> + + \ No newline at end of file diff --git a/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_it/AST_timeonVDAD.php b/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_it/AST_timeonVDAD.php new file mode 100644 index 00000000..41f62127 --- /dev/null +++ b/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_it/AST_timeonVDAD.php @@ -0,0 +1,374 @@ + LICENSE: GPLv2 +### +# live real-time stats for the VICIDIAL Auto-Dialer +# +# CHANGES +# +# 60620-1037 - Added variable filtering to eliminate SQL injection attack threat +# - Added required user/pass to gain access to this page +# 61114-2004 - Changed to display CLOSER and DEFAULT, added trunk shortage +# + +header ("Content-type: text/html; charset=utf-8"); + +require("dbconnect.php"); + +$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; +$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; +$PHP_SELF=$_SERVER['PHP_SELF']; +if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} + elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} +if (isset($_GET["reset_counter"])) {$reset_counter=$_GET["reset_counter"];} + elseif (isset($_POST["reset_counter"])) {$reset_counter=$_POST["reset_counter"];} +if (isset($_GET["submit"])) {$submit=$_GET["submit"];} + elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];} +if (isset($_GET["INVIA"])) {$INVIA=$_GET["INVIA"];} + elseif (isset($_POST["INVIA"])) {$INVIA=$_POST["INVIA"];} +if (isset($_GET["closer_display"])) {$closer_display=$_GET["closer_display"];} + elseif (isset($_POST["closer_display"])) {$closer_display=$_POST["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 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 "Username/Password non validi: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n"; + exit; + } + +$NOW_TIME = date("Y-m-d H:i:s"); +$STARTtime = date("U"); +$epochSIXhoursAGO = ($STARTtime - 21600); +$timeSIXhoursAGO = date("Y-m-d H:i:s",$epochSIXhoursAGO); + +$reset_counter++; + +if ($reset_counter > 7) + { + $reset_counter=0; + + $stmt="update park_log set status='HUNGUP' where hangup_time is not null;"; +# $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + + if ($DB) + { + $stmt="delete from park_log where grab_time < '$timeSIXhoursAGO' and (hangup_time is null or hangup_time='');"; +# $rslt=mysql_query($stmt, $link); + echo "$stmt\n"; + } + } + +?> + + + +\n"; +echo " + + +\n"; +echo"\n"; +echo "VICIDIAL: Time On VDAD\n"; +echo "
";
+
+###################################################################################
+###### SERVER INFORMATION
+###################################################################################
+
+$stmt="select sum(local_trunk_shortage) from vicidial_campaign_server_stats where server_ip='" . mysql_real_escape_string($server_ip) . "';";
+$rslt=mysql_query($stmt, $link);
+$row=mysql_fetch_row($rslt);
+$balanceSHORT = $row[0];
+
+echo "SERVER: $server_ip\n";
+
+
+
+###################################################################################
+###### TIME ON SYSTEM
+###################################################################################
+
+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 | REPORT\n\n";
+
+if ($closer_display>0)
+{
+echo "+------------|--------+-----------+---------------------+--------+----------+---------+--------------+--------+\n";
+echo "| STATION    | USER   | SESSIONID | CHANNEL             | STATUS | CALLTIME | MINUTES | CAMPAIGN     | FRONT  |\n";
+echo "+------------|--------+-----------+---------------------+--------+----------+---------+--------------+--------+\n";
+}
+else
+{
+echo "+------------|--------+-----------+---------------------+--------+----------+---------+\n";
+echo "| STATION    | USER   | SESSIONID | CHANNEL             | STATUS | CALLTIME | MINUTES |\n";
+echo "+------------|--------+-----------+---------------------+--------+----------+---------+\n";
+}
+
+$stmt="select extension,user,conf_exten,channel,status,last_call_time,UNIX_TIMESTAMP(last_call_time),UNIX_TIMESTAMP(last_call_finish),uniqueid,lead_id from vicidial_live_agents where status NOT IN('PAUSED') and server_ip='" . mysql_real_escape_string($server_ip) . "' order by extension;";
+$rslt=mysql_query($stmt, $link);
+if ($DB) {echo "$stmt\n";}
+$talking_to_print = mysql_num_rows($rslt);
+	if ($talking_to_print > 0)
+	{
+	$i=0;
+	while ($i < $talking_to_print)
+		{
+		$row=mysql_fetch_row($rslt);
+			if (eregi("READY|PAUSED|CLOSER",$row[4]))
+			{
+			$row[3]='';
+			$row[5]='- WAIT -';
+			$row[6]=$row[7];
+			}
+		$extension[$i] = eregi_replace('Local/',"",$row[0]);
+		$extension[$i] =		sprintf("%-10s", $extension[$i]);
+			while(strlen($extension[$i])>10) {$extension[$i] = substr("$extension[$i]", 0, -1);}
+		$user[$i] =				sprintf("%-6s", $row[1]);
+		$sessionid[$i] =		sprintf("%-9s", $row[2]);
+		$channel[$i] =			sprintf("%-19s", $row[3]);
+			$cc[$i]=0;
+		while ( (strlen($channel[$i]) > 19) and ($cc[$i] < 100) )
+			{
+			$channel[$i] = eregi_replace(".$","",$channel[$i]);   
+			$cc[$i]++;
+			if (strlen($channel[$i]) <= 19) {$cc[$i]=101;}
+			}
+		$status[$i] =			sprintf("%-6s", $row[4]);
+		$start_time[$i] =		sprintf("%-8s", $row[5]);
+			$cd[$i]=0;
+		while ( (strlen($start_time[$i]) > 8) and ($cd[$i] < 100) )
+			{
+			$start_time[$i] = eregi_replace("^.","",$start_time[$i]);   
+			$cd[$i]++;
+			if (strlen($start_time[$i]) <= 8) {$cd[$i]=101;}
+			}
+		$uniqueid[$i] =			$row[8];
+		$lead_id[$i] =			$row[9];
+		$closer[$i] =			$row[1];
+		$call_time_S[$i] = ($STARTtime - $row[6]);
+
+		$call_time_M[$i] = ($call_time_S[$i] / 60);
+		$call_time_M[$i] = round($call_time_M[$i], 2);
+		$call_time_M_int[$i] = intval("$call_time_M[$i]");
+		$call_time_SEC[$i] = ($call_time_M[$i] - $call_time_M_int[$i]);
+		$call_time_SEC[$i] = ($call_time_SEC[$i] * 60);
+		$call_time_SEC[$i] = round($call_time_SEC[$i], 0);
+		if ($call_time_SEC[$i] < 10) {$call_time_SEC[$i] = "0$call_time_SEC[$i]";}
+		$call_time_MS[$i] = "$call_time_M_int[$i]:$call_time_SEC[$i]";
+		$call_time_MS[$i] =		sprintf("%7s", $call_time_MS[$i]);
+
+		if ($closer_display<1)
+			{
+			$G = '';		$EG = '';
+			if ($call_time_M_int[$i] >= 5) {$G=''; $EG='';}
+			if ($call_time_M_int[$i] >= 10) {$G=''; $EG='';}
+			if (eregi("PAUSED",$row[4])) 
+				{
+				if ($call_time_M_int >= 1) 
+					{$i++; continue;} 
+				else
+					{$G=''; $EG='';}
+				}
+			$agentcount++;
+			echo "| $G$extension[$i]$EG | $G$user[$i]$EG | $G$sessionid[$i]$EG | $G$channel[$i]$EG | $G$status[$i]$EG | $G$start_time[$i]$EG | $G$call_time_MS[$i]$EG |\n";
+			}
+		$i++;
+		}
+
+		if ($closer_display>0)
+		{
+
+			$ext_count = $i;
+			$i=0;
+		while ($i < $ext_count)
+			{
+
+			$stmt="select campaign_id from vicidial_auto_calls where lead_id='$lead_id[$i]' and server_ip='" . mysql_real_escape_string($server_ip) . "';";
+			$rslt=mysql_query($stmt, $link);
+			if ($DB) {echo "$stmt\n";}
+			$camp_to_print = mysql_num_rows($rslt);
+			if ($camp_to_print > 0)
+				{
+				$row=mysql_fetch_row($rslt);
+				$campaign = sprintf("%-12s", $row[0]);
+				$camp_color = $row[0];
+				}
+			else
+				{$campaign = 'DEAD        ';   	$camp_color = 'DEAD';}
+			if (eregi("READY|PAUSED|CLOSER",$status[$i]))
+				{$campaign = '            ';   	$camp_color = '';}
+
+			$stmt="select user from vicidial_xfer_log where lead_id='$lead_id[$i]' and closer='$closer[$i]' order by call_date desc limit 1;";
+			$rslt=mysql_query($stmt, $link);
+			if ($DB) {echo "$stmt\n";}
+			$xfer_to_print = mysql_num_rows($rslt);
+			if ($xfer_to_print > 0)
+				{
+				$row=mysql_fetch_row($rslt);
+				$fronter = sprintf("%-6s", $row[0]);
+				}
+			else
+				{$fronter = '      ';}
+
+			$G = '';		$EG = '';
+			$G=""; $EG='';
+		#	if ($call_time_M_int[$i] >= 5) {$G=''; $EG='';}
+		#	if ($call_time_M_int[$i] >= 10) {$G=''; $EG='';}
+
+			echo "| $G$extension[$i]$EG | $G$user[$i]$EG | $G$sessionid[$i]$EG | $G$channel[$i]$EG | $G$status[$i]$EG | $G$start_time[$i]$EG | $G$call_time_MS[$i]$EG | $G$campaign$EG | $G$fronter$EG |\n";
+
+			$i++;
+			}
+		echo "+------------|--------+-----------+---------------------+--------+----------+---------+--------------+--------+\n";
+		echo "  $i Operatori collegati al server $server_ip\n\n";
+	#	echo "             - 5 o piu` minuti in conversazione\n";
+	#	echo "             - Oltre 10 minuti in conversazione\n";
+		}
+	else
+		{
+		echo "+------------|--------+-----------+---------------------+--------+----------+---------+\n";
+		echo "  $agentcount Operatori collegati al server $server_ip\n\n";
+
+		echo "             - Operatori in pausa\n";
+		echo "             - 5 o piu` minuti in conversazione\n";
+		echo "             - Oltre 10 minuti in conversazione\n";
+		}
+
+	}
+	else
+	{
+	echo "**************************************************************************************\n";
+	echo "**************************************************************************************\n";
+	echo "********************************* NESSUN OPERATORE IN CONVERSAZIONE *********************************\n";
+	echo "**************************************************************************************\n";
+	echo "**************************************************************************************\n";
+	}
+
+
+###################################################################################
+###### OUTBOUND CALLS
+###################################################################################
+#echo "\n\n";
+echo "----------------------------------------------------------------------------------------";
+echo "\n\n";
+echo "VICIDIAL: Time On VDAD            TRUNK SHORT: $balanceSHORT              $NOW_TIME\n\n";
+echo "+---------------------+--------+--------------+--------------------+----------+---------+\n";
+echo "| CHANNEL             | STATUS | CAMPAIGN     | PHONE NUMBER       | CALLTIME | MINUTES |\n";
+echo "+---------------------+--------+--------------+--------------------+----------+---------+\n";
+
+$stmt="select channel,status,campaign_id,phone_code,phone_number,call_time,UNIX_TIMESTAMP(call_time) from vicidial_auto_calls where status NOT IN('XFER') and server_ip='" . mysql_real_escape_string($server_ip) . "' order by auto_call_id desc;";
+$rslt=mysql_query($stmt, $link);
+if ($DB) {echo "$stmt\n";}
+$parked_to_print = mysql_num_rows($rslt);
+	if ($parked_to_print > 0)
+	{
+	$i=0;
+	while ($i < $parked_to_print)
+		{
+		$row=mysql_fetch_row($rslt);
+
+		$channel =			sprintf("%-19s", $row[0]);
+			$cc=0;
+		while ( (strlen($channel) > 19) and ($cc < 100) )
+			{
+			$channel = eregi_replace(".$","",$channel);   
+			$cc++;
+			if (strlen($channel) <= 19) {$cc=101;}
+			}
+		$start_time =		sprintf("%-8s", $row[5]);
+			$cd=0;
+		while ( (strlen($start_time) > 8) and ($cd < 100) )
+			{
+			$start_time = eregi_replace("^.","",$start_time);   
+			$cd++;
+			if (strlen($start_time) <= 8) {$cd=101;}
+			}
+		$status =			sprintf("%-6s", $row[1]);
+		$campaign =			sprintf("%-12s", $row[2]);
+			$all_phone = "$row[3]$row[4]";
+		$number_dialed =	sprintf("%-18s", $all_phone);
+		$call_time_S = ($STARTtime - $row[6]);
+
+		$call_time_M = ($call_time_S / 60);
+		$call_time_M = round($call_time_M, 2);
+		$call_time_M_int = intval("$call_time_M");
+		$call_time_SEC = ($call_time_M - $call_time_M_int);
+		$call_time_SEC = ($call_time_SEC * 60);
+		$call_time_SEC = round($call_time_SEC, 0);
+		if ($call_time_SEC < 10) {$call_time_SEC = "0$call_time_SEC";}
+		$call_time_MS = "$call_time_M_int:$call_time_SEC";
+		$call_time_MS =		sprintf("%7s", $call_time_MS);
+		$G = '';		$EG = '';
+		if (eregi("LIVE",$status)) {$G=''; $EG='';}
+	#	if ($call_time_M_int >= 6) {$G=''; $EG='';}
+
+		echo "| $G$channel$EG | $G$status$EG | $G$campaign$EG | $G$number_dialed$EG | $G$start_time$EG | $G$call_time_MS$EG |\n";
+
+		$i++;
+		}
+
+		echo "+---------------------+--------+--------------+--------------------+----------+---------+\n";
+		echo "  $i chiamate effettuate dal server $server_ip\n\n";
+
+		echo "             - CHIAMATA IN ATTESA\n";
+	#	echo "             - Over 5 minutes on hold\n";
+
+		}
+	else
+	{
+	echo "***************************************************************************************\n";
+	echo "***************************************************************************************\n";
+	echo "******************************* NESSUNA CHIAMATA IN ATTESA*********************************\n";
+	echo "***************************************************************************************\n";
+	echo "***************************************************************************************\n";
+	}
+
+
+?>
+
+ + \ No newline at end of file diff --git a/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_it/AST_timeonVDADall.php b/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_it/AST_timeonVDADall.php new file mode 100644 index 00000000..bda5d606 --- /dev/null +++ b/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_it/AST_timeonVDADall.php @@ -0,0 +1,907 @@ + 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) +# 70619-1339 - Added Status Category tally display +# 71029-1900 - Changed CLOSER-type to not require campaign_id restriction +# 80424-0515 - Added non_latin lookup from system_settings +# + +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["inbound"])) {$inbound=$_GET["inbound"];} + elseif (isset($_POST["inbound"])) {$inbound=$_POST["inbound"];} +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["INVIA"])) {$INVIA=$_GET["INVIA"];} + elseif (isset($_POST["INVIA"])) {$INVIA=$_POST["INVIA"];} +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["CALLSdisplay"])) {$CALLSdisplay=$_GET["CALLSdisplay"];} + elseif (isset($_POST["CALLSdisplay"])) {$CALLSdisplay=$_POST["CALLSdisplay"];} + +############################################# +##### START SYSTEM_SETTINGS LOOKUP ##### +$stmt = "SELECT use_non_latin FROM system_settings;"; +$rslt=mysql_query($stmt, $link); +if ($DB) {echo "$stmt\n";} +$qm_conf_ct = mysql_num_rows($rslt); +$i=0; +while ($i < $qm_conf_ct) + { + $row=mysql_fetch_row($rslt); + $non_latin = $row[0]; + $i++; + } +##### END SETTINGS LOOKUP ##### +########################################### + + +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 +if (!isset($CALLSdisplay)) {$CALLSdisplay=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'");} +$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 "Username/Password non validi: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n"; + exit; + } + +$NOW_TIME = date("Y-m-d H:i:s"); +$NOW_DAY = date("Y-m-d"); +$NOW_HOUR = date("H:i:s"); +$STARTtime = date("U"); +$epochSIXhoursAGO = ($STARTtime - 21600); +$timeSIXhoursAGO = date("Y-m-d H:i:s",$epochSIXhoursAGO); + +$stmt="select campaign_id from vicidial_campaigns where active='Y';"; +$rslt=mysql_query($stmt, $link); +if (!isset($DB)) {$DB=0;} +if ($DB) {echo "$stmt\n";} +$groups_to_print = mysql_num_rows($rslt); +$i=0; +while ($i < $groups_to_print) + { + $row=mysql_fetch_row($rslt); + $groups[$i] =$row[0]; + $i++; + } + +$stmt="select * from vicidial_user_groups;"; +$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"; + +$stmt = "select count(*) from vicidial_campaigns where campaign_id='$group' and campaign_allow_inbound='Y';"; +$rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + $campaign_allow_inbound = $row[0]; + +echo "\n"; +echo"\n"; +echo "VICIDIAL: Time On VDAD Campagna: $group\n"; +echo "
\n"; +echo "VICIDIAL Campagna: \n"; +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 "PIU LENTO | "; +echo "INIZIA"; +echo "       MODIFICA | \n"; +echo "RIEPILOGO | \n"; +echo "REPORT \n"; +echo "\n\n"; + + +if (!$group) {echo "

per favore seleziona una campagna dal menu qui in alto\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;"; + } +$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;"; + } +$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,status_category_1,status_category_count_1,status_category_2,status_category_count_2,status_category_3,status_category_count_3,status_category_4,status_category_count_4 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),min(status_category_1),sum(status_category_count_1),min(status_category_2),sum(status_category_count_2),min(status_category_3),sum(status_category_count_3),min(status_category_4),sum(status_category_count_4) from vicidial_campaign_stats;"; + } +$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]; +$VSCcat1 = $row[8]; +$VSCcat1tally = $row[9]; +$VSCcat2 = $row[10]; +$VSCcat2tally = $row[11]; +$VSCcat3 = $row[12]; +$VSCcat3tally = $row[13]; +$VSCcat4 = $row[14]; +$VSCcat4tally = $row[15]; + +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;"; + } +$rslt=mysql_query($stmt, $link); +$row=mysql_fetch_row($rslt); +$balanceSHORT = $row[0]; + +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
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
"; +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 ""; +echo ""; +echo "
LIVELLO CHIAMATE:  $DIALlev    TRUNK SHORT/FILL:  $balanceSHORT / $balanceFILL     FILTRO:  $DIALfilter   DATA:   $NOW_TIME
- min   LIVELLO MAX:  $maxDIALlev   ABBATTIMENTO MAX:  $DROPmax%    TARGET DIFF:  $targetDIFF     INTENSITY:  $ADAintense    
TIMEOUT CHIAMATA:  $DIALtimeout  TAPER TIME:  $TAPERtime  LOCAL TIME:  $CALLtime  AVAIL ONLY:  $ADAavailonly  
CONTATTI CHIAMABILI:  $DAleads     CHIAMATE OGGI:  $callsTODAY     MEDIA OPERATORI:  $agentsONEMIN     METODO CHIAMATA:  $DIALmethod    
LIVELLO CODA CHIAMATE:  $HOPlev     ABBATTUTE / RISPOSTE:  $dropsTODAY / $answersTODAY   DL DIFF:  $diffONEMIN     ESITI:  $DIALstatuses    
CONTATTI IN CODA:  $VDhop     PERCENT ABBATTIMENTO:  "; +if ($drpctTODAY >= $DROPmax) + {echo "$drpctTODAY%";} +else + {echo "$drpctTODAY%";} +echo "    DIFF:  $diffpctONEMIN%     ORDINE:  $DIALorder    
"; +if ( (!eregi('NULL',$VSCcat1)) and (strlen($VSCcat1)>0) ) + {echo "$VSCcat1:   $VSCcat1tally       \n";} +if ( (!eregi('NULL',$VSCcat2)) and (strlen($VSCcat2)>0) ) + {echo "$VSCcat2:   $VSCcat2tally       \n";} +if ( (!eregi('NULL',$VSCcat3)) and (strlen($VSCcat3)>0) ) + {echo "$VSCcat3:   $VSCcat3tally       \n";} +if ( (!eregi('NULL',$VSCcat4)) and (strlen($VSCcat4)>0) ) + {echo "$VSCcat4:   $VSCcat4tally       \n";} +echo "
"; + +if ($adastats<2) + { + echo "+ VISUALIZZA PIU DATI"; + } +if ($UGdisplay>0) + { + echo "       NASCONDI GRUPPI UTENTI"; + } +else + { + echo "       MOSTRA GRUPPI UTENTI"; + } +if ($UidORname>0) + { + echo "       MOSTRA ID OPERATORE"; + } +else + { + echo "       MOSTRA NOME OPERATORE"; + } +if ($SERVdisplay>0) + { + echo "       NASCONDI INFO SERVER"; + } +else + { + echo "       MOSTRA INFO SERVER"; + } +if ($CALLSdisplay>0) + { + echo "       NASCONDI DETTAGLI CHIAMATE IN ATTESA"; + } +else + { + echo "       MOSTRA DETTAGLI CHIAMATE IN ATTESA"; + } +echo "
"; + +echo "\n\n"; +} +################################################################################### +###### INBOUND/OUTBOUND CALLS +################################################################################### +if ($campaign_allow_inbound > 0) + { + $stmt="select closer_campaigns from vicidial_campaigns where campaign_id='" . mysql_real_escape_string($group) . "';"; + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + $closer_campaigns = preg_replace("/^ | -$/","",$row[0]); + $closer_campaigns = preg_replace("/ /","','",$closer_campaigns); + $closer_campaigns = "'$closer_campaigns'"; + + $stmtB="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 IN('OUT','OUTBALANCE')) ) order by campaign_id,call_time;"; + } +else + { + if ($group=='XXXX-ALL-ACTIVE-XXXX') {$groupSQL = '';} + else {$groupSQL = " and campaign_id='" . mysql_real_escape_string($group) . "'";} + + $stmtB="from vicidial_auto_calls where status NOT IN('XFER') $groupSQL order by campaign_id,call_time;"; + } +if ($CALLSdisplay > 0) + { + $stmtA = "SELECT status,campaign_id,phone_number,server_ip,UNIX_TIMESTAMP(call_time),call_type"; + } +else + { + $stmtA = "SELECT status"; + } + + +$k=0; +$stmt = "$stmtA $stmtB"; +$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++; + + if ($CALLSdisplay > 0) + { + $CDstatus[$k] = $row[0]; + $CDcampaign_id[$k] = $row[1]; + $CDphone_number[$k] = $row[2]; + $CDserver_ip[$k] = $row[3]; + $CDcall_time[$k] = $row[4]; + $CDcall_type[$k] = $row[5]; + $k++; + } + } + 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 ($campaign_allow_inbound > 0) + {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 " NESSUNA CHIAMATA IN ATTESA\n"; + } + + + +################################################################################### +###### CALLS WAITING +################################################################################### + +$Cecho = ''; +$Cecho .= "VICIDIAL: Calls Waiting $NOW_TIME\n"; +$Cecho .= "+--------+--------------+--------------+-----------------+---------+------------+\n"; +$Cecho .= "| STATUS | CAMPAIGN | PHONE NUMBER | SERVER_IP | DIALTIME| CALL TYPE |\n"; +$Cecho .= "+--------+--------------+--------------+-----------------+---------+------------+\n"; + +$p=0; +while($p<$k) + { + $Cstatus = sprintf("%-6s", $CDstatus[$p]); + $Ccampaign_id = sprintf("%-12s", $CDcampaign_id[$p]); + $Cphone_number = sprintf("%-12s", $CDphone_number[$p]); + $Cserver_ip = sprintf("%-15s", $CDserver_ip[$p]); + $Ccall_type = sprintf("%-10s", $CDcall_type[$p]); + + $Ccall_time_S = ($STARTtime - $CDcall_time[$p]); + $Ccall_time_M = ($Ccall_time_S / 60); + $Ccall_time_M = round($Ccall_time_M, 2); + $Ccall_time_M_int = intval("$Ccall_time_M"); + $Ccall_time_SEC = ($Ccall_time_M - $Ccall_time_M_int); + $Ccall_time_SEC = ($Ccall_time_SEC * 60); + $Ccall_time_SEC = round($Ccall_time_SEC, 0); + if ($Ccall_time_SEC < 10) {$Ccall_time_SEC = "0$Ccall_time_SEC";} + $Ccall_time_MS = "$Ccall_time_M_int:$Ccall_time_SEC"; + $Ccall_time_MS = sprintf("%7s", $Ccall_time_MS); + + $G = ''; $EG = ''; + if ($CDcall_type[$p] == 'IN') + { + $G=""; $EG=''; + } + $Cecho .= "| $G$Cstatus$EG | $G$Ccampaign_id$EG | $G$Cphone_number$EG | $G$Cserver_ip$EG | $G$Ccall_time_MS$EG | $G$Ccall_type$EG |\n"; + + $p++; + } +$Cecho .= "+--------+--------------+--------------+-----------------+---------+------------+\n\n"; + +if ($p<1) + {$Cecho='';} + +################################################################################### +###### TIME ON SYSTEM +################################################################################### + +$agent_incall=0; +$agent_ready=0; +$agent_paused=0; +$agent_total=0; + +$Aecho = ''; +$Aecho .= "VICIDIAL: Agents Time On Calls Campagna: $group $NOW_TIME\n"; + + +$HDbegin = "+"; +$HTbegin = "|"; +$HDstation = "------------+"; +$HTstation = " STATION |"; +$HDuser = "--------------------+"; +$HTuser = " UTENTE |"; +$HDusergroup = "--------------+"; +$HTusergroup = " USER GROUP |"; +$HDsessionid = "------------------+"; +$HTsessionid = " SESSIONID |"; +$HDbarge = "-------+"; +$HTbarge = " BARGE |"; +$HDstatus = "----------+"; +$HTstatus = " STATUS |"; +$HDserver_ip = "-----------------+"; +$HTserver_ip = " SERVER IP |"; +$HDcall_server_ip = "-----------------+"; +$HTcall_server_ip = " CALL SERVER IP |"; +$HDtime = "---------+"; +$HTtime = " MM:SS |"; +$HDcampaign = "------------+"; +$HTcampaign = " CAMPAGNA |"; + +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 = ''; + } + + + +$Aline = "$HDbegin$HDstation$HDuser$HDusergroup$HDsessionid$HDbarge$HDstatus$HDserver_ip$HDcall_server_ip$HDtime$HDcampaign\n"; +$Bline = "$HTbegin$HTstation$HTuser$HTusergroup$HTsessionid$HTbarge$HTstatus$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 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;"; + +$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 = 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]; + $sessionid = sprintf("%-9s", $row[2]); + $Lstatus = $row[3]; + $status = sprintf("%-6s", $row[3]); + $server_ip = sprintf("%-15s", $row[4]); + $call_server_ip = sprintf("%-15s", $row[7]); + $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) + { + 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 >= 360) + {$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=''; + if ($SIPmonitorLINK>0) {$L=" LISTEN"; $R='';} + if ($IAXmonitorLINK>0) {$L=" LISTEN"; $R='';} + if ($SIPmonitorLINK>1) {$R=" | BARGE";} + if ($IAXmonitorLINK>1) {$R=" | BARGE";} + + 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 | $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 "$Cecho";
+		echo "$Aecho";
+	}
+	else
+	{
+	echo " NESSUN OPERATORE IN CONVERSAZIONE \n";
+	}
+
+?>
+
+ + diff --git a/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_it/AST_timeonVDADallSUMMARY.php b/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_it/AST_timeonVDADallSUMMARY.php new file mode 100644 index 00000000..a2167ddb --- /dev/null +++ b/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_it/AST_timeonVDADallSUMMARY.php @@ -0,0 +1,442 @@ + LICENSE: GPLv2 +# +# Summary for all campaigns live real-time stats for the VICIDIAL Auto-Dialer all servers +# +# STOP=4000, SLOW=40, GO=4 seconds refresh interval +# +# 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 +# 70619-1339 - Added Status Category tally display +# 71029-1900 - Changed CLOSER-type to not require campaign_id restriction +# + +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["RR"])) {$RR=$_GET["RR"];} + elseif (isset($_POST["RR"])) {$RR=$_POST["RR"];} +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["INVIA"])) {$INVIA=$_GET["INVIA"];} + elseif (isset($_POST["INVIA"])) {$INVIA=$_POST["INVIA"];} + +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 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 "Username/Password non validi: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n"; + exit; + } + +$NOW_TIME = date("Y-m-d H:i:s"); +$STARTtime = date("U"); + +$stmt="select campaign_id from vicidial_campaigns where active='Y';"; +$rslt=mysql_query($stmt, $link); +if (!isset($DB)) {$DB=0;} +if ($DB) {echo "$stmt\n";} +$groups_to_print = mysql_num_rows($rslt); +$i=0; +while ($i < $groups_to_print) + { + $row=mysql_fetch_row($rslt); + $groups[$i] =$row[0]; + $i++; + } + +if (!isset($RR)) {$RR=4;} + +?> + + + + + +\n"; +echo "VICIDIAL: Riepilogo Di Tutte Le Campagne Aggiornato In Tempo Reale/TITLE></HEAD><BODY BGCOLOR=WHITE>\n"; +echo "<b>VICIDIAL: Riepilogo Di Tutte Le Campagne Aggiornato In Tempo Reale/b>           \n"; +echo "<a href=\"$PHP_SELF?group=$group&RR=4000&DB=$DB&adastats=$adastats\">STOP</a> | "; +echo "<a href=\"$PHP_SELF?group=$group&RR=40&DB=$DB&adastats=$adastats\">PIU LENTO</a> | "; +echo "<a href=\"$PHP_SELF?group=$group&RR=4&DB=$DB&adastats=$adastats\">INIZIA</a> "; +echo "       </FONT>\n"; +if ($adastats<2) + { + echo "<a href=\"$PHP_SELF?group=$group&RR=$RR&DB=$DB&adastats=2\"><font size=1>+ VISUALIZZA PIU DATI</font></a>"; + } +else + { + echo "<a href=\"$PHP_SELF?group=$group&RR=$RR&DB=$DB&adastats=1\"><font size=1>- VISUALIZZA MENO DATI</font></a>"; + } +echo "       <a href=\"./admin.php?ADD=999999\">REPORT</a>"; +echo "<BR><BR>\n\n"; + +$k=0; +while($k<$groups_to_print) +{ +$NFB = '<b><font size=3 face="courier">'; +$NFE = '</font></b>'; +$F=''; $FG=''; $B=''; $BG=''; + +$group = $groups[$k]; +echo "<b><a href=\"./AST_timeonVDADall.php?group=$group&RR=$RR&DB=$DB&adastats=$adastats\">$group</a></b>   -   "; +echo "<a href=\"./admin.php?ADD=34&campaign_id=$group\">Modifica</a>\n"; + + +$stmt = "select count(*) from vicidial_campaigns where campaign_id='$group' and campaign_allow_inbound='Y';"; +$rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + $campaign_allow_inbound = $row[0]; + +$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]; +$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) . "';"; +$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,status_category_1,status_category_count_1,status_category_2,status_category_count_2,status_category_3,status_category_count_3,status_category_4,status_category_count_4 from vicidial_campaign_stats where campaign_id='" . mysql_real_escape_string($group) . "';"; +$rslt=mysql_query($stmt, $link); +$row=mysql_fetch_row($rslt); +$DAleads = $row[0]; +$callsTODAY = $row[1]; +$dropsTODAY = $row[2]; +$drpctTODAY = $row[3]; +$diffONEMIN = $row[4]; +$agentsONEMIN = $row[5]; +$balanceFILL = $row[6]; +$answersTODAY = $row[7]; +$VSCcat1 = $row[8]; +$VSCcat1tally = $row[9]; +$VSCcat2 = $row[10]; +$VSCcat2tally = $row[11]; +$VSCcat3 = $row[12]; +$VSCcat3tally = $row[13]; +$VSCcat4 = $row[14]; +$VSCcat4tally = $row[15]; + +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) . "';"; +$rslt=mysql_query($stmt, $link); +$row=mysql_fetch_row($rslt); +$balanceSHORT = $row[0]; + +echo "<BR><table cellpadding=0 cellspacing=0><TR>"; +echo "<TD ALIGN=RIGHT><font size=2><B>LIVELLO CHIAMATE:</B></TD><TD ALIGN=LEFT><font size=2>  $DIALlev    </TD>"; +echo "<TD ALIGN=RIGHT><font size=2><B>TRUNK SHORT/FILL:</B></TD><TD ALIGN=LEFT><font size=2>  $balanceSHORT / $balanceFILL     </TD>"; +echo "<TD ALIGN=RIGHT><font size=2><B>FILTRO:</B></TD><TD ALIGN=LEFT><font size=2>  $DIALfilter   </TD>"; +echo "<TD ALIGN=RIGHT><font size=2><B> DATA:</B>   </TD><TD ALIGN=LEFT><font size=2> $NOW_TIME </TD>"; +echo ""; +echo "</TR>"; + +if ($adastats>1) + { + echo "<TR BGCOLOR=\"#CCCCCC\">"; + echo "<TD ALIGN=RIGHT><font size=2>  <B>LIVELLO MAX:</B></TD><TD ALIGN=LEFT><font size=2>  $maxDIALlev   </TD>"; + echo "<TD ALIGN=RIGHT><font size=2><B>ABBATTIMENTO MAX:</B></TD><TD ALIGN=LEFT><font size=2>  $DROPmax%    </TD>"; + echo "<TD ALIGN=RIGHT><font size=2><B>TARGET DIFF:</B></TD><TD ALIGN=LEFT><font size=2>  $targetDIFF     </TD>"; + echo "<TD ALIGN=RIGHT><font size=2><B>INTENSITY:</B></TD><TD ALIGN=LEFT><font size=2>  $ADAintense     </TD>"; + echo "</TR>"; + + echo "<TR BGCOLOR=\"#CCCCCC\">"; + echo "<TD ALIGN=RIGHT><font size=2><B>TIMEOUT CHIAMATA:</B></TD><TD ALIGN=LEFT><font size=2>  $DIALtimeout  </TD>"; + echo "<TD ALIGN=RIGHT><font size=2><B>TAPER TIME:</B></TD><TD ALIGN=LEFT><font size=2>  $TAPERtime  </TD>"; + echo "<TD ALIGN=RIGHT><font size=2><B>LOCAL TIME:</B></TD><TD ALIGN=LEFT><font size=2>  $CALLtime  </TD>"; + echo "<TD ALIGN=RIGHT><font size=2><B>AVAIL ONLY:</B></TD><TD ALIGN=LEFT><font size=2>  $ADAavailonly  </TD>"; + echo "</TR>"; + } + +echo "<TR>"; +echo "<TD ALIGN=RIGHT><font size=2><B>CONTATTI CHIAMABILI:</B></TD><TD ALIGN=LEFT><font size=2>  $DAleads     </TD>"; +echo "<TD ALIGN=RIGHT><font size=2><B>CHIAMATE OGGI:</B></TD><TD ALIGN=LEFT><font size=2>  $callsTODAY     </TD>"; +echo "<TD ALIGN=RIGHT><font size=2><B>MEDIA OPERATORI:</B></TD><TD ALIGN=LEFT><font size=2>  $agentsONEMIN     </TD>"; +echo "<TD ALIGN=RIGHT><font size=2><B>METODO CHIAMATA:</B></TD><TD ALIGN=LEFT><font size=2>  $DIALmethod     </TD>"; +echo "</TR>"; + +echo "<TR>"; +echo "<TD ALIGN=RIGHT><font size=2><B>LIVELLO CODA CHIAMATE:</B></TD><TD ALIGN=LEFT><font size=2>  $HOPlev     </TD>"; +echo "<TD ALIGN=RIGHT><font size=2><B>ABBATTUTE / RISPOSTE:</B></TD><TD ALIGN=LEFT><font size=2>  $dropsTODAY / $answersTODAY   </TD>"; +echo "<TD ALIGN=RIGHT><font size=2><B>DL DIFF:</B></TD><TD ALIGN=LEFT><font size=2>  $diffONEMIN     </TD>"; +echo "<TD ALIGN=RIGHT><font size=2><B>ESITI:</B></TD><TD ALIGN=LEFT><font size=2>  $DIALstatuses     </TD>"; +echo "</TR>"; + +echo "<TR>"; +echo "<TD ALIGN=RIGHT><font size=2><B>CONTATTI IN CODA:</B></TD><TD ALIGN=LEFT><font size=2>  $VDhop     </TD>"; +echo "<TD ALIGN=RIGHT><font size=2><B>PERCENT ABBATTIMENTO:</B></TD><TD ALIGN=LEFT><font size=2>  "; +if ($drpctTODAY >= $DROPmax) + {echo "<font color=red><B>$drpctTODAY%</B></font>";} +else + {echo "$drpctTODAY%";} +echo "    </TD>"; +echo "<TD ALIGN=RIGHT><font size=2><B>DIFF:</B></TD><TD ALIGN=LEFT><font size=2>  $diffpctONEMIN%     </TD>"; +echo "<TD ALIGN=RIGHT><font size=2><B>ORDINE:</B></TD><TD ALIGN=LEFT><font size=2>  $DIALorder     </TD>"; +echo "</TR>"; + +echo "<TR>"; +echo "<TD ALIGN=LEFT COLSPAN=8>"; +if ( (!eregi('NULL',$VSCcat1)) and (strlen($VSCcat1)>0) ) + {echo "<font size=2><B>$VSCcat1:</B>   $VSCcat1tally       \n";} +if ( (!eregi('NULL',$VSCcat2)) and (strlen($VSCcat2)>0) ) + {echo "<font size=2><B>$VSCcat2:</B>   $VSCcat2tally       \n";} +if ( (!eregi('NULL',$VSCcat3)) and (strlen($VSCcat3)>0) ) + {echo "<font size=2><B>$VSCcat3:</B>   $VSCcat3tally       \n";} +if ( (!eregi('NULL',$VSCcat4)) and (strlen($VSCcat4)>0) ) + {echo "<font size=2><B>$VSCcat4:</B>   $VSCcat4tally       \n";} +echo "</TD></TR>"; +echo "<TR>"; +echo "<TD ALIGN=LEFT COLSPAN=8>"; + +### Header finish + + + + + +################################################################################ +### START calculating calls/agents +################################################################################ + +################################################################################ +###### OUTBOUND CALLS +################################################################################ +if ($campaign_allow_inbound > 0) + { + $stmt="select closer_campaigns from vicidial_campaigns where campaign_id='" . mysql_real_escape_string($group) . "';"; + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + $closer_campaigns = preg_replace("/^ | -$/","",$row[0]); + $closer_campaigns = preg_replace("/ /","','",$closer_campaigns); + $closer_campaigns = "'$closer_campaigns'"; + + $stmt="select status from vicidial_auto_calls where status NOT IN('XFER') and ( (call_type='IN' and campaign_id IN($closer_campaigns)) or (campaign_id='" . mysql_real_escape_string($group) . "' and call_type='OUT') );"; + } +else + { + 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;"; + } +$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='<FONT class="r1">'; $FG='</FONT>';} + if ($out_live > 4) {$F='<FONT class="r2">'; $FG='</FONT>';} + if ($out_live > 9) {$F='<FONT class="r3">'; $FG='</FONT>';} + if ($out_live > 14) {$F='<FONT class="r4">'; $FG='</FONT>';} + + if ($campaign_allow_inbound > 0) + {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 " NESSUNA CHIAMATA IN ATTESA\n"; + } + + +################################################################################### +###### TIME ON SYSTEM +################################################################################### + +$agent_incall=0; +$agent_ready=0; +$agent_paused=0; +$agent_total=0; + +$stmt="select extension,user,conf_exten,status,server_ip,UNIX_TIMESTAMP(last_call_time),UNIX_TIMESTAMP(last_call_finish),call_server_ip,campaign_id from vicidial_live_agents where campaign_id='" . mysql_real_escape_string($group) . "';"; +$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]; + } + $Lstatus = $row[3]; + $status = sprintf("%-6s", $row[3]); + 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 (eregi("PAUSED",$row[3])) + { + if ($call_time_M_int >= 30) + {$i++; continue;} + else + { + $agent_paused++; $agent_total++; + } + } + + if ( (eregi("INCALL",$status)) or (eregi("QUEUE",$status)) ) {$agent_incall++; $agent_total++;} + if ( (eregi("READY",$status)) or (eregi("CLOSER",$status)) ) {$agent_ready++; $agent_total++;} + $agentcount++; + + + $i++; + } + + if ($agent_ready > 0) {$B='<FONT class="b1">'; $BG='</FONT>';} + if ($agent_ready > 4) {$B='<FONT class="b2">'; $BG='</FONT>';} + if ($agent_ready > 9) {$B='<FONT class="b3">'; $BG='</FONT>';} + if ($agent_ready > 14) {$B='<FONT class="b4">'; $BG='</FONT>';} + + echo "\n<BR>\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 "<PRE><FONT SIZE=2>"; + echo ""; + } + else + { + echo " NESSUN OPERATORE AL TELEFONO<BR>\n"; + } + +################################################################################ +### END calculating calls/agents +################################################################################ + + + + + +echo "</TD>"; +echo "</TR>"; +echo "</TABLE>"; + +echo "</FORM>\n\n"; +$k++; +} + +?> +</PRE> + +</BODY></HTML> diff --git a/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_it/AST_timeonpark.php b/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_it/AST_timeonpark.php new file mode 100644 index 00000000..a8fc35ed --- /dev/null +++ b/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_it/AST_timeonpark.php @@ -0,0 +1,219 @@ +<? +### AST_timeonpark.php +### +### Copyright (C) 2006 Matt Florell <vicidial@gmail.com> LICENSE: GPLv2 +### +# CHANGES +# +# 60620-1042 - Added variable filtering to eliminate SQL injection attack threat +# - Added required user/pass to gain access to this page +# + +require("dbconnect.php"); + +$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; +$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; +$PHP_SELF=$_SERVER['PHP_SELF']; +if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} + elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} +if (isset($_GET["reset_counter"])) {$reset_counter=$_GET["reset_counter"];} + elseif (isset($_POST["reset_counter"])) {$reset_counter=$_POST["reset_counter"];} +if (isset($_GET["submit"])) {$submit=$_GET["submit"];} + elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];} +if (isset($_GET["INVIA"])) {$INVIA=$_GET["INVIA"];} + elseif (isset($_POST["INVIA"])) {$INVIA=$_POST["INVIA"];} + +$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 "Username/Password non validi: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n"; + exit; + } + +$NOW_TIME = date("Y-m-d H:i:s"); +$STARTtime = date("U"); +$timeONEhoursAGO = ($STARTtime - 3600); +$epochHALFhoursAGO = ($STARTtime - 1860); +$timeONEhoursAGO = date("Y-m-d H:i:s",$timeONEhoursAGO); +$timeHALFhoursAGO = date("Y-m-d H:i:s",$epochHALFhoursAGO); + +$reset_counter++; + +if ($reset_counter > 7) + { + $reset_counter=0; + + $stmt="update park_log set status='HUNGUP' where hangup_time is not null;"; + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + + if ($DB) + { + $stmt="delete from park_log where status='TALKING' and grab_time < '$timeONEhoursAGO' and (hangup_time is null or hangup_time='');"; + $rslt=mysql_query($stmt, $link); + echo "$stmt\n"; + + $stmt="delete from park_log where status='PARKED' and parked_time < '$timeHALFhoursAGO' and (hangup_time is null or hangup_time='');"; + $rslt=mysql_query($stmt, $link); + echo "$stmt\n"; + + } + } + +?> + +<HTML> +<HEAD> +<STYLE type="text/css"> +<!-- + .green {color: white; background-color: green} + .red {color: white; background-color: red} + .blue {color: white; background-color: blue} + .purple {color: white; background-color: purple} +--> + </STYLE> + +<? +echo "<META HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html; charset=utf-8\">\n"; +echo"<META HTTP-EQUIV=Refresh CONTENT=\"7; URL=$PHP_SELF?server_ip=$server_ip&DB=$DB&reset_counter=$reset_counter\">\n"; +echo "<TITLE>VICIDIAL: Time On Park\n"; +echo "
\n\n";
+
+echo "VICIDIAL: Time On Park         $NOW_TIME    REPORT\n\n";
+echo "+------------+-----------------+---------------------+---------+\n";
+echo "| CHANNEL    | GROUP           | START TIME          | MINUTES |\n";
+echo "+------------+-----------------+---------------------+---------+\n";
+
+#$link=mysql_connect("localhost", "cron", "1234");
+# $linkX=mysql_connect("localhost", "cron", "1234");
+#mysql_select_db("asterisk");
+
+$stmt="select extension,user,channel,channel_group,parked_time,UNIX_TIMESTAMP(parked_time) from park_log where status ='PARKED' and server_ip='" . mysql_real_escape_string($server_ip) . "' order by uniqueid;";
+$rslt=mysql_query($stmt, $link);
+if ($DB) {echo "$stmt\n";}
+$parked_to_print = mysql_num_rows($rslt);
+	if ($parked_to_print > 0)
+	{
+	$i=0;
+	while ($i < $parked_to_print)
+		{
+		$row=mysql_fetch_row($rslt);
+
+		$channel =			sprintf("%-10s", $row[2]);
+		$number_dialed =	sprintf("%-15s", $row[3]);
+		$start_time =		sprintf("%-19s", $row[4]);
+		$call_time_S = ($STARTtime - $row[5]);
+
+		$call_time_M = ($call_time_S / 60);
+		$call_time_M = round($call_time_M, 2);
+		$call_time_M_int = intval("$call_time_M");
+		$call_time_SEC = ($call_time_M - $call_time_M_int);
+		$call_time_SEC = ($call_time_SEC * 60);
+		$call_time_SEC = round($call_time_SEC, 0);
+		if ($call_time_SEC < 10) {$call_time_SEC = "0$call_time_SEC";}
+		$call_time_MS = "$call_time_M_int:$call_time_SEC";
+		$call_time_MS =		sprintf("%7s", $call_time_MS);
+		$G = '';		$EG = '';
+		if ($call_time_M_int >= 1) {$G=''; $EG='';}
+		if ($call_time_M_int >= 6) {$G=''; $EG='';}
+
+		echo "| $G$channel$EG | $G$number_dialed$EG | $G$start_time$EG | $G$call_time_MS$EG |\n";
+
+		$i++;
+		}
+
+		echo "+------------+-----------------+---------------------+---------+\n";
+		echo "  $i callers waiting on server $server_ip\n\n";
+
+		echo "             - 1 minute or more on hold\n";
+		echo "             - Over 5 minutes on hold\n";
+
+		}
+	else
+	{
+	echo "****************************************************************\n";
+	echo "****************************************************************\n";
+	echo "******************** NESSUNA CHIAMATA IN ATTESA*********************\n";
+	echo "****************************************************************\n";
+	echo "****************************************************************\n";
+	}
+
+###################################################################################
+###### TIME ON INBOUND CALLS
+###################################################################################
+echo "\n\n";
+echo "----------------------------------------------------------------------------------------";
+echo "\n\n";
+echo "VICIDIAL: Agents Time On Inbound Calls                             $NOW_TIME\n\n";
+echo "+------------|--------+------------+-----------------+---------------------+---------+\n";
+echo "| STATION    | USER   | CHANNEL    | GROUP           | START TIME          | MINUTES |\n";
+echo "+------------|--------+------------+-----------------+---------------------+---------+\n";
+
+
+$stmt="select extension,user,channel,channel_group,grab_time,UNIX_TIMESTAMP(grab_time) from park_log where status ='TALKING' and server_ip='" . mysql_real_escape_string($server_ip) . "' order by uniqueid;";
+$rslt=mysql_query($stmt, $link);
+if ($DB) {echo "$stmt\n";}
+$talking_to_print = mysql_num_rows($rslt);
+	if ($talking_to_print > 0)
+	{
+	$i=0;
+	while ($i < $talking_to_print)
+		{
+		$row=mysql_fetch_row($rslt);
+
+		$extension =		sprintf("%-10s", $row[0]);
+		$user =				sprintf("%-6s", $row[1]);
+		$channel =			sprintf("%-10s", $row[2]);
+		$number_dialed =	sprintf("%-15s", $row[3]);
+		$start_time =		sprintf("%-19s", $row[4]);
+		$call_time_S = ($STARTtime - $row[5]);
+
+		$call_time_M = ($call_time_S / 60);
+		$call_time_M = round($call_time_M, 2);
+		$call_time_M_int = intval("$call_time_M");
+		$call_time_SEC = ($call_time_M - $call_time_M_int);
+		$call_time_SEC = ($call_time_SEC * 60);
+		$call_time_SEC = round($call_time_SEC, 0);
+		if ($call_time_SEC < 10) {$call_time_SEC = "0$call_time_SEC";}
+		$call_time_MS = "$call_time_M_int:$call_time_SEC";
+		$call_time_MS =		sprintf("%7s", $call_time_MS);
+		$G = '';		$EG = '';
+		if ($call_time_M_int >= 12) {$G=''; $EG='';}
+		if ($call_time_M_int >= 31) {$G=''; $EG='';}
+
+		echo "| $G$extension$EG | $G$user$EG | $G$channel$EG | $G$number_dialed$EG | $G$start_time$EG | $G$call_time_MS$EG |\n";
+
+		$i++;
+		}
+
+		echo "+------------|--------+------------+-----------------+---------------------+---------+\n";
+		echo "  $i agents on calls on server $server_ip\n\n";
+
+		echo "             - 12 minutes or more on call\n";
+		echo "             - Over 30 minutes on call\n";
+
+	}
+	else
+	{
+	echo "**************************************************************************************\n";
+	echo "**************************************************************************************\n";
+	echo "********************************* NESSUN OPERATORE IN CONVERSAZIONE *********************************\n";
+	echo "**************************************************************************************\n";
+	echo "**************************************************************************************\n";
+	}
+
+
+?>
+
+ + \ No newline at end of file diff --git a/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_it/admin.php b/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_it/admin.php new file mode 100644 index 00000000..a02adf59 --- /dev/null +++ b/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_it/admin.php @@ -0,0 +1,13618 @@ + LICENSE: GPLv2 +# + + +require("dbconnect.php"); + + +###################################################################################################### +###################################################################################################### +####### static variable settings for display options +###################################################################################################### +###################################################################################################### + +$page_width='770'; +$section_width='720'; +$header_font_size='3'; +$subheader_font_size='2'; +$subcamp_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 = '#FF33FF'; + $phones_color = '#FF33FF'; + $conference_color = '#FF33FF'; + $server_color = '#FF33FF'; + $settings_color = '#FF33FF'; + $status_color = '#FF33FF'; +$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'; + $status_font = 'BLACK'; +$subcamp_color = '#FF9933'; +$subcamp_font = 'BLACK'; + +$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; +$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; +$PHP_SELF=$_SERVER['PHP_SELF']; + +###################################################################################################### +###################################################################################################### +####### Form variable declaration +###################################################################################################### +###################################################################################################### + + +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["SUB"])) {$SUB=$_GET["SUB"];} + elseif (isset($_POST["SUB"])) {$SUB=$_POST["SUB"];} +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["XFERgroups"])) {$XFERgroups=$_GET["XFERgroups"];} + elseif (isset($_POST["XFERgroups"])) {$XFERgroups=$_POST["XFERgroups"];} +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["INVIA"])) {$INVIA=$_GET["INVIA"];} + elseif (isset($_POST["INVIA"])) {$INVIA=$_POST["INVIA"];} +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($_GET["list_order_mix"])) {$list_order_mix=$_GET["list_order_mix"];} + elseif (isset($_POST["list_order_mix"])) {$list_order_mix=$_POST["list_order_mix"];} +if (isset($_GET["vcl_id"])) {$vcl_id=$_GET["vcl_id"];} + elseif (isset($_POST["vcl_id"])) {$vcl_id=$_POST["vcl_id"];} +if (isset($_GET["vcl_name"])) {$vcl_name=$_GET["vcl_name"];} + elseif (isset($_POST["vcl_name"])) {$vcl_name=$_POST["vcl_name"];} +if (isset($_GET["list_mix_container"])) {$list_mix_container=$_GET["list_mix_container"];} + elseif (isset($_POST["list_mix_container"])) {$list_mix_container=$_POST["list_mix_container"];} +if (isset($_GET["mix_method"])) {$mix_method=$_GET["mix_method"];} + elseif (isset($_POST["mix_method"])) {$mix_method=$_POST["mix_method"];} +if (isset($_GET["human_answered"])) {$human_answered=$_GET["human_answered"];} + elseif (isset($_POST["human_answered"])) {$human_answered=$_POST["human_answered"];} +if (isset($_GET["category"])) {$category=$_GET["category"];} + elseif (isset($_POST["category"])) {$category=$_POST["category"];} +if (isset($_GET["vsc_id"])) {$vsc_id=$_GET["vsc_id"];} + elseif (isset($_POST["vsc_id"])) {$vsc_id=$_POST["vsc_id"];} +if (isset($_GET["vsc_name"])) {$vsc_name=$_GET["vsc_name"];} + elseif (isset($_POST["vsc_name"])) {$vsc_name=$_POST["vsc_name"];} +if (isset($_GET["vsc_description"])) {$vsc_description=$_GET["vsc_description"];} + elseif (isset($_POST["vsc_description"])) {$vsc_description=$_POST["vsc_description"];} +if (isset($_GET["tovdad_display"])) {$tovdad_display=$_GET["tovdad_display"];} + elseif (isset($_POST["tovdad_display"])) {$tovdad_display=$_POST["tovdad_display"];} +if (isset($_GET["mix_container_item"])) {$mix_container_item=$_GET["mix_container_item"];} + elseif (isset($_POST["mix_container_item"])) {$mix_container_item=$_POST["mix_container_item"];} +if (isset($_GET["enable_agc_xfer_log"])) {$enable_agc_xfer_log=$_GET["enable_agc_xfer_log"];} + elseif (isset($_POST["enable_agc_xfer_log"])) {$enable_agc_xfer_log=$_POST["enable_agc_xfer_log"];} +if (isset($_GET["after_hours_action"])) {$after_hours_action=$_GET["after_hours_action"];} + elseif (isset($_POST["after_hours_action"])) {$after_hours_action=$_POST["after_hours_action"];} +if (isset($_GET["after_hours_message_filename"])) {$after_hours_message_filename=$_GET["after_hours_message_filename"];} + elseif (isset($_POST["after_hours_message_filename"])) {$after_hours_message_filename=$_POST["after_hours_message_filename"];} +if (isset($_GET["after_hours_exten"])) {$after_hours_exten=$_GET["after_hours_exten"];} + elseif (isset($_POST["after_hours_exten"])) {$after_hours_exten=$_POST["after_hours_exten"];} +if (isset($_GET["after_hours_voicemail"])) {$after_hours_voicemail=$_GET["after_hours_voicemail"];} + elseif (isset($_POST["after_hours_voicemail"])) {$after_hours_voicemail=$_POST["after_hours_voicemail"];} +if (isset($_GET["welcome_message_filename"])) {$welcome_message_filename=$_GET["welcome_message_filename"];} + elseif (isset($_POST["welcome_message_filename"])) {$welcome_message_filename=$_POST["welcome_message_filename"];} +if (isset($_GET["moh_context"])) {$moh_context=$_GET["moh_context"];} + elseif (isset($_POST["moh_context"])) {$moh_context=$_POST["moh_context"];} +if (isset($_GET["onhold_prompt_filename"])) {$onhold_prompt_filename=$_GET["onhold_prompt_filename"];} + elseif (isset($_POST["onhold_prompt_filename"])) {$onhold_prompt_filename=$_POST["onhold_prompt_filename"];} +if (isset($_GET["prompt_interval"])) {$prompt_interval=$_GET["prompt_interval"];} + elseif (isset($_POST["prompt_interval"])) {$prompt_interval=$_POST["prompt_interval"];} +if (isset($_GET["agent_alert_exten"])) {$agent_alert_exten=$_GET["agent_alert_exten"];} + elseif (isset($_POST["agent_alert_exten"])) {$agent_alert_exten=$_POST["agent_alert_exten"];} +if (isset($_GET["agent_alert_delay"])) {$agent_alert_delay=$_GET["agent_alert_delay"];} + elseif (isset($_POST["agent_alert_delay"])) {$agent_alert_delay=$_POST["agent_alert_delay"];} +if (isset($_GET["group_rank"])) {$group_rank=$_GET["group_rank"];} + elseif (isset($_POST["group_rank"])) {$group_rank=$_POST["group_rank"];} +if (isset($_GET["campaign_allow_inbound"])) {$campaign_allow_inbound=$_GET["campaign_allow_inbound"];} + elseif (isset($_POST["campaign_allow_inbound"])) {$campaign_allow_inbound=$_POST["campaign_allow_inbound"];} +if (isset($_GET["manual_dial_list_id"])) {$manual_dial_list_id=$_GET["manual_dial_list_id"];} + elseif (isset($_POST["manual_dial_list_id"])) {$manual_dial_list_id=$_POST["manual_dial_list_id"];} +if (isset($_GET["campaign_rank"])) {$campaign_rank=$_GET["campaign_rank"];} + elseif (isset($_POST["campaign_rank"])) {$campaign_rank=$_POST["campaign_rank"];} +if (isset($_GET["source_campaign_id"])) {$source_campaign_id=$_GET["source_campaign_id"];} + elseif (isset($_POST["source_campaign_id"])) {$source_campaign_id=$_POST["source_campaign_id"];} +if (isset($_GET["source_user_id"])) {$source_user_id=$_GET["source_user_id"];} + elseif (isset($_POST["source_user_id"])) {$source_user_id=$_POST["source_user_id"];} +if (isset($_GET["source_group_id"])) {$source_group_id=$_GET["source_group_id"];} + elseif (isset($_POST["source_group_id"])) {$source_group_id=$_POST["source_group_id"];} +if (isset($_GET["default_xfer_group"])) {$default_xfer_group=$_GET["default_xfer_group"];} + elseif (isset($_POST["default_xfer_group"])) {$default_xfer_group=$_POST["default_xfer_group"];} + + + 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; + } + +############################################# +##### START SYSTEM_SETTINGS LOOKUP ##### +$stmt = "SELECT use_non_latin FROM system_settings;"; +$rslt=mysql_query($stmt, $link); +if ($DB) {echo "$stmt\n";} +$qm_conf_ct = mysql_num_rows($rslt); +$i=0; +while ($i < $qm_conf_ct) + { + $row=mysql_fetch_row($rslt); + $non_latin = $row[0]; + $i++; + } +##### END SETTINGS LOOKUP ##### +########################################### + +###################################################################################################### +###################################################################################################### +####### Form variable filtering for security and data integrity +###################################################################################################### +###################################################################################################### + +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); +$mix_container_item = ereg_replace("[^0-9]","",$mix_container_item); +$prompt_interval = ereg_replace("[^0-9]","",$prompt_interval); +$agent_alert_delay = ereg_replace("[^0-9]","",$agent_alert_delay); +$manual_dial_list_id = ereg_replace("[^0-9]","",$manual_dial_list_id); + +### DIGITS and DASHES +$group_rank = ereg_replace("[^-0-9]","",$group_rank); +$campaign_rank = ereg_replace("[^-0-9]","",$campaign_rank); + +### 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); +$human_answered = ereg_replace("[^NY]","",$human_answered); +$tovdad_display = ereg_replace("[^NY]","",$tovdad_display); +$campaign_allow_inbound = ereg_replace("[^NY]","",$campaign_allow_inbound); + +### 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); +$after_hours_action = ereg_replace("[^0-9a-zA-Z]","",$after_hours_action); +$after_hours_exten = ereg_replace("[^0-9a-zA-Z]","",$after_hours_exten); +$after_hours_voicemail = ereg_replace("[^0-9a-zA-Z]","",$after_hours_voicemail); + +### 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); +$list_order_mix = ereg_replace("[^-\_0-9a-zA-Z]","",$list_order_mix); +$vcl_id = ereg_replace("[^-\_0-9a-zA-Z]","",$vcl_id); +$mix_method = ereg_replace("[^-\_0-9a-zA-Z]","",$mix_method); +$category = ereg_replace("[^-\_0-9a-zA-Z]","",$category); +$vsc_id = ereg_replace("[^-\_0-9a-zA-Z]","",$vsc_id); +$moh_context = ereg_replace("[^-\_0-9a-zA-Z]","",$moh_context); +$agent_alert_exten = ereg_replace("[^-\_0-9a-zA-Z]","",$agent_alert_exten); +$source_campaign_id = ereg_replace("[^-\_0-9a-zA-Z]","",$source_campaign_id); +$source_user_id = ereg_replace("[^-\_0-9a-zA-Z]","",$source_user_id); +$source_group_id = ereg_replace("[^-\_0-9a-zA-Z]","",$source_group_id); +$default_xfer_group = ereg_replace("[^-\_0-9a-zA-Z]","",$default_xfer_group); + +### 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); +$vcl_name = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$vcl_name); +$vsc_name = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$vsc_name); +$vsc_description = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$vsc_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); +$after_hours_message_filename = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$after_hours_message_filename); +$welcome_message_filename = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$welcome_message_filename); +$onhold_prompt_filename = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$onhold_prompt_filename); + +### remove semi-colons ### +$lead_filter_sql = ereg_replace(";","",$lead_filter_sql); +$list_mix_container = ereg_replace(";","",$list_mix_container); + +### 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 +# 70516-1628 - Started reformatting campaigns to use submenus to break up options +# 70529-1653 - Added help for list mix +# 70530-1354 - Added human_answered field to statuses, added system status modification +# 70530-1714 - Added lists for all campaign subsections +# 70531-1631 - Development on List mix admin interface +# 70601-1629 - More development on List mix admin interface, formatting, and added some javascript +# 70602-1300 - More development on List mix admin interface, more javascript +# 70608-1459 - Added option to set LIVE Callbacks to INACTIVE after one month +# 70612-1451 - Added Callback INACTIVE link for after one week, sort by user/group/entrydate +# 70614-0231 - Added Status Categories, ability to Modify Statuses, moved system statuses to sub-section +# 70623-1008 - List Mix section now allows modification of list mix entries +# 70629-1721 - List Mix section adding and removing of list entries active +# 70706-1636 - List Mix section cleanup and more error-checking +# 70908-0941 - Added agc logile enable system_settings +# 71020-1934 - Added inbound groups options: on-hold music, messages, call_times +# 71022-1343 - Added inbound group ranks for users +# 71029-1710 - Added option for campaign to be inbound and/or blended with no restrictions on the campaign_id name +# - Added 5th NEW and 6th NEW to the dial order options +# 71030-2010 - Added Manual Dial List ID field to campaigns table +# 71103-2207 - Added inbound_group_rank and fewest_calls to the inbound groups call order options +# 71113-1521 - Added campaign_rank to agent options +# - Added ability to Copy a campaign's setting to a new campaign +# 71113-2225 - Added ability to copy user and in-group settings to new users and in-groups +# 71116-0942 - Added campaign_rank and fewest_calls as methods for agent call routing +# 71122-1135 - Added default transfer group for campaigns and inbound groups +# 71125-1751 - Added allowable transfer groups to campaign detail screen +# 80330-0814 - Added CBHOLD block on selecting, added user stats/status links +# 80424-0442 - Added non_latin system_settings lookup at top to override dbconnect setting +# +# 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.4-121'; +$build = '80424-0442'; + +$STARTtime = date("U"); +$SQLdate = date("Y-m-d H:i:s"); +$MT[0]=''; +$US='_'; + +$month_old = mktime(0, 0, 0, date("m")-1, date("d"), date("Y")); +$past_month_date = date("Y-m-d H:i:s",$month_old); +$week_old = mktime(0, 0, 0, date("m"), date("d")-7, date("Y")); +$past_week_date = date("Y-m-d H:i:s",$week_old); + +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 "Ora non sei collegato. Grazie\n"; + exit; +} + +############################################# +##### START SYSTEM_SETTINGS LOOKUP ##### +$stmt = "SELECT use_non_latin FROM system_settings;"; +$rslt=mysql_query($stmt, $link); +if ($DB) {echo "$stmt\n";} +$qm_conf_ct = mysql_num_rows($rslt); +$i=0; +while ($i < $qm_conf_ct) + { + $row=mysql_fetch_row($rslt); + $non_latin = $row[0]; + $i++; + } +##### END SETTINGS LOOKUP ##### +########################################### + +$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";} +if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} +$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 "Username/Password non validi: |$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 settings +###################################################################################################### +###################################################################################################### + + +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 "Aggiungi Nuovo Utente";} +if ($ADD=="1A") {$hh='users'; echo "Copia Utente";} +if ($ADD==11) {$hh='campaigns'; $sh='basic'; echo "Aggiungi Nuova Campagna";} +if ($ADD==12) {$hh='campaigns'; $sh='basic'; echo "Copia Campagna";} +if ($ADD==111) {$hh='lists'; echo "Aggiungi Nuova Lista";} +if ($ADD==121) {$hh='lists'; echo "Agregue DNC Nuevo";} +if ($ADD==1111) {$hh='ingroups'; echo "Aggiungi Nuovo Gruppo Inbound";} +if ($ADD==1211) {$hh='ingroups'; echo "Copia Gruppo Inbound";} +if ($ADD==11111) {$hh='remoteagent'; echo "Aggiungi Nuovo Operatore Remoto";} +if ($ADD==111111) {$hh='usergroups'; echo "Aggiungi Nuovo Gruppo Utente";} +if ($ADD==1111111) {$hh='scripts'; echo "Aggiungi Nuovo Script";} +if ($ADD==11111111) {$hh='filters'; echo "Agiungi Nuovo Filtro";} +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 "AGGIUNGI TELEFONO";} +if ($ADD==111111111111) {$hh='admin'; $sh='server'; echo "AGGIUNGI SERVER";} +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 "Creazione Nuovo Utente";} +if ($ADD=="2A") {$hh='users'; echo "Nueva Adicio`n Copiada Del Usuario";} +if ($ADD==20) {$hh='campaigns'; $sh='basic'; echo "Nueva Adicio`n Copiada De la Campaña";} +if ($ADD==21) {$hh='campaigns'; $sh='basic'; echo "Creazione Nuova Campagna";} +if ($ADD==22) {$hh='campaigns'; $sh='status'; echo "Creazione Nuovo Esito Personalizzato Per Campagna";} +if ($ADD==23) {$hh='campaigns'; $sh='hotkey'; echo "New Campagna HotKey Addition";} +if ($ADD==25) {$hh='campaigns'; $sh='recycle'; echo "El Nuevo Plomo De la Campaña Recicla La Adicio`n";} +if ($ADD==26) {$hh='campaigns'; $sh='autoalt'; echo "Nuevo Estado Del Dial Del Alt Del Automo`vil";} +if ($ADD==27) {$hh='campaigns'; $sh='pause'; echo "Nuevo Co`digo De la Pausa Del Agente";} +if ($ADD==28) {$hh='campaigns'; $sh='dialstat'; echo "Esito Campagna Aggiunto";} +if ($ADD==29) {$hh='campaigns'; $sh='listmix'; echo "Mezcla De la Lista De la Campaña Agregada";} +if ($ADD==211) {$hh='lists'; echo "Creazione Nuova Lista";} +if ($ADD==2111) {$hh='ingroups'; echo "Creazione Nuovo Gruppo Inbound";} +if ($ADD==2011) {$hh='ingroups'; echo "Nueva Adicin Copiada Del En-Grupo";} +if ($ADD==21111) {$hh='remoteagent'; echo "Creazuibe Nuovi Operatori Remoti";} +if ($ADD==211111) {$hh='usergroups'; echo "Creazione Nuovo Gruppo Utenti";} +if ($ADD==2111111) {$hh='scripts'; echo "Creazione Nuovo Script";} +if ($ADD==21111111) {$hh='filters'; echo "Nueva Adicio`n Del Filtro";} +if ($ADD==211111111) {$hh='admin'; $sh='times'; echo "Nueva Adicio`n Del Tiempo De la Llamada";} +if ($ADD==2111111111) {$hh='admin'; $sh='times'; echo "Nueva Adicio`n Del Tiempo De la Llamada Del Estado";} +if ($ADD==21111111111) {$hh='admin'; $sh='phones'; echo "CREANDO telefono";} +if ($ADD==211111111111) {$hh='admin'; $sh='server'; echo "CREANDO SERVIDOR";} +if ($ADD==221111111111) {$hh='admin'; $sh='server'; echo "ADICIo`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==221111111111111) {$hh='admin'; $sh='status'; echo "AGGIUNGI ESITI DI DEFAULT VICIDIAL";} +if ($ADD==231111111111111) {$hh='admin'; $sh='status'; echo "ADICIo`N DE CATEGORÍA DEL ESTADO DE VICIDIAL";} +if ($ADD==3) {$hh='users'; echo "Modifica Utente";} +if ($ADD==30) {$hh='campaigns'; echo "Campagna Non Autorizzata";} +if ($ADD==31) + { + $hh='campaigns'; $sh='detail'; echo "Modifica Campagna - Dettagliata - $campaign_id"; + if ($SUB==22) {echo " - Esiti";} + if ($SUB==23) {echo " - Hot-Key";} + if ($SUB==25) {echo " -Riciclaggio ContattiEntries";} + if ($SUB==26) {echo " - Auto Alt Dial Esiti";} + if ($SUB==27) {echo " - Agent Codici Pausa";} + if ($SUB==29) {echo " - List Mixes";} + } +if ($ADD==32) {$hh='campaigns'; $sh='status'; echo "Esiti Campagna";} +if ($ADD==33) {$hh='campaigns'; $sh='hotkey'; echo "Hot-Key Campagna";} +if ($ADD==34) {$hh='campaigns'; $sh='basic'; echo "Modifica Campagna - Vista Generale";} +if ($ADD==35) {$hh='campaigns'; $sh='recycle'; echo "El Plomo De la Campaña Recicla Entradas";} +if ($ADD==36) {$hh='campaigns'; $sh='autoalt'; echo "Estados Auto Del Dial Del Alt De la Campaña";} +if ($ADD==37) {$hh='campaigns'; $sh='pause'; echo "Codici Pausa Operatore per Campagna";} +if ($ADD==38) {$hh='campaigns'; $sh='dialstat'; echo "Estados Del Dial De la Campaña";} +if ($ADD==39) {$hh='campaigns'; $sh='listmix'; echo "Mezclas De la Lista De la Campaña";} +if ($ADD==311) {$hh='lists'; echo "Modifica Lista";} +if ($ADD==3111) {$hh='ingroups'; echo "Modifica Gruppo Inbound";} +if ($ADD==31111) {$hh='remoteagent'; echo "Modifica Operatori Remoti";} +if ($ADD==311111) {$hh='usergroups'; echo "Modifica Gruppi Utenti";} +if ($ADD==3111111) {$hh='scripts'; echo "Modifica Script";} +if ($ADD==31111111) {$hh='filters'; echo "Modifica 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 telefonO";} +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 "MODIFICA IMPOSTAZIONI DI SISTEMA";} +if ($ADD==321111111111111) {$hh='admin'; $sh='status'; echo "MODIFICA ESITI DI DEFAULT VICIDIAL";} +if ($ADD==331111111111111) {$hh='admin'; $sh='status'; echo "MODIFICA LE CATEGORIE DI ESITI DI VICIDIAL";} +if ($ADD=="4A") {$hh='users'; echo "Modifica Utente - Admin";} +if ($ADD=="4B") {$hh='users'; echo "Modifica Utente - Admin";} +if ($ADD==4) {$hh='users'; echo "Modifica Utente";} +if ($ADD==41) {$hh='campaigns'; $sh='detail'; echo "Modifica Campagna";} +if ($ADD==42) {$hh='campaigns'; $sh='status'; echo "Modifica Campagna Status";} +if ($ADD==43) {$hh='campaigns'; $sh='hotkey'; echo "Modifica Campagna HotKey";} +if ($ADD==44) {$hh='campaigns'; $sh='basic'; echo "Modifica Campagna - Vista Generale";} +if ($ADD==45) {$hh='campaigns'; $sh='recycle'; echo "Modifique El Plomo De la Campaña Reciclan";} +if ($ADD==47) {$hh='campaigns'; $sh='pause'; echo "Modifique El Co`digo De la Pausa Del Agente";} +if ($ADD==49) {$hh='campaigns'; $sh='listmix'; echo "Modifique La Mezcla De la Lista De la Campaña";} +if ($ADD==411) {$hh='lists'; echo "Modifica Lista";} +if ($ADD==4111) {$hh='ingroups'; echo "Modifica Gruppo Inbound";} +if ($ADD==41111) {$hh='remoteagent'; echo "Modifica Operatori Remoti";} +if ($ADD==411111) {$hh='usergroups'; echo "Modifica Gruppi Utenti";} +if ($ADD==4111111) {$hh='scripts'; echo "Modifica Script";} +if ($ADD==41111111) {$hh='filters'; echo "Modifica 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 telefonO";} +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 "MODIFICA IMPOSTAZIONI DI SISTEMA";} +if ($ADD==421111111111111) {$hh='admin'; $sh='status'; echo "MODIFICA ESITI DI DEFAULT VICIDIAL";} +if ($ADD==431111111111111) {$hh='admin'; $sh='status'; echo "MODIFIQUE LAS CATEGORÍAS DEL ESTADO DE VICIDIAL";} +if ($ADD==5) {$hh='users'; echo "Delete User";} +if ($ADD==51) {$hh='campaigns'; $sh='detail'; echo "Delete Campagna";} +if ($ADD==52) {$hh='campaigns'; $sh='detail'; echo "Disconnetti Operatori";} +if ($ADD==53) {$hh='campaigns'; $sh='detail'; 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 "Cancella Utenti Group";} +if ($ADD==5111111) {$hh='scripts'; echo "Cancella Script";} +if ($ADD==51111111) {$hh='filters'; echo "Cancella Filtro";} +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 Cancelacio`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'; $sh='detail'; echo "Delete Campagna";} +if ($ADD==62) {$hh='campaigns'; $sh='detail'; echo "Disconnetti Operatori";} +if ($ADD==63) {$hh='campaigns'; $sh='detail'; echo "Claro Del Atasco De la Emergencia VDAC";} +if ($ADD==65) {$hh='campaigns'; $sh='recycle'; echo "El Plomo De la Cancelacio`n Recicla";} +if ($ADD==66) {$hh='campaigns'; $sh='autoalt'; echo "Estado Auto Del Dial Del Alt De la Cancelacio`n";} +if ($ADD==67) {$hh='campaigns'; $sh='pause'; echo "Co`digo De la Pausa Del Agente De la Cancelacio`n";} +if ($ADD==68) {$hh='campaigns'; $sh='dialstat'; echo "Esito Campagna Rimosso";} +if ($ADD==69) {$hh='campaigns'; $sh='listmix'; echo "La Mezcla De la Lista De la Campaña Quito`";} +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 "Cancella Utenti Group";} +if ($ADD==6111111) {$hh='scripts'; echo "Cancella Script";} +if ($ADD==61111111) {$hh='filters'; echo "Cancella Filtro";} +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 Cancelacio`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 CANCELACIo`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 "Anteprima Script";} +if ($ADD==0) {$hh='users'; echo "Lista Utenti";} +if ($ADD==8) {$hh='users'; echo "Richiami Dell`Operatore";} +if ($ADD==81) {$hh='campaigns'; $sh='list'; echo "Richiami Nella Campagna";} +if ($ADD==811) {$hh='lists'; echo "Richiami Nella Lista";} +if ($ADD==8111) {$hh='usergroups'; echo "Richiami In Attesa In Questo Gruppo";} +if ($ADD==10) {$hh='campaigns'; $sh='list'; echo "Campagnas";} +if ($ADD==100) {$hh='lists'; echo "Liste";} +if ($ADD==1000) {$hh='ingroups'; echo "In-Groups";} +if ($ADD==10000) {$hh='remoteagent'; echo "Operatori Remoti";} +if ($ADD==100000) {$hh='usergroups'; echo "Gruppi Utenti";} +if ($ADD==1000000) {$hh='scripts'; echo "Script";} +if ($ADD==10000000) {$hh='filters'; echo "Filtri";} +if ($ADD==100000000) {$hh='admin'; $sh='times'; echo "Orari Chiamata";} +if ($ADD==1000000000) {$hh='admin'; $sh='times'; echo "Tiempos De la Llamada Del Estado";} +if ($ADD==10000000000) {$hh='admin'; $sh='phones'; echo "ELENCO TELEFONI";} +if ($ADD==100000000000) {$hh='admin'; $sh='server'; echo "ELENCO SEEVER";} +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 "Form di Ricerca";} +if ($ADD==551) {$hh='users'; echo "BUSCAR telefonOS";} +if ($ADD==660) {$hh='users'; echo "Risultati Ricerca";} +if ($ADD==661) {$hh='users'; echo "RESULTADO DE LA BÚSQUEDA DE telefonOS";} +if ($ADD==99999) {$hh='users'; echo "AIUTO";} +if ($ADD==999999) {$hh='reports'; echo "REPORT";} + +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=\"\">NESSUNO</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=\"\">NESSUNO</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++; + } + + ##### BEGIN get campaigns listing for rankings ##### + + $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=''; + $campaigns_value=''; + $RANKcampaigns_list="<tr><td>CAMPAGNA</td><td>     CLASSIFICA</td><td>     CALLS</td></tr>\n"; + + $o=0; + while ($campaigns_to_print > $o) + { + $rowx=mysql_fetch_row($rslt); + $campaigns_list .= "<option value=\"$rowx[0]\">$rowx[0] - $rowx[1]</option>\n"; + $campaign_id_values[$o] = $rowx[0]; + $campaign_name_values[$o] = $rowx[1]; + $o++; + } + + $o=0; + while ($campaigns_to_print > $o) + { + $stmt="SELECT campaign_rank,calls_today from vicidial_campaign_agents where user='$user' and campaign_id='$campaign_id_values[$o]'"; + $rslt=mysql_query($stmt, $link); + $ranks_to_print = mysql_num_rows($rslt); + if ($ranks_to_print > 0) + { + $row=mysql_fetch_row($rslt); + $SELECT_campaign_rank = $row[0]; + $calls_today = $row[1]; + } + else + {$calls_today=0; $SELECT_campaign_rank=0;} + if ( ($ADD=="4A") or ($ADD=="4B") ) + { + if (isset($_GET["RANK_$campaign_id_values[$o]"])) {$campaign_rank=$_GET["RANK_$campaign_id_values[$o]"];} + elseif (isset($_POST["RANK_$campaign_id_values[$o]"])) {$campaign_rank=$_POST["RANK_$campaign_id_values[$o]"];} + + if ($ranks_to_print > 0) + { + $stmt="UPDATE vicidial_campaign_agents set campaign_rank='$campaign_rank', campaign_weight='$campaign_rank' where campaign_id='$campaign_id_values[$o]' and user='$user';"; + $rslt=mysql_query($stmt, $link); + } + else + { + $stmt="INSERT INTO vicidial_campaign_agents set campaign_rank='$campaign_rank', campaign_weight='$campaign_rank', campaign_id='$campaign_id_values[$o]', user='$user';"; + $rslt=mysql_query($stmt, $link); + } + + $stmt="UPDATE vicidial_live_agents set campaign_weight='$campaign_rank' where campaign_id='$campaign_id_values[$o]' and user='$user';"; + $rslt=mysql_query($stmt, $link); + } + else {$campaign_rank = $SELECT_campaign_rank;} + + if (eregi("1$|3$|5$|7$|9$", $o)) + {$bgcolor='bgcolor="#B9CBFD"';} + else + {$bgcolor='bgcolor="#9BB9FB"';} + + # disable non user-group allowable campaign ranks + $stmt="SELECT user_group from vicidial_users where user='$user';"; + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + $Ruser_group = $row[0]; + + $stmt="SELECT allowed_campaigns from vicidial_user_groups where user_group='$Ruser_group';"; + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + $allowed_campaigns = $row[0]; + $allowed_campaigns = preg_replace("/ -$/","",$allowed_campaigns); + $UGcampaigns = explode(" ", $allowed_campaigns); + + $p=0; $RANK_camp_active=0; $CR_disabled = ''; + if (eregi('-ALL-CAMPAIGNS-',$allowed_campaigns)) + {$RANK_camp_active++;} + else + { + $UGcampaign_ct = count($UGcampaigns); + while ($p < $UGcampaign_ct) + { + if ($campaign_id_values[$o] == $UGcampaigns[$p]) + {$RANK_camp_active++;} + $p++; + } + } + if ($RANK_camp_active < 1) {$CR_disabled = 'DISABLED';} + + $RANKcampaigns_list .= "<tr $bgcolor><td>"; + $campaigns_list .= "<a href=\"$PHP_SELF?ADD=31&campaign_id=$campaign_id_values[$o]\">$campaign_id_values[$o]</a> - $campaign_name_values[$o] <BR>\n"; + $RANKcampaigns_list .= "<a href=\"$PHP_SELF?ADD=31&campaign_id=$campaign_id_values[$o]\">$campaign_id_values[$o]</a> - $campaign_name_values[$o] </td>"; + $RANKcampaigns_list .= "<td>     <select size=1 name=RANK_$campaign_id_values[$o] $CR_disabled>\n"; + $h="9"; + while ($h>=-9) + { + $RANKcampaigns_list .= "<option value=\"$h\""; + if ($h==$campaign_rank) + {$RANKcampaigns_list .= " SELECTED";} + $RANKcampaigns_list .= ">$h</option>"; + $h--; + } + $RANKcampaigns_list .= "</select></td>\n"; + $RANKcampaigns_list .= "<td align=right>     $calls_today</td></tr>\n"; + $o++; + } + ##### END get campaigns listing for rankings ##### + + + ##### BEGIN get inbound groups listing for checkboxes ##### + $xfer_groupsSQL=''; + if ( (($ADD>20) and ($ADD<70)) and ($ADD!=41) ) + { + $stmt="SELECT closer_campaigns,xfer_groups 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); + $xfer_groups = $row[1]; + $xfer_groups = preg_replace("/ -$/","",$xfer_groups); + $XFERgroups = explode(" ", $xfer_groups); + $xfer_groupsSQL = preg_replace("/^ | -$/","",$xfer_groups); + $xfer_groupsSQL = preg_replace("/ /","','",$xfer_groupsSQL); + $xfer_groupsSQL = "WHERE group_id IN('$xfer_groupsSQL')"; + } + if ($ADD==41) + { + $p=0; + $XFERgroup_ct = count($XFERgroups); + while ($p < $XFERgroup_ct) + { + $xfer_groups .= " $XFERgroups[$p]"; + $p++; + } + $xfer_groupsSQL = preg_replace("/^ | -$/","",$xfer_groups); + $xfer_groupsSQL = preg_replace("/ /","','",$xfer_groupsSQL); + $xfer_groupsSQL = "WHERE group_id IN('$xfer_groupsSQL')"; + } + + 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=''; + $XFERgroups_list=''; + $RANKgroups_list="<tr><td>INBOUND GROUP</td><td>     CLASSIFICA</td><td>     CALLS</td></tr>\n"; + + $o=0; + while ($groups_to_print > $o) + { + $rowx=mysql_fetch_row($rslt); + $group_id_values[$o] = $rowx[0]; + $group_name_values[$o] = $rowx[1]; + $o++; + } + + $o=0; + while ($groups_to_print > $o) + { + $stmt="SELECT group_rank,calls_today from vicidial_inbound_group_agents where user='$user' and group_id='$group_id_values[$o]'"; + $rslt=mysql_query($stmt, $link); + $ranks_to_print = mysql_num_rows($rslt); + if ($ranks_to_print > 0) + { + $row=mysql_fetch_row($rslt); + $SELECT_group_rank = $row[0]; + $calls_today = $row[1]; + } + else + {$calls_today=0; $SELECT_group_rank=0;} + if ( ($ADD=="4A") or ($ADD=="4B") ) + { + if (isset($_GET["RANK_$group_id_values[$o]"])) {$group_rank=$_GET["RANK_$group_id_values[$o]"];} + elseif (isset($_POST["RANK_$group_id_values[$o]"])) {$group_rank=$_POST["RANK_$group_id_values[$o]"];} + + if ($ranks_to_print > 0) + { + $stmt="UPDATE vicidial_inbound_group_agents set group_rank='$group_rank', group_weight='$group_rank' where group_id='$group_id_values[$o]' and user='$user';"; + $rslt=mysql_query($stmt, $link); + } + else + { + $stmt="INSERT INTO vicidial_inbound_group_agents set group_rank='$group_rank', group_weight='$group_rank', group_id='$group_id_values[$o]', user='$user';"; + $rslt=mysql_query($stmt, $link); + } + + $stmt="UPDATE vicidial_live_inbound_agents set group_weight='$group_rank' where group_id='$group_id_values[$o]' and user='$user';"; + $rslt=mysql_query($stmt, $link); + } + else {$group_rank = $SELECT_group_rank;} + + if (eregi("1$|3$|5$|7$|9$", $o)) + {$bgcolor='bgcolor="#B9CBFD"';} + else + {$bgcolor='bgcolor="#9BB9FB"';} + + $groups_list .= "<input type=\"checkbox\" name=\"groups[]\" value=\"$group_id_values[$o]\""; + $XFERgroups_list .= "<input type=\"checkbox\" name=\"XFERgroups[]\" value=\"$group_id_values[$o]\""; + $RANKgroups_list .= "<tr $bgcolor><td><input type=\"checkbox\" name=\"groups[]\" value=\"$group_id_values[$o]\""; + $p=0; + $group_ct = count($groups); + while ($p < $group_ct) + { + if ($group_id_values[$o] == $groups[$p]) + { + $groups_list .= " CHECKED"; + $RANKgroups_list .= " CHECKED"; + $groups_value .= " $group_id_values[$o]"; + } + $p++; + } + $p=0; + $XFERgroup_ct = count($XFERgroups); + while ($p < $XFERgroup_ct) + { + if ($group_id_values[$o] == $XFERgroups[$p]) + { + $XFERgroups_list .= " CHECKED"; + $XFERgroups_value .= " $group_id_values[$o]"; + } + $p++; + } + $groups_list .= "> <a href=\"$PHP_SELF?ADD=3111&group_id=$group_id_values[$o]\">$group_id_values[$o]</a> - $group_name_values[$o] <BR>\n"; + $XFERgroups_list .= "> <a href=\"$PHP_SELF?ADD=3111&group_id=$group_id_values[$o]\">$group_id_values[$o]</a> - $group_name_values[$o] <BR>\n"; + $RANKgroups_list .= "> <a href=\"$PHP_SELF?ADD=3111&group_id=$group_id_values[$o]\">$group_id_values[$o]</a> - $group_name_values[$o] </td>"; + $RANKgroups_list .= "<td>     <select size=1 name=RANK_$group_id_values[$o]>\n"; + $h="9"; + while ($h>=-9) + { + $RANKgroups_list .= "<option value=\"$h\""; + if ($h==$group_rank) + {$RANKgroups_list .= " SELECTED";} + $RANKgroups_list .= ">$h</option>"; + $h--; + } + $RANKgroups_list .= "</select></td>\n"; + $RANKgroups_list .= "<td align=right>     $calls_today</td></tr>\n"; + $o++; + } + if (strlen($groups_value)>2) {$groups_value .= " -";} + if (strlen($XFERgroups_value)>2) {$XFERgroups_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); + } + + $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 - GLI UTENTI POSSONO VISUALIZZARE QUALSIASI CAMPAGNA</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=\"AIUTO\" ALIGN=TOP></A>"; + + +###################################################################################################### +###################################################################################################### +####### 9 series, HELP screen +###################################################################################################### +###################################################################################################### + + +###################### +# ADD=99999 display the HELP SCREENS +###################### + +if ($ADD==99999) +{ +echo "\n"; +echo "\n"; +echo "\n"; +echo "
\n"; +echo "
VICIDIAL ADMIN: AIUTO


\n"; + +?> +VICIDIAL_USERS TABELLA

+ +
+Identificacio`n del usuario - este campo es donde usted pone el número de la identificacio`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 sesio`n como más cercano, deben ser el nivel de usuario 8 o mayor conseguir en la seccio`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, este es justo subdividir a usuarios y permitir las características futuras basadas sobre e`l. + +
+
+
+conexion del telefono - aquí es para donde usted puede fijar un valor de la conexion del telefono 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 conexion de vicidial.php. + +
+
+
+Paso del telefono - aquí es para donde usted puede fijar un valor del paso del telefono 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 conexion de vicidial.php. + +
+
+
+Hot Keys activo - esta opcio`n si el sistema a 1 permite que el usuario utilice la funcio`n ra`pida-dispositioning de Hot Keys adentro vicidial.php. + +
+
+
+El agente elige Ingroups - esta opcio`n si el sistema a 1 permite que el usuario elija los ingroups de los cuales recibirán llamadas cuando ellos conexion 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. + +
+
+
+Servicios repetidos programar - esta opcio`n no prohibe a agente a la disposicion una llamada como CALLBK y elige los datos y el tiempo en los cuales el plomo será reactivado. + +
+
+
+Servicios repetidos del Agente-Solamente - esta opcio`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 Tambien 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 opcio`n permite que un agente incorpore manualmente un nuevo plomo en el sistema y los llame. Esto Tambien permite llamar de cualquier número de telefono de su pantalla vicidial y pone esa llamada en su sesio`n. Utilice esta opcio`n con la precaucio`n. + +
+
+
+grabacion de Vicidial - esta opcio`n puede evitar que un agente haga cualquier grabacion despue`s de que se abran una sesio`n a vicidial. Esta opcio`n debe estar encendido para que vicidial siga la sesio`n de la grabacion de la campaña. + +
+
+
+Vicidial transfiere - esta opcio`n puede evitar que un agente abra la transferencia - la sesio`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 opcio`n omite simplemente el checkbox mezclado en una pantalla MÁS CERCANA de la conexion. + +
+
+
+Invalidacio`n de la grabacion de VICIDIAL - esta opcio`n seeliminará lo que es la opcio`n en la campaña para la grabacion.LISIADO no eliminará el ajuste de la grabacion de la campaña. NUNCAinhabilitará la grabacion en el cliente. ONDEMAND es el defecto ypermite que el agente comience y pare a registrar según lonecesitado. ALLCALLS comenzará la grabacion en el cliente siempreque una llamada se envíe a un agente. ALLFORCE comenzará lagrabacion en el cliente siempre que una llamada se envíe a un agenteque no da al agente ninguna opcio`n para parar el registrar. ParaALLCALLS y ALLFORCE hay una opcio`n para utilizar la grabacionretrasa para reducir en grabaciones y carga de sistema muy cortas delrecude. + +
+
+
+La campaña alinea - en esta seccio`n usted puede definir a la filaque un agente tendrá para cada campaña. Estas filas pueden serutilizadas para tener en cuenta la encaminamiento preferida de lallamada cuando la llamada siguiente del agente se fija alcampaign_rank. + +
+
+
+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. Usted Tambien podrá fijar la fila, o el nivel de habilidad, en estaseccio`n para cada uno de los grupos de entrada así como poder ver elnúmero de las llamadas recibidas de cada grupo de entrada para esteagente específico. Tambien en esta seccio`n está la capacidad de dar al agente una filapara cada grupo de entrada. Estas filas pueden ser utilizadas para laencaminamiento preferida de la llamada cuando esa opcio`n seselecciona en la pantalla del en-grupo. + +
+
+
+El agente altera la invalidacio`n de los datos del cliente - estaopcio`n se eliminará lo que es la opcio`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 que` es elajuste de la campaña. El defecto es NOT_ACTIVE. + +
+
+
+Altere las opciones de interfaz del agente - esta opcio`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 cancelacio`n - esta opcio`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 opcio`n si el sistema a 1 permite que el usuario suprima a grupos de usuario del sistema. + +
+
+
+La cancelacio`n enumera - esta opcio`n si el sistema a 1 permite que el usuario suprima listas vicidial del sistema. + +
+
+
+La cancelacio`n hace campaña - esta opcio`n si el sistema a 1 permite que el usuario suprima campañas vicidial del sistema. + +
+
+
+En-Grupos de la cancelacio`n - esta opcio`n si el sistema a 1 permite que el usuario suprima a En-Grupos vicidial del sistema. + +
+
+
+Suprima los agentes alejados - esta opcio`n si el sistema a 1 permite que el usuario suprima agentes alejados vicidial del sistema. + +
+
+
+La carga conduce - esta opcio`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 opcio`n si el sistema a 1 permite que el usuario visio`n y modifique los elementos de la pantalla del detalle de la campaña. + +
+
+
+Acceso de AGC Admin - esta opcio`n si el sistema a 1 permite a usuario a la conexion a las páginas astGUIclient del admin. + +
+
+
+La cancelacio`n de AGC telefona - esta opcio`n si el sistema a 1 permite que el usuario suprima entradas del telefono en las páginas astGUIclient del admin. + +
+
+
+Escrituras de la cancelacio`n - esta opcio`n si el sistema a 1 permite que el usuario suprima las escrituras de la campaña en la pantalla de la modificacio`n de la escritura. + +
+
+
+Modifique los plomos - esta opcio`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 seccio`n del admin. + +
+
+
+Cambie la campaña del agente - esta opcio`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 e`l. + +
+
+
+La cancelacio`n se filtra - esta opcio`n permite que el usuario pueda suprimir los filtros vicidial del plomo del sistema. + +
+
+
+Tiempos de la llamada de la cancelacio`n - esta opcio`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 El Tiempo De la Llamadas - 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. + +
+
+
+Modifique las secciones - estas opciones permiten que el usuariovisio`n y modifique cada uno los expedientes de las secciones. Si elsistema a 0, el usuario puede considerar la lista de la seccio`n, perono el detalle o la pantalla de la modificacio`n de un expediente enesa seccio`n. + +
+
+
+La visio`n divulga - esta opcio`n permite que el usuario visio`n losinformes de VICIDIAL. + + + + +



+ +VICIDIAL_CAMPAIGNS TABELLA

+
+
+Identificacio`n de la campaña - Úste es el nombre corto de la campaña, e`l no es editable despue`s de la sumisio`n inicial, no puede contener espacios y debe estar entre 2 y 8 caracteres en longitudh. + +
+
+
+Nombre de la campaña - esta es la descripcio`n de la campaña, debe estar entre 6 y 40 caracteres en longitud. + +
+
+
+Descripcio`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 - esta es la vez última que losajustes para esta campaña fueron modificados de cualquier manera. + +
+
+
+La fecha pasada de la conexion de la campaña - esta 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 e`l. + +
+
+
+Extension del parque - aquí es donde usted puede modificar para requisitos particulares en-sostiene la música para VICIDIAL. Cercio`rese de que la extension este` 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. Cercio`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 boton de la FORMA del WEB. + +
+
+
+Permita Closers - aquí es donde usted puede fijar si los usuarios de esta campaña tendrán la opcio`n para enviar la llamada a un más cercano. + +
+
+
+Grupo de la transferencia del defecto - este campo es el En-Grupo deldefecto que será seleccionado automáticamente cuando el agente va almarco de la transferir-conferencia en su interfaz del agente. + +
+
+
+Grupos permitidos de la transferencia - con estos listados delcheckbox usted puede seleccionar a los grupos a quienes los agentes enesta campaña pueden transferir llamadas. Permita Closers debe serpermitido para que esta opcio`n demuestre para arriba. + +
+
+
+Permita de entrada y mezclado - aquí es donde usted puede fijar silos usuarios de esta campaña tendrán la opcio`n para tomar llamadasde entrada con esta campaña. Si usted desea hacer de entrada y desalida mezclada entonces esto se debe fijar a Y. Si usted deseasolamente hacer marcar de salida en esta campaña fijo` esto a N.Default es N. + +
+
+
+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, seleccio`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 co`mo los plomos que emparejan los estados seleccionados arriba serán puestos en la tolva del plomo: +
  - DOWN: seleziona i primi contatti caricati nella tabella vicidial_list +
  - UP: seleziona gli ultimi contatti caricati nella tabella vicidial_list +
  - UP PHONE: seleziona il numero di telefono piu` grande e poi scorre verso il basso +
  - DOWN PHONE: seleziona il numero di telefono piu` piccolo e poi scorre verso l`alto +
  - 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 - este 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 trave`s en un minuto. + +
+
+
+Filtro del plomo - este es un me`todo de filtrar sus plomos usando un fragmento de una pregunta del SQL. Utilice esta característica con la precaucio`n, e`l es fácil de parar el marcar accidentalmente con la alteracio`n más leve a la declaracio`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 sumisio`n de la forma. Debe ser llenada otra vez cuando la escritura de VDhopper funciona. + +
+
+
+Me`todo del dial - Este campo es la manera de definir co`mo el marcar debe ocurrir. Si el MANUAL entonces el auto_dial_level es bloqueado en 0 a menos que se cambie el me`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 despue`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 me`todos. Usted no puede cambiar el nivel auto del dial si usted está en cualesquiera de los me`todos del dial del ADAPTAR. Solamente el sintonizador puede cambiar el nivel del dial cuando en modo que marca profe`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 automo`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 INVALIDACIo`N del ADAPTAR permite que usted fuerceun nuevo nivel del dial aunque el me`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 fijo` ellímite del porcentaje de llamadas caídas que usted quisiera mientrasque usaba un me`todo adaptante-profe`tico del dial, NO MANUAL o delCOCIENTE. + +
+
+
+El máximo adapta el dial llano - este campo es donde usted fijo` ellímite del límite al numbr de líneas que usted quisiera marcado poragente mientras que usaba un me`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 me`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 co`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 profe`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 me`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 me`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 AUTOMo`VIL. Este campo no es utilizado por el me`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 me`todos del dial cuando no hay contacto en elnúmero de telefono principal para un plomo, los estados del NA, deB, de la C.C. y de N. Este ajuste no es utilizado por el me`todoMANUAL del dial. + +
+
+
+Llamada siguiente del agente - esto se determina que` agente recibe la llamada siguiente que está disponible: +
  - random: o`rdenes por el valor al azar de la actualizacio`n en la tabla de los vicidial_live_agents +
  - oldest_call_start: las o`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 o`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 o`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. +
  - campaign_rank: o`rdenes de la fila dada al agente para la campaña. Lomás arriba posible a lo más bajo posible. +
  - fewest_calls: o`rdenes por el número de las llamadas recibidas por unagente para ese grupo de entrada específico. Menos llamadas primero. + +
+
+
+Tiempo de la llamada local - aquí es adonde usted fijo` durante que` horas usted quisiera marcar, según lo determinado por el tiempo local en está en cuál usted está llamando. Esto es controlada por co`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 despue`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 Casella Vocale 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 me`todo sin hacer una recarga en asterisco. El defecto es 9 basados sobre un 91NXXNXXXXXX en el dial plan - extensions.conf. + +
+
+
+Omita el co`digo del telefono - 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 opcio`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 Tambien 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. + +
+
+
+Extension de la campaña VDAD - este campo permite una extension 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 e`l se tome. Una encuesta sobre política AGI la muestra adicional es Tambien (8366 agi-VDADtransferSURVEY.agi ) ese ahora incluido los juegos un mensaje a la persona llamada y permite que e`l haga una opcio`n presionando buttons(effectively la pre-investigacio`n el plomo). Observe por favor eso a excepcio`n de los exámenes, llamadas políticas y las caridades esta forma de llamar son ilegales en los Estados Unidos. + +
+
+
+Extension de Rec de la Campaña - este campo permite para que una extension de encargo de la grabacion sea utilizada con VICIDIAL. Esto permite que usted utilice diversas extensiones dependiendo sobre cuánto tiempo usted desea permitir una grabacion máxima y que` 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 opcio`n incluida en los ejemplos es 8310 que registrarán en el formato del GSM para hasta que una hora. + +
+
+
+grabacion de la campaña - este menú permite que usted elija que`nivel de la grabacion se permite en esta campaña. NUNCAinhabilitará la grabacion en el cliente. ONDEMAND es el defecto ypermite que el agente comience y pare a registrar según lonecesitado. ALLCALLS comenzará la grabacion en el cliente siempreque una llamada se envíe a un agente. ALLFORCE comenzará lagrabacion en el cliente siempre que una llamada se envíe a un agenteque no da al agente ninguna opcio`n para parar el registrar. ParaALLCALLS y ALLFORCE hay una opcio`n para utilizar la grabacionretrasa 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 grabacion cuando la grabacion de la campaña es ONDEMAND o ALLCALLS. Las variables permitidas son CAMPAIGN CUSTPHONE FULLDATE TINYDATE EPOCH AGENT. El defecto es FULLDATE_AGENT y parecería este 20051020-103108_6666. Otro ejemplo es CAMPAIGN_TINYDATE_CUSTPHONE que parecería este TESTCAMP_51020103108_3125551212. 50 char max. + +
+
+
+La registracion retrasa - para la grabacion de ALLCALLS y deALLFORCE solamente. Esta voluntad del ajuste retrasa comenzar de lagrabacion 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 extension para cegar llamadas de la transferencia a cuando el agente consigue un contestador automático y chasca encendido el boton 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 despue`s que cuelga para arriba. + +
+
+
+AMD envían a la VM exten - este menú permite que usted defina si un mensaje este` dejado en un contestador automático cuando se detecta la llamada será remitido inmediatamente a la extension 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 puedeTambien especificar una extension de encargo despue`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 nume`rico del Alt del agente - esta opcio`n permite que un agente marque manualmente el número de telefono o el campo alterno address3 despue`s de que se haya llamado el número principal. + +
+
+
+Servicios repetidos programar - esta opcio`n no prohibe a agente a la disposicion 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, so`lo se aplica a las llamadas desalida. + +
+
+
+Casella Vocale - 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 clientedespue`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 extension 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 disposicion. + +
+
+
+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 telefono 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 co`digo de la pausa cuando chascan encendido el boton de PAUSA envicidial.php. Los co`digos de la pausa son definibles por campaña enel fondo de la pantalla del detalle de la opinio`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 conexion a la campaña incluso si no hay plomos cargadosen la tolva para esa campaña. Esta funcio`n no se necesita encampañas de CLOSER-type. El defecto es N. + +
+
+
+Mezcla de la orden de la lista - elimina los campos de la orden delplomo y del estado del dial. Utilizará los parámetros de la lista ydel estado para la entrada seleccionada de la mezcla de la lista en laseccio`n del submarino de la mezcla de la lista en lugar de otro. Eldefecto es LISIADO. + +
+
+
+Identificacio`n de la mezcla de la lista - identificacio`n de lamezcla de la lista. Debe ser a partir de 2-20 caracteres en longitudsin los espacios o la otra puntuacio`n especial. + +
+
+
+Nombre de la mezcla de la lista - nombre descriptivo de la mezcla dela lista. Debe ser a partir de 2-50 caracteres en longitud. + +
+
+
+Detalle de la mezcla de la lista - la composicio`n de la entrada de lamezcla de la lista. Contiene la identificacio`n de la lista, la ordende la mezcla, los porcentajes y los estados que hacen para arriba estamezcla de la lista. Los porcentajes tienen que agregar siempre hasta100, y las listas todas tienen que ser activas y fijadas a la campañapara que la entrada de la mezcla de la orden sea activada. + +
+
+
+Me`todo de la mezcla de la lista - el me`todo de mezclar a todas laspartes del detalle de la mezcla de la lista juntas. EVEN_MIX mezclarálos plomos de cada parte interpolada con las otras partes, como estos1.2.3.1.2.3.1.2.3. IN_ORDER pondrá los plomos en la orden en la cualse enumeran en la pantalla 1.1.1.2.2.2.3.3.3 del detalle de la mezclade la lista. La voluntad AL AZAR los puso en la orden AL AZAR1.3.2.1.1.3.2.1.3. El defecto es IN_ORDER. + +
+
+
+Identificacio`n manual de la lista del dial - el list_id del defectoque se utilizará cuando los placces de un agente una llamada manual yun nuevo expediente del plomo se crean en vicidial_list. El defecto es999. Este campo puede contener dígitos solamente. + + + + +



+ +VICIDIAL_LISTE TABELLA

+
+
+Identificacio`n de la lista - Úste es el nombre nume`rico de la lista, e`l no es editable despue`s de la sumisio`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 - esta es la descripcio`n de la lista, debe estar entre 2 y 20 caracteres en longitud. + +
+
+
+Descripcio`n de la lista - este es el campo de la nota para la lista,e`l es opcional. + +
+
+
+Fecha del cambio de la lista - esta es la vez última que los ajustespara esta lista fueron modificados de cualquier manera. + +
+
+
+Fecha de la llamada del último de la lista - esta es la vez últimaque conduce fue marcado de esta lista. + +
+
+
+Campaña - esta 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 trave`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 TABELLA

+
+
+Identificacio`n de grupo - Úste es el nombre corto del grupo de entrada, e`l no es editable despue`s de la sumisio`n inicial, no debe contener cualquier espacio y debe estar entre 2 y 20 caracteres en longitud. + +
+
+
+Nombre de grupo - esta es la descripcio`n del grupo, debe estar entre 2 y 30 caracteres en longitud. No puede incluir rociadas -, plusses + o espacios . + +
+
+
+Color del grupo - este 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 definicio`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 seleccio`n cuando un agente de VICIDIAL entra. + +
+
+
+Forma del Web - esta es la Direccion de encargo que el chascar en el boton 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 que` agente recibe la llamada siguiente que está disponible: +
  - random: o`rdenes por el valor al azar de la actualizacio`n en la tabla de los vicidial_live_agents +
  - oldest_call_start: las o`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 o`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 o`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. +
  - inbound_group_rank: o`rdenes de la fila dada al agente para el grupode entrada específico. Lo más arriba posible a lo más bajo posible. +
  - fewest_calls: o`rdenes por el número de las llamadas recibidas por unagente para ese grupo de entrada específico. Menos llamadas primero. +
  - campaign_rank: o`rdenes de la fila dada al agente para la campaña. Lomás arriba posible a lo más bajo posible. +
  - fewest_calls_campaign: orders by the number of calls received by an agent for the campaign. Least calls first. +
+
+
+Exhibicio`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 puedeTambien especificar una extension de encargo despue`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, so`lo se aplica a las llamadas desalida. + +
+
+
+Casella Vocale - 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 clientedespue`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 - esta es la extension dial plan que el archivo audiocaído deseado de la llamada está situado en en su servidor. + +
+
+
+Tiempo de la llamada - este es el esquema del tiempo de la llamada autilizar para este grupo de entrada. Tenga presente que el tiempoestá basado en el tiempo del servidor. El defecto es 24hours. + +
+
+
+Despue`s de la accio`n de las horas - la accio`n a realizarse si esdespue`s de horas según lo definido en la e`poca de la llamada paraeste grupo de entrada. Del RETRASO de la voluntad el retrasoinmediatamente la llamada, MESSASGE jugará el archivo en despue`s delcampo de Filenam del mensaje de las horas, la Extension enviará lallamada a despue`s de la extension de las horas en el dialplan yVOICEMAIL enviará la llamada a la caja del voicemail enumerada endespue`s del campo de Casella Vocale de las horas. El defecto es MENSAJE. + +
+
+
+Despue`s del nombre de fichero del mensaje de las horas - el archivoaudio situado en el servidor que se jugará si la accio`n se fija alMENSAJE. El defecto es VM-ADIO`S + +
+
+
+Despue`s de la extension de las horas - la extension dialplan paraenviar la llamada si la accio`n se fija a la Extension. El defecto es8300. + +
+
+
+Despue`s de las horas Casella Vocale - la caja del voicemail para enviar lallamada si la accio`n se fija a VOICEMAIL. + +
+
+
+Nombre de fichero agradable del mensaje - el archivo audio situado enel servidor que se jugará cuando viene la llamada adentro. Si sistemaa ---NONE --- entonces no se jugará ningún mensaje. El defecto es---NONE --- + +
+
+
+Música en contexto del asimiento - la música en el contexto delasimiento para utilizar cuando colocan al cliente en asimiento. Eldefecto es defecto. + +
+
+
+En el nombre de fichero del aviso del asimiento - el archivo audiosituado en el servidor que se jugará en un intervalo regular cuandoel cliente está en asimiento. El defecto es generic_hold. Estearchivo audio DEBE estar 9 segundos o menos en longitud. + +
+
+
+En el intervalo del aviso del asimiento - la longitud de la hora ensegundos de esperar antes de jugar encendido el aviso del sostener. Eldefecto es 60. + +
+
+
+Extension alerta del agente - la extension a enviar en la sesio`ndel agente para anunciar que una llamada está viniendo al agente.Esta extension debe tener un aparato de lectura de un archivo audio.No utilizar esta funcio`n fijo` esto a X. Default es X. + +
+
+
+La alarma del agente retrasa - la longitud de la hora en milisegundosde esperar antes de enviar la llamada al agente despue`s de jugarencendido la extension alerta del agente. El defecto es 1000. + +
+
+
+Grupo de la transferencia del defecto - este campo es el En-Grupo deldefecto que será seleccionado automáticamente cuando el agente va almarco de la transferir-conferencia en su interfaz del agente. + + + +



+ +VICIDIAL_REMOTE_AGENTS TABELLA

+
+
+Comienzo de la identificacio`n del usuario - esta es la identificacio`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. + +
+
+
+Extension externa - este es el número que usted desea las llamadas remitidas a. Cercio`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 telefono 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 e`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_LISTE

+
+
+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 identificacio`n de la lista en la primera columna. + + +



+ +VICIDIAL_CAMPAIGN_STATUSES TABELLA

+
+
+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 descripcio`n debe ser 2-30 caracteres en longitud y seleccionable define si demuestra para arriba en VICIDIAL como disposicion. Human_answered el campo se utiliza al calcular el porcentaje de lagota, o la tarifa del abandono. El ajuste human_answered a Yutilizará este estado al contar las llamadas humano-contestadas. La opcio`n de la categoría permite que usted agrupe varios estados enun catogy que se pueda utilizar para el análisis estadístico. + + + +



+ +VICIDIAL_CAMPAIGN_HOTKEYS TABELLA

+
+
+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 disposicion llama apenas presionando una sola llave en su teclado. Hay dos opciones especiales que usted puede utilizar conjuntamente conel número de telefono alterno que marca, ALTPH2 de HotKey - el dialcaliente del telefono 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 TABELLA

+
+
+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, despue`s losplomos que son dispositioned bajo estos estados del dial del alt delautomo`vil tendrán su alt_phone y-o los campos address3 marcadosdespue`s de que cualesquiera de estos ninguno-contesten a estados sefijan. + + + + + +



+ +VICIDIAL CODICI PAUSA OPERATORE

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



+ +VICIDIAL_USER_GROUPS TABELLA

+
+
+Grupo de usuario - este es el nombre corto de un grupo de usuario de Vicidial, intento para no utilizar ningunos espacios o puntuacio`n para los caracteres de este máximo 20 del campo, mínimo de 2 caracteres. + +
+
+
+Nombre de grupo - esta es la descripcio`n del máximo vicidial del grupo de usuario de 40 caracteres. + +
+
+
+Campañas permitidas - esta es una lista seleccionable de lascampañas a las cuales los miembros de este grupo de usuario puedenabrirse una sesio`n. La opcio`n de ALL-CAMPAIGNS permite que losusuarios en este grupo consideren y se abran una sesio`n a cualquiercampaña en el sistema. + + + + + +



+ +VICIDIAL_SCRIPT TABELLA

+
+
+Identificacio`n de la escritura - este es el nombre corto de una escritura de Vicidial. este necesita ser un identificador único. Intente no utilizar ningunos espacios o puntuacio`n para los caracteres de este máximo 10 del campo, mínimo de 2 caracteres. + +
+
+Nombre de la escritura - este es el título de una escritura de Vicidial. este es un resumen corto de los caracteres del máximo 50 de la escritura, mínimo de 2 caracteres. No debe haber espacios o puntuacio`n de la clase en campo de los theis. + +
+
+Comentarios de la escritura - este 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. + +
+
+Testo Script - 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" STYLE="z-index:17"> +</iframe> +
+ +
+
+
+Activo - esto se determina si esta escritura se puede seleccionar para ser utilizado por una campaña. + + + + + +



+ +VICIDIAL_LEAD_FILTRI TABELLA

+
+
+Identificacio`n del filtro - este es el nombre corto de un filtro del plomo de Vicidial. este necesita ser un identificador único. No utilice ningunos espacios o puntuacio`n para los caracteres de este máximo 10 del campo, mínimo de 2 caracteres. + +
+
+Nombre del filtro - este es un nombre más descriptivo del filtro. este 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_ORARI CHIAMATA TABELLA

+
+
+Identificacio`n del tiempo de la llamada - este es el nombre corto deuna definicio`n del tiempo de la llamada de Vicidial. este necesitaser un identificador único. No utilice ningunos espacios opuntuacio`n para los caracteres de este máximo 10 del campo, mínimode 2 caracteres. + +
+
+Nombre del tiempo de la llamada - este es un nombre más descriptivode la definicio`n del tiempo de la llamada. este es un resumen cortode los caracteres del máximo 30 de la definicio`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 definicio`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 - este es el tiempo dedefecto paran que el llamar será permitido que sea comenzado o dentrode esta definicio`n del tiempo de la llamada si la hora de salida dela di`a-de-$$$-SEMANA no se define. 0 es medianoche. Evitar el llamarfijo` totalmente este campo a 2400 y fijo` el tiempo de parada deldefecto a 2400. Permitir el llamar 24 horas al día fijo` la hora desalida a 0 y el tiempo de parada a 2400. + +
+
+Tiempos del comienzo y de parada del día laborable - estos son lostiempos de encargo por el día que se puede fijar para la definicio`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 - esta es la listade las definiciones específicas del tiempo de la llamada del estadoque se siguen en esta definicio`n del tiempo de la llamada. + +
+
+Estado del tiempo de la llamada del estado - este es el co`digo dedos letras para el estado que esta definicio`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 e`l así como todos los plomos quetienen dos co`digos del estado de la letra en ellos. + + + + +



+ +FUNCIONALIDAD DEL CARGADOR DE LA LISTA DE VICIDIAL

+
+
+El cargador tela-basado básico del plomo de VICIDIAL se diseñasimplemente para tomar un archivo del plomo - hasta 8MB de tamaño quees la lengüeta o la pipa delimitada y para cargarlo en la tabla delvicidial_list. El cargador del plomo permite el campo que elige y deTXT- el texto claramente, los valores separados coma de CSV- y XLS-sobresalen formatos del archivo. El cargador del plomo no hace lavalidacio`n de datos, sino que permite que usted compruebe para sabersi hay duplicados en sí mismo, dentro de la campaña o dentro delsistema entero. Tambien, cercio`rese de que usted haya creado lalista que estos plomos son estar debajo de modo que usted puedautilizarlos. Aquí está una lista de los campos en su orden apropiadapara los archivos del plomo: +
    +
  1. Co`digo del plomo del vendedor - demuestra para arriba en el campo de la identificacio`n del vendedor del GUI +
  2. Co`digo de fuente - uso interno solamente para los admins y DBAs +
  3. Identificacio`n de la lista - el número de la lista que estos plomos demostrarán para arriba debajo +
  4. Co`digo del telefono - el prefijo para el telefono number(1 para los E.E.U.U., 01144 para Reino Unido, 01161 para AUS, el etc) +
  5. Número de telefono - debe ser por lo menos 8 dígitos de largo +
  6. Título - título del customer(Mr. Ms señ., etc...) +
  7. Nome +
  8. Secondo Nome +
  9. Cognome +
  10. Indirizzo, linea 1 +
  11. Indirizzo, linea 2 +
  12. Indirizzo, linea 3 +
  13. Citta` +
  14. Stato - limitato a 2 caratteri +
  15. Provincia +
  16. CAP +
  17. Stato +
  18. Sesso +
  19. Data di Nascita +
  20. Numero di Telefono Alternativo +
  21. Email +
  22. Frase De Seguridad +
  23. Note +
+ +
NOTAS: La funcionalidad del cargador del plomo del sobresalir espermitida por una serie de escrituras del Perl y necesita tener unarchivo correctamente configurado de /etc/astguiclient.conf en lugaren el web server. Tambien, los mo`dulos de un Perl de los pares sedeben cargar para ella para trabajar Tambien -oLE-Storage_Lite-Storage_Lite y la Hoja de balance-ParseExcel. Ustedpuede comprobar para saber si hay errores runtime en estos mirando suarchivo del error_log de apache. Tambien, para los cheques deduplicacio`n contra gampaign enumera, la lista que tiene nuevos plomosel entrar e`l necesita ser creada en el sistema antes de que ustedcomience a cargar los plomos. + + + + +



+ + + + + + +TABELLA TELEFONI

+
+
+Extension del telefono - este campo es donde usted pone los nombres del telefono que aparecen al marcar con asterisco no incluyendo el protocolo o la barra vertical del principio. Por ejemplo: para el telefono SIP/test101 del SIP la extension del telefono sería test101. Tambien, para los telefonos IAX2 compruebe que usted utiliza el nombre del telefono completo: IAX2/IAXphone1@IAXphone1 sería IAXphone1@IAXphone1. Para zap los telefonos 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 telefono. + +
+
+
+Número del Dial plan - este campo está para el número que usted marca para tener el anillo del telefono. Este número se define en el archivo de extensions.conf de su servidor asterisco + +
+
+
+Caja de Buzon de Voz - este campo es para la caja del Buzon de voz donde van los mensajes para al usuario de este telefono. Utilizamos esto para comprobar los mensajes del Buzon de voz y para que el usuario pueda acceder al Buzon 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. + +
+
+
+Direccion IP del telefono - This field is for the phone's IP address if it is a VOIP phone. This is an optional field + +
+
+
+Direccion IP del ordenador - This field is for the user's computer IP address. This is an optional field + +
+
+
+IP del servidor - Este menú es donde usted selecciona en que servidor está el telefono activo. + +
+
+
+conexion - la conexion usada para el usuario del telefono a laconexion a los usos del cliente. + +
+
+
+Contraseña - la contraseña usada para el usuario del telefono a laconexion a los usos del cliente. + +
+
+
+Estado - el estado del telefono en el sistema, puede ser ACTIVO y ADMIN permiten que los clientes del GUI trabajen. ADMIN permite el acceso a este Web site de administracion. El resto de los estados no permiten el acceso al GUI o al Web de Admin. + +
+
+
+Cuenta activa - si el telefono está activado ponerla en la lista del cliente del GUI. + +
+
+
+Tipo de telefono - solamente para informacion administrativas. + +
+
+
+Nombre completo - usado por el GUIclient en la lista de telefonos activos. + +
+
+
+Compañía - solamente para las notas administrativas. + +
+
+
+Cuadro - todavía no puesto en ejecucio`n. + +
+
+
+Nuevos mensajes - número de los nuevos mensajes del Buzon de Voz para este telefono en el servidor del asterisco. + +
+
+
+Viejos mensajes - número de los viejos mensajes del Buzon de Voz para este telefono en el servidor del asterisco. + +
+
+
+Protocolo del cliente - el protocolo que el telefono utiliza para conectar con el servidor del asterisco: El Sip, IAX2, Zap. Tambien, para los números External remotos o los números SpeedDial que usted desea enumerar como telefonos. + +
+
+
+GMT local - La diferencia a partir del tiempo malo del ZULÚ del time(or de Greenwich) donde se localiza el telefono. 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. + +
+
+
+conexion del encargado - esta es la conexion que los clientes del GUI para este telefono utilizarán tener acceso a la base de datos donde residen los datos del servidor. + +
+
+
+Secreto del encargado - esta es la contraseña que los clientes del GUI para este telefono utilizarán tener acceso a la base de datos donde residen los datos del servidor. + +
+
+
+Usuario del defecto de VICIDIAL - este debe poner un valor prefijado en el campo del usuario de VICIDIAL siempre que este usuario del telefono abra a cliente app de astVICIDIAL. Deje el espacio en blanco para ningún usuario. + +
+
+
+Paso del defecto de VICIDIAL - este debe poner un valor prefijado en el campo de la contraseña de VICIDIAL siempre que este usuario del telefono abra a cliente app de astVICIDIAL. Deje el espacio en blanco para ningún paso. + +
+
+
+Campaña del defecto de VICIDIAL - este debe poner un valor prefijado en el campo de la campaña de VICIDIAL siempre que este usuario del telefono abra a cliente app de astVICIDIAL. Deje el espacio en blanco para ninguna campaña. + +
+
+
+Parque Exten - esta es la extension del estacionamiento del defecto para los apps del cliente. Verifique que diverso trabaje antes de que usted cambie esto. + +
+
+
+Extension de la conferencia - esta es la extension 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 - esta es la extension 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 - este es el nombre del archivo de la extension del parque del defecto VICIDIAL para los apps del cliente. Verifique que diverso trabaje antes de que usted cambie este limitado a 10 caracteres. + +
+
+
+Prefijo del monitor - este 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. + +
+
+
+grabacion Exten - esta es la extension dial plan para la extension de la grabacion 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 - esta es la extension dial plan que va a comprobar su voicemail. verifica con el archivo de extensions.conf antes de cambiar. + +
+
+
+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. + +
+
+
+Contexto de Exten - este es el contexto dial plan que este telefono 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 este es el contexto más amplio posible verifica con el archivo de extensions.conf antes de cambiar. + +
+
+
+DTMF envían el canal - esta 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 - este es el grupo de canal que las llamadas de salida de este telefono 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). + +
+
+
+Localizacio`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 - este 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 Direccion de la tela de la página usada para hacer operaciones de búsqueda de encargo del callerID que es la Direccion de prueba del defecto: http://astguiclient.sf.net/test_callerid_output.php + +
+
+
+URL del defecto de VICIDIAL - esta es la Direccion de la tela de la página usada para hacer preguntas de encargo de la forma del Web de VICIDIAL que es la Direccion de prueba del defecto: 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. + +
+
+
+Cambio de Usuario - 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 + +
+
+
+Comunicacio`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 extension 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 extension 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 Logging - Set to true to log many actions of astGUIclient usage to a text file on the user's computer. + +
+
+
+La coleta permitio` - 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. + +
+
+
+Boto`n de VMail - fije para verdad para exhibir el boton de VOICEMAIL y los mensajes cuentan la exhibicio`n en astGUIclient. + +
+
+
+Rápido restaure - fije para verdad para permitir un nuevo índice de restauran de la informacion 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 conexion 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 disposicion de una llamada a menos que seleccionaran "para parar el marcar" en la pantalla de la disposicion. + +
+
+
+Pare Rec despue`s de cada llamada - si está permitido el cliente de VICIDIAL parará se está encendiendo cualquier grabacion despue`s de que haya sido cada llamada dispositioned. Útil si usted está haciendo muchos de la grabacion o usted están utilizando una forma de la tela para accionar la grabacion. + +
+
+
+Permita los mensajes de SIPSAK - si está permitido el servidorenviará mensajes al telefono del SIP a la exhibicio`n en laexhibicio`n del LCD del telefono cuando está registrado en VICIDIAL.La característica trabaja solamente con los telefonos 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 conexion 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. Secondario server, non utilizzato attualmente. + +
+
+
+Base de datos de DBY - la base de datos de MySQL con la cual este usuario debe conectar. El defecto es asterisco. Secondario server, non utilizzato attualmente. + +
+
+
+Usuario de DBY - la conexion del usuario de MySQL que este usuario debe utilizar al conectar. El defecto es cron. Secondario server, non utilizzato attualmente. + +
+
+
+Paso de DBY - la contraseña del usuario de MySQL que este usuario debe utilizar al conectar. El defecto es 1234. Secondario server, non utilizzato attualmente. + +
+
+
+DBY viran - el puerto de MySQL hacia el lado de babor TCP que este usuario debe utilizar al conectar. El defecto es 3306. Secondario server, non utilizzato attualmente. + + +



+ +TABELLA SERVER

+
+
+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. + +
+
+
+Descripcio`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. + +
+
+
+Versione Di Asterisk - 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. + +
+
+
+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. + +
+
+
+Host Telnet - 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. + +
+
+
+Porta Telnet - 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. + +
+
+
+Usuario Del Manager - The username or login used to connect genericly to the Asterisk server manager. Default is 'cron' + +
+
+
+Contraseña del Manager - The secret or password used to connect genericly to the Asterisk server manager. Default is '1234' + +
+
+
+Usuario del Updater del Manager - 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. + +
+
+
+Usuario Listen del Manager - 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. + +
+
+
+Usuario Send del Manager - 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' + +
+
+
+Extension de Vmail Dump - The extension prefix used on this server to send calls directly through agc to a specific voicemail box. Default is '85026666666666' + +
+
+
+Extension del AD de VICIDIAL - The default extension if none is present in the campaign to send calls to for VICIDIAL auto dialing. Default is '8365' + +
+
+
+Contexto por Defecto - The default dial plan context used for scripts that operate for this server. Default is 'default' + +
+
+
+Funcionamiento del sistema - fijar esta opcio`n a Y permitirá laregistracion 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 opcio`n a Y permitirá laregistracion 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, Tambien laregistracion 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 opcio`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. Tambien 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 TABELLA

+
+
+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 opcio`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 TABELLA

+
+
+Uso No-Latino - esta opcio`n permite que usted omita la escritura dela exhibicio`n de la tela los caracteres del uso UTF8 y que no haganinguna expresio`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 autentificacio`n seancolocados en el webroot en su web server. El defecto es 1. + +
+
+
+Permita la registracion 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 - este es el IP address de la base dedatos para su instalacio`n de QueueMetrics. + +
+
+
+Nombre de la base de datos de QueueMetrics - este es el nombre de labase de datos para su base de datos de QueueMetrics. + +
+
+
+conexion de la base de datos de QueueMetrics - este es el nombre delusuario usado para abrirse una sesio`n a su base de datos deQueueMetrics. + +
+
+
+Contraseña de la base de datos de QueueMetrics - esta es lacontraseña usada para abrirse una sesio`n a su base de datos deQueueMetrics. + +
+
+
+URL de QueueMetrics - esta es la Direccion del URL o del Web siteusada para conseguir a su instalacio`n de QueueMetrics. + +
+
+
+Identificacio`n del registro de QueueMetrics - esta es laidentificacio`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 telefono del cliente para los informesmodificados para requisitos particulares de QueueMetrics. El defectono es NINGUNO no poblar cualquier cosa. + +
+
+
+El agente de VICIDIAL inhabilita la exhibicio`n - este campo seutiliza para seleccionar cuando demostrar a un agente cuando susesio`n ha sido inhabilitada por el sistema, una accio`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, este permite queel ajuste de la tabla de los telefonos trabaje correctamente, elservidor enviará mensajes al telefono del SIP a la exhibicio`n en laexhibicio`n del LCD del telefono cuando está registrado en VICIDIAL.Esta característica trabaja solamente con los telefonos del SIP yrequiere el uso del sipsak ser instalada en el web server. El defectoes 0. + +
+
+
+URL casero del Admin - esta es la Direccion del URL o del Web siteque usted irá si usted chasca encendido el acoplamiento CASERO en latapa de la página de admin.php. + +
+
+
+Permita el logfile de la transferencia del agente - esta opcio`nregistrará a un logfile del texto en el webserver cada vez que unallamada se transfiere a un agente. El defecto es 0, inhabilitado. + + + + + +



+ +VICIDIAL_STATUSES TABELLA

+
+
+Con el uso de los estados de sistema, usted puede tener estados queexistan para la campaña y el en-grupo. El estado debe ser 1-6caracteres en longitud, la descripcio`n debe ser 2-30 caracteres enlongitud y seleccionable define si demuestra para arriba en VICIDIALcomo disposicion del agente. Human_answered el campo se utiliza alcalcular el porcentaje de la gota, o la tarifa del abandono. El ajustehuman_answered a Y utilizará este estado al contar las llamadashumano-contestadas. La opcio`n de la categoría permite que ustedagrupe varios estados en un catogy que se pueda utilizar para elanálisis estadístico. + + +



+ +VICIDIAL_STATUS_CATEGORIES TABELLA

+
+
+Con el uso de las categorías del estado de sistema, usted puedeagrupar juntos estados para tener en cuenta análisis estadístico enun grupo de estados. La identificacio`n de la categoría debe ser 2-20caracteres en longitud sin espacios, el nombre debe ser 2-50caracteres en longitud, la descripcio`n es opcional y la exhibicio`nde TimeonVDAD define si ese estado será uno de hasta que 4 estadosque se puedan calcular y exhibir en el tiempo en informe del tiemporeal de VDAD. + + + + +







+







+FINE +
+\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 "LISTE: $camp_lists
\n"; + echo "ESITI: $dial_statuses
\n"; + echo "FILTRO: $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 "Non hai l`autorizzazione per accedere a questa pagina\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 "Anteprima 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";} + +echo "\n"; +echo " + + +\n"; +echo "
English Italiano
BGCOLOR=#D9E6FE cellpadding=2 cellspacing=0> + + + + + + + + + + + + + + + 1) { + ?> +> + 1) + { + +# if ($sh=='basic') {$basic_sh="bgcolor=\"$subcamp_color\""; $basic_fc="$subcamp_font";} +# else {$basic_sh=''; $basic_fc='BLACK';} +# if ($sh=='detail') {$detail_sh="bgcolor=\"$subcamp_color\""; $detail_fc="$subcamp_font";} +# else {$detail_sh=''; $detail_fc='BLACK';} +# if ($sh=='dialstat') {$dialstat_sh="bgcolor=\"$subcamp_color\""; $dialstat_fc="$subcamp_font";} +# else {$dialstat_sh=''; $dialstat_fc='BLACK';} + + if ($sh=='basic') {$sh='list';} + if ($sh=='detail') {$sh='list';} + if ($sh=='dialstat') {$sh='list';} + + if ($sh=='list') {$list_sh="bgcolor=\"$subcamp_color\""; $list_fc="$subcamp_font";} + else {$list_sh=''; $list_fc='BLACK';} + if ($sh=='status') {$status_sh="bgcolor=\"$subcamp_color\""; $status_fc="$subcamp_font";} + else {$status_sh=''; $status_fc='BLACK';} + if ($sh=='hotkey') {$hotkey_sh="bgcolor=\"$subcamp_color\""; $hotkey_fc="$subcamp_font";} + else {$hotkey_sh=''; $hotkey_fc='BLACK';} + if ($sh=='recycle') {$recycle_sh="bgcolor=\"$subcamp_color\""; $recycle_fc="$subcamp_font";} + else {$recycle_sh=''; $recycle_fc='BLACK';} + if ($sh=='autoalt') {$autoalt_sh="bgcolor=\"$subcamp_color\""; $autoalt_fc="$subcamp_font";} + else {$autoalt_sh=''; $autoalt_fc='BLACK';} + if ($sh=='pause') {$pause_sh="bgcolor=\"$subcamp_color\""; $pause_fc="$subcamp_font";} + else {$pause_sh=''; $pause_fc='BLACK';} + if ($sh=='listmix') {$listmix_sh="bgcolor=\"$subcamp_color\""; $listmix_fc="$subcamp_font";} + else {$listmix_sh=''; $listmix_fc='BLACK';} + + ?> +> + + + + + + + + + 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=\"$settings_color\""; $settings_fc="$settings_font";} # pink + else {$settings_sh=''; $settings_fc='BLACK';} + if ($sh=='status') {$status_sh="bgcolor=\"$status_color\""; $status_fc="$status_font";} # pink + else {$status_sh=''; $status_fc='BLACK';} + + ?> +> + + + + + + + + 1) { + ?> + > + 1) { + ?> + > + 1) { + ?> + > + 1) { + ?> + > + 1) { + ?> + > + 1) { + ?> + > + \n"; + echo "Le no autorizan a visio`n esta página. Vaya por favor detrás.\n"; + } + +} +if (strlen($reports_hh) > 1) { + ?> +> + + + + +
  VICIDIAL ADMIN - HOME | Logout  
> SIZE=> Utenti > SIZE=> Campagne > SIZE=> Liste > SIZE=> Script > SIZE=> Filtri > SIZE=> Gruppi Inbound > SIZE=> Gruppi Utenti > SIZE=> Operatori Remoti > SIZE=> Admin > SIZE=> Report
>   > Visualizza Utenti     |     > Aggiungi Nuovo Utente     |     > Copia Utente     |     > Ricerca Utenti     |     > User Stats     |     > User Status
COLSPAN=2> SIZE=>Main Campagne COLSPAN=1> SIZE=> Esiti COLSPAN=1> SIZE=> Hot-Key COLSPAN=2> SIZE=>Riciclaggio Contatti COLSPAN=1> SIZE=> Chiama-Auto-Num-Altern COLSPAN=1> SIZE=>Codici Pausa COLSPAN=2> SIZE=>Mix Liste
>   > Visualizza Campagne     |     > Aggiungi Nuova Campagna     |     > Copia Campagna     |     > Riepilogo Campagne In Tempo Reale
>   > Visualizza Liste     |     > Nuova Lista     |     > Ricerca Contatti     |     > Aggiungi Numero Alla Lista DNC     |     > Carica Nuovi Contatti
>   > Visualizza Script     |     > Aggiungi Nuovo Script
>   > Visualizza Filtri     |     > Aggiungi Nuovo Filtro
>   > Visualizza Gruppi Inbound     |     > Aggiungi Gruppo Inbound     |     > Copia Gruppo Inbound
>   > Visualizza Gruppi Utenti     |     >Aggiungi Nuovo Gruppo Utente     |     > Report Orario Per Gruppo
>   > Visualizza Operatori Remoti     |     >Aggiungi Operatore Remoto
COLSPAN=2> SIZE=> Orari Chiamata COLSPAN=2> SIZE=> Telefoni COLSPAN=2> SIZE=> Conferencias COLSPAN=1> SIZE=> Server COLSPAN=1> SIZE=> Impostazioni di Sistema COLSPAN=2> SIZE=> Esiti di Default
>   > Elenca Orari Chiamata     |     > Nuovo Orario Chiamate     |     > Elenca Orari Chiamata Per Stati     |     > Nuovo Orario Chiamate Per Stato  
>   > Visualizza Telefoni   |   > Aggiungi Un Nuovo Telefono
>Visualizza Conferenze   |   > Aggiungi Conferenza   |   > Visualizza Conferenze VICIDIAL   |   > Aggiungi Conferenza VICIDIAL
> Visualizza Server   |   > Aggiungi Un Nuovo Server
> Impostazioni di Sistema
> Esiti di Default   |   > Categorie di esiti
>  
+
\n"; + echo ""; + + echo "
NUOVO UTENTE
\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 "
Numero Utente: $NWB#vicidial_users-user$NWE
Password: $NWB#vicidial_users-pass$NWE
Nome Completo: $NWB#vicidial_users-full_name$NWE
Livello Utente: $NWB#vicidial_users-user_level$NWE
Gruppo Utente:
Login Telefono: $NWB#vicidial_users-phone_login$NWE
Password Telefono: $NWB#vicidial_users-phone_pass$NWE
\n"; + } + else + { + echo "Non hai l`autorizzazione per accedere a questa pagina\n"; + exit; + } +} + + +###################### +# ADD=1 display the COPY USER FORM SCREEN +###################### + +if ($ADD=="1A") +{ + if ($LOGmodify_users==1) + { + echo "
\n"; + echo ""; + + echo "
COPIA UTENTE\n"; + echo "\n"; + echo "
\n"; + echo "\n"; + echo "\n"; + echo "\n"; + + if ($LOGuser_level==9) {$levelMAX=10;} + else {$levelMAX=$LOGuser_level;} + + echo "\n"; + echo "\n"; + echo "
Numero Utente: $NWB#vicidial_users-user$NWE
Password: $NWB#vicidial_users-pass$NWE
Nome Completo: $NWB#vicidial_users-full_name$NWE
Utente Da Copiare: $NWB#vicidial_users-user$NWE
\n"; + } + else + { + echo "Non hai l`autorizzazione per accedere a questa pagina\n"; + exit; + } +} + + +###################### +# ADD=11 display the ADD NEW CAMPAIGN FORM SCREEN +###################### + +if ($ADD==11) +{ + if ($LOGmodify_campaigns==1) + { + echo "
\n"; + echo ""; + + echo "
NUOVA CAMPAGNA\n"; + echo "\n"; + echo "
\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\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 Campagna: $NWB#vicidial_campaigns-campaign_id$NWE
Nome Campagna: $NWB#vicidial_campaigns-campaign_name$NWE
Descrizione Campagna: $NWB#vicidial_campaigns-campaign_description$NWE
Attivo: $NWB#vicidial_campaigns-active$NWE
Extension del parking: $NWB#vicidial_campaigns-park_ext$NWE
Nombre de fichero Del Parking: $NWB#vicidial_campaigns-park_file_name$NWE
Web Form: $NWB#vicidial_campaigns-web_form_address$NWE
Permitir Closers: $NWB#vicidial_campaigns-allow_closers$NWE
Livello Coda Chiamate: $NWB#vicidial_campaigns-hopper_level$NWE
Livello Auto Dial: (0 = off)$NWB#vicidial_campaigns-auto_dial_level$NWE
Operatore Da Scegliere Per La Chiamata Successiva: $NWB#vicidial_campaigns-next_agent_call$NWE
Orario Chiamate: $NWB#vicidial_campaigns-local_call_time$NWE
Casella Vocale: $NWB#vicidial_campaigns-voicemail_ext$NWE
Script: $NWB#vicidial_campaigns-campaign_script$NWE
Esegui all`avvio della telefonata: $NWB#vicidial_campaigns-get_call_launch$NWE
\n"; + } + else + { + echo "Non hai l`autorizzazione per accedere a questa pagina\n"; + exit; + } +} + + +###################### +# ADD=12 display the COPY CAMPAIGN FORM SCREEN +###################### + +if ($ADD==12) +{ + if ($LOGmodify_campaigns==1) + { + echo "
\n"; + echo ""; + + echo "
COPIA UNA CAMPAGNA\n"; + echo "\n"; + echo "
\n"; + echo "\n"; + echo "\n"; + + echo "\n"; + + echo "\n"; + echo "
ID Campagna: $NWB#vicidial_campaigns-campaign_id$NWE
Nome Campagna: $NWB#vicidial_campaigns-campaign_name$NWE
Campagna da copiare:$NWB#vicidial_campaigns-campaign_id$NWE
\n"; + } + else + { + echo "Non hai l`autorizzazione per accedere a questa pagina\n"; + exit; + } +} + + +###################### +# ADD=111 display the ADD NEW LIST FORM SCREEN +###################### + +if ($ADD==111) +{ + if ($LOGmodify_lists==1) + { + echo "
\n"; + echo ""; + + echo "
AGGIUNGI NUOVA LISTA\n"; + echo "\n"; + echo "
\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "
ID Lista: (solo cifre)$NWB#vicidial_lists-list_id$NWE
Nome Lista: $NWB#vicidial_lists-list_name$NWE
Descrizione Lista: $NWB#vicidial_lists-list_description$NWE
Campagna: $NWB#vicidial_lists-campaign_id$NWE
Attivo: $NWB#vicidial_lists-active$NWE
\n"; + } + else + { + echo "Non hai l`autorizzazione per accedere a questa pagina\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 telefono 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 "
AGGIUNGI UN NUMERO ALLA LISTA DA NON CHIAMARE\n"; +echo "\n"; +echo "
\n"; +echo "\n"; +echo "\n"; +echo "
Numero di Telefono: (solo cifre)$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 "
NUOVO GRUPPO INBOUND\n"; + echo "\n"; + echo "
\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 Gruppo: (senza spazi)$NWB#vicidial_inbound_groups-group_id$NWE
Nome Gruppo: $NWB#vicidial_inbound_groups-group_name$NWE
Colore Gruppo: $NWB#vicidial_inbound_groups-group_color$NWE
Attivo: $NWB#vicidial_inbound_groups-active$NWE
Web Form: $NWB#vicidial_inbound_groups-web_form_address$NWE
Casella Vocale: $NWB#vicidial_inbound_groups-voicemail_ext$NWE
Operatore Da Scegliere Per La Chiamata Successiva: $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
Esegui all`avvio della telefonata: $NWB#vicidial_inbound_groups-get_call_launch$NWE
\n"; + } + else + { + echo "Non hai l`autorizzazione per accedere a questa pagina\n"; + exit; + } +} + + +###################### +# ADD=1211 display the COPY INBOUND GROUP SCREEN +###################### + +if ($ADD==1211) +{ + if ($LOGmodify_ingroups==1) + { + echo "
\n"; + echo ""; + + echo "
COPIA GRUPPO INBOUND\n"; + echo "\n"; + echo "
\n"; + echo "\n"; + echo "\n"; + + echo "\n"; + + echo "\n"; + echo "
ID Gruppo: (senza spazi)$NWB#vicidial_inbound_groups-group_id$NWE
Nome Gruppo: $NWB#vicidial_inbound_groups-group_name$NWE
ID Gruppo Da Copiare: $NWB#vicidial_inbound_groups-group_id$NWE
\n"; + } + else + { + echo "Non hai l`autorizzazione per accedere a questa pagina\n"; + exit; + } +} + + +###################### +# ADD=11111 display the ADD NEW REMOTE AGENTS SCREEN +###################### + +if ($ADD==11111) +{ + if ($LOGmodify_remoteagents==1) + { + echo "
\n"; + echo ""; + + echo "
NUOVO OPERATORE REMOTO\n"; + echo "\n"; + echo "
\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "
Inizio ID Utente: (solo cifre, incremented)$NWB#vicidial_remote_agents-user_start$NWE
Numero di Linee: (solo cifre)$NWB#vicidial_remote_agents-number_of_lines$NWE
IP Server: $NWB#vicidial_remote_agents-server_ip$NWE
Numero Di Interno Remoto: (numero del dialplan usato per raggiungere gli operatori)$NWB#vicidial_remote_agents-conf_exten$NWE
Esito: $NWB#vicidial_remote_agents-status$NWE
Campagna: $NWB#vicidial_remote_agents-campaign_id$NWE
Gruppi Inbound: \n"; + echo "$groups_list"; + echo "$NWB#vicidial_remote_agents-closer_campaigns$NWE
\n"; + echo "NOTA: Potrebbero passare fino a 30 secondi prima che le modifiche qui effettuate possano essere accettate\n"; + } + else + { + echo "Non hai l`autorizzazione per accedere a questa pagina\n"; + exit; + } +} + + +###################### +# ADD=111111 display the ADD NEW USERS GROUP SCREEN +###################### + +if ($ADD==111111) +{ + if ($LOGmodify_usergroups==1) + { + echo "
\n"; + echo ""; + + echo "
NUOVO GRUPPO UTENTI\n"; + echo "\n"; + echo "
\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "
Gruppo: (senza spazi e punteggiatura)$NWB#vicidial_user_groups-user_group$NWE
Descrizione: (Descrizione del gruppo)$NWB#vicidial_user_groups-group_name$NWE
\n"; + } + else + { + echo "Non hai l`autorizzazione per accedere a questa pagina\n"; + exit; + } +} + + +###################### +# ADD=1111111 display the ADD NEW SCRIPT SCREEN +###################### + +if ($ADD==1111111) +{ + if ($LOGmodify_scripts==1) + { + echo "
\n"; + echo ""; + + echo "
AGGIUNGI NUOVO SCRIPT\n"; + echo "\n"; + echo "
\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "
ID Script:: (senza spazi e punteggiatura)$NWB#vicidial_scripts-script_id$NWE
Nome Script: (titolo script)$NWB#vicidial_scripts-script_name$NWE
Note Script: $NWB#vicidial_scripts-script_comments$NWE
Attivo: $NWB#vicidial_scripts-active$NWE
Testo Script: "; + # BEGIN Insert Field + echo ""; + echo "
"; + # END Insert Field + echo " $NWB#vicidial_scripts-script_text$NWE
\n"; + } + else + { + echo "Non hai l`autorizzazione per accedere a questa pagina\n"; + exit; + } +} + + +###################### +# ADD=11111111 display the ADD NEW FILTER SCREEN +###################### + +if ($ADD==11111111) +{ + if ($LOGmodify_filters==1) + { + echo "
\n"; + echo ""; + + echo "
AGGIUNGI NUOVO FILTRO\n"; + echo "\n"; + echo "
\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "
ID Filtro: (senza spazi e punteggiatura)$NWB#vicidial_lead_filters-lead_filter_id$NWE
Nome Del Filtro: (breve descrizione del filtro)$NWB#vicidial_lead_filters-lead_filter_name$NWE
Commenti Del Filtro: $NWB#vicidial_lead_filters-lead_filter_comments$NWE
Filtro Sql: $NWB#vicidial_lead_filters-lead_filter_sql$NWE
\n"; + } + else + { + echo "Non hai l`autorizzazione per accedere a questa pagina\n"; + exit; + } +} + + +###################### +# ADD=111111111 display the ADD NEW CALL TIME SCREEN +###################### + +if ($ADD==111111111) +{ + if ($LOGmodify_call_times==1) + { + echo "
\n"; + echo ""; + + echo "
AGGIUNGI ORARIO CHIAMATE\n"; + echo "\n"; + echo "
\n"; + echo "\n"; + echo "\n"; + echo "\n"; + + echo "\n"; + echo "\n"; + echo "
ID Orario Chiamate: (senza spazi e punteggiatura)$NWB#vicidial_call_times-call_time_id$NWE
Nome Orario Chiamate: (breve descrizione dell`orario chiamate)$NWB#vicidial_call_times-call_time_name$NWE
Note Orario Chiamate: $NWB#vicidial_call_times-call_time_comments$NWE
Las opciones del día y del tiempo aparecerán una vez que usted hayacreado la definicio`n del tiempo de la llamada
\n"; + } + else + { + echo "Non hai l`autorizzazione per accedere a questa pagina\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 "
Identificacio`n Del Tiempo De la Llamada Del Estado: (senza spazi e punteggiatura)$NWB#vicidial_call_times-call_time_id$NWE
State Call Time State: (senza spazi e punteggiatura)$NWB#vicidial_call_times-state_call_time_state$NWE
_ Estado Llamar Tiempo Nombre: (breve descrizione dell`orario chiamate)$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 definicio`n del tiempo de la llamada
\n"; + } + else + { + echo "Non hai l`autorizzazione per accedere a questa pagina\n"; + exit; + } +} + + +###################### +# ADD=11111111111 display the ADD NEW PHONE SCREEN +###################### + +if ($ADD==11111111111) +{ + if ($LOGast_admin_access==1) + { + echo "
\n"; + echo ""; + + echo "
AGGIUNGI UN NUOVO TELEFONO\n"; + echo "\n"; + echo "
\n"; + + echo "
\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "
Interno Telefono: $NWB#phones-extension$NWE
Numero De Dial plan: (solo cifre)$NWB#phones-dialplan_number$NWE
Buzon de voz: (solo cifre)$NWB#phones-voicemail_id$NWE
CallerID De salida: (solo cifre)$NWB#phones-outbound_cid$NWE
Direccion IP del telefono: (optional)$NWB#phones-phone_ip$NWE
Direccion IP del ordenador: (optional)$NWB#phones-computer_ip$NWE
IP Server: $NWB#phones-server_ip$NWE
Login: $NWB#phones-login$NWE
Password: $NWB#phones-pass$NWE
Esito: $NWB#phones-status$NWE
Cuenta Activa: $NWB#phones-active$NWE
Tipo Del telefono: $NWB#phones-phone_type$NWE
Nome Completo: $NWB#phones-fullname$NWE
Compania: $NWB#phones-company$NWE
Foto: $NWB#phones-picture$NWE
Protocollo Client: $NWB#phones-protocol$NWE
Fuso Orario Locale: (No ajustar para el DST)$NWB#phones-local_gmt$NWE
\n"; + } + else + { + echo "Non hai l`autorizzazione per accedere a questa pagina\n"; + exit; + } +} + + +###################### +# ADD=111111111111 display the ADD NEW SERVER SCREEN +###################### + +if ($ADD==111111111111) +{ + if ($LOGmodify_servers==1) + { + echo "
\n"; + echo ""; + + echo "
AGGIUNGI UN NUOVO SERVER\n"; + echo "\n"; + echo "
\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "
ID Server: $NWB#servers-server_id$NWE
Descrizione Server: $NWB#servers-server_description$NWE
Indirizzo IP del Server: $NWB#servers-server_ip$NWE
Attivo: $NWB#servers-active$NWE
Versione Di Asterisk: $NWB#servers-asterisk_version$NWE
\n"; + } + else + { + echo "Non hai l`autorizzazione per accedere a questa pagina\n"; + exit; + } +} + + +###################### +# ADD=1111111111111 display the ADD NEW CONFERENCE SCREEN +###################### + +if ($ADD==1111111111111) +{ + if ($LOGast_admin_access==1) + { + echo "
\n"; + echo ""; + + echo "
CREA UNA NUOVA CONFERENZA\n"; + echo "\n"; + echo "
\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "
Número de la Conferencia: (solo cifre)$NWB#conferences-conf_exten$NWE
IP Server: $NWB#conferences-server_ip$NWE
\n"; + } + else + { + echo "Non hai l`autorizzazione per accedere a questa pagina\n"; + exit; + } +} + + +###################### +# ADD=11111111111111 display the ADD NEW VICIDIAL CONFERENCE SCREEN +###################### + +if ($ADD==11111111111111) +{ + if ($LOGast_admin_access==1) + { + echo "
\n"; + echo ""; + + echo "
CREA UNA NUOVA CONFERENZA VICIDIAL\n"; + echo "\n"; + echo "
\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "
Número de la Conferencia: (solo cifre)$NWB#conferences-conf_exten$NWE
IP Server: $NWB#conferences-server_ip$NWE
\n"; + } + else + { + echo "Non hai l`autorizzazione per accedere a questa pagina\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 "
UTENTE NON AGGIUNTO - Esiste gia` un utente nel sistema con questo numero utente\n";} + else + { + if ( (strlen($user) < 2) or (strlen($pass) < 2) or (strlen($full_name) < 2) or (strlen($user) > 8) ) + { + echo "
UTENTE NON AGGIUNTO - Per favore torna indietro e ricontrolla i dati inseriti\n"; + echo "
L`ID utente deve essere lungo tra i 2 e gli 8 caratteri\n"; + echo "
il nome e la password devono essere lunghi almeno 2 caratteri\n"; + } + else + { + echo "
UTENTE AGGIUNTO: $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=2A adds the copied new user to the system +###################### + +if ($ADD=="2A") +{ + 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 "
UTENTE NON AGGIUNTO - Esiste gia` un utente nel sistema con questo numero utente\n";} + else + { + if ( (strlen($user) < 2) or (strlen($pass) < 2) or (strlen($full_name) < 2) or (strlen($user) > 8) ) + { + echo "
UTENTE NON AGGIUNTO - Per favore torna indietro e ricontrolla i dati inseriti\n"; + echo "
L`ID utente deve essere lungo tra i 2 e gli 8 caratteri\n"; + echo "
il nome e la password devono essere lunghi almeno 2 caratteri\n"; + } + else + { + $stmt="INSERT INTO vicidial_users (user,pass,full_name,user_level,user_group,phone_login,phone_pass,delete_users,delete_user_groups,delete_lists,delete_campaigns,delete_ingroups,delete_remote_agents,load_leads,campaign_detail,ast_admin_access,ast_delete_phones,delete_scripts,modify_leads,hotkeys_active,change_agent_campaign,agent_choose_ingroups,closer_campaigns,scheduled_callbacks,agentonly_callbacks,agentcall_manual,vicidial_recording,vicidial_transfers,delete_filters,alter_agent_interface_options,closer_default_blended,delete_call_times,modify_call_times,modify_users,modify_campaigns,modify_lists,modify_scripts,modify_filters,modify_ingroups,modify_usergroups,modify_remoteagents,modify_servers,view_reports,vicidial_recording_override,alter_custdata_override) SELECT \"$user\",\"$pass\",\"$full_name\",user_level,user_group,phone_login,phone_pass,delete_users,delete_user_groups,delete_lists,delete_campaigns,delete_ingroups,delete_remote_agents,load_leads,campaign_detail,ast_admin_access,ast_delete_phones,delete_scripts,modify_leads,hotkeys_active,change_agent_campaign,agent_choose_ingroups,closer_campaigns,scheduled_callbacks,agentonly_callbacks,agentcall_manual,vicidial_recording,vicidial_transfers,delete_filters,alter_agent_interface_options,closer_default_blended,delete_call_times,modify_call_times,modify_users,modify_campaigns,modify_lists,modify_scripts,modify_filters,modify_ingroups,modify_usergroups,modify_remoteagents,modify_servers,view_reports,vicidial_recording_override,alter_custdata_override from vicidial_users where user=\"$source_user_id\";"; + $rslt=mysql_query($stmt, $link); + + $stmtA="INSERT INTO vicidial_inbound_group_agents (user,group_id,group_rank,group_weight,calls_today) SELECT \"$user\",group_id,group_rank,group_weight,\"0\" from vicidial_inbound_group_agents where user=\"$source_user_id\";"; + $rslt=mysql_query($stmtA, $link); + + $stmtA="INSERT INTO vicidial_campaign_agents (user,campaign_id,campaign_rank,campaign_weight,calls_today) SELECT \"$user\",campaign_id,campaign_rank,campaign_weight,\"0\" from vicidial_campaign_agents where user=\"$source_user_id\";"; + $rslt=mysql_query($stmtA, $link); + + echo "
USER COPIED: $user copied from $source_user_id\n"; + echo "

\n"; + echo "Click here to go to the user record\n"; + echo "

\n"; + + ### LOG CHANGES TO LOG FILE ### + if ($WeBRooTWritablE > 0) + { + $fp = fopen ("./admin_changes_log.txt", "a"); + fwrite ($fp, "$date|ADD A COPIED USER |$PHP_AUTH_USER|$ip|$user|$source_user_id|$stmt|\n"); + fclose($fp); + } + } + } +exit; +} + +###################### +# 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 "
CAMPAGNA NON AGGIUNTA - Esiste gia` una campagna nel sistema con questo ID\n";} + else + { + $stmt="SELECT count(*) from vicidial_inbound_groups where group_id='$campaign_id';"; + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + if ($row[0] > 0) + {echo "
CAMPAIGN NOT ADDED - there is already an inbound group 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 "
CAMPAGNA NON AGGIUNTA - Per favore torna indietro e ricontrolla i dati inseriti\n"; + echo "
L`ID Campagna deve essere lungo tra i 2 e gli 8 caratteri\n"; + echo "
il nome della campagna deve essere lungo tra i 6 e i 40 caratteri\n"; + } + else + { + echo "
CAMPAGNA AGGIUNTA: $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,list_order_mix) 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','DISABLED');"; + $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|NUOVA CAMPAGNA |$PHP_AUTH_USER|$ip|$stmt|\n"); + fclose($fp); + } + + } + } + } +$ADD=31; +} + +###################### +# ADD=20 adds copied new campaign to the system +###################### + +if ($ADD==20) +{ + + 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 "
CAMPAGNA NON AGGIUNTA - Esiste gia` una campagna nel sistema con questo ID\n";} + else + { + if ( (strlen($campaign_id) < 2) or (strlen($campaign_id) > 8) or (strlen($campaign_name) < 2) or (strlen($source_campaign_id) < 2) or (strlen($source_campaign_id) > 8) ) + { + echo "
CAMPAGNA NON AGGIUNTA - Per favore torna indietro e ricontrolla i dati inseriti\n"; + echo "
L`ID Campagna deve essere lungo tra i 2 e gli 8 caratteri\n"; + echo "
source L`ID Campagna deve essere lungo tra i 2 e gli 8 caratteri\n"; + } + else + { + echo "
CAMPAIGN COPIED: $campaign_id copied from $source_campaign_id\n"; + + $stmt="INSERT INTO vicidial_campaigns (campaign_name,campaign_id,active,dial_status_a,dial_status_b,dial_status_c,dial_status_d,dial_status_e,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,dial_timeout,dial_prefix,campaign_cid,campaign_vdad_exten,campaign_rec_exten,campaign_recording,campaign_rec_filename,campaign_script,get_call_launch,am_message_exten,amd_send_to_vmx,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,alt_number_dialing,scheduled_callbacks,lead_filter_id,drop_call_seconds,safe_harbor_message,safe_harbor_exten,display_dialable_count,wrapup_seconds,wrapup_message,closer_campaigns,use_internal_dnc,allcalls_delay,omit_phone_code,dial_method,available_only_ratio_tally,adaptive_dropped_percentage,adaptive_maximum_level,adaptive_latest_server_time,adaptive_intensity,adaptive_dl_diff_target,concurrent_transfers,auto_alt_dial,auto_alt_dial_statuses,agent_pause_codes_active,campaign_description,campaign_changedate,campaign_stats_refresh,campaign_logindate,dial_statuses,disable_alter_custdata,no_hopper_leads_logins,list_order_mix,campaign_allow_inbound,manual_dial_list_id,default_xfer_group) SELECT \"$campaign_name\",\"$campaign_id\",\"N\",dial_status_a,dial_status_b,dial_status_c,dial_status_d,dial_status_e,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,dial_timeout,dial_prefix,campaign_cid,campaign_vdad_exten,campaign_rec_exten,campaign_recording,campaign_rec_filename,campaign_script,get_call_launch,am_message_exten,amd_send_to_vmx,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,alt_number_dialing,scheduled_callbacks,lead_filter_id,drop_call_seconds,safe_harbor_message,safe_harbor_exten,display_dialable_count,wrapup_seconds,wrapup_message,closer_campaigns,use_internal_dnc,allcalls_delay,omit_phone_code,dial_method,available_only_ratio_tally,adaptive_dropped_percentage,adaptive_maximum_level,adaptive_latest_server_time,adaptive_intensity,adaptive_dl_diff_target,concurrent_transfers,auto_alt_dial,auto_alt_dial_statuses,agent_pause_codes_active,campaign_description,campaign_changedate,campaign_stats_refresh,campaign_logindate,dial_statuses,disable_alter_custdata,no_hopper_leads_logins,\"DISABLED\",campaign_allow_inbound,manual_dial_list_id,default_xfer_group from vicidial_campaigns where campaign_id='$source_campaign_id';"; + $rslt=mysql_query($stmt, $link); + + $stmtA="INSERT INTO vicidial_campaign_stats (campaign_id) values('$campaign_id');"; + $rslt=mysql_query($stmtA, $link); + + $stmtA="INSERT INTO vicidial_campaign_statuses (status,status_name,selectable,campaign_id,human_answered,category) SELECT status,status_name,selectable,\"$campaign_id\",human_answered,category from vicidial_campaign_statuses where campaign_id='$source_campaign_id';"; + $rslt=mysql_query($stmtA, $link); + + $stmtA="INSERT INTO vicidial_campaign_hotkeys (status,hotkey,status_name,selectable,campaign_id) SELECT status,hotkey,status_name,selectable,\"$campaign_id\" from vicidial_campaign_hotkeys where campaign_id='$source_campaign_id';"; + $rslt=mysql_query($stmtA, $link); + + $stmtA="INSERT INTO vicidial_lead_recycle (status,attempt_delay,attempt_maximum,active,campaign_id) SELECT status,attempt_delay,attempt_maximum,active,\"$campaign_id\" from vicidial_lead_recycle where campaign_id='$source_campaign_id';"; + $rslt=mysql_query($stmtA, $link); + + $stmtA="INSERT INTO vicidial_pause_codes (pause_code,pause_code_name,billable,campaign_id) SELECT pause_code,pause_code_name,billable,\"$campaign_id\" from vicidial_pause_codes where campaign_id='$source_campaign_id';"; + $rslt=mysql_query($stmtA, $link); + + echo ""; + ### LOG CHANGES TO LOG FILE ### + if ($WeBRooTWritablE > 0) + { + $fp = fopen ("./admin_changes_log.txt", "a"); + fwrite ($fp, "$date|COPY TO NEW CAMPAIGN|$PHP_AUTH_USER|$ip|$campaign_id|$source_campaign_id|$stmt|$stmtA|\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 "
ESITO CAMPAGNA NON AGGIUNTO - Esiste gia` un esito campagna con questo nome\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 "
ESITO CAMPAGNA NON AGGIUNTO - esiste gia` un esito globale con questo nome\n";} + else + { + if ( (strlen($campaign_id) < 2) or (strlen($status) < 1) or (strlen($status_name) < 2) ) + { + echo "
ESITO CAMPAGNA NON AGGIUNTO - Per favore torna indietro e ricontrolla i dati inseriti\n"; + echo "
l`esito deve essere lungo tra 1 e 8 caratteri\n"; + echo "
il nome dell`esito deve essere lungo tra i 2 e i 30 caratteri\n"; + } + else + { + echo "
STATO PERSONALIZZATO PER CAMPAGNA AGGIUNTO: $campaign_id - $status\n"; + + $stmt="INSERT INTO vicidial_campaign_statuses (status,status_name,selectable,campaign_id,human_answered,category) values('$status','$status_name','$selectable','$campaign_id','$human_answered','$category');"; + $rslt=mysql_query($stmt, $link); + + ### LOG CHANGES TO LOG FILE ### + if ($WeBRooTWritablE > 0) + { + $fp = fopen ("./admin_changes_log.txt", "a"); + fwrite ($fp, "$date|NUOVA CAMPAGNA STATUS |$PHP_AUTH_USER|$ip|$stmt|\n"); + fclose($fp); + } + } + } + } +$SUB=22; +$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 - Per favore torna indietro e ricontrolla i dati inseriti\n"; + echo "
hotkey must be a single character between 1 and 9 \n"; + echo "
l`esito deve essere lungo tra 1 e 8 caratteri\n"; + } + else + { + echo "
HOTKEY AGGIUNTA: $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|NUOVA CAMPAGNA HOT KEY |$PHP_AUTH_USER|$ip|'$status','$hotkey','$status_name','$selectable','$campaign_id'|\n"); + fclose($fp); + } + } + } +$SUB=23; +$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 - Per favore torna indietro e ricontrolla i dati inseriti\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); + } + } + } +$SUB=25; +$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 - Per favore torna indietro e ricontrolla i dati inseriti\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); + } + } + } +$SUB=26; +$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 "
Co`DIGO DE LA PAUSA DEL AGENTE NO AGREGADO - hay ya una entrada para esta campaña con este code de la pausa\n";} + else + { + if ( (strlen($campaign_id) < 2) or (strlen($pause_code) < 1) or (strlen($pause_code) > 6) or (strlen($pause_code_name) < 2) ) + { + echo "
Co`DIGO DE LA PAUSA DEL AGENTE NO AGREGADO - Per favore torna indietro e ricontrolla i dati inseriti\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 Co`DIGO DE LA PAUSA DEL AGENTE AGREGo`: $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); + } + } + } +$SUB=27; +$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 "
ESITO CHIAMATA PER CAMPAGNA NON AGGIUNTO - hay ya una entrada para esta campaña con este estado\n";} + else + { + if ( (strlen($campaign_id) < 2) or (strlen($status) < 1) ) + { + echo "
ESITO CHIAMATA PER CAMPAGNA NON AGGIUNTO - Per favore torna indietro e ricontrolla i dati inseriti\n"; + echo "
el estado debe estar entre 1 y 6 caracteres en longitud\n"; + } + else + { + echo "
ESITO CHIAMATA PER CAMPAGNA AGGIUNTO: $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|AGGIUNGI CAMPAGNA DIAL STATUS |$PHP_AUTH_USER|$ip|$stmt|\n"); + fclose($fp); + } + } + } +#$SUB=28; +$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 NON AGGIUNTA - Esiste gia` una lista nel sistema con questo ID\n";} + else + { + if ( (strlen($campaign_id) < 2) or (strlen($list_name) < 2) or ($list_id < 100) or (strlen($list_id) > 8) ) + { + echo "
LISTA NON AGGIUNTA - Per favore torna indietro e ricontrolla i dati inseriti\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 Lista must be greater than 100\n"; + } + else + { + echo "
LISTA AGGIUNTA: $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|AGGIUNGI NUOVA LISTA |$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 "
GRUPPO NON AGGIUNTO - l`ID specificato e` associato ad un gruppo gia` presente in sistema\n";} + else + { + $stmt="SELECT count(*) from vicidial_campaigns where campaign_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 campaign 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 "
GRUPPO NON AGGIUNTO - per favore torna indietro e ricontrolla i dati inseriti\n"; + echo "
L`ID deve essere lungo tra i 2 e i 20 caratteri e non deve contenere ' -+'.\n"; + echo "
Il nome ed il colore del gruppo devono essere lunghi almeno 2 caratteri\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 "
GRUPPO AGGIUNTO: $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=3111; +} + + +###################### +# ADD=2011 adds copied inbound group to the system +###################### + +if ($ADD==2011) +{ + 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 "
GRUPPO NON AGGIUNTO - l`ID specificato e` associato ad un gruppo gia` presente in sistema\n";} + else + { + if ( (strlen($group_id) < 2) or (strlen($group_name) < 2) or (strlen($group_id) > 20) or (eregi(' ',$group_id)) or (eregi("\-",$group_id)) or (eregi("\+",$group_id)) ) + { + echo "
GRUPPO NON AGGIUNTO - per favore torna indietro e ricontrolla i dati inseriti\n"; + echo "
L`ID deve essere lungo tra i 2 e i 20 caratteri e non deve contenere ' -+'.\n"; + echo "
Il nome ed il colore del gruppo devono essere lunghi almeno 2 caratteri\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,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,drop_call_seconds,drop_message,drop_exten,call_time_id,after_hours_action,after_hours_message_filename,after_hours_exten,after_hours_voicemail,welcome_message_filename,moh_context,onhold_prompt_filename,prompt_interval,agent_alert_exten,agent_alert_delay,default_xfer_group) SELECT \"$group_id\",\"$group_name\",group_color,\"N\",web_form_address,voicemail_ext,next_agent_call,fronter_display,ingroup_script,get_call_launch,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,drop_call_seconds,drop_message,drop_exten,call_time_id,after_hours_action,after_hours_message_filename,after_hours_exten,after_hours_voicemail,welcome_message_filename,moh_context,onhold_prompt_filename,prompt_interval,agent_alert_exten,agent_alert_delay,default_xfer_group from vicidial_inbound_groups where group_id=\"$source_group_id\";"; + $rslt=mysql_query($stmt, $link); + + echo "
GRUPPO AGGIUNTO: $group_id\n"; + + ### LOG CHANGES TO LOG FILE ### + if ($WeBRooTWritablE > 0) + { + $fp = fopen ("./admin_changes_log.txt", "a"); + fwrite ($fp, "$date|COPIED TO NEW GROUP |$PHP_AUTH_USER|$ip|$stmt|\n"); + fclose($fp); + } + } + } +$ADD=3111; +} + + +###################### +# 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 - Per favore torna indietro e ricontrolla i dati inseriti\n"; + echo "
El comienzo de la ID del usuario y la extension 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 "
OPERATORE REMOTO AGGIUNTO: $user_start\n"; + + ### LOG CHANGES TO LOG FILE ### + if ($WeBRooTWritablE > 0) + { + $fp = fopen ("./admin_changes_log.txt", "a"); + fwrite ($fp, "$date|ADD A NEW OPERATORI REMOTI 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 - Per favore torna indietro e ricontrolla i dati inseriti\n"; + echo "
El nombre y la descripcio`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 "
GRUPPO UTENTI AGGIUNTO: $user_group\n"; + + ### LOG CHANGES TO LOG FILE ### + if ($WeBRooTWritablE > 0) + { + $fp = fopen ("./admin_changes_log.txt", "a"); + fwrite ($fp, "$date|NUOVO UTENTE 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 NON AGGIUNTO - 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 "
SCRIPT NON AGGIUNTO - Per favore torna indietro e ricontrolla i dati inseriti\n"; + echo "
El nombre, la descripcio`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 "
SCRIPT AGGIUNTO: $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 NON AGGIUNTO - Esiste gia` un altro filtro con questo ID\n";} + else + { + if ( (strlen($lead_filter_id) < 2) or (strlen($lead_filter_name) < 2) or (strlen($lead_filter_sql) < 2) ) + { + echo "
FILTRO NON AGGIUNTO - Per favore torna indietro e ricontrolla i dati inseriti\n"; + echo "
ID Filtro, nome e SQL devono essere lunghi almeno 2 caratteri\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 "
FILTRO AGGIUNTO: $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 "
DEFINICIo`N DEL TIEMPO DE LA LLAMADA NO AGREGADA - hay ya una entrada de tiempo de la llamada con esta identificacio`n\n";} + else + { + if ( (strlen($call_time_id) < 2) or (strlen($call_time_name) < 2) ) + { + echo "
DEFINICIo`N DEL TIEMPO DE LA LLAMADA NO AGREGADA - Per favore torna indietro e ricontrolla i dati inseriti\n"; + echo "
La identificacio`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 "
ORARIO CHIAMATE AGGIUNTO: $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 "
DEFINICIo`N DEL TIEMPO DE LA LLAMADA DEL ESTADO NO AGREGADA - hay ya una entrada de tiempo de la llamada con esta identificacio`n\n";} + else + { + if ( (strlen($call_time_id) < 2) or (strlen($call_time_name) < 2) or (strlen($state_call_time_state) < 2) ) + { + echo "
DEFINICIo`N DEL TIEMPO DE LA LLAMADA DEL ESTADO NO AGREGADA - Per favore torna indietro e ricontrolla i dati inseriti\n"; + echo "
Indique que identificacio`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 "
ORARIO CHIAMATE PER STATO AGGIUNTO: $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 "
telefonO NO AGREGADO - hay ya un telefono en el sistema con esta extension/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 "
telefonO NO AGREGADO - Per favore torna indietro e ricontrolla i dati inseriti\n";} + else + { + echo "
TELEFONO AGGIUNTO\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 NON AGGIUNTO - Esiste gia` un altro server nel sistema con questo ID\n";} + else + { + if ( (strlen($server_id) < 1) or (strlen($server_ip) < 7) ) + {echo "
SERVER NON AGGIUNTO - Per favore torna indietro e ricontrolla i dati inseriti\n";} + else + { + echo "
SERVER AGGIUNTO\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 - Per favore torna indietro e ricontrolla i dati inseriti\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 AGREGo`: $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 "
CONFERENZA NON AGGIUNTA - Esiste gia` una conferenza nel sistema con questo ID e server\n";} + else + { + if ( (strlen($conf_exten) < 1) or (strlen($server_ip) < 7) ) + {echo "
CONFERENZA NON AGGIUNTA - Per favore torna indietro e ricontrolla i dati inseriti\n";} + else + { + echo "
CONFERENZA AGGIUNTA\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 CONFERENZA NON AGGIUNTA - Per favore torna indietro e ricontrolla i dati inseriti\n";} + else + { + echo "
VICIDIAL CONFERENZA AGGIUNTA\n"; + + $stmt="INSERT INTO vicidial_conferences (conf_exten,server_ip) values('$conf_exten','$server_ip');"; + $rslt=mysql_query($stmt, $link); + } + } +$ADD=31111111111111; +} + + +###################### +# ADD=221111111111111 adds the new system status to the system +###################### + +if ($ADD==221111111111111) +{ + + echo ""; + $stmt="SELECT count(*) from vicidial_campaign_statuses where status='$status';"; + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + if ($row[0] > 0) + {echo "
ESITO DI DEFAULT NON AGGIUNTO - there is already a campaign-status in the system with this name: $row[0]\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 "
ESITO DI DEFAULT NON AGGIUNTO - there is already a global-status in the system with this name\n";} + else + { + if ( (strlen($status) < 1) or (strlen($status_name) < 2) ) + { + echo "
ESITO DI DEFAULT NON AGGIUNTO - Per favore torna indietro e ricontrolla i dati inseriti\n"; + echo "
l`esito deve essere lungo tra 1 e 8 caratteri\n"; + echo "
il nome dell`esito deve essere lungo tra i 2 e i 30 caratteri\n"; + } + else + { + echo "
ESITO DI DEFAULT AGGIUNTO: $status_name - $status\n"; + + $stmt="INSERT INTO vicidial_statuses (status,status_name,selectable,human_answered,category) values('$status','$status_name','$selectable','$human_answered','$category');"; + $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 SYSTEM STATUS |$PHP_AUTH_USER|$ip|$stmt|\n"); + fclose($fp); + } + } + } + } +$ADD=321111111111111; +} + + +###################### +# ADD=231111111111111 adds the new status category to the system +###################### + +if ($ADD==231111111111111) +{ + + echo ""; + $stmt="SELECT count(*) from vicidial_status_categories where vsc_id='$vsc_id';"; + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + if ($row[0] > 0) + {echo "
CATEGORIA DI ESITI NON AGGIUNTA - Esiste gia` una categoria di esiti con questo ID: $row[0]\n";} + else + { + if ( (strlen($vsc_id) < 2) or (strlen($vsc_id) > 20) or (strlen($vsc_name) < 2) ) + { + echo "
CATEGORIA DI ESITI NON AGGIUNTA - Per favore torna indietro e ricontrolla i dati inseriti\n"; + echo "
L` ID deve essere lungo tra i 2 e i 50 caratteri\n"; + echo "
il nome deve essere lungo tra i 2 e i 50 caratteri\n"; + } + else + { + echo "
STATUS CATEGORY ADDED: $vsc_id - $vsc_name\n"; + + $stmt="SELECT count(*) from vicidial_status_categories where tovdad_display='Y' and vsc_id NOT IN('$vsc_id');"; + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + if ( ($row[0] > 3) and (ereg('Y',$tovdad_display)) ) + { + $tovdad_display = 'N'; + echo "
ERRORE: Ci sono gia` 4 Categorie di Stato attivi nel display TimeOnVDAD\n"; + } + + $stmt="INSERT INTO vicidial_status_categories (vsc_id,vsc_name,vsc_description,tovdad_display) values('$vsc_id','$vsc_name','$vsc_description','$tovdad_display');"; + $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 STATUS CATEGORY |$PHP_AUTH_USER|$ip|$stmt|\n"); + fclose($fp); + } + } + } +$ADD=331111111111111; +} + + + +###################################################################################################### +###################################################################################################### +####### 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 - Per favore torna indietro e ricontrolla i dati inseriti\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 "
UTENTE MODIFICATO - 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 "Non hai l`autorizzazione per accedere a questa pagina\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 - Per favore torna indietro e ricontrolla i dati inseriti\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 "
UTENTE MODIFICATO - 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 "Non hai l`autorizzazione per accedere a questa pagina\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 - Per favore torna indietro e ricontrolla i dati inseriti\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 "
UTENTE MODIFICATO: $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|$stmt|\n"); + fclose($fp); + } + } + } + else + { + echo "Non hai l`autorizzazione per accedere a questa pagina\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 - Per favore torna indietro e ricontrolla i dati inseriti\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 "
CAMPAGNA MODIFICATA: $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',"; + } + } + } + } + if ( (!ereg("DISABLED",$list_order_mix)) and ($hopper_level < 100) ) + {$hopper_level='100';} + + $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',list_order_mix='$list_order_mix',campaign_allow_inbound='$campaign_allow_inbound',manual_dial_list_id='$manual_dial_list_id',default_xfer_group='$default_xfer_group',xfer_groups='$XFERgroups_value' 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 "Non hai l`autorizzazione per accedere a questa pagina\n"; + exit; + } +$ADD=31; # go to campaign modification form below +} + +###################### +# ADD=42 modify/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 - Per favore torna indietro e ricontrolla i dati inseriti\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 + { + if (ereg('delete',$stage)) + { + 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); + + $stmtA="DELETE FROM vicidial_campaign_hotkeys where campaign_id='$campaign_id' and status='$status';"; + $rslt=mysql_query($stmtA, $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|$stmt|$stmtA|\n"); + fclose($fp); + } + } + if (ereg('modify',$stage)) + { + echo "
ESITO PERSONALIZZATO PER CAMPAGNA MODIFICATO: $campaign_id - $status\n"; + + $stmt="UPDATE vicidial_campaign_statuses SET status_name='$status_name',selectable='$selectable',human_answered='$human_answered',category='$category' 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 CAMPAIGN STATUS|$PHP_AUTH_USER|$ip|$stmt|\n"); + fclose($fp); + } + } + } + } + else + { + echo "Non hai l`autorizzazione per accedere a questa pagina\n"; + exit; + } +$SUB=22; +$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 - Per favore torna indietro e ricontrolla i dati inseriti\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_hotkeys where campaign_id='$campaign_id' and status='$status' and hotkey='$hotkey'|\n"); + fclose($fp); + } + } + } + else + { + echo "Non hai l`autorizzazione per accedere a questa pagina\n"; + exit; + } +$SUB=23; +$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 - Per favore torna indietro e ricontrolla i dati inseriti\n"; + echo "
el nombre de la campaña necesita ser por lo menos 6 caracteres en longitud\n"; + } + else + { + echo "
CAMPAGNA MODIFICATA: $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',"; + } + } + } + if ( (!ereg("DISABLED",$list_order_mix)) and ($hopper_level < 100) ) + {$hopper_level='100';} + + $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_changedate='$SQLdate',list_order_mix='$list_order_mix' 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 "Non hai l`autorizzazione per accedere a questa pagina\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 - Per favore torna indietro e ricontrolla i dati inseriti\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 "Non hai l`autorizzazione per accedere a questa pagina\n"; + exit; + } +$SUB=25; +$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 "
Co`DIGO DE LA PAUSA DEL AGENTE NO MODIFICADO - Per favore torna indietro e ricontrolla i dati inseriti\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 "Non hai l`autorizzazione per accedere a questa pagina\n"; + exit; + } +$SUB=27; +$ADD=31; # go to campaign modification form below +} + + +###################### +# ADD=49 modify campaign list mix in the system +###################### + +if ($ADD==49) +{ + if ($LOGmodify_campaigns==1) + { + ##### MODIFY a list mix container entry ##### + if ($stage=='MODIFY') + { + echo ""; + + $Flist_mix_container = "list_mix_container_$vcl_id"; + $Fmix_method = "mix_method_$vcl_id"; + $Fstatus = "status_$vcl_id"; + $Fvcl_name = "vcl_name_$vcl_id"; + + if (isset($_GET[$Flist_mix_container])) {$list_mix_container=$_GET[$Flist_mix_container];} + elseif (isset($_POST[$Flist_mix_container])) {$list_mix_container=$_POST[$Flist_mix_container];} + if (isset($_GET[$Fmix_method])) {$mix_method=$_GET[$Fmix_method];} + elseif (isset($_POST[$Fmix_method])) {$mix_method=$_POST[$Fmix_method];} + if (isset($_GET[$Fstatus])) {$status=$_GET[$Fstatus];} + elseif (isset($_POST[$Fstatus])) {$status=$_POST[$Fstatus];} + if (isset($_GET[$Fvcl_name])) {$vcl_name=$_GET[$Fvcl_name];} + elseif (isset($_POST[$Fvcl_name])) {$vcl_name=$_POST[$Fvcl_name];} + $list_mix_container = preg_replace("/:$/","",$list_mix_container); + + if ( (strlen($campaign_id) < 2) or (strlen($vcl_id) < 1) or (strlen($list_mix_container) < 6) or (strlen($vcl_name) < 2) ) + { + echo "
MIX LISTA NON MODIFICATO - Per favore torna indietro e ricontrolla i dati inseriti\n"; + echo "
vcl_id must be between 1 and 20 characters in length\n"; + echo "
vcl_name name must be between 2 and 30 characters in length\n"; + } + else + { + $stmt="UPDATE vicidial_campaigns_list_mix SET vcl_name='$vcl_name',mix_method='$mix_method',list_mix_container='$list_mix_container' where campaign_id='$campaign_id' and vcl_id='$vcl_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 MIX |$PHP_AUTH_USER|$ip|$stmt|\n"); + fclose($fp); + } + + echo "
MIX LISTA MODIFICATO: $campaign_id - $vcl_id - $vcl_name\n"; + } + } + + ##### ADD a list mix container entry ##### + if ($stage=='ADD') + { + echo ""; + + if ( (strlen($campaign_id) < 2) or (strlen($vcl_id) < 1) or (strlen($list_id) < 1) ) + { + echo "
MIX LISTA NON MODIFICATO - Per favore torna indietro e ricontrolla i dati inseriti\n"; + echo "
vcl_id must be between 1 and 20 characters in length\n"; + echo "
list_id must be at least 2 characters in length\n"; + } + else + { + $stmt="SELECT list_mix_container from vicidial_campaigns_list_mix where campaign_id='$campaign_id' and vcl_id='$vcl_id';"; + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + $OLDlist_mix_container = $row[0]; + $NEWlist_mix_container = "$OLDlist_mix_container:$list_id|10|0| -|"; + + $stmt="UPDATE vicidial_campaigns_list_mix SET list_mix_container='$NEWlist_mix_container' where campaign_id='$campaign_id' and vcl_id='$vcl_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 MIX |$PHP_AUTH_USER|$ip|$stmt|\n"); + fclose($fp); + } + + echo "
MIX LISTA MODIFICATO: $campaign_id - $vcl_id - $list_id\n"; + } + } + + ##### REMOVE a list mix container entry ##### + if ($stage=='REMOVE') + { + echo ""; + + if ( (strlen($campaign_id) < 2) or (strlen($vcl_id) < 1) or (strlen($list_id) < 1) ) + { + echo "
MIX LISTA NON MODIFICATO - Per favore torna indietro e ricontrolla i dati inseriti\n"; + echo "
vcl_id must be between 1 and 20 characters in length\n"; + echo "
list_id must be at least 2 characters in length\n"; + } + else + { + $stmt="SELECT list_mix_container from vicidial_campaigns_list_mix where campaign_id='$campaign_id' and vcl_id='$vcl_id';"; + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + $MIXentries = $MT; + $MIXentries = explode(":", $row[0]); + $Ms_to_print = (count($MIXentries) - 0); + + if ($Ms_to_print < 2) + { + echo "
MIX LISTA NON MODIFICATO: Non puoi cancellare l`ultimo list_id da un mix di liste\n"; + } + else + { + $MIXdetailsPCT = explode('|', $MIXentries[$mix_container_item]); + $MIXpercentPCT = $MIXdetailsPCT[2]; + + $q=0; + while ($Ms_to_print > $q) + { + if ( ($mix_container_item > $q) or ($mix_container_item < $q) ) + { + if ( ($q==0) and ($mix_container_item > 0) ) + { + $MIXdetailsONE = explode('|', $MIXentries[$q]); + $MIXpercentONE = ($MIXdetailsONE[2] + $MIXpercentPCT); + $NEWlist_mix_container .= "$MIXdetailsONE[0]|$MIXdetailsONE[1]|$MIXpercentONE|$MIXdetailsONE[3]|:"; + } + else + { + if ( ($q==1) and ($mix_container_item < 1) ) + { + $MIXdetailsONE = explode('|', $MIXentries[$q]); + $MIXpercentONE = ($MIXdetailsONE[2] + $MIXpercentPCT); + $NEWlist_mix_container .= "$MIXdetailsONE[0]|$MIXdetailsONE[1]|$MIXpercentONE|$MIXdetailsONE[3]|:"; + } + else + { + $NEWlist_mix_container .= "$MIXentries[$q]:"; + } + } + } + $q++; + } + $NEWlist_mix_container = preg_replace("/.$/",'',$NEWlist_mix_container); + + $stmt="UPDATE vicidial_campaigns_list_mix SET list_mix_container='$NEWlist_mix_container' where campaign_id='$campaign_id' and vcl_id='$vcl_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 MIX |$PHP_AUTH_USER|$ip|$stmt|\n"); + fclose($fp); + } + + echo "
MIX LISTA MODIFICATO: $campaign_id - $vcl_id - $list_id - $mix_container_item\n"; + } + } + } + + ##### ADD a NEW list mix ##### + if ($stage=='NEWMIX') + { + echo ""; + + if ( (strlen($campaign_id) < 2) or (strlen($vcl_id) < 1) or (strlen($vcl_name) < 2) ) + { + echo "
MIX LISTA NON AGGIUNTO- Per favore torna indietro e ricontrolla i dati inseriti\n"; + echo "
vcl_id must be between 1 and 20 characters in length\n"; + echo "
vcl_name must be at least 2 characters in length\n"; + } + else + { + $stmt="SELECT count(*) from vicidial_campaigns_list_mix where vcl_id='$vcl_id';"; + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + if ($row[0] > 0) + { + echo "
MIX LISTA NON AGGIUNTO- Esiste gia` un mix di lista con questo ID\n"; + } + else + { + $stmt="INSERT INTO vicidial_campaigns_list_mix SET list_mix_container='$list_id|1|100| $status -|',campaign_id='$campaign_id',vcl_id='$vcl_id',vcl_name='$vcl_name',mix_method='$mix_method',status='INACTIVE';"; + $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 MIX |$PHP_AUTH_USER|$ip|$stmt|\n"); + fclose($fp); + } + + echo "
MIX LISTA AGGIUNTO: $campaign_id - $vcl_id - $vcl_name\n"; + } + } + } + + ##### DELETE an existing list mix ##### + if ($stage=='DELMIX') + { + echo ""; + + if ( (strlen($campaign_id) < 2) or (strlen($vcl_id) < 1) ) + { + echo "
MIX LISTA NON CANCELLATO - Per favore torna indietro e ricontrolla i dati inseriti\n"; + echo "
vcl_id must be between 1 and 20 characters in length\n"; + } + else + { + $stmt="DELETE from vicidial_campaigns_list_mix where vcl_id='$vcl_id' and 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|MODIFY LIST MIX |$PHP_AUTH_USER|$ip|$stmt|\n"); + fclose($fp); + } + + echo "
MIX LISTA CANCELLATO: $campaign_id - $vcl_id - $vcl_name\n"; + } + } + + ##### Set list mix entry to active ##### + if ($stage=='SETACTIVE') + { + echo ""; + + if ( (strlen($campaign_id) < 2) or (strlen($vcl_id) < 1) ) + { + echo "
MIX LISTA NON ATTIVATO - Per favore torna indietro e ricontrolla i dati inseriti\n"; + echo "
vcl_id must be between 1 and 20 characters in length\n"; + } + else + { + $stmt="UPDATE vicidial_campaigns_list_mix SET status='INACTIVE' where campaign_id='$campaign_id';"; + $rslt=mysql_query($stmt, $link); + + $stmt="UPDATE vicidial_campaigns_list_mix SET status='ACTIVE' where vcl_id='$vcl_id' and 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|MODIFY LIST MIX |$PHP_AUTH_USER|$ip|$stmt|\n"); + fclose($fp); + } + + echo "
MIX LISTA ATTIVATO: $campaign_id - $vcl_id - $vcl_name\n"; + } + } + } + else + { + echo "Non hai l`autorizzazione per accedere a questa pagina\n"; + exit; + } +$SUB=29; +$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 - Per favore torna indietro e ricontrolla i dati inseriti\n"; + echo "
el nombre de la lista debe ser por lo menos 2 caracteres en longitud\n"; + } + else + { + echo "
LISTA MODIFICATA: $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 "
RESET ESITI CONTATTI DELLA LISTA CHIAMATI\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 "Non hai l`autorizzazione per accedere a questa pagina\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 - Per favore torna indietro e ricontrolla i dati inseriti\n"; + echo "
el color del nombre de grupo y del grupo debe ser por lo menos 2 caracteres en longitud\n"; + } + else + { + echo "
GRUPPO MODIFICATO: $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',call_time_id='$call_time_id',after_hours_action='$after_hours_action',after_hours_message_filename='$after_hours_message_filename',after_hours_exten='$after_hours_exten',after_hours_voicemail='$after_hours_voicemail',welcome_message_filename='$welcome_message_filename',moh_context='$moh_context',onhold_prompt_filename='$onhold_prompt_filename',prompt_interval='$prompt_interval',agent_alert_exten='$agent_alert_exten',agent_alert_delay='$agent_alert_delay',default_xfer_group='$default_xfer_group' 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 "Non hai l`autorizzazione per accedere a questa pagina\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 - Per favore torna indietro e ricontrolla i dati inseriti\n"; + echo "
El comienzo de la ID del usuario y la extension 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 OPERATORI REMOTI 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 "Non hai l`autorizzazione per accedere a questa pagina\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 - Per favore torna indietro e ricontrolla i dati inseriti\n"; + echo "
El nombre y la descripcio`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 "
GRUPPO UTENTI MODIFICATO\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 "Non hai l`autorizzazione per accedere a questa pagina\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 NON MODIFICATO - Per favore torna indietro e ricontrolla i dati inseriti\n"; + echo "
El nombre, la descripcio`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 "
SCRIPT MODIFICATO\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 "Non hai l`autorizzazione per accedere a questa pagina\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 NON MODIFICATO - Per favore torna indietro e ricontrolla i dati inseriti\n"; + echo "
ID Filtro, nome e SQL devono essere lunghi almeno 2 caratteri\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 MODIFICATO\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 "Non hai l`autorizzazione per accedere a questa pagina\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 - Per favore torna indietro e ricontrolla i dati inseriti\n"; + echo "
La identificacio`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 "Non hai l`autorizzazione per accedere a questa pagina\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 - Per favore torna indietro e ricontrolla i dati inseriti\n"; + echo "
Indique que identificacio`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 "Non hai l`autorizzazione per accedere a questa pagina\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 "
TELEFONO NON MODIFICATO - Esiste gia` un Telefono nel sistema con questo interno\/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 "
TELEFONO NON MODIFICATO - Per favore torna indietro e ricontrolla i dati inseriti\n";} + else + { + echo "
TELEFONO MODIFICATO: $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 "Non hai l`autorizzazione per accedere a questa pagina\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 "
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 - Per favore torna indietro e ricontrolla i dati inseriti\n";} + else + { + echo "
SERVER MODIFICATO: $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 "Non hai l`autorizzazione per accedere a questa pagina\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 - Per favore torna indietro e ricontrolla i dati inseriti\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 "Non hai l`autorizzazione per accedere a questa pagina\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 extension - servidor NO MODIFICADO\n";} + else + { + if ( (strlen($conf_exten) < 1) or (strlen($server_ip) < 7) ) + {echo "
CONFERENCIA NO MODIFICADA - Per favore torna indietro e ricontrolla i dati inseriti\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 "Non hai l`autorizzazione per accedere a questa pagina\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 extension - servidor NO MODIFICADO\n";} + else + { + if ( (strlen($conf_exten) < 1) or (strlen($server_ip) < 7) ) + {echo "
VICIDIAL CONFERENCIA NO MODIFICADA - Per favore torna indietro e ricontrolla i dati inseriti\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 "Non hai l`autorizzazione per accedere a questa pagina\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 "
IMPOSTAZIONI DI SISTEMA MODIFICATE\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',enable_agc_xfer_log='$enable_agc_xfer_log';"; + $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 "Non hai l`autorizzazione per accedere a questa pagina\n"; + exit; + } +$ADD=311111111111111; # go to vicidial system settings form below +} + + +###################### +# ADD=421111111111111 modify/delete system status in the system +###################### + +if ($ADD==421111111111111) +{ + if ($LOGmodify_servers==1) + { + echo ""; + + if (ereg('delete',$stage)) + { + if ( (strlen($status) < 1) or (preg_match("/^B$|^NA$|^DNC$|^NA$|^DROP$|^INCALL$|^QUEUE$|^NEW$/i",$status)) ) + { + echo "
ESITO DI DEFAULT NON ELIMINATO - Per favore torna indietro e ricontrolla i dati inseriti\n"; + echo "
el estado de sistema no puede ser un estado reservado:B,NA,DNC,NA,DROP,INCALL,QUEUE,NEW\n"; + echo "
el estado de sistema necesita ser por lo menos los caracteres 1 enlongitud\n"; + } + else + { + echo "
SYSTEM STATUS DELETED: $status\n"; + + $stmt="DELETE FROM vicidial_statuses where status='$status';"; + $rslt=mysql_query($stmt, $link); + + $stmtA="DELETE FROM vicidial_campaign_hotkeys where status='$status';"; + $rslt=mysql_query($stmtA, $link); + + ### LOG CHANGES TO LOG FILE ### + if ($WeBRooTWritablE > 0) + { + $fp = fopen ("./admin_changes_log.txt", "a"); + fwrite ($fp, "$date|DELETE SYSTEM STATUS |$PHP_AUTH_USER|$ip|$stmt|$stmtA|\n"); + fclose($fp); + } + } + } + if (ereg('modify',$stage)) + { + if ( (strlen($status) < 1) or (strlen($status_name) < 2) ) + { + echo "
ESITO DI DEFAULT NON MODIFICATO - Per favore torna indietro e ricontrolla i dati inseriti\n"; + echo "
el estado de sistema necesita ser por lo menos los caracteres 1 enlongitud\n"; + echo "
il nome di un esito di default deve essere lungo almeno 1 carattere\n"; + } + else + { + echo "
ESITO DI DEFAULT MODIFICATO: $status\n"; + + $stmt="UPDATE vicidial_statuses SET status_name='$status_name',selectable='$selectable',human_answered='$human_answered',category='$category' where 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 SYSTEM STATUS |$PHP_AUTH_USER|$ip|$stmt|\n"); + fclose($fp); + } + } + } + } + else + { + echo "Non hai l`autorizzazione per accedere a questa pagina\n"; + exit; + } +$ADD=321111111111111; # go to system settings modification form below +} + + +###################### +# ADD=431111111111111 modify/delete status category in the system +###################### + +if ($ADD==431111111111111) +{ + if ($LOGmodify_servers==1) + { + echo ""; + + if ( (strlen($vsc_id) < 2) or (preg_match("/^UNDEFINED$/i",$vsc_id)) ) + { + echo "
CATEGORIA ESITI NON MODIFICATA - Per favore torna indietro e ricontrolla i dati inseriti\n"; + echo "
la categoria di esiti non puo` essere una categoria riservata: UNDEFINED\n"; + echo "
il nome delle categorie di esiti deve essere lungo almeno 2 caratteri\n"; + } + else + { + if (ereg('delete',$stage)) + { + echo "
CATEGORIA ESISI CANCELLATA: $vsc_id\n"; + + $stmt="DELETE FROM vicidial_status_categories where vsc_id='$vsc_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 STATUS CATEGORY|$PHP_AUTH_USER|$ip|$stmt|\n"); + fclose($fp); + } + } + if (ereg('modify',$stage)) + { + echo "
CATEGORIA ESITI MODIFICATA: $vsc_id\n"; + + $stmt="SELECT count(*) from vicidial_status_categories where tovdad_display='Y' and vsc_id NOT IN('$vsc_id');"; + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + if ( ($row[0] > 3) and (ereg('Y',$tovdad_display)) ) + { + $tovdad_display = 'N'; + echo "
ERRORE: Ci sono gia` 4 Categorie di Stato attivi nel display TimeOnVDAD\n"; + } + + $stmt="UPDATE vicidial_status_categories SET vsc_name='$vsc_name',vsc_description='$vsc_description',tovdad_display='$tovdad_display' where vsc_id='$vsc_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 STATUS CATEGORY|$PHP_AUTH_USER|$ip|$stmt|\n"); + fclose($fp); + } + } + } + } + else + { + echo "Non hai l`autorizzazione per accedere a questa pagina\n"; + exit; + } +$ADD=331111111111111; # go to system settings 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 "
UTENTE NON CANCELLATO - Per favore torna indietro e ricontrolla i dati inseriti\n"; + echo "
User be at least 2 characters in length\n"; + } + else + { + echo "
CONFIRMACIo`N DE LA CANCELADURA DEL USUARIO: $user\n"; + echo "

Clicca qui per cancellare questo utente $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 "
CAMPAGNA NON CANCELLATA - Per favore torna indietro e ricontrolla i dati inseriti\n"; + echo "
Campagna_id be at least 2 characters in length\n"; + } + else + { + echo "
CONFIRMACIo`N DE LA CANCELADURA DE LA CAMPAÑA: $campaign_id\n"; + echo "

Clicca qui per cancellare la campagna $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 "
OPERATORI NON DISCONNESSI DALLA CAMPAGNA - Per favore torna indietro e ricontrolla i dati inseriti\n"; + echo "
Campagna_id be at least 2 characters in length\n"; + } + else + { + echo "
CONFERMA DISCONNESSIONE OPERATORE: $campaign_id\n"; + echo "

Clicca qui per disconnettere tutti gli operatori $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 DESPEJo` PARA LA CAMPAÑA - Per favore torna indietro e ricontrolla i dati inseriti\n"; + echo "
Campagna_id be at least 2 characters in length\n"; + } + else + { + echo "
CONFIRMACIo`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 NON CANCELLATA - Per favore torna indietro e ricontrolla i dati inseriti\n"; + echo "
List_id be at least 2 characters in length\n"; + } + else + { + echo "
CONFIRMACIo`N DE LA CANCELADURA DE LA LISTA: $list_id\n"; + echo "

Clicca qui per cancellare la lista e tutti i suoi contatti $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 "
GRUPPO INBOUND NON CANCELLATO - Per favore torna indietro e ricontrolla i dati inseriti\n"; + echo "
Group_id be at least 2 characters in length\n"; + } + else + { + echo "
CONFERMA ELIMINAZIONE GRUPPO INBOUND: $group_id\n"; + echo "

Clicca qui per cancellare il gruppo inbound $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 - Per favore torna indietro e ricontrolla i dati inseriti\n"; + echo "
Remote_agent_id be at least 2 characters in length\n"; + } + else + { + echo "
CONFIRMACIo`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 - Per favore torna indietro e ricontrolla i dati inseriti\n"; + echo "
User_group be at least 2 characters in length\n"; + } + else + { + echo "
CONFIRMACIo`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 "
SCRIPT NON CANCELLATO - Per favore torna indietro e ricontrolla i dati inseriti\n"; + echo "
Script_id must be at least 2 characters in length\n"; + } + else + { + echo "
CONFIRMACIo`N DE LA CANCELADURA DE LA ESCRITURA: $script_id\n"; + echo "

Clicca qui per cancellare lo 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 "
FILTRO NON CANCELLATO - Per favore torna indietro e ricontrolla i dati inseriti\n"; + echo "
ID Filtro deve essere lungo almeno 2 caratteri\n"; + } + else + { + echo "
FILTER DELETION CONFIRMATION: $lead_filter_id\n"; + echo "

Clicca qui per cancellare il 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 - Per favore torna indietro e ricontrolla i dati inseriti\n"; + echo "
_ llamar tiempo identificacio`n deber ser por lo menos 2 carácter enlongitud\n"; + } + else + { + echo "
CONFIRMACIo`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 - Per favore torna indietro e ricontrolla i dati inseriti\n"; + echo "
_ llamar tiempo identificacio`n deber ser por lo menos 2 carácter enlongitud\n"; + } + else + { + echo "
CONFIRMACIo`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 "
TELEFONO NON CANCELLATO - Per favore torna indietro e ricontrolla i dati inseriti\n"; + echo "
Extension be at least 2 characters in length\n"; + echo "
IP Server be at least 7 characters in length\n"; + } + else + { + echo "
CONFIRMACIo`N DE LA CANCELADURA DEL telefonO: $extension - $server_ip\n"; + echo "

Clicca qui per cancellare il telefono $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 - Per favore torna indietro e ricontrolla i dati inseriti\n"; + echo "
ID Server be at least 2 characters in length\n"; + echo "
IP Server be at least 7 characters in length\n"; + } + else + { + echo "
SERVER DELETION CONFIRMATION: $server_id - $server_ip\n"; + echo "

Clicca qui per cancellare il telefono $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 - Per favore torna indietro e ricontrolla i dati inseriti\n"; + echo "
Conference must be at least 2 characters in length\n"; + echo "
IP Server be at least 7 characters in length\n"; + } + else + { + echo "
CONFERENCE DELETION CONFIRMATION: $conf_exten - $server_ip\n"; + echo "

Clicca qui per cancellare il telefono $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 - Per favore torna indietro e ricontrolla i dati inseriti\n"; + echo "
Conference must be at least 2 characters in length\n"; + echo "
IP Server be at least 7 characters in length\n"; + } + else + { + echo "
VICIDIAL CONFERENCE DELETION CONFIRMATION: $conf_exten - $server_ip\n"; + echo "

Clicca qui per cancellare il telefono $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 "
UTENTE NON CANCELLATO - Per favore torna indietro e ricontrolla i dati inseriti\n"; + echo "
User be at least 2 characters in length\n"; + } + else + { + $stmtA="DELETE from vicidial_users where user='$user' limit 1;"; + $rslt=mysql_query($stmtA, $link); + + $stmt="DELETE from vicidial_campaign_agents where user='$user';"; + $rslt=mysql_query($stmt, $link); + + $stmt="DELETE from vicidial_inbound_group_agents 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|!!!DELETING USER!!!!|$PHP_AUTH_USER|$ip|$user|$stmtA|$stmt|\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 "
CAMPAGNA NON CANCELLATA - Per favore torna indietro e ricontrolla i dati inseriti\n"; + echo "
Campagna_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); + + $stmt="DELETE from vicidial_campaign_agents where campaign_id='$campaign_id';"; + $rslt=mysql_query($stmt, $link); + + $stmt="DELETE from vicidial_live_agents where campaign_id='$campaign_id';"; + $rslt=mysql_query($stmt, $link); + + $stmt="DELETE from vicidial_campaign_statuses where campaign_id='$campaign_id';"; + $rslt=mysql_query($stmt, $link); + + $stmt="DELETE from vicidial_campaign_hotkeys where campaign_id='$campaign_id';"; + $rslt=mysql_query($stmt, $link); + + $stmt="DELETE from vicidial_callbacks where campaign_id='$campaign_id';"; + $rslt=mysql_query($stmt, $link); + + $stmt="DELETE from vicidial_campaign_stats where campaign_id='$campaign_id';"; + $rslt=mysql_query($stmt, $link); + + $stmt="DELETE from vicidial_lead_recycle where campaign_id='$campaign_id';"; + $rslt=mysql_query($stmt, $link); + + $stmt="DELETE from vicidial_campaign_server_stats where campaign_id='$campaign_id';"; + $rslt=mysql_query($stmt, $link); + + $stmt="DELETE from vicidial_server_trunks where campaign_id='$campaign_id';"; + $rslt=mysql_query($stmt, $link); + + $stmt="DELETE from vicidial_pause_codes where campaign_id='$campaign_id';"; + $rslt=mysql_query($stmt, $link); + + $stmt="DELETE from vicidial_campaigns_list_mix where campaign_id='$campaign_id';"; + $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 TERMINo`: $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 "
OPERATORI NON DISCONNESSI DALLA CAMPAGNA - Per favore torna indietro e ricontrolla i dati inseriti\n"; + echo "
Campagna_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 "
DISCONNESSIONE OPERATORI COMPLETATA: $campaign_id\n"; + echo "

\n"; + } + } + else + { + echo "Non hai l`autorizzazione per accedere a questa pagina\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 DESPEJo` PARA LA CAMPAÑA - Per favore torna indietro e ricontrolla i dati inseriti\n"; + echo "
Campagna_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 "Non hai l`autorizzazione per accedere a questa pagina\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 - Per favore torna indietro e ricontrolla i dati inseriti\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 "Non hai l`autorizzazione per accedere a questa pagina\n"; + exit; + } +$SUB=25; +$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 automo`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 - Per favore torna indietro e ricontrolla i dati inseriti\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 "Non hai l`autorizzazione per accedere a questa pagina\n"; + exit; + } +$SUB=26; +$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 "
Co`DIGO DE LA PAUSA DE LA CAMPAÑA NO SUPRIMIDO - Per favore torna indietro e ricontrolla i dati inseriti\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 "Non hai l`autorizzazione per accedere a questa pagina\n"; + exit; + } +$SUB=27; +$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 "
ESITO CAMPAGNA NON RIMOSSO - questo esito di chiamata non e` selezionato per questa campagna\n";} + else + { + if ( (strlen($campaign_id) < 2) or (strlen($status) < 1) ) + { + echo "
ESITO CAMPAGNA NON RIMOSSO - Per favore torna indietro e ricontrolla i dati inseriti\n"; + echo "
el estado debe estar entre 1 y 6 caracteres en longitud\n"; + } + else + { + echo "
ESITO CAMPAGNA RIMOSSO: $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 "Non hai l`autorizzazione per accedere a questa pagina\n"; + exit; + } +#$SUB=28; +$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 NON CANCELLATA - Per favore torna indietro e ricontrolla i dati inseriti\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 TERMINo`: $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 "
GRUPPO INBOUND NON CANCELLATO - Per favore torna indietro e ricontrolla i dati inseriti\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); + + $stmt="DELETE from vicidial_inbound_group_agents where group_id='$group_id';"; + $rslt=mysql_query($stmt, $link); + + $stmt="DELETE from vicidial_live_inbound_agents 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|!DELETING IN-GROUP!!|$PHP_AUTH_USER|$ip|group_id='$group_id'|\n"); + fclose($fp); + } + echo "
ELIMINAZIONE GRUPPO INBOUND COMPLETATA: $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 - Per favore torna indietro e ricontrolla i dati inseriti\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 - Per favore torna indietro e ricontrolla i dati inseriti\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 "
SCRIPT NON CANCELLATO - Per favore torna indietro e ricontrolla i dati inseriti\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 NON CANCELLATO - Per favore torna indietro e ricontrolla i dati inseriti\n"; + echo "
ID Filtro deve essere lungo almeno 2 caratteri\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 "
CANCELLAZIONE FILTRO COMPLETATA: $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 - Per favore torna indietro e ricontrolla i dati inseriti\n"; + echo "
_ llamar tiempo identificacio`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 - Per favore torna indietro e ricontrolla i dati inseriti\n"; + echo "
_ llamar tiempo identificacio`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 "
TELEFONO NON CANCELLATO - Per favore torna indietro e ricontrolla i dati inseriti\n"; + echo "
Extension be at least 2 characters in length\n"; + echo "
IP Server 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 telefonO TERMINo`: $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 - Per favore torna indietro e ricontrolla i dati inseriti\n"; + echo "
ID Server be at least 2 characters in length\n"; + echo "
IP Server 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 "
EXPEDIENTE DEL TRONCO DEL SERVIDOR DE VICIDIAL NO SUPRIMIDO - Per favore torna indietro e ricontrolla i dati inseriti\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 SERVER TRUNK |$PHP_AUTH_USER|$ip|$stmt|\n"); + fclose($fp); + } + } + } + else + { + echo "Non hai l`autorizzazione per accedere a questa pagina\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 - Per favore torna indietro e ricontrolla i dati inseriti\n"; + echo "
Conference be at least 2 characters in length\n"; + echo "
IP Server 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 - Per favore torna indietro e ricontrolla i dati inseriti\n"; + echo "
Conference be at least 2 characters in length\n"; + echo "
IP Server 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 "
Non hai l`autorizzazione per modificare questo utente: $row[1]\n"; + } + else + { + echo "
MODIFICA UN UTENTE: $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"; + echo "\n"; + } + if ($LOGuser_level > 8) + { + echo "\n"; + +#9BB9FB +#B9CBFD + echo "\n"; + + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + + echo "\n"; + echo "\n"; + + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + + echo "\n"; + echo "\n"; + echo "\n"; + + echo "\n"; + echo "\n"; + + echo "\n"; + echo "\n"; + + echo "\n"; + echo "\n"; + + echo "\n"; + echo "\n"; + + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + } + echo "\n"; + echo "
Numero Utente: $row[1]$NWB#vicidial_users-user$NWE
Password: $NWB#vicidial_users-pass$NWE
Nome Completo: $NWB#vicidial_users-full_name$NWE
Livello Utente: $NWB#vicidial_users-user_level$NWE
Gruppo Utente: $NWB#vicidial_users-user_group$NWE
Login Telefono: $NWB#vicidial_users-phone_login$NWE
Password Telefono: $NWB#vicidial_users-phone_pass$NWE
OPZIONI INTERFACCIA OPERATORE:
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
Richiami esclusivi dell`operatore: $NWB#vicidial_users-agentonly_callbacks$NWE
Chiamata Manuale Operatore: $NWB#vicidial_users-agentcall_manual$NWE
Registrazione Vicidial: $NWB#vicidial_users-vicidial_recording$NWE
Trasferimenti Vicidial: $NWB#vicidial_users-vicidial_transfers$NWE
Un Defecto Más cercano Mezclado: $NWB#vicidial_users-closer_default_blended$NWE
Invalidacio`n De la grabacion de VICIDIAL:$NWB#vicidial_users-vicidial_recording_override$NWE
El Agente Altera La Invalidacio`n De los Datos Del Cliente: $NWB#vicidial_users-alter_custdata_override$NWE
Classifiche Campagna:$NWB#vicidial_users-campaign_ranks$NWE
\n"; + echo "\n"; + echo "$RANKcampaigns_list"; + echo "
\n"; + echo "
Gruppi Inbound: $NWB#vicidial_users-closer_campaigns$NWE
\n"; + echo "\n"; + echo "$RANKgroups_list"; + echo "
\n"; + echo "
OPZIONI INTERFACCIA AMMINISTRATORE:
Visualizza Report: $NWB#vicidial_users-view_reports$NWE
Modifica Opzioni Interfaccia Operatore: $NWB#vicidial_users-alter_agent_interface_options$NWE
Modifica Utenti: $NWB#vicidial_users-modify_sections$NWE
Cambia la campagna di un operatore: $NWB#vicidial_users-change_agent_campaign$NWE
Cancella Utenti: $NWB#vicidial_users-delete_users$NWE
Modifique A Grupos De Usuario: $NWB#vicidial_users-modify_sections$NWE
Suprima a grupos de usuario: $NWB#vicidial_users-delete_user_groups$NWE
Modifica Liste: $NWB#vicidial_users-modify_sections$NWE
Cancella Liste: $NWB#vicidial_users-delete_lists$NWE
Carica Contatti: $NWB#vicidial_users-load_leads$NWE
Modifica Contatti: $NWB#vicidial_users-modify_leads$NWE
Modifica Campagne: $NWB#vicidial_users-modify_sections$NWE
Dettagli Campagna: $NWB#vicidial_users-campaign_detail$NWE
Cancella Campagne: $NWB#vicidial_users-delete_campaigns$NWE
Modifica Gruppi Inbound: $NWB#vicidial_users-modify_sections$NWE
En-Grupos de la cancelacio`n: $NWB#vicidial_users-delete_ingroups$NWE
Modifica Operatori Remoti: $NWB#vicidial_users-modify_sections$NWE
Suprima los agentes alejados: $NWB#vicidial_users-delete_remote_agents$NWE
Modifica Script: $NWB#vicidial_users-modify_sections$NWE
Cancella Script: $NWB#vicidial_users-delete_scripts$NWE
Modifica Filtri: $NWB#vicidial_users-modify_sections$NWE
Cancella Filtros: $NWB#vicidial_users-delete_filters$NWE
Acceso de AGC Admin: $NWB#vicidial_users-ast_admin_access$NWE
La cancelacio`n de AGC telefona: $NWB#vicidial_users-ast_delete_phones$NWE
Modifique El Tiempo De la Llamadas: $NWB#vicidial_users-modify_call_times$NWE
Delete Orari Chiamata: $NWB#vicidial_users-delete_call_times$NWE
Modifica Server: $NWB#vicidial_users-modify_sections$NWE
\n"; + + if ($LOGdelete_users > 0) + { + echo "

CANCELLA QUESTO UTENTE\n"; + } + echo "

Clicca qui per la tabella degli orari dell`utente\n"; + echo "

Clicca qui per visualizzare lo stato dell`utente\n"; + echo "

Clicca qui per le statistiche dell`utente\n"; + echo "

Clicca qui per i richiami dell`utente\n"; + } + } + else + { + echo "Non hai l`autorizzazione per accedere a questa pagina\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_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); + } + + $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]; + $web_form_address = $row[11]; + $allow_closers = $row[12]; + $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]; + $list_order_mix = $row[64]; + $campaign_allow_inbound = $row[65]; + $manual_dial_list_id = $row[66]; + $default_xfer_group = $row[67]; + + if (ereg("DISABLED",$list_order_mix)) + {$DEFlistDISABLE = ''; $DEFstatusDISABLED=0;} + else + {$DEFlistDISABLE = 'disabled'; $DEFstatusDISABLED=1;} + + $stmt="SELECT count(*) from vicidial_campaigns_list_mix where campaign_id='$campaign_id' and status='ACTIVE'"; + $rslt=mysql_query($stmt, $link); + $rowx=mysql_fetch_row($rslt); + if ($rowx[0] < 1) + { + $mixes_list="\n"; + $mixname_list["DISABLED"] = "DISABLED"; + } + else + { + ##### get list_mix listings for dynamic pulldown + $stmt="SELECT vcl_id,vcl_name from vicidial_campaigns_list_mix where campaign_id='$campaign_id' and status='ACTIVE' limit 1"; + $rslt=mysql_query($stmt, $link); + $mixes_to_print = mysql_num_rows($rslt); + $mixes_list="\n"; + + $o=0; + while ($mixes_to_print > $o) + { + $rowx=mysql_fetch_row($rslt); + $mixes_list .= "\n"; + $mixname_list["ACTIVE"] = "$rowx[0] - $rowx[1]"; + $o++; + } + } + + ##### get status listings for dynamic pulldown + $stmt="SELECT * from vicidial_statuses order by status"; + $rslt=mysql_query($stmt, $link); + $statuses_to_print = mysql_num_rows($rslt); + $statuses_list=''; + $dial_statuses_list=''; + + $o=0; + while ($statuses_to_print > $o) + { + $rowx=mysql_fetch_row($rslt); + $statuses_list .= "\n"; + if ($rowx[0] != 'CBHOLD') {$dial_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"; + if ($rowx[0] != 'CBHOLD') {$dial_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); + + ##### get in-groups listings for dynamic pulldown list menu + $stmt="SELECT group_id,group_name from vicidial_inbound_groups $xfer_groupsSQL order by group_id"; + $rslt=mysql_query($stmt, $link); + $Xgroups_to_print = mysql_num_rows($rslt); + $Xgroups_menu=''; + $Xgroups_selected=0; + $o=0; + while ($Xgroups_to_print > $o) + { + $rowx=mysql_fetch_row($rslt); + $Xgroups_menu .= "\n"; + $o++; + } + if ($Xgroups_selected < 1) + {$Xgroups_menu .= "\n";} + else + {$Xgroups_menu .= "\n";} + + + if ($SUB<1) {$camp_detail_color=$subcamp_color;} + else {$camp_detail_color=$campaigns_color;} + if ($SUB==22) {$camp_statuses_color=$subcamp_color;} + else {$camp_statuses_color=$campaigns_color;} + if ($SUB==23) {$camp_hotkeys_color=$subcamp_color;} + else {$camp_hotkeys_color=$campaigns_color;} + if ($SUB==25) {$camp_recycle_color=$subcamp_color;} + else {$camp_recycle_color=$campaigns_color;} + if ($SUB==26) {$camp_autoalt_color=$subcamp_color;} + else {$camp_autoalt_color=$campaigns_color;} + if ($SUB==27) {$camp_pause_color=$subcamp_color;} + else {$camp_pause_color=$campaigns_color;} + if ($SUB==29) {$camp_listmix_color=$subcamp_color;} + else {$camp_listmix_color=$campaigns_color;} + echo "\n"; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo "\n"; + echo "
$row[0]: Basic Dettagliata EsitiHot-KeyRiciclaggio ContattiChiama Auto Num AlternCodici PausaList Mix Real-Time
\n"; + + echo "
\n"; + echo ""; + + echo "
\n"; + + if ($SUB < 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"; + + $o=0; + while ($Ds_to_print > $o) + { + $o++; + $Dstatus = $Dstatuses[$o]; + + echo "\n"; + } + else + { + echo "$Dstatus - $statname_list[$Dstatus]         \n"; + echo "RIMUOVI\n"; + } + } + + echo "\n"; + + echo "\n"; + + echo "\n"; + + echo "\n"; + + echo "\n"; + + echo "\n"; + + echo "\n"; + + echo "\n"; + + echo "\n"; + + echo "\n"; + + echo "\n"; + + echo "\n"; + + echo "\n"; + + + + echo "\n"; + + echo "\n"; + + + echo "\n"; + + echo "\n"; + + echo "\n"; + + echo "\n"; + + echo "\n"; + + echo "\n"; + + echo "\n"; + + echo "\n"; + + echo "\n"; + + echo "\n"; + + echo "\n"; + + echo "\n"; + + echo "\n"; + + echo "\n"; + + echo "\n"; + + echo "\n"; + + echo "\n"; + + echo "\n"; + + echo "\n"; + + echo "\n"; + + echo "\n"; + + echo "\n"; + + 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 ($campaign_allow_inbound == 'Y') + { + echo "\n"; + } + + echo "\n"; + + if ($allow_closers == 'Y') + { + echo "\n"; + } + + echo "\n"; + echo "
ID Campagna: $row[0]$NWB#vicidial_campaigns-campaign_id$NWE
Nome Campagna: $NWB#vicidial_campaigns-campaign_name$NWE
Descrizione Campagna: $NWB#vicidial_campaigns-campaign_description$NWE
Campagna Change Date: $campaign_changedate   $NWB#vicidial_campaigns-campaign_changedate$NWE
Campagna Login Date: $campaign_logindate   $NWB#vicidial_campaigns-campaign_logindate$NWE
Attivo: $NWB#vicidial_campaigns-active$NWE
Extension del parking: - Filename: $NWB#vicidial_campaigns-park_ext$NWE
Web Form: $NWB#vicidial_campaigns-web_form_address$NWE
Permitir Closers: $NWB#vicidial_campaigns-allow_closers$NWE
Permita de entrada y mezclado:$NWB#vicidial_campaigns-campaign_allow_inbound$NWE
Esito Chiamata $o: \n"; + + if ($DEFstatusDISABLED > 0) + { + echo "$Dstatus - $statname_list[$Dstatus]         \n"; + echo "REMOVE
Aggiungi Un Esito Chiamata:   \n"; + echo "     $NWB#vicidial_campaigns-dial_status$NWE
Ordine Lista: $NWB#vicidial_campaigns-lead_order$NWE
List Mix: $NWB#vicidial_campaigns-list_order_mix$NWE
Filtro Contatti: $NWB#vicidial_campaigns-lead_filter_id$NWE
Livello Coda Chiamate: $NWB#vicidial_campaigns-hopper_level$NWE
Forza Il Reset Della Coda Chiamate: $NWB#vicidial_campaigns-force_reset_hopper$NWE
Metodo Chiamata: $NWB#vicidial_campaigns-dial_method$NWE
Livello Auto Dial: (0 = off)$NWB#vicidial_campaigns-auto_dial_level$NWE       FORZA LIVELLO ANCHE CON MODALITA` ADAPT
Conta Solo Disponibili: $NWB#vicidial_campaigns-available_only_ratio_tally$NWE
Limita Percentuale Abbattuti: % $NWB#vicidial_campaigns-adaptive_dropped_percentage$NWE
Livello Auto-Dial Massimo In Modalita` Adapt: number only $NWB#vicidial_campaigns-adaptive_maximum_level$NWE
Ultimo Orario Chiamate: 4 solo cifre $NWB#vicidial_campaigns-adaptive_latest_server_time$NWE
Modifica Intensita` Adapt Auto-Dial: $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
Operatore Da Scegliere Per La Chiamata Successiva: $NWB#vicidial_campaigns-next_agent_call$NWE
Orario Chiamate: $NWB#vicidial_campaigns-local_call_time$NWE
Timeout Chiamata: in seconds$NWB#vicidial_campaigns-dial_timeout$NWE
Prefisso Chiamata: for 91NXXNXXXXXX value would be 9, for no dial prefix use X$NWB#vicidial_campaigns-dial_prefix$NWE
Ometti Prefisso Telefono: $NWB#vicidial_campaigns-omit_phone_code$NWE
CallerID della Campagna: $NWB#vicidial_campaigns-campaign_cid$NWE
Exten VDAD de La campaña: $NWB#vicidial_campaigns-campaign_vdad_exten$NWE
Interno Registrazioni Per Questa Campagna: $NWB#vicidial_campaigns-campaign_rec_exten$NWE
Registrazioni Per Questa Campagna: $NWB#vicidial_campaigns-campaign_recording$NWE
Nome Registrazioni Per Questa Campagna: $NWB#vicidial_campaigns-campaign_rec_filename$NWE
Ritardo Registrazione: in seconds$NWB#vicidial_campaigns-allcalls_delay$NWE
Script: $NWB#vicidial_campaigns-campaign_script$NWE
Esegui all`avvio della telefonata: $NWB#vicidial_campaigns-get_call_launch$NWE
Messaggio Segreteria Telefonica: $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
Secondi Abbattimento Telefonata: $NWB#vicidial_campaigns-drop_call_seconds$NWE
Casella Vocale: $NWB#vicidial_campaigns-voicemail_ext$NWE
Riproduci Messaggio Prima Di Abbattere La Telefonata: $NWB#vicidial_campaigns-safe_harbor_message$NWE
Interno Messaggio Telefonata Abbattuta: $NWB#vicidial_campaigns-safe_harbor_exten$NWE
Secondi Riposo Operatore: $NWB#vicidial_campaigns-wrapup_seconds$NWE
Messaggio Riposo Operatore: $NWB#vicidial_campaigns-wrapup_message$NWE
Controlla In Lista Contatti Da NON CHIAMARE: $NWB#vicidial_campaigns-use_internal_dnc$NWE
AgentCodici PausaAttivo: $NWB#vicidial_campaigns-agent_pause_codes_active$NWE
Aggiornamento Statistiche Campagna: $NWB#vicidial_campaigns-campaign_stats_refresh$NWE
Disabilita modifica dati clienti: $NWB#vicidial_campaigns-disable_alter_custdata$NWE
Abilita Login Senza Contatti Da Chiamare: $NWB#vicidial_campaigns-no_hopper_leads_logins$NWE
ID Lista Chiamate Manuali:$NWB#vicidial_campaigns-manual_dial_list_id$NWE
Grupos De entrada Permitidos:
"; + echo " $NWB#vicidial_campaigns-closer_campaigns$NWE
\n"; + echo "$groups_list"; + echo "
Grupo De la Transferencia Del Defecto:$NWB#vicidial_campaigns-default_xfer_group$NWE
Grupos Permitidos De la Transferencia:
"; + echo " $NWB#vicidial_campaigns-xfer_groups$NWE
\n"; + echo "$XFERgroups_list"; + echo "
\n"; + + echo "
\n"; + echo "
LISTE IN QUESTA CAMPAGNA:   $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 LISTANOME LISTAATTIVO
$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 "Questa campagna ha $active_lists liste attive e $inactive_lists lista inattive

\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 " - NASCONDI

"; + } + else + { + echo "Popup Dialable Leads Count"; + echo " - MOSTRA

"; + } + + + + + + $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 "Questa campagna ha $hopper_leads contatti nella coda chiamate

\n"; + echo "Clicca qui per vedere quali numeri sono nella coda chiamate in questo momento

\n"; + echo "Clicca qui per visualizzare tutti i richiami in attesa per questa campagna

\n"; + echo "Clicca qui per vedere il report VDAD per questa campagna

\n"; + echo "
\n"; + } + + + ##### CAMPAIGN CUSTOM STATUSES ##### + if ($SUB==22) + { + + ##### get status category listings for dynamic pulldown + $stmt="SELECT vsc_id,vsc_name from vicidial_status_categories order by vsc_id desc"; + $rslt=mysql_query($stmt, $link); + $cats_to_print = mysql_num_rows($rslt); + $cats_list=""; + + $o=0; + while ($cats_to_print > $o) + { + $rowx=mysql_fetch_row($rslt); + $cats_list .= "\n"; + $catsname_list["$rowx[0]"] = substr($rowx[1],0,20); + $o++; + } + + + echo "
\n"; + echo "
ESITI PERSONALIZZATI PER QUESTA CAMPAGNA:   $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); + $AScategory = $rowx[5]; + $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 "
ESITODESCRIZIONESELEZIONABILERISPOSTA UMANACANCELLA
\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "$rowx[0]
\n"; + echo "\n"; + echo "         \n"; + echo "   \n"; + echo "CANCELLA\n"; + echo "
\n"; + + echo "
AGGIUNGI NUOVO ESITO PERSONALIZZATO PER CAMPAGNA
\n"; + echo "\n"; + echo "\n"; + echo "Esito:   \n"; + echo "Descrizione:   \n"; + echo "Selezionabile:   \n"; + echo "Risposta Umana:   \n"; + echo "Categoria: \n"; + echo "  
\n"; + echo "
\n"; + + echo "

\n"; + } + + ##### CAMPAIGN HOTKEYS ##### + if ($SUB==23) + { + echo "
HOT KEY PERSONALIZZATE PER QUESTA CAMPAGNA:   $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 KEYESITODESCRIZIONECANCELLA
$rowx[1]$rowx[0]$rowx[2]CANCELLA
\n"; + + echo "
AGGIUNGI NUOVA HOT KEY PERSONALIZZATA PER QUESTA CAMPAGNA
\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "Hotkey:   \n"; + echo "Esito:   \n"; + echo "
\n"; + echo "

\n"; + } + + ##### CAMPAIGN LEAD RECYCLING ##### + if ($SUB==25) + { + echo "

CONTATTI DA RICICLARE IN QUESTA CAMPAGNA:   $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 "
ESITORITARDO NUOVO TENTATIVOMASSIMO TENTATIVIATTIVO CANCELLA
$rowx[2]
\n"; + echo "\n"; + echo "\n"; + echo "
CANCELLA
\n"; + + echo "
AGGIUNGI NUOVO ESITO DA RICICLARE
\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "Esito:   \n"; + echo "Intervallo Tra Tentativi: \n"; + echo "Massimo Tentativi: \n"; + echo "
\n"; + + echo "

\n"; + } + + ##### CAMPAIGN AUTO-ALT-NUMBER DIALING ##### + if ($SUB==26) + { + echo "

ESITI PER I QUALI CHIAMARE I NUMERI ALTERNATIVI:   $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 "
ESITICANCELLA
$AADstatuses[$o]CANCELLA
\n"; + + echo "
AGGIUNGI NUOVO ESITO CHIAMA-AUTO-NUM-ALTERN
\n"; + echo "\n"; + echo "\n"; + echo "Esito:   \n"; + echo "
\n"; + + echo "

\n"; + } + + ##### CAMPAIGN PAUSE CODES ##### + if ($SUB==27) + { + echo "

CODICI PAUSA OPERATORE PER QUESTA CAMPAGNA:   $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 "
CODICI PAUSAFATTURABILEMODIFICACANCELLA
$rowx[0]\n"; + echo "\n"; + echo "\n"; + echo "  \n"; + echo "
CANCELLA
\n"; + + echo "
NUOVO CODICE PAUSA
\n"; + echo "\n"; + echo "\n"; + echo "Codice Pausa: \n"; + echo "Nome Codice Pausa: \n"; + echo "   Fatturabile: \n"; + echo "
\n"; + + echo "

\n"; + } + + + if ($SUB < 1) + { + echo "

\n"; + echo "DISCONNETTI TUTTI GLI OPERATORI DI QUESTA CAMPAGNA

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

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

CANCELLA QUESTA CAMPAGNA\n"; + } + } + } + else + { + echo "Non hai l`autorizzazione per accedere a questa pagina\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); + } + + $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]; + $list_order_mix = $row[64]; + $default_xfer_group = $row[67]; + $campaign_allow_inbound = $row[65]; + $default_xfer_group = $row[67]; + + if (ereg("DISABLED",$list_order_mix)) + {$DEFlistDISABLE = ''; $DEFstatusDISABLED=0;} + else + {$DEFlistDISABLE = 'disabled'; $DEFstatusDISABLED=1;} + + $stmt="SELECT * from vicidial_statuses order by status"; + $rslt=mysql_query($stmt, $link); + $statuses_to_print = mysql_num_rows($rslt); + $statuses_list=''; + $dial_statuses_list=''; + $o=0; + while ($statuses_to_print > $o) + { + $rowx=mysql_fetch_row($rslt); + $statuses_list .= "\n"; + if ($rowx[0] != 'CBHOLD') {$dial_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"; + if ($rowx[0] != 'CBHOLD') {$dial_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); + + $stmt="SELECT count(*) from vicidial_campaigns_list_mix where campaign_id='$campaign_id' and status='ACTIVE'"; + $rslt=mysql_query($stmt, $link); + $rowx=mysql_fetch_row($rslt); + if ($rowx[0] < 1) + { + $mixes_list="\n"; + $mixname_list["DISABLED"] = "DISABLED"; + } + else + { + ##### get list_mix listings for dynamic pulldown + $stmt="SELECT vcl_id,vcl_name from vicidial_campaigns_list_mix where campaign_id='$campaign_id' and status='ACTIVE' limit 1"; + $rslt=mysql_query($stmt, $link); + $mixes_to_print = mysql_num_rows($rslt); + $mixes_list="\n"; + + $o=0; + while ($mixes_to_print > $o) + { + $rowx=mysql_fetch_row($rslt); + $mixes_list .= "\n"; + $mixname_list["ACTIVE"] = "$rowx[0] - $rowx[1]"; + $o++; + } + } + + if ($SUB<1) {$camp_detail_color=$subcamp_color;} + else {$camp_detail_color=$campaigns_color;} + if ($SUB==22) {$camp_statuses_color=$subcamp_color;} + else {$camp_statuses_color=$campaigns_color;} + if ($SUB==23) {$camp_hotkeys_color=$subcamp_color;} + else {$camp_hotkeys_color=$campaigns_color;} + if ($SUB==25) {$camp_recycle_color=$subcamp_color;} + else {$camp_recycle_color=$campaigns_color;} + if ($SUB==26) {$camp_autoalt_color=$subcamp_color;} + else {$camp_autoalt_color=$campaigns_color;} + if ($SUB==27) {$camp_pause_color=$subcamp_color;} + else {$camp_pause_color=$campaigns_color;} + if ($SUB==29) {$camp_listmix_color=$subcamp_color;} + else {$camp_listmix_color=$campaigns_color;} + echo "\n"; + echo ""; + echo ""; + echo ""; + echo ""; + echo "\n"; + echo "\n"; + echo "
$row[0]: Vista Generale Vista Dettagliata List Mix Schermata Tempo Reale  
\n"; + + if ($SUB < 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"; + + $o=0; + while ($Ds_to_print > $o) + { + $o++; + $Dstatus = $Dstatuses[$o]; + + echo "\n"; + } + else + { + echo "$Dstatus - $statname_list[$Dstatus]         \n"; + echo "RIMUOVI\n"; + } + } + + echo "\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 Campagna: $row[0]$NWB#vicidial_campaigns-campaign_id$NWE
Nome Campagna: $NWB#vicidial_campaigns-campaign_name$NWE
Descrizione Campagna: $row[57]$NWB#vicidial_campaigns-campaign_description$NWE
Campagna Change Date: $campaign_changedate   $NWB#vicidial_campaigns-campaign_changedate$NWE
Campagna Login Date: $campaign_logindate   $NWB#vicidial_campaigns-campaign_logindate$NWE
Attivo: $NWB#vicidial_campaigns-active$NWE
Extension del parking: $row[9] - $row[10]$NWB#vicidial_campaigns-park_ext$NWE
Web Form: $row[11]$NWB#vicidial_campaigns-web_form_address$NWE
Permitir Closers: $row[12] $NWB#vicidial_campaigns-allow_closers$NWE
Grupo De la Transferencia Del Defecto:$default_xfer_group $NWB#vicidial_campaigns-default_xfer_group$NWE
Permita de entrada y mezclado:$campaign_allow_inbound $NWB#vicidial_campaigns-campaign_allow_inbound$NWE
Esito Chiamata $o: \n"; + if ($DEFstatusDISABLED > 0) + { + echo "$Dstatus - $statname_list[$Dstatus]         \n"; + echo "REMOVE
Aggiungi Un Esito Chiamata:   \n"; + echo "     $NWB#vicidial_campaigns-dial_status$NWE
Ordine Lista: $NWB#vicidial_campaigns-lead_order$NWE
List Mix: $NWB#vicidial_campaigns-list_order_mix$NWE
Filtro Contatti: $NWB#vicidial_campaigns-lead_filter_id$NWE
Livello Coda Chiamate: $NWB#vicidial_campaigns-hopper_level$NWE
Forza Il Reset Della Coda Chiamate: $NWB#vicidial_campaigns-force_reset_hopper$NWE
Metodo Chiamata: $NWB#vicidial_campaigns-dial_method$NWE
Livello Auto Dial: (0 = off)$NWB#vicidial_campaigns-auto_dial_level$NWE
Modifica Intensita` Adapt Auto-Dial: $NWB#vicidial_campaigns-adaptive_intensity$NWE
Script: $script_id
Esegui all`avvio della telefonata: $get_call_launch
\n"; + + echo "
\n"; + echo "
LISTE IN QUESTA CAMPAGNA:   $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 LISTANOME LISTAATTIVO
$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 "Questa campagna ha $active_lists liste attive e $inactive_lists lista inattive

\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 " - NASCONDI

"; + } + else + { + echo "Popup Dialable Leads Count"; + echo " - MOSTRA

"; + } + + + + $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 "Questa campagna ha $hopper_leads contatti nella coda chiamate

\n"; + echo "Clicca qui per vedere quali numeri sono nella coda chiamate in questo momento

\n"; + echo "Clicca qui per visualizzare tutti i richiami in attesa per questa campagna

\n"; + echo "Clicca qui per vedere il report VDAD per questa campagna

\n"; + echo "
\n"; + + echo "
\n"; + + ### list of agent rank or skill-level for this campaign + echo "
\n"; + echo "
CLASSIFICA OPERATORI PER QUESTA CAMPAGNA:
\n"; + echo "\n"; + echo "\n"; + + $stmt="SELECT user,campaign_rank,calls_today from vicidial_campaign_agents where campaign_id='$campaign_id'"; + $rsltx=mysql_query($stmt, $link); + $users_to_print = mysql_num_rows($rsltx); + + $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 "
UTENTE     CLASSIFICA     CHIAMATE OGGI
$rowx[0]$rowx[1]$rowx[2]

\n"; + + + echo "DISCONNETTI TUTTI GLI OPERATORI DI QUESTA CAMPAGNA

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

CANCELLA QUESTA CAMPAGNA\n"; + } + } + } + else + { + echo "Non hai l`autorizzazione per accedere a questa pagina\n"; + exit; + } +} + + +###################### +# ADD=31 or 34 and SUB=29 for list mixes +###################### +if ( ( ($ADD==34) or ($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==34) or ($ADD==31) ) +{ + if ($LOGmodify_campaigns==1) + { + ##### CAMPAIGN LIST MIX SETTINGS ##### + if ($SUB==29) + { + ##### get list_id listings for dynamic pulldown + $stmt="SELECT list_id,list_name from vicidial_lists where campaign_id='$campaign_id' order by list_id"; + $rslt=mysql_query($stmt, $link); + $mixlists_to_print = mysql_num_rows($rslt); + $mixlists_list=""; + + $o=0; + while ($mixlists_to_print > $o) + { + $rowx=mysql_fetch_row($rslt); + $mixlists_list .= "\n"; + $mixlistsname_list["$rowx[0]"] = "$rowx[1]"; + $o++; + } + + + echo "

MIX LISTA PER QUESTA CAMPAGNA:   $NWB#vicidial_campaigns-list_order_mix$NWE
\n"; + + echo "

Experimental Feature in development!!! NON-FUNCTIONAL
\n"; + + + $stmt="SELECT * from vicidial_campaigns_list_mix where campaign_id='$campaign_id' order by status, vcl_id"; + $rslt=mysql_query($stmt, $link); + $listmixes = mysql_num_rows($rslt); + $o=0; + while ($listmixes > $o) + { + $rowx=mysql_fetch_row($rslt); + $vcl_id=$rowx[0]; + $o++; + + if ($o < 2) + {$tablecolor='bgcolor="#99FF99"'; $bgcolor='bgcolor="#CCFFCC"';} + else + { + if (eregi("1$|3$|5$|7$|9$", $o)) + {$tablecolor='bgcolor="#B9CBFD"'; $bgcolor='bgcolor="#9BB9FB"';} + else + {$tablecolor='bgcolor="#9BB9FB"'; $bgcolor='bgcolor="#B9CBFD"';} + } + echo "
\n"; + echo ""; + echo "\n"; + echo "\n"; + echo "\n"; + } + else + {echo "$rowx[5]\n";} + echo "\n"; + echo "\n"; + +# list_id|order|percent|statuses|:list_id|order|percent|statuses|:... +# 101|1|40| A B NA -|:102|2|25| NEW -|:103|3|30| DROP CALLBK -|:101|4|5| DROP -| +# INSERT INTO vicidial_campaigns_list_mix values('TESTMIX','TESTCAMP List Mix','TESTCAMP','101|1|40| A B NA -|:102|2|25| NEW -|:103|3|30| DROP CALLBK -|:101|4|5| DROP -|','IN_ORDER','ACTIVE'); +# INSERT INTO vicidial_campaigns_list_mix values('TESTMIX2','TESTCAMP List Mix2','TESTCAMP','101|1|20| A B -|:102|2|45| NEW -|:103|3|30| DROP CALLBK -|:101|4|5| DROP -|','IN_ORDER','ACTIVE'); +# INSERT INTO vicidial_campaigns_list_mix values('TESTMIX3','TESTCAMP List Mix3','TESTCAMP','101|1|30| A NA -|:102|2|35| NEW -|:103|3|30| DROP CALLBK -|:101|4|5| DROP -|','IN_ORDER','ACTIVE'); + + $MIXentries = $MT; + $MIXentries = explode(":", $rowx[3]); + $Ms_to_print = (count($MIXentries) - 0); + $q=0; + while ($Ms_to_print > $q) + { + $MIXdetails = explode('|', $MIXentries[$q]); + $MIXdetailsLIST = $MIXdetails[0]; + + $dial_statuses = preg_replace("/ -$/","",$dial_statuses); + $Dstatuses = explode(" ", $dial_statuses); + $Ds_to_print = (count($Dstatuses) - 0); + $Dsql = ''; + $r=0; + while ($Ds_to_print > $r) + { + $r++; + $Dsql .= "'$Dstatuses[$r]',"; + } + $Dsql = preg_replace("/,$/","",$Dsql); + + echo "\n"; + + echo "\n"; + + echo "\n"; + + + echo "\n"; + echo "\n"; + + + echo "\n"; + + + $q++; + + } + + + + + echo "\n"; + + echo "\n"; + + + echo "\n"; + + if ($q > 9) {$AE_disabled = 'DISABLED';} + else {$AE_disabled = '';} + echo "\n"; + echo "
\n"; + echo "
\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "$vcl_id:\n"; + echo "\n"; + echo "     DELETE LIST MIX
Esito: \n"; + if ($rowx[5]=='INACTIVE') + { + echo "$rowx[5]\n"; + echo "ATTIVAMethod:\n"; + echo "
ID LISTAPRIORITY% MIXESITI
\n"; + echo "\n"; + echo "List: $MIXdetailsLIST   RIMUOVI\n"; + + + + echo " \n"; + echo "ADD   \n"; + echo "RIMUOVI\n"; + echo "
\n"; + echo "Difference %: \n"; + echo "   \n"; + echo "\n"; + echo "
\n"; + echo "
\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "List:
\n"; + echo "
\n"; + } + + + echo "

AGGIUNGI NUOVA LISTA MIX
\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "
\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "Mix ID: Mix Name: Mix Method: "; + echo "
List: Dial Esito:  
\n"; + + echo "
\n"; + + } + } +} + + +###################### +# ADD=30 campaign not allowed +###################### + +if ($ADD==30) +{ +echo "
\n"; + echo ""; +echo "You do not have permission to view campaign $campaign_id\n"; +} + + +###################### +# ADD=32 display all campaign statuses +###################### +if ($ADD==32) +{ +echo "
\n"; + echo ""; + +echo "
ELENCO ESITI PERSONALIZZATI PER CAMPAGNA:\n"; +echo "
\n"; +echo "\n"; +echo "\n"; +echo "\n"; +echo "\n"; +echo "\n"; +echo "\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) + { + $row=mysql_fetch_row($rslt); + $campaigns_id_list[$o] = $row[0]; + $campaigns_name_list[$o] = $row[1]; + $o++; + } + + $o=0; + while ($campaigns_to_print > $o) + { + if (eregi("1$|3$|5$|7$|9$", $o)) + {$bgcolor='bgcolor="#B9CBFD"';} + else + {$bgcolor='bgcolor="#9BB9FB"';} + echo ""; + echo ""; + echo ""; + echo "\n"; + $o++; + } + +echo "
CAMPAGNANOMEESITIMODIFICA
$campaigns_id_list[$o] $campaigns_name_list[$o] "; + + $stmt="SELECT status from vicidial_campaign_statuses where campaign_id='$campaigns_id_list[$o]' order by status"; + $rslt=mysql_query($stmt, $link); + $campstatus_to_print = mysql_num_rows($rslt); + $p=0; + while ( ($campstatus_to_print > $p) and ($p < 10) ) + { + $row=mysql_fetch_row($rslt); + echo "$row[0] "; + $p++; + } + if ($p<1) + {echo "NESSUNO";} + echo "MODIFICA ESITI
\n"; +} + + +###################### +# ADD=33 display all campaign hotkeys +###################### +if ($ADD==33) +{ +echo "
\n"; + echo ""; + +echo "
ELENCO HOTKEY CAMPAGNE:\n"; +echo "
\n"; +echo "\n"; +echo "\n"; +echo "\n"; +echo "\n"; +echo "\n"; +echo "\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) + { + $row=mysql_fetch_row($rslt); + $campaigns_id_list[$o] = $row[0]; + $campaigns_name_list[$o] = $row[1]; + $o++; + } + + $o=0; + while ($campaigns_to_print > $o) + { + if (eregi("1$|3$|5$|7$|9$", $o)) + {$bgcolor='bgcolor="#B9CBFD"';} + else + {$bgcolor='bgcolor="#9BB9FB"';} + echo ""; + echo ""; + echo ""; + echo "\n"; + $o++; + } + +echo "
CAMPAGNANOMEHOTKEYMODIFICA
$campaigns_id_list[$o] $campaigns_name_list[$o] "; + + $stmt="SELECT status from vicidial_campaign_hotkeys where campaign_id='$campaigns_id_list[$o]' order by status"; + $rslt=mysql_query($stmt, $link); + $campstatus_to_print = mysql_num_rows($rslt); + $p=0; + while ( ($campstatus_to_print > $p) and ($p < 10) ) + { + $row=mysql_fetch_row($rslt); + echo "$row[0] "; + $p++; + } + if ($p<1) + {echo "NESSUNO";} + echo "MODIFICA HOTKEY
\n"; +} + + +###################### +# ADD=35 display all campaign lead recycle entries +###################### +if ($ADD==35) +{ +echo "
\n"; + echo ""; + +echo "
ELENCO CONTATTI DA RICICLARE:\n"; +echo "
\n"; +echo "\n"; +echo "\n"; +echo "\n"; +echo "\n"; +echo "\n"; +echo "\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) + { + $row=mysql_fetch_row($rslt); + $campaigns_id_list[$o] = $row[0]; + $campaigns_name_list[$o] = $row[1]; + $o++; + } + + $o=0; + while ($campaigns_to_print > $o) + { + if (eregi("1$|3$|5$|7$|9$", $o)) + {$bgcolor='bgcolor="#B9CBFD"';} + else + {$bgcolor='bgcolor="#9BB9FB"';} + echo ""; + echo ""; + echo ""; + echo "\n"; + $o++; + } + +echo "
CAMPAGNANOMEESITI DA RICICLAREMODIFICA
$campaigns_id_list[$o] $campaigns_name_list[$o] "; + + $stmt="SELECT status from vicidial_lead_recycle where campaign_id='$campaigns_id_list[$o]' order by status"; + $rslt=mysql_query($stmt, $link); + $campstatus_to_print = mysql_num_rows($rslt); + $p=0; + while ( ($campstatus_to_print > $p) and ($p < 10) ) + { + $row=mysql_fetch_row($rslt); + echo "$row[0] "; + $p++; + } + if ($p<1) + {echo "NESSUNO";} + echo "MODIFICA CONTATTI DA RICICLARE
\n"; +} + + +###################### +# ADD=36 display all campaign auto-alt dial entries +###################### +if ($ADD==36) +{ +echo "
\n"; + echo ""; + +echo "
ELENCO ESITI PER I QUALI CHIAMARE AUTOMATICAMENTE IL NUMERO ALTERNATIVO:\n"; +echo "
\n"; +echo "\n"; +echo "\n"; +echo "\n"; +echo "\n"; +echo "\n"; +echo "\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) + { + $row=mysql_fetch_row($rslt); + $campaigns_id_list[$o] = $row[0]; + $campaigns_name_list[$o] = $row[1]; + $o++; + } + + $o=0; + while ($campaigns_to_print > $o) + { + if (eregi("1$|3$|5$|7$|9$", $o)) + {$bgcolor='bgcolor="#B9CBFD"';} + else + {$bgcolor='bgcolor="#9BB9FB"';} + echo ""; + echo ""; + echo ""; + echo "\n"; + $o++; + } + +echo "
CAMPAGNANOMECHIAMA-AUTO-NUM-ALTERNMODIFICA
$campaigns_id_list[$o] $campaigns_name_list[$o] "; + + $stmt="SELECT auto_alt_dial_statuses from vicidial_campaigns where campaign_id='$campaigns_id_list[$o]';"; + $rslt=mysql_query($stmt, $link); + $campstatus_to_print = mysql_num_rows($rslt); + $p=0; + while ( ($campstatus_to_print > $p) and ($p < 10) ) + { + $row=mysql_fetch_row($rslt); + echo "$row[0] "; + $p++; + } + if (strlen($row[0])<3) + {echo "NESSUNO";} + echo "MODIFICA CHIAMA-AUTO-NUM-ALTERN
\n"; +} + + +###################### +# ADD=37 display all campaign agent pause codes +###################### +if ($ADD==37) +{ +echo "
\n"; + echo ""; + +echo "
ELENCO CODICI PAUSA OPERATORE PER CAMPAGNA:\n"; +echo "
\n"; +echo "\n"; +echo "\n"; +echo "\n"; +echo "\n"; +echo "\n"; +echo "\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) + { + $row=mysql_fetch_row($rslt); + $campaigns_id_list[$o] = $row[0]; + $campaigns_name_list[$o] = $row[1]; + $o++; + } + + $o=0; + while ($campaigns_to_print > $o) + { + if (eregi("1$|3$|5$|7$|9$", $o)) + {$bgcolor='bgcolor="#B9CBFD"';} + else + {$bgcolor='bgcolor="#9BB9FB"';} + echo ""; + echo ""; + echo ""; + echo "\n"; + $o++; + } + +echo "
CAMPAGNANOMECODICI PAUSAMODIFICA
$campaigns_id_list[$o] $campaigns_name_list[$o] "; + + $stmt="SELECT pause_code from vicidial_pause_codes where campaign_id='$campaigns_id_list[$o]' order by pause_code;"; + $rslt=mysql_query($stmt, $link); + $campstatus_to_print = mysql_num_rows($rslt); + $p=0; + while ( ($campstatus_to_print > $p) and ($p < 10) ) + { + $row=mysql_fetch_row($rslt); + echo "$row[0] "; + $p++; + } + if ($p<1) + {echo "NESSUNO";} + echo "MODIFICA CODICI PAUSA
\n"; +} + + +###################### +# ADD=39 display all campaign list mixes +###################### +if ($ADD==39) +{ +echo "
\n"; + echo ""; + +echo "
LISTADOS DE LA MEZCLA DE LA LISTA DE LA CAMPAÑA:\n"; +echo "
\n"; +echo "\n"; +echo "\n"; +echo "\n"; +echo "\n"; +echo "\n"; +echo "\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) + { + $row=mysql_fetch_row($rslt); + $campaigns_id_list[$o] = $row[0]; + $campaigns_name_list[$o] = $row[1]; + $o++; + } + + $o=0; + while ($campaigns_to_print > $o) + { + if (eregi("1$|3$|5$|7$|9$", $o)) + {$bgcolor='bgcolor="#B9CBFD"';} + else + {$bgcolor='bgcolor="#9BB9FB"';} + echo ""; + echo ""; + echo ""; + echo "\n"; + $o++; + } + +echo "
CAMPAGNANOMELIST MIXMODIFICA
$campaigns_id_list[$o] $campaigns_name_list[$o] "; + + $stmt="SELECT vcl_id from vicidial_campaigns_list_mix where campaign_id='$campaigns_id_list[$o]' order by status,vcl_id;"; + $rslt=mysql_query($stmt, $link); + $campstatus_to_print = mysql_num_rows($rslt); + $p=0; + while ( ($campstatus_to_print > $p) and ($p < 10) ) + { + $row=mysql_fetch_row($rslt); + echo "$row[0] "; + $p++; + } + if ($p<1) + {echo "NESSUNO";} + echo "MODIFY LIST MIX
\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 "
MODIFICA I DATI DELLA LISTA: $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 Lista: $row[0]$NWB#vicidial_lists-list_id$NWE
Nome Lista: $NWB#vicidial_lists-list_name$NWE
Descrizione Lista: $NWB#vicidial_lists-list_description$NWE
Campagna: $NWB#vicidial_lists-campaign_id$NWE
Attivo: $NWB#vicidial_lists-active$NWE
Resetta questa lista allo stato di `contatti non chiamati`: $NWB#vicidial_lists-reset_list$NWE
Data Modifica Lista: $list_changedate   $NWB#vicidial_lists-list_changedate$NWE
Data Ultima Telefonata $list_lastcalldate   $NWB#vicidial_lists-list_lastcalldate$NWE
\n"; + + echo "
\n"; + echo "
ESITI IN QUESTA 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 "
ESITONOME ESITOCHIAMATINON CHIAMATI
$CLB$dispo$CLE$statuses_list[$dispo]".$lead_list['Y'][$dispo]."".$lead_list['N'][$dispo]."
SUBTOTALI$lead_list[Y_count]$lead_list[N_count]
TOTALE$lead_list[count]

\n"; + unset($lead_list); + + + echo "
\n"; + echo "
FUSI ORARI IN QUESTA 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 "
FUSO ORARIO ATTUALE (ora locale)CHIAMATINON CHIAMATI
".$DISPtzone."     ($LOCALdate)".$lead_list['Y'][$tzone]."".$lead_list['N'][$tzone]."
SUBTOTALI$lead_list[Y_count]$lead_list[N_count]
TOTALE$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 "
CHIAMATE EFFETTUATE IN QUESTA 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 "
ESITONOME ESITO$firstSUBTOTALE
$Pstatus$statuses_list[$Pstatus] $count_count[$o]  $leads_in_sts[$sts]
TOTALE$all_called_count[$first]$leads_in_list

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

Clicca qui per visualizzare tutti i richiami in attesa in questa lista

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

CANCELLA QUESTA LISTA\n"; + } + } + else + { + echo "Non hai l`autorizzazione per accedere a questa pagina\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]; + $call_time_id = $row[17]; + $after_hours_action = $row[18]; + $after_hours_message_filename = $row[19]; + $after_hours_exten = $row[20]; + $after_hours_voicemail = $row[21]; + $welcome_message_filename = $row[22]; + $moh_context = $row[23]; + $onhold_prompt_filename = $row[24]; + $prompt_interval = $row[25]; + $agent_alert_exten = $row[26]; + $agent_alert_delay = $row[27]; + $default_xfer_group = $row[28]; + + ##### get in-groups listings for dynamic pulldown + $stmt="SELECT group_id,group_name from vicidial_inbound_groups order by group_id"; + $rslt=mysql_query($stmt, $link); + $Xgroups_to_print = mysql_num_rows($rslt); + $Xgroups_menu=''; + $Xgroups_selected=0; + $o=0; + while ($Xgroups_to_print > $o) + { + $rowx=mysql_fetch_row($rslt); + $Xgroups_menu .= "\n"; + $o++; + } + if ($Xgroups_selected < 1) + {$Xgroups_menu .= "\n";} + else + {$Xgroups_menu .= "\n";} + + + 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 "\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 Gruppo: $row[0]$NWB#vicidial_inbound_groups-group_id$NWE
Nome Gruppo: $NWB#vicidial_inbound_groups-group_name$NWE
Colore Gruppo: $NWB#vicidial_inbound_groups-group_color$NWE
Attivo: $NWB#vicidial_inbound_groups-active$NWE
Web Form: $NWB#vicidial_inbound_groups-web_form_address$NWE
Operatore Da Scegliere Per La Chiamata Successiva: $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
Esegui all`avvio della telefonata: $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
Secondi Abbattimento Telefonata: $NWB#vicidial_inbound_groups-drop_call_seconds$NWE
Casella Vocale: $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
Tempo Chiamata: $NWB#vicidial_inbound_groups-call_time_id$NWE
Despue`s De la Accio`n De las Horas:$NWB#vicidial_inbound_groups-after_hours_action$NWE
Despue`s De Nombre de fichero Del Mensaje De las Horas:$NWB#vicidial_inbound_groups-after_hours_message_filename$NWE
Despue`s De la Extension De las Horas:$NWB#vicidial_inbound_groups-after_hours_exten$NWE
Despue`s De las Horas Casella Vocale:$NWB#vicidial_inbound_groups-after_hours_voicemail$NWE
Nombre de fichero Agradable Del Mensaje:$NWB#vicidial_inbound_groups-welcome_message_filename$NWE
Context Musica di Attesa:$NWB#vicidial_inbound_groups-moh_context$NWE
En Nombre de fichero Del Aviso Del Asimiento:$NWB#vicidial_inbound_groups-onhold_prompt_filename$NWE
En Intervalo Del Aviso Del Asimiento:$NWB#vicidial_inbound_groups-prompt_interval$NWE
Extension Alerta Del Agente:$NWB#vicidial_inbound_groups-agent_alert_exten$NWE
La Alarma Del Agente Retrasa:$NWB#vicidial_inbound_groups-agent_alert_delay$NWE
Grupo De la Transferencia Del Defecto:$NWB#vicidial_inbound_groups-default_xfer_group$NWE
\n"; + + ### list of agent rank or skill-level for this inbound group + echo "
\n"; + echo "
CLASSIFICA OPERATORI PER QUESTO GRUPPO INBOUND:
\n"; + echo "\n"; + echo "\n"; + + $stmt="SELECT user,group_rank,calls_today from vicidial_inbound_group_agents where group_id='$group_id'"; + $rsltx=mysql_query($stmt, $link); + $users_to_print = mysql_num_rows($rsltx); + + $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 "
UTENTE     CLASSIFICA     CHIAMATE OGGI
$rowx[0]$rowx[1]$rowx[2]

\n"; + + echo "

\n"; + + echo "Clicca qui per visualizzare un report per questo gruppo inbound

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

EMERGENCY VDAC CLEAR FOR THIS IN-GROUP

\n"; + echo "

CANCELLA QUESTO GRUPPO INBOUND\n"; + } + } + else + { + echo "Non hai l`autorizzazione per accedere a questa pagina\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 "
Inizio ID Utente: (solo cifre, incremented)$NWB#vicidial_remote_agents-user_start$NWE
Numero di Linee: (solo cifre)$NWB#vicidial_remote_agents-number_of_lines$NWE
IP Server: $NWB#vicidial_remote_agents-server_ip$NWE
Numero Di Interno Remoto: (numero del dialplan usato per raggiungere gli operatori)$NWB#vicidial_remote_agents-conf_exten$NWE
Esito: $NWB#vicidial_remote_agents-status$NWE
Campagna: $NWB#vicidial_remote_agents-campaign_id$NWE
Gruppi Inbound: \n"; + echo "$groups_list"; + echo "$NWB#vicidial_remote_agents-closer_campaigns$NWE
\n"; + echo "NOTA: Potrebbero passare fino a 30 secondi prima che le modifiche qui effettuate possano essere accettate\n"; + + + if ($LOGdelete_remote_agents > 0) + { + echo "

SUPRIMA ESTE AGENTE ALEJADO\n"; + } + } + else + { + echo "Non hai l`autorizzazione per accedere a questa pagina\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 "
MODIFICA UN GRUPPO UTENTI\n"; + echo "\n"; + echo "\n"; + echo "
\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "
Gruppo: (senza spazi e punteggiatura)$NWB#vicidial_user_groups-user_group$NWE
Descrizione: (Descrizione del gruppo)$NWB#vicidial_user_groups-group_name$NWE
Campagne Permesse: \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 "
UTENTI IN QUESTO GRUPPO: $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 "
UTENTENOME COMPLETOLIVELLO
$rowx[0]$rowx[1]$rowx[2]

\n"; + + + + echo "

Clicca qui per visualizzare tutti i richiami di questo utente

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

CANCELLA QUESTO GRUPPO UTENTI\n"; + } + } + else + { + echo "Non hai l`autorizzazione per accedere a questa pagina\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 "
MODIFICA SCRIPT\n"; + echo "\n"; + echo "\n"; + echo "
ID Script:: $script_id$NWB#vicidial_scripts-script_name$NWE
Nome Script: (titolo script)$NWB#vicidial_scripts-script_name$NWE
Note Script: $NWB#vicidial_scripts-script_comments$NWE
Attivo: $NWB#vicidial_scripts-active$NWE
Testo Script:

Anteprima Script
"; + # BEGIN Insert Field + echo ""; + echo "
"; + # END Insert Field + echo " $NWB#vicidial_scripts-script_text$NWE
\n"; + + if ($LOGdelete_scripts > 0) + { + echo "

CANCELLA QUESTO SCRIPT\n"; + } + } + else + { + echo "Non hai l`autorizzazione per accedere a questa pagina\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 "
MODIFICA UN FILTRO\n"; + echo "\n"; + echo "\n"; + echo "
ID Filtro:$lead_filter_id$NWB#vicidial_lead_filters-lead_filter_id$NWE
Nome Del Filtro: (breve descrizione del filtro)$NWB#vicidial_lead_filters-lead_filter_name$NWE
Commenti 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 "

CANCELLA QUESTO FILTRO\n"; + } + } + else + { + echo "Non hai l`autorizzazione per accedere a questa pagina\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 visio`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 "
MODIFICA ORARIO CHIAMATE\n"; +echo "\n"; +echo "\n"; +echo "
ID Orario Chiamate: $call_time_id$NWB#vicidial_call_times-call_time_id$NWE
Nome Orario Chiamate: (breve descrizione dell`orario chiamate)$NWB#vicidial_call_times-call_time_name$NWE
Note Orario Chiamate: $NWB#vicidial_call_times-call_time_comments$NWE
Inizio di Default: Fine di Default: $NWB#vicidial_call_times-ct_default_start$NWE
Inizio Domenica: Fine Domenica: $NWB#vicidial_call_times-ct_sunday_start$NWE
Inizio Lunedi: Fine Lunedi: $NWB#vicidial_call_times-ct_sunday_start$NWE
Inizio Martedi: Fine Martedi: $NWB#vicidial_call_times-ct_sunday_start$NWE
Inizio Mercoledi: Fine Mercoledi: $NWB#vicidial_call_times-ct_sunday_start$NWE
Inizio Giovedi: Fine Giovedi: $NWB#vicidial_call_times-ct_sunday_start$NWE
Inizio Venerdi: Fine Venerdi: $NWB#vicidial_call_times-ct_sunday_start$NWE
Inizio Sabato: Fine Sabato: $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 "CAMPAGNE CHE UTILIZZANO QUESTO ORARIO:
\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); + echo "\n"; + $o++; + } + +echo "
$row[0] $row[1]
\n"; +echo "GRUPPI INBOUND CHE UTILIZZANO QUESTO ORARIO:
\n"; +echo "\n"; + + $stmt="SELECT group_id,group_name from vicidial_inbound_groups where call_time_id='$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 "

ELIMINA QUESTO ORARIO CHIAMATE\n"; + } +} +else +{ +echo "Le no autorizan a visio`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 "
ID Orario Chiamate: $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: (breve descrizione dell`orario chiamate)$NWB#vicidial_call_times-call_time_name$NWE
Comentarios Del Tiempo De la Llamada Del Estado: $NWB#vicidial_call_times-call_time_comments$NWE
Inizio di Default: Fine di Default: $NWB#vicidial_call_times-ct_default_start$NWE
Inizio Domenica: Fine Domenica: $NWB#vicidial_call_times-ct_sunday_start$NWE
Inizio Lunedi: Fine Lunedi: $NWB#vicidial_call_times-ct_sunday_start$NWE
Inizio Martedi: Fine Martedi: $NWB#vicidial_call_times-ct_sunday_start$NWE
Inizio Mercoledi: Fine Mercoledi: $NWB#vicidial_call_times-ct_sunday_start$NWE
Inizio Giovedi: Fine Giovedi: $NWB#vicidial_call_times-ct_sunday_start$NWE
Inizio Venerdi: Fine Venerdi: $NWB#vicidial_call_times-ct_sunday_start$NWE
Inizio Sabato: Fine Sabato: $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 DEFINICIo`N DEL TIEMPO DE LA LLAMADA DEL ESTADO\n"; + } + +} +else +{ +echo "Le no autorizan a visio`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 telefonO: $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 "
Interno Telefono: $NWB#phones-extension$NWE
Numero De Dial plan: (solo cifre)$NWB#phones-dialplan_number$NWE
Buzon de voz: (solo cifre)$NWB#phones-voicemail_id$NWE
CallerID De salida: (solo cifre)$NWB#phones-outbound_cid$NWE
Direccion IP del telefono: (optional)$NWB#phones-phone_ip$NWE
Direccion IP del ordenador: (optional)$NWB#phones-computer_ip$NWE
IP Server: $NWB#phones-server_ip$NWE
Login: $NWB#phones-login$NWE
Password: $NWB#phones-pass$NWE
Esito: $NWB#phones-status$NWE
Cuenta Activa: $NWB#phones-active$NWE
Tipo Del telefono: $NWB#phones-phone_type$NWE
Nome Completo: $NWB#phones-fullname$NWE
Compania: $NWB#phones-company$NWE
Foto: $NWB#phones-picture$NWE
Messaggi Nuovi: $row[14]$NWB#phones-messages$NWE
Messaggi Vecchi: $row[15]$NWB#phones-old_messages$NWE
Protocollo Client: $NWB#phones-protocol$NWE
Fuso Orario Locale: (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
Extension del parking: $NWB#phones-park_on_extension$NWE
Extension 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 grabacion: $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
Localizacio`n del Navegador: $NWB#phones-client_browser$NWE
Directorio de instalacio`n: $NWB#phones-install_directory$NWE
URL 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
Conferenze: $NWB#phones-conferencing_enabled$NWE
Colgar del Admin: $NWB#phones-admin_hangup_enabled$NWE
Captura del Admin: $NWB#phones-admin_hijack_enabled$NWE
Monitorizacio`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
Boto`n Vmail: $NWB#phones-voicemail_button_enabled$NWE
Aggiornamento Veloce: $NWB#phones-enable_fast_refresh$NWE
Intervallo Aggiornamento Veloce: (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 despue`s de cada llamada: $NWB#phones-VDstop_rec_after_each_call$NWE
Abilita messaggi 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: (Secondario DB Server)$NWB#phones-DBY_server$NWE
Base de datos de DBY: (Secondario Server Database)$NWB#phones-DBY_database$NWE
Usuario de DBY: (Secondario DB Login)$NWB#phones-DBY_user$NWE
Contraseña de DBY: (Secondario DB Secret)$NWB#phones-DBY_pass$NWE
Puerto de DBY: (Secondario DB Port)$NWB#phones-DBY_port$NWE
\n"; + + echo "

Pinchar aquí­ para ver las estadísticas del telefono\n"; + + if ($LOGast_delete_phones > 0) + { + echo "

CANCELLA QUESTO TELEFONO\n"; + } + } + else + { + echo "Non hai l`autorizzazione per accedere a questa pagina\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 Server: $NWB#servers-server_id$NWE
Descrizione Server: $NWB#servers-server_description$NWE
Indirizzo IP del Server: $NWB#servers-server_ip$NWE
Attivo: $NWB#servers-active$NWE
Versione Di 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 Telnet: $NWB#servers-telnet_host$NWE
Porta 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
Fuso Orario Locale: (No ajustar para el DST)$NWB#servers-local_gmt$NWE
Extension de Vmail Dump : $NWB#servers-voicemail_dump_exten$NWE
Extension del AD de VICIDIAL: $NWB#servers-answer_transfer_agent$NWE
Contexto por Defecto: $NWB#servers-ext_context$NWE
Performance Di Sistema: $NWB#servers-sys_perf_log$NWE
Log Server: $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 "
CAMPAGNA TRONCOS RESTRICCIo`N DELETE
$rowx[1]
\n"; + echo "\n"; + echo "\n"; + echo "
CANCELLA
\n"; + + echo "
AGREGUE EL NUEVO EXPEDIENTE DEL TRONCO DEL SERVIDOR VICIDIAL
\n"; + echo "\n"; + echo "\n"; + echo "TRUNKS:
\n"; + echo "CAMPAGNA:
\n"; + echo "RESTRICTION:
\n"; + echo "
\n"; + + echo "

\n"; + + + ### list of phones on this server + echo "
\n"; + echo "
TELEFONI IN QUESTO 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 "
INTERNONOMEATTIVO
$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 "
CONFERENCEINTERNO
$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 CONFERENCEINTERNO
$rowx[0]$rowx[2]

\n"; + + + echo "
\n"; + + $camp_lists = eregi_replace(".$","",$camp_lists); + echo "Questo server ha $active_phones telefoni attivi e $inactive_phones telefoni inattivi

\n"; + echo "Questo server ha $active_confs active conferences

\n"; + echo "Questo server ha $active_vdconfs active vicidial conferences

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

CANCELLA QUESTO SERVER\n"; + } + } + else + { + echo "Non hai l`autorizzazione per accedere a questa pagina\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 "
MODIFICA DELLA CONFERENZA: $row[0]
\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "
\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "
Conferenza: $NWB#conferences-conf_exten$NWE
IP Server: $NWB#conferences-server_ip$NWE
Interno Corrente:
\n"; + + echo "
\n"; + if ($LOGast_delete_phones > 0) + { + echo "

CANCELLA QUESTA CONFERENZA\n"; + } + } + else + { + echo "Non hai l`autorizzazione per accedere a questa pagina\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 "
Conferenza: $NWB#conferences-conf_exten$NWE
IP Server: $NWB#conferences-server_ip$NWE
Interno Corrente:
\n"; + + echo "
\n"; + if ($LOGast_delete_phones > 0) + { + echo "

CANCELLA QUESTA CONFERENZA VICIDIAL\n"; + } + } + else + { + echo "Non hai l`autorizzazione per accedere a questa pagina\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,enable_agc_xfer_log 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]; + $enable_agc_xfer_log = $row[15]; + + echo "
MODIFICA IMPOSTAZIONI DI SISTEMA\n"; + echo "\n"; + echo "
\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + + + echo "\n"; + echo "
Versione: $version
Install Date: $install_date
UsA Non-Latino: $NWB#settings-use_non_latin$NWE
Webroot Escribible: $NWB#settings-webroot_writable$NWE
Permita La Registracion 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
conexion 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
Log ID QueueMetrics: $NWB#settings-queuemetrics_log_id$NWE
QueueMetrics EnterQueue Prepend: $NWB#settings-queuemetrics_eq_prepend$NWE
El Agente de VICIDIAL Inhabilita La Exhibicio`n:$NWB#settings-vicidial_agent_disable$NWE
Permetti messaggi SIPSAK: $NWB#settings-allow_sipsak_messages$NWE
URL Home Amministrazione: $NWB#settings-admin_home_url$NWE
Permita El Logfile De la Transferencia Del Agente: $NWB#settings-enable_agc_xfer_log$NWE
\n"; + echo "\n"; + } + else + { + echo "Non hai l`autorizzazione per accedere a questa pagina\n"; + exit; + } +} + + + + + + +###################### +# ADD=321111111111111 modify vicidial system statuses +###################### + +if ($ADD==321111111111111) +{ + if ($LOGmodify_servers==1) + { + echo "
\n"; + echo ""; + + echo "
\n"; + echo "ESITI DI DEFAULT IN QUESTO SISTEMA:   $NWB#vicidial_statuses$NWE
\n"; + echo "\n"; + echo "\n"; + + ##### get status category listings for dynamic pulldown + $stmt="SELECT vsc_id,vsc_name from vicidial_status_categories order by vsc_id desc"; + $rslt=mysql_query($stmt, $link); + $cats_to_print = mysql_num_rows($rslt); + $cats_list=""; + + $o=0; + while ($cats_to_print > $o) + { + $rowx=mysql_fetch_row($rslt); + $cats_list .= "\n"; + $catsname_list["$rowx[0]"] = substr($rowx[1],0,20); + $o++; + } + + + $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); + $AScategory = $rowx[4]; + $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 "
ESITODESCRIZIONESELEZIO
NABILE
RISPOSTA
UMANA
CATEGORIAMODIFICA/CANCELLA
\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "$rowx[0]
\n"; + echo "\n"; + echo "         \n"; + echo "   \n"; + + if (preg_match("/^B$|^NA$|^DNC$|^NA$|^DROP$|^INCALL$|^QUEUE$|^NEW$/i",$rowx[0])) + { + echo "CANCELLA\n"; + } + else + { + echo "CANCELLA\n"; + } + echo "
\n"; + + echo "
AGGIUNGI UN NUOVO ESITO DI DEFAULT
\n"; + echo "\n"; + echo "Esito:   \n"; + echo "Descrizione:
\n"; + echo "Selezionabile:   \n"; + echo "Risposta Umana:   \n"; + echo "Categoria: \n"; + echo "  
\n"; + echo "
\n"; + + echo "

\n"; + + } + else + { + echo "Non hai l`autorizzazione per accedere a questa pagina\n"; + exit; + } +} + + + + + +###################### +# ADD=331111111111111 modify vicidial status categories +###################### + +if ($ADD==331111111111111) +{ + if ($LOGmodify_servers==1) + { + echo "
\n"; + echo ""; + + echo "
\n"; + echo "VICIDIAL STATUS CATEGORIES:   $NWB#vicidial_status_categories$NWE
\n"; + echo "\n"; + echo "\n"; + + $stmt="SELECT * from vicidial_status_categories order by vsc_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); + + $Avsc_id[$o] = $rowx[0]; + $Avsc_name[$o] = $rowx[1]; + $Avsc_description[$o] = $rowx[2]; + $Atovdad_display[$o] = $rowx[3]; + + $o++; + } + $p=0; + while ($o > $p) + { + if (eregi("1$|3$|5$|7$|9$", $p)) + {$bgcolor='bgcolor="#B9CBFD"';} + else + {$bgcolor='bgcolor="#9BB9FB"';} + + $CATstatuses=''; + $stmt="SELECT status from vicidial_statuses where category='$Avsc_id[$p]' order by status;"; + $rslt=mysql_query($stmt, $link); + $statuses_to_print = mysql_num_rows($rslt); + $q=0; + while ($statuses_to_print > $q) + { + $rowx=mysql_fetch_row($rslt); + $CATstatuses.=" $rowx[0]"; + $q++; + } + $stmt="SELECT status from vicidial_campaign_statuses where category='$Avsc_id[$p]' order by status;"; + $rslt=mysql_query($stmt, $link); + $statuses_to_print = mysql_num_rows($rslt); + $q=0; + while ($statuses_to_print > $q) + { + $rowx=mysql_fetch_row($rslt); + $CATstatuses.=" $rowx[0]"; + $q++; + } + + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + + $p++; + } + + echo "
CATEGORIANOMETOVDADSTATUSES IN THIS CATEGORY
\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "$Avsc_id[$p]
\n"; + echo "$CATstatuses"; + echo "
Descrizione:
        \n"; + echo "   CANCELLA
 
\n"; + + echo "
AGGIUNGI NUOVA CATEGORIA DI ESITI
\n"; + echo "\n"; + echo "Category ID:   \n"; + echo "Name:   \n"; + echo "TimeOnVDAD Display:  
\n"; + echo "Descrizione:   \n"; + echo "
\n"; + + echo "

\n"; + + } + else + { + echo "Non hai l`autorizzazione per accedere a questa pagina\n"; + exit; + } +} + + + + + + +###################### +# ADD=550 search form +###################### + +if ($ADD==550) +{ +echo "
\n"; +echo ""; + +echo "
RICERCA UTENTI
\n"; +echo "\n"; +echo "
\n"; +echo "\n"; +echo "\n"; +echo "\n"; +echo "\n"; + +echo "\n"; +echo "
Numero Utente:
Nome Completo:
Livello Utente:
Gruppo Utente:
\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]MODIFICA | STATISTICHE | ESITO | TIME
\n"; + +} + + +###################################################################################################### +###################################################################################################### +####### 8 series, Callback lists +###################################################################################################### +###################################################################################################### + +###################### +# ADD=8 find all callbacks on hold by a User +###################### +if ($ADD==8) +{ + if ($LOGmodify_users==1) + { + if ($SUB==89) + { + $stmt="UPDATE vicidial_callbacks SET status='INACTIVE' where user='$user' and status='LIVE' and callback_time < '$past_month_date';"; + $rslt=mysql_query($stmt, $link); + echo "
User($user) callback listings LIVE for more than one month have been made INACTIVE\n"; + } + if ($SUB==899) + { + $stmt="UPDATE vicidial_callbacks SET status='INACTIVE' where user='$user' and status='LIVE' and callback_time < '$past_week_date';"; + $rslt=mysql_query($stmt, $link); + echo "
User($user) callback listings LIVE for more than one week have been made INACTIVE\n"; + } + } +$CBinactiveLINK = "
Remove LIVE Callbacks older than one month for this user
Remove LIVE Callbacks older than one week for this user
"; + +echo ""; + + $CBquerySQLwhere = "and user='$user'"; + +echo "
ELENCO RICHIAMI DA EFFETTUARE PER L`UTENTE: $user\n"; +$oldADD = "ADD=8&user=$user"; +$ADD='82'; +} + +###################### +# ADD=81 find all callbacks on hold within a Campaign +###################### +if ($ADD==81) +{ + if ($LOGmodify_campaigns==1) + { + if ($SUB==89) + { + $stmt="UPDATE vicidial_callbacks SET status='INACTIVE' where campaign_id='$campaign_id' and status='LIVE' and callback_time < '$past_month_date';"; + $rslt=mysql_query($stmt, $link); + echo "
campaign($campaign_id) callback listings LIVE for more than one month have been made INACTIVE\n"; + } + if ($SUB==899) + { + $stmt="UPDATE vicidial_callbacks SET status='INACTIVE' where campaign_id='$campaign_id' and status='LIVE' and callback_time < '$past_week_date';"; + $rslt=mysql_query($stmt, $link); + echo "
campaign($campaign_id) callback listings LIVE for more than one week have been made INACTIVE\n"; + } + } +$CBinactiveLINK = "
Remove LIVE Callbacks older than one month for this campaign
Remove LIVE Callbacks older than one week for this campaign
"; + +echo ""; + + $CBquerySQLwhere = "and campaign_id='$campaign_id'"; + +echo "
CAMPAIGN CALLBACK HOLD LISTINGS: $campaign_id\n"; +$oldADD = "ADD=81&campaign_id=$campaign_id"; +$ADD='82'; +} + +###################### +# ADD=811 find all callbacks on hold within a List +###################### +if ($ADD==811) +{ + if ($LOGmodify_lists==1) + { + if ($SUB==89) + { + $stmt="UPDATE vicidial_callbacks SET status='INACTIVE' where list_id='$list_id' and status='LIVE' and callback_time < '$past_month_date';"; + $rslt=mysql_query($stmt, $link); + echo "
list($list_id) callback listings LIVE for more than one month have been made INACTIVE\n"; + } + if ($SUB==899) + { + $stmt="UPDATE vicidial_callbacks SET status='INACTIVE' where list_id='$list_id' and status='LIVE' and callback_time < '$past_week_date';"; + $rslt=mysql_query($stmt, $link); + echo "
list($list_id) callback listings LIVE for more than one week have been made INACTIVE\n"; + } + } +$CBinactiveLINK = "
Remove LIVE Callbacks older than one month for this list
Remove LIVE Callbacks older than one week for this list
"; + +echo ""; + + $CBquerySQLwhere = "and list_id='$list_id'"; + +echo "
LIST CALLBACK HOLD LISTINGS: $list_id\n"; +$oldADD = "ADD=811&list_id=$list_id"; +$ADD='82'; +} + +###################### +# ADD=8111 find all callbacks on hold within a user group +###################### +if ($ADD==8111) +{ + if ($LOGmodify_usergroups==1) + { + if ($SUB==89) + { + $stmt="UPDATE vicidial_callbacks SET status='INACTIVE' where user_group='$user_group' and status='LIVE' and callback_time < '$past_month_date';"; + $rslt=mysql_query($stmt, $link); + echo "
user group($user_group) callback listings LIVE for more than one month have been made INACTIVE\n"; + } + if ($SUB==899) + { + $stmt="UPDATE vicidial_callbacks SET status='INACTIVE' where user_group='$user_group' and status='LIVE' and callback_time < '$past_week_date';"; + $rslt=mysql_query($stmt, $link); + echo "
user group($user_group) callback listings LIVE for more than one week have been made INACTIVE\n"; + } + } + $CBinactiveLINK = "
Remove LIVE Callbacks older than one month for this user group
Remove LIVE Callbacks older than one week for this user group
"; + + echo ""; + + $CBquerySQLwhere = "and user_group='$user_group'"; + +echo "
USER GROUP CALLBACK HOLD LISTINGS: $list_id\n"; +$oldADD = "ADD=8111&user_group=$user_group"; +$ADD='82'; +} + +###################### +# ADD=82 display all callbacks on hold +###################### +if ($ADD==82) +{ + +$USERlink='stage=USERIDDOWN'; +$GROUPlink='stage=GROUPDOWN'; +$ENDATElink='stage=ENDATEDOWN'; +$SQLorder='order by '; +if (eregi("USERIDDOWN",$stage)) {$SQLorder='order by user desc,'; $USERlink='stage=USERIDUP';} +if (eregi("GROUPDOWN",$stage)) {$SQLorder='order by user_group desc,'; $NAMElink='stage=NAMEUP';} +if (eregi("ENDATEDOWN",$stage)) {$SQLorder='order by entry_time desc,'; $LEVELlink='stage=LEVELUP';} + + $stmt="SELECT * from vicidial_callbacks where status IN('ACTIVE','LIVE') $CBquerySQLwhere $SQLorder recipient,status desc,callback_time"; + $rslt=mysql_query($stmt, $link); + $cb_to_print = mysql_num_rows($rslt); + +echo "
\n"; +echo "
\n"; +echo "\n"; +echo "\n"; +echo "\n"; +echo "\n"; +echo "\n"; +echo "\n"; +echo "\n"; +echo "\n"; +echo "\n"; + + $o=0; + while ($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 "
CONTATTOLIST CAMPAGNAENTRY DATACALLBACK DATAUTENTERECIPIENTESITOGRUPPO
$row[1]$row[2]$row[3]$row[5]$row[6]$row[8]$row[9]$row[4]$row[11]
\n"; + +echo "$CBinactiveLINK"; +} + + + +###################################################################################################### +###################################################################################################### +####### 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 "
ELENCO UTENTI:\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 "
ID UTENTENOME COMPLETOLIVELLOGRUPPOLINKS
$row[1]$row[3]$row[4]$row[5]MODIFICA | STATISTICHE | ESITO | 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 "
ELENCO CAMPAGNE:\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]  MODIFICA
\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 "
ELENCO LISTE:\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]  MODIFICA
\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 "
ELENCO GRUPPI INBOUND:\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]  MODIFICA
\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 "
ELENCO OPERATORI REMOTI:\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]MODIFICA
\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 "
ELENCO GRUPPI UTENTI:\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]MODIFICA
\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 "
ELENCO SCRIPT:\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]MODIFICA
\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 "
ELENCO FILTRI CONTATTI:\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]MODIFICA
\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 "
ELENCO ORARI CHIAMATE:\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] MODIFICA
\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 "
ELENCO ORARI CHIAMATE PER STATO:\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] MODIFICA
\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 "
ELENCO TELEFONI:\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 PLANESITONOMEVMAILLINKS
$row[0]$row[16]$row[5]$row[1]$row[2]$row[8]$row[11]$row[14]$row[15]MODIFICA | STATISTICHE
\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 "
ELENCO SERVER:\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]  MODIFICA
\n"; +} + +###################### +# ADD=1000000000000 display all conferences +###################### +if ($ADD==1000000000000) +{ +echo "\r\n"; + print " \r\n"; + } + $rec_count++; + } +$sthA->finish(); + +exit; diff --git a/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_it/listloader_super.pl b/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_it/listloader_super.pl new file mode 100644 index 00000000..9f6f8d52 --- /dev/null +++ b/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_it/listloader_super.pl @@ -0,0 +1,1104 @@ +#!/usr/bin/perl + +### listloader_super.pl version 2.0.4 *DBI-version* +### +### Copyright (C) 2008 Matt Florell,Joe Johnson LICENSE: GPLv2 +### +# +# +# CHANGES +# 60616-1548 - Added listID override feature to force all leads into same list +# - Added gmt_offset_now lookup for each lead +# 60811-1232 - Changed to DBI +# 60811-1329 - changed to use /etc/astguiclient.conf for configs +# 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 +# 70417-1059 - Fixed default phone_code bug +# 70510-1518 - Added campaign and system duplicate check and phonecode override +# 80428-0144 - UTF8 cleanup +# + +### begin parsing run-time options ### +if (length($ARGV[0])>1) +{ + $i=0; + while ($#ARGV >= $i) + { + $args = "$args $ARGV[$i]"; + $i++; + } + + if ($args =~ /--help|-h/i) + { + print "allowed run time options:\n [-forcelistid=1234] = overrides the listID given in the file with the 1234\n [-h] = this help screen\n\n"; + + exit; + } + else + { + if ($args =~ /-duplicate-check/i) + {$dupcheck=1;} + if ($args =~ /-duplicate-campaign-check/i) + {$dupcheckcamp=1;} + if ($args =~ /-duplicate-system-check/i) + {$dupchecksys=1;} + if ($args =~ /-postal-code-gmt/i) + {$postalgmt=1;} + if ($args =~ /--forcelistid=/i) + { + @data_in = split(/--forcelistid=/,$args); + $forcelistid = $data_in[1]; + $forcelistid =~ s/ .*//gi; + print "\n----- FORCE LISTID OVERRIDE: $forcelistid -----\n\n"; + } + else + {$forcelistid = '';} + + if ($args =~ /--forcephonecode=/i) + { + @data_in = split(/--forcephonecode=/,$args); + $forcephonecode = $data_in[1]; + $forcephonecode =~ s/ .*//gi; + print "\n----- FORCE PHONECODE OVERRIDE: $forcephonecode -----\n\n"; + } + else + {$forcephonecode = '';} + + if ($args =~ /--lead-file=/i) + { + @data_in = split(/--lead-file=/,$args); + $lead_file = $data_in[1]; + $lead_file =~ s/ .*//gi; + # print "\n----- LEAD FILE: $lead_file -----\n\n"; + } + else + {$lead_file = './vicidial_temp_file.xls';} + } +} +### end parsing run-time options ### + +use Spreadsheet::ParseExcel; +use Time::Local; +use DBI; + + +# default path to astguiclient configuration file: +$PATHconf = '/etc/astguiclient.conf'; + +open(conf, "$PATHconf") || die "can't open $PATHconf: $!\n"; +@conf = ; +close(conf); +$i=0; +foreach(@conf) + { + $line = $conf[$i]; + $line =~ s/ |>|\n|\r|\t|\#.*|;.*//gi; + if ( ($line =~ /^PATHhome/) && ($CLIhome < 1) ) + {$PATHhome = $line; $PATHhome =~ s/.*=//gi;} + if ( ($line =~ /^PATHlogs/) && ($CLIlogs < 1) ) + {$PATHlogs = $line; $PATHlogs =~ s/.*=//gi;} + if ( ($line =~ /^PATHagi/) && ($CLIagi < 1) ) + {$PATHagi = $line; $PATHagi =~ s/.*=//gi;} + if ( ($line =~ /^PATHweb/) && ($CLIweb < 1) ) + {$PATHweb = $line; $PATHweb =~ s/.*=//gi;} + if ( ($line =~ /^PATHsounds/) && ($CLIsounds < 1) ) + {$PATHsounds = $line; $PATHsounds =~ s/.*=//gi;} + if ( ($line =~ /^PATHmonitor/) && ($CLImonitor < 1) ) + {$PATHmonitor = $line; $PATHmonitor =~ s/.*=//gi;} + if ( ($line =~ /^VARserver_ip/) && ($CLIserver_ip < 1) ) + {$VARserver_ip = $line; $VARserver_ip =~ s/.*=//gi;} + if ( ($line =~ /^VARDB_server/) && ($CLIDB_server < 1) ) + {$VARDB_server = $line; $VARDB_server =~ s/.*=//gi;} + if ( ($line =~ /^VARDB_database/) && ($CLIDB_database < 1) ) + {$VARDB_database = $line; $VARDB_database =~ s/.*=//gi;} + if ( ($line =~ /^VARDB_user/) && ($CLIDB_user < 1) ) + {$VARDB_user = $line; $VARDB_user =~ s/.*=//gi;} + if ( ($line =~ /^VARDB_pass/) && ($CLIDB_pass < 1) ) + {$VARDB_pass = $line; $VARDB_pass =~ s/.*=//gi;} + if ( ($line =~ /^VARDB_port/) && ($CLIDB_port < 1) ) + {$VARDB_port = $line; $VARDB_port =~ s/.*=//gi;} + $i++; + } + +# Customized Variables +$server_ip = $VARserver_ip; # Asterisk server IP + +if (!$VARDB_port) {$VARDB_port='3306';} + +$dbhA = DBI->connect("DBI:mysql:$VARDB_database:$VARDB_server:$VARDB_port", "$VARDB_user", "$VARDB_pass") + or die "Couldn't connect to database: " . DBI->errstr; + + +$vars=$ARGV[0]; +@xls_fields=split(/\,/, $vars); + +$|=0; +$secX = time(); + +($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time); +$year = ($year + 1900); +$mon++; +if ($hour < 10) {$hour = "0$hour";} +if ($min < 10) {$min = "0$min";} +if ($sec < 10) {$sec = "0$sec";} +if ($mon < 10) {$mon = "0$mon";} +if ($mday < 10) {$mday = "0$mday";} +$pulldate0 = "$year-$mon-$mday $hour:$min:$sec"; +$pulldate="$year-$mon-$mday $hour:$min:$sec"; +$inSD = $pulldate0; +$dsec = ( ( ($hour * 3600) + ($min * 60) ) + $sec ); + +############################################# +##### START SYSTEM_SETTINGS LOOKUP ##### +$stmtA = "SELECT use_non_latin FROM system_settings;"; +$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; +$sthA->execute or die "executing: $stmtA ", $dbhA->errstr; +$sthArows=$sthA->rows; +if ($sthArows > 0) + { + @aryA = $sthA->fetchrow_array; + $non_latin = "$aryA[0]"; + } +$sthA->finish(); +##### END SETTINGS LOOKUP ##### +########################################### + + +if ($non_latin > 0) {$affected_rows = $dbhA->do("SET NAMES 'UTF8'");} + +### Grab Server values from the database +$stmtA = "SELECT local_gmt FROM servers where server_ip = '$server_ip';"; +$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; +$sthA->execute or die "executing: $stmtA ", $dbhA->errstr; +$sthArows=$sthA->rows; +$rec_count=0; +while ($sthArows > $rec_count) + { + @aryA = $sthA->fetchrow_array; + $DBSERVER_GMT = "$aryA[0]"; + if ($DBSERVER_GMT) {$SERVER_GMT = $DBSERVER_GMT;} + $rec_count++; + } +$sthA->finish(); + + $LOCAL_GMT_OFF = $SERVER_GMT; + $LOCAL_GMT_OFF_STD = $SERVER_GMT; + +if ($isdst) {$LOCAL_GMT_OFF++;} +if ($DB) {print "SEED TIME $secX : $year-$mon-$mday $hour:$min:$sec LOCAL GMT OFFSET NOW: $LOCAL_GMT_OFF\n";} + + + +$total=0; $good=0; $bad=0; +open(STMT_FILE, "> $PATHlogs/listloader_stmts.txt"); + +$oBook = Spreadsheet::ParseExcel::Workbook->Parse("$lead_file"); +my($iR, $iC, $oWkS, $oWkC); + +foreach $oWkS (@{$oBook->{Worksheet}}) { + for($iR = 0 ; defined $oWkS->{MaxRow} && $iR <= $oWkS->{MaxRow} ; $iR++) { + + $entry_date = "$pulldate"; + $modify_date = ""; + $status = "NEW"; + $user = ""; + $oWkC = $oWkS->{Cells}[$iR][$xls_fields[0]]; + if ($oWkC) {$vendor_lead_code=$oWkC->Value; } + $oWkC = $oWkS->{Cells}[$iR][$xls_fields[1]]; + if ($oWkC) {$source_code=$oWkC->Value; } + $source_id=$source_code; + $oWkC = $oWkS->{Cells}[$iR][$xls_fields[2]]; + if ($oWkC) {$list_id=$oWkC->Value; } + $gmt_offset = '0'; + $called_since_last_reset='N'; + $oWkC = $oWkS->{Cells}[$iR][$xls_fields[3]]; + if ($oWkC) {$phone_code=$oWkC->Value; } + $phone_code=~s/[^0-9]//g; + $oWkC = $oWkS->{Cells}[$iR][$xls_fields[4]]; + if ($oWkC) {$phone_number=$oWkC->Value; } + $phone_number=~s/[^0-9]//g; + $USarea = substr($phone_number, 0, 3); + $oWkC = $oWkS->{Cells}[$iR][$xls_fields[5]]; + if ($oWkC) {$title=$oWkC->Value; } + $oWkC = $oWkS->{Cells}[$iR][$xls_fields[6]]; + if ($oWkC) {$first_name=$oWkC->Value; } + $oWkC = $oWkS->{Cells}[$iR][$xls_fields[7]]; + if ($oWkC) {$middle_initial=$oWkC->Value; } + $oWkC = $oWkS->{Cells}[$iR][$xls_fields[8]]; + if ($oWkC) {$last_name=$oWkC->Value; } + $oWkC = $oWkS->{Cells}[$iR][$xls_fields[9]]; + if ($oWkC) {$address1=$oWkC->Value; } + $oWkC = $oWkS->{Cells}[$iR][$xls_fields[10]]; + if ($oWkC) {$address2=$oWkC->Value; } + $oWkC = $oWkS->{Cells}[$iR][$xls_fields[11]]; + if ($oWkC) {$address3=$oWkC->Value; } + $oWkC = $oWkS->{Cells}[$iR][$xls_fields[12]]; + if ($oWkC) {$city=$oWkC->Value; } + $oWkC = $oWkS->{Cells}[$iR][$xls_fields[13]]; + if ($oWkC) {$state=$oWkC->Value; } + $oWkC = $oWkS->{Cells}[$iR][$xls_fields[14]]; + if ($oWkC) {$province=$oWkC->Value; } + $oWkC = $oWkS->{Cells}[$iR][$xls_fields[15]]; + if ($oWkC) {$postal_code=$oWkC->Value; } + $oWkC = $oWkS->{Cells}[$iR][$xls_fields[16]]; + if ($oWkC) {$country_code=$oWkC->Value; } + $oWkC = $oWkS->{Cells}[$iR][$xls_fields[17]]; + if ($oWkC) {$gender=$oWkC->Value; } + $oWkC = $oWkS->{Cells}[$iR][$xls_fields[18]]; + if ($oWkC) {$date_of_birth=$oWkC->Value; } + $oWkC = $oWkS->{Cells}[$iR][$xls_fields[19]]; + if ($oWkC) {$alt_phone=$oWkC->Value; } + $alt_phone=~s/[^0-9]//g; + $oWkC = $oWkS->{Cells}[$iR][$xls_fields[20]]; + if ($oWkC) {$email=$oWkC->Value; } + $oWkC = $oWkS->{Cells}[$iR][$xls_fields[21]]; + if ($oWkC) {$security_phrase=$oWkC->Value; } + $oWkC = $oWkS->{Cells}[$iR][$xls_fields[22]]; + if ($oWkC) {$comments=$oWkC->Value; } + $comments=~s/^\s*(.*?)\s*$/$1/; + + + + if (length($forcelistid) > 0) + { + $list_id = $forcelistid; # set list_id to override value + } + if (length($forcephonecode) > 0) + { + $phone_code = $forcephonecode; # set phone_code to override value + } + + ##### Check for duplicate phone numbers in vicidial_list table entire database ##### + if ($dupchecksys > 0) + { + $dup_lead=0; + $stmtA = "select count(*) from vicidial_list where phone_number='$phone_number';"; + if($DBX){print STDERR "\n|$stmtA|\n";} + $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; + $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; + $sthArows=$sthA->rows; + if ($sthArows > 0) + { + @aryA = $sthA->fetchrow_array; + $dup_lead = $aryA[0]; + $dup_lead_list=$list_id; + } + $sthA->finish(); + if ($dup_lead < 1) + { + if ($phone_list =~ /\|$phone_number$US$list_id\|/) + {$dup_lead++;} + } + } + ##### Check for duplicate phone numbers in vicidial_list table for one list_id ##### + if ($dupcheck > 0) + { + $dup_lead=0; + $stmtA = "select list_id from vicidial_list where phone_number='$phone_number' and list_id='$list_id' limit 1;"; + if($DBX){print STDERR "\n|$stmtA|\n";} + $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; + $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; + $sthArows=$sthA->rows; + if ($sthArows > 0) + { + @aryA = $sthA->fetchrow_array; + $dup_lead_list = $aryA[0]; + $dup_lead++; + } + $sthA->finish(); + if ($dup_lead < 1) + { + if ($phone_list =~ /\|$phone_number$US$list_id\|/) + {$dup_lead++;} + } + } + ##### Check for duplicate phone numbers in vicidial_list table for all lists in a campaign ##### + if ($dupcheckcamp > 0) + { + $dup_lead=0; + $dup_lists=''; + + $stmtA = "select count(*) from vicidial_lists where list_id='$list_id';"; + if($DBX){print STDERR "\n|$stmtA|\n";} + $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; + $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; + @aryA = $sthA->fetchrow_array; + $ci_recs = $aryA[0]; + $sthA->finish(); + if ($ci_recs > 0) + { + $stmtA = "select campaign_id from vicidial_lists where list_id='$list_id';"; + if($DBX){print STDERR "\n|$stmtA|\n";} + $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; + $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; + @aryA = $sthA->fetchrow_array; + $dup_camp = $aryA[0]; + $sthA->finish(); + + $stmtA = "select list_id from vicidial_lists where campaign_id='$dup_camp';"; + $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; + $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; + $sthArows=$sthA->rows; + $rec_count=0; + while ($sthArows > $rec_count) + { + @aryA = $sthA->fetchrow_array; + $dup_lists .= "'$aryA[0]',"; + $rec_count++; + } + $sthA->finish(); + + chop($dup_lists); + $stmtA = "select list_id from vicidial_list where phone_number='$phone_number' and list_id IN($dup_lists) limit 1;"; + $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; + $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; + $sthArows=$sthA->rows; + $rec_count=0; + while ($sthArows > $rec_count) + { + @aryA = $sthA->fetchrow_array; + $dup_lead_list = "'$aryA[0]',"; + $rec_count++; + $dup_lead=1; + } + $sthA->finish(); + } + if ($dup_lead < 1) + { + if ($phone_list =~ /\|$phone_number$US$list_id\|/) + {$dup_lead++;} + } + } + + if ( (length($phone_number)>6) && ($dup_lead < 1) ) + { + $phone_list .= "$phone_number$US$list_id|"; + $postalgmt_found=0; + if (length($phone_code)<1) {$phone_code = '1';} + + if ( ($postalgmt > 0) && (length($postal_code)>4) ) + { + if ($phone_code =~ /^1$/) + { + $stmtA = "select * from vicidial_postal_codes where country_code='$phone_code' and postal_code LIKE \"$postal_code%\";"; + if($DBX){print STDERR "\n|$stmtA|\n";} + $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; + $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; + $sthArows=$sthA->rows; + $rec_count=0; + while ($sthArows > $rec_count) + { + @aryA = $sthA->fetchrow_array; + $gmt_offset = $aryA[2]; $gmt_offset =~ s/\+| //gi; + $dst = $aryA[3]; + $dst_range = $aryA[4]; + $PC_processed++; + $rec_count++; + $postalgmt_found++; + if ($DBX) {print " Postal GMT record found for $postal_code: |$gmt_offset|$dst|$dst_range|\n";} + } + $sthA->finish(); + } + } + if ($postalgmt_found < 1) + { + $PC_processed=0; + ### UNITED STATES ### + if ($phone_code =~ /^1$/) + { + $stmtA = "select * from vicidial_phone_codes where country_code='$phone_code' and areacode='$USarea';"; + if($DBX){print STDERR "\n|$stmtA|\n";} + $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; + $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; + $sthArows=$sthA->rows; + $rec_count=0; + while ($sthArows > $rec_count) + { + @aryA = $sthA->fetchrow_array; + $gmt_offset = $aryA[4]; $gmt_offset =~ s/\+| //gi; + $dst = $aryA[5]; + $dst_range = $aryA[6]; + $PC_processed++; + $rec_count++; + } + $sthA->finish(); + } + ### MEXICO ### + if ($phone_code =~ /^52$/) + { + $stmtA = "select * from vicidial_phone_codes where country_code='$phone_code' and areacode='$USarea';"; + if($DBX){print STDERR "\n|$stmtA|\n";} + $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; + $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; + $sthArows=$sthA->rows; + $rec_count=0; + while ($sthArows > $rec_count) + { + @aryA = $sthA->fetchrow_array; + $gmt_offset = $aryA[4]; $gmt_offset =~ s/\+| //gi; + $dst = $aryA[5]; + $dst_range = $aryA[6]; + $PC_processed++; + $rec_count++; + } + $sthA->finish(); + } + ### AUSTRALIA ### + if ($phone_code =~ /^61$/) + { + $stmtA = "select * from vicidial_phone_codes where country_code='$phone_code' and state='$state';"; + if($DBX){print STDERR "\n|$stmtA|\n";} + $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; + $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; + $sthArows=$sthA->rows; + $rec_count=0; + while ($sthArows > $rec_count) + { + @aryA = $sthA->fetchrow_array; + $gmt_offset = $aryA[4]; $gmt_offset =~ s/\+| //gi; + $dst = $aryA[5]; + $dst_range = $aryA[6]; + $PC_processed++; + $rec_count++; + } + $sthA->finish(); + } + ### ALL OTHER COUNTRY CODES ### + if (!$PC_processed) + { + $stmtA = "select * from vicidial_phone_codes where country_code='$phone_code';"; + if($DBX){print STDERR "\n|$stmtA|\n";} + $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; + $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; + $sthArows=$sthA->rows; + $rec_count=0; + while ($sthArows > $rec_count) + { + @aryA = $sthA->fetchrow_array; + $gmt_offset = $aryA[4]; $gmt_offset =~ s/\+| //gi; + $dst = $aryA[5]; + $dst_range = $aryA[6]; + $PC_processed++; + $rec_count++; + } + $sthA->finish(); + } + } + + ### Find out if DST to raise the gmt offset ### + $AC_GMT_diff = ($gmt_offset - $LOCAL_GMT_OFF_STD); + $AC_localtime = ($secX + (3600 * $AC_GMT_diff)); + ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime($AC_localtime); + $year = ($year + 1900); + $mon++; + if ($mon < 10) {$mon = "0$mon";} + if ($mday < 10) {$mday = "0$mday";} + if ($hour < 10) {$hour = "0$hour";} + if ($min < 10) {$min = "0$min";} + if ($sec < 10) {$sec = "0$sec";} + $dsec = ( ( ($hour * 3600) + ($min * 60) ) + $sec ); + + $AC_processed=0; + + if ( (!$AC_processed) && ($dst_range =~ /SSM-FSN/) ) + { + if ($DBX) {print " Second Sunday March to First Sunday November\n";} + &USACAN_dstcalc; + if ($DBX) {print " DST: $USACAN_DST\n";} + if ($USACAN_DST) {$area_GMT++;} + $AC_processed++; + } + if ( (!$AC_processed) && ($dst_range =~ /FSA-LSO/) ) + { + if ($DBX) {print " First Sunday April to Last Sunday October\n";} + &NA_dstcalc; + if ($DBX) {print " DST: $NA_DST\n";} + if ($NA_DST) {$area_GMT++;} + $AC_processed++; + } + if ( (!$AC_processed) && ($dst_range =~ /LSM-LSO/) ) + { + if ($DBX) {print " Last Sunday March to Last Sunday October\n";} + &GBR_dstcalc; + if ($DBX) {print " DST: $GBR_DST\n";} + if ($GBR_DST) {$gmt_offset++;} + $AC_processed++; + } + if ( (!$AC_processed) && ($dst_range =~ /LSO-LSM/) ) + { + if ($DBX) {print " Last Sunday October to Last Sunday March\n";} + &AUS_dstcalc; + if ($DBX) {print " DST: $AUS_DST\n";} + if ($AUS_DST) {$gmt_offset++;} + $AC_processed++; + } + if ( (!$AC_processed) && ($dst_range =~ /FSO-LSM/) ) + { + if ($DBX) {print " First Sunday October to Last Sunday March\n";} + &AUST_dstcalc; + if ($DBX) {print " DST: $AUST_DST\n";} + if ($AUST_DST) {$gmt_offset++;} + $AC_processed++; + } + if ( (!$AC_processed) && ($dst_range =~ /FSO-TSM/) ) + { + if ($DBX) {print " First Sunday October to Third Sunday March\n";} + &NZL_dstcalc; + if ($DBX) {print " DST: $NZL_DST\n";} + if ($NZL_DST) {$gmt_offset++;} + $AC_processed++; + } + if ( (!$AC_processed) && ($dst_range =~ /TSO-LSF/) ) + { + if ($DBX) {print " Third Sunday October to Last Sunday February\n";} + &BZL_dstcalc; + if ($DBX) {print " DST: $BZL_DST\n";} + if ($BZL_DST) {$area_GMT++;} + $AC_processed++; + } + if (!$AC_processed) + { + if ($DBX) {print " No DST Method Found\n";} + if ($DBX) {print " DST: 0\n";} + $AC_processed++; + } + + if ($multi_insert_counter > 8) { + ### insert good deal into pending_transactions table ### + $stmtZ = "INSERT INTO vicidial_list values$multistmt('','$entry_date','$modify_date','$status','$user','$vendor_lead_code','$source_id','$list_id','$gmt_offset','$called_since_last_reset','$phone_code','$phone_number','$title','$first_name','$middle_initial','$last_name','$address1','$address2','$address3','$city','$state','$province','$postal_code','$country_code','$gender','$date_of_birth','$alt_phone','$email','$security_phrase','$comments',0);"; + $affected_rows = $dbhA->do($stmtZ); + print STMT_FILE $stmtZ."\r\n"; + $multistmt=''; + $multi_insert_counter=0; + + } else { + $multistmt .= "('','$entry_date','$modify_date','$status','$user','$vendor_lead_code','$source_id','$list_id','$gmt_offset','$called_since_last_reset','$phone_code','$phone_number','$title','$first_name','$middle_initial','$last_name','$address1','$address2','$address3','$city','$state','$province','$postal_code','$country_code','$gender','$date_of_birth','$alt_phone','$email','$security_phrase','$comments',0),"; + $multi_insert_counter++; + } + + $good++; + } else { + if ($bad < 10000) {print "
record $total BAD- PHONE: $phone_number ROW: |$row[0]| $dup_lead_list\n";} + $bad++; + } + $total++; + if ($total%100==0) { + print ""; + sleep(1); +# flush(); + } + } +} + +if ($multi_insert_counter > 0) { + $stmtZ = "INSERT INTO vicidial_list values ".substr($multistmt, 0, -1).";"; + $affected_rows = $dbhA->do($stmtZ); + print STMT_FILE $stmtZ."\r\n"; +} + +print "

Done
GOOD: $good       BAD: $bad       TOTAL: $total"; + +exit; + + + + + + +sub USACAN_dstcalc { +#********************************************************************** +# SSM-FSN +# This is returns 1 if Daylight Savings Time is in effect and 0 if +# Standard time is in effect. +# Based on Second Sunday March to First Sunday November at 2 am. +# INPUTS: +# mm INTEGER Month. +# dd INTEGER Day of the month. +# ns INTEGER Seconds into the day. +# dow INTEGER Day of week (0=Sunday, to 6=Saturday) +# OPTIONAL INPUT: +# timezone INTEGER hour difference UTC - local standard time +# (DEFAULT is blank) +# make calculations based on UTC time, +# which means shift at 10:00 UTC in April +# and 9:00 UTC in October +# OUTPUT: +# INTEGER 1 = DST, 0 = not DST +# +# S M T W T F S +# 1 2 3 4 5 6 7 +# 8 9 10 11 12 13 14 +#15 16 17 18 19 20 21 +#22 23 24 25 26 27 28 +#29 30 31 +# +# S M T W T F S +# 1 2 3 4 5 6 +# 7 8 9 10 11 12 13 +#14 15 16 17 18 19 20 +#21 22 23 24 25 26 27 +#28 29 30 31 +# +#********************************************************************** + + $USACAN_DST=0; + $mm = $mon; + $dd = $mday; + $ns = $dsec; + $dow= $wday; + + if ($mm < 3 || $mm > 11) { + $USACAN_DST=0; return 0; + } elsif ($mm >= 4 && $mm <= 10) { + $USACAN_DST=1; return 1; + } elsif ($mm == 3) { + if ($dd > 13) { + $USACAN_DST=1; return 1; + } elsif ($dd >= ($dow+8)) { + if ($timezone) { + if ($dow == 0 && $ns < (7200+$timezone*3600)) { + $USACAN_DST=0; return 0; + } else { + $USACAN_DST=1; return 1; + } + } else { + if ($dow == 0 && $ns < 7200) { + $USACAN_DST=0; return 0; + } else { + $USACAN_DST=1; return 1; + } + } + } else { + $USACAN_DST=0; return 0; + } + } elsif ($mm == 11) { + if ($dd > 7) { + $USACAN_DST=0; return 0; + } elsif ($dd < ($dow+1)) { + $USACAN_DST=1; return 1; + } elsif ($dow == 0) { + if ($timezone) { # UTC calculations + if ($ns < (7200+($timezone-1)*3600)) { + $USACAN_DST=1; return 1; + } else { + $USACAN_DST=0; return 0; + } + } else { # local time calculations + if ($ns < 7200) { + $USACAN_DST=1; return 1; + } else { + $USACAN_DST=0; return 0; + } + } + } else { + $USACAN_DST=0; return 0; + } + } # end of month checks +} # end of subroutine dstcalc + + + + +sub NA_dstcalc { +#********************************************************************** +# FSA-LSO +# This is returns 1 if Daylight Savings Time is in effect and 0 if +# Standard time is in effect. +# Based on first Sunday in April and last Sunday in October at 2 am. +#********************************************************************** + + $NA_DST=0; + $mm = $mon; + $dd = $mday; + $ns = $dsec; + $dow= $wday; + + if ($mm < 4 || $mm > 10) { + $NA_DST=0; return 0; + } elsif ($mm >= 5 && $mm <= 9) { + $NA_DST=1; return 1; + } elsif ($mm == 4) { + if ($dd > 7) { + $NA_DST=1; return 1; + } elsif ($dd >= ($dow+1)) { + if ($timezone) { + if ($dow == 0 && $ns < (7200+$timezone*3600)) { + $NA_DST=0; return 0; + } else { + $NA_DST=1; return 1; + } + } else { + if ($dow == 0 && $ns < 7200) { + $NA_DST=0; return 0; + } else { + $NA_DST=1; return 1; + } + } + } else { + $NA_DST=0; return 0; + } + } elsif ($mm == 10) { + if ($dd < 25) { + $NA_DST=1; return 1; + } elsif ($dd < ($dow+25)) { + $NA_DST=1; return 1; + } elsif ($dow == 0) { + if ($timezone) { # UTC calculations + if ($ns < (7200+($timezone-1)*3600)) { + $NA_DST=1; return 1; + } else { + $NA_DST=0; return 0; + } + } else { # local time calculations + if ($ns < 7200) { + $NA_DST=1; return 1; + } else { + $NA_DST=0; return 0; + } + } + } else { + $NA_DST=0; return 0; + } + } # end of month checks +} # end of subroutine dstcalc + + + + +sub GBR_dstcalc { +#********************************************************************** +# LSM-LSO +# This is returns 1 if Daylight Savings Time is in effect and 0 if +# Standard time is in effect. +# Based on last Sunday in March and last Sunday in October at 1 am. +#********************************************************************** + + $GBR_DST=0; + $mm = $mon; + $dd = $mday; + $ns = $dsec; + $dow= $wday; + + if ($mm < 3 || $mm > 10) { + $GBR_DST=0; return 0; + } elsif ($mm >= 4 && $mm <= 9) { + $GBR_DST=1; return 1; + } elsif ($mm == 3) { + if ($dd < 25) { + $GBR_DST=0; return 0; + } elsif ($dd < ($dow+25)) { + $GBR_DST=0; return 0; + } elsif ($dow == 0) { + if ($timezone) { # UTC calculations + if ($ns < (3600+($timezone-1)*3600)) { + $GBR_DST=0; return 0; + } else { + $GBR_DST=1; return 1; + } + } else { # local time calculations + if ($ns < 3600) { + $GBR_DST=0; return 0; + } else { + $GBR_DST=1; return 1; + } + } + } else { + $GBR_DST=1; return 1; + } + } elsif ($mm == 10) { + if ($dd < 25) { + $GBR_DST=1; return 1; + } elsif ($dd < ($dow+25)) { + $GBR_DST=1; return 1; + } elsif ($dow == 0) { + if ($timezone) { # UTC calculations + if ($ns < (3600+($timezone-1)*3600)) { + $GBR_DST=1; return 1; + } else { + $GBR_DST=0; return 0; + } + } else { # local time calculations + if ($ns < 3600) { + $GBR_DST=1; return 1; + } else { + $GBR_DST=0; return 0; + } + } + } else { + $GBR_DST=0; return 0; + } + } # end of month checks +} # end of subroutine dstcalc + + + + +sub AUS_dstcalc { +#********************************************************************** +# LSO-LSM +# This is returns 1 if Daylight Savings Time is in effect and 0 if +# Standard time is in effect. +# Based on last Sunday in October and last Sunday in March at 1 am. +#********************************************************************** + + $AUS_DST=0; + $mm = $mon; + $dd = $mday; + $ns = $dsec; + $dow= $wday; + + if ($mm < 3 || $mm > 10) { + $AUS_DST=1; return 1; + } elsif ($mm >= 4 && $mm <= 9) { + $AUS_DST=0; return 0; + } elsif ($mm == 3) { + if ($dd < 25) { + $AUS_DST=1; return 1; + } elsif ($dd < ($dow+25)) { + $AUS_DST=1; return 1; + } elsif ($dow == 0) { + if ($timezone) { # UTC calculations + if ($ns < (3600+($timezone-1)*3600)) { + $AUS_DST=1; return 1; + } else { + $AUS_DST=0; return 0; + } + } else { # local time calculations + if ($ns < 3600) { + $AUS_DST=1; return 1; + } else { + $AUS_DST=0; return 0; + } + } + } else { + $AUS_DST=0; return 0; + } + } elsif ($mm == 10) { + if ($dd < 25) { + $AUS_DST=0; return 0; + } elsif ($dd < ($dow+25)) { + $AUS_DST=0; return 0; + } elsif ($dow == 0) { + if ($timezone) { # UTC calculations + if ($ns < (3600+($timezone-1)*3600)) { + $AUS_DST=0; return 0; + } else { + $AUS_DST=1; return 1; + } + } else { # local time calculations + if ($ns < 3600) { + $AUS_DST=0; return 0; + } else { + $AUS_DST=1; return 1; + } + } + } else { + $AUS_DST=1; return 1; + } + } # end of month checks +} # end of subroutine dstcalc + + + + + +sub AUST_dstcalc { +#********************************************************************** +# FSO-LSM +# TASMANIA ONLY +# This is returns 1 if Daylight Savings Time is in effect and 0 if +# Standard time is in effect. +# Based on first Sunday in October and last Sunday in March at 1 am. +#********************************************************************** + + $AUST_DST=0; + $mm = $mon; + $dd = $mday; + $ns = $dsec; + $dow= $wday; + + if ($mm < 3 || $mm > 10) { + $AUST_DST=1; return 1; + } elsif ($mm >= 4 && $mm <= 9) { + $AUST_DST=0; return 0; + } elsif ($mm == 3) { + if ($dd < 25) { + $AUST_DST=1; return 1; + } elsif ($dd < ($dow+25)) { + $AUST_DST=1; return 1; + } elsif ($dow == 0) { + if ($timezone) { # UTC calculations + if ($ns < (3600+($timezone-1)*3600)) { + $AUST_DST=1; return 1; + } else { + $AUST_DST=0; return 0; + } + } else { # local time calculations + if ($ns < 3600) { + $AUST_DST=1; return 1; + } else { + $AUST_DST=0; return 0; + } + } + } else { + $AUST_DST=0; return 0; + } + } elsif ($mm == 10) { + if ($dd >= 8) { + $AUST_DST=1; return 1; + } elsif ($dd >= ($dow+1)) { + if ($timezone) { + if ($dow == 0 && $ns < (7200+$timezone*3600)) { + $AUST_DST=0; return 0; + } else { + $AUST_DST=1; return 1; + } + } else { + if ($dow == 0 && $ns < 3600) { + $AUST_DST=0; return 0; + } else { + $AUST_DST=1; return 1; + } + } + } else { + $AUST_DST=0; return 0; + } + } # end of month checks +} # end of subroutine dstcalc + + + + + +sub NZL_dstcalc { +#********************************************************************** +# FSO-TSM +# This is returns 1 if Daylight Savings Time is in effect and 0 if +# Standard time is in effect. +# Based on first Sunday in October and third Sunday in March at 1 am. +#********************************************************************** + + $NZL_DST=0; + $mm = $mon; + $dd = $mday; + $ns = $dsec; + $dow= $wday; + + if ($mm < 3 || $mm > 10) { + $NZL_DST=1; return 1; + } elsif ($mm >= 4 && $mm <= 9) { + $NZL_DST=0; return 0; + } elsif ($mm == 3) { + if ($dd < 14) { + $NZL_DST=1; return 1; + } elsif ($dd < ($dow+14)) { + $NZL_DST=1; return 1; + } elsif ($dow == 0) { + if ($timezone) { # UTC calculations + if ($ns < (3600+($timezone-1)*3600)) { + $NZL_DST=1; return 1; + } else { + $NZL_DST=0; return 0; + } + } else { # local time calculations + if ($ns < 3600) { + $NZL_DST=1; return 1; + } else { + $NZL_DST=0; return 0; + } + } + } else { + $NZL_DST=0; return 0; + } + } elsif ($mm == 10) { + if ($dd >= 8) { + $NZL_DST=1; return 1; + } elsif ($dd >= ($dow+1)) { + if ($timezone) { + if ($dow == 0 && $ns < (7200+$timezone*3600)) { + $NZL_DST=0; return 0; + } else { + $NZL_DST=1; return 1; + } + } else { + if ($dow == 0 && $ns < 3600) { + $NZL_DST=0; return 0; + } else { + $NZL_DST=1; return 1; + } + } + } else { + $NZL_DST=0; return 0; + } + } # end of month checks +} # end of subroutine dstcalc + + + + +sub BZL_dstcalc { +#********************************************************************** +# TSO-LSF +# This is returns 1 if Daylight Savings Time is in effect and 0 if +# Standard time is in effect. Brazil +# Based on Third Sunday October to Last Sunday February at 1 am. +#********************************************************************** + + $BZL_DST=0; + $mm = $mon; + $dd = $mday; + $ns = $dsec; + $dow= $wday; + + if ($mm < 2 || $mm > 10) { + $BZL_DST=1; return 1; + } elsif ($mm >= 3 && $mm <= 9) { + $BZL_DST=0; return 0; + } elsif ($mm == 2) { + if ($dd < 22) { + $BZL_DST=1; return 1; + } elsif ($dd < ($dow+22)) { + $BZL_DST=1; return 1; + } elsif ($dow == 0) { + if ($timezone) { # UTC calculations + if ($ns < (3600+($timezone-1)*3600)) { + $BZL_DST=1; return 1; + } else { + $BZL_DST=0; return 0; + } + } else { # local time calculations + if ($ns < 3600) { + $BZL_DST=1; return 1; + } else { + $BZL_DST=0; return 0; + } + } + } else { + $BZL_DST=0; return 0; + } + } elsif ($mm == 10) { + if ($dd < 22) { + $BZL_DST=0; return 0; + } elsif ($dd < ($dow+22)) { + $BZL_DST=0; return 0; + } elsif ($dow == 0) { + if ($timezone) { # UTC calculations + if ($ns < (3600+($timezone-1)*3600)) { + $BZL_DST=0; return 0; + } else { + $BZL_DST=1; return 1; + } + } else { # local time calculations + if ($ns < 3600) { + $BZL_DST=0; return 0; + } else { + $BZL_DST=1; return 1; + } + } + } else { + $BZL_DST=1; return 1; + } + } # end of month checks +} # end of subroutine dstcalc diff --git a/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_it/new_listloader_superL.php b/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_it/new_listloader_superL.php new file mode 100644 index 00000000..1d0bbf1c --- /dev/null +++ b/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_it/new_listloader_superL.php @@ -0,0 +1,2092 @@ + LICENSE: GPLv2 +# +# AST GUI lead loader from formatted file +# +# CHANGES +# 50602-1640 - First version created by Joe Johnson +# 51128-1108 - Removed PHP global vars requirement +# 60113-1603 - Fixed a few bugs in Excel import +# 60421-1624 - check GET/POST vars lines with isset to not trigger PHP NOTICES +# 60616-1240 - added listID override +# 60616-1604 - added gmt lookup for each lead +# 60619-1651 - Added variable filtering to eliminate SQL injection attack threat +# 60822-1121 - fixed for nonwritable directories +# 60906-1100 - added filter of non-digits in alt_phone field +# 61110-1222 - added new USA-Canada DST scheme and Brazil DST scheme +# 61128-1149 - added postal code GMT lookup and duplicate check options +# 70417-1059 - Fixed default phone_code bug +# 70510-1518 - Added campaign and system duplicate check and phonecode override +# 80428-0417 - UTF8 changes +# +# 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.4-24'; +$build = '80428-0417'; + + +require("dbconnect.php"); + +### links used for testing +#$link=mysql_connect("10.10.10.15", "cron", "1234"); +#mysql_select_db("asterisk"); +#$WeBServeRRooT = '/home/www/htdocs'; + +$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; +$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; +$PHP_SELF=$_SERVER['PHP_SELF']; +$leadfile=$_FILES["leadfile"]; + $LF_orig = $_FILES['leadfile']['name']; + $LF_path = $_FILES['leadfile']['tmp_name']; +if (isset($_GET["submit_file"])) {$submit_file=$_GET["submit_file"];} + elseif (isset($_POST["submit_file"])) {$submit_file=$_POST["submit_file"];} +if (isset($_GET["submit"])) {$submit=$_GET["submit"];} + elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];} +if (isset($_GET["INVIA"])) {$INVIA=$_GET["INVIA"];} + elseif (isset($_POST["INVIA"])) {$INVIA=$_POST["INVIA"];} +if (isset($_GET["leadfile_name"])) {$leadfile_name=$_GET["leadfile_name"];} + elseif (isset($_POST["leadfile_name"])) {$leadfile_name=$_POST["leadfile_name"];} +if (isset($_GET["file_layout"])) {$file_layout=$_GET["file_layout"];} + elseif (isset($_POST["file_layout"])) {$file_layout=$_POST["file_layout"];} +if (isset($_GET["OK_to_process"])) {$OK_to_process=$_GET["OK_to_process"];} + elseif (isset($_POST["OK_to_process"])) {$OK_to_process=$_POST["OK_to_process"];} +if (isset($_GET["vendor_lead_code_field"])) {$vendor_lead_code_field=$_GET["vendor_lead_code_field"];} + elseif (isset($_POST["vendor_lead_code_field"])) {$vendor_lead_code_field=$_POST["vendor_lead_code_field"];} +if (isset($_GET["source_id_field"])) {$source_id_field=$_GET["source_id_field"];} + elseif (isset($_POST["source_id_field"])) {$source_id_field=$_POST["source_id_field"];} +if (isset($_GET["list_id_field"])) {$list_id_field=$_GET["list_id_field"];} + elseif (isset($_POST["list_id_field"])) {$list_id_field=$_POST["list_id_field"];} +if (isset($_GET["phone_code_field"])) {$phone_code_field=$_GET["phone_code_field"];} + elseif (isset($_POST["phone_code_field"])) {$phone_code_field=$_POST["phone_code_field"];} +if (isset($_GET["phone_number_field"])) {$phone_number_field=$_GET["phone_number_field"];} + elseif (isset($_POST["phone_number_field"])) {$phone_number_field=$_POST["phone_number_field"];} +if (isset($_GET["title_field"])) {$title_field=$_GET["title_field"];} + elseif (isset($_POST["title_field"])) {$title_field=$_POST["title_field"];} +if (isset($_GET["first_name_field"])) {$first_name_field=$_GET["first_name_field"];} + elseif (isset($_POST["first_name_field"])) {$first_name_field=$_POST["first_name_field"];} +if (isset($_GET["middle_initial_field"])) {$middle_initial_field=$_GET["middle_initial_field"];} + elseif (isset($_POST["middle_initial_field"])) {$middle_initial_field=$_POST["middle_initial_field"];} +if (isset($_GET["last_name_field"])) {$last_name_field=$_GET["last_name_field"];} + elseif (isset($_POST["last_name_field"])) {$last_name_field=$_POST["last_name_field"];} +if (isset($_GET["address1_field"])) {$address1_field=$_GET["address1_field"];} + elseif (isset($_POST["address1_field"])) {$address1_field=$_POST["address1_field"];} +if (isset($_GET["address2_field"])) {$address2_field=$_GET["address2_field"];} + elseif (isset($_POST["address2_field"])) {$address2_field=$_POST["address2_field"];} +if (isset($_GET["address3_field"])) {$address3_field=$_GET["address3_field"];} + elseif (isset($_POST["address3_field"])) {$address3_field=$_POST["address3_field"];} +if (isset($_GET["city_field"])) {$city_field=$_GET["city_field"];} + elseif (isset($_POST["city_field"])) {$city_field=$_POST["city_field"];} +if (isset($_GET["state_field"])) {$state_field=$_GET["state_field"];} + elseif (isset($_POST["state_field"])) {$state_field=$_POST["state_field"];} +if (isset($_GET["province_field"])) {$province_field=$_GET["province_field"];} + elseif (isset($_POST["province_field"])) {$province_field=$_POST["province_field"];} +if (isset($_GET["postal_code_field"])) {$postal_code_field=$_GET["postal_code_field"];} + elseif (isset($_POST["postal_code_field"])) {$postal_code_field=$_POST["postal_code_field"];} +if (isset($_GET["country_code_field"])) {$country_code_field=$_GET["country_code_field"];} + elseif (isset($_POST["country_code_field"])) {$country_code_field=$_POST["country_code_field"];} +if (isset($_GET["gender_field"])) {$gender_field=$_GET["gender_field"];} + elseif (isset($_POST["gender_field"])) {$gender_field=$_POST["gender_field"];} +if (isset($_GET["date_of_birth_field"])) {$date_of_birth_field=$_GET["date_of_birth_field"];} + elseif (isset($_POST["date_of_birth_field"])) {$date_of_birth_field=$_POST["date_of_birth_field"];} +if (isset($_GET["alt_phone_field"])) {$alt_phone_field=$_GET["alt_phone_field"];} + elseif (isset($_POST["alt_phone_field"])) {$alt_phone_field=$_POST["alt_phone_field"];} +if (isset($_GET["email_field"])) {$email_field=$_GET["email_field"];} + elseif (isset($_POST["email_field"])) {$email_field=$_POST["email_field"];} +if (isset($_GET["security_phrase_field"])) {$security_phrase_field=$_GET["security_phrase_field"];} + elseif (isset($_POST["security_phrase_field"])) {$security_phrase_field=$_POST["security_phrase_field"];} +if (isset($_GET["comments_field"])) {$comments_field=$_GET["comments_field"];} + elseif (isset($_POST["comments_field"])) {$comments_field=$_POST["comments_field"];} +if (isset($_GET["list_id_override"])) {$list_id_override=$_GET["list_id_override"];} + elseif (isset($_POST["list_id_override"])) {$list_id_override=$_POST["list_id_override"];} + $list_id_override = (preg_replace("/\D/","",$list_id_override)); +if (isset($_GET["lead_file"])) {$lead_file=$_GET["lead_file"];} + elseif (isset($_POST["lead_file"])) {$lead_file=$_POST["lead_file"];} +if (isset($_GET["dupcheck"])) {$dupcheck=$_GET["dupcheck"];} + elseif (isset($_POST["dupcheck"])) {$dupcheck=$_POST["dupcheck"];} +if (isset($_GET["postalgmt"])) {$postalgmt=$_GET["postalgmt"];} + elseif (isset($_POST["postalgmt"])) {$postalgmt=$_POST["postalgmt"];} +if (isset($_GET["phone_code_override"])) {$phone_code_override=$_GET["phone_code_override"];} + elseif (isset($_POST["phone_code_override"])) {$phone_code_override=$_POST["phone_code_override"];} + $phone_code_override = (preg_replace("/\D/","",$phone_code_override)); + +# $country_field=$_GET["country_field"]; if (!$country_field) {$country_field=$_POST["country_field"];} + + +############################################# +##### START SYSTEM_SETTINGS LOOKUP ##### +$stmt = "SELECT use_non_latin FROM system_settings;"; +$rslt=mysql_query($stmt, $link); +if ($DB) {echo "$stmt\n";} +$qm_conf_ct = mysql_num_rows($rslt); +$i=0; +while ($i < $qm_conf_ct) + { + $row=mysql_fetch_row($rslt); + $non_latin = $row[0]; + $i++; + } +##### END SETTINGS LOOKUP ##### +########################################### + +if ($non_latin < 1) +{ +$PHP_AUTH_USER = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_USER); +$PHP_AUTH_PW = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_PW); +$list_id_override = ereg_replace("[^0-9]","",$list_id_override); +} + +$STARTtime = date("U"); +$TODAY = date("Y-m-d"); +$NOW_TIME = date("Y-m-d H:i:s"); +$FILE_datetime = $STARTtime; + +$stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 7;"; +if ($DB) {echo "|$stmt|\n";} +if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} +$rslt=mysql_query($stmt, $link); +$row=mysql_fetch_row($rslt); +$auth=$row[0]; + +if ($WeBRooTWritablE > 0) {$fp = fopen ("./project_auth_entries.txt", "a");} +$date = date("r"); +$ip = getenv("REMOTE_ADDR"); +$browser = getenv("HTTP_USER_AGENT"); + + if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or (!$auth)) + { + Header("WWW-Authenticate: Basic realm=\"VICIDIAL-LEAD-LOADER\""); + Header("HTTP/1.0 401 Unauthorized"); + echo "Username/Password non validi: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n"; + exit; + } + else + { + header ("Content-type: text/html; charset=utf-8"); + header ("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1 + header ("Pragma: no-cache"); // HTTP/1.0 + + if($auth>0) + { + $office_no=strtoupper($PHP_AUTH_USER); + $password=strtoupper($PHP_AUTH_PW); + $stmt="SELECT load_leads from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW'"; + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + $LOGload_leads =$row[0]; + + if ($LOGload_leads < 1) + { + echo "You do not have permissions to load leads\n"; + exit; + } + if ($WeBRooTWritablE > 0) + { + fwrite ($fp, "LIST_LOAD|GOOD|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|$LOGfullname|\n"); + fclose($fp); + } + } + else + { + if ($WeBRooTWritablE > 0) + { + fwrite ($fp, "LIST_LOAD|FAIL|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|\n"); + fclose($fp); + } + } + } + + +$script_name = getenv("SCRIPT_NAME"); +$server_name = getenv("SERVER_NAME"); +$server_port = getenv("SERVER_PORT"); +if (eregi("443",$server_port)) {$HTTPprotocol = 'https://';} + else {$HTTPprotocol = 'http://';} +$admDIR = "$HTTPprotocol$server_name$script_name"; +$admDIR = eregi_replace('new_listloader_superL.php','',$admDIR); +$admSCR = 'admin.php'; +$NWB = "   \"AIUTO\""; + +$secX = date("U"); +$hour = date("H"); +$min = date("i"); +$sec = date("s"); +$mon = date("m"); +$mday = date("d"); +$year = date("Y"); +$isdst = date("I"); +$Shour = date("H"); +$Smin = date("i"); +$Ssec = date("s"); +$Smon = date("m"); +$Smday = date("d"); +$Syear = date("Y"); +$pulldate0 = "$year-$mon-$mday $hour:$min:$sec"; +$inSD = $pulldate0; +$dsec = ( ( ($hour * 3600) + ($min * 60) ) + $sec ); + + ### Grab Server GMT value from the database + $stmt="SELECT local_gmt FROM servers where server_ip = '$server_ip';"; + $rslt=mysql_query($stmt, $link); + $gmt_recs = mysql_num_rows($rslt); + if ($gmt_recs > 0) + { + $row=mysql_fetch_row($rslt); + $DBSERVER_GMT = "$row[0]"; + if (strlen($DBSERVER_GMT)>0) {$SERVER_GMT = $DBSERVER_GMT;} + if ($isdst) {$SERVER_GMT++;} + } + else + { + $SERVER_GMT = date("O"); + $SERVER_GMT = eregi_replace("\+","",$SERVER_GMT); + $SERVER_GMT = ($SERVER_GMT + 0); + $SERVER_GMT = ($SERVER_GMT / 100); + } + + $LOCAL_GMT_OFF = $SERVER_GMT; + $LOCAL_GMT_OFF_STD = $SERVER_GMT; + +#if ($DB) {print "SEED TIME $secX : $year-$mon-$mday $hour:$min:$sec LOCAL GMT OFFSET NOW: $LOCAL_GMT_OFF\n";} + + +echo "\n"; +echo "\n"; +echo "\n"; +echo "\n"; + +function macfontfix($fontsize) { + + $browser = getenv("HTTP_USER_AGENT"); + $pctype = explode("(", $browser); + if (ereg("Mac",$pctype[1])) { + /* Browser is a Mac. If not Netscape 6, raise fonts */ + + $blownbrowser = explode('/', $browser); + $ver = explode(' ', $blownbrowser[1]); + $ver = $ver[0]; + if ($ver >= 5.0) return $fontsize; else return ($fontsize+2); + + } else return $fontsize; /* Browser is not a Mac - don't touch fonts */ +} + +echo "\n"; + +?> + + + +VICIDIAL ADMIN: Lead Loader + + +
method=post onSubmit="ParseFileName()" enctype="multipart/form-data"> + + +
\n"; + echo ""; + + $stmt="SELECT * from conferences order by conf_exten"; + $rslt=mysql_query($stmt, $link); + $phones_to_print = mysql_num_rows($rslt); + +echo "
ELENCO CONFERENZE:\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]  MODIFICA
\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 "
ELENCO CONFERENZE:\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]  MODIFICA
\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: Statistiche e Report + VICIDIAL: Statistiche e Report

+ +

+	
+	 $o)
+		{
+		echo "\n";
+		echo "\n";
+		echo "\n";
+		echo "\n";
+		echo "\n";
+		echo "\n";
+		echo "\n";
+		echo "\n";
+		echo "\n";
+		$o++;
+		}
+
+	echo "
SERVERDESCRIZIONEINDIRIZZO IPATTIVOVDAD timePARK timeCLOSER/INBOUND time
$server_id[$o]$server_description[$o]$server_ip[$o]$active[$o]LINKLINKLINK
\n"; + } + else + { + echo "Non hai l`autorizzazione per accedere a questa pagina\n"; + exit; + } +} + + + + + +echo "
\n"; + +$ENDtime = date("U"); + +$RUNtime = ($ENDtime - $STARTtime); + +echo "\n\n\n


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


\nTempo Esecuzione Script: $RUNtime seconds"; +echo "                   VERSIONE: $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 ora locale + { + 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 ora locale + { + 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 ora locale + { + 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 ora locale + { + 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 ora locale + { + 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 ora locale + { + 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 ora locale + { + 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 ora locale + { + 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 ora locale + { + 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 ora locale + { + 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 ora locale + { + 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 ora locale + { + 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 ora locale + { + 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 ora locale + { + 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 "Questa campagna ha $active_leads contatti da chiamare in queste liste\n"; + } + else + { + echo "nessun esito di chiamata selezionato per questa campagna\n"; + } + } + else + { + echo "nessuna lista attiva selezionata per questa campagna\n"; + } + } +else + { + echo "nessuna lista attiva selezionata per questa campagna\n"; + } +##### END calculate what gmt_offset_now values are within the allowed local_call_time setting ### +} +?> diff --git a/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_it/admin_modify_lead.php b/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_it/admin_modify_lead.php new file mode 100644 index 00000000..74ef5501 --- /dev/null +++ b/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_it/admin_modify_lead.php @@ -0,0 +1,622 @@ + LICENSE: GPLv2 +# +# CHANGES +# +# 60419-1705 - Added ability to change lead callback record from USERONLY to ANYONE or USERONLY-user +# 60421-1459 - check GET/POST vars lines with isset to not trigger PHP NOTICES +# 60609-1112 - Added DNC list addition if status changed to DNC +# 60619-1539 - Added variable filtering to eliminate SQL injection attack threat +# 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 +# 70424-1128 - Added campaign-specific statuses, reformatted recordings list +# 70702-1259 - Added recording location link and truncation +# 70906-2132 - Added closer_log records display +# 80428-0144 - UTF8 cleanup +# + +require("dbconnect.php"); + +$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; +$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; +$PHP_SELF=$_SERVER['PHP_SELF']; +if (isset($_GET["vendor_id"])) {$vendor_id=$_GET["vendor_id"];} + elseif (isset($_POST["vendor_id"])) {$vendor_id=$_POST["vendor_id"];} +if (isset($_GET["phone"])) {$phone=$_GET["phone"];} + elseif (isset($_POST["phone"])) {$phone=$_POST["phone"];} +if (isset($_GET["lead_id"])) {$lead_id=$_GET["lead_id"];} + elseif (isset($_POST["lead_id"])) {$lead_id=$_POST["lead_id"];} +if (isset($_GET["first_name"])) {$first_name=$_GET["first_name"];} + elseif (isset($_POST["first_name"])) {$first_name=$_POST["first_name"];} +if (isset($_GET["last_name"])) {$last_name=$_GET["last_name"];} + elseif (isset($_POST["last_name"])) {$last_name=$_POST["last_name"];} +if (isset($_GET["phone_number"])) {$phone_number=$_GET["phone_number"];} + elseif (isset($_POST["phone_number"])) {$phone_number=$_POST["phone_number"];} +if (isset($_GET["end_call"])) {$end_call=$_GET["end_call"];} + elseif (isset($_POST["end_call"])) {$end_call=$_POST["end_call"];} +if (isset($_GET["DB"])) {$DB=$_GET["DB"];} + elseif (isset($_POST["DB"])) {$DB=$_POST["DB"];} +if (isset($_GET["dispo"])) {$dispo=$_GET["dispo"];} + elseif (isset($_POST["dispo"])) {$dispo=$_POST["dispo"];} +if (isset($_GET["list_id"])) {$list_id=$_GET["list_id"];} + elseif (isset($_POST["list_id"])) {$list_id=$_POST["list_id"];} +if (isset($_GET["campaign_id"])) {$campaign_id=$_GET["campaign_id"];} + elseif (isset($_POST["campaign_id"])) {$campaign_id=$_POST["campaign_id"];} +if (isset($_GET["phone_code"])) {$phone_code=$_GET["phone_code"];} + elseif (isset($_POST["phone_code"])) {$phone_code=$_POST["phone_code"];} +if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} + elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} +if (isset($_GET["extension"])) {$extension=$_GET["extension"];} + elseif (isset($_POST["extension"])) {$extension=$_POST["extension"];} +if (isset($_GET["channel"])) {$channel=$_GET["channel"];} + elseif (isset($_POST["channel"])) {$channel=$_POST["channel"];} +if (isset($_GET["call_began"])) {$call_began=$_GET["call_began"];} + elseif (isset($_POST["call_began"])) {$call_began=$_POST["call_began"];} +if (isset($_GET["parked_time"])) {$parked_time=$_GET["parked_time"];} + elseif (isset($_POST["parked_time"])) {$parked_time=$_POST["parked_time"];} +if (isset($_GET["tsr"])) {$tsr=$_GET["tsr"];} + elseif (isset($_POST["tsr"])) {$tsr=$_POST["tsr"];} +if (isset($_GET["address1"])) {$address1=$_GET["address1"];} + elseif (isset($_POST["address1"])) {$address1=$_POST["address1"];} +if (isset($_GET["address2"])) {$address2=$_GET["address2"];} + elseif (isset($_POST["address2"])) {$address2=$_POST["address2"];} +if (isset($_GET["address3"])) {$address3=$_GET["address3"];} + elseif (isset($_POST["address3"])) {$address3=$_POST["address3"];} +if (isset($_GET["city"])) {$city=$_GET["city"];} + elseif (isset($_POST["city"])) {$city=$_POST["city"];} +if (isset($_GET["state"])) {$state=$_GET["state"];} + elseif (isset($_POST["state"])) {$state=$_POST["state"];} +if (isset($_GET["postal_code"])) {$postal_code=$_GET["postal_code"];} + elseif (isset($_POST["postal_code"])) {$postal_code=$_POST["postal_code"];} +if (isset($_GET["province"])) {$province=$_GET["province"];} + elseif (isset($_POST["province"])) {$province=$_POST["province"];} +if (isset($_GET["country_code"])) {$country_code=$_GET["country_code"];} + elseif (isset($_POST["country_code"])) {$country_code=$_POST["country_code"];} +if (isset($_GET["alt_phone"])) {$alt_phone=$_GET["alt_phone"];} + elseif (isset($_POST["alt_phone"])) {$alt_phone=$_POST["alt_phone"];} +if (isset($_GET["email"])) {$email=$_GET["email"];} + elseif (isset($_POST["email"])) {$email=$_POST["email"];} +if (isset($_GET["security"])) {$security=$_GET["security"];} + elseif (isset($_POST["security"])) {$security=$_POST["security"];} +if (isset($_GET["comments"])) {$comments=$_GET["comments"];} + elseif (isset($_POST["comments"])) {$comments=$_POST["comments"];} +if (isset($_GET["status"])) {$status=$_GET["status"];} + elseif (isset($_POST["status"])) {$status=$_POST["status"];} +if (isset($_GET["submit"])) {$submit=$_GET["submit"];} + elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];} +if (isset($_GET["INVIA"])) {$INVIA=$_GET["INVIA"];} + elseif (isset($_POST["INVIA"])) {$INVIA=$_POST["INVIA"];} +if (isset($_GET["CBchangeUSERtoANY"])) {$CBchangeUSERtoANY=$_GET["CBchangeUSERtoANY"];} + elseif (isset($_POST["CBchangeUSERtoANY"])) {$CBchangeUSERtoANY=$_POST["CBchangeUSERtoANY"];} +if (isset($_GET["CBchangeUSERtoUSER"])) {$CBchangeUSERtoUSER=$_GET["CBchangeUSERtoUSER"];} + elseif (isset($_POST["CBchangeUSERtoUSER"])) {$CBchangeUSERtoUSER=$_POST["CBchangeUSERtoUSER"];} +if (isset($_GET["CBchangeANYtoUSER"])) {$CBchangeANYtoUSER=$_GET["CBchangeANYtoUSER"];} + elseif (isset($_POST["CBchangeANYtoUSER"])) {$CBchangeANYtoUSER=$_POST["CBchangeANYtoUSER"];} +if (isset($_GET["callback_id"])) {$callback_id=$_GET["callback_id"];} + elseif (isset($_POST["callback_id"])) {$callback_id=$_POST["callback_id"];} +if (isset($_GET["CBuser"])) {$CBuser=$_GET["CBuser"];} + elseif (isset($_POST["CBuser"])) {$CBuser=$_POST["CBuser"];} +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); +$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"); + +############################################# +##### START SYSTEM_SETTINGS LOOKUP ##### +$stmt = "SELECT use_non_latin FROM system_settings;"; +$rslt=mysql_query($stmt, $link); +if ($DB) {echo "$stmt\n";} +$qm_conf_ct = mysql_num_rows($rslt); +$i=0; +while ($i < $qm_conf_ct) + { + $row=mysql_fetch_row($rslt); + $non_latin = $row[0]; + $i++; + } +##### END SETTINGS LOOKUP ##### +########################################### + +$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";} +if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} +$rslt=mysql_query($stmt, $link); +$row=mysql_fetch_row($rslt); +$auth=$row[0]; + +if ($WeBRooTWritablE > 0) + {$fp = fopen ("./project_auth_entries.txt", "a");} + +$date = date("r"); +$ip = getenv("REMOTE_ADDR"); +$browser = getenv("HTTP_USER_AGENT"); + + if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or (!$auth)) + { + Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\""); + Header("HTTP/1.0 401 Unauthorized"); + echo "Username/Password non validi: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n"; + exit; + } + else + { + + if($auth>0) + { + $stmt="SELECT full_name,modify_leads from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW'"; + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + $LOGfullname =$row[0]; + $LOGmodify_leads =$row[1]; + + if ($WeBRooTWritablE > 0) + { + fwrite ($fp, "VICIDIAL|GOOD|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|$LOGfullname|\n"); + fclose($fp); + } + } + else + { + if ($WeBRooTWritablE > 0) + { + fwrite ($fp, "VICIDIAL|FAIL|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|\n"); + fclose($fp); + } + } + } + +?> + + + +VICIDIAL ADMIN: Registro del Lead modificado + + +
+VICIDIAL ADMIN: Registro del Lead modificado
\n"; + +if ($end_call > 0) +{ + +$call_length = ($STARTtime - $call_began); + + ### insert a NEW record to the vicidial_closer_log table + $stmt="INSERT INTO vicidial_closer_log (lead_id,list_id,campaign_id,call_date,start_epoch,end_epoch,length_in_sec,status,phone_code,phone_number,user,comments,processed) values('" . mysql_real_escape_string($lead_id) . "','" . mysql_real_escape_string($list_id) . "','" . mysql_real_escape_string($campaign_id) . "','" . mysql_real_escape_string($parked_time) . "','" . mysql_real_escape_string($call_began) . "','$STARTtime','" . mysql_real_escape_string($call_length) . "','" . mysql_real_escape_string($status) . "','" . mysql_real_escape_string($phone_code) . "','" . mysql_real_escape_string($phone_number) . "','$PHP_AUTH_USER','" . mysql_real_escape_string($comments) . "','Y')"; + if ($DB) {echo "|$stmt|\n";} + $rslt=mysql_query($stmt, $link); + + ### update the lead record in the vicidial_list table + $stmt="UPDATE vicidial_list set status='" . mysql_real_escape_string($status) . "',first_name='" . mysql_real_escape_string($first_name) . "',last_name='" . mysql_real_escape_string($last_name) . "',address1='" . mysql_real_escape_string($address1) . "',address2='" . mysql_real_escape_string($address2) . "',address3='" . mysql_real_escape_string($address3) . "',city='" . mysql_real_escape_string($city) . "',state='" . mysql_real_escape_string($state) . "',province='" . mysql_real_escape_string($province) . "',postal_code='" . mysql_real_escape_string($postal_code) . "',country_code='" . mysql_real_escape_string($country_code) . "',alt_phone='" . mysql_real_escape_string($alt_phone) . "',email='" . mysql_real_escape_string($email) . "',security_phrase='" . mysql_real_escape_string($security) . "',comments='" . mysql_real_escape_string($comments) . "' where lead_id='" . mysql_real_escape_string($lead_id) . "'"; + if ($DB) {echo "|$stmt|\n";} + $rslt=mysql_query($stmt, $link); + + echo "informazione modificata

\n"; + echo "\n"; + + if ( ($dispo != $status) and ($dispo == 'CBHOLD') ) + { + ### inactivate vicidial_callbacks record for this lead + $stmt="UPDATE vicidial_callbacks set status='INACTIVE' where lead_id='" . mysql_real_escape_string($lead_id) . "' and status='ACTIVE';"; + if ($DB) {echo "|$stmt|\n";} + $rslt=mysql_query($stmt, $link); + + echo "
vicidial_callback record inactivated: $lead_id
\n"; + } + if ( ($dispo != $status) and ($dispo == 'CALLBK') ) + { + ### inactivate vicidial_callbacks record for this lead + $stmt="UPDATE vicidial_callbacks set status='INACTIVE' where lead_id='" . mysql_real_escape_string($lead_id) . "' and status IN('ACTIVE','LIVE');"; + if ($DB) {echo "|$stmt|\n";} + $rslt=mysql_query($stmt, $link); + + echo "
vicidial_callback record inactivated: $lead_id
\n"; + } + + if ( ($dispo != $status) and ($status == 'DNC') ) + { + ### add lead to the internal DNC list + $stmt="INSERT INTO vicidial_dnc (phone_number) values('" . mysql_real_escape_string($phone_number) . "');"; + if ($DB) {echo "|$stmt|\n";} + $rslt=mysql_query($stmt, $link); + + echo "
Lead added to DNC List: $lead_id - $phone_number
\n"; + } + ### 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 +{ + + if ($CBchangeUSERtoANY == 'YES') + { + ### inactivate vicidial_callbacks record for this lead + $stmt="UPDATE vicidial_callbacks set recipient='ANYONE' where callback_id='" . mysql_real_escape_string($callback_id) . "';"; + if ($DB) {echo "|$stmt|\n";} + $rslt=mysql_query($stmt, $link); + + echo "
vicidial_callback record changed to ANYONE
\n"; + } + if ($CBchangeUSERtoUSER == 'YES') + { + ### inactivate vicidial_callbacks record for this lead + $stmt="UPDATE vicidial_callbacks set user='" . mysql_real_escape_string($CBuser) . "' where callback_id='" . mysql_real_escape_string($callback_id) . "';"; + if ($DB) {echo "|$stmt|\n";} + $rslt=mysql_query($stmt, $link); + + echo "
vicidial_callback record user changed to $CBuser
\n"; + } + if ($CBchangeANYtoUSER == 'YES') + { + ### inactivate vicidial_callbacks record for this lead + $stmt="UPDATE vicidial_callbacks set user='" . mysql_real_escape_string($CBuser) . "',recipient='USERONLY' where callback_id='" . mysql_real_escape_string($callback_id) . "';"; + if ($DB) {echo "|$stmt|\n";} + $rslt=mysql_query($stmt, $link); + + echo "
vicidial_callback record changed to USERONLY, user: $CBuser
\n"; + } + + + + $stmt="SELECT count(*) from vicidial_list where lead_id='" . mysql_real_escape_string($lead_id) . "'"; + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $row=mysql_fetch_row($rslt); + $lead_count = $row[0]; + + if ($lead_count > 0) + { + + $stmt="select * from vicidial_log where lead_id='" . mysql_real_escape_string($lead_id) . "' order by uniqueid desc limit 500;"; + $rslt=mysql_query($stmt, $link); + $logs_to_print = mysql_num_rows($rslt); + + $u=0; + $call_log = ''; + $log_campaign = ''; + while ($logs_to_print > $u) + { + $row=mysql_fetch_row($rslt); + if (strlen($log_campaign)<1) {$log_campaign = $row[3];} + if (eregi("1$|3$|5$|7$|9$", $u)) + {$bgcolor='bgcolor="#B9CBFD"';} + else + {$bgcolor='bgcolor="#9BB9FB"';} + + $u++; + $call_log .= "
"; + $call_log .= ""; + $call_log .= ""; + $call_log .= "\n"; + $call_log .= "\n"; + $call_log .= "\n"; + $call_log .= "\n"; + $call_log .= "\n"; + $call_log .= "\n"; + + } + + $stmt="select * from vicidial_closer_log where lead_id='" . mysql_real_escape_string($lead_id) . "' order by closecallid desc limit 500;"; + $rslt=mysql_query($stmt, $link); + $Clogs_to_print = mysql_num_rows($rslt); + + $y=0; + $closer_log = ''; + $Clog_campaign = ''; + while ($Clogs_to_print > $y) + { + $row=mysql_fetch_row($rslt); + if (strlen($Clog_campaign)<1) {$Clog_campaign = $row[3];} + if (eregi("1$|3$|5$|7$|9$", $y)) + {$bgcolor='bgcolor="#B9CBFD"';} + else + {$bgcolor='bgcolor="#9BB9FB"';} + + $y++; + $closer_log .= ""; + $closer_log .= ""; + $closer_log .= ""; + $closer_log .= "\n"; + $closer_log .= "\n"; + $closer_log .= "\n"; + $closer_log .= "\n"; + $closer_log .= "\n"; + $closer_log .= "\n"; + $closer_log .= "\n"; + + } + + $stmt="SELECT * from vicidial_list where lead_id='" . mysql_real_escape_string($lead_id) . "'"; + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $row=mysql_fetch_row($rslt); + $lead_id = "$row[0]"; + $dispo = "$row[3]"; + $tsr = "$row[4]"; + $vendor_id = "$row[5]"; + $list_id = "$row[7]"; + $campaign_id = "$row[8]"; + $phone_code = "$row[10]"; + $phone_number = "$row[11]"; + $title = "$row[12]"; + $first_name = "$row[13]"; # + $middle_initial = "$row[14]"; + $last_name = "$row[15]"; # + $address1 = "$row[16]"; # + $address2 = "$row[17]"; # + $address3 = "$row[18]"; # + $city = "$row[19]"; # + $state = "$row[20]"; # + $province = "$row[21]"; # + $postal_code = "$row[22]"; # + $country_code = "$row[23]"; # + $gender = "$row[24]"; + $date_of_birth = "$row[25]"; + $alt_phone = "$row[26]"; # + $email = "$row[27]"; # + $security = "$row[28]"; # + $comments = "$row[29]"; # + + echo "
Informazioni Chiamata: $first_name $last_name - $phone_number

\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "
$u$row[4] $row[7] $row[8] $row[11] $row[3] $row[2] $row[1]
$y$row[4] $row[7] $row[8] $row[11] $row[3] $row[2] $row[1]   $row[14]
\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + + + echo "\n"; + + echo "\n"; + echo "
Vendor ID: $vendor_id     Lead ID: $lead_id
Fronter: $tsr     ID Lista: $list_id
Nome:   \n"; + echo " Cognome:
Indirizzo 1 :
Indirizzo 2 :
Indirizzo 3 :
Citta` :
Estado:   \n"; + echo " CAP:
Provincia :
Stato :
Numero Alt :
Email :
Seguridad:
Note :
Esito: (with $log_campaign statuses)
Modify agent and vicidial logs
\n"; + echo "


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

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

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

\n"; + } + } + else + { + echo "
No Callback records found
\n"; + } + } + + + + + + + } + else + { + echo "las operaciones de búsqueda del plomo FALLARON para el lead_id $lead_id       $NOW_TIME\n

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

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

\n"; + +echo "
\n"; + +echo "CHIAMATE VERSO QUESTO CONTATTO:\n"; +echo "\n"; +echo "\n"; + + echo "$call_log\n"; + +echo "
# DATE/TIME LENGTH STATUS TSR CAMPAGNA LIST LEAD
\n"; +echo "

\n"; + +echo "CLOSER RECORDS FOR THIS LEAD:\n"; +echo "\n"; +echo "\n"; + + echo "$closer_log\n"; + +echo "
# DATE/TIME LENGTH STATUS TSR CAMPAGNA LIST LEAD WAIT
\n"; +echo "

\n"; + + +echo "RECORDINGS FOR THIS LEAD:\n"; +echo "\n"; +echo "\n"; + + $stmt="select * from recording_log where lead_id='" . mysql_real_escape_string($lead_id) . "' order by recording_id desc limit 500;"; + $rslt=mysql_query($stmt, $link); + $logs_to_print = mysql_num_rows($rslt); + + $u=0; + while ($logs_to_print > $u) + { + $row=mysql_fetch_row($rslt); + if (eregi("1$|3$|5$|7$|9$", $u)) + {$bgcolor='bgcolor="#B9CBFD"';} + else + {$bgcolor='bgcolor="#9BB9FB"';} + + $location = $row[11]; + if (strlen($location)>30) + {$locat = substr($location,0,27); $locat = "$locat...";} + else + {$locat = $location;} + if (eregi("http",$location)) + {$location = "$locat";} + else + {$location = $locat;} + $u++; + echo ""; + echo ""; + echo ""; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo ""; + echo "\n"; + + } + + +echo "
# LEADDATE/TIME SECONDS   RECIDFILENAMELOCATIONTSR
$u $row[12] $row[4] $row[8] $row[0]   $row[10] $location $row[13]
\n"; + + + + +} + + +$ENDtime = date("U"); + +$RUNtime = ($ENDtime - $STARTtime); + +echo "\n\n\n


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


\nTempo Esecuzione Script: $RUNtime seconds
"; + + +?> + + + + + + + + + + + diff --git a/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_it/admin_search_lead.php b/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_it/admin_search_lead.php new file mode 100644 index 00000000..1cffa50d --- /dev/null +++ b/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_it/admin_search_lead.php @@ -0,0 +1,225 @@ + LICENSE: GPLv2 +### +### AST GUI database administration search for lead info +### admin_modify_lead.php +# +# this is the administration lead information modifier screen, the administrator just needs to enter the leadID and then they can view and modify the information in the record for that lead +# +# changes: +# 60620-1055 - Added variable filtering to eliminate SQL injection attack threat +# - Added required user/pass to gain access to this page +# - Changed results to multi-record +# + +require("dbconnect.php"); + +$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; +$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; +$PHP_SELF=$_SERVER['PHP_SELF']; +if (isset($_GET["vendor_id"])) {$vendor_id=$_GET["vendor_id"];} + elseif (isset($_POST["vendor_id"])) {$vendor_id=$_POST["vendor_id"];} +if (isset($_GET["phone"])) {$phone=$_GET["phone"];} + elseif (isset($_POST["phone"])) {$phone=$_POST["phone"];} +if (isset($_GET["lead_id"])) {$lead_id=$_GET["lead_id"];} + elseif (isset($_POST["lead_id"])) {$lead_id=$_POST["lead_id"];} +if (isset($_GET["submit"])) {$submit=$_GET["submit"];} + elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];} +if (isset($_GET["INVIA"])) {$INVIA=$_GET["INVIA"];} + elseif (isset($_POST["INVIA"])) {$INVIA=$_POST["INVIA"];} +if (isset($_GET["DB"])) {$DB=$_GET["DB"];} + elseif (isset($_POST["DB"])) {$DB=$_POST["DB"];} + +$PHP_AUTH_USER = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_USER); +$PHP_AUTH_PW = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_PW); + +$STARTtime = date("U"); +$TODAY = date("Y-m-d"); +$NOW_TIME = date("Y-m-d H:i:s"); + + + $stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 7 and modify_leads='1';"; + if ($DB) {echo "|$stmt|\n";} + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + $auth=$row[0]; + +if ($WeBRooTWritablE > 0) + {$fp = fopen ("./project_auth_entries.txt", "a");} + +$date = date("r"); +$ip = getenv("REMOTE_ADDR"); +$browser = getenv("HTTP_USER_AGENT"); + + if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or (!$auth)) + { + Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\""); + Header("HTTP/1.0 401 Unauthorized"); + echo "Username/Password non validi: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n"; + exit; + } + else + { + + if($auth>0) + { + $office_no=strtoupper($PHP_AUTH_USER); + $password=strtoupper($PHP_AUTH_PW); + $stmt="SELECT full_name,modify_leads from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW'"; + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + $LOGfullname =$row[0]; + $LOGmodify_leads =$row[1]; + + if ($WeBRooTWritablE > 0) + { + fwrite ($fp, "VICIDIAL|GOOD|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|$LOGfullname|\n"); + fclose($fp); + } + } + else + { + if ($WeBRooTWritablE > 0) + { + fwrite ($fp, "VICIDIAL|FAIL|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|\n"); + fclose($fp); + } + } + } + +?> + + + +VICIDIAL ADMIN: Ricerca Contatti + +Operaciones de búsqueda del Lead + + +VICIDIAL ADMIN: Lead search
\n"; + + +if ( (!$vendor_id) and (!$phone) and (!$lead_id) ) + { + echo date("l F j, Y G:i:s A"); + echo "\n

\n"; + echo "
\n"; + echo "\n"; + echo "Per favore, inserisci:
Vendor ID(co`digo del vendedor del Lead): or \n"; + echo "
un numero di telefono: or\n"; + echo "
un ID Contatto:

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

\n"; + echo "Le variabili di ricerca inserite non sono attive in questo sistema

\n"; + echo "Per favore torna indietro e controlla di nuovo le informazioni inserite, quindi reinviale di nuovo\n"; + echo "
\n"; + echo "\n"; + exit; + } + else + { + echo "RESULTS: $results_to_print

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


\nNUOVA RICERCA"; + + +echo "\n\n\n


\nTempo Esecuzione Script: $RUNtime seconds"; + + +?> + + + + + diff --git a/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_it/count.htm b/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_it/count.htm new file mode 100644 index 00000000..51f8a361 --- /dev/null +++ b/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_it/count.htm @@ -0,0 +1 @@ + diff --git a/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_it/dbconnect.php b/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_it/dbconnect.php new file mode 100644 index 00000000..d31a326f --- /dev/null +++ b/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_it/dbconnect.php @@ -0,0 +1,52 @@ + LICENSE: GPLv2 +# +if ( file_exists("/etc/astguiclient.conf") ) +{ +$DBCagc = file("/etc/astguiclient.conf"); +foreach ($DBCagc as $DBCline) + { + $DBCline = preg_replace("/ |>|\n|\r|\t|\#.*|;.*/","",$DBCline); + if (ereg("^PATHlogs", $DBCline)) + {$PATHlogs = $DBCline; $PATHlogs = preg_replace("/.*=/","",$PATHlogs);} + if (ereg("^PATHweb", $DBCline)) + {$WeBServeRRooT = $DBCline; $WeBServeRRooT = preg_replace("/.*=/","",$WeBServeRRooT);} + if (ereg("^VARDB_server", $DBCline)) + {$VARDB_server = $DBCline; $VARDB_server = preg_replace("/.*=/","",$VARDB_server);} + if (ereg("^VARDB_database", $DBCline)) + {$VARDB_database = $DBCline; $VARDB_database = preg_replace("/.*=/","",$VARDB_database);} + if (ereg("^VARDB_user", $DBCline)) + {$VARDB_user = $DBCline; $VARDB_user = preg_replace("/.*=/","",$VARDB_user);} + if (ereg("^VARDB_pass", $DBCline)) + {$VARDB_pass = $DBCline; $VARDB_pass = preg_replace("/.*=/","",$VARDB_pass);} + if (ereg("^VARDB_port", $DBCline)) + {$VARDB_port = $DBCline; $VARDB_port = preg_replace("/.*=/","",$VARDB_port);} + } + +} +else +{ +#defaults for DB connection +$VARDB_server = 'localhost'; +$VARDB_user = 'cron'; +$VARDB_pass = '1234'; +$VARDB_database = '1234'; +$WeBServeRRooT = '/usr/local/apache2/htdocs'; +} + +$link=mysql_connect("$VARDB_server", "$VARDB_user", "$VARDB_pass"); +mysql_select_db("$VARDB_database"); + +$local_DEF = 'Local/'; +$conf_silent_prefix = '7'; +$local_AMP = '@'; +$ext_context = 'demo'; +$recording_exten = '8309'; +$WeBRooTWritablE = '1'; +$non_latin = '0'; # set to 1 for UTF rules +$AM_shift_BEGIN = '03:45:00'; +$AM_shift_END = '17:45:00'; +$PM_shift_BEGIN = '17:45:01'; +$PM_shift_END = '23:59:59'; +?> diff --git a/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_it/group_hourly_stats.php b/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_it/group_hourly_stats.php new file mode 100644 index 00000000..721972cb --- /dev/null +++ b/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_it/group_hourly_stats.php @@ -0,0 +1,252 @@ + LICENSE: GPLv2 +### +# CHANGES +# +# 60620-1014 - Added variable filtering to eliminate SQL injection attack threat +# - Added required user/pass to gain access to this page +# + +require("dbconnect.php"); + +$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; +$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; +$PHP_SELF=$_SERVER['PHP_SELF']; +if (isset($_GET["group"])) {$group=$_GET["group"];} + elseif (isset($_POST["group"])) {$group=$_POST["group"];} +if (isset($_GET["status"])) {$status=$_GET["status"];} + elseif (isset($_POST["status"])) {$status=$_POST["status"];} +if (isset($_GET["date_with_hour"])) {$date_with_hour=$_GET["date_with_hour"];} + elseif (isset($_POST["date_with_hour"])) {$date_with_hour=$_POST["date_with_hour"];} +if (isset($_GET["submit"])) {$submit=$_GET["submit"];} + elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];} +if (isset($_GET["INVIA"])) {$INVIA=$_GET["INVIA"];} + elseif (isset($_POST["INVIA"])) {$INVIA=$_POST["INVIA"];} + +$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 "Username/Password non validi: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n"; + exit; + } + +$STARTtime = date("U"); +$TODAY = date("Y-m-d"); +$date_with_hour_default = date("Y-m-d H"); +$date_no_hour_default = $TODAY; + +if (!isset($date_with_hour)) {$date_with_hour = $date_with_hour_default;} + $date_no_hour = $date_with_hour; + $date_no_hour = eregi_replace(" ([0-9]{2})",'',$date_no_hour); +if (!isset($begin_date)) {$begin_date = $TODAY;} +if (!isset($end_date)) {$end_date = $TODAY;} + + $stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 7;"; + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + $auth=$row[0]; + +$fp = fopen ("./project_auth_entries.txt", "a"); +$date = date("r"); +$ip = getenv("REMOTE_ADDR"); +$browser = getenv("HTTP_USER_AGENT"); + + if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or (!$auth)) + { + Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\""); + Header("HTTP/1.0 401 Unauthorized"); + echo "Username/Password non validi: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n"; + exit; + } + else + { + header ("Content-type: text/html; charset=utf-8"); + + if($auth>0) + { + $office_no=strtoupper($PHP_AUTH_USER); + $password=strtoupper($PHP_AUTH_PW); + $stmt="SELECT full_name from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW'"; + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + $LOGfullname=$row[0]; + fwrite ($fp, "VICIDIAL|GOOD|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|$LOGfullname|\n"); + fclose($fp); + } + else + { + fwrite ($fp, "VICIDIAL|FAIL|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|\n"); + fclose($fp); + } + +# $stmt="SELECT full_name from vicidial_users where user='$user';"; +# $rslt=mysql_query($stmt, $link); +# $row=mysql_fetch_row($rslt); +# $full_name = $row[0]; + + } + + + + +?> + + +VICIDIAL ADMIN: Statistiche Orarie Del Gruppo +\n"; +?> + + +
+ + + + + += '" . mysql_real_escape_string($date_with_hour) . ":00:00' and call_date <= '" . mysql_real_escape_string($date_with_hour) . ":59:59' and user='$VDuser[$o]';"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + $VDtotal[$o] = "$row[0]"; + + $stmt="select count(*) from vicidial_log where call_date >= '" . mysql_real_escape_string($date_no_hour) . " 00:00:00' and call_date <= '" . mysql_real_escape_string($date_no_hour) . " 23:59:59' and user='$VDuser[$o]' and status='" . mysql_real_escape_string($status) . "';"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + $VDday[$o] = "$row[0]"; + + $stmt="select count(*) from vicidial_log where call_date >= '" . mysql_real_escape_string($date_with_hour) . ":00:00' and call_date <= '" . mysql_real_escape_string($date_with_hour) . ":59:59' and user='$VDuser[$o]' and status='" . mysql_real_escape_string($status) . "';"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + $VDcount[$o] = "$row[0]"; + $o++; + } + +echo "
" ?>   VICIDIAL ADMIN: Statistiche Orarie Del Gruppo  
\n"; + +echo "
\n"; + +echo "DATI ORARI: $group | $status | $date_with_hour | $date_no_hour\n"; + +echo "
\n"; +echo "\n"; + + $day_calls=0; + $hour_calls=0; + $total_calls=0; + $o=0; + while($o < $tsrs_to_print) + { + if (eregi("1$|3$|5$|7$|9$", $o)) + {$bgcolor='bgcolor="#B9CBFD"';} + else + {$bgcolor='bgcolor="#9BB9FB"';} + echo ""; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + $total_calls = ($total_calls + $VDtotal[$o]); + $hour_calls = ($hour_calls + $VDcount[$o]); + $day_calls = ($day_calls + $VDday[$o]); + + $o++; + } + +echo "\n"; + + +} + +echo "
TSR ID   $status   TOTALE CHIAMATE   $status DAY    
$VDuser[$o] $VDname[$o] $VDcount[$o] $VDtotal[$o] $VDday[$o]MODIFICA | STATISTICHE
TOTALE $status $hour_calls $total_calls $day_calls
\n"; +echo "

\n"; + + + echo "
Per favore inserisci il gruppo per il quale vuoi le statistiche orarie:
\n"; + echo "\n"; + echo "gruppo:
\n"; + echo "esito:   (esempio: XFER)
\n"; + echo "data e ora:   (esempio: 2004-06-25 14)
\n"; + echo "\n"; + echo "


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


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


\nTempo Esecuzione Script: $RUNtime seconds
"; + + +?> + + +
+ + + + + + + + + diff --git a/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_it/help.gif b/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_it/help.gif new file mode 100644 index 00000000..5575d7c8 Binary files /dev/null and b/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_it/help.gif differ diff --git a/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_it/listloader.php b/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_it/listloader.php new file mode 100644 index 00000000..e95f2b5d --- /dev/null +++ b/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_it/listloader.php @@ -0,0 +1,926 @@ + LICENSE: GPLv2 +# +# AST Web GUI lead loader from formatted file +# +# CHANGES +# 50602-1640 - First version created by Joe Johnson +# 51128-1108 - Removed PHP global vars requirement +# 60421-1043 - check GET/POST vars lines with isset to not trigger PHP NOTICES +# 60616-1006 - added listID override and gmt_offset lookup while loading +# 60619-1652 - Added variable filtering to eliminate SQL injection attack threat +# 60822-1105 - fixed for nonwritable directories +# 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 +# 70417-1059 - Fixed default phone_code bug +# +# 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.3'; +$build = '770417-1059'; + +header ("Content-type: text/html; charset=utf-8"); + +require("dbconnect.php"); + +$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; +$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; +$PHP_SELF=$_SERVER['PHP_SELF']; +$leadfile=$_FILES["leadfile"]; + $LF_orig = $_FILES['leadfile']['name']; + $LF_path = $_FILES['leadfile']['tmp_name']; +$submit_file=$_GET["submit_file"]; if (!$submit_file) {$submit_file=$_POST["submit_file"];} +$list_id_override=$_GET["list_id_override"]; if (!$list_id_override) {$list_id_override=$_POST["list_id_override"];} + $list_id_override = (preg_replace("/\D/","",$list_id_override)); +$submit=$_GET["submit"]; if (!$submit) {$submit=$_POST["submit"];} +$INVIA=$_GET["INVIA"]; if (!$INVIA) {$INVIA=$_POST["INVIA"];} +if (isset($_GET["dupcheck"])) {$dupcheck=$_GET["dupcheck"];} + elseif (isset($_POST["dupcheck"])) {$dupcheck=$_POST["dupcheck"];} +if (isset($_GET["postalgmt"])) {$postalgmt=$_GET["postalgmt"];} + elseif (isset($_POST["postalgmt"])) {$postalgmt=$_POST["postalgmt"];} + + +#$DB=1; +#$DBX=1; + +$PHP_AUTH_USER = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_USER); +$PHP_AUTH_PW = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_PW); +$list_id_override = ereg_replace("[^0-9]","",$list_id_override); + + +$script_name = getenv("SCRIPT_NAME"); +$server_name = getenv("SERVER_NAME"); +$server_port = getenv("SERVER_PORT"); +if (eregi("443",$server_port)) {$HTTPprotocol = 'https://';} + else {$HTTPprotocol = 'http://';} +$admDIR = "$HTTPprotocol$server_name$script_name"; +$admDIR = eregi_replace('listloader.php','',$admDIR); +$admSCR = 'admin.php'; +$NWB = "   \"AIUTO\""; + + +$secX = date("U"); +$hour = date("H"); +$min = date("i"); +$sec = date("s"); +$mon = date("m"); +$mday = date("d"); +$year = date("Y"); +$isdst = date("I"); +$Shour = date("H"); +$Smin = date("i"); +$Ssec = date("s"); +$Smon = date("m"); +$Smday = date("d"); +$Syear = date("Y"); +$pulldate0 = "$year-$mon-$mday $hour:$min:$sec"; +$inSD = $pulldate0; +$dsec = ( ( ($hour * 3600) + ($min * 60) ) + $sec ); + + ### Grab Server GMT value from the database + $stmt="SELECT local_gmt FROM servers where server_ip = '$server_ip';"; + $rslt=mysql_query($stmt, $link); + $gmt_recs = mysql_num_rows($rslt); + if ($gmt_recs > 0) + { + $row=mysql_fetch_row($rslt); + $DBSERVER_GMT = "$row[0]"; + if (strlen($DBSERVER_GMT)>0) {$SERVER_GMT = $DBSERVER_GMT;} + if ($isdst) {$SERVER_GMT++;} + } + else + { + $SERVER_GMT = date("O"); + $SERVER_GMT = eregi_replace("\+","",$SERVER_GMT); + $SERVER_GMT = ($SERVER_GMT + 0); + $SERVER_GMT = ($SERVER_GMT / 100); + } + + $LOCAL_GMT_OFF = $SERVER_GMT; + $LOCAL_GMT_OFF_STD = $SERVER_GMT; + +#if ($DB) {print "SEED TIME $secX : $year-$mon-$mday $hour:$min:$sec LOCAL GMT OFFSET NOW: $LOCAL_GMT_OFF\n";} + +echo "\n"; +echo "\n"; +echo "\n"; +echo "\n"; + + +?> + + + + + + method=post enctype="multipart/form-data"> +
+ + + + + + + + + + + + + + + + + + + + + +
Carica Contatti Da Questo File:
Sovrascrittura ID Lista: (solo cifre o lasciare in bianco per usare i valori contenuti nel file)
Controlla Contatti Duplicati:
Ricerca Fusi Orari (Solo USA):
CLICCA QUI PER ACCEDERE AL `SUPER LEAD LOADER` (BETA VERSIONE)     TORNA AD AMMINISTRAZIONE
+ +document.forms[0].leadfile.disabled=true; document.forms[0].submit_file.disabled=true; document.forms[0].reload_page.disabled=true;"; + flush(); + if ($WeBRooTWritablE > 0) + { + copy($LF_path, "$WeBServeRRooT/vicidial/vicidial_temp_file.txt"); + $lead_file = "./vicidial_temp_file.txt"; + } + else + { + $lead_file = "$LF_path"; + } + $file=fopen("$lead_file", "r"); + if ($WeBRooTWritablE > 0) + {$stmt_file=fopen("$WeBServeRRooT/vicidial/listloader_stmts.txt", "w");} + $pulldate=date("Y-m-d H:i:s"); + + $buffer=fgets($file, 4096); + $tab_count=substr_count($buffer, "\t"); + $pipe_count=substr_count($buffer, "|"); + + if ($tab_count>$pipe_count) {$delimiter="\t"; $delim_name="tab";} else {$delimiter="|"; $delim_name="pipe";} + $field_check=explode($delimiter, $buffer); + + if (count($field_check)>=5) { + flush(); + $file=fopen("$lead_file", "r"); + $total=0; $good=0; $bad=0; $dup=0; $post=0; $phone_list=''; + print "
Elaborazione in corso$delim_name-delimited file... ($tab_count|$pipe_count)\n"; + + if (strlen($list_id_override)>0) + { + print "

ID LISTA OVERRIDE FOR THIS FILE: $list_id_override

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

ID LISTA OVERRIDE FOR THIS FILE: $list_id_override

"; + $list_id = $list_id_override; + } + + ##### Check for duplicate phone numbers in vicidial_list table ##### + if (eregi("DUP",$dupcheck)) + { + $dup_lead=0; + $stmt="select count(*) from vicidial_list where phone_number='$phone_number' and list_id='$list_id';"; + $rslt=mysql_query($stmt, $link); + $pc_recs = mysql_num_rows($rslt); + if ($pc_recs > 0) + { + $row=mysql_fetch_row($rslt); + $dup_lead = $row[0]; + } + if ($dup_lead < 1) + { + if (eregi("$phone_number$US$list_id",$phone_list)) + {$dup_lead++; $dup++;} + } + } + + if ( (strlen($phone_number)>6) and ($dup_lead<1) ) + { + $US='_'; + $entry_date = "$pulldate"; + $modify_date = ""; + $status = "NEW"; + $user = ""; + $gmt_offset = '0'; + $called_since_last_reset='N'; + $phone_list .= "$phone_number$US$list_id|"; + + if (strlen($phone_code)<1) {$phone_code = '1';} + + $postalgmt_found=0; + if ( (eregi("POSTAL",$postalgmt)) && (strlen($postal_code)>4) ) + { + if (preg_match('/^1$/', $phone_code)) + { + $stmt="select * from vicidial_postal_codes where country_code='$phone_code' and postal_code LIKE \"$postal_code%\";"; + $rslt=mysql_query($stmt, $link); + $pc_recs = mysql_num_rows($rslt); + if ($pc_recs > 0) + { + $row=mysql_fetch_row($rslt); + $gmt_offset = $row[2]; $gmt_offset = eregi_replace("\+","",$gmt_offset); + $dst = $row[3]; + $dst_range = $row[4]; + $PC_processed++; + $postalgmt_found++; + $post++; + } + } + } + if ($postalgmt_found < 1) + { + $PC_processed=0; + ### UNITED STATES ### + if ($phone_code =='1') + { + $stmt="select * from vicidial_phone_codes where country_code='$phone_code' and areacode='$USarea';"; + $rslt=mysql_query($stmt, $link); + $pc_recs = mysql_num_rows($rslt); + if ($pc_recs > 0) + { + $row=mysql_fetch_row($rslt); + $gmt_offset = $row[4]; $gmt_offset = eregi_replace("\+","",$gmt_offset); + $dst = $row[5]; + $dst_range = $row[6]; + $PC_processed++; + } + } + ### MEXICO ### + if ($phone_code =='52') + { + $stmt="select * from vicidial_phone_codes where country_code='$phone_code' and areacode='$USarea';"; + $rslt=mysql_query($stmt, $link); + $pc_recs = mysql_num_rows($rslt); + if ($pc_recs > 0) + { + $row=mysql_fetch_row($rslt); + $gmt_offset = $row[4]; $gmt_offset = eregi_replace("\+","",$gmt_offset); + $dst = $row[5]; + $dst_range = $row[6]; + $PC_processed++; + } + } + ### AUSTRALIA ### + if ($phone_code =='61') + { + $stmt="select * from vicidial_phone_codes where country_code='$phone_code' and state='$state';"; + $rslt=mysql_query($stmt, $link); + $pc_recs = mysql_num_rows($rslt); + if ($pc_recs > 0) + { + $row=mysql_fetch_row($rslt); + $gmt_offset = $row[4]; $gmt_offset = eregi_replace("\+","",$gmt_offset); + $dst = $row[5]; + $dst_range = $row[6]; + $PC_processed++; + } + } + ### ALL OTHER COUNTRY CODES ### + if (!$PC_processed) + { + $PC_processed++; + $stmt="select * from vicidial_phone_codes where country_code='$phone_code';"; + $rslt=mysql_query($stmt, $link); + $pc_recs = mysql_num_rows($rslt); + if ($pc_recs > 0) + { + $row=mysql_fetch_row($rslt); + $gmt_offset = $row[4]; $gmt_offset = eregi_replace("\+","",$gmt_offset); + $dst = $row[5]; + $dst_range = $row[6]; + $PC_processed++; + } + } + } + + ### Find out if DST to raise the gmt offset ### + $AC_GMT_diff = ($gmt_offset - $LOCAL_GMT_OFF_STD); + $AC_localtime = mktime(($Shour + $AC_GMT_diff), $Smin, $Ssec, $Smon, $Smday, $Syear); + $hour = date("H",$AC_localtime); + $min = date("i",$AC_localtime); + $sec = date("s",$AC_localtime); + $mon = date("m",$AC_localtime); + $mday = date("d",$AC_localtime); + $wday = date("w",$AC_localtime); + $year = date("Y",$AC_localtime); + $dsec = ( ( ($hour * 3600) + ($min * 60) ) + $sec ); + + $AC_processed=0; + if ( (!$AC_processed) and ($dst_range == 'SSM-FSN') ) + { + if ($DBX) {print " Second Sunday March to First Sunday November\n";} + #********************************************************************** + # SSM-FSN + # This is returns 1 if Daylight Savings Time is in effect and 0 if + # Standard time is in effect. + # Based on Second Sunday March to First Sunday November at 2 am. + # INPUTS: + # mm INTEGER Month. + # dd INTEGER Day of the month. + # ns INTEGER Seconds into the day. + # dow INTEGER Day of week (0=Sunday, to 6=Saturday) + # OPTIONAL INPUT: + # timezone INTEGER hour difference UTC - local standard time + # (DEFAULT is blank) + # make calculations based on UTC time, + # which means shift at 10:00 UTC in April + # and 9:00 UTC in October + # OUTPUT: + # INTEGER 1 = DST, 0 = not DST + # + # S M T W T F S + # 1 2 3 4 5 6 7 + # 8 9 10 11 12 13 14 + #15 16 17 18 19 20 21 + #22 23 24 25 26 27 28 + #29 30 31 + # + # S M T W T F S + # 1 2 3 4 5 6 + # 7 8 9 10 11 12 13 + #14 15 16 17 18 19 20 + #21 22 23 24 25 26 27 + #28 29 30 31 + # + #********************************************************************** + + $USACAN_DST=0; + $mm = $mon; + $dd = $mday; + $ns = $dsec; + $dow= $wday; + + if ($mm < 3 || $mm > 11) { + $USACAN_DST=0; + } elseif ($mm >= 4 and $mm <= 10) { + $USACAN_DST=1; + } elseif ($mm == 3) { + if ($dd > 13) { + $USACAN_DST=1; + } elseif ($dd >= ($dow+8)) { + if ($timezone) { + if ($dow == 0 and $ns < (7200+$timezone*3600)) { + $USACAN_DST=0; + } else { + $USACAN_DST=1; + } + } else { + if ($dow == 0 and $ns < 7200) { + $USACAN_DST=0; + } else { + $USACAN_DST=1; + } + } + } else { + $USACAN_DST=0; + } + } elseif ($mm == 11) { + if ($dd > 7) { + $USACAN_DST=0; + } elseif ($dd < ($dow+1)) { + $USACAN_DST=1; + } elseif ($dow == 0) { + if ($timezone) { # UTC calculations + if ($ns < (7200+($timezone-1)*3600)) { + $USACAN_DST=1; + } else { + $USACAN_DST=0; + } + } else { # ora locale calculations + if ($ns < 7200) { + $USACAN_DST=1; + } else { + $USACAN_DST=0; + } + } + } else { + $USACAN_DST=0; + } + } # end of month checks + if ($DBX) {print " DST: $USACAN_DST\n";} + if ($USACAN_DST) {$gmt_offset++;} + $AC_processed++; + } + + if ( (!$AC_processed) and ($dst_range == 'FSA-LSO') ) + { + if ($DBX) {print " First Sunday April to Last Sunday October\n";} + #********************************************************************** + # FSA-LSO + # This is returns 1 if Daylight Savings Time is in effect and 0 if + # Standard time is in effect. + # Based on first Sunday in April and last Sunday in October at 2 am. + #********************************************************************** + + $NA_DST=0; + $mm = $mon; + $dd = $mday; + $ns = $dsec; + $dow= $wday; + + if ($mm < 4 || $mm > 10) { + $NA_DST=0; + } elseif ($mm >= 5 and $mm <= 9) { + $NA_DST=1; + } elseif ($mm == 4) { + if ($dd > 7) { + $NA_DST=1; + } elseif ($dd >= ($dow+1)) { + if ($timezone) { + if ($dow == 0 and $ns < (7200+$timezone*3600)) { + $NA_DST=0; + } else { + $NA_DST=1; + } + } else { + if ($dow == 0 and $ns < 7200) { + $NA_DST=0; + } else { + $NA_DST=1; + } + } + } else { + $NA_DST=0; + } + } elseif ($mm == 10) { + if ($dd < 25) { + $NA_DST=1; + } elseif ($dd < ($dow+25)) { + $NA_DST=1; + } elseif ($dow == 0) { + if ($timezone) { # UTC calculations + if ($ns < (7200+($timezone-1)*3600)) { + $NA_DST=1; + } else { + $NA_DST=0; + } + } else { # ora locale calculations + if ($ns < 7200) { + $NA_DST=1; + } else { + $NA_DST=0; + } + } + } else { + $NA_DST=0; + } + } # end of month checks + + if ($DBX) {print " DST: $NA_DST\n";} + if ($NA_DST) {$gmt_offset++;} + $AC_processed++; + } + + if ( (!$AC_processed) and ($dst_range == 'LSM-LSO') ) + { + if ($DBX) {print " Last Sunday March to Last Sunday October\n";} + #********************************************************************** + # This is s 1 if Daylight Savings Time is in effect and 0 if + # Standard time is in effect. + # Based on last Sunday in March and last Sunday in October at 1 am. + #********************************************************************** + + $GBR_DST=0; + $mm = $mon; + $dd = $mday; + $ns = $dsec; + $dow= $wday; + + if ($mm < 3 || $mm > 10) { + $GBR_DST=0; + } elseif ($mm >= 4 and $mm <= 9) { + $GBR_DST=1; + } elseif ($mm == 3) { + if ($dd < 25) { + $GBR_DST=0; + } elseif ($dd < ($dow+25)) { + $GBR_DST=0; + } elseif ($dow == 0) { + if ($timezone) { # UTC calculations + if ($ns < (3600+($timezone-1)*3600)) { + $GBR_DST=0; + } else { + $GBR_DST=1; + } + } else { # ora locale calculations + if ($ns < 3600) { + $GBR_DST=0; + } else { + $GBR_DST=1; + } + } + } else { + $GBR_DST=1; + } + } elseif ($mm == 10) { + if ($dd < 25) { + $GBR_DST=1; + } elseif ($dd < ($dow+25)) { + $GBR_DST=1; + } elseif ($dow == 0) { + if ($timezone) { # UTC calculations + if ($ns < (3600+($timezone-1)*3600)) { + $GBR_DST=1; + } else { + $GBR_DST=0; + } + } else { # ora locale calculations + if ($ns < 3600) { + $GBR_DST=1; + } else { + $GBR_DST=0; + } + } + } else { + $GBR_DST=0; + } + } # end of month checks + if ($DBX) {print " DST: $GBR_DST\n";} + if ($GBR_DST) {$gmt_offset++;} + $AC_processed++; + } + if ( (!$AC_processed) and ($dst_range == 'LSO-LSM') ) + { + if ($DBX) {print " Last Sunday October to Last Sunday March\n";} + #********************************************************************** + # This is s 1 if Daylight Savings Time is in effect and 0 if + # Standard time is in effect. + # Based on last Sunday in October and last Sunday in March at 1 am. + #********************************************************************** + + $AUS_DST=0; + $mm = $mon; + $dd = $mday; + $ns = $dsec; + $dow= $wday; + + if ($mm < 3 || $mm > 10) { + $AUS_DST=1; + } elseif ($mm >= 4 and $mm <= 9) { + $AUS_DST=0; + } elseif ($mm == 3) { + if ($dd < 25) { + $AUS_DST=1; + } elseif ($dd < ($dow+25)) { + $AUS_DST=1; + } elseif ($dow == 0) { + if ($timezone) { # UTC calculations + if ($ns < (3600+($timezone-1)*3600)) { + $AUS_DST=1; + } else { + $AUS_DST=0; + } + } else { # ora locale calculations + if ($ns < 3600) { + $AUS_DST=1; + } else { + $AUS_DST=0; + } + } + } else { + $AUS_DST=0; + } + } elseif ($mm == 10) { + if ($dd < 25) { + $AUS_DST=0; + } elseif ($dd < ($dow+25)) { + $AUS_DST=0; + } elseif ($dow == 0) { + if ($timezone) { # UTC calculations + if ($ns < (3600+($timezone-1)*3600)) { + $AUS_DST=0; + } else { + $AUS_DST=1; + } + } else { # ora locale calculations + if ($ns < 3600) { + $AUS_DST=0; + } else { + $AUS_DST=1; + } + } + } else { + $AUS_DST=1; + } + } # end of month checks + if ($DBX) {print " DST: $AUS_DST\n";} + if ($AUS_DST) {$gmt_offset++;} + $AC_processed++; + } + + if ( (!$AC_processed) and ($dst_range == 'FSO-LSM') ) + { + if ($DBX) {print " First Sunday October to Last Sunday March\n";} + #********************************************************************** + # TASMANIA ONLY + # This is s 1 if Daylight Savings Time is in effect and 0 if + # Standard time is in effect. + # Based on first Sunday in October and last Sunday in March at 1 am. + #********************************************************************** + + $AUST_DST=0; + $mm = $mon; + $dd = $mday; + $ns = $dsec; + $dow= $wday; + + if ($mm < 3 || $mm > 10) { + $AUST_DST=1; + } elseif ($mm >= 4 and $mm <= 9) { + $AUST_DST=0; + } elseif ($mm == 3) { + if ($dd < 25) { + $AUST_DST=1; + } elseif ($dd < ($dow+25)) { + $AUST_DST=1; + } elseif ($dow == 0) { + if ($timezone) { # UTC calculations + if ($ns < (3600+($timezone-1)*3600)) { + $AUST_DST=1; + } else { + $AUST_DST=0; + } + } else { # ora locale calculations + if ($ns < 3600) { + $AUST_DST=1; + } else { + $AUST_DST=0; + } + } + } else { + $AUST_DST=0; + } + } elseif ($mm == 10) { + if ($dd > 7) { + $AUST_DST=1; + } elseif ($dd >= ($dow+1)) { + if ($timezone) { + if ($dow == 0 and $ns < (7200+$timezone*3600)) { + $AUST_DST=0; + } else { + $AUST_DST=1; + } + } else { + if ($dow == 0 and $ns < 3600) { + $AUST_DST=0; + } else { + $AUST_DST=1; + } + } + } else { + $AUST_DST=0; + } + } # end of month checks + if ($DBX) {print " DST: $AUST_DST\n";} + if ($AUST_DST) {$gmt_offset++;} + $AC_processed++; + } + if ( (!$AC_processed) and ($dst_range == 'FSO-TSM') ) + { + if ($DBX) {print " First Sunday October to Third Sunday March\n";} + #********************************************************************** + # This is s 1 if Daylight Savings Time is in effect and 0 if + # Standard time is in effect. + # Based on first Sunday in October and third Sunday in March at 1 am. + #********************************************************************** + + $NZL_DST=0; + $mm = $mon; + $dd = $mday; + $ns = $dsec; + $dow= $wday; + + if ($mm < 3 || $mm > 10) { + $NZL_DST=1; + } elseif ($mm >= 4 and $mm <= 9) { + $NZL_DST=0; + } elseif ($mm == 3) { + if ($dd < 14) { + $NZL_DST=1; + } elseif ($dd < ($dow+14)) { + $NZL_DST=1; + } elseif ($dow == 0) { + if ($timezone) { # UTC calculations + if ($ns < (3600+($timezone-1)*3600)) { + $NZL_DST=1; + } else { + $NZL_DST=0; + } + } else { # ora locale calculations + if ($ns < 3600) { + $NZL_DST=1; + } else { + $NZL_DST=0; + } + } + } else { + $NZL_DST=0; + } + } elseif ($mm == 10) { + if ($dd > 7) { + $NZL_DST=1; + } elseif ($dd >= ($dow+1)) { + if ($timezone) { + if ($dow == 0 and $ns < (7200+$timezone*3600)) { + $NZL_DST=0; + } else { + $NZL_DST=1; + } + } else { + if ($dow == 0 and $ns < 3600) { + $NZL_DST=0; + } else { + $NZL_DST=1; + } + } + } else { + $NZL_DST=0; + } + } # end of month checks + if ($DBX) {print " DST: $NZL_DST\n";} + if ($NZL_DST) {$gmt_offset++;} + $AC_processed++; + } + + if ( (!$AC_processed) and ($dst_range == 'TSO-LSF') ) + { + if ($DBX) {print " Third Sunday October to Last Sunday February\n";} + #********************************************************************** + # TSO-LSF + # This is returns 1 if Daylight Savings Time is in effect and 0 if + # Standard time is in effect. Brazil + # Based on Third Sunday October to Last Sunday February at 1 am. + #********************************************************************** + + $BZL_DST=0; + $mm = $mon; + $dd = $mday; + $ns = $dsec; + $dow= $wday; + + if ($mm < 2 || $mm > 10) { + $BZL_DST=1; + } elseif ($mm >= 3 and $mm <= 9) { + $BZL_DST=0; + } elseif ($mm == 2) { + if ($dd < 22) { + $BZL_DST=1; + } elseif ($dd < ($dow+22)) { + $BZL_DST=1; + } elseif ($dow == 0) { + if ($timezone) { # UTC calculations + if ($ns < (3600+($timezone-1)*3600)) { + $BZL_DST=1; + } else { + $BZL_DST=0; + } + } else { # ora locale calculations + if ($ns < 3600) { + $BZL_DST=1; + } else { + $BZL_DST=0; + } + } + } else { + $BZL_DST=0; + } + } elseif ($mm == 10) { + if ($dd < 22) { + $BZL_DST=0; + } elseif ($dd < ($dow+22)) { + $BZL_DST=0; + } elseif ($dow == 0) { + if ($timezone) { # UTC calculations + if ($ns < (3600+($timezone-1)*3600)) { + $BZL_DST=0; + } else { + $BZL_DST=1; + } + } else { # ora locale calculations + if ($ns < 3600) { + $BZL_DST=0; + } else { + $BZL_DST=1; + } + } + } else { + $BZL_DST=1; + } + } # end of month checks + if ($DBX) {print " DST: $BZL_DST\n";} + if ($BZL_DST) {$gmt_offset++;} + $AC_processed++; + } + + if (!$AC_processed) + { + if ($DBX) {print " No DST Method Found\n";} + if ($DBX) {print " DST: 0\n";} + $AC_processed++; + } + + if ($multi_insert_counter > 8) { + ### insert good deal into pending_transactions table ### + $stmtZ = "INSERT INTO vicidial_list values$multistmt('','$entry_date','$modify_date','$status','$user','$vendor_lead_code','$source_id','$list_id','$gmt_offset','$called_since_last_reset','$phone_code','$phone_number','$title','$first_name','$middle_initial','$last_name','$address1','$address2','$address3','$city','$state','$province','$postal_code','$country','$gender','$date_of_birth','$alt_phone','$email','$security_phrase','$comments',0);"; + $rslt=mysql_query($stmtZ, $link); + if ($WeBRooTWritablE > 0) + {fwrite($stmt_file, $stmtZ."\r\n");} + $multistmt=''; + $multi_insert_counter=0; + + } else { + $multistmt .= "('','$entry_date','$modify_date','$status','$user','$vendor_lead_code','$source_id','$list_id','$gmt_offset','$called_since_last_reset','$phone_code','$phone_number','$title','$first_name','$middle_initial','$last_name','$address1','$address2','$address3','$city','$state','$province','$postal_code','$country','$gender','$date_of_birth','$alt_phone','$email','$security_phrase','$comments',0),"; + $multi_insert_counter++; + } + + $good++; + } + else + { + if ($bad < 10) {print "
record $total BAD- PHONE: $phone_number ROW: |$row[0]| DUP: $dup_lead\n";} + $bad++; + } + $total++; + if ($total%100==0) + { + print ""; + usleep(1000); + flush(); + } + } + } + if ($multi_insert_counter!=0) { + $stmtZ = "INSERT INTO vicidial_list values".substr($multistmt, 0, -1).";"; + mysql_query($stmtZ, $link); + if ($WeBRooTWritablE > 0) + {fwrite($stmt_file, $stmtZ."\r\n");} + } + + print "

Done
GOOD: $good       BAD: $bad       TOTAL: $total
DUPLICATE: $dup       POSTAL MATCH: $post
"; + + } else { + print "
ERRORE: Il file non ha il numero di campi necessare per essere elaborato.
"; + } + print ""; +} else if (filesize($leadfile)>8388608) { + print "
ERROR: Il file supera il limite di 8 MB.
"; +} +?> + + diff --git a/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_it/listloader.pl b/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_it/listloader.pl new file mode 100644 index 00000000..d58321cb --- /dev/null +++ b/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_it/listloader.pl @@ -0,0 +1,1102 @@ +#!/usr/bin/perl + +### listloader.pl version 2.0.4 *DBI-version* +### +### Copyright (C) 2008 Matt Florell,Joe Johnson LICENSE: GPLv2 +### +# +# +# CHANGES +# 60616-1548 - Added listID override feature to force all leads into same list +# - Added gmt_offset_now lookup for each lead +# 60811-1232 - Changed to DBI +# 60811-1329 - changed to use /etc/astguiclient.conf for configs +# 60822-1121 - fixed for nonwritable directories +# 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 +# 70417-1059 - Fixed default phone_code bug +# 70510-1518 - Added campaign and system duplicate check and phonecode override +# 80428-0144 - UTF8 cleanup +# + +### begin parsing run-time options ### +if (length($ARGV[0])>1) +{ + $i=0; + while ($#ARGV >= $i) + { + $args = "$args $ARGV[$i]"; + $i++; + } + + if ($args =~ /--help|-h/i) + { + print "allowed run time options:\n [-forcelistid=1234] = overrides the listID given in the file with the 1234\n [-h] = this help screen\n\n"; + + exit; + } + else + { + if ($args =~ /-duplicate-check/i) + {$dupcheck=1;} + if ($args =~ /-duplicate-campaign-check/i) + {$dupcheckcamp=1;} + if ($args =~ /-duplicate-system-check/i) + {$dupchecksys=1;} + if ($args =~ /-postal-code-gmt/i) + {$postalgmt=1;} + if ($args =~ /--forcelistid=/i) + { + @data_in = split(/--forcelistid=/,$args); + $forcelistid = $data_in[1]; + $forcelistid =~ s/ .*//gi; + print "\n----- FORCE LISTID OVERRIDE: $forcelistid -----\n\n"; + } + else + {$forcelistid = '';} + + if ($args =~ /--forcephonecode=/i) + { + @data_in = split(/--forcephonecode=/,$args); + $forcephonecode = $data_in[1]; + $forcephonecode =~ s/ .*//gi; + print "\n----- FORCE PHONECODE OVERRIDE: $forcephonecode -----\n\n"; + } + else + {$forcephonecode = '';} + + if ($args =~ /--lead-file=/i) + { + @data_in = split(/--lead-file=/,$args); + $lead_file = $data_in[1]; + $lead_file =~ s/ .*//gi; + # print "\n----- LEAD FILE: $lead_file -----\n\n"; + } + else + {$lead_file = './vicidial_temp_file.xls';} + } +} +### end parsing run-time options ### + + +use Spreadsheet::ParseExcel; +use Time::Local; +use DBI; + + +# default path to astguiclient configuration file: +$PATHconf = '/etc/astguiclient.conf'; + +open(conf, "$PATHconf") || die "can't open $PATHconf: $!\n"; +@conf = ; +close(conf); +$i=0; +foreach(@conf) + { + $line = $conf[$i]; + $line =~ s/ |>|\n|\r|\t|\#.*|;.*//gi; + if ( ($line =~ /^PATHhome/) && ($CLIhome < 1) ) + {$PATHhome = $line; $PATHhome =~ s/.*=//gi;} + if ( ($line =~ /^PATHlogs/) && ($CLIlogs < 1) ) + {$PATHlogs = $line; $PATHlogs =~ s/.*=//gi;} + if ( ($line =~ /^PATHagi/) && ($CLIagi < 1) ) + {$PATHagi = $line; $PATHagi =~ s/.*=//gi;} + if ( ($line =~ /^PATHweb/) && ($CLIweb < 1) ) + {$PATHweb = $line; $PATHweb =~ s/.*=//gi;} + if ( ($line =~ /^PATHsounds/) && ($CLIsounds < 1) ) + {$PATHsounds = $line; $PATHsounds =~ s/.*=//gi;} + if ( ($line =~ /^PATHmonitor/) && ($CLImonitor < 1) ) + {$PATHmonitor = $line; $PATHmonitor =~ s/.*=//gi;} + if ( ($line =~ /^VARserver_ip/) && ($CLIserver_ip < 1) ) + {$VARserver_ip = $line; $VARserver_ip =~ s/.*=//gi;} + if ( ($line =~ /^VARDB_server/) && ($CLIDB_server < 1) ) + {$VARDB_server = $line; $VARDB_server =~ s/.*=//gi;} + if ( ($line =~ /^VARDB_database/) && ($CLIDB_database < 1) ) + {$VARDB_database = $line; $VARDB_database =~ s/.*=//gi;} + if ( ($line =~ /^VARDB_user/) && ($CLIDB_user < 1) ) + {$VARDB_user = $line; $VARDB_user =~ s/.*=//gi;} + if ( ($line =~ /^VARDB_pass/) && ($CLIDB_pass < 1) ) + {$VARDB_pass = $line; $VARDB_pass =~ s/.*=//gi;} + if ( ($line =~ /^VARDB_port/) && ($CLIDB_port < 1) ) + {$VARDB_port = $line; $VARDB_port =~ s/.*=//gi;} + $i++; + } + +# Customized Variables +$server_ip = $VARserver_ip; # Asterisk server IP + +if (!$VARDB_port) {$VARDB_port='3306';} + +$dbhA = DBI->connect("DBI:mysql:$VARDB_database:$VARDB_server:$VARDB_port", "$VARDB_user", "$VARDB_pass") + or die "Couldn't connect to database: " . DBI->errstr; + + +$|=0; +$secX = time(); + +($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time); +$year = ($year + 1900); +$mon++; +if ($hour < 10) {$hour = "0$hour";} +if ($min < 10) {$min = "0$min";} +if ($sec < 10) {$sec = "0$sec";} +if ($mon < 10) {$mon = "0$mon";} +if ($mday < 10) {$mday = "0$mday";} +$pulldate0 = "$year-$mon-$mday $hour:$min:$sec"; +$pulldate="$year-$mon-$mday $hour:$min:$sec"; +$inSD = $pulldate0; +$dsec = ( ( ($hour * 3600) + ($min * 60) ) + $sec ); + +############################################# +##### START SYSTEM_SETTINGS LOOKUP ##### +$stmtA = "SELECT use_non_latin FROM system_settings;"; +$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; +$sthA->execute or die "executing: $stmtA ", $dbhA->errstr; +$sthArows=$sthA->rows; +if ($sthArows > 0) + { + @aryA = $sthA->fetchrow_array; + $non_latin = "$aryA[0]"; + } +$sthA->finish(); +##### END SETTINGS LOOKUP ##### +########################################### + + +if ($non_latin > 0) {$affected_rows = $dbhA->do("SET NAMES 'UTF8'");} + + ### Grab Server values from the database + $stmtA = "SELECT local_gmt FROM servers where server_ip = '$server_ip';"; + $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; + $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; + $sthArows=$sthA->rows; + $rec_count=0; + while ($sthArows > $rec_count) + { + @aryA = $sthA->fetchrow_array; + $DBSERVER_GMT = "$aryA[0]"; + if ($DBSERVER_GMT) {$SERVER_GMT = $DBSERVER_GMT;} + $rec_count++; + } + $sthA->finish(); + + $LOCAL_GMT_OFF = $SERVER_GMT; + $LOCAL_GMT_OFF_STD = $SERVER_GMT; + +if ($isdst) {$LOCAL_GMT_OFF++;} +if ($DB) {print "SEED TIME $secX : $year-$mon-$mday $hour:$min:$sec LOCAL GMT OFFSET NOW: $LOCAL_GMT_OFF\n";} + + + +$total=0; $good=0; $bad=0; +print "
Processing Excel file...\n"; +open(STMT_FILE, "> $PATHlogs/listloader_stmts.txt"); + +$oBook = Spreadsheet::ParseExcel::Workbook->Parse("$lead_file"); +my($iR, $iC, $oWkS, $oWkC); + +foreach $oWkS (@{$oBook->{Worksheet}}) { + for($iR = 0 ; defined $oWkS->{MaxRow} && $iR <= $oWkS->{MaxRow} ; $iR++) { + + $entry_date = "$pulldate"; + $modify_date = ""; + $status = "NEW"; + $user = ""; + $oWkC = $oWkS->{Cells}[$iR][0]; + if ($oWkC) {$vendor_lead_code=$oWkC->Value; } + $oWkC = $oWkS->{Cells}[$iR][1]; + if ($oWkC) {$source_code=$oWkC->Value; } + $source_id=$source_code; + $oWkC = $oWkS->{Cells}[$iR][2]; + if ($oWkC) {$list_id=$oWkC->Value; } + $gmt_offset = '0'; + $called_since_last_reset='N'; + $oWkC = $oWkS->{Cells}[$iR][3]; + if ($oWkC) {$phone_code=$oWkC->Value; } + $phone_code=~s/[^0-9]//g; + $oWkC = $oWkS->{Cells}[$iR][4]; + if ($oWkC) {$phone_number=$oWkC->Value; } + $phone_number=~s/[^0-9]//g; + $USarea = substr($phone_number, 0, 3); + $oWkC = $oWkS->{Cells}[$iR][5]; + if ($oWkC) {$title=$oWkC->Value; } + $oWkC = $oWkS->{Cells}[$iR][6]; + if ($oWkC) {$first_name=$oWkC->Value; } + $oWkC = $oWkS->{Cells}[$iR][7]; + if ($oWkC) {$middle_initial=$oWkC->Value; } + $oWkC = $oWkS->{Cells}[$iR][8]; + if ($oWkC) {$last_name=$oWkC->Value; } + $oWkC = $oWkS->{Cells}[$iR][9]; + if ($oWkC) {$address1=$oWkC->Value; } + $oWkC = $oWkS->{Cells}[$iR][10]; + if ($oWkC) {$address2=$oWkC->Value; } + $oWkC = $oWkS->{Cells}[$iR][11]; + if ($oWkC) {$address3=$oWkC->Value; } + $oWkC = $oWkS->{Cells}[$iR][12]; + if ($oWkC) {$city=$oWkC->Value; } + $oWkC = $oWkS->{Cells}[$iR][13]; + if ($oWkC) {$state=$oWkC->Value; } + $oWkC = $oWkS->{Cells}[$iR][14]; + if ($oWkC) {$province=$oWkC->Value; } + $oWkC = $oWkS->{Cells}[$iR][15]; + if ($oWkC) {$postal_code=$oWkC->Value; } + $oWkC = $oWkS->{Cells}[$iR][16]; + if ($oWkC) {$country=$oWkC->Value; } + $oWkC = $oWkS->{Cells}[$iR][17]; + if ($oWkC) {$gender=$oWkC->Value; } + $oWkC = $oWkS->{Cells}[$iR][18]; + if ($oWkC) {$date_of_birth=$oWkC->Value; } + $oWkC = $oWkS->{Cells}[$iR][19]; + if ($oWkC) {$alt_phone=$oWkC->Value; } + $alt_phone=~s/[^0-9]//g; + $oWkC = $oWkS->{Cells}[$iR][20]; + if ($oWkC) {$email=$oWkC->Value; } + $oWkC = $oWkS->{Cells}[$iR][21]; + if ($oWkC) {$security_phrase=$oWkC->Value; } + $oWkC = $oWkS->{Cells}[$iR][22]; + if ($oWkC) {$comments=$oWkC->Value; } + $comments=~s/^\s*(.*?)\s*$/$1/; + + if (length($forcelistid) > 0) + { + $list_id = $forcelistid; # set list_id to override value + } + if (length($forcephonecode) > 0) + { + $phone_code = $forcephonecode; # set phone_code to override value + } + + ##### Check for duplicate phone numbers in vicidial_list table entire database ##### + if ($dupchecksys > 0) + { + $dup_lead=0; + $stmtA = "select count(*) from vicidial_list where phone_number='$phone_number';"; + if($DBX){print STDERR "\n|$stmtA|\n";} + $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; + $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; + $sthArows=$sthA->rows; + if ($sthArows > 0) + { + @aryA = $sthA->fetchrow_array; + $dup_lead = $aryA[0]; + $dup_lead_list=$list_id; + } + $sthA->finish(); + if ($dup_lead < 1) + { + if ($phone_list =~ /\|$phone_number$US$list_id\|/) + {$dup_lead++;} + } + } + ##### Check for duplicate phone numbers in vicidial_list table for one list_id ##### + if ($dupcheck > 0) + { + $dup_lead=0; + $stmtA = "select list_id from vicidial_list where phone_number='$phone_number' and list_id='$list_id' limit 1;"; + if($DBX){print STDERR "\n|$stmtA|\n";} + $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; + $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; + $sthArows=$sthA->rows; + if ($sthArows > 0) + { + @aryA = $sthA->fetchrow_array; + $dup_lead_list = $aryA[0]; + $dup_lead++; + } + $sthA->finish(); + if ($dup_lead < 1) + { + if ($phone_list =~ /\|$phone_number$US$list_id\|/) + {$dup_lead++;} + } + } + ##### Check for duplicate phone numbers in vicidial_list table for all lists in a campaign ##### + if ($dupcheckcamp > 0) + { + $dup_lead=0; + $dup_lists=''; + + $stmtA = "select count(*) from vicidial_lists where list_id='$list_id';"; + if($DBX){print STDERR "\n|$stmtA|\n";} + $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; + $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; + @aryA = $sthA->fetchrow_array; + $ci_recs = $aryA[0]; + $sthA->finish(); + if ($ci_recs > 0) + { + $stmtA = "select campaign_id from vicidial_lists where list_id='$list_id';"; + if($DBX){print STDERR "\n|$stmtA|\n";} + $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; + $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; + @aryA = $sthA->fetchrow_array; + $dup_camp = $aryA[0]; + $sthA->finish(); + + $stmtA = "select list_id from vicidial_lists where campaign_id='$dup_camp';"; + $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; + $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; + $sthArows=$sthA->rows; + $rec_count=0; + while ($sthArows > $rec_count) + { + @aryA = $sthA->fetchrow_array; + $dup_lists .= "'$aryA[0]',"; + $rec_count++; + } + $sthA->finish(); + + chop($dup_lists); + $stmtA = "select list_id from vicidial_list where phone_number='$phone_number' and list_id IN($dup_lists) limit 1;"; + $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; + $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; + $sthArows=$sthA->rows; + $rec_count=0; + while ($sthArows > $rec_count) + { + @aryA = $sthA->fetchrow_array; + $dup_lead_list = "'$aryA[0]',"; + $rec_count++; + $dup_lead=1; + } + $sthA->finish(); + } + if ($dup_lead < 1) + { + if ($phone_list =~ /\|$phone_number$US$list_id\|/) + {$dup_lead++;} + } + } + + if ( (length($phone_number)>6) && ($dup_lead < 1) ) + { + $phone_list .= "$phone_number$US$list_id|"; + $postalgmt_found=0; + if (length($phone_code)<1) {$phone_code = '1';} + + if ( ($postalgmt > 0) && (length($postal_code)>4) ) + { + if ($phone_code =~ /^1$/) + { + $stmtA = "select * from vicidial_postal_codes where country_code='$phone_code' and postal_code LIKE \"$postal_code%\";"; + if($DBX){print STDERR "\n|$stmtA|\n";} + $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; + $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; + $sthArows=$sthA->rows; + $rec_count=0; + while ($sthArows > $rec_count) + { + @aryA = $sthA->fetchrow_array; + $gmt_offset = $aryA[2]; $gmt_offset =~ s/\+| //gi; + $dst = $aryA[3]; + $dst_range = $aryA[4]; + $PC_processed++; + $rec_count++; + $postalgmt_found++; + if ($DBX) {print " Postal GMT record found for $postal_code: |$gmt_offset|$dst|$dst_range|\n";} + } + $sthA->finish(); + } + } + if ($postalgmt_found < 1) + { + $PC_processed=0; + ### UNITED STATES ### + if ($phone_code =~ /^1$/) + { + $stmtA = "select * from vicidial_phone_codes where country_code='$phone_code' and areacode='$USarea';"; + if($DBX){print STDERR "\n|$stmtA|\n";} + $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; + $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; + $sthArows=$sthA->rows; + $rec_count=0; + while ($sthArows > $rec_count) + { + @aryA = $sthA->fetchrow_array; + $gmt_offset = $aryA[4]; $gmt_offset =~ s/\+| //gi; + $dst = $aryA[5]; + $dst_range = $aryA[6]; + $PC_processed++; + $rec_count++; + } + $sthA->finish(); + } + ### MEXICO ### + if ($phone_code =~ /^52$/) + { + $stmtA = "select * from vicidial_phone_codes where country_code='$phone_code' and areacode='$USarea';"; + if($DBX){print STDERR "\n|$stmtA|\n";} + $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; + $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; + $sthArows=$sthA->rows; + $rec_count=0; + while ($sthArows > $rec_count) + { + @aryA = $sthA->fetchrow_array; + $gmt_offset = $aryA[4]; $gmt_offset =~ s/\+| //gi; + $dst = $aryA[5]; + $dst_range = $aryA[6]; + $PC_processed++; + $rec_count++; + } + $sthA->finish(); + } + ### AUSTRALIA ### + if ($phone_code =~ /^61$/) + { + $stmtA = "select * from vicidial_phone_codes where country_code='$phone_code' and state='$state';"; + if($DBX){print STDERR "\n|$stmtA|\n";} + $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; + $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; + $sthArows=$sthA->rows; + $rec_count=0; + while ($sthArows > $rec_count) + { + @aryA = $sthA->fetchrow_array; + $gmt_offset = $aryA[4]; $gmt_offset =~ s/\+| //gi; + $dst = $aryA[5]; + $dst_range = $aryA[6]; + $PC_processed++; + $rec_count++; + } + $sthA->finish(); + } + ### ALL OTHER COUNTRY CODES ### + if (!$PC_processed) + { + $stmtA = "select * from vicidial_phone_codes where country_code='$phone_code';"; + if($DBX){print STDERR "\n|$stmtA|\n";} + $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; + $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; + $sthArows=$sthA->rows; + $rec_count=0; + while ($sthArows > $rec_count) + { + @aryA = $sthA->fetchrow_array; + $gmt_offset = $aryA[4]; $gmt_offset =~ s/\+| //gi; + $dst = $aryA[5]; + $dst_range = $aryA[6]; + $PC_processed++; + $rec_count++; + } + $sthA->finish(); + } + } + + ### Find out if DST to raise the gmt offset ### + $AC_GMT_diff = ($gmt_offset - $LOCAL_GMT_OFF_STD); + $AC_localtime = ($secX + (3600 * $AC_GMT_diff)); + ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime($AC_localtime); + $year = ($year + 1900); + $mon++; + if ($mon < 10) {$mon = "0$mon";} + if ($mday < 10) {$mday = "0$mday";} + if ($hour < 10) {$hour = "0$hour";} + if ($min < 10) {$min = "0$min";} + if ($sec < 10) {$sec = "0$sec";} + $dsec = ( ( ($hour * 3600) + ($min * 60) ) + $sec ); + + $AC_processed=0; + + if ( (!$AC_processed) && ($dst_range =~ /SSM-FSN/) ) + { + if ($DBX) {print " Second Sunday March to First Sunday November\n";} + &USACAN_dstcalc; + if ($DBX) {print " DST: $USACAN_DST\n";} + if ($USACAN_DST) {$area_GMT++;} + $AC_processed++; + } + if ( (!$AC_processed) && ($dst_range =~ /FSA-LSO/) ) + { + if ($DBX) {print " First Sunday April to Last Sunday October\n";} + &NA_dstcalc; + if ($DBX) {print " DST: $NA_DST\n";} + if ($NA_DST) {$area_GMT++;} + $AC_processed++; + } + if ( (!$AC_processed) && ($dst_range =~ /LSM-LSO/) ) + { + if ($DBX) {print " Last Sunday March to Last Sunday October\n";} + &GBR_dstcalc; + if ($DBX) {print " DST: $GBR_DST\n";} + if ($GBR_DST) {$gmt_offset++;} + $AC_processed++; + } + if ( (!$AC_processed) && ($dst_range =~ /LSO-LSM/) ) + { + if ($DBX) {print " Last Sunday October to Last Sunday March\n";} + &AUS_dstcalc; + if ($DBX) {print " DST: $AUS_DST\n";} + if ($AUS_DST) {$gmt_offset++;} + $AC_processed++; + } + if ( (!$AC_processed) && ($dst_range =~ /FSO-LSM/) ) + { + if ($DBX) {print " First Sunday October to Last Sunday March\n";} + &AUST_dstcalc; + if ($DBX) {print " DST: $AUST_DST\n";} + if ($AUST_DST) {$gmt_offset++;} + $AC_processed++; + } + if ( (!$AC_processed) && ($dst_range =~ /FSO-TSM/) ) + { + if ($DBX) {print " First Sunday October to Third Sunday March\n";} + &NZL_dstcalc; + if ($DBX) {print " DST: $NZL_DST\n";} + if ($NZL_DST) {$gmt_offset++;} + $AC_processed++; + } + if ( (!$AC_processed) && ($dst_range =~ /TSO-LSF/) ) + { + if ($DBX) {print " Third Sunday October to Last Sunday February\n";} + &BZL_dstcalc; + if ($DBX) {print " DST: $BZL_DST\n";} + if ($BZL_DST) {$area_GMT++;} + $AC_processed++; + } + if (!$AC_processed) + { + if ($DBX) {print " No DST Method Found\n";} + if ($DBX) {print " DST: 0\n";} + $AC_processed++; + } + + if ($multi_insert_counter > 8) { + ### insert good deal into pending_transactions table ### + $stmtZ = "INSERT INTO vicidial_list values$multistmt('','$entry_date','$modify_date','$status','$user','$vendor_lead_code','$source_id','$list_id','$gmt_offset','$called_since_last_reset','$phone_code','$phone_number','$title','$first_name','$middle_initial','$last_name','$address1','$address2','$address3','$city','$state','$province','$postal_code','$country','$gender','$date_of_birth','$alt_phone','$email','$security_phrase','$comments',0);"; + $affected_rows = $dbhA->do($stmtZ); + print STMT_FILE $stmtZ."\r\n"; + $multistmt=''; + $multi_insert_counter=0; + + } else { + $multistmt .= "('','$entry_date','$modify_date','$status','$user','$vendor_lead_code','$source_id','$list_id','$gmt_offset','$called_since_last_reset','$phone_code','$phone_number','$title','$first_name','$middle_initial','$last_name','$address1','$address2','$address3','$city','$state','$province','$postal_code','$country','$gender','$date_of_birth','$alt_phone','$email','$security_phrase','$comments',0),"; + $multi_insert_counter++; + } + + $good++; + } else { + if ($bad < 10000) {print "
record $total BAD- PHONE: $phone_number ROW: |$row[0]| $dup_lead_list\n";} + $bad++; + } + $total++; + if ($total%100==0) { + print ""; + sleep(1); +# flush(); + } + } +} + +if ($multi_insert_counter > 0) { + $stmtZ = "INSERT INTO vicidial_list values ".substr($multistmt, 0, -1).";"; + $affected_rows = $dbhA->do($stmtZ); + print STMT_FILE $stmtZ."\r\n"; +} + +print "

Done
GOOD: $good       BAD: $bad       TOTAL: $total
"; + +exit; + + + + + + +sub USACAN_dstcalc { +#********************************************************************** +# SSM-FSN +# This is returns 1 if Daylight Savings Time is in effect and 0 if +# Standard time is in effect. +# Based on Second Sunday March to First Sunday November at 2 am. +# INPUTS: +# mm INTEGER Month. +# dd INTEGER Day of the month. +# ns INTEGER Seconds into the day. +# dow INTEGER Day of week (0=Sunday, to 6=Saturday) +# OPTIONAL INPUT: +# timezone INTEGER hour difference UTC - local standard time +# (DEFAULT is blank) +# make calculations based on UTC time, +# which means shift at 10:00 UTC in April +# and 9:00 UTC in October +# OUTPUT: +# INTEGER 1 = DST, 0 = not DST +# +# S M T W T F S +# 1 2 3 4 5 6 7 +# 8 9 10 11 12 13 14 +#15 16 17 18 19 20 21 +#22 23 24 25 26 27 28 +#29 30 31 +# +# S M T W T F S +# 1 2 3 4 5 6 +# 7 8 9 10 11 12 13 +#14 15 16 17 18 19 20 +#21 22 23 24 25 26 27 +#28 29 30 31 +# +#********************************************************************** + + $USACAN_DST=0; + $mm = $mon; + $dd = $mday; + $ns = $dsec; + $dow= $wday; + + if ($mm < 3 || $mm > 11) { + $USACAN_DST=0; return 0; + } elsif ($mm >= 4 && $mm <= 10) { + $USACAN_DST=1; return 1; + } elsif ($mm == 3) { + if ($dd > 13) { + $USACAN_DST=1; return 1; + } elsif ($dd >= ($dow+8)) { + if ($timezone) { + if ($dow == 0 && $ns < (7200+$timezone*3600)) { + $USACAN_DST=0; return 0; + } else { + $USACAN_DST=1; return 1; + } + } else { + if ($dow == 0 && $ns < 7200) { + $USACAN_DST=0; return 0; + } else { + $USACAN_DST=1; return 1; + } + } + } else { + $USACAN_DST=0; return 0; + } + } elsif ($mm == 11) { + if ($dd > 7) { + $USACAN_DST=0; return 0; + } elsif ($dd < ($dow+1)) { + $USACAN_DST=1; return 1; + } elsif ($dow == 0) { + if ($timezone) { # UTC calculations + if ($ns < (7200+($timezone-1)*3600)) { + $USACAN_DST=1; return 1; + } else { + $USACAN_DST=0; return 0; + } + } else { # local time calculations + if ($ns < 7200) { + $USACAN_DST=1; return 1; + } else { + $USACAN_DST=0; return 0; + } + } + } else { + $USACAN_DST=0; return 0; + } + } # end of month checks +} # end of subroutine dstcalc + + + + +sub NA_dstcalc { +#********************************************************************** +# FSA-LSO +# This is returns 1 if Daylight Savings Time is in effect and 0 if +# Standard time is in effect. +# Based on first Sunday in April and last Sunday in October at 2 am. +#********************************************************************** + + $NA_DST=0; + $mm = $mon; + $dd = $mday; + $ns = $dsec; + $dow= $wday; + + if ($mm < 4 || $mm > 10) { + $NA_DST=0; return 0; + } elsif ($mm >= 5 && $mm <= 9) { + $NA_DST=1; return 1; + } elsif ($mm == 4) { + if ($dd > 7) { + $NA_DST=1; return 1; + } elsif ($dd >= ($dow+1)) { + if ($timezone) { + if ($dow == 0 && $ns < (7200+$timezone*3600)) { + $NA_DST=0; return 0; + } else { + $NA_DST=1; return 1; + } + } else { + if ($dow == 0 && $ns < 7200) { + $NA_DST=0; return 0; + } else { + $NA_DST=1; return 1; + } + } + } else { + $NA_DST=0; return 0; + } + } elsif ($mm == 10) { + if ($dd < 25) { + $NA_DST=1; return 1; + } elsif ($dd < ($dow+25)) { + $NA_DST=1; return 1; + } elsif ($dow == 0) { + if ($timezone) { # UTC calculations + if ($ns < (7200+($timezone-1)*3600)) { + $NA_DST=1; return 1; + } else { + $NA_DST=0; return 0; + } + } else { # local time calculations + if ($ns < 7200) { + $NA_DST=1; return 1; + } else { + $NA_DST=0; return 0; + } + } + } else { + $NA_DST=0; return 0; + } + } # end of month checks +} # end of subroutine dstcalc + + + + +sub GBR_dstcalc { +#********************************************************************** +# LSM-LSO +# This is returns 1 if Daylight Savings Time is in effect and 0 if +# Standard time is in effect. +# Based on last Sunday in March and last Sunday in October at 1 am. +#********************************************************************** + + $GBR_DST=0; + $mm = $mon; + $dd = $mday; + $ns = $dsec; + $dow= $wday; + + if ($mm < 3 || $mm > 10) { + $GBR_DST=0; return 0; + } elsif ($mm >= 4 && $mm <= 9) { + $GBR_DST=1; return 1; + } elsif ($mm == 3) { + if ($dd < 25) { + $GBR_DST=0; return 0; + } elsif ($dd < ($dow+25)) { + $GBR_DST=0; return 0; + } elsif ($dow == 0) { + if ($timezone) { # UTC calculations + if ($ns < (3600+($timezone-1)*3600)) { + $GBR_DST=0; return 0; + } else { + $GBR_DST=1; return 1; + } + } else { # local time calculations + if ($ns < 3600) { + $GBR_DST=0; return 0; + } else { + $GBR_DST=1; return 1; + } + } + } else { + $GBR_DST=1; return 1; + } + } elsif ($mm == 10) { + if ($dd < 25) { + $GBR_DST=1; return 1; + } elsif ($dd < ($dow+25)) { + $GBR_DST=1; return 1; + } elsif ($dow == 0) { + if ($timezone) { # UTC calculations + if ($ns < (3600+($timezone-1)*3600)) { + $GBR_DST=1; return 1; + } else { + $GBR_DST=0; return 0; + } + } else { # local time calculations + if ($ns < 3600) { + $GBR_DST=1; return 1; + } else { + $GBR_DST=0; return 0; + } + } + } else { + $GBR_DST=0; return 0; + } + } # end of month checks +} # end of subroutine dstcalc + + + + +sub AUS_dstcalc { +#********************************************************************** +# LSO-LSM +# This is returns 1 if Daylight Savings Time is in effect and 0 if +# Standard time is in effect. +# Based on last Sunday in October and last Sunday in March at 1 am. +#********************************************************************** + + $AUS_DST=0; + $mm = $mon; + $dd = $mday; + $ns = $dsec; + $dow= $wday; + + if ($mm < 3 || $mm > 10) { + $AUS_DST=1; return 1; + } elsif ($mm >= 4 && $mm <= 9) { + $AUS_DST=0; return 0; + } elsif ($mm == 3) { + if ($dd < 25) { + $AUS_DST=1; return 1; + } elsif ($dd < ($dow+25)) { + $AUS_DST=1; return 1; + } elsif ($dow == 0) { + if ($timezone) { # UTC calculations + if ($ns < (3600+($timezone-1)*3600)) { + $AUS_DST=1; return 1; + } else { + $AUS_DST=0; return 0; + } + } else { # local time calculations + if ($ns < 3600) { + $AUS_DST=1; return 1; + } else { + $AUS_DST=0; return 0; + } + } + } else { + $AUS_DST=0; return 0; + } + } elsif ($mm == 10) { + if ($dd < 25) { + $AUS_DST=0; return 0; + } elsif ($dd < ($dow+25)) { + $AUS_DST=0; return 0; + } elsif ($dow == 0) { + if ($timezone) { # UTC calculations + if ($ns < (3600+($timezone-1)*3600)) { + $AUS_DST=0; return 0; + } else { + $AUS_DST=1; return 1; + } + } else { # local time calculations + if ($ns < 3600) { + $AUS_DST=0; return 0; + } else { + $AUS_DST=1; return 1; + } + } + } else { + $AUS_DST=1; return 1; + } + } # end of month checks +} # end of subroutine dstcalc + + + + + +sub AUST_dstcalc { +#********************************************************************** +# FSO-LSM +# TASMANIA ONLY +# This is returns 1 if Daylight Savings Time is in effect and 0 if +# Standard time is in effect. +# Based on first Sunday in October and last Sunday in March at 1 am. +#********************************************************************** + + $AUST_DST=0; + $mm = $mon; + $dd = $mday; + $ns = $dsec; + $dow= $wday; + + if ($mm < 3 || $mm > 10) { + $AUST_DST=1; return 1; + } elsif ($mm >= 4 && $mm <= 9) { + $AUST_DST=0; return 0; + } elsif ($mm == 3) { + if ($dd < 25) { + $AUST_DST=1; return 1; + } elsif ($dd < ($dow+25)) { + $AUST_DST=1; return 1; + } elsif ($dow == 0) { + if ($timezone) { # UTC calculations + if ($ns < (3600+($timezone-1)*3600)) { + $AUST_DST=1; return 1; + } else { + $AUST_DST=0; return 0; + } + } else { # local time calculations + if ($ns < 3600) { + $AUST_DST=1; return 1; + } else { + $AUST_DST=0; return 0; + } + } + } else { + $AUST_DST=0; return 0; + } + } elsif ($mm == 10) { + if ($dd >= 8) { + $AUST_DST=1; return 1; + } elsif ($dd >= ($dow+1)) { + if ($timezone) { + if ($dow == 0 && $ns < (7200+$timezone*3600)) { + $AUST_DST=0; return 0; + } else { + $AUST_DST=1; return 1; + } + } else { + if ($dow == 0 && $ns < 3600) { + $AUST_DST=0; return 0; + } else { + $AUST_DST=1; return 1; + } + } + } else { + $AUST_DST=0; return 0; + } + } # end of month checks +} # end of subroutine dstcalc + + + + + +sub NZL_dstcalc { +#********************************************************************** +# FSO-TSM +# This is returns 1 if Daylight Savings Time is in effect and 0 if +# Standard time is in effect. +# Based on first Sunday in October and third Sunday in March at 1 am. +#********************************************************************** + + $NZL_DST=0; + $mm = $mon; + $dd = $mday; + $ns = $dsec; + $dow= $wday; + + if ($mm < 3 || $mm > 10) { + $NZL_DST=1; return 1; + } elsif ($mm >= 4 && $mm <= 9) { + $NZL_DST=0; return 0; + } elsif ($mm == 3) { + if ($dd < 14) { + $NZL_DST=1; return 1; + } elsif ($dd < ($dow+14)) { + $NZL_DST=1; return 1; + } elsif ($dow == 0) { + if ($timezone) { # UTC calculations + if ($ns < (3600+($timezone-1)*3600)) { + $NZL_DST=1; return 1; + } else { + $NZL_DST=0; return 0; + } + } else { # local time calculations + if ($ns < 3600) { + $NZL_DST=1; return 1; + } else { + $NZL_DST=0; return 0; + } + } + } else { + $NZL_DST=0; return 0; + } + } elsif ($mm == 10) { + if ($dd >= 8) { + $NZL_DST=1; return 1; + } elsif ($dd >= ($dow+1)) { + if ($timezone) { + if ($dow == 0 && $ns < (7200+$timezone*3600)) { + $NZL_DST=0; return 0; + } else { + $NZL_DST=1; return 1; + } + } else { + if ($dow == 0 && $ns < 3600) { + $NZL_DST=0; return 0; + } else { + $NZL_DST=1; return 1; + } + } + } else { + $NZL_DST=0; return 0; + } + } # end of month checks +} # end of subroutine dstcalc + + + + +sub BZL_dstcalc { +#********************************************************************** +# TSO-LSF +# This is returns 1 if Daylight Savings Time is in effect and 0 if +# Standard time is in effect. Brazil +# Based on Third Sunday October to Last Sunday February at 1 am. +#********************************************************************** + + $BZL_DST=0; + $mm = $mon; + $dd = $mday; + $ns = $dsec; + $dow= $wday; + + if ($mm < 2 || $mm > 10) { + $BZL_DST=1; return 1; + } elsif ($mm >= 3 && $mm <= 9) { + $BZL_DST=0; return 0; + } elsif ($mm == 2) { + if ($dd < 22) { + $BZL_DST=1; return 1; + } elsif ($dd < ($dow+22)) { + $BZL_DST=1; return 1; + } elsif ($dow == 0) { + if ($timezone) { # UTC calculations + if ($ns < (3600+($timezone-1)*3600)) { + $BZL_DST=1; return 1; + } else { + $BZL_DST=0; return 0; + } + } else { # local time calculations + if ($ns < 3600) { + $BZL_DST=1; return 1; + } else { + $BZL_DST=0; return 0; + } + } + } else { + $BZL_DST=0; return 0; + } + } elsif ($mm == 10) { + if ($dd < 22) { + $BZL_DST=0; return 0; + } elsif ($dd < ($dow+22)) { + $BZL_DST=0; return 0; + } elsif ($dow == 0) { + if ($timezone) { # UTC calculations + if ($ns < (3600+($timezone-1)*3600)) { + $BZL_DST=0; return 0; + } else { + $BZL_DST=1; return 1; + } + } else { # local time calculations + if ($ns < 3600) { + $BZL_DST=0; return 0; + } else { + $BZL_DST=1; return 1; + } + } + } else { + $BZL_DST=1; return 1; + } + } # end of month checks +} # end of subroutine dstcalc diff --git a/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_it/listloaderMAIN.php b/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_it/listloaderMAIN.php new file mode 100644 index 00000000..a1fcd9e2 --- /dev/null +++ b/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_it/listloaderMAIN.php @@ -0,0 +1,86 @@ + LICENSE: GPLv2 +# +# this is the main frame page for the lead loading section. This is where you +# would upload a file and have it inserted into vicidial_list +# +# changes: +# 60620-1149 - Added variable filtering to eliminate SQL injection attack threat +# 60822-1105 - fixed for nonwritable directories +# + +require("dbconnect.php"); + +$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; +$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; +$PHP_SELF=$_SERVER['PHP_SELF']; + +$PHP_AUTH_USER = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_USER); +$PHP_AUTH_PW = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_PW); + +$STARTtime = date("U"); +$TODAY = date("Y-m-d"); +$NOW_TIME = date("Y-m-d H:i:s"); +$FILE_datetime = $STARTtime; + +$stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 7;"; +if ($DB) {echo "|$stmt|\n";} +$rslt=mysql_query($stmt, $link); +$row=mysql_fetch_row($rslt); +$auth=$row[0]; + +if ($WeBRooTWritablE > 0) {$fp = fopen ("./project_auth_entries.txt", "a");} +$date = date("r"); +$ip = getenv("REMOTE_ADDR"); +$browser = getenv("HTTP_USER_AGENT"); + + if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or (!$auth)) + { + Header("WWW-Authenticate: Basic realm=\"VICIDIAL-LEAD-LOADER\""); + Header("HTTP/1.0 401 Unauthorized"); + echo "Username/Password non validi: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n"; + exit; + } + else + { + header ("Content-type: text/html; charset=utf-8"); + if($auth>0) + { + $office_no=strtoupper($PHP_AUTH_USER); + $password=strtoupper($PHP_AUTH_PW); + $stmt="SELECT load_leads from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW'"; + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + $LOGload_leads =$row[0]; + + if ($LOGload_leads < 1) + { + echo "You do not have permissions to load leads\n"; + exit; + } + if ($WeBRooTWritablE > 0) + { + fwrite ($fp, "LIST_LOAD|GOOD|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|$LOGfullname|\n"); + fclose($fp); + } + } + else + { + if ($WeBRooTWritablE > 0) + { + fwrite ($fp, "LIST_LOAD|FAIL|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|\n"); + fclose($fp); + } + } + } + +?> + +VICIDIAL: Modulo Caricamento Contatti + + + + + \ No newline at end of file diff --git a/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_it/listloader_rowdisplay.pl b/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_it/listloader_rowdisplay.pl new file mode 100644 index 00000000..3f8695c0 --- /dev/null +++ b/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_it/listloader_rowdisplay.pl @@ -0,0 +1,153 @@ +#!/usr/bin/perl + +### listloader_rowdisplay.pl version 0.2 *DBI-version* +### +### Copyright (C) 2006 Matt Florell,Joe Johnson LICENSE: GPLv2 +### +# +# CHANGES +# +# 60811-1232 - Changed to DBI +# 60811-1329 - changed to use /etc/astguiclient.conf for configs +# + +### begin parsing run-time options ### +if (length($ARGV[0])>1) +{ + $i=0; + while ($#ARGV >= $i) + { + $args = "$args $ARGV[$i]"; + $i++; + } + + if ($args =~ /--help|-h/i) + { + print "allowed run time options:\n [-forcelistid=1234] = overrides the listID given in the file with the 1234\n [-h] = this help screen\n\n"; + + exit; + } + else + { + if ($args =~ /-duplicate-check/i) + {$dupcheck=1;} + if ($args =~ /-postal-code-gmt/i) + {$postalgmt=1;} + if ($args =~ /--lead-file=/i) + { + @data_in = split(/--lead-file=/,$args); + $lead_file = $data_in[1]; + $lead_file =~ s/ .*//gi; + # print "\n----- LEAD FILE: $lead_file -----\n\n"; + } + else + {$lead_file = './vicidial_temp_file.xls';} + } +} +### end parsing run-time options ### + +use Spreadsheet::ParseExcel; +use Time::Local; +use DBI; + + +# default path to astguiclient configuration file: +$PATHconf = '/etc/astguiclient.conf'; + +open(conf, "$PATHconf") || die "can't open $PATHconf: $!\n"; +@conf = ; +close(conf); +$i=0; +foreach(@conf) + { + $line = $conf[$i]; + $line =~ s/ |>|\n|\r|\t|\#.*|;.*//gi; + if ( ($line =~ /^PATHhome/) && ($CLIhome < 1) ) + {$PATHhome = $line; $PATHhome =~ s/.*=//gi;} + if ( ($line =~ /^PATHlogs/) && ($CLIlogs < 1) ) + {$PATHlogs = $line; $PATHlogs =~ s/.*=//gi;} + if ( ($line =~ /^PATHagi/) && ($CLIagi < 1) ) + {$PATHagi = $line; $PATHagi =~ s/.*=//gi;} + if ( ($line =~ /^PATHweb/) && ($CLIweb < 1) ) + {$PATHweb = $line; $PATHweb =~ s/.*=//gi;} + if ( ($line =~ /^PATHsounds/) && ($CLIsounds < 1) ) + {$PATHsounds = $line; $PATHsounds =~ s/.*=//gi;} + if ( ($line =~ /^PATHmonitor/) && ($CLImonitor < 1) ) + {$PATHmonitor = $line; $PATHmonitor =~ s/.*=//gi;} + if ( ($line =~ /^VARserver_ip/) && ($CLIserver_ip < 1) ) + {$VARserver_ip = $line; $VARserver_ip =~ s/.*=//gi;} + if ( ($line =~ /^VARDB_server/) && ($CLIDB_server < 1) ) + {$VARDB_server = $line; $VARDB_server =~ s/.*=//gi;} + if ( ($line =~ /^VARDB_database/) && ($CLIDB_database < 1) ) + {$VARDB_database = $line; $VARDB_database =~ s/.*=//gi;} + if ( ($line =~ /^VARDB_user/) && ($CLIDB_user < 1) ) + {$VARDB_user = $line; $VARDB_user =~ s/.*=//gi;} + if ( ($line =~ /^VARDB_pass/) && ($CLIDB_pass < 1) ) + {$VARDB_pass = $line; $VARDB_pass =~ s/.*=//gi;} + if ( ($line =~ /^VARDB_port/) && ($CLIDB_port < 1) ) + {$VARDB_port = $line; $VARDB_port =~ s/.*=//gi;} + $i++; + } + +# Customized Variables +$server_ip = $VARserver_ip; # Asterisk server IP + +if (!$VARDB_port) {$VARDB_port='3306';} + +$dbhA = DBI->connect("DBI:mysql:$VARDB_database:$VARDB_server:$VARDB_port", "$VARDB_user", "$VARDB_pass") + or die "Couldn't connect to database: " . DBI->errstr; + + +$oBook = Spreadsheet::ParseExcel::Workbook->Parse("$lead_file"); +my($iR, $iC, $oWkS, $oWkC); +$var_str=""; + +foreach $oWkS (@{$oBook->{Worksheet}}) { + for(my $iC = $oWkS->{MinCol} ; defined $oWkS->{MaxCol} && $iC <= $oWkS->{MaxCol} ; $iC++) { + $oWkC = $oWkS->{Cells}[0][$iC]; + if ($oWkC) { + $var_str.=$oWkC->Value."|"; + } else { + $var_str.="|"; + } + } +} + +@xls_row=split(/\|/, $var_str); + + +$stmtA = "select vendor_lead_code, source_id, list_id, phone_code, phone_number, title, first_name, middle_initial, last_name, address1, address2, address3, city, state, province, postal_code, country_code, gender, date_of_birth, alt_phone, email, security_phrase, comments from vicidial_list limit 1;"; +$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; +$sthA->execute or die "executing: $stmtA ", $dbhA->errstr; +$sthArows=$sthA->rows; +$rec_count=0; +while ($sthArows > $rec_count) + { + my $names = $sthA->{'NAME'}; + my $numFields = $sthA->{'NUM_OF_FIELDS'}; + for (my $i = 0; $i < $numFields; $i++) + { + # printf("%s%s", $i ? "," : "", $$names[$i]); + # printf("%s%s", $i ? "," : "", $$ref[$i]); + + $field_name=uc($$names[$i]); + $field_name=~s/\_/ /g; + print "
".$field_name.": \r\n"; + print " \r\n"; + print "
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Carica Contatti Da Questo File:
Sovrascrittura ID Lista: (solo cifre o lasciare in bianco per usare i valori contenuti nel file)
Sovrascrittura Codice Telefono: (solo cifre o lasciare in bianco per usare i valori contenuti nel file)
Struttura del file da usare:Standard VICIDIAL    Struttura personalizzata
Controlla Contatti Duplicati:
Ricerca Fusi Orari (Solo USA):
        
        TORNA AD AMMINISTRAZIONELIST LOADER-     VERSIONE:     BUILD:    
+ + +document.forms[0].leadfile.disabled=true;document.forms[0].list_id_override.disabled=true;document.forms[0].phone_code_override.disabled=true; document.forms[0].submit_file.disabled=true; document.forms[0].reload_page.disabled=true;"; + flush(); + $total=0; $good=0; $bad=0; $dup=0; $post=0; $phone_list=''; + + if (!eregi(".csv", $leadfile_name) && !eregi(".xls", $leadfile_name)) { + # copy($leadfile, "./vicidial_temp_file.txt"); + $file=fopen("$lead_file", "r"); + if ($WeBRooTWritablE > 0) + { + $stmt_file=fopen("listloader_stmts.txt", "w"); + } + $buffer=fgets($file, 4096); + $tab_count=substr_count($buffer, "\t"); + $pipe_count=substr_count($buffer, "|"); + + if ($tab_count>$pipe_count) {$delimiter="\t"; $delim_name="tab";} else {$delimiter="|"; $delim_name="pipe";} + $field_check=explode($delimiter, $buffer); + + if (count($field_check)>=5) { + flush(); + $file=fopen("$lead_file", "r"); + print "
Elaborazione in corso$delim_name-delimited file...\n"; + + if (strlen($list_id_override)>0) + { + print "

ID LISTA OVERRIDE FOR THIS FILE: $list_id_override

"; + } + + if (strlen($phone_code_override)>0) + { + print "

SOVRASCRITTURA DEL CODICE TELEFONO PER QUESTO FILE: $phone_code_override

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

ID LISTA OVERRIDE FOR THIS FILE: $list_id_override

"; + $list_id = $list_id_override; + } + if (strlen($phone_code_override)>0) + { + $phone_code = $phone_code_override; + } + + ##### Check for duplicate phone numbers in vicidial_list table for all lists in a campaign ##### + if (eregi("DUPCAMP",$dupcheck)) + { + $dup_lead=0; + $dup_lists=''; + $stmt="select campaign_id from vicidial_lists where list_id='$list_id';"; + $rslt=mysql_query($stmt, $link); + $ci_recs = mysql_num_rows($rslt); + if ($ci_recs > 0) + { + $row=mysql_fetch_row($rslt); + $dup_camp = $row[0]; + + $stmt="select list_id from vicidial_lists where campaign_id='$dup_camp';"; + $rslt=mysql_query($stmt, $link); + $li_recs = mysql_num_rows($rslt); + if ($li_recs > 0) + { + $L=0; + while ($li_recs > $L) + { + $row=mysql_fetch_row($rslt); + $dup_lists .= "'$row[0]',"; + $L++; + } + $dup_lists = eregi_replace(",$",'',$dup_lists); + + $stmt="select list_id from vicidial_list where phone_number='$phone_number' and list_id IN($dup_lists) limit 1;"; + $rslt=mysql_query($stmt, $link); + $pc_recs = mysql_num_rows($rslt); + if ($pc_recs > 0) + { + $dup_lead=1; + $row=mysql_fetch_row($rslt); + $dup_lead_list = $row[0]; + } + if ($dup_lead < 1) + { + if (eregi("$phone_number$US$list_id",$phone_list)) + {$dup_lead++; $dup++;} + } + } + } + } + + ##### Check for duplicate phone numbers in vicidial_list table entire database ##### + if (eregi("DUPSYS",$dupcheck)) + { + $dup_lead=0; + $stmt="select list_id from vicidial_list where phone_number='$phone_number';"; + $rslt=mysql_query($stmt, $link); + $pc_recs = mysql_num_rows($rslt); + if ($pc_recs > 0) + { + $dup_lead=1; + $row=mysql_fetch_row($rslt); + $dup_lead_list = $row[0]; + } + if ($dup_lead < 1) + { + if (eregi("$phone_number$US$list_id",$phone_list)) + {$dup_lead++; $dup++;} + } + } + + ##### Check for duplicate phone numbers in vicidial_list table for one list_id ##### + if (eregi("DUPLIST",$dupcheck)) + { + $dup_lead=0; + $stmt="select count(*) from vicidial_list where phone_number='$phone_number' and list_id='$list_id';"; + $rslt=mysql_query($stmt, $link); + $pc_recs = mysql_num_rows($rslt); + if ($pc_recs > 0) + { + $row=mysql_fetch_row($rslt); + $dup_lead = $row[0]; + $dup_lead_list = $list_id; + } + if ($dup_lead < 1) + { + if (eregi("$phone_number$US$list_id",$phone_list)) + {$dup_lead++; $dup++;} + } + } + + if ( (strlen($phone_number)>6) and ($dup_lead<1) ) + { + if (strlen($phone_code)<1) {$phone_code = '1';} + + $US='_'; + $phone_list .= "$phone_number$US$list_id|"; + + $gmt_offset = lookup_gmt($phone_code,$USarea,$state,$LOCAL_GMT_OFF_STD,$Shour,$Smin,$Ssec,$Smon,$Smday,$Syear,$postalgmt,$postal_code); + + if ($multi_insert_counter > 8) { + ### insert good deal into pending_transactions table ### + $stmtZ = "INSERT INTO vicidial_list values$multistmt('','$entry_date','$modify_date','$status','$user','$vendor_lead_code','$source_id','$list_id','$gmt_offset','$called_since_last_reset','$phone_code','$phone_number','$title','$first_name','$middle_initial','$last_name','$address1','$address2','$address3','$city','$state','$province','$postal_code','$country_code','$gender','$date_of_birth','$alt_phone','$email','$security_phrase','$comments',0);"; + $rslt=mysql_query($stmtZ, $link); + if ($WeBRooTWritablE > 0) + {fwrite($stmt_file, $stmtZ."\r\n");} + $multistmt=''; + $multi_insert_counter=0; + + } else { + $multistmt .= "('','$entry_date','$modify_date','$status','$user','$vendor_lead_code','$source_id','$list_id','$gmt_offset','$called_since_last_reset','$phone_code','$phone_number','$title','$first_name','$middle_initial','$last_name','$address1','$address2','$address3','$city','$state','$province','$postal_code','$country_code','$gender','$date_of_birth','$alt_phone','$email','$security_phrase','$comments',0),"; + $multi_insert_counter++; + } + + $good++; + } else { + if ($bad < 10000) {print "
record $total BAD- PHONE: $phone_number ROW: |$row[0]| DUP: $dup_lead $dup_lead_list\n";} + $bad++; + } + $total++; + if ($total%100==0) { + print ""; + usleep(1000); + flush(); + } + } + } + if ($multi_insert_counter!=0) { + $stmtZ = "INSERT INTO vicidial_list values".substr($multistmt, 0, -1).";"; + mysql_query($stmtZ, $link); + if ($WeBRooTWritablE > 0) + {fwrite($stmt_file, $stmtZ."\r\n");} + } + + print "

Done
GOOD: $good       BAD: $bad       TOTAL: $total
"; + + } else { + print "
ERRORE: Il file non ha il numero di campi necessare per essere elaborato.
"; + } + } else if (!eregi(".csv", $leadfile_name)) { + # copy($leadfile, "./vicidial_temp_file.xls"); + $file=fopen("$lead_file", "r"); + + print "
Elaborazione in corsoExcel file... \n"; + if (strlen($list_id_override)>0) + { + print "

ID LISTA OVERRIDE FOR THIS FILE: $list_id_override

\n"; + } + if (strlen($phone_code_override)>0) + { + print "

SOVRASCRITTURA DEL CODICE TELEFONO PER QUESTO FILE: $phone_code_override

\n"; + } + # print "|$WeBServeRRooT/vicidial/listloader_super.pl $vendor_lead_code_field,$source_id_field,$list_id_field,$phone_code_field,$phone_number_field,$title_field,$first_name_field,$middle_initial_field,$last_name_field,$address1_field,$address2_field,$address3_field,$city_field,$state_field,$province_field,$postal_code_field,$country_code_field,$gender_field,$date_of_birth_field,$alt_phone_field,$email_field,$security_phrase_field,$comments_field, --forcelistid=$list_id_override --lead_file=$lead_file|"; + $dupcheckCLI=''; $postalgmtCLI=''; + if (eregi("DUPLIST",$dupcheck)) {$dupcheckCLI='--duplicate-check';} + if (eregi("DUPCAMP",$dupcheck)) {$dupcheckCLI='--duplicate-campaign-check';} + if (eregi("DUPSYS",$dupcheck)) {$dupcheckCLI='--duplicate-system-check';} + if (eregi("POSTAL",$postalgmt)) {$postalgmtCLI='--postal-code-gmt';} + passthru("$WeBServeRRooT/vicidial/listloader_super.pl $vendor_lead_code_field,$source_id_field,$list_id_field,$phone_code_field,$phone_number_field,$title_field,$first_name_field,$middle_initial_field,$last_name_field,$address1_field,$address2_field,$address3_field,$city_field,$state_field,$province_field,$postal_code_field,$country_code_field,$gender_field,$date_of_birth_field,$alt_phone_field,$email_field,$security_phrase_field,$comments_field, --forcelistid=$list_id_override --forcephonecode=$phone_code_override --lead-file=$lead_file $postalgmtCLI $dupcheckCLI"); + } else { + # copy($leadfile, "./vicidial_temp_file.csv"); + $file=fopen("$lead_file", "r"); + + if ($WeBRooTWritablE > 0) + {$stmt_file=fopen("$WeBServeRRooT/vicidial/listloader_stmts.txt", "w");} + + print "
Elaborazione in corsoCSV file... \n"; + if (strlen($list_id_override)>0) + { + print "

ID LISTA OVERRIDE FOR THIS FILE: $list_id_override

"; + } + + if (strlen($phone_code_override)>0) + { + print "

SOVRASCRITTURA DEL CODICE TELEFONO PER QUESTO FILE: $phone_code_override

"; + } + + while($row=fgetcsv($file, 1000, ",")) { + + $pulldate=date("Y-m-d H:i:s"); + $entry_date = "$pulldate"; + $modify_date = ""; + $status = "NEW"; + $user =""; + $vendor_lead_code = $row[$vendor_lead_code_field]; + $source_code = $row[$source_id_field]; + $source_id=$source_code; + $list_id = $row[$list_id_field]; + $gmt_offset = '0'; + $called_since_last_reset='N'; + $phone_code = eregi_replace("[^0-9]", "", $row[$phone_code_field]); + $phone_number = eregi_replace("[^0-9]", "", $row[$phone_number_field]); + $USarea = substr($phone_number, 0, 3); + $title = $row[$title_field]; + $first_name = $row[$first_name_field]; + $middle_initial = $row[$middle_initial_field]; + $last_name = $row[$last_name_field]; + $address1 = $row[$address1_field]; + $address2 = $row[$address2_field]; + $address3 = $row[$address3_field]; + $city =$row[$city_field]; + $state = $row[$state_field]; + $province = $row[$province_field]; + $postal_code = $row[$postal_code_field]; + $country_code = $row[$country_code_field]; + $gender = $row[$gender_field]; + $date_of_birth = $row[$date_of_birth_field]; + $alt_phone = eregi_replace("[^0-9]", "", $row[$alt_phone_field]); + $email = $row[$email_field]; + $security_phrase = $row[$security_phrase_field]; + $comments = trim($row[$comments_field]); + + if (strlen($list_id_override)>0) + { + $list_id = $list_id_override; + } + if (strlen($phone_code_override)>0) + { + $phone_code = $phone_code_override; + } + + ##### Check for duplicate phone numbers in vicidial_list table for all lists in a campaign ##### + if (eregi("DUPCAMP",$dupcheck)) + { + $dup_lead=0; + $dup_lists=''; + $stmt="select campaign_id from vicidial_lists where list_id='$list_id';"; + $rslt=mysql_query($stmt, $link); + $ci_recs = mysql_num_rows($rslt); + if ($ci_recs > 0) + { + $row=mysql_fetch_row($rslt); + $dup_camp = $row[0]; + + $stmt="select list_id from vicidial_lists where campaign_id='$dup_camp';"; + $rslt=mysql_query($stmt, $link); + $li_recs = mysql_num_rows($rslt); + if ($li_recs > 0) + { + $L=0; + while ($li_recs > $L) + { + $row=mysql_fetch_row($rslt); + $dup_lists .= "'$row[0]',"; + $L++; + } + $dup_lists = eregi_replace(",$",'',$dup_lists); + + $stmt="select list_id from vicidial_list where phone_number='$phone_number' and list_id IN($dup_lists) limit 1;"; + $rslt=mysql_query($stmt, $link); + $pc_recs = mysql_num_rows($rslt); + if ($pc_recs > 0) + { + $dup_lead=1; + $row=mysql_fetch_row($rslt); + $dup_lead_list = $row[0]; + } + if ($dup_lead < 1) + { + if (eregi("$phone_number$US$list_id",$phone_list)) + {$dup_lead++; $dup++;} + } + } + } + } + + ##### Check for duplicate phone numbers in vicidial_list table entire database ##### + if (eregi("DUPSYS",$dupcheck)) + { + $dup_lead=0; + $stmt="select list_id from vicidial_list where phone_number='$phone_number';"; + $rslt=mysql_query($stmt, $link); + $pc_recs = mysql_num_rows($rslt); + if ($pc_recs > 0) + { + $dup_lead=1; + $row=mysql_fetch_row($rslt); + $dup_lead_list = $row[0]; + } + if ($dup_lead < 1) + { + if (eregi("$phone_number$US$list_id",$phone_list)) + {$dup_lead++; $dup++;} + } + } + + ##### Check for duplicate phone numbers in vicidial_list table for one list_id ##### + if (eregi("DUPLIST",$dupcheck)) + { + $dup_lead=0; + $stmt="select count(*) from vicidial_list where phone_number='$phone_number' and list_id='$list_id';"; + $rslt=mysql_query($stmt, $link); + $pc_recs = mysql_num_rows($rslt); + if ($pc_recs > 0) + { + $row=mysql_fetch_row($rslt); + $dup_lead = $row[0]; + } + if ($dup_lead < 1) + { + if (eregi("$phone_number$US$list_id",$phone_list)) + {$dup_lead++; $dup++;} + } + } + + if ( (strlen($phone_number)>6) and ($dup_lead<1) ) + { + if (strlen($phone_code)<1) {$phone_code = '1';} + + $US='_'; + $phone_list .= "$phone_number$US$list_id|"; + + $gmt_offset = lookup_gmt($phone_code,$USarea,$state,$LOCAL_GMT_OFF_STD,$Shour,$Smin,$Ssec,$Smon,$Smday,$Syear,$postalgmt,$postal_code); + + + if ($multi_insert_counter > 8) { + ### insert good deal into pending_transactions table ### + $stmtZ = "INSERT INTO vicidial_list values$multistmt('','$entry_date','$modify_date','$status','$user','$vendor_lead_code','$source_id','$list_id','$gmt_offset','$called_since_last_reset','$phone_code','$phone_number','$title','$first_name','$middle_initial','$last_name','$address1','$address2','$address3','$city','$state','$province','$postal_code','$country_code','$gender','$date_of_birth','$alt_phone','$email','$security_phrase','$comments',0);"; + $rslt=mysql_query($stmtZ, $link); + if ($WeBRooTWritablE > 0) + {fwrite($stmt_file, $stmtZ."\r\n");} + $multistmt=''; + $multi_insert_counter=0; + + } else { + $multistmt .= "('','$entry_date','$modify_date','$status','$user','$vendor_lead_code','$source_id','$list_id','$gmt_offset','$called_since_last_reset','$phone_code','$phone_number','$title','$first_name','$middle_initial','$last_name','$address1','$address2','$address3','$city','$state','$province','$postal_code','$country_code','$gender','$date_of_birth','$alt_phone','$email','$security_phrase','$comments',0),"; + $multi_insert_counter++; + } + + $good++; + } else { + if ($bad < 10000) {print "
record $total BAD- PHONE: $phone_number ROW: |$row[0]| DUP: $dup_lead\n";} + $bad++; + } + $total++; + if ($total%100==0) { + print ""; + usleep(1000); + flush(); + } + } + if ($multi_insert_counter!=0) { + $stmtZ = "INSERT INTO vicidial_list values".substr($multistmt, 0, -1).";"; + mysql_query($stmtZ, $link); + if ($WeBRooTWritablE > 0) + {fwrite($stmt_file, $stmtZ."\r\n");} + } + print "

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

ID LISTA OVERRIDE FOR THIS FILE: $list_id_override

"; + } + if (strlen($phone_code_override)>0) + { + print "

SOVRASCRITTURA DEL CODICE TELEFONO PER QUESTO FILE: $phone_code_override

\n"; + } + while (!feof($file)) { + $record++; + $buffer=rtrim(fgets($file, 4096)); + $buffer=stripslashes($buffer); + + if (strlen($buffer)>0) { + $row=explode($delimiter, eregi_replace("[\'\"]", "", $buffer)); + + $pulldate=date("Y-m-d H:i:s"); + $entry_date = "$pulldate"; + $modify_date = ""; + $status = "NEW"; + $user =""; + $vendor_lead_code = $row[0]; + $source_code = $row[1]; + $source_id=$source_code; + $list_id = $row[2]; + $gmt_offset = '0'; + $called_since_last_reset='N'; + $phone_code = eregi_replace("[^0-9]", "", $row[3]); + $phone_number = eregi_replace("[^0-9]", "", $row[4]); + $USarea = substr($phone_number, 0, 3); + $title = $row[5]; + $first_name = $row[6]; + $middle_initial = $row[7]; + $last_name = $row[8]; + $address1 = $row[9]; + $address2 = $row[10]; + $address3 = $row[11]; + $city =$row[12]; + $state = $row[13]; + $province = $row[14]; + $postal_code = $row[15]; + $country_code = $row[16]; + $gender = $row[17]; + $date_of_birth = $row[18]; + $alt_phone = eregi_replace("[^0-9]", "", $row[19]); + $email = $row[20]; + $security_phrase = $row[21]; + $comments = trim($row[22]); + + if (strlen($list_id_override)>0) + { + $list_id = $list_id_override; + } + if (strlen($phone_code_override)>0) + { + $phone_code = $phone_code_override; + } + + ##### Check for duplicate phone numbers in vicidial_list table for all lists in a campaign ##### + if (eregi("DUPCAMP",$dupcheck)) + { + $dup_lead=0; + $dup_lists=''; + $stmt="select campaign_id from vicidial_lists where list_id='$list_id';"; + $rslt=mysql_query($stmt, $link); + $ci_recs = mysql_num_rows($rslt); + if ($ci_recs > 0) + { + $row=mysql_fetch_row($rslt); + $dup_camp = $row[0]; + + $stmt="select list_id from vicidial_lists where campaign_id='$dup_camp';"; + $rslt=mysql_query($stmt, $link); + $li_recs = mysql_num_rows($rslt); + if ($li_recs > 0) + { + $L=0; + while ($li_recs > $L) + { + $row=mysql_fetch_row($rslt); + $dup_lists .= "'$row[0]',"; + $L++; + } + $dup_lists = eregi_replace(",$",'',$dup_lists); + + $stmt="select list_id from vicidial_list where phone_number='$phone_number' and list_id IN($dup_lists) limit 1;"; + $rslt=mysql_query($stmt, $link); + $pc_recs = mysql_num_rows($rslt); + if ($pc_recs > 0) + { + $dup_lead=1; + $row=mysql_fetch_row($rslt); + $dup_lead_list = $row[0]; + } + if ($dup_lead < 1) + { + if (eregi("$phone_number$US$list_id",$phone_list)) + {$dup_lead++; $dup++;} + } + } + } + } + + ##### Check for duplicate phone numbers in vicidial_list table entire database ##### + if (eregi("DUPSYS",$dupcheck)) + { + $dup_lead=0; + $stmt="select list_id from vicidial_list where phone_number='$phone_number';"; + $rslt=mysql_query($stmt, $link); + $pc_recs = mysql_num_rows($rslt); + if ($pc_recs > 0) + { + $dup_lead=1; + $row=mysql_fetch_row($rslt); + $dup_lead_list = $row[0]; + } + if ($dup_lead < 1) + { + if (eregi("$phone_number$US$list_id",$phone_list)) + {$dup_lead++; $dup++;} + } + } + + ##### Check for duplicate phone numbers in vicidial_list table for one list_id ##### + if (eregi("DUPLIST",$dupcheck)) + { + $dup_lead=0; + $stmt="select count(*) from vicidial_list where phone_number='$phone_number' and list_id='$list_id';"; + $rslt=mysql_query($stmt, $link); + $pc_recs = mysql_num_rows($rslt); + if ($pc_recs > 0) + { + $row=mysql_fetch_row($rslt); + $dup_lead = $row[0]; + } + if ($dup_lead < 1) + { + if (eregi("$phone_number$US$list_id",$phone_list)) + {$dup_lead++; $dup++;} + } + } + + if ( (strlen($phone_number)>6) and ($dup_lead<1) ) + { + if (strlen($phone_code)<1) {$phone_code = '1';} + + $US='_'; + $phone_list .= "$phone_number$US$list_id|"; + + $gmt_offset = lookup_gmt($phone_code,$USarea,$state,$LOCAL_GMT_OFF_STD,$Shour,$Smin,$Ssec,$Smon,$Smday,$Syear,$postalgmt,$postal_code); + + + if ($multi_insert_counter > 8) { + ### insert good deal into pending_transactions table ### + $stmtZ = "INSERT INTO vicidial_list values$multistmt('','$entry_date','$modify_date','$status','$user','$vendor_lead_code','$source_id','$list_id','$gmt_offset','$called_since_last_reset','$phone_code','$phone_number','$title','$first_name','$middle_initial','$last_name','$address1','$address2','$address3','$city','$state','$province','$postal_code','$country_code','$gender','$date_of_birth','$alt_phone','$email','$security_phrase','$comments',0);"; + $rslt=mysql_query($stmtZ, $link); + if ($WeBRooTWritablE > 0) + {fwrite($stmt_file, $stmtZ."\r\n");} + $multistmt=''; + $multi_insert_counter=0; + + } else { + $multistmt .= "('','$entry_date','$modify_date','$status','$user','$vendor_lead_code','$source_id','$list_id','$gmt_offset','$called_since_last_reset','$phone_code','$phone_number','$title','$first_name','$middle_initial','$last_name','$address1','$address2','$address3','$city','$state','$province','$postal_code','$country_code','$gender','$date_of_birth','$alt_phone','$email','$security_phrase','$comments',0),"; + $multi_insert_counter++; + } + + $good++; + } else { + if ($bad < 10000) {print "
record $total BAD- PHONE: $phone_number ROW: |$row[0]| DUP: $dup_lead\n";} + $bad++; + } + $total++; + if ($total%100==0) { + print ""; + usleep(1000); + flush(); + } + } + } + if ($multi_insert_counter!=0) { + $stmtZ = "INSERT INTO vicidial_list values".substr($multistmt, 0, -1).";"; + mysql_query($stmtZ, $link); + if ($WeBRooTWritablE > 0) + {fwrite($stmt_file, $stmtZ."\r\n");} + } + + print "

Done
GOOD: $good       BAD: $bad       TOTAL: $total
"; + + } else { + print "
ERRORE: Il file non ha il numero di campi necessare per essere elaborato.
"; + } + } else if (!eregi(".csv", $leadfile_name)) + { + if ($WeBRooTWritablE > 0) + { + copy($LF_path, "$WeBServeRRooT/vicidial/vicidial_temp_file.xls"); + $lead_file = "$WeBServeRRooT/vicidial/vicidial_temp_file.xls"; + } + else + { + copy($LF_path, "/tmp/vicidial_temp_file.xls"); + $lead_file = "/tmp/vicidial_temp_file.xls"; + } + $file=fopen("$lead_file", "r"); + + # echo "|$WeBServeRRooT/vicidial/listloader.pl --forcelistid=$list_id_override --lead-file=$lead_file|"; + $dupcheckCLI=''; $postalgmtCLI=''; + if (eregi("DUPLIST",$dupcheck)) {$dupcheckCLI='--duplicate-check';} + if (eregi("DUPCAMP",$dupcheck)) {$dupcheckCLI='--duplicate-campaign-check';} + if (eregi("DUPSYS",$dupcheck)) {$dupcheckCLI='--duplicate-system-check';} + if (eregi("POSTAL",$postalgmt)) {$postalgmtCLI='--postal-code-gmt';} + passthru("$WeBServeRRooT/vicidial/listloader.pl --forcelistid=$list_id_override --forcephonecode=$phone_code_override --lead-file=$lead_file $postalgmtCLI $dupcheckCLI"); + + } + else + { + if ($WeBRooTWritablE > 0) + { + copy($LF_path, "$WeBServeRRooT/vicidial/vicidial_temp_file.csv"); + $lead_file = "$WeBServeRRooT/vicidial/vicidial_temp_file.csv"; + } + else + { + copy($LF_path, "/tmp/vicidial_temp_file.csv"); + $lead_file = "/tmp/vicidial_temp_file.csv"; + } + $file=fopen("$lead_file", "r"); + if ($WeBRooTWritablE > 0) + {$stmt_file=fopen("$WeBServeRRooT/vicidial/listloader_stmts.txt", "w");} + + print "
Elaborazione in corsoCSV file... \n"; + + if (strlen($list_id_override)>0) + { + print "

ID LISTA OVERRIDE FOR THIS FILE: $list_id_override

"; + } + if (strlen($phone_code_override)>0) + { + print "

SOVRASCRITTURA DEL CODICE TELEFONO PER QUESTO FILE: $phone_code_override

"; + } + + while($row=fgetcsv($file, 1000, ",")) { + $pulldate=date("Y-m-d H:i:s"); + $entry_date = "$pulldate"; + $modify_date = ""; + $status = "NEW"; + $user =""; + $vendor_lead_code = $row[0]; + $source_code = $row[1]; + $source_id=$source_code; + $list_id = $row[2]; + $gmt_offset = '0'; + $called_since_last_reset='N'; + $phone_code = eregi_replace("[^0-9]", "", $row[3]); + $phone_number = eregi_replace("[^0-9]", "", $row[4]); + $USarea = substr($phone_number, 0, 3); + $title = $row[5]; + $first_name = $row[6]; + $middle_initial = $row[7]; + $last_name = $row[8]; + $address1 = $row[9]; + $address2 = $row[10]; + $address3 = $row[11]; + $city =$row[12]; + $state = $row[13]; + $province = $row[14]; + $postal_code = $row[15]; + $country_code = $row[16]; + $gender = $row[17]; + $date_of_birth = $row[18]; + $alt_phone = eregi_replace("[^0-9]", "", $row[19]); + $email = $row[20]; + $security_phrase = $row[21]; + $comments = trim($row[22]); + + if (strlen($list_id_override)>0) + { + $list_id = $list_id_override; + } + if (strlen($phone_code_override)>0) + { + $phone_code = $phone_code_override; + } + + ##### Check for duplicate phone numbers in vicidial_list table for all lists in a campaign ##### + if (eregi("DUPCAMP",$dupcheck)) + { + $dup_lead=0; + $dup_lists=''; + $stmt="select campaign_id from vicidial_lists where list_id='$list_id';"; + $rslt=mysql_query($stmt, $link); + $ci_recs = mysql_num_rows($rslt); + if ($ci_recs > 0) + { + $row=mysql_fetch_row($rslt); + $dup_camp = $row[0]; + + $stmt="select list_id from vicidial_lists where campaign_id='$dup_camp';"; + $rslt=mysql_query($stmt, $link); + $li_recs = mysql_num_rows($rslt); + if ($li_recs > 0) + { + $L=0; + while ($li_recs > $L) + { + $row=mysql_fetch_row($rslt); + $dup_lists .= "'$row[0]',"; + $L++; + } + $dup_lists = eregi_replace(",$",'',$dup_lists); + + $stmt="select list_id from vicidial_list where phone_number='$phone_number' and list_id IN($dup_lists) limit 1;"; + $rslt=mysql_query($stmt, $link); + $pc_recs = mysql_num_rows($rslt); + if ($pc_recs > 0) + { + $dup_lead=1; + $row=mysql_fetch_row($rslt); + $dup_lead_list = $row[0]; + } + if ($dup_lead < 1) + { + if (eregi("$phone_number$US$list_id",$phone_list)) + {$dup_lead++; $dup++;} + } + } + } + } + + ##### Check for duplicate phone numbers in vicidial_list table entire database ##### + if (eregi("DUPSYS",$dupcheck)) + { + $dup_lead=0; + $stmt="select list_id from vicidial_list where phone_number='$phone_number';"; + $rslt=mysql_query($stmt, $link); + $pc_recs = mysql_num_rows($rslt); + if ($pc_recs > 0) + { + $dup_lead=1; + $row=mysql_fetch_row($rslt); + $dup_lead_list = $row[0]; + } + if ($dup_lead < 1) + { + if (eregi("$phone_number$US$list_id",$phone_list)) + {$dup_lead++; $dup++;} + } + } + + ##### Check for duplicate phone numbers in vicidial_list table for one list_id ##### + if (eregi("DUPLIST",$dupcheck)) + { + $dup_lead=0; + $stmt="select count(*) from vicidial_list where phone_number='$phone_number' and list_id='$list_id';"; + $rslt=mysql_query($stmt, $link); + $pc_recs = mysql_num_rows($rslt); + if ($pc_recs > 0) + { + $row=mysql_fetch_row($rslt); + $dup_lead = $row[0]; + } + if ($dup_lead < 1) + { + if (eregi("$phone_number$US$list_id",$phone_list)) + {$dup_lead++; $dup++;} + } + } + + if ( (strlen($phone_number)>6) and ($dup_lead<1) ) + { + if (strlen($phone_code)<1) {$phone_code = '1';} + + $US='_'; + $phone_list .= "$phone_number$US$list_id|"; + + $gmt_offset = lookup_gmt($phone_code,$USarea,$state,$LOCAL_GMT_OFF_STD,$Shour,$Smin,$Ssec,$Smon,$Smday,$Syear,$postalgmt,$postal_code); + + + if ($multi_insert_counter > 8) { + ### insert good deal into pending_transactions table ### + $stmtZ = "INSERT INTO vicidial_list values$multistmt('','$entry_date','$modify_date','$status','$user','$vendor_lead_code','$source_id','$list_id','$gmt_offset','$called_since_last_reset','$phone_code','$phone_number','$title','$first_name','$middle_initial','$last_name','$address1','$address2','$address3','$city','$state','$province','$postal_code','$country_code','$gender','$date_of_birth','$alt_phone','$email','$security_phrase','$comments',0);"; + $rslt=mysql_query($stmtZ, $link); + if ($WeBRooTWritablE > 0) + {fwrite($stmt_file, $stmtZ."\r\n");} + $multistmt=''; + $multi_insert_counter=0; + + } else { + $multistmt .= "('','$entry_date','$modify_date','$status','$user','$vendor_lead_code','$source_id','$list_id','$gmt_offset','$called_since_last_reset','$phone_code','$phone_number','$title','$first_name','$middle_initial','$last_name','$address1','$address2','$address3','$city','$state','$province','$postal_code','$country_code','$gender','$date_of_birth','$alt_phone','$email','$security_phrase','$comments',0),"; + $multi_insert_counter++; + } + + $good++; + } else { + if ($bad < 10000) {print "
record $total BAD- PHONE: $phone_number ROW: |$row[0]| DUP: $dup_lead\n";} + $bad++; + } + $total++; + if ($total%100==0) { + print ""; + usleep(1000); + flush(); + } + } + if ($multi_insert_counter!=0) { + $stmtZ = "INSERT INTO vicidial_list values".substr($multistmt, 0, -1).";"; + mysql_query($stmtZ, $link); + if ($WeBRooTWritablE > 0) + {fwrite($stmt_file, $stmtZ."\r\n");} + } + + print "

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

ID LISTA OVERRIDE FOR THIS FILE: $list_id_override

"; + } + if (strlen($phone_code_override)>0) + { + print "

SOVRASCRITTURA DEL CODICE TELEFONO PER QUESTO FILE: $phone_code_override

"; + } + $buffer=rtrim(fgets($file, 4096)); + $buffer=stripslashes($buffer); + $row=explode($delimiter, eregi_replace("[\'\"]", "", $buffer)); + + for ($i=0; $i\r\n"; + print "
\r\n"; + print " \r\n"; + print " \r\n"; + + #print " \r\n"; + #print " \r\n"; + #print " \r\n"; + #print " \r\n"; + } + } + else if (!eregi(".csv", $leadfile_name)) + { + if ($WeBRooTWritablE > 0) + { + copy($LF_path, "$WeBServeRRooT/vicidial/vicidial_temp_file.xls"); + $lead_file = "$WeBServeRRooT/vicidial/vicidial_temp_file.xls"; + } + else + { + copy($LF_path, "/tmp/vicidial_temp_file.xls"); + $lead_file = "/tmp/vicidial_temp_file.xls"; + } + + # echo "|$WeBServeRRooT/vicidial/listloader_rowdisplay.pl --lead-file=$lead_file|"; + $dupcheckCLI=''; $postalgmtCLI=''; + if (eregi("DUPLIST",$dupcheck)) {$dupcheckCLI='--duplicate-check';} + if (eregi("DUPCAMP",$dupcheck)) {$dupcheckCLI='--duplicate-campaign-check';} + if (eregi("DUPSYS",$dupcheck)) {$dupcheckCLI='--duplicate-system-check';} + if (eregi("POSTAL",$postalgmt)) {$postalgmtCLI='--postal-code-gmt';} + passthru("$WeBServeRRooT/vicidial/listloader_rowdisplay.pl --lead-file=$lead_file $postalgmtCLI $dupcheckCLI"); + } + else + { + if ($WeBRooTWritablE > 0) + { + copy($LF_path, "$WeBServeRRooT/vicidial/vicidial_temp_file.csv"); + $lead_file = "$WeBServeRRooT/vicidial/vicidial_temp_file.csv"; + } + else + { + copy($LF_path, "/tmp/vicidial_temp_file.csv"); + $lead_file = "/tmp/vicidial_temp_file.csv"; + } + $file=fopen("$lead_file", "r"); + + if ($WeBRooTWritablE > 0) + {$stmt_file=fopen("$WeBServeRRooT/vicidial/listloader_stmts.txt", "w");} + + print "
Elaborazione in corsoCSV file... \n"; + + if (strlen($list_id_override)>0) + { + print "

ID LISTA OVERRIDE FOR THIS FILE: $list_id_override

"; + } + if (strlen($phone_code_override)>0) + { + print "

SOVRASCRITTURA DEL CODICE TELEFONO PER QUESTO FILE: $phone_code_override

"; + } + + $total=0; $good=0; $bad=0; $dup=0; $post=0; $phone_list=''; + $row=fgetcsv($file, 1000, ","); + for ($i=0; $i\r\n"; + print "
\r\n"; + print " \r\n"; + print " \r\n"; + + #print " \r\n"; + #print " \r\n"; + #print " \r\n"; + #print " \r\n"; + } + } + print " \r\n"; + print " \r\n"; + print " \r\n"; + print " \r\n"; + print " \r\n"; + print " \r\n"; + print " \r\n"; + print " \r\n"; + print "
VICIDIAL ColonnaDati File
".strtoupper(eregi_replace("_", " ", mysql_field_name($rslt, $i))).":
$row[$i]
".strtoupper(eregi_replace("_", " ", mysql_field_name($rslt, $i))).":
$row[$i]
        
\r\n"; + # } + print ""; + } +} else if (filesize($leadfile)>8388608) { + print "
ERROR: Il file supera il limite di 8 MB.
"; +} +?> + + + + + + + + +4) ) + { + if (preg_match('/^1$/', $phone_code)) + { + $stmt="select * from vicidial_postal_codes where country_code='$phone_code' and postal_code LIKE \"$postal_code%\";"; + $rslt=mysql_query($stmt, $link); + $pc_recs = mysql_num_rows($rslt); + if ($pc_recs > 0) + { + $row=mysql_fetch_row($rslt); + $gmt_offset = $row[2]; $gmt_offset = eregi_replace("\+","",$gmt_offset); + $dst = $row[3]; + $dst_range = $row[4]; + $PC_processed++; + $postalgmt_found++; + $post++; + } + } + } +if ($postalgmt_found < 1) + { + $PC_processed=0; + ### UNITED STATES ### + if ($phone_code =='1') + { + $stmt="select * from vicidial_phone_codes where country_code='$phone_code' and areacode='$USarea';"; + $rslt=mysql_query($stmt, $link); + $pc_recs = mysql_num_rows($rslt); + if ($pc_recs > 0) + { + $row=mysql_fetch_row($rslt); + $gmt_offset = $row[4]; $gmt_offset = eregi_replace("\+","",$gmt_offset); + $dst = $row[5]; + $dst_range = $row[6]; + $PC_processed++; + } + } + ### MEXICO ### + if ($phone_code =='52') + { + $stmt="select * from vicidial_phone_codes where country_code='$phone_code' and areacode='$USarea';"; + $rslt=mysql_query($stmt, $link); + $pc_recs = mysql_num_rows($rslt); + if ($pc_recs > 0) + { + $row=mysql_fetch_row($rslt); + $gmt_offset = $row[4]; $gmt_offset = eregi_replace("\+","",$gmt_offset); + $dst = $row[5]; + $dst_range = $row[6]; + $PC_processed++; + } + } + ### AUSTRALIA ### + if ($phone_code =='61') + { + $stmt="select * from vicidial_phone_codes where country_code='$phone_code' and state='$state';"; + $rslt=mysql_query($stmt, $link); + $pc_recs = mysql_num_rows($rslt); + if ($pc_recs > 0) + { + $row=mysql_fetch_row($rslt); + $gmt_offset = $row[4]; $gmt_offset = eregi_replace("\+","",$gmt_offset); + $dst = $row[5]; + $dst_range = $row[6]; + $PC_processed++; + } + } + ### ALL OTHER COUNTRY CODES ### + if (!$PC_processed) + { + $PC_processed++; + $stmt="select * from vicidial_phone_codes where country_code='$phone_code';"; + $rslt=mysql_query($stmt, $link); + $pc_recs = mysql_num_rows($rslt); + if ($pc_recs > 0) + { + $row=mysql_fetch_row($rslt); + $gmt_offset = $row[4]; $gmt_offset = eregi_replace("\+","",$gmt_offset); + $dst = $row[5]; + $dst_range = $row[6]; + $PC_processed++; + } + } + } + +### Find out if DST to raise the gmt offset ### +$AC_GMT_diff = ($gmt_offset - $LOCAL_GMT_OFF_STD); +$AC_localtime = mktime(($Shour + $AC_GMT_diff), $Smin, $Ssec, $Smon, $Smday, $Syear); + $hour = date("H",$AC_localtime); + $min = date("i",$AC_localtime); + $sec = date("s",$AC_localtime); + $mon = date("m",$AC_localtime); + $mday = date("d",$AC_localtime); + $wday = date("w",$AC_localtime); + $year = date("Y",$AC_localtime); +$dsec = ( ( ($hour * 3600) + ($min * 60) ) + $sec ); + +$AC_processed=0; +if ( (!$AC_processed) and ($dst_range == 'SSM-FSN') ) + { + if ($DBX) {print " Second Sunday March to First Sunday November\n";} + #********************************************************************** + # SSM-FSN + # This is returns 1 if Daylight Savings Time is in effect and 0 if + # Standard time is in effect. + # Based on Second Sunday March to First Sunday November at 2 am. + # INPUTS: + # mm INTEGER Month. + # dd INTEGER Day of the month. + # ns INTEGER Seconds into the day. + # dow INTEGER Day of week (0=Sunday, to 6=Saturday) + # OPTIONAL INPUT: + # timezone INTEGER hour difference UTC - local standard time + # (DEFAULT is blank) + # make calculations based on UTC time, + # which means shift at 10:00 UTC in April + # and 9:00 UTC in October + # OUTPUT: + # INTEGER 1 = DST, 0 = not DST + # + # S M T W T F S + # 1 2 3 4 5 6 7 + # 8 9 10 11 12 13 14 + #15 16 17 18 19 20 21 + #22 23 24 25 26 27 28 + #29 30 31 + # + # S M T W T F S + # 1 2 3 4 5 6 + # 7 8 9 10 11 12 13 + #14 15 16 17 18 19 20 + #21 22 23 24 25 26 27 + #28 29 30 31 + # + #********************************************************************** + + $USACAN_DST=0; + $mm = $mon; + $dd = $mday; + $ns = $dsec; + $dow= $wday; + + if ($mm < 3 || $mm > 11) { + $USACAN_DST=0; + } elseif ($mm >= 4 and $mm <= 10) { + $USACAN_DST=1; + } elseif ($mm == 3) { + if ($dd > 13) { + $USACAN_DST=1; + } elseif ($dd >= ($dow+8)) { + if ($timezone) { + if ($dow == 0 and $ns < (7200+$timezone*3600)) { + $USACAN_DST=0; + } else { + $USACAN_DST=1; + } + } else { + if ($dow == 0 and $ns < 7200) { + $USACAN_DST=0; + } else { + $USACAN_DST=1; + } + } + } else { + $USACAN_DST=0; + } + } elseif ($mm == 11) { + if ($dd > 7) { + $USACAN_DST=0; + } elseif ($dd < ($dow+1)) { + $USACAN_DST=1; + } elseif ($dow == 0) { + if ($timezone) { # UTC calculations + if ($ns < (7200+($timezone-1)*3600)) { + $USACAN_DST=1; + } else { + $USACAN_DST=0; + } + } else { # ora locale calculations + if ($ns < 7200) { + $USACAN_DST=1; + } else { + $USACAN_DST=0; + } + } + } else { + $USACAN_DST=0; + } + } # end of month checks + if ($DBX) {print " DST: $USACAN_DST\n";} + if ($USACAN_DST) {$gmt_offset++;} + $AC_processed++; + } + +if ( (!$AC_processed) and ($dst_range == 'FSA-LSO') ) + { + if ($DBX) {print " First Sunday April to Last Sunday October\n";} + #********************************************************************** + # FSA-LSO + # This is returns 1 if Daylight Savings Time is in effect and 0 if + # Standard time is in effect. + # Based on first Sunday in April and last Sunday in October at 2 am. + #********************************************************************** + + $USA_DST=0; + $mm = $mon; + $dd = $mday; + $ns = $dsec; + $dow= $wday; + + if ($mm < 4 || $mm > 10) { + $USA_DST=0; + } elseif ($mm >= 5 and $mm <= 9) { + $USA_DST=1; + } elseif ($mm == 4) { + if ($dd > 7) { + $USA_DST=1; + } elseif ($dd >= ($dow+1)) { + if ($timezone) { + if ($dow == 0 and $ns < (7200+$timezone*3600)) { + $USA_DST=0; + } else { + $USA_DST=1; + } + } else { + if ($dow == 0 and $ns < 7200) { + $USA_DST=0; + } else { + $USA_DST=1; + } + } + } else { + $USA_DST=0; + } + } elseif ($mm == 10) { + if ($dd < 25) { + $USA_DST=1; + } elseif ($dd < ($dow+25)) { + $USA_DST=1; + } elseif ($dow == 0) { + if ($timezone) { # UTC calculations + if ($ns < (7200+($timezone-1)*3600)) { + $USA_DST=1; + } else { + $USA_DST=0; + } + } else { # ora locale calculations + if ($ns < 7200) { + $USA_DST=1; + } else { + $USA_DST=0; + } + } + } else { + $USA_DST=0; + } + } # end of month checks + + if ($DBX) {print " DST: $USA_DST\n";} + if ($USA_DST) {$gmt_offset++;} + $AC_processed++; + } + +if ( (!$AC_processed) and ($dst_range == 'LSM-LSO') ) + { + if ($DBX) {print " Last Sunday March to Last Sunday October\n";} + #********************************************************************** + # This is s 1 if Daylight Savings Time is in effect and 0 if + # Standard time is in effect. + # Based on last Sunday in March and last Sunday in October at 1 am. + #********************************************************************** + + $GBR_DST=0; + $mm = $mon; + $dd = $mday; + $ns = $dsec; + $dow= $wday; + + if ($mm < 3 || $mm > 10) { + $GBR_DST=0; + } elseif ($mm >= 4 and $mm <= 9) { + $GBR_DST=1; + } elseif ($mm == 3) { + if ($dd < 25) { + $GBR_DST=0; + } elseif ($dd < ($dow+25)) { + $GBR_DST=0; + } elseif ($dow == 0) { + if ($timezone) { # UTC calculations + if ($ns < (3600+($timezone-1)*3600)) { + $GBR_DST=0; + } else { + $GBR_DST=1; + } + } else { # ora locale calculations + if ($ns < 3600) { + $GBR_DST=0; + } else { + $GBR_DST=1; + } + } + } else { + $GBR_DST=1; + } + } elseif ($mm == 10) { + if ($dd < 25) { + $GBR_DST=1; + } elseif ($dd < ($dow+25)) { + $GBR_DST=1; + } elseif ($dow == 0) { + if ($timezone) { # UTC calculations + if ($ns < (3600+($timezone-1)*3600)) { + $GBR_DST=1; + } else { + $GBR_DST=0; + } + } else { # ora locale calculations + if ($ns < 3600) { + $GBR_DST=1; + } else { + $GBR_DST=0; + } + } + } else { + $GBR_DST=0; + } + } # end of month checks + if ($DBX) {print " DST: $GBR_DST\n";} + if ($GBR_DST) {$gmt_offset++;} + $AC_processed++; + } +if ( (!$AC_processed) and ($dst_range == 'LSO-LSM') ) + { + if ($DBX) {print " Last Sunday October to Last Sunday March\n";} + #********************************************************************** + # This is s 1 if Daylight Savings Time is in effect and 0 if + # Standard time is in effect. + # Based on last Sunday in October and last Sunday in March at 1 am. + #********************************************************************** + + $AUS_DST=0; + $mm = $mon; + $dd = $mday; + $ns = $dsec; + $dow= $wday; + + if ($mm < 3 || $mm > 10) { + $AUS_DST=1; + } elseif ($mm >= 4 and $mm <= 9) { + $AUS_DST=0; + } elseif ($mm == 3) { + if ($dd < 25) { + $AUS_DST=1; + } elseif ($dd < ($dow+25)) { + $AUS_DST=1; + } elseif ($dow == 0) { + if ($timezone) { # UTC calculations + if ($ns < (3600+($timezone-1)*3600)) { + $AUS_DST=1; + } else { + $AUS_DST=0; + } + } else { # ora locale calculations + if ($ns < 3600) { + $AUS_DST=1; + } else { + $AUS_DST=0; + } + } + } else { + $AUS_DST=0; + } + } elseif ($mm == 10) { + if ($dd < 25) { + $AUS_DST=0; + } elseif ($dd < ($dow+25)) { + $AUS_DST=0; + } elseif ($dow == 0) { + if ($timezone) { # UTC calculations + if ($ns < (3600+($timezone-1)*3600)) { + $AUS_DST=0; + } else { + $AUS_DST=1; + } + } else { # ora locale calculations + if ($ns < 3600) { + $AUS_DST=0; + } else { + $AUS_DST=1; + } + } + } else { + $AUS_DST=1; + } + } # end of month checks + if ($DBX) {print " DST: $AUS_DST\n";} + if ($AUS_DST) {$gmt_offset++;} + $AC_processed++; + } + +if ( (!$AC_processed) and ($dst_range == 'FSO-LSM') ) + { + if ($DBX) {print " First Sunday October to Last Sunday March\n";} + #********************************************************************** + # TASMANIA ONLY + # This is s 1 if Daylight Savings Time is in effect and 0 if + # Standard time is in effect. + # Based on first Sunday in October and last Sunday in March at 1 am. + #********************************************************************** + + $AUST_DST=0; + $mm = $mon; + $dd = $mday; + $ns = $dsec; + $dow= $wday; + + if ($mm < 3 || $mm > 10) { + $AUST_DST=1; + } elseif ($mm >= 4 and $mm <= 9) { + $AUST_DST=0; + } elseif ($mm == 3) { + if ($dd < 25) { + $AUST_DST=1; + } elseif ($dd < ($dow+25)) { + $AUST_DST=1; + } elseif ($dow == 0) { + if ($timezone) { # UTC calculations + if ($ns < (3600+($timezone-1)*3600)) { + $AUST_DST=1; + } else { + $AUST_DST=0; + } + } else { # ora locale calculations + if ($ns < 3600) { + $AUST_DST=1; + } else { + $AUST_DST=0; + } + } + } else { + $AUST_DST=0; + } + } elseif ($mm == 10) { + if ($dd > 7) { + $AUST_DST=1; + } elseif ($dd >= ($dow+1)) { + if ($timezone) { + if ($dow == 0 and $ns < (7200+$timezone*3600)) { + $AUST_DST=0; + } else { + $AUST_DST=1; + } + } else { + if ($dow == 0 and $ns < 3600) { + $AUST_DST=0; + } else { + $AUST_DST=1; + } + } + } else { + $AUST_DST=0; + } + } # end of month checks + if ($DBX) {print " DST: $AUST_DST\n";} + if ($AUST_DST) {$gmt_offset++;} + $AC_processed++; + } +if ( (!$AC_processed) and ($dst_range == 'FSO-TSM') ) + { + if ($DBX) {print " First Sunday October to Third Sunday March\n";} + #********************************************************************** + # This is s 1 if Daylight Savings Time is in effect and 0 if + # Standard time is in effect. + # Based on first Sunday in October and third Sunday in March at 1 am. + #********************************************************************** + + $NZL_DST=0; + $mm = $mon; + $dd = $mday; + $ns = $dsec; + $dow= $wday; + + if ($mm < 3 || $mm > 10) { + $NZL_DST=1; + } elseif ($mm >= 4 and $mm <= 9) { + $NZL_DST=0; + } elseif ($mm == 3) { + if ($dd < 14) { + $NZL_DST=1; + } elseif ($dd < ($dow+14)) { + $NZL_DST=1; + } elseif ($dow == 0) { + if ($timezone) { # UTC calculations + if ($ns < (3600+($timezone-1)*3600)) { + $NZL_DST=1; + } else { + $NZL_DST=0; + } + } else { # ora locale calculations + if ($ns < 3600) { + $NZL_DST=1; + } else { + $NZL_DST=0; + } + } + } else { + $NZL_DST=0; + } + } elseif ($mm == 10) { + if ($dd > 7) { + $NZL_DST=1; + } elseif ($dd >= ($dow+1)) { + if ($timezone) { + if ($dow == 0 and $ns < (7200+$timezone*3600)) { + $NZL_DST=0; + } else { + $NZL_DST=1; + } + } else { + if ($dow == 0 and $ns < 3600) { + $NZL_DST=0; + } else { + $NZL_DST=1; + } + } + } else { + $NZL_DST=0; + } + } # end of month checks + if ($DBX) {print " DST: $NZL_DST\n";} + if ($NZL_DST) {$gmt_offset++;} + $AC_processed++; + } + +if ( (!$AC_processed) and ($dst_range == 'TSO-LSF') ) + { + if ($DBX) {print " Third Sunday October to Last Sunday February\n";} + #********************************************************************** + # TSO-LSF + # This is returns 1 if Daylight Savings Time is in effect and 0 if + # Standard time is in effect. Brazil + # Based on Third Sunday October to Last Sunday February at 1 am. + #********************************************************************** + + $BZL_DST=0; + $mm = $mon; + $dd = $mday; + $ns = $dsec; + $dow= $wday; + + if ($mm < 2 || $mm > 10) { + $BZL_DST=1; + } elseif ($mm >= 3 and $mm <= 9) { + $BZL_DST=0; + } elseif ($mm == 2) { + if ($dd < 22) { + $BZL_DST=1; + } elseif ($dd < ($dow+22)) { + $BZL_DST=1; + } elseif ($dow == 0) { + if ($timezone) { # UTC calculations + if ($ns < (3600+($timezone-1)*3600)) { + $BZL_DST=1; + } else { + $BZL_DST=0; + } + } else { # ora locale calculations + if ($ns < 3600) { + $BZL_DST=1; + } else { + $BZL_DST=0; + } + } + } else { + $BZL_DST=0; + } + } elseif ($mm == 10) { + if ($dd < 22) { + $BZL_DST=0; + } elseif ($dd < ($dow+22)) { + $BZL_DST=0; + } elseif ($dow == 0) { + if ($timezone) { # UTC calculations + if ($ns < (3600+($timezone-1)*3600)) { + $BZL_DST=0; + } else { + $BZL_DST=1; + } + } else { # ora locale calculations + if ($ns < 3600) { + $BZL_DST=0; + } else { + $BZL_DST=1; + } + } + } else { + $BZL_DST=1; + } + } # end of month checks + if ($DBX) {print " DST: $BZL_DST\n";} + if ($BZL_DST) {$gmt_offset++;} + $AC_processed++; + } + +if (!$AC_processed) + { + if ($DBX) {print " No DST Method Found\n";} + if ($DBX) {print " DST: 0\n";} + $AC_processed++; + } + +return $gmt_offset; +} \ No newline at end of file diff --git a/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_it/remote_dispo.php b/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_it/remote_dispo.php new file mode 100644 index 00000000..9f8b4a66 --- /dev/null +++ b/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_it/remote_dispo.php @@ -0,0 +1,327 @@ + LICENSE: GPLv2 +### +# this is the remote agent disposition screen for calls sent to remote agents. This allows the remote agent to modify customer information and disposition the call + +# CHANGES +# +# 60619-1626 - Added variable filtering to eliminate SQL injection attack threat +# + + +require("dbconnect.php"); + +$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; +$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; +$PHP_SELF=$_SERVER['PHP_SELF']; +if (isset($_GET["address1"])) {$address1=$_GET["address1"];} + elseif (isset($_POST["address1"])) {$address1=$_POST["address1"];} +if (isset($_GET["address2"])) {$address2=$_GET["address2"];} + elseif (isset($_POST["address2"])) {$address2=$_POST["address2"];} +if (isset($_GET["address3"])) {$address3=$_GET["address3"];} + elseif (isset($_POST["address3"])) {$address3=$_POST["address3"];} +if (isset($_GET["alt_phone"])) {$alt_phone=$_GET["alt_phone"];} + elseif (isset($_POST["alt_phone"])) {$alt_phone=$_POST["alt_phone"];} +if (isset($_GET["call_began"])) {$call_began=$_GET["call_began"];} + elseif (isset($_POST["call_began"])) {$call_began=$_POST["call_began"];} +if (isset($_GET["campaign_id"])) {$campaign_id=$_GET["campaign_id"];} + elseif (isset($_POST["campaign_id"])) {$campaign_id=$_POST["campaign_id"];} +if (isset($_GET["channel"])) {$channel=$_GET["channel"];} + elseif (isset($_POST["channel"])) {$channel=$_POST["channel"];} +if (isset($_GET["channel_group"])) {$channel_group=$_GET["channel_group"];} + elseif (isset($_POST["channel_group"])) {$channel_group=$_POST["channel_group"];} +if (isset($_GET["city"])) {$city=$_GET["city"];} + elseif (isset($_POST["city"])) {$city=$_POST["city"];} +if (isset($_GET["comments"])) {$comments=$_GET["comments"];} + elseif (isset($_POST["comments"])) {$comments=$_POST["comments"];} +if (isset($_GET["country_code"])) {$country_code=$_GET["country_code"];} + elseif (isset($_POST["country_code"])) {$country_code=$_POST["country_code"];} +if (isset($_GET["customer_zap_channel"])) {$customer_zap_channel=$_GET["customer_zap_channel"];} + elseif (isset($_POST["customer_zap_channel"])) {$customer_zap_channel=$_POST["customer_zap_channel"];} +if (isset($_GET["DB"])) {$DB=$_GET["DB"];} + elseif (isset($_POST["DB"])) {$DB=$_POST["DB"];} +if (isset($_GET["dispo"])) {$dispo=$_GET["dispo"];} + elseif (isset($_POST["dispo"])) {$dispo=$_POST["dispo"];} +if (isset($_GET["email"])) {$email=$_GET["email"];} + elseif (isset($_POST["email"])) {$email=$_POST["email"];} +if (isset($_GET["end_call"])) {$end_call=$_GET["end_call"];} + elseif (isset($_POST["end_call"])) {$end_call=$_POST["end_call"];} +if (isset($_GET["extension"])) {$extension=$_GET["extension"];} + elseif (isset($_POST["extension"])) {$extension=$_POST["extension"];} +if (isset($_GET["first_name"])) {$first_name=$_GET["first_name"];} + elseif (isset($_POST["first_name"])) {$first_name=$_POST["first_name"];} +if (isset($_GET["group"])) {$group=$_GET["group"];} + elseif (isset($_POST["group"])) {$group=$_POST["group"];} +if (isset($_GET["last_name"])) {$last_name=$_GET["last_name"];} + elseif (isset($_POST["last_name"])) {$last_name=$_POST["last_name"];} +if (isset($_GET["lead_id"])) {$lead_id=$_GET["lead_id"];} + elseif (isset($_POST["lead_id"])) {$lead_id=$_POST["lead_id"];} +if (isset($_GET["list_id"])) {$list_id=$_GET["list_id"];} + elseif (isset($_POST["list_id"])) {$list_id=$_POST["list_id"];} +if (isset($_GET["parked_time"])) {$parked_time=$_GET["parked_time"];} + elseif (isset($_POST["parked_time"])) {$parked_time=$_POST["parked_time"];} +if (isset($_GET["pass"])) {$pass=$_GET["pass"];} + elseif (isset($_POST["pass"])) {$pass=$_POST["pass"];} +if (isset($_GET["phone_code"])) {$phone_code=$_GET["phone_code"];} + elseif (isset($_POST["phone_code"])) {$phone_code=$_POST["phone_code"];} +if (isset($_GET["phone_number"])) {$phone_number=$_GET["phone_number"];} + elseif (isset($_POST["phone_number"])) {$phone_number=$_POST["phone_number"];} +if (isset($_GET["phone"])) {$phone=$_GET["phone"];} + elseif (isset($_POST["phone"])) {$phone=$_POST["phone"];} +if (isset($_GET["postal_code"])) {$postal_code=$_GET["postal_code"];} + elseif (isset($_POST["postal_code"])) {$postal_code=$_POST["postal_code"];} +if (isset($_GET["province"])) {$province=$_GET["province"];} + elseif (isset($_POST["province"])) {$province=$_POST["province"];} +if (isset($_GET["security"])) {$security=$_GET["security"];} + elseif (isset($_POST["security"])) {$security=$_POST["security"];} +if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} + elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} +if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} + elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} +if (isset($_GET["session_id"])) {$session_id=$_GET["session_id"];} + elseif (isset($_POST["session_id"])) {$session_id=$_POST["session_id"];} +if (isset($_GET["state"])) {$state=$_GET["state"];} + elseif (isset($_POST["state"])) {$state=$_POST["state"];} +if (isset($_GET["status"])) {$status=$_GET["status"];} + elseif (isset($_POST["status"])) {$status=$_POST["status"];} +if (isset($_GET["tsr"])) {$tsr=$_GET["tsr"];} + elseif (isset($_POST["tsr"])) {$tsr=$_POST["tsr"];} +if (isset($_GET["user"])) {$user=$_GET["user"];} + elseif (isset($_POST["user"])) {$user=$_POST["user"];} +if (isset($_GET["vendor_id"])) {$vendor_id=$_GET["vendor_id"];} + elseif (isset($_POST["vendor_id"])) {$vendor_id=$_POST["vendor_id"];} +if (isset($_GET["submit"])) {$submit=$_GET["submit"];} + elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];} +if (isset($_GET["INVIA"])) {$INVIA=$_GET["INVIA"];} + elseif (isset($_POST["INVIA"])) {$INVIA=$_POST["INVIA"];} + +$STARTtime = date("U"); +$TODAY = date("Y-m-d"); +$NOW_TIME = date("Y-m-d H:i:s"); +$FILE_datetime = $STARTtime; + +$ext_context = 'demo'; +if (!isset($begin_date)) {$begin_date = $TODAY;} +if (!isset($end_date)) {$end_date = $TODAY;} + + +$PHP_AUTH_USER = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_USER); +$PHP_AUTH_PW = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_PW); + + + + $stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 2;"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + $auth=$row[0]; + +$fp = fopen ("./project_auth_entries.txt", "a"); +$date = date("r"); +$ip = getenv("REMOTE_ADDR"); +$browser = getenv("HTTP_USER_AGENT"); + + if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or (!$auth)) + { + Header("WWW-Authenticate: Basic realm=\"VICIDIAL-CLOSER\""); + Header("HTTP/1.0 401 Unauthorized"); + echo "Username/Password non validi: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n"; + exit; + } + else + { + + if($auth>0) + { + $office_no=strtoupper($PHP_AUTH_USER); + $password=strtoupper($PHP_AUTH_PW); + $stmt="SELECT full_name from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW'"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + $LOGfullname=$row[0]; + $fullname = $row[0]; + fwrite ($fp, "VD_CLOSER|GOOD|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|$LOGfullname|\n"); + fclose($fp); + + } + else + { + fwrite ($fp, "VD_CLOSER|FAIL|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|\n"); + fclose($fp); + } + } + +?> + + +REMOTE VICIDIAL: disposicion De la Llamada +\n"; +?> + + +
+ +"; + +if ($end_call > 0) +{ + +$call_length = ($STARTtime - $call_began); + + ### insert a NEW record to the vicidial_closer_log table + $stmt="UPDATE vicidial_closer_log set end_epoch='$STARTtime', length_in_sec='" . mysql_real_escape_string($call_length) . "', status='" . mysql_real_escape_string($status) . "', user='$PHP_AUTH_USER' where lead_id='" . mysql_real_escape_string($lead_id) . "' order by start_epoch desc limit 1;"; + if ($DB) {echo "|$stmt|\n";} + $rslt=mysql_query($stmt, $link); + + ### update the lead record in the vicidial_list table + $stmt="UPDATE vicidial_list set status='" . mysql_real_escape_string($status) . "',first_name='" . mysql_real_escape_string($first_name) . "',last_name='" . mysql_real_escape_string($last_name) . "',address1='" . mysql_real_escape_string($address1) . "',address2='" . mysql_real_escape_string($address2) . "',address3='" . mysql_real_escape_string($address3) . "',city='" . mysql_real_escape_string($city) . "',state='" . mysql_real_escape_string($state) . "',province='" . mysql_real_escape_string($province) . "',postal_code='" . mysql_real_escape_string($postal_code) . "',country_code='" . mysql_real_escape_string($country_code) . "',alt_phone='" . mysql_real_escape_string($alt_phone) . "',email='" . mysql_real_escape_string($email) . "',security_phrase='" . mysql_real_escape_string($security) . "',comments='" . mysql_real_escape_string($comments) . "',user='$PHP_AUTH_USER' where lead_id='" . mysql_real_escape_string($lead_id) . "'"; + if ($DB) {echo "|$stmt|\n";} + $rslt=mysql_query($stmt, $link); + + echo "La Chiamata Ha Avuto Un Esito       $NOW_TIME\n

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

\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + + + echo "\n"; + echo "
Vendor ID: $vendor_id     ID Campagna: $campaign_id
Fronter: $tsr     ID Lista: $list_id
Nome:   \n"; + echo " Cognome:
Indirizzo 1 :
Indirizzo 2 :
Indirizzo 3 :
Citta` :
Estado:   \n"; + echo " CAP:
Provincia :
Stato :
Numero Alt :
Email :
Seguridad:
Note :
Esito:
\n"; + echo "


\n"; + + } + else + { + echo "las operaciones de búsqueda del plomo FALLARON para el lead_id $lead_id       $NOW_TIME\n

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

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


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


\nTempo Esecuzione Script: $RUNtime seconds
"; + + +?> + + + + + + + + + + + diff --git a/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_it/user_stats.php b/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_it/user_stats.php new file mode 100644 index 00000000..a78fb1ce --- /dev/null +++ b/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_it/user_stats.php @@ -0,0 +1,408 @@ + LICENSE: GPLv2 +### +# CHANGES +# +# 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 +# 70702-1231 - Added recording location link and truncation +# + +header ("Content-type: text/html; charset=utf-8"); + +require("dbconnect.php"); + +$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; +$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; +$PHP_SELF=$_SERVER['PHP_SELF']; +if (isset($_GET["begin_date"])) {$begin_date=$_GET["begin_date"];} + elseif (isset($_POST["begin_date"])) {$begin_date=$_POST["begin_date"];} +if (isset($_GET["end_date"])) {$end_date=$_GET["end_date"];} + elseif (isset($_POST["end_date"])) {$end_date=$_POST["end_date"];} +if (isset($_GET["user"])) {$user=$_GET["user"];} + elseif (isset($_POST["user"])) {$user=$_POST["user"];} +if (isset($_GET["campaign"])) {$campaign=$_GET["campaign"];} + elseif (isset($_POST["campaign"])) {$campaign=$_POST["campaign"];} +if (isset($_GET["submit"])) {$submit=$_GET["submit"];} + elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];} +if (isset($_GET["INVIA"])) {$INVIA=$_GET["INVIA"];} + elseif (isset($_POST["INVIA"])) {$INVIA=$_POST["INVIA"];} + +$PHP_AUTH_USER = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_USER); +$PHP_AUTH_PW = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_PW); + +$STARTtime = date("U"); +$TODAY = date("Y-m-d"); + +if (!isset($begin_date)) {$begin_date = $TODAY;} +if (!isset($end_date)) {$end_date = $TODAY;} + + $stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 7 and view_reports='1';"; + $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 "Username/Password non validi: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n"; + exit; + } + else + { + + if($auth>0) + { + $stmt="SELECT full_name from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW'"; + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + $LOGfullname=$row[0]; + fwrite ($fp, "VICIDIAL|GOOD|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|$LOGfullname|\n"); + fclose($fp); + } + else + { + fwrite ($fp, "VICIDIAL|FAIL|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|\n"); + fclose($fp); + } + + $stmt="SELECT full_name from vicidial_users where user='$user';"; + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + $full_name = $row[0]; + + } + + + + +?> + + +VICIDIAL ADMIN: User Stats +\n"; +?> + + +
+ + + + + +\n"; +echo "
" ?>   VICIDIAL ADMIN: User Stats for  
  \n"; + +echo "
\n"; +echo "\n"; +echo " to \n"; +echo "  \n"; +echo "\n"; + + +echo "           $user - $full_name\n"; + +echo " - VICIDIAL Time Sheet\n"; +echo " - User Status\n"; +echo " - Modifica Utente\n"; + + +echo "
\n"; + + + $stmt="SELECT count(*),status, sum(length_in_sec) from vicidial_log where user='" . mysql_real_escape_string($user) . "' and call_date >= '" . mysql_real_escape_string($begin_date) . " 0:00:01' and call_date <= '" . mysql_real_escape_string($end_date) . " 23:59:59' group by status order by status"; + $rslt=mysql_query($stmt, $link); + $statuses_to_print = mysql_num_rows($rslt); + +echo "
\n"; + +echo "TEMPO DI CHIAMATA E ESITO:\n"; + +echo "
\n"; +echo "\n"; + + $total_calls=0; + $o=0; + while ($statuses_to_print > $o) { + $row=mysql_fetch_row($rslt); + if (eregi("1$|3$|5$|7$|9$", $o)) + {$bgcolor='bgcolor="#B9CBFD"';} + else + {$bgcolor='bgcolor="#9BB9FB"';} + + $call_seconds = $row[2]; + $call_hours = ($call_seconds / 3600); + $call_hours = round($call_hours, 2); + $call_hours_int = intval("$call_hours"); + $call_minutes = ($call_hours - $call_hours_int); + $call_minutes = ($call_minutes * 60); + $call_minutes_int = round($call_minutes, 0); + if ($call_minutes_int < 10) {$call_minutes_int = "0$call_minutes_int";} + + echo ""; + echo "\n"; + echo "\n"; + $total_calls = ($total_calls + $row[0]); + + $call_seconds=0; + $o++; + } + + $stmt="SELECT sum(length_in_sec) from vicidial_log where user='" . mysql_real_escape_string($user) . "' and call_date >= '" . mysql_real_escape_string($begin_date) . " 0:00:01' and call_date <= '" . mysql_real_escape_string($end_date) . " 23:59:59'"; + $rslt=mysql_query($stmt, $link); + $counts_to_print = mysql_num_rows($rslt); + $row=mysql_fetch_row($rslt); + $call_seconds = $row[0]; + $call_hours = ($call_seconds / 3600); + $call_hours = round($call_hours, 2); + $call_hours_int = intval("$call_hours"); + $call_minutes = ($call_hours - $call_hours_int); + $call_minutes = ($call_minutes * 60); + $call_minutes_int = round($call_minutes, 0); + if ($call_minutes_int < 10) {$call_minutes_int = "0$call_minutes_int";} + +echo "\n"; +echo "
ESITOCUENTAORE:MINUTI
$row[1] $row[0] $call_hours_int:$call_minutes_int
TOTALE CHIAMATE $total_calls $call_hours_int:$call_minutes_int
\n"; +echo "

\n"; + +echo "
\n"; + +echo "TIEMPO LOGIN/LOGOUT:\n"; +echo "\n"; +echo "\n"; + + $stmt="SELECT event,event_epoch,event_date,campaign_id,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); + + $total_calls=0; + $o=0; + $event_start_seconds=''; + $event_stop_seconds=''; + while ($events_to_print > $o) { + $row=mysql_fetch_row($rslt); + if (eregi("LOGIN", $row[0])) + {$bgcolor='bgcolor="#B9CBFD"';} + else + {$bgcolor='bgcolor="#9BB9FB"';} + + if (ereg("LOGIN", $row[0])) + { + $event_start_seconds = $row[1]; + echo ""; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + } + if (ereg("LOGOUT", $row[0])) + { + if ($event_start_seconds) + { + $event_stop_seconds = $row[1]; + $event_seconds = ($event_stop_seconds - $event_start_seconds); + $total_login_time = ($total_login_time + $event_seconds); + $event_hours = ($event_seconds / 3600); + $event_hours = round($event_hours, 2); + $event_hours_int = intval("$event_hours"); + $event_minutes = ($event_hours - $event_hours_int); + $event_minutes = ($event_minutes * 60); + $event_minutes_int = round($event_minutes, 0); + if ($event_minutes_int < 10) {$event_minutes_int = "0$event_minutes_int";} + echo ""; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + $event_start_seconds=''; + $event_stop_seconds=''; + } + else + { + echo ""; + echo "\n"; + echo "\n"; + echo "\n"; + } + } + + $total_calls = ($total_calls + $row[0]); + + $call_seconds=0; + $o++; + } + +$total_login_hours = ($total_login_time / 3600); +$total_login_hours = round($total_login_hours, 2); +$total_login_hours_int = intval("$total_login_hours"); +$total_login_minutes = ($total_login_hours - $total_login_hours_int); +$total_login_minutes = ($total_login_minutes * 60); +$total_login_minutes_int = round($total_login_minutes, 0); +if ($total_login_minutes_int < 10) {$total_login_minutes_int = "0$total_login_minutes_int";} + +echo ""; +echo "\n"; +echo "\n"; +echo "\n"; + +echo "
EVENTO DATA CAMPAGNA GROUPORE:MINUTI
$row[0] $row[2] $row[3] $row[4]
$row[0] $row[2] $row[3] $row[4] $event_hours_int:$event_minutes_int
$row[0] $row[2] $row[3]
TOTALE $total_login_hours_int:$total_login_minutes_int
\n"; + + +echo "

\n"; + +echo "
\n"; + +echo "OUTBOUND CALLS FOR THIS TIME PERIOD: (10000 record limit)\n"; +echo "\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); + $logs_to_print = mysql_num_rows($rslt); + + $u=0; + while ($logs_to_print > $u) { + $row=mysql_fetch_row($rslt); + if (eregi("1$|3$|5$|7$|9$", $u)) + {$bgcolor='bgcolor="#B9CBFD"';} + else + {$bgcolor='bgcolor="#9BB9FB"';} + + $u++; + echo ""; + echo ""; + echo ""; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + + } + + +echo "
# DATE/TIME LENGTH STATUS PHONE CAMPAGNA GROUP LIST LEAD
$u$row[4] $row[7] $row[8] $row[10] $row[3] $row[14] $row[2] $row[1]


\n"; + + + +echo "CLOSER CALLS FOR THIS TIME PERIOD: (10000 record limit)\n"; +echo "\n"; +echo "\n"; + + $stmt="select * from vicidial_closer_log where user='" . mysql_real_escape_string($user) . "' and call_date >= '" . mysql_real_escape_string($begin_date) . " 0:00:01' and call_date <= '" . mysql_real_escape_string($end_date) . " 23:59:59' order by call_date desc limit 10000;"; + $rslt=mysql_query($stmt, $link); + $logs_to_print = mysql_num_rows($rslt); + + $u=0; + while ($logs_to_print > $u) { + $row=mysql_fetch_row($rslt); + if (eregi("1$|3$|5$|7$|9$", $u)) + {$bgcolor='bgcolor="#B9CBFD"';} + else + {$bgcolor='bgcolor="#9BB9FB"';} + + $u++; + echo ""; + echo ""; + echo ""; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + + } + + +echo "
# DATE/TIME LENGTH STATUS PHONE CAMPAGNA WAIT (S) LIST LEAD
$u$row[4] $row[7] $row[8] $row[10] $row[3] $row[14] $row[2] $row[1]


\n"; + + + + +echo "RECORDINGS FOR THIS TIME PERIOD: (10000 record limit)\n"; +echo "\n"; +echo "\n"; + + $stmt="select * from recording_log where user='" . mysql_real_escape_string($user) . "' and start_time >= '" . mysql_real_escape_string($begin_date) . " 0:00:01' and start_time <= '" . mysql_real_escape_string($end_date) . " 23:59:59' order by recording_id desc limit 10000;"; + $rslt=mysql_query($stmt, $link); + $logs_to_print = mysql_num_rows($rslt); + + $u=0; + while ($logs_to_print > $u) + { + $row=mysql_fetch_row($rslt); + if (eregi("1$|3$|5$|7$|9$", $u)) + {$bgcolor='bgcolor="#B9CBFD"';} + else + {$bgcolor='bgcolor="#9BB9FB"';} + + $location = $row[11]; + if (strlen($location)>30) + {$locat = substr($location,0,27); $locat = "$locat...";} + else + {$locat = $location;} + if (eregi("http",$location)) + {$location = "$locat";} + else + {$location = $locat;} + $u++; + echo ""; + echo ""; + echo ""; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + + } + + +echo "
# LEADDATE/TIME SECONDS   RECIDFILENAMELOCATION  
$u $row[12] $row[4] $row[8] $row[0] $row[10] $location  
\n"; + +$ENDtime = date("U"); + +$RUNtime = ($ENDtime - $STARTtime); + +echo "\n\n\n


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


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

\n"; + +echo "VICIDIAL Time Sheet\n"; +echo " - User Stats\n"; +echo " - Modifica Utente\n"; + +echo "
\n"; + + +$ENDtime = date("U"); + +$RUNtime = ($ENDtime - $STARTtime); + +echo "\n\n\n


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


\nTempo Esecuzione Script: $RUNtime seconds
"; + +echo "|$stage|$group|"; + +?> + + +
+ + + + + + + + + diff --git a/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_it/vdremote.php b/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_it/vdremote.php new file mode 100644 index 00000000..5a607cbf --- /dev/null +++ b/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_it/vdremote.php @@ -0,0 +1,602 @@ + LICENSE: GPLv2 +# +# Changes +# 50307-1721 - First version +# 51123-1502 - removed requirement of PHP Globals=on +# 60421-1229 - check GET/POST vars lines with isset to not trigger PHP NOTICES +# 60619-1603 - Added variable filtering to eliminate SQL injection attack threat +# +# make sure you have added a user to the vicidial_users MySQL table with at least user_level 4 to access this page the first time + +$version = '1.1.12'; +$build = '60619-1603'; + +require("dbconnect.php"); + +$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; +$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; +$PHP_SELF=$_SERVER['PHP_SELF']; +if (isset($_GET["ADD"])) {$ADD=$_GET["ADD"];} + elseif (isset($_POST["ADD"])) {$ADD=$_POST["ADD"];} +if (isset($_GET["DB"])) {$DB=$_GET["DB"];} + elseif (isset($_POST["DB"])) {$DB=$_POST["DB"];} +if (isset($_GET["user"])) {$user=$_GET["user"];} + elseif (isset($_POST["user"])) {$user=$_POST["user"];} +if (isset($_GET["force_logout"])) {$force_logout=$_GET["force_logout"];} + elseif (isset($_POST["force_logout"])) {$force_logout=$_POST["force_logout"];} +if (isset($_GET["groups"])) {$groups=$_GET["groups"];} + elseif (isset($_POST["groups"])) {$groups=$_POST["groups"];} +if (isset($_GET["remote_agent_id"])) {$remote_agent_id=$_GET["remote_agent_id"];} + elseif (isset($_POST["remote_agent_id"])) {$remote_agent_id=$_POST["remote_agent_id"];} +if (isset($_GET["user_start"])) {$user_start=$_GET["user_start"];} + elseif (isset($_POST["user_start"])) {$user_start=$_POST["user_start"];} +if (isset($_GET["number_of_lines"])) {$number_of_lines=$_GET["number_of_lines"];} + elseif (isset($_POST["number_of_lines"])) {$number_of_lines=$_POST["number_of_lines"];} +if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} + elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} +if (isset($_GET["conf_exten"])) {$conf_exten=$_GET["conf_exten"];} + elseif (isset($_POST["conf_exten"])) {$conf_exten=$_POST["conf_exten"];} +if (isset($_GET["status"])) {$status=$_GET["status"];} + elseif (isset($_POST["status"])) {$status=$_POST["status"];} +if (isset($_GET["campaign_id"])) {$campaign_id=$_GET["campaign_id"];} + elseif (isset($_POST["campaign_id"])) {$campaign_id=$_POST["campaign_id"];} +if (isset($_GET["groups"])) {$groups=$_GET["groups"];} + elseif (isset($_POST["groups"])) {$groups=$_POST["groups"];} +if (isset($_GET["submit"])) {$submit=$_GET["submit"];} + elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];} +if (isset($_GET["INVIA"])) {$INVIA=$_GET["INVIA"];} + elseif (isset($_POST["INVIA"])) {$INVIA=$_POST["INVIA"];} + +if (!isset($force_logout)) {$force_logout = 0;} + +if ($force_logout) +{ + if( (strlen($PHP_AUTH_USER)>0) or (strlen($PHP_AUTH_PW)>0) ) + { + Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\""); + Header("HTTP/1.0 401 Unauthorized"); + } + echo "Ora non sei collegato. Grazie\n"; + exit; +} + +$PHP_AUTH_USER = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_USER); +$PHP_AUTH_PW = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_PW); + + +$popup_page = './closer_popup.php'; +$STARTtime = date("U"); +$NOW_DATE = date("Y-m-d"); +$NOW_TIME = date("Y-m-d H:i:s"); +if (!isset($query_date)) {$query_date = $NOW_DATE;} + + $stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 3;"; + if ($DB) {echo "|$stmt|\n";} + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + $auth=$row[0]; + +$fp = fopen ("./project_auth_entries.txt", "a"); +$date = date("r"); +$ip = getenv("REMOTE_ADDR"); +$browser = getenv("HTTP_USER_AGENT"); + + if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or (!$auth)) + { + Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\""); + Header("HTTP/1.0 401 Unauthorized"); + echo "Username/Password non validi: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n"; + exit; + } + else + { + header ("Content-type: text/html; charset=utf-8"); + + if($auth>0) + { + $office_no=strtoupper($PHP_AUTH_USER); + $password=strtoupper($PHP_AUTH_PW); + $stmt="SELECT full_name from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW'"; + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + $LOGfullname=$row[0]; + + $stmt="SELECT count(*) from vicidial_remote_agents where user_start='$PHP_AUTH_USER';"; + if ($DB) {echo "|$stmt|\n";} + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + $authx=$row[0]; + + if($authx>0) + { + $stmt="SELECT remote_agent_id,server_ip,number_of_lines from vicidial_remote_agents where user_start='$PHP_AUTH_USER';"; + if ($DB) {echo "|$stmt|\n";} + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + $remote_agent_id=$row[0]; + $server_ip=$row[1]; + if (!$number_of_lines) {$number_of_lines=$row[2];} + + fwrite ($fp, "VDremote|GOOD|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|$LOGfullname|\n"); + fclose($fp); + } + else + { + fwrite ($fp, "VDremote|FAIL|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|$LOGfullname|\n"); + fclose($fp); + echo "This remote agent does not exist: |$PHP_AUTH_USER|\n"; + exit; + } + } + else + { + fwrite ($fp, "VDremote|FAIL|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|\n"); + fclose($fp); + } + } + +echo "\n"; +echo "\n"; +echo "\n"; +if ($ADD==61111) + { + echo"\n"; + } +echo "\n"; +?> + +VICIDIAL, AGENTES REMOTOS: $LOGfullname - $PHP_AUTH_USER "; + +if (!$ADD) {$ADD="31111";} +if ($ADD==31111) {echo "Modifica Operatori Remoti";} +if ($ADD==41111) {echo "Modifica Operatori Remoti";} +if ($ADD==61111) {echo "Remote Agent Status";} +if ($ADD==71111) {echo "Remote Agent Closer Stats";} + + +if (strlen($ADD)>4) + { + ##### get server listing for dynamic pulldown + $stmt="SELECT server_ip,server_description from servers order by server_ip"; + $rslt=mysql_query($stmt, $link); + $servers_to_print = mysql_num_rows($rslt); + $servers_list=''; + + $o=0; + while ($servers_to_print > $o) + { + $rowx=mysql_fetch_row($rslt); + $servers_list .= "\n"; + $o++; + } + + ##### get campaigns listing for dynamic pulldown + $stmt="SELECT campaign_id,campaign_name from vicidial_campaigns order by campaign_id"; + $rslt=mysql_query($stmt, $link); + $campaigns_to_print = mysql_num_rows($rslt); + $campaigns_list=''; + + $o=0; + while ($campaigns_to_print > $o) + { + $rowx=mysql_fetch_row($rslt); + $campaigns_list .= "\n"; + $o++; + } + + ##### get inbound groups listing for checkboxes + if ( (($ADD==31111) or ($ADD==31111)) and (count($groups)<1) ) + { + $stmt="SELECT closer_campaigns from vicidial_remote_agents where remote_agent_id='" . mysql_real_escape_string($remote_agent_id) . "';"; + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + $closer_campaigns = $row[0]; + $closer_campaigns = preg_replace("/ -$/","",$closer_campaigns); + $groups = explode(" ", $closer_campaigns); + } + + $stmt="SELECT group_id,group_name from vicidial_inbound_groups order by group_id"; + $rslt=mysql_query($stmt, $link); + $groups_to_print = mysql_num_rows($rslt); + $groups_list=''; + $groups_value=''; + + $o=0; + while ($groups_to_print > $o) + { + $rowx=mysql_fetch_row($rslt); + $group_id_value = $rowx[0]; + $group_name_value = $rowx[1]; + $groups_list .= "2) {$groups_value .= " -";} + } + +?> + + + +
+
+ + + +
  VICIDIAL, AGENTES REMOTOS:   Logout  
  MODIFICA | ">ESITO | ">STATISTICHE INBOUND
+"; + + $stmt="SELECT * from vicidial_remote_agents where remote_agent_id='" . mysql_real_escape_string($remote_agent_id) . "';"; + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + $remote_agent_id = $row[0]; + $user_start = $row[1]; + $number_of_lines = $row[2]; + $server_ip = $row[3]; + $conf_exten = $row[4]; + $status = $row[5]; + $campaign_id = $row[6]; + +echo "
MODIFICAR UNA ENTRADA DE LOS AGENTES REMOTOS: $row[0]
\n"; +echo "\n"; +echo "\n"; +echo "
\n"; +echo "\n"; +echo "\n"; +echo "\n"; +echo "\n"; +echo "\n"; +echo "\n"; +echo "\n"; +echo "\n"; +echo "
Inizio ID Utente: $user_start
Numero di Linee: (solo cifre)
IP Server: $row[3]
Numero Di Interno Remoto: (number dialed to reach agents [i.e. 913125551212])
Esito:
Campagna: $campaign_id
Gruppi Inbound: \n"; +echo "$groups_list"; +echo "
\n"; +echo "NOTA: Potrebbero passare fino a 30 secondi prima che le modifiche qui effettuate possano essere accettate\n"; + +} + + + + +###################### +# ADD=41111 modify remote agents info in the system +###################### + +if ($ADD==41111) +{ + echo ""; + + if ( (strlen($number_of_lines) < 1) or (strlen($conf_exten) < 2) ) + {echo "
AGENTES ALEJADOS NO MODIFICADOS - Per favore torna indietro e ricontrolla i dati inseriti\n";} + else + { + $stmt="UPDATE vicidial_remote_agents set number_of_lines='" . mysql_real_escape_string($number_of_lines) . "', conf_exten='" . mysql_real_escape_string($conf_exten) . "', status='" . mysql_real_escape_string($status) . "', closer_campaigns='" . mysql_real_escape_string($groups_value) . "' where remote_agent_id='" . mysql_real_escape_string($remote_agent_id) . "';"; + $rslt=mysql_query($stmt, $link); + +# echo "$stmt\n"; + echo "
LOS AGENTES ALEJADOS SE MODIFICARON\n"; + + ### LOG CHANGES TO LOG FILE ### + $fp = fopen ("./admin_changes_log.txt", "a"); + fwrite ($fp, "$date|MODIFY OPERATORI REMOTI ENTRY |$PHP_AUTH_USER|$ip|$stmt|\n"); + fclose($fp); + + } + + $stmt="SELECT * from vicidial_remote_agents where remote_agent_id='" . mysql_real_escape_string($remote_agent_id) . "';"; + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + $remote_agent_id = $row[0]; + $user_start = $row[1]; + $number_of_lines = $row[2]; + $server_ip = $row[3]; + $conf_exten = $row[4]; + $status = $row[5]; + $campaign_id = $row[6]; + +echo "
MODIFICAR UNA ENTRADA DE LOS AGENTES REMOTOS: $row[0]\n"; +echo "\n"; +echo "\n"; +echo "
\n"; +echo "\n"; +echo "\n"; +echo "\n"; +echo "\n"; +echo "\n"; +echo "\n"; +echo "\n"; +echo "\n"; +echo "
Inizio ID Utente: $user_start
Numero di Linee: (solo cifre)
IP Server: $row[3]
Numero Di Interno Remoto: (number dialed to reach agents [i.e. 913125551212])
Esito:
Campagna: $campaign_id
Gruppi Inbound: \n"; +echo "$groups_list"; +echo "
\n"; +echo "NOTA: Potrebbero passare fino a 30 secondi prima che le modifiche qui effettuate possano essere accettate\n"; + +} + + + + +###################### +# ADD=61111 status of remote agent in the system and active calls and queue +###################### + +if ($ADD==61111) +{ + echo "
";
+
+	 if ( (strlen($server_ip) < 2) or (strlen($user) < 2) )
+		{echo "
ERROR AGENTES REMOTOS – Por favor, vuelva atrás y compruebe los datos que introdujo\n";} + else + { + + $users_list = ''; + $k=0; + while($k < $number_of_lines) + { + $nextuser=($user + $k); + $users_list .= "'" . mysql_real_escape_string($nextuser) . "',"; + $k++; + } + $users_list = preg_replace("/.$/","",$users_list); + + echo "VICIDIAL: Remote Agent Time On Calls $NOW_TIME\n\n"; + echo "+------------|--------+--------------+------------+--------+---------------------+---------+\n"; + echo "| STATION | USER | LEADID | CHANNEL | STATUS | START TIME | MINUTES |\n"; + echo "+------------|--------+--------------+------------+--------+---------------------+---------+\n"; + + + $stmt="select extension,user,lead_id,channel,status,last_call_time,UNIX_TIMESTAMP(last_call_time),UNIX_TIMESTAMP(last_call_finish) from vicidial_live_agents where status NOT IN('PAUSED') and server_ip='" . mysql_real_escape_string($server_ip) . "' and user IN($users_list) order by extension;"; + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $talking_to_print = mysql_num_rows($rslt); + if ($talking_to_print > 0) + { + $i=0; + while ($i < $talking_to_print) + { + $leadlink=0; + $row=mysql_fetch_row($rslt); + if (eregi("READY|PAUSED",$row[4])) + { + $row[3]=''; + $row[5]='- IN ATTESA -'; + $row[6]=$row[7]; + } + $extension = sprintf("%-10s", $row[0]); + $user = sprintf("%-6s", $row[1]); + $leadid = sprintf("%-12s", $row[2]); + if ($row[2] > 0) + { + $leadidLINK=$row[2]; + $leadlink++; + if ( eregi("QUEUE",$row[4]) ) {$row[6]=$STARTtime;} + $leadid = "$leadid"; + } + $channel = sprintf("%-10s", $row[3]); + $cc=0; + while ( (strlen($channel) > 10) and ($cc < 100) ) + { + $channel = eregi_replace(".$","",$channel); + $cc++; + if (strlen($channel) <= 10) {$cc=101;} + } + $status = sprintf("%-6s", $row[4]); + $start_time = sprintf("%-19s", $row[5]); + $call_time_S = ($STARTtime - $row[6]); + + $call_time_M = ($call_time_S / 60); + $call_time_M = round($call_time_M, 2); + $call_time_M_int = intval("$call_time_M"); + $call_time_SEC = ($call_time_M - $call_time_M_int); + $call_time_SEC = ($call_time_SEC * 60); + $call_time_SEC = round($call_time_SEC, 0); + if ($call_time_SEC < 10) {$call_time_SEC = "0$call_time_SEC";} + $call_time_MS = "$call_time_M_int:$call_time_SEC"; + $call_time_MS = sprintf("%7s", $call_time_MS); + $G = ''; $EG = ''; + if ($call_time_M_int >= 5) {$G=''; $EG='';} + if ($call_time_M_int >= 10) {$G=''; $EG='';} + + echo "| $G$extension$EG | $G$user$EG | $G$leadid$EG | $G$channel$EG | $G$status$EG | $G$start_time$EG | $G$call_time_MS$EG |\n"; + + $i++; + } + + echo "+------------|--------+--------------+------------+--------+---------------------+---------+\n"; + echo " $i Operatori collegati al server $server_ip\n\n"; + + echo " - 5 o piu` minuti in conversazione\n"; + echo " - Oltre 10 minuti in conversazione\n"; + + } + else + { + echo "**************************************************************************************\n"; + echo "********************************* NESSUN OPERATORE IN CONVERSAZIONE *********************************\n"; + echo "**************************************************************************************\n"; + } + } + +echo "
\n\n"; + +} + + +###################### +# ADD=71111 stats for remote agents from closer logs(vicidial_closer_log) +###################### + +if ($ADD==71111) +{ + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n\n"; + echo "
";
+
+	 if ( (strlen($server_ip) < 2) or (strlen($user) < 2) )
+		{echo "
ERROR AGENTES REMOTOS – Por favor, vuelva atrás y compruebe los datos que introdujo\n";} + else + { + + $users_list = ''; + $k=0; + while($k < $number_of_lines) + { + $nextuser=($user + $k); + $users_list .= "'$nextuser',"; + $k++; + } + $users_list = preg_replace("/.$/","",$users_list); + + $stmt="select count(*),sum(length_in_sec) from vicidial_closer_log where call_date >= '$query_date 00:00:01' and call_date <= '$query_date 23:59:59' and user IN($users_list);"; + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + $in_calls = $row[0]; + $in_time = $row[1]; + $in_time_M = ($in_time / 60); + $in_time_M = round($in_time_M, 2); + $in_time_M_int = intval("$in_time_M"); + $in_time_SEC = ($in_time_M - $in_time_M_int); + $in_time_SEC = ($in_time_SEC * 60); + $in_time_SEC = round($in_time_SEC, 0); + if ($in_time_SEC < 10) {$in_time_SEC = "0$in_time_SEC";} + $in_time_MS = "$in_time_M_int:$in_time_SEC"; + $in_time_MS = sprintf("%7s", $in_time_MS); + + echo "VICIDIAL: Stats de entrada del agente alejado $NOW_TIME\n\n"; + echo "\n"; + echo "Llamadas totales tomadas $query_date: $in_calls\n"; + echo "Tiempo total de conversacion$query_date: $in_time_MS (minutes:seconds)\n"; + echo "\n"; + echo "\n"; + echo "Lista la llamada para $query_date:\n"; + echo "+----------+------------+----------------+------------+--------+---------------------+---------+\n"; + echo "| USER | LEADID | GROUP | PHONE NUM | STATUS | CALL TIME | MINUTES |\n"; + echo "+----------+------------+----------------+------------+--------+---------------------+---------+\n"; + + + $stmt="select user,lead_id,campaign_id,phone_number,status,call_date,length_in_sec from vicidial_closer_log where call_date >= '$query_date 00:00:01' and call_date <= '$query_date 23:59:59' and user IN($users_list) order by call_date;"; + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $talking_to_print = mysql_num_rows($rslt); + if ($talking_to_print > 0) + { + $i=0; + while ($i < $talking_to_print) + { + $row=mysql_fetch_row($rslt); + $user = sprintf("%-8s", $row[0]); + $leadid = sprintf("%-10s", $row[1]); + $group = sprintf("%-14s", $row[2]); + $phone = sprintf("%-10s", $row[3]); + $status = sprintf("%-6s", $row[4]); + $start_time = sprintf("%-19s", $row[5]); + $call_time_S = $row[6]; + + $call_time_M = ($call_time_S / 60); + $call_time_M = round($call_time_M, 2); + $call_time_M_int = intval("$call_time_M"); + $call_time_SEC = ($call_time_M - $call_time_M_int); + $call_time_SEC = ($call_time_SEC * 60); + $call_time_SEC = round($call_time_SEC, 0); + if ($call_time_SEC < 10) {$call_time_SEC = "0$call_time_SEC";} + $call_time_MS = "$call_time_M_int:$call_time_SEC"; + $call_time_MS = sprintf("%7s", $call_time_MS); + $G = ''; $EG = ''; + # if ($call_time_M_int >= 5) {$G=''; $EG='';} + # if ($call_time_M_int >= 10) {$G=''; $EG='';} + + echo "| $G$user$EG | $G$leadid$EG | $G$group$EG | $G$phone$EG | $G$status$EG | $G$start_time$EG | $G$call_time_MS$EG |\n"; + + $i++; + } + + echo "+----------+------------+----------------+------------+--------+---------------------+---------+\n"; + # echo " $i Operatori collegati al server $server_ip\n\n"; + + # echo " - 5 o piu` minuti in conversazione\n"; + # echo " - Oltre 10 minuti in conversazione\n"; + + } + else + { + echo "**************************************************************************************\n"; + echo "*********************************NESSUNA CHIAMATA IN QUESTO GIORNO*******************************\n"; + echo "**************************************************************************************\n"; + } + } + +echo "
\n\n"; + +} + + + + + +$ENDtime = date("U"); + +$RUNtime = ($ENDtime - $STARTtime); + +echo "\n\n\n


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


\nTempo Esecuzione Script: $RUNtime seconds
"; + + +?> + + +
+ + + + + + + + + diff --git a/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_it/welcome.php b/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_it/welcome.php new file mode 100644 index 00000000..37f0d438 --- /dev/null +++ b/agc_2-X/branches/agc_2.0.4/LANG_www/vicidial_it/welcome.php @@ -0,0 +1,25 @@ + LICENSE: GPLv2 +# + +echo "VICIDIAL Benvenuto\n"; +echo "\n"; +echo "\n"; +echo "




"; +echo ""; +echo ""; +echo "\n"; +echo "\n"; +echo "\n"; +echo "\n"; +echo "\n"; +echo "\n"; +echo "
Benvenuti
 
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/branches/agc_2.0.4/UPGRADE b/agc_2-X/branches/agc_2.0.4/UPGRADE index 42196711..8bce9fb0 100644 --- a/agc_2-X/branches/agc_2.0.4/UPGRADE +++ b/agc_2-X/branches/agc_2.0.4/UPGRADE @@ -29,7 +29,13 @@ NOTE: Upgrading from 1.1.12-3 to 2.0.1 is at the bottom 5. Several bug fixes in agent logging and Remote Agents functions -6. Added ip_relay to allow for loopback IAX trunks that make true blind monitoring possible for all agents no matter their phone type 0860XXXX. +6. Added ip_relay to allow for loopback IAX trunks that make true blind + monitoring possible for all agents no matter their phone type 0860XXXX. + +7. Several code changes for better UTF8 compatibility with the database as well + as special character leads in the agent screen, lead loading + + ########## UPGRADING FROM 2.0.3 TO 2.0.4 ########## diff --git a/agc_2-X/branches/agc_2.0.4/bin/VICIDIAL_IN_new_leads_file.pl b/agc_2-X/branches/agc_2.0.4/bin/VICIDIAL_IN_new_leads_file.pl index 298c2f27..0f2afc4d 100644 --- a/agc_2-X/branches/agc_2.0.4/bin/VICIDIAL_IN_new_leads_file.pl +++ b/agc_2-X/branches/agc_2.0.4/bin/VICIDIAL_IN_new_leads_file.pl @@ -26,6 +26,7 @@ # 70801-0912 - Added called count and status to import leads format (fields 24 and 25) # 70815-2128 - Added entry_date to import leads format (field 26) # 80128-0105 - Fixed bugs in file loading +# 80428-0320 - UTF8 update # $secX = time(); @@ -211,6 +212,23 @@ use DBI; $dbhA = DBI->connect("DBI:mysql:$VARDB_database:$VARDB_server:$VARDB_port", "$VARDB_user", "$VARDB_pass") or die "Couldn't connect to database: " . DBI->errstr; +############################################# +##### START SYSTEM_SETTINGS LOOKUP ##### +$stmtA = "SELECT use_non_latin FROM system_settings;"; +$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; +$sthA->execute or die "executing: $stmtA ", $dbhA->errstr; +$sthArows=$sthA->rows; +if ($sthArows > 0) + { + @aryA = $sthA->fetchrow_array; + $non_latin = "$aryA[0]"; + } +$sthA->finish(); +##### END SETTINGS LOOKUP ##### +########################################### + +if ($non_latin > 0) {$affected_rows = $dbhA->do("SET NAMES 'UTF8'");} + $suf = '.txt'; $people_packages_id_update=''; $dir1 = "$PATHhome/LEADS_IN"; diff --git a/agc_2-X/branches/agc_2.0.4/docs/SCRATCH_INSTALL.txt b/agc_2-X/branches/agc_2.0.4/docs/SCRATCH_INSTALL.txt index 03597d06..d72b9a32 100644 --- a/agc_2-X/branches/agc_2.0.4/docs/SCRATCH_INSTALL.txt +++ b/agc_2-X/branches/agc_2.0.4/docs/SCRATCH_INSTALL.txt @@ -1720,6 +1720,13 @@ to use our new mysql script file to add the tables to the database: ######------ BEGIN Mysql data entry(you can copy and paste this into terminal) # create database asterisk; +NOTE: if you will be using lead files with a language that does not use the +standard latin character set then you will want to use UTF8 for your default +characterset in the MySQL database. This requires at least MySQL 4.1.11 and you +can use the following query to create the database: + CREATE DATABASE `asterisk` DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci; + + GRANT SELECT,INSERT,UPDATE,DELETE,LOCK TABLES on asterisk.* TO cron@'%' IDENTIFIED BY '1234'; GRANT SELECT,INSERT,UPDATE,DELETE,LOCK TABLES on asterisk.* TO cron@localhost IDENTIFIED BY '1234'; diff --git a/agc_2-X/branches/agc_2.0.4/extras/UTF8_lead_file.txt b/agc_2-X/branches/agc_2.0.4/extras/UTF8_lead_file.txt new file mode 100644 index 00000000..06e3f49a --- /dev/null +++ b/agc_2-X/branches/agc_2.0.4/extras/UTF8_lead_file.txt @@ -0,0 +1,16 @@ +100001|10001|108|1|7275551213|MR|GREEK|P|Ενεργές|249 τηλ. συνδέσεις|||Καταγραμμένων|FL||33709|USA|M|1970-01-01|7275551212|test@test.com|nothing|Ελεγχος τηλ.σύνδεσης διάσκεψης +100002|10002|108|1|7275551213|MR|FRENCH|P|Vous êtes|249 maintenant déconnecté|||Numéro|FL||33709|USA|M|1970-01-01|7275551212|test@test.com|nothing|VOUS DEVEZ ÊTRE Français +100003|10003|108|1|7275551213|MR|SPANISH|P|Español|249 LA GRABACIÓN DURARÁ|||Inválido|FL||33709|USA|M|1970-01-01|7275551212|test@test.com|nothing|Inválido +100004|10004|108|1|7275551213|MR|RUSSIAN|P|языки|249 здравствулте! там|||MALDON|FL||33709|USA|M|1970-01-01|7275551212|test@test.com|nothing|добро пожаловать +100005|10005|108|1|7275551213|MR|ARABIC|P|مرحبا|249 مرحبا هناك|||MALDON|FL||33709|USA|M|1970-01-01|7275551212|test@test.com|nothing|اللغات +100006|10006|108|1|7275551213|MR|HEBREW|P|שפה, לשון|249 ברכת שלום, שלום, הלו|||MALDON|FL||33709|USA|M|1970-01-01|7275551212|test@test.com|nothing|ברכת "ברוך הבא", קריאת ברכה לאורח או לפנים חדשות +100007|10007|108|1|7275551213|MR|BULGARIAN|P|здравей!|249 говор|||MALDON|FL||33709|USA|M|1970-01-01|7275551212|test@test.com|nothing|добре дошъл домашно огнище +100007|10007|108|1|7275551213|MR|GERMAN|P|größer|249 Mädchen|||MALDON|FL||33709|USA|M|1970-01-01|7275551212|test@test.com|nothing|Mais im Alter von Kartoffel-Käse-Salat-türig +100001|10001|108|1|7275551213|MR|GREEK|P|Ενεργές|249 τηλ. συνδέσεις|||Καταγραμμένων|FL||33709|USA|M|1970-01-01|7275551212|test@test.com|nothing|Ελεγχος τηλ.σύνδεσης διάσκεψης +100002|10002|108|1|7275551213|MR|FRENCH|P|Vous êtes|249 maintenant déconnecté|||Numéro|FL||33709|USA|M|1970-01-01|7275551212|test@test.com|nothing|VOUS DEVEZ ÊTRE Français +100003|10003|108|1|7275551213|MR|SPANISH|P|Español|249 LA GRABACIÓN DURARÁ|||Inválido|FL||33709|USA|M|1970-01-01|7275551212|test@test.com|nothing|Inválido +100004|10004|108|1|7275551213|MR|RUSSIAN|P|языки|249 здравствулте! там|||MALDON|FL||33709|USA|M|1970-01-01|7275551212|test@test.com|nothing|добро пожаловать +100005|10005|108|1|7275551213|MR|ARABIC|P|مرحبا|249 مرحبا هناك|||MALDON|FL||33709|USA|M|1970-01-01|7275551212|test@test.com|nothing|اللغات +100006|10006|108|1|7275551213|MR|HEBREW|P|שפה, לשון|249 ברכת שלום, שלום, הלו|||MALDON|FL||33709|USA|M|1970-01-01|7275551212|test@test.com|nothing|ברכת "ברוך הבא", קריאת ברכה לאורח או לפנים חדשות +100007|10007|108|1|7275551213|MR|BULGARIAN|P|здравей!|249 говор|||MALDON|FL||33709|USA|M|1970-01-01|7275551212|test@test.com|nothing|добре дошъл домашно огнище +100007|10007|108|1|7275551213|MR|GERMAN|P|größer|249 Mädchen|||MALDON|FL||33709|USA|M|1970-01-01|7275551212|test@test.com|nothing|Mais im Alter von Kartoffel-Käse-Salat-türig diff --git a/agc_2-X/branches/agc_2.0.4/translations/it_language_admin.txt b/agc_2-X/branches/agc_2.0.4/translations/it_language_admin.txt new file mode 100644 index 00000000..29fe2439 --- /dev/null +++ b/agc_2-X/branches/agc_2.0.4/translations/it_language_admin.txt @@ -0,0 +1,1537 @@ +# it_language_admin.txt - this file is for the internationalization of the astGUIclient +# admin web pages. The associated install.pl file will take the language as an +# argument and alter the php scripts to the language typed in the command line: +# example: ./install.pl --language=it +# current languages in the file: +# - English - (en) no alterations +# - Italian - (it) first column +***LANGUAGES*** +en-English|it-Italiano| +***FILES*** +vicidial|admin.php|0 +vicidial|dbconnect.php|1 +vicidial|AST_VICIDIAL_hopperlist.php|0 +vicidial|AST_agent_time_sheet.php|0 +vicidial|user_status.php|0 +vicidial|server_stats.php|0 +vicidial|AST_VDADstats.php|0 +vicidial|AST_timeonVDAD.php|0 +vicidial|AST_timeonVDAD_closer.php|0 +vicidial|AST_timeonVDADall.php|0 +vicidial|AST_timeoncall.php|0 +vicidial|AST_timeonpark.php|0 +vicidial|listloader.php|0 +vicidial|listloaderMAIN.php|0 +vicidial|new_listloader_superL.php|0 +vicidial|count.htm|1 +vicidial|help.gif|1 +vicidial|listloader.pl|1 +vicidial|listloader_rowdisplay.pl|1 +vicidial|listloader_super.pl|1 +vicidial|user_stats.php|0 +vicidial|remote_dispo.php|0 +vicidial|group_hourly_stats.php|0 +vicidial|admin_search_lead.php|0 +vicidial|admin_modify_lead.php|0 +vicidial|AST_CLOSERstats.php|0 +vicidial|vdremote.php|0 +vicidial|AST_agent_performance_detail.php|0 +vicidial|AST_agent_performance.php|0 +vicidial|AST_server_performance.php|0 +vicidial|AST_admin_log_display.php|0 +vicidial|AST_timeonVDADallSUMMARY.php|0 +vicidial|inbound_popup.php|0 +vicidial|AST_inboundEXTstats.php|0 +vicidial|welcome.php|0 +***TRANSLATIONS*** +### special translations that should stay at the top of the file ### +BORDER|Border| +VALUE=SUBMIT|VALUE=SUBMIT| +TYPE=SUBMIT|TYPE=Submit| +\.\/images\/|../agc/images/| +help.gif|help.gif| +### BEGIN translation phrases through 1.1.11 release ### +English|Inglese| +Spanish|Spagnolo| +French|Francese| +German|Tedesco| +Italian|Italiano| +You have now logged out. Thank you|Ora non sei collegato. Grazie| +Invalid Username\/Password|Username/Password non validi| +ASTERISK ADMIN: Administration|ASTERISK ADMIN: Amministrazione| +PHONES TABLE|TABELLA TELEFONI| +Phone extension -<\/B> 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.|Extension del telefono -
este campo es donde usted pone los nombres del telefono que aparecen al marcar con asterisco no incluyendo el protocolo o la barra vertical del principio. Por ejemplo: para el telefono SIP/test101 del SIP la extension del telefono sería test101. Tambien, para los telefonos IAX2 compruebe que usted utiliza el nombre del telefono completo: IAX2/IAXphone1@IAXphone1 sería IAXphone1@IAXphone1. Para zap los telefonos 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 telefono.| +Dial Plan Number -<\/B> 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|Número del Dial plan -
este campo está para el número que usted marca para tener el anillo del telefono. Este número se define en el archivo de extensions.conf de su servidor asterisco| +Voicemail Box -<\/B> 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|Caja de Buzon de Voz - este campo es para la caja del Buzon de voz donde van los mensajes para al usuario de este telefono. Utilizamos esto para comprobar los mensajes del Buzon de voz y para que el usuario pueda acceder al Buzon de Voz desde astGUIclient| +Outbound CallerID -<\/B> 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|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| +Phone IP address -<\/B> This field is for the phone`s IP address if it is a VOIP phone. This is an optional field|Direccion IP del telefono - este campo es para la Direccion IP del telefono si es un telefono de VOZIP. Este es un campo opcional| +Computer IP address -<\/B> This field is for the user`s computer IP address. This is an optional field|Direccion IP del ordenador - este campo es para la Direccion IP del ordenador del usuario. Es un campo opcional| +Server IP -<\/B> This menu is where you select which server the phone is active on|IP del servidor - Este menú es donde usted selecciona en que servidor está el telefono activo| +Login -<\/B> The login used for the phone user to get to admin functions|Login - El nombre de usuario del telefono para conseguir los permisos de admin| +Password -<\/B> The password used for the phone user to get to admin functions|Contraseña - la contraseña usada por el usuario del telefono para conseguir los permisos de admin| +Status -<\/B> 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|Estado - el estado del telefono en el sistema, puede ser ACTIVO y ADMIN permiten que los clientes del GUI trabajen. ADMIN permite el acceso a este Web site de administracion. El resto de los estados no permiten el acceso al GUI o al Web de Admin| +Active Account -<\/B> Whether the phone is active to put it in the list in the GUI client|Cuenta activa - si el telefono está activado ponerla en la lista del cliente del GUI| +Phone Type -<\/B> Purely for administrative notes|Tipo de telefono - solamente para informacion administrativas| +Full Name -<\/B> Used by the GUIclient in the list of active phones|Nombre completo - usado por el GUIclient en la lista de telefonos activos| +Company -<\/B> Purely for administrative notes|Compañía - solamente para las notas administrativas| +Picture -<\/B> Not yet Implemented|Cuadro - todavía no puesto en ejecucio`n| +New Messages -<\/B> Number of new voicemail messages for this phone on the Asterisk server|Nuevos mensajes - número de los nuevos mensajes del Buzon de Voz para este telefono en el servidor del asterisco| +Old Messages -<\/B> Number of old voicemail messages for this phone on the Asterisk server|Viejos mensajes - número de los viejos mensajes del Buzon de Voz para este telefono en el servidor del asterisco| +Client Protocol -<\/B> 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|Protocolo del cliente - el protocolo que el telefono utiliza para conectar con el servidor del asterisco: El Sip, IAX2, Zap. Tambien, para los números External remotos o los números SpeedDial que usted desea enumerar como telefonos| +Local GMT -<\/B> 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|GMT local - La diferencia a partir del tiempo malo del ZULÚ del time(or de Greenwich) donde se localiza el telefono. 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| +Manager Login -<\/B> This is the login that the GUI clients for this phone will use to access the Database where the server data resides|conexion del encargado - esta es la conexion que los clientes del GUI para este telefono utilizarán tener acceso a la base de datos donde residen los datos del servidor| +Manager Secret -<\/B> This is the password that the GUI clients for this phone will use to access the Database where the server data resides|Secreto del encargado - esta es la contraseña que los clientes del GUI para este telefono utilizarán tener acceso a la base de datos donde residen los datos del servidor| +VICIDIAL Default User -<\/B> 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|Usuario del defecto de VICIDIAL - este debe poner un valor prefijado en el campo del usuario de VICIDIAL siempre que este usuario del telefono abra a cliente app de astVICIDIAL. Deje el espacio en blanco para ningún usuario| +VICIDIAL Default Pass -<\/B> 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|Paso del defecto de VICIDIAL - este debe poner un valor prefijado en el campo de la contraseña de VICIDIAL siempre que este usuario del telefono abra a cliente app de astVICIDIAL. Deje el espacio en blanco para ningún paso| +VICIDIAL Default Campaign -<\/B> 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|Campaña del defecto de VICIDIAL - este debe poner un valor prefijado en el campo de la campaña de VICIDIAL siempre que este usuario del telefono abra a cliente app de astVICIDIAL. Deje el espacio en blanco para ninguna campaña| +Park Exten -<\/B> This is the default Parking extension for the client apps. Verify that a different one works before you change this|Parque Exten - esta es la extension del estacionamiento del defecto para los apps del cliente. Verifique que diverso trabaje antes de que usted cambie esto| +Conf Exten -<\/B> This is the default Conference park extension for the client apps. Verify that a different one works before you change this|Conf Exten - esta es la extension del parque de la conferencia del defecto para los apps del cliente. Verifique que diverso trabaje antes de que usted cambie esto| +VICIDIAL Park Exten -<\/B> This is the default Parking extension for VICIDIAL client app. Verify that a different one works before you change this|Parque Exten de VICIDIAL - esta es la extension del estacionamiento del defecto para el cliente app de VICIDIAL. Verifique que diverso trabaje antes de que usted cambie esto| +VICIDIAL Park File -<\/B> 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|Archivo del parque de VICIDIAL - este es el nombre del archivo de la extension del parque del defecto VICIDIAL para los apps del cliente. Verifique que diverso trabaje antes de que usted cambie este limitado a 10 caracteres| +Monitor Prefix -<\/B> 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|Prefijo del monitor - este 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| +Recording Exten -<\/B> 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|grabacion Exten - esta es la extension dial plan para la extension de la grabacion 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 Main Exten -<\/B> This is the dial plan extension going to check your voicemail. verify with extensions.conf file before changing|VMAIL Exten principal - esta es la extension dial plan que va a comprobar su voicemail. verifica con el archivo de extensions.conf antes de cambiar| +VMAIL Dump Exten -<\/B> 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|Descarga Exten de VMAIL - este 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| +Exten Context -<\/B> 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|Contexto de Exten - este es el contexto dial plan que este telefono 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 este es el contexto más amplio posible verifica con el archivo de extensions.conf antes de cambiar| +DTMF send Channel -<\/B> 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|DTMF envían el canal - esta 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| +Outbound Call Group -<\/B> 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|Grupo de salida de la llamada - este es el grupo de canal que las llamadas de salida de este telefono 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)| +Browser Location -<\/B> 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|Localizacio`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| +Install Directory -<\/B> 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|Instale el directorio - este 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| +CallerID URL -<\/B> 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|URL de CallerID - Ústa es la Direccion de la tela de la página usada para hacer operaciones de búsqueda de encargo del callerID que es la Direccion de prueba del defecto: http://astguiclient.sf.net/test_callerid_output.php| +VICIDIAL Default URL -<\/B> 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|URL del defecto de VICIDIAL - esta es la Direccion de la tela de la página usada para hacer preguntas de encargo de la forma del Web de VICIDIAL que es la Direccion de prueba del defecto: http://astguiclient.sf.net/test_VICIDIAL_output.php| +Call Logging -<\/B> 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|Registracion 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| +User Switching -<\/B> 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|Conmutacio`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 grabacion en la conversacion de telefono del nuevo usuario| +Conferencing -<\/B> Set to true to allow user to start conference calls with upto six external lines|Comunicacio`n - fije para verdad para permitir que el usuario comience llamadas de conferencia con hasta que seis líneas externas| +Admin Hang Up -<\/B> 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|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| +Admin Hijack -<\/B> 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|Secuestro del Admin - fije para verdad para permitir que el usuario pueda asir y volver a dirigir a su extension 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| +Admin Monitor -<\/B> 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|Monitor del Admin - fije para verdad para permitir que el usuario pueda asir y volver a dirigir a su extension 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| +Call Park -<\/B> 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|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| +Updater Check -<\/B> Set to true to display a popup warning that the updater time has not changed in 20 seconds. Useful for Admin users|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 Logging -<\/B> Set to true to log many actions of astGUIclient usage to a text file on the user`s computer|Af que registra - fije para verdad para registrar muchas acciones del uso astGUIclient a un archivo de texto en la computadora del usuario| +Queue Enabled -<\/B> Set to true to have client apps use the Asterisk Central Queue system. Required for VICIDIAL and recommended for all users|La coleta permitio` - 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| +CallerID Popup -<\/B> Set to true to allow for numbers defined in the extensions.conf file to send CallerID popup screens to astGUIclient users|CallerID Popup - 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| +VMail Button -<\/B> Set to true to display the VOICEMAIL button and the messages count display on astGUIclient|Boto`n de VMail - fije para verdad para exhibir el boton de VOICEMAIL y los mensajes cuentan la exhibicio`n en astGUIclient| +Fast Refresh -<\/B> 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|Rápido restaure - fije para verdad para permitir un nuevo índice de restauran de la informacion 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| +Fast Refresh Rate -<\/B> 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|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 -<\/B> 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|Persistant MySQL - si está permitida la conexion 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| +Auto Dial Next Number -<\/B> 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|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 disposicion de una llamada a menos que seleccionaran "para parar el marcar" en la pantalla de la disposicion| +Stop Rec after each call -<\/B> 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|Pare Rec despue`s de cada llamada - si está permitido el cliente de VICIDIAL parará se está encendiendo cualquier grabacion despue`s de que haya sido cada llamada dispositioned. Útil si usted está haciendo muchos de la grabacion o usted están utilizando una forma de la tela para accionar la grabacion| +DBX Server -<\/B> The MySQL database server that this user should be connecting to|Servidor de DBX - el servidor de la base de datos de MySQL con el cual este usuario debe conectar| +DBX Database -<\/B> The MySQL database that this user should be connecting to. Default is asterisk|Base de datos de DBX - la base de datos de MySQL con la cual este usuario debe conectar. El defecto es asterisco| +DBX User -<\/B> The MySQL user login that this user should be using when connecting. Default is cron|Usuario de DBX - la conexion del usuario de MySQL que este usuario debe utilizar al conectar. El defecto es cron| +DBX Pass -<\/B> The MySQL user password that this user should be using when connecting. Default is 1234|Paso de DBX - la contraseña del usuario de MySQL que este usuario debe utilizar al conectar. El defecto es 1234| +DBX Port -<\/B> The MySQL TCP port that this user should be using when connecting. Default is 3306|DBX viran - el puerto de MySQL hacia el lado de babor TCP que este usuario debe utilizar al conectar. El defecto es 3306| +DBY Server -<\/B> The MySQL database server that this user should be connecting to|Servidor de DBY - el servidor de la base de datos de MySQL con el cual este usuario debe conectar| +DBY Database -<\/B> The MySQL database that this user should be connecting to. Default is asterisk|Base de datos de DBY - la base de datos de MySQL con la cual este usuario debe conectar. El defecto es asterisco| +DBY User -<\/B> The MySQL user login that this user should be using when connecting. Default is cron|Usuario de DBY - la conexion del usuario de MySQL que este usuario debe utilizar al conectar. El defecto es cron| +DBY Pass -<\/B> The MySQL user password that this user should be using when connecting. Default is 1234|Paso de DBY - la contraseña del usuario de MySQL que este usuario debe utilizar al conectar. El defecto es 1234| +DBY Port -<\/B> The MySQL TCP port that this user should be using when connecting. Default is 3306|DBY viran - el puerto de MySQL hacia el lado de babor TCP que este usuario debe utilizar al conectar. El defecto es 3306| +Redirect command sent for channel|Vuelva a dirigir el comando enviado para el canal| +Look up this customer in Customer Service System|Mire para arriba a este cliente en sistema del servicio de cliente| +Redirect command FAILED for channel|Vuelva a dirigir el comando FALLADO para el canal| +PLEASE SELECT A NUMBER AND DATE ABOVE AND CLICK SUBMIT|SELEZIONARE UN NUMERO E UNA DATA QUI IN ALTO E CLICCARE SU INVIA| +Total Calls That came into this number|Totale chiamate ricevute da questo numero| +Average Call Length(seconds) for all Calls|Durata Media Chiamate (secondi) per tutte le chiamate| +Total DROP Calls: (less than 10 seconds)|Totale chiamate ABBATTUTE: (meno di 10 secondi)| +Average Call Length(seconds) for DROP Calls|Durata Media Chiamate (secondi) per le chiamate ABBATTUTE| +GRAPH IN 15 MINUTE INCREMENTS OF TOTAL CALLS|GRAFICO AD INCREMENTO DI 15 MINUTI DEL TOTALE DELLE CHIAMATE| +Click on the channel below that you would like to have directed to your phone|Clicca sul canale che vuoi trasferire al tuo telefono| +LAST 1000 CALLS FOR DATE RANGE|ULTIME 1000 CHIAMATE PER INTERVALLO DI DATA| +Click here to see what leads are in the hopper right now|Clicca qui per vedere quali numeri sono nella coda chiamate in questo momento| +CUSTOM STATUSES WITHIN THIS CAMPAIGN|ESITI PERSONALIZZATI PER QUESTA CAMPAGNA| +PLEASE SELECT A CAMPAIGN ABOVE AND CLICK SUBMIT|PER FAVORE SELEZIONA UNA CAMPAGNA E PREMI INVIA| +PLEASE SELECT A CAMPAIGN AND DATE-TIME ABOVE AND CLICK SUBMIT|PER FAVORE SELEZIONA UNA CAMPAGNA E UNA DATA E PREMI INVIA| +PLEASE SELECT A SERVER, DATE AND TIME RANGE ABOVE AND CLICK SUBMIT|PER FAVORE SELEZIONA UN SERVER, UNA DATA, UN INTERVALLO DI TEMPO E PREMI INVIA| +GRAPH IN 15 MINUTE INCREMENTS OF TOTAL CALLS PLACED FROM THIS CAMPAIGN|GRAFICO AD INCREMENTO DI 15 MINUTI DEL TOTALE DELLE CHIAMATE EFFETTUATE PER QUESTA CAMPAGNA| +ERROR: The file does not have the required number of fields to process it|ERRORE: Il file non ha il numero di campi necessare per essere elaborato| +ERROR: File exceeds the 8MB limit|ERROR: Il file supera il limite di 8 MB| +Please enter the group you want to get hourly stats for|Per favore inserisci il gruppo per il quale vuoi le statistiche orarie| +The search variables you entered are not active in the system|Le variabili di ricerca inserite non sono attive in questo sistema| +Please go back and double check the information you entered and submit again|Per favore torna indietro e controlla di nuovo le informazioni inserite, quindi reinviale di nuovo| +Click here to see the Lead Details|Clicca qui per vedere i dettagli del contatto| +Detail|Dettagliata| +Statuses|Esiti| +HotKeys|Hot-Key| +Pause Codes|Codici Pausa| +Lead Recycling|Riciclaggio Contatti| +SERVERS TABLE|TABELLA SERVER| +Server ID -<\/B> 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|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| +Server Description -<\/B> The field where you use a small phrase to describe the Asterisk server|Descripcio`n del servidor - el campo donde usted utiliza una frase pequeña para describir el servidor del asterisco| +Server IP Address -<\/B> The field where you put the Network IP address of the Asterisk server|IP address del servidor - el campo donde usted puso el IP address de la red del servidor del asterisco| +Active -<\/B> Set whether the Asterisk server is active or inactive|Activo - fije si el servidor del asterisco es activo o inactivo| +Asterisk Version -<\/B> 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|Versio`n del asterisco - fije la versio`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 me`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 manipulacio`n de su Local/ acanala. Tambien, CVS_HEAD actual y las 1.2 aplicaciones diverso encargado y comando del árbol del lanzamiento hicieron salir así que debe ser tratado diverso Tambien| +Max VICIDIAL Trunks -<\/B> 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|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| +Telnet Host -<\/B> 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|Anfitrio`n del telnet - este es la Direccion o el nombre del servidor del asterisco y es co`mo los usos del encargado conectan con e`l de donde están funcionando. Si están funcionando en el servidor del asterisco, despue`s el defecto del ` localhost ` está muy bien| +Telnet Port -<\/B> 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|El telnet vira hacia el lado de babor - este es el puerto de la conexion del encargado del servidor del asterisco y es co`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| +Manager User -<\/B> The username or login used to connect genericly to the Asterisk server manager. Default is `cron`|Usuario del encargado - el username o la conexion conectaba genericly con el encargado del servidor del asterisco. El defecto es `cron`| +Manager Secret -<\/B> The secret or password used to connect genericly to the Asterisk server manager. Default is `1234`|Secreto del encargado - el secreto o la contraseña conectaba genericly con el encargado del servidor del asterisco. El defecto es `1234`| +Manager Update User -<\/B> 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|Usuario en modo actualizacio`n del encargado - el username o la conexion conectaba con el encargado del servidor del asterisco optimizado para las escrituras de la actualizacio`n. Omita es `updatecron` y asume el mismo secreto que el usuario gene`rico| +Manager Listen User -<\/B> 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|El encargado escucha usuario - el username o la conexion 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 gene`rico| +Manager Send User -<\/B> 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|El encargado envía a usuario - el username o la conexion 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 gene`rico| +Server GMT offset -<\/B> The difference in hours from GMT time not adjusted for Daylight-Savings-Time of the server. Default is `-5`|El GMT del servidor compenso` - 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`| +VMail Dump Exten -<\/B> The extension prefix used on this server to send calls directly through agc to a specific voicemail box. Default is `85026666666666`|Descarga Exten - el prefijo de VMail de la extension usado en este servidor para enviar llamadas directamente a trave`s de agc a una caja específica del voicemail. El defecto es `85026666666666`| +VICIDIAL AD extension -<\/B> The default extension if none is present in the campaign to send calls to for VICIDIAL auto dialing. Default is `8365`|Extension del ANUNCIO de VICIDIAL - la extension del defecto si ninguno está presente en la campaña enviar llamadas para a marcar auto de VICIDIAL. El defecto es `8365`| +Default Context -<\/B> The default dial plan context used for scripts that operate for this server. Default is `default`|Contexto del defecto - el contexto dial plan del defecto usado para las escrituras que funcionan para este servidor. El defecto es `defecto`| +User ID -<\/B> 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|Identificacio`n del usuario - este campo es donde usted pone el número de la identificacio`n del usuario de VICIDIAL, puede ser hasta 8 dígitos en longitud, debe ser por lo menos 2 caracteres en longitud| +Password -<\/B> This field is where you put the VICIDIAL users password. Must be at least 2 characters in length|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| +Full Name -<\/B> This field is where you put the VICIDIAL users full name. Must be at least 2 characters in length|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| +User Level -<\/B> 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|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 sesio`n como más cercano, deben ser el nivel de usuario 8 o mayor conseguir en la seccio`n de la tela del admin| +User Group -<\/B> 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|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, este es justo subdividir a usuarios y permitir las características futuras basadas sobre e`l| +Phone Login -<\/B> 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|conexion del telefono - aquí es para donde usted puede fijar un valor de la conexion del telefono 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 conexion de vicidial.php| +Phone Pass -<\/B> 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|Paso del telefono - aquí es para donde usted puede fijar un valor del paso del telefono 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 conexion de vicidial.php| +Delete Users -<\/B> This option if set to 1 allows the user to delete other users of equal or lesser user level from the system|Usuarios de la cancelacio`n - esta opcio`n si el sistema a 1 permite que el usuario suprima a otros usuarios del igual o de poco nivel de usuario del sistema| +Delete User Groups -<\/B> This option if set to 1 allows the user to delete user groups from the system|Suprima a grupos de usuario - esta opcio`n si el sistema a 1 permite que el usuario suprima a grupos de usuario del sistema| +Delete Lists -<\/B> This option if set to 1 allows the user to delete vicidial lists from the system|La cancelacio`n enumera - esta opcio`n si el sistema a 1 permite que el usuario suprima listas vicidial del sistema| +Delete Campaigns -<\/B> This option if set to 1 allows the user to delete vicidial campaigns from the system|La cancelacio`n hace campaña - esta opcio`n si el sistema a 1 permite que el usuario suprima campañas vicidial del sistema| +Delete In-Groups -<\/B> This option if set to 1 allows the user to delete vicidial In-Groups from the system|En-Grupos de la cancelacio`n - esta opcio`n si el sistema a 1 permite que el usuario suprima a En-Grupos vicidial del sistema| +Delete Remote Agents -<\/B> This option if set to 1 allows the user to delete vicidial remote agents from the system|Suprima los agentes alejados - esta opcio`n si el sistema a 1 permite que el usuario suprima agentes alejados vicidial del sistema| +Load Leads -<\/B> 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|La carga conduce - esta opcio`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| +Campaign Detail -<\/B> This option if set to 1 allows the user to view and modify the campaign detail screen elements|Detalle de la campaña - esta opcio`n si el sistema a 1 permite que el usuario visio`n y modifique los elementos de la pantalla del detalle de la campaña| +AGC Admin Access -<\/B> This option if set to 1 allows the user to login to the astGUIclient admin pages|Acceso de AGC Admin - esta opcio`n si el sistema a 1 permite a usuario a la conexion a las páginas astGUIclient del admin| +AGC Delete Phones -<\/B> This option if set to 1 allows the user to delete phone entries in the astGUIclient admin pages|La cancelacio`n de AGC telefona - esta opcio`n si el sistema a 1 permite que el usuario suprima entradas del telefono en las páginas astGUIclient del admin| +Delete Scripts -<\/B> This option if set to 1 allows the user to delete Campaign scripts in the script modification screen|Escrituras de la cancelacio`n - esta opcio`n si el sistema a 1 permite que el usuario suprima las escrituras de la campaña en la pantalla de la modificacio`n de la escritura| +Script ID -<\/B> 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|Identificacio`n de la escritura - este es el nombre corto de una escritura de Vicidial. este necesita ser un identificador único. Intente no utilizar ningunos espacios o puntuacio`n para los caracteres de este máximo 10 del campo, mínimo de 2 caracteres| +Script Name -<\/B> 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|Nombre de la escritura - este es el título de una escritura de Vicidial. este es un resumen corto de los caracteres del máximo 50 de la escritura, mínimo de 2 caracteres. No debe haber espacios o puntuacio`n de la clase en campo de los theis| +Script Comments -<\/B> 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|Comentarios de la escritura - este 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| +Script Text -<\/B> This is where you place the content of a Vicidial Script. Minimum of 2 characters. You can have customer information be auto-populated in this script using --A--field--B-- where field is one of the following fieldnames: vendor_lead_code, source_id, list_id, gmt_offset_now, called_since_last_reset, phone_code, phone_number, title, first_name, middle_initial, last_name, address1, address2, address3, city, state, province, postal_code, country_code, gender, date_of_birth, alt_phone, email, security_phrase, comments. For example, this sentence would print the persons name in it----

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

This would read----

Hello, can I speak with John Doe please? Well hello Mr. Doe how are you today?|Texto de la escritura - aquí es adonde usted pone el contenido de una escritura de Vicidial. Mínimo de 2 caracteres. Usted puede hacer la informacion del cliente automo`vil-poblar en esta escritura usando "--A--campo--B--" donde está uno el campo de los fieldnames siguientes: 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. ¿Por ejemplo, esta oracio`n imprimiría el nombre de las personas en e`l hola, puedo hablar con --A--first_name--B-- --A--last_name--B-- por favor? ¿Título del pozo hola --A--title--B-- --A--last_name--B-- co`mo está usted hoy? Esto leería ¿Hola, puedo hablar Juan Doe por favor? ¿Sr. Doe del pozo hola co`mo está usted hoy?| +Active -<\/B> This determines whether this script can be selected to be used by a campaign|Activo - esto se determina si esta escritura se puede seleccionar para ser utilizado por una campaña| +Campaign ID -<\/B> 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 lengt|Identificacio`n de la campaña - Úste es el nombre corto de la campaña, e`l no es editable despue`s de la sumisio`n inicial, no puede contener espacios y debe estar entre 2 y 8 caracteres en longitud| +Campaign Name -<\/B> This is the description of the campaign, it must be between 6 and 40 characters in length|Nombre de la campaña - esta es la descripcio`n de la campaña, debe estar entre 6 y 40 caracteres en longitud| +Active -<\/B> This is where you set the campaign to Active or Inactive. If Inactive, noone can log into it|Activo - aquí es adonde usted fija la campaña a activo o a inactivo. Si es inactivo, noone puede registrar en e`l| +Park Extension -<\/B> 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|Extension del parque - aquí es donde usted puede modificar para requisitos particulares en-sostiene la música para VICIDIAL. Cercio`rese de que la extension este` en lugar en el extensions.conf y eso que señala al nombre de fichero abajo| +Park File Name -<\/B> 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|Nombre del archivo del parque - aquí es donde usted puede modificar para requisitos particulares en-sostiene la música para VICIDIAL. Cercio`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| +Web Form -<\/B> This is where you can set the custom web page that will be opened when the user clicks on the WEB FORM button|Forma del Web - aquí es donde usted puede fijar el Web page de encargo que será abierto cuando el usuario chasca encendido el boton de la FORMA del WEB| +Allow Closers -<\/B> This is where you can set whether the users of this campaign will have the option to send the call to a closer|Permita Closers - aquí es donde usted puede fijar si los usuarios de esta campaña tendrán la opcio`n para enviar la llamada a un más cercano| +Dial Status -<\/B> This is where you set the statuses that you are wanting to dial on within the lists that are active for the campaign below|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| +List Order - This menu is where you select how the leads that match the statuses selected above will be put in the lead hopper|Orden de la lista - Este menú es donde usted selecciona co`mo los plomos que emparejan los estados seleccionados arriba serán puestos en la tolva del plomo| +select the first leads loaded into the vicidial_list table|seleziona i primi contatti caricati nella tabella vicidial_list| +select the last leads loaded into the vicidial_list table|seleziona gli ultimi contatti caricati nella tabella vicidial_list| +select the highest phone number and works its way down|seleziona il numero di telefono piu` grande e poi scorre verso il basso| +select the lowest phone number and works its way up|seleziona il numero di telefono piu` piccolo e poi scorre verso l`alto| +starts with last names starting with Z and works its way down|comienzo con los nombres pasados comenzando con Z y trabajos su manera abajo| +starts with last names starting with A and works its way up|comienzo con los nombres pasados comenzando con A y trabajos su manera para arriba| +starts with most called leads and works its way down|comienzo con los plomos y los trabajos llamados su manera abajo| +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|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)| +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|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)| +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|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)| +starts with least called leads and works its way up|comienzo con menos plomos y trabajos llamados su manera para arriba| +Hopper Level -<\/B> 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|Tolva llana - este 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 trave`s en un minuto| +Force Reset of Hopper -<\/B> This allows you to wipe out the hopper contents upon form submission. It should be filled again when the VDhopper script runs|Reajuste de la fuerza de la tolva - esto permite que usted limpie fuera del contenido de la tolva sobre la sumisio`n de la forma. Debe ser llenada otra vez cuando la escritura de VDhopper funciona| +Auto Dial Level -<\/B> 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|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 automo`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| +Next Agent Call -<\/B> This determines which agent receives the next call that is available|Llamada siguiente del agente - esto se determina que` agente recibe la llamada siguiente que está disponible| +orders by the random update value in the vicidial_live_agents table|o`rdenes por el valor al azar de la actualizacio`n en la tabla de los vicidial_live_agents| +orders by the last time an agent was sent a call. Results in agents receiving about the same number of calls overall|las o`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| +orders by the last time an agent finished a call. AKA agent waiting longest receives first call|las o`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| +Local Call Time -<\/B> 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|Tiempo de la llamada local - aquí es adonde usted fijo` durante que` horas usted quisiera marcar, según lo determinado por el tiempo local en está en cuál usted está llamando. Esto es controlada por co`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| +Voicemail -<\/B> If defined, calls that would normally DROP would instead be directed to this voicemail box to hear and leave a message|Voicemail - 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| +Dial Timeout -<\/B> 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|Descanso del dial - si está definido, llamadas que normalmente retraso despue`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 Voicemail usted puede desear intentar cambiar este valor entre a 21-26 y ver si los resultados mejoran| +Dial Prefix -<\/B> 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|Prefijo del dial - este campo permite más fácilmente cambiar una trayectoria de marcar a salir con un diverso me`todo sin hacer una recarga en asterisco. El defecto es 9 basados sobre un 91NXXNXXXXXX en el dial plan - extensions.conf| +Campaign CallerID -<\/B> 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|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 opcio`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 Tambien 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| +Campaign VDAD extension -<\/B> 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|Extension de la campaña VDAD - este campo permite una extension 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 e`l se tome. Una encuesta sobre política AGI la muestra adicional es Tambien (8366 agi-VDADtransferSURVEY.agi ) ese ahora incluido los juegos un mensaje a la persona llamada y permite que e`l haga una opcio`n presionando buttons(effectively la pre-investigacio`n el plomo). Observe por favor eso a excepcio`n de los exámenes, llamadas políticas y las caridades esta forma de llamar son ilegales en los Estados Unidos| +Campaign Rec extension -<\/B> 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|Extension de Rec de la Campaña - este campo permite para que una extension de encargo de la grabacion sea utilizada con VICIDIAL. Esto permite que usted utilice diversas extensiones dependiendo sobre cuánto tiempo usted desea permitir una grabacion máxima y que` 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 opcio`n incluida en los ejemplos es 8310 que registrarán en el formato del GSM para hasta que una hora| +Campaign Recording -<\/B> 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|grabacion de la campaña - este menú permite que usted elija que` nivel de la grabacion se permite en esta campaña. NEVER inhabilitará la grabacion en el cliente. ONDEMAND es el defecto y permite que el agente comience y pare a registrar según lo necesitado. ALLCALLS comenzará la grabacion en el cliente siempre que una llamada se envíe a un agente| +Campaign Rec Filename -<\/B> 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|Nombre de fichero de Rec de la campaña - este campo permite que usted modifique el nombre para requisitos particulares de la grabacion cuando la grabacion de la campaña es ONDEMAND o ALLCALLS. Las variables permitidas son CAMPAIGN CUSTPHONE FULLDATE TINYDATE EPOCH AGENT. El defecto es FULLDATE_AGENT y parecería este 20051020-103108_6666. Otro ejemplo es CAMPAIGN_TINYDATE_CUSTPHONE que parecería este TESTCAMP_51020103108_3125551212| +Campaign Script -<\/B> 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|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| +Get Call Launch -<\/B> 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|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| +Answering Machine Message -<\/B> 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|Mensaje del contestador automático - este campo está para entrar en una extension para cegar llamadas de la transferencia a cuando el agente consigue un contestador automático y chasca encendido el boton 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 despue`s que cuelga para arriba| +List ID -<\/B> 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|Identificacio`n de la lista - Úste es el nombre nume`rico de la lista, e`l no es editable despue`s de la sumisio`n inicial, debe contener solamente números y debe estar entre 2 y 8 caracteres en longitud| +List Name -<\/B> This is the description of the list, it must be between 2 and 20 characters in length|Nombre de la lista - esta es la descripcio`n de la lista, debe estar entre 2 y 20 caracteres en longitud| +Campaign -<\/B> This is the campaign that this list belongs to. A list can only be dialed on a single campaign at one time|Campaña - esta es la campaña que esta lista pertenece a. Una lista se puede marcar solamente en una sola campaña contemporáneamente| +Active -<\/B> This defines whether the list is to be dialed on or not|Activo - esto define si la lista debe ser marcada encendido o no| +Reset Lead-Called-Status for this list -<\/B> 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|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| +Group ID -<\/B> 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|Identificacio`n de grupo - Úste es el nombre corto del grupo de entrada, e`l no es editable despue`s de la sumisio`n inicial, no debe contener cualquier espacio y debe estar entre 2 y 20 caracteres en longitud| +Group Name -<\/B> This is the description of the group, it must be between 2 and 30 characters in length. Cannot include dashes, plusses or spaces|Nombre de grupo - esta es la descripcio`n del grupo, debe estar entre 2 y 30 caracteres en longitud. No puede incluir rociadas -, plusses + o espacios| +Group Color -<\/B> 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|Color del grupo - este 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 definicio`n del color de la tuerca hexagonal usted debe recordar poner a # al principio de la secuencia o VICIDIAL no trabajará correctamente| +Active -<\/B> This determines whether this group show up in the selection box when a VICIDIAL agent logs in|Activo - esto se determina si este grupo demuestra para arriba en la caja de la seleccio`n cuando un agente de VICIDIAL entra| +Web Form -<\/B> 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|Forma del Web - esta es la Direccion de encargo que el chascar en el boton de la FORMA del WEB en VICIDIAL le llevará para las llamadas que vienen adentro en este grupo| +Voicemail -<\/B> 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|Voicemail - si está definida, esta es la caja de Voicemail que las llamadas irán en vez a ser caído si no hay agentes disponibles despue`s del tiempo de asimiento están para arriba| +Fronter Display -<\/B> 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|Exhibicio`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| +User ID Start -<\/B> 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|Comienzo de la identificacio`n del usuario - esta es la identificacio`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| +Number of Lines -<\/B> 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|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| +Server IP -<\/B> A remote agent entry is only good for one specific server, here is where you select which server you want|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| +External Extension -<\/B> 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|Extension externa - este es el número que usted desea las llamadas remitidas a. Cercio`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 telefono en el sistema| +Status -<\/B> 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|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| +Campaign -<\/B> 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|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 e`sa que usted desea recibir llamadas de| +Inbound Groups -<\/B> Here is where you select the inbound groups you want to receive calls from if you have selected the CLOSER campaign|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| +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|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 identificacio`n de la lista en la primera columna| +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|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 descripcio`n debe ser 2-30 caracteres en longitud y seleccionable define si demuestra para arriba en VICIDIAL como disposicion| +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|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 disposicion llama apenas presionando una sola llave en su teclado| +User Group -<\/B> 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|Grupo de usuario - este es el nombre corto de un grupo de usuario de Vicidial, intento para no utilizar ningunos espacios o puntuacio`n para los caracteres de este máximo 20 del campo, mínimo de 2 caracteres| +Group Name -<\/B> This is the description of the vicidial user group max of 40 characters|Nombre de grupo - esta es la descripcio`n del máximo vicidial del grupo de usuario de 40 caracteres| +Xfer-Conf DTMF -<\/B> 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|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| +AMD send to vm exten -<\/B> 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|AMD envían a la VM exten - este menú permite que usted defina si un mensaje este` dejado en un contestador automático cuando se detecta la llamada será remitido inmediatamente a la extension del Contestar-Ma`quina-Mensaje si AMD es activo y se determina que la llamada es un contestador automático| +Modify Leads -<\/B> This option if set to 1 allows the user to modify leads in the admin section lead search results page|Modifique los plomos - esta opcio`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 seccio`n del admin| +Hot Keys Active -<\/B> This option if set to 1 allows the user to use the Hot Keys quick-dispositioning function in|Hot Keys activo - esta opcio`n si el sistema a 1 permite que el usuario utilice la funcio`n ra`pida-dispositioning de Hot Keys adentro| +Change Agent Campaign -<\/B> 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|Cambie la campaña del agente - esta opcio`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 e`l| +Agent Choose Ingroups -<\/B> 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|El agente elige Ingroups - esta opcio`n si el sistema a 1 permite que el usuario elija los ingroups de los cuales recibirán llamadas cuando ellos conexion 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| +Lead Filter -<\/B> 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|Filtro del plomo - este es un me`todo de filtrar sus plomos usando un fragmento de una pregunta del SQL. Utilice esta característica con la precaucio`n, e`l es fácil de parar el marcar accidentalmente con la alteracio`n más leve a la declaracio`n del SQL. El defecto no es NINGUNO| +Filter ID -<\/B> 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|Identificacio`n del filtro - este es el nombre corto de un filtro del plomo de Vicidial. este necesita ser un identificador único. No utilice ningunos espacios o puntuacio`n para los caracteres de este máximo 10 del campo, mínimo de 2 caracteres| +Filter Name -<\/B> This is a more descriptive name of the Filter. This is a short summary of the filter. max 30 characters, minimum of 2 characters|Nombre del filtro - este es un nombre más descriptivo del filtro. este es un resumen corto de los caracteres del máximo 30 del filtro, mínimo de 2 caracteres| +Filter Comments -<\/B> This is where you can place comments for a Vicidial Filter such as -calls all California leads-. max 255 characters, minimum of 2 characters|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| +Filter SQL -<\/B> 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 -|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| +Agent Alt Num Dialing -<\/B> This option allows an agent to manually dial the alternate phone number or address3 field after the main number has been called|El marcar nume`rico del Alt del agente - esta opcio`n permite que un agente marque manualmente el número de telefono o el campo alterno address3 despue`s de que se haya llamado el número principal| +Scheduled Callbacks -<\/B> 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|Servicios repetidos programar - esta opcio`n no prohibe a agente a la disposicion una llamada como CALLBK y elige los datos y el tiempo en los cuales el plomo será reactivado| +Agent-Only Callbacks -<\/B> 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|Servicios repetidos del Agente-Solamente - esta opcio`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 Tambien permite que el agente vea sus listados del servicio repetido y los llame detrás cualquier momento desean a| +Agent Call Manual -<\/B> 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|Manual de la llamada del agente - esta opcio`n permite que un agente incorpore manualmente un nuevo plomo en el sistema y los llame. Esto Tambien permite llamar de cualquier número de telefono de su pantalla vicidial y pone esa llamada en su sesio`n. Utilice esta opcio`n con la precaucio`n| +Vicidial Recording -<\/B> 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|grabacion de Vicidial - esta opcio`n puede evitar que un agente haga cualquier grabacion despue`s de que se abran una sesio`n a vicidial. Esta opcio`n debe estar encendido para que vicidial siga la sesio`n de la grabacion de la campaña| +Vicidial Transfers -<\/B> 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|Vicidial transfiere - esta opcio`n puede evitar que un agente abra la transferencia - la sesio`n de la conferencia de vicidial. Si esto es lisiado, el agente no puede llamada de los terceros o la transferencia oculta cualquiera llama| +Delete Filters -<\/B> This option allows the user to be able to delete vicidial lead filters from the system|La cancelacio`n se filtra - esta opcio`n permite que el usuario pueda suprimir los filtros vicidial del plomo del sistema| +Alter Agent Interface Options -<\/B> This option if set to 1 allows the administrative user to modify the Agents interface options in admin.php|Altere las opciones de interfaz del agente - esta opcio`n si el sistema a 1 permite que el usuario administrativo modifique las opciones de interfaz de los agentes en admin.php| +Closer Default Blended -<\/B> This option simply defaults the Blended checkbox on a CLOSER login screen|Un defecto más cercano mezclado - esta opcio`n omite simplemente el checkbox mezclado en una pantalla MÁS CERCANA de la conexion| +FILTER NOT ADDED - there is already a filter entry with this ID|FILTRO NON AGGIUNTO - Esiste gia` un altro filtro con questo ID| +Filter ID, name and SQL must be at least 2 characters in length|ID Filtro, nome e SQL devono essere lunghi almeno 2 caratteri| +Filter ID must be at least 2 characters in length|ID Filtro deve essere lungo almeno 2 caratteri| +Please go back and look at the data you entered|Per favore torna indietro e ricontrolla i dati inseriti| +CLICK HERE TO GO TO THE SUPER LEAD LOADER|CLICCA QUI PER ACCEDERE AL `SUPER LEAD LOADER`| +BACK TO ADMIN|TORNA AD AMMINISTRAZIONE| +File layout to use|Struttura del file da usare| +Standard VICIDIAL|Standard VICIDIAL| +Custom layout|Struttura personalizzata| +CLICK HERE TO GO TO THE BASIC LEAD LOADER|CLICCA QUI PER ACCEDERE AL CARICATORE CONTATTI STANDARD| +SUPER LIST LOADER|SUPER LIST LOADER| +OK TO PROCESS|OK PER ELABORARE| +File data|Dati File| +short description of the filter|breve descrizione del filtro| +Alter Agent Interface Options: |Modifica Opzioni Interfaccia Operatore: | +Click here to delete filter |Clicca qui per cancellare il filtro| +FILTER DELETION COMPLETED:|CANCELLAZIONE FILTRO COMPLETATA:| +ADMIN INTERFACE OPTIONS:|OPZIONI INTERFACCIA AMMINISTRATORE:| +AGENT INTERFACE OPTIONS:|OPZIONI INTERFACCIA OPERATORE:| +Time range:|Intervallo Di Tempo:| +Closer Default Blended:|Un Defecto Más cercano Mezclado:| +Agent Alt Num Dialing:|El Marcar Nume`rico Del Alt Del Agente:| +Scheduled Callbacks:|Servicios repetidos Programar:| +Agent-Only Callbacks:|Richiami esclusivi dell`operatore:| +New Filter Addition|Nueva Adicio`n Del Filtro| +LEAD FILTER LISTINGS:|ELENCO FILTRI CONTATTI:| +FILTER NOT MODIFIED|FILTRO NON MODIFICATO| +FILTER NOT DELETED|FILTRO NON CANCELLATO| +DELETE THIS FILTER|CANCELLA QUESTO FILTRO| +FILTER NOT ADDED|FILTRO NON AGGIUNTO| +Filter Comments: |Commenti Del Filtro: | +FILTER MODIFIED|FILTRO MODIFICATO| +MODIFY A FILTER|MODIFICA UN FILTRO| +ADD NEW FILTER|AGGIUNGI NUOVO FILTRO| +Add New Filter|Agiungi Nuovo Filtro| +Modify Filter|Modifica Filtro| +Delete Filter|Cancella Filtro| +Filter Name: |Nome Del Filtro:| +FILTER ADDED:|FILTRO AGGIUNTO:| +VIEW FILTERS|VISUALIZZA FILTRI| +Lead Filter:|Filtro Contatti:| +Filter SQL:|Filtro Sql:| +Users List|Lista Utenti| +Filter ID: |ID Filtro:| +Filters|Filtri| +Agent Call Manual|Chiamata Manuale Operatore| +Vicidial Recording|Registrazione Vicidial| +Vicidial Transfers|Trasferimenti Vicidial| +Click here for user time sheet|Clicca qui per la tabella degli orari dell`utente| +Click here for user status|Clicca qui per visualizzare lo stato dell`utente| +Click here for user CallBack Holds|Clicca qui per i richiami dell`utente| +Lead Filter|Filtro Contatti| +Click here to see all CallBack Holds in this campaign|Clicca qui per visualizzare tutti i richiami in attesa per questa campagna| +Click here to see all CallBack Holds in this list|Clicca qui per visualizzare tutti i richiami in attesa in questa lista| +STATUS NAME|NOME ESITO| +Script ID|ID Script:| +Script Name|Nome Script| +Script Comments|Note Script| +Script Text|Testo Script| +ADD FILTER|AGGIUNGI FILTRO| +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|overall_user_level: las o`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| +VICIDIAL LIST LOADER FUNCTIONALITY|FUNCIONALIDAD DEL CARGADOR DE LA LISTA DE VICIDIAL| +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|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 Tambien un cargador estupendo nuevo del plomo de la versio`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 validacio`n de datos o la comprobacio`n para duplicados en sí mismo u otras listas, de modo que este` algo usted necesita hacer antes de usted la carga los plomos. Tambien, cercio`rese de que usted haya creado la lista que estos plomos son estar debajo de modo que usted pueda utilizarlos. Hay Tambien 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| +NOTES: The Excel Lead loader functionality is enabled by a series of perl scripts and needs to have a properly configured /home/cron/AST_SERVER_conf.pl file in place on the web server. Also, a couple perl modules must be loaded for it to work as well - OLE-Storage_Lite and Spreadsheet-ParseExcel. You can check for runtime errors in these by looking at your apache error_log file|NOTAS: La funcionalidad del cargador del plomo del sobresalir es permitida por una serie de escrituras del Perl y necesita tener un archivo correctamente configurado de /home/cron/AST_SERVER_conf.pl en lugar en el web server. Tambien, los mo`dulos de un Perl de los pares se deben cargar para ella para trabajar Tambien - oLE-Storage_Lite-Storage_Lite y la Hoja de balance-ParseExcel. Usted puede comprobar para saber si hay errores runtime en estos mirando su archivo del error_log de apache| +Vendor Lead Code - shows up in the Vendor ID field of the GUI|Co`digo del plomo del vendedor - demuestra para arriba en el campo de la identificacio`n del vendedor del GUI| +Source Code - internal use only for admins and DBAs|Co`digo de fuente - uso interno solamente para los admins y DBAs| +List ID - the list number that these leads will show up under|Identificacio`n de la lista - el número de la lista que estos plomos demostrarán para arriba debajo| +Phone Code - the prefix for the phone number - 1 for US, 01144 for UK, 01161 for AUS, etc|Co`digo del telefono - el prefijo para el telefono number(1 para los E.E.U.U., 01144 para Reino Unido, 01161 para AUS, el etc)| +Phone Number - must be at least 8 digits long|Número de telefono - debe ser por lo menos 8 dígitos de largo| +Title - title of the customer - Mr. Ms. Mrs, etc...|Título - título del customer(Mr. Ms señ., etc...)| +NOTE: It can take up to 30 seconds for changes submitted on this screen to go live|NOTA: Potrebbero passare fino a 30 secondi prima che le modifiche qui effettuate possano essere accettate| +USER NOT ADDED - there is already a user in the system with this user number|UTENTE NON AGGIUNTO - Esiste gia` un utente nel sistema con questo numero utente| +USER NOT ADDED - Please go back and look at the data you entered|UTENTE NON AGGIUNTO - Per favore torna indietro e ricontrolla i dati inseriti| +user id must be between 2 and 8 characters long|L`ID utente deve essere lungo tra i 2 e gli 8 caratteri| +full name and password must be at least 2 characters long|il nome e la password devono essere lunghi almeno 2 caratteri| +CAMPAIGN NOT ADDED - there is already a campaign in the system with this ID|CAMPAGNA NON AGGIUNTA - Esiste gia` una campagna nel sistema con questo ID| +CAMPAIGN NOT ADDED - Please go back and look at the data you entered|CAMPAGNA NON AGGIUNTA - Per favore torna indietro e ricontrolla i dati inseriti| +campaign ID must be between 2 and 8 characters in length|L`ID Campagna deve essere lungo tra i 2 e gli 8 caratteri| +campaign name must be between 6 and 40 characters in length|il nome della campagna deve essere lungo tra i 6 e i 40 caratteri| +CAMPAIGN STATUS NOT ADDED - there is already a campaign-status in the system with this name|ESITO CAMPAGNA NON AGGIUNTO - Esiste gia` un esito campagna con questo nome| +CAMPAIGN STATUS NOT ADDED - there is already a global-status in the system with this name|ESITO CAMPAGNA NON AGGIUNTO - esiste gia` un esito globale con questo nome| +CAMPAIGN STATUS NOT ADDED - Please go back and look at the data you entered|ESITO CAMPAGNA NON AGGIUNTO - Per favore torna indietro e ricontrolla i dati inseriti| +status must be between 1 and 8 characters in length|l`esito deve essere lungo tra 1 e 8 caratteri| +status name must be between 2 and 30 characters in length|il nome dell`esito deve essere lungo tra i 2 e i 30 caratteri| +CAMPAIGN HOT KEY NOT ADDED - there is already a campaign hot key in the system with this hot key|CAMPAÚA HOT KEY NO AGREGADA - hay ya una campaña hot key en el sistema con este hot key| +CAMPAIGN HOT KEY NOT ADDED - Please go back and look at the data you entered|CAMPAÚA HOT KEY NO AGREGADA - Per favore torna indietro e ricontrolla i dati inseriti| +hot key must be a single character between 1 and 9|el hot key debe ser un solo carácter entre 1 y 9| +LIST NOT ADDED - there is already a list in the system with this ID|LISTA NON AGGIUNTA - Esiste gia` una lista nel sistema con questo ID| +LIST NOT ADDED - Please go back and look at the data you entered|LISTA NON AGGIUNTA - Per favore torna indietro e ricontrolla i dati inseriti| +List ID must be between 2 and 8 characters in length|La ID de la lista debe estar entre 2 y 8 caracteres en longitud| +List name must be at least 2 characters in length|El nombre de la lista debe ser por lo menos 2 caracteres en longitud| +GROUP NOT ADDED - there is already a group in the system with this ID|GRUPPO NON AGGIUNTO - l`ID specificato e` associato ad un gruppo gia` presente in sistema| +GROUP NOT ADDED - Please go back and look at the data you entered|GRUPPO NON AGGIUNTO - per favore torna indietro e ricontrolla i dati inseriti| +Group ID must be between 2 and 20 characters in length and contain no|L`ID deve essere lungo tra i 2 e i 20 caratteri e non deve contenere| +Group name and group color must be at least 2 characters in length|Il nome ed il colore del gruppo devono essere lunghi almeno 2 caratteri| +REMOTE AGENTS NOT ADDED - there is already a remote agents entry starting with this userID|AGENTES ALEJADOS NO AGREGADOS - hay ya una entrada alejada de los agentes comenzando con esta ID del usuario| +REMOTE AGENTS NOT ADDED - Please go back and look at the data you entered|AGENTES ALEJADOS NO AGREGADOS - Per favore torna indietro e ricontrolla i dati inseriti| +User ID start and external extension must be at least 2 characters in length|El comienzo de la ID del usuario y la extension externa deben ser por lo menos 2 caracteres en longitud| +USER GROUP NOT ADDED - there is already a user group entry with this name|GRUPO de USUARIO NO AGREGADO - hay ya una entrada del grupo de usuario con este nombre| +USER GROUP NOT ADDED - Please go back and look at the data you entered|GRUPO de USUARIO NO AGREGADO - Per favore torna indietro e ricontrolla i dati inseriti| +Group name and description must be at least 2 characters in length|El nombre y la descripcio`n de grupo deben ser por lo menos 2 caracteres en longitud| +USER NOT MODIFIED - Please go back and look at the data you entered|USUARIO NO MODIFICADO - Per favore torna indietro e ricontrolla i dati inseriti| +Password and Full Name each need ot be at least 2 characters in length|La contraseña y el nombre completo cada ot de la necesidad sean por lo menos 2 caracteres en longitud| +CAMPAIGN NOT MODIFIED - Please go back and look at the data you entered|CAMPAÚA NO MODIFICADA - Per favore torna indietro e ricontrolla i dati inseriti| +the campaign name needs to be at least 6 characters in length|el nombre de la campaña necesita ser por lo menos 6 caracteres en longitud| +RESETTING CAMPAIGN LEAD HOPPER|REAJUSTE DE LA TOLVA DEL PLOMO DE LA CAMPAÚA| +Wait 1 minute before dialing next number|Espera 1 minuto antes de marcar el número siguiente| +CAMPAIGN STATUS NOT MODIFIED - Please go back and look at the data you entered|ESTADO de la CAMPAÚA NO MODIFICADO - Per favore torna indietro e ricontrolla i dati inseriti| +the campaign id needs to be at least 2 characters in length|la ID de la campaña necesita ser por lo menos 2 caracteres en longitud| +the campaign status needs to be at least 1 characters in length|el estado de la campaña necesita ser por lo menos los caracteres 1 en longitud| +CUSTOM CAMPAIGN STATUS DELETED|ESTADO DE ENCARGO DE LA CAMPAÚA SUPRIMIDO| +CAMPAIGN HOT KEY NOT MODIFIED - Please go back and look at the data you entered|CAMPAÚA HOT KEY NO MODIFICADA - Per favore torna indietro e ricontrolla i dati inseriti| +the campaign hot key needs to be at least 1 characters in length|el hot key de la campaña necesita ser por lo menos los caracteres 1 en longitud| +CUSTOM CAMPAIGN HOT KEY DELETED|LA CAMPAÚA DE ENCARGO HOT KEY SUPRIMIÚ| +CAMPAIGN NOT MODIFIED - Please go back and look at the data you entered|CAMPAÚA NO MODIFICADA - Per favore torna indietro e ricontrolla i dati inseriti| +the campaign name needs to be at least 6 characters in length|el nombre de la campaña necesita ser por lo menos 6 caracteres en longitud| +LIST NOT MODIFIED - Please go back and look at the data you entered|LISTA NO MODIFICADA - Per favore torna indietro e ricontrolla i dati inseriti| +list name must be at least 2 characters in length|el nombre de la lista debe ser por lo menos 2 caracteres en longitud| +REMOVING LIST HOPPER LEADS FROM OLD CAMPAIGN HOPPER|QUITAR LOS PLOMOS DE LA TOLVA DE LA LISTA DE VIEJA TOLVA DE LA CAMPAÚA| +GROUP NOT MODIFIED - Please go back and look at the data you entered|GRUPO NO MODIFICADO - Per favore torna indietro e ricontrolla i dati inseriti| +group name and group color must be at least 2 characters in length|el color del nombre de grupo y del grupo debe ser por lo menos 2 caracteres en longitud| +REMOTE AGENTS NOT MODIFIED - Please go back and look at the data you entered|AGENTES ALEJADOS NO MODIFICADOS - Per favore torna indietro e ricontrolla i dati inseriti| +User ID Start and External Extension must be at least 2 characters in length|El comienzo de la ID del usuario y la extension externa deben ser por lo menos 2 caracteres en longitud| +REMOTE AGENTS MODIFIED|LOS AGENTES ALEJADOS SE MODIFICARON| +USER GROUP NOT MODIFIED - Please go back and look at the data you entered|GRUPO de USUARIO NO MODIFICADO - Per favore torna indietro e ricontrolla i dati inseriti| +Group name and description must be at least 2 characters in length|El nombre y la descripcio`n de grupo deben ser por lo menos 2 caracteres en longitud| +MODIFY A USERS RECORD|MODIFICA UN UTENTE| +Click here for user stats|Clicca qui per le statistiche dell`utente| +MODIFY A CAMPAIGNS RECORD|MODIFIQUE Un EXPEDIENTE De las CAMPAÚAS| +CONFERENCES TABLE|TABLA DE CONFERENCIAS| +Conference Number -<\/B> 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|Número de la conferencia - este campo es donde usted pone el número del dialpna de la conferencia del meetme. Tambien 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| +Server IP -<\/B> The menu where you select the Asterisk server that this conference will be on|IP del servidor - El menú donde usted selecciona el servidor del asterisco que esta conferencia estará encendido| +PHONE NOT ADDED - there is already a Phone in the system with this extension\/server|telefonO NO AGREGADO - hay ya un telefono en el sistema con esta extension/servidor| +PHONE NOT ADDED - Please go back and look at the data you entered|telefonO NO AGREGADO - Per favore torna indietro e ricontrolla i dati inseriti| +PHONE ADDED|TELEFONO AGGIUNTO| +SERVER NOT ADDED - there is already a server in the system with this ID|SERVER NON AGGIUNTO - Esiste gia` un altro server nel sistema con questo ID| +SERVER NOT ADDED - Please go back and look at the data you entered|SERVER NON AGGIUNTO - Per favore torna indietro e ricontrolla i dati inseriti| +SERVER ADDED|SERVER AGGIUNTO| +CONFERENCE NOT ADDED - there is already a conference in the system with this ID and server|CONFERENZA NON AGGIUNTA - Esiste gia` una conferenza nel sistema con questo ID e server| +CONFERENCE NOT ADDED - Please go back and look at the data you entered|CONFERENZA NON AGGIUNTA - Per favore torna indietro e ricontrolla i dati inseriti| +CONFERENCE ADDED|CONFERENZA AGGIUNTA| +PHONE NOT MODIFIED - there is already a Phone in the system with this extension\/server|TELEFONO NON MODIFICATO - Esiste gia` un Telefono nel sistema con questo interno\/server| +PHONE NOT MODIFIED - Please go back and look at the data you entered|TELEFONO NON MODIFICATO - Per favore torna indietro e ricontrolla i dati inseriti| +PHONE MODIFIED|TELEFONO MODIFICATO| +SERVER NOT MODIFIED - there is already a server in the system with this server_ip|SERVIDOR NO MODIFICADO - hay ya un servidor en el sistema con este server_ip| +SERVER NOT MODIFIED - Please go back and look at the data you entered|SERVIDOR NO MODIFICADO - Per favore torna indietro e ricontrolla i dati inseriti| +SERVER MODIFIED|SERVER MODIFICATO| +CONFERENCE NOT MODIFIED - there is already a Conference in the system with this extension-server|CONFERENCIA - hay ya una conferencia en el sistema con esta extension - servidor NO MODIFICADO| +CONFERENCE NOT MODIFIED - Please go back and look at the data you entered|CONFERENCIA NO MODIFICADA - Per favore torna indietro e ricontrolla i dati inseriti| +You do not have permissions to modify this user|Non hai l`autorizzazione per modificare questo utente| +Click here to delete user|Clicca qui per cancellare questo utente| +Please go back and look at the data you entered|Per favore torna indietro e ricontrolla i dati inseriti| +Click here to delete campaign|Clicca qui per cancellare la campagna| +Click here to delete list and all of its leads|Clicca qui per cancellare la lista e tutti i suoi contatti| +REMOVING LIST LEADS FROM VICIDIAL_LIST TABLE|QUITAR LOS PLOMOS DE LA LISTA DE LA TABLA DE VICIDIAL_LIST| +Click here to delete in-group|Clicca qui per cancellare il gruppo inbound| +Click here to delete remote agent|Chasque aquí para suprimir el agente alejado| +Click here to delete user group|Chasque aquí para suprimir a grupo de usuario| +Click here to delete phone|Clicca qui per cancellare il telefono| +there is already a script entry with this name|hay ya una entrada de la escritura con este nombre| +Script name, description and text must be at least 2 characters in length|El nombre, la descripcio`n y el texto de la escritura deben ser por lo menos 2 caracteres en longitud| +Click here to delete script|Clicca qui per cancellare lo script| +Phone Login|Login Telefono| +Phone Pass|Password Telefono| +Delete Users|Cancella Utenti| +Delete User Groups|Suprima a grupos de usuario| +Delete Lists|Cancella Liste| +Delete Campaigns|Cancella Campagne| +Delete In-Groups|En-Grupos de la cancelacio`n| +Delete Remote Agents|Suprima los agentes alejados| +Delete Script|Cancella Script| +Load Leads|Carica Contatti| +Campaign Detail|Dettagli Campagna| +AGC Admin Access|Acceso de AGC Admin| +AGC Delete Phones|La cancelacio`n de AGC telefona| +SCRIPT NOT ADDED|SCRIPT NON AGGIUNTO| +SCRIPT ADDED|SCRIPT AGGIUNTO| +SCRIPT NOT MODIFIED|SCRIPT NON MODIFICATO| +SCRIPT MODIFIED|SCRIPT MODIFICATO| +DELETE THIS USER|CANCELLA QUESTO UTENTE| +DELETE THIS CAMPAIGN|CANCELLA QUESTA CAMPAGNA| +DELETE THIS LIST|CANCELLA QUESTA LISTA| +DELETE THIS IN-GROUP|CANCELLA QUESTO GRUPPO INBOUND| +DELETE THIS REMOTE AGENT|SUPRIMA ESTE AGENTE ALEJADO| +DELETE THIS USER GROUP|CANCELLA QUESTO GRUPPO UTENTI| +DELETE THIS PHONE|CANCELLA QUESTO TELEFONO| +DELETE THIS SCRIPT|CANCELLA QUESTO SCRIPT| +USER NOT DELETED|UTENTE NON CANCELLATO| +CAMPAIGN NOT DELETED|CAMPAGNA NON CANCELLATA| +LIST NOT DELETED|LISTA NON CANCELLATA| +IN-GROUP NOT DELETED|GRUPPO INBOUND NON CANCELLATO| +REMOTE AGENT NOT DELETED|AGENTE ALEJADO NO SUPRIMIDO| +USER GROUP NOT DELETED|GRUPO DE USUARIO NO SUPRIMIDO| +PHONE NOT DELETED|TELEFONO NON CANCELLATO| +SCRIPT NOT DELETED|SCRIPT NON CANCELLATO| +USER DELETION CONFIRMATION|CONFIRMACIo`N DE LA CANCELADURA DEL USUARIO| +USER DELETION COMPLETED|CANCELADURA DEL USUARIO TERMINADA| +CAMPAIGN DELETION CONFIRMATION|CONFIRMACIo`N DE LA CANCELADURA DE LA CAMPAÑA| +CAMPAIGN DELETION COMPLETED|LA CANCELADURA DE LA CAMPAÑA TERMINo`| +Logout Agents|Disconnetti Operatori| +AGENTS NOT LOGGED OUT OF CAMPAIGN|OPERATORI NON DISCONNESSI DALLA CAMPAGNA| +AGENT LOGOUT CONFIRMATION|CONFERMA DISCONNESSIONE OPERATORE| +Click here to log all agents out of|Clicca qui per disconnettere tutti gli operatori| +AGENT LOGOUT COMPLETED|DISCONNESSIONE OPERATORI COMPLETATA| +LOG ALL AGENTS OUT OF THIS CAMPAIGN|DISCONNETTI TUTTI GLI OPERATORI DI QUESTA CAMPAGNA| +LIST DELETION CONFIRMATION|CONFIRMACIo`N DE LA CANCELADURA DE LA LISTA| +LIST DELETION COMPLETED|LA CANCELADURA DE LA LISTA TERMINo`| +IN-GROUP DELETION CONFIRMATION|CONFERMA ELIMINAZIONE GRUPPO INBOUND| +IN-GROUP DELETION COMPLETED|ELIMINAZIONE GRUPPO INBOUND COMPLETATA| +REMOTE AGENT DELETION CONFIRMATION|CONFIRMACIo`N ALEJADA DE LA CANCELADURA DEL AGENTE| +REMOTE AGENT DELETION COMPLETED|CANCELADURA ALEJADA DEL AGENTE TERMINADA| +USER GROUP DELETION CONFIRMATION|CONFIRMACIo`N DE LA CANCELADURA DEL GRUPO DE USUARIO| +USER GROUP DELETION COMPLETED|CANCELADURA DEL GRUPO DE USUARIO TERMINADA| +PHONE DELETION CONFIRMATION|CONFIRMACIo`N DE LA CANCELADURA DEL telefonO| +PHONE DELETION COMPLETED|LA CANCELADURA DEL telefonO TERMINo`| +SCRIPT DELETION CONFIRMATION|CONFIRMACIo`N DE LA CANCELADURA DE LA ESCRITURA| +SCRIPT DELETION COMPLETED|CANCELADURA DE LA ESCRITURA TERMINADA| +Preview Script|Anteprima Script| +MODIFY A SCRIPT|MODIFICA SCRIPT| +title of the script|titolo script| +CONFERENCE MODIFIED|CONFERENCIA MODIFICADA| +MODIFY A PHONE RECORD|MODIFICANDO EL telefonO| +THE END|FINE| +LIST ALL PHONES|MOSTRA TUTTI I TELEFONI| +ADD A NEW PHONE|AGGIUNGI UN NUOVO TELEFONO| +SEARCH FOR A PHONE|CERCA UN TELEFONO| +ADD A SERVER|AGGIUNGI UN SERVER| +LIST ALL SERVERS|MOSTRA TUTTI I SERVER| +SHOW ALL CONFERENCES|MOSTRA TUTTE LE CONFERENZE| +ADD A NEW CONFERENCE|CREA UNA NUOVA CONFERENZA| +>ADD A NEW VICIDIAL CONFERENCE<|>CREA UNA NUOVA CONFERENZA VICIDIAL<| +AMD Send to VM exten|AMD envían a la VM exten| +Transfer-Conf DTMF|Transfiera -Conf DTMF| +Transfer-Conf Number|Transfiera -Conf El Número| +Hot Keys Active|Hot Keys Activo| +Modify Leads|Modifica Contatti| +Change Agent Campaign|Cambia la campagna di un operatore| +Agent Choose Ingroups|El Agente Elige Ingroups| +CallBacks Within Campaign|Richiami Nella Campagna| +CallBacks Within List|Richiami Nella Lista| +CallBacks Within Agent|Richiami Dell`Operatore| +Phone extension|Interno Telefono| +Dial Plan Number|Numero De Dial plan| +digits only|solo cifre| +Voicemail Box|Buzon de voz| +Outbound CallerID|CallerID De salida| +Phone IP address|Direccion IP del telefono| +Computer IP address|Direccion IP del ordenador| +Server IP Address|Indirizzo IP del Server| +Server IP|IP Server| +Login: |Login: | +Password: |Password: | +Status: |Esito: | +Active Account|Cuenta Activa| +Phone Type|Tipo Del telefono| +Full Name|Nome Completo| +Company: |Compania: | +Picture: |Foto: | +Client Protocol|Protocollo Client| +Local GMT|Fuso Orario Locale| +Do NOT Adjust for DST|No ajustar para el DST| +VALUE=SUBMIT|VALUE=INVIA| +ADD A NEW SERVER|AGGIUNGI UN NUOVO SERVER| +Server ID|ID Server| +Server Description|Descrizione Server| +Active: |Attivo: | +Asterisk Version|Versione Di Asterisk| +Conference Number|Número de la Conferencia| +New Messages|Messaggi Nuovi| +Old Messages|Messaggi Vecchi| +Manager Login|Login del Manager| +Manager Secret|Contraseña del Manager| +VICIDIAL Default User|Usuario por defecto de VICIDIAL| +VICIDIAL Default Pass|Contraseña por defecto de VICIDIAL| +VICIDIAL Default Campaign|Campaña por defecto de VICIDIAL| +Park Extension|Extension del parking| +Park Exten|Extension del parking| +Conf Extension|Extension de la conferencia| +Conf Exten|Extension de la conferencia| +VICIDIAL Park Exten|Exten. Del parking de VICIDIAL| +VICIDIAL Park File|Archivo para música del parking de VICIDIAL| +Monitor Prefix|Prefijo al monitorizar| +Recording Exten|Exten de grabacion| +VMailMain Exten|Exten de VmailMain| +VMailDump Exten|Exten de VmaiDumpl| +Exten Context|Contexto De Exten| +DTMFSend Channel|Canal de envío del DTMF| +Outbound Call Group|Grupo de las llamadas de salida| +Browser Location|Localizacio`n del Navegador| +Install Directory|Directorio de instalacio`n| +CallerID URL|URL CallerID| +VICIDIAL Default URL|URL por defecto de VICIDIAL| +Call Logging|Call Logging| +User Switching|Cambio de Usuario| +Conferencing|Conferenze| +Admin Hang Up|Colgar del Admin| +Admin Hijack|Captura del Admin| +Admin Monitor|Monitorizacio`n del Admin| +Call Park|Parking de Llamada| +Updater Check|Uptader Check| +AF Logging|AF Logging| +Queue Enabled|Colas permitidas| +CallerID Popup|Ventana emergente del CallerID| +VMail Button|Boto`n Vmail| +Fast Refresh|Aggiornamento Veloce| +Fast Refresh Rate|Intervallo Aggiornamento Veloce| +Persistant MySQL|Persistant MySQL| +Auto Dial Next Number|Auto Marcar el Siguiente Número| +Stop Rec after each call|Parar de Grabar despue`s de cada llamada| +Primary |Primario | +Secondary |Secondario | +DBX Server|Servidor de DBX| +DBX Database|Base de datos de DBX| +DBX User|Usuario de DBX| +DBX Pass|Contraseña de DBX| +DBX Port|Puerto de DBX| +DBY Server|Servidor de DBY| +DBY Database|Base de datos de DBY| +DBY User|Usuario de DBY| +DBY Pass|Contraseña de DBY| +DBY Port|Puerto de DBY| +MODIFY A SERVER RECORD|MODIFICAR UN REGISTRO DEL SERVIDOR| +Max VICIDIAL Trunks|Máx. Trunks en VICIDIAL| +Telnet Host|Host Telnet| +Telnet Port|Porta Telnet| +Manager User|Usuario Del Manager| +Manager Update User|Usuario del Updater del Manager| +Manager Listen User|Usuario Listen del Manager| +Manager Send User|Usuario Send del Manager| +VMail Dump Exten|Extension de Vmail Dump | +VICIDIAL AD extension|Extension del AD de VICIDIAL| +Default Context|Contexto por Defecto| +PHONES WITHIN THIS SERVER|TELEFONI IN QUESTO SERVER| +>EXTENSION<|>INTERNO<| +>NAME<|>NOME<| +>ACTIVE<|>ATTIVO<| +>MODIFY<|>MODIFICA<| +This server has|Questo server ha| +active phones and|telefoni attivi e| +inactive phones|telefoni inattivi| +MODIFY A CONFERENCE RECORD|MODIFICA DELLA CONFERENZA| +Conference: |Conferenza: | +Current Extension|Interno Corrente| +extension: |interno: | +SEARCH RESULTS|RESULTADOS DE LA BÚSQUEDA| +PHONE LISTINGS|ELENCO TELEFONI| +SERVER LISTINGS|ELENCO SERVER| +CONFERENCE LISTINGS|ELENCO CONFERENZE| +script runtime|Tempo Esecuzione Script| +ADD NEW PHONE|AGGIUNGI TELEFONO| +ADD NEW SERVER|AGGIUNGI SERVER| +ADD NEW CONFERENCE|NUEVA CONFERENCIA| +ADD SCRIPT|AGGIUNGI SCRIPT| +VIEW SCRIPTS|VISUALIZZA SCRIPT| +SCRIPTS LISTINGS|ELENCO SCRIPT| +ADDING NEW PHONE|CREANDO telefono| +ADDING NEW SERVER|CREANDO SERVIDOR| +ADDING NEW CONFERENCE|CREANDO CONFERENCIA| +MODIFY PHONE|MODIFICAR EL telefonO| +MODIFY SERVER|MODIFICAR EL SERVIDOR| +MODIFY CONFERENCE|MODIFICAR LA CONFERENCIA| +MODIFYING PHONE|MODIFICANDO EL telefonO| +MODIFYING SERVER|MODIFICANDO EL SERVIDOR| +MODIFYING CONFERENCE|MODIFICANDO LA CONFERENCIA| +SEARCH PHONES|BUSCAR telefonOS| +SEARCH PHONES RESULTS|RESULTADO DE LA BÚSQUEDA DE telefonOS| +PHONE LIST|ELENCO TELEFONI| +SERVER LIST|ELENCO SEEVER| +CONFERENCE LIST|LISTA DE CONFERENCIAS| +HELP|AIUTO| +Click here for phone stats|Pinchar aquí­ para ver las estadísticas del telefono| +REMOTE INBOUND: Main|ENTRANTES REMOTOS: Principal| +REMOTE INBOUND: Popup|SALIENTES REMOTOS: Popup| +CALLS SENT TO|LLAMADAS REALIZADAS A| +Phone Stats|Estadísticas Del telefono| +CALL TIME AND CHANNELS|TIEMPO DE LLAMADA Y CANALES| +CHANNEL GROUP|GRUPO DE CANALES| +HOURS:MINUTES|ORE:MINUTI| +TOTAL CALLS|TOTALE CHIAMATE| +>NUMBER|>NUMERO| + DATE<| DATA<| +Close this window|Chiudi questa finestra| +Inbound Calls Stats|Statistiche Chiamate In Entrata| +Add New User|Aggiungi Nuovo Utente| +Add New Campaign|Aggiungi Nuova Campagna| +Add New List|Aggiungi Nuova Lista| +Add New In-Group|Aggiungi Nuovo Gruppo Inbound| +Add New Remote Agents|Aggiungi Nuovo Operatore Remoto| +Add New Users Group|Aggiungi Nuovo Gruppo Utente| +Add New Script|Aggiungi Nuovo Script| +New User Addition|Creazione Nuovo Utente| +New Campaign Addition|Creazione Nuova Campagna| +New Campaign Status Addition|Creazione Nuovo Esito Personalizzato Per Campagna| +New Campaign Hot Key Addition|Creazione Nuova HotKey Personalizzata Per Campagna| +New List Addition|Creazione Nuova Lista| +New In-Group Addition|Creazione Nuovo Gruppo Inbound| +New Remote Agents Addition|Creazuibe Nuovi Operatori Remoti| +New Users Group Addition|Creazione Nuovo Gruppo Utenti| +New Script Addition|Creazione Nuovo Script| +Modify User|Modifica Utente| +Modify Campaign - Basic View|Modifica Campagna - Vista Generale| +Modify Campaign|Modifica Campagna| +Modify List|Modifica Lista| +Modify In-Group|Modifica Gruppo Inbound| +Modify Remote Agents|Modifica Operatori Remoti| +Modify Users Groups|Modifica Gruppi Utenti| +Modify Script|Modifica Script| +Welcome|Benvenuto| +Lists|Liste| +In-Groups|In-Groups| +Remote Agents|Operatori Remoti| +User Groups|Gruppi Utenti| +Search Form|Form di Ricerca| +Search Results|Risultati Ricerca| +VICIDIAL ADMIN|VICIDIAL ADMIN| + TABLE| TABELLA| +First Name|Nome| +Middle Initial|Secondo Nome| +Last Name|Cognome| +Address Line 1|Indirizzo, linea 1| +Address Line 2|Indirizzo, linea 2| +Address Line 3|Indirizzo, linea 3| +City|Citta`| +State - limited to 2 characters|Stato - limitato a 2 caratteri| +Province|Provincia| +Postal Code|CAP| +Country|Stato| +Gender|Sesso| +Date of Birth|Data di Nascita| +Alternate Phone Number|Numero di Telefono Alternativo| +Email Address|Email| +Security Phrase|Frase De Seguridad| +Comments|Note| +THE END|FINE| +Logout|Logout| +LIST USERS|VISUALIZZA UTENTI| +ADD A NEW USER|NUOVO UTENTE | +SEARCH FOR A USER|RICERCA UTENTI| +ADD USER GROUP|NUOVO GRUPPO UTENTI| +LIST USER GROUPS|VISUALIZZA GRUPPI UTENTI| +ADD CAMPAIGN|AGGIUNGI CAMPAGNA| +LIST CAMPAIGNS|VISUALIZZA CAMPAGNE| +SHOW LISTS|VISUALIZZA LISTE| +ADD NEW LIST|AGGIUNGI NUOVA LISTA| +ADD A NEW LIST|AGGIUNGI NUOVA LISTA| +LOAD NEW LEADS|CARICA NUOVI CONTATTI| +SHOW IN-GROUPS|VISUALIZZA GRUPPI INBOUND| +ADD NEW IN-GROUP|AGGIUNGI NUOVO GRUPPO INBOUND| +SHOW REMOTE AGENTS|VISUALIZZA OPERATORI REMOTI| +ADD NEW REMOTE AGENTS|NUOVO OPERATORE REMOTO| +SERVER STATS|STATISTICHE SERVER| +PARK REPORT|INFORME DE PARKING| +VDAD REPORT|REPORT VDAD| +CLOSER REPORT|INFORME CLOSER| +SEARCH FOR A LEAD|RICERCA CONTATTI| +GROUP HOURLY|GRUPO POR HORA| +User Number|Numero Utente| +Full Name|Nome Completo| +User Level|Livello Utente| +User Group|Gruppo Utente| +ADD A NEW CAMPAIGN|NUOVA CAMPAGNA| +ADD A NEW INBOUND GROUP|NUOVO GRUPPO INBOUND| +ADD NEW USERS GROUP|NUOVO GRUPPO UTENTI| +Campaign ID|ID Campagna| +Campaign Name|Nome Campagna| +Park Extension|Extension Del Parking| +Park Filename|Nombre de fichero Del Parking| +Web Form|Web Form| +Allow Closers|Permitir Closers| +Hopper Level|Livello Coda Chiamate| +Auto Dial Level|Livello Auto Dial| +Next Agent Call|Operatore Da Scegliere Per La Chiamata Successiva| +Local Call Time|Orario Chiamate| +Voicemail|Casella Vocale| +SUBMIT|INVIA| +List ID|ID Lista| +List Name|Nome Lista| +Campaign|Campagna| +Group ID|ID Gruppo| +Group Name|Nome Gruppo| +Group Color|Colore Gruppo| +Fronter Display|Mostrar Fronter| +User ID Start|Inizio ID Utente| +Number of Lines|Numero di Linee| +External Extension|Numero Di Interno Remoto| +Inbound Groups|Gruppi Inbound| +Group: |Gruppo: | +Description: |Descrizione: | +USER ADDED|UTENTE AGGIUNTO| +CAMPAIGN ADDED|CAMPAGNA AGGIUNTA| +CAMPAIGN STATUS ADDED|STATO PERSONALIZZATO PER CAMPAGNA AGGIUNTO| +CAMPAIGN HOT KEY ADDED|HOTKEY AGGIUNTA| +LIST ADDED|LISTA AGGIUNTA| +GROUP ADDED|GRUPPO AGGIUNTO| +REMOTE AGENTS ADDED|OPERATORE REMOTO AGGIUNTO| +USER GROUP ADDED|GRUPPO UTENTI AGGIUNTO| +USER MODIFIED|UTENTE MODIFICATO| +GROUP MODIFIED|GRUPPO MODIFICATO| +CAMPAIGN MODIFIED|CAMPAGNA MODIFICATA| +LIST MODIFIED|LISTA MODIFICATA| +USER GROUP MODIFIED|GRUPPO UTENTI MODIFICATO| +RESETTING LIST-CALLED-STATUS|RESET ESITI CONTATTI DELLA LISTA CHIAMATI| +Dial status |Esito Chiamata | +List Order|Ordine Lista| +Hopper Level|Livello Coda Chiamate| +Force Reset of Hopper|Forza Il Reset Della Coda Chiamate| +Dial Timeout|Timeout Chiamata| +Dial Prefix|Prefisso Chiamata| +Campaign CallerID|CallerID della Campagna| +Campaign VDAD exten|Exten VDAD de La campaña| +Campaign Rec exten|Interno Registrazioni Per Questa Campagna| +Campaign Recording|Registrazioni Per Questa Campagna| +Campaign Rec Filename|Nome Registrazioni Per Questa Campagna| +LISTS WITHIN THIS CAMPAIGN|LISTE IN QUESTA CAMPAGNA| +LIST ID|ID LISTA| +LIST NAME|NOME LISTA| +>ACTIVE<|>ATTIVO<| +This campaign has |Questa campagna ha | +active lists and |liste attive e | +inactive lists|lista inattive| +leads to be dialed in those lists|contatti da chiamare in queste liste| +leads in the dial hopper|contatti nella coda chiamate| +>STATUS<|>ESITO<| +>DESCRIPTION<|>DESCRIZIONE<| +>SELECTABLE<|>SELEZIONABILE<| +>DELETE<|>CANCELLA<| +ADD NEW CUSTOM CAMPAIGN STATUS|AGGIUNGI NUOVO ESITO PERSONALIZZATO PER CAMPAGNA| +Selectable: |Selezionabile: | +value=ADD|value=ADD| +CUSTOM HOT KEYS WITHIN THIS CAMPAIGN|HOT KEY PERSONALIZZATE PER QUESTA CAMPAGNA| +>HOT KEY<|>HOT KEY<| +ADD NEW CUSTOM CAMPAIGN HOT KEY|AGGIUNGI NUOVA HOT KEY PERSONALIZZATA PER QUESTA CAMPAGNA| +Hot key: |Hot Key: | +Basic View|Vista Generale| +Detail View|Vista Dettagliata| +MODIFY A LISTS RECORD|MODIFICA I DATI DELLA LISTA| +Reset Lead-Called-Status for this list|Resetta questa lista allo stato di `contatti non chiamati`| +STATUSES WITHIN THIS LIST|ESITI IN QUESTA LISTA| +>CALLED<|>CHIAMATI<| +>NOT CALLED<|>NON CHIAMATI<| +>SUBTOTALS<|>SUBTOTALI<| +>SUBTOTAL<|>SUBTOTALE<| +TIME ZONES WITHIN THIS LIST|FUSI ORARI IN QUESTA LISTA| +GMT OFFSET NOW|FUSO ORARIO ATTUALE| +local time|ora locale| +List Last Call Date:|Data Ultima Telefonata| +>TOTAL<|>TOTALE<| +CALLED COUNTS WITHIN THIS LIST|CHIAMATE EFFETTUATE IN QUESTA LISTA| +MODIFY A GROUPS RECORD|MODIFICAR UN REGISTRO DE LOS GRUPOS| +MODIFY A REMOTE AGENTS ENTRY|MODIFICAR UNA ENTRADA DE LOS AGENTES REMOTOS| +numbers only|solo cifre| +dial plan number dialed to reach agents|numero del dialplan usato per raggiungere gli operatori| +MODIFY A USERS GROUP ENTRY|MODIFICA UN GRUPPO UTENTI| +no spaces or punctuation|senza spazi e punteggiatura| +description of group|Descrizione del gruppo| +SEARCH FOR A USER|RICERCA UTENTE| +SEARCH RESULTS|RISULTATI RICERCA| +>STATS<|>STATISTICHE<| +USER LISTINGS|ELENCO UTENTI| +CAMPAIGN LISTINGS|ELENCO CAMPAGNE| +LIST LISTINGS|ELENCO LISTE| +INBOUND GROUP LISTINGS|ELENCO GRUPPI INBOUND| +REMOTE AGENTS LISTINGS|ELENCO OPERATORI REMOTI| +USER GROUPS LISTINGS|ELENCO GRUPPI UTENTI| +script runtime|tempo di esecuzione script| +Hopper List|Coda Chiamate| +Live Current Hopper List|Coda Contatti Da Chiamare In Tempo Reale| +Total leads in hopper right now|Totale Contatti Nella Coda Chiamate In Questo Istante| +Server Stats|Statistiche Server| +Total Calls placed from this Campaign: |Totale Chiamate Effettuate Per Questa Campagna:| +Average Call Length for all Calls in seconds:|Durata Media per Tutte Le Chiamate In Secondi:| +Total DROP Calls: |Totale Chiamate ABBATTUTE:| +Average Length for DROP Calls in seconds: |Durata Media Chiamate ABBATTUTE in secondi: | +Total NA calls -Busy,Disconnect,RingNoAnswer: |Totale Chiamate Senza Risposta - occupato, disconnesso, fuori posto...: | +Average Call Length for NA Calls in seconds: |Durata Media Chiamate Senza Risposta in secondi: | +---------- DROPS|---------- ABBATTUTE| + AUTO-DIAL NO ANSWERS| NESSUNA RISPOSTA AUTO-DIAL| +---------- AGENT STATS|---------- STATISTICHE OPERATORE| +---------- TIME STATS|---------- STATISTICHE TEMPO| +USER |UTENTE | +Average Wait time between calls|Tempo Medio di Attesa Tra Due Chiamate| +TOTAL Agents:|TOTALE Operatori:| +Percent of DROP Calls taken out of Answers:|Percentuale Di Chiamate ABBATTUTE Su Chiamate Con Risposta:| +TIME M|TEMPO M| +AVRG M|MEDIA M| +Agents Time On Calls |Tempo Conversazione Operatori| +agents logged in on server|Operatori collegati al server| +Paused agents|Operatori in pausa| +5 minutes or more on call|5 o piu` minuti in conversazione| +Over 10 minutes on call|Oltre 10 minuti in conversazione| + NO AGENTS ON CALLS | NESSUN OPERATORE IN CONVERSAZIONE | +calls being placed on server|chiamate effettuate dal server| +LIVE CALL WAITING|CHIAMATA IN ATTESA| + NO LIVE CALLS WAITING | NESSUNA CHIAMATA IN ATTESA| +START OVER|RICOMINCIA| +Lead Loader Module|Modulo Caricamento Contatti| +Current file status|Stato attuale del file| +Load leads from this file|Carica Contatti Da Questo File| +Answering Machine Message|Messaggio Segreteria Telefonica| +Processing |Elaborazione in corso| +TALK TIME AND STATUS|TEMPO DI CHIAMATA E ESITO| +>COUNT<|>CUENTA<| +>HOURS:MINUTES<|>ORE:MINUTI<| +TOTAL CALLS |TOTALE CHIAMATE | +LOGIN/LOGOUT TIME|TIEMPO LOGIN/LOGOUT| +>EVENT <|>EVENTO <| +> CAMPAIGN<|> CAMPAGNA<| +CAMPAIGN: |CAMPAGNA: | +LAST 50 CALLS|ULTIME 50 CHIAMATE| +VICIDIAL REMOTE: Call Disposition|REMOTE VICIDIAL: disposicion De la Llamada| +Call has been dispositioned|La Chiamata Ha Avuto Un Esito| +Close This Window|Chiudi Questa Finestra| +Call information|Informazioni Chiamata| +lead lookup FAILED for lead_id|las operaciones de búsqueda del plomo FALLARON para el lead_id| +DISPO CALL|ESITO CHIAMATA| +>Address |>Indirizzo | +>City |>Citta` | +>State:|>Estado:| + Postal Code:| CAP:| +>Province |>Provincia | +>Country |>Stato | +>Alt Phone |>Numero Alt | +>Email |>Email | +>Security |>Seguridad| +>Comments |>Note | +>Disposition:|>Esito:| +Group Hourly Stats|Statistiche Orarie Del Gruppo| +TSR HOUR COUNTS|DATI ORARI| +Lead Search|Ricerca Contatti| +Lead Lookup|Operaciones de búsqueda del Lead| +Please enter a:|Per favore, inserisci:| +a Home Phone Number:|un numero di telefono:| +vendor lead code|co`digo del vendedor del Lead| +a lead ID:|un ID Contatto:| +>NEW SEARCH<|>NUOVA RICERCA<| +Lead record modification|Registro del Lead modificado| +information modified|informazione modificata| +CALLS TO THIS LEAD|CHIAMATE VERSO QUESTO CONTATTO| +VDAD Closer Stats|Estadísticas de VDAD Closer| +Auto-dial Closer Stats|Estadísticas de Auto-dial en CLOSER| +VICIDIAL REMOTE AGENTS|VICIDIAL, AGENTES REMOTOS| +INBOUND STATS|STATISTICHE INBOUND| +REMOTE AGENTS ERROR - Please go back and look at the data you entered|ERROR AGENTES REMOTOS – Por favor, vuelva atrás y compruebe los datos que introdujo| + - WAITING - |- IN ATTESA -| +Remote Agent inbound stats |Stats de entrada del agente alejado| +Total calls taken |Llamadas totales tomadas | +Total talk time on |Tiempo total de conversacion| +Call list for |Lista la llamada para | + NO CALLS ON THIS DAY |NESSUNA CHIAMATA IN QUESTO GIORNO| +Scripts|Script| +Script:|Script:| +Get Call Launch|Esegui all`avvio della telefonata| +not used currently|non utilizzato attualmente| +VERSION|VERSIONE| +BUILD|BUILD| +REPORTS|REPORT| + CAMPAIGNS| CAMPAGNE| +LISTS|LISTE| +SCRIPTS|SCRIPT| +FILTERS|FILTRI| +IN-GROUPS|GRUPPI INBOUND| +USER GROUPS|GRUPPI UTENTI| +REMOTE AGENTS|OPERATORI REMOTI| +Column|Colonna| + PERFORMANCE| PERFORMANCE| +SERVER |SERVER | +### END translation phrases through 1.1.11 release ### +Drop Call Seconds -<\/B> 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|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, so`lo se aplica a las llamadas desalida| +Safe Harbor Message -<\/B> 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|seguro puerto mensaje - si fijar y juego uno mensaje clientedespue`s gota llamar segundo descanso ser alcanzar sin ser transferiruno agente. _ este fijar eliminar sending uno voicemail caja si esteser fijar y| +Safe Harbor Exten -<\/B> This is the dial plan extension that the desired Safe Harbor audio file is located at on your server|seguro puerto Exten - este ser dial plan extension que desear seguropuerto audio archivo ser localizar en en su servidor| +Drop Message -<\/B> 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|Mensaje de la gota - si el sistema a Y juega un mensaje al clientedespue`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| +Drop Exten -<\/B> This is the dial plan extension that the desired Dropped call audio file is located at on your server|Gota Exten - esta es la extension dial plan que el archivo audiocaído deseado de la llamada está situado en en su servidor| +Call Time ID -<\/B> 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|Identificacio`n del tiempo de la llamada - este es el nombre corto deuna definicio`n del tiempo de la llamada de Vicidial. este necesitaser un identificador único. No utilice ningunos espacios opuntuacio`n para los caracteres de este máximo 10 del campo, mínimode 2 caracteres| +Call Time Name -<\/B> 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|Nombre del tiempo de la llamada - este es un nombre más descriptivode la definicio`n del tiempo de la llamada. este es un resumen cortode los caracteres del máximo 30 de la definicio`n del tiempo de lallamada, mínimo de 2 caracteres| +Call Time Comments -<\/B> 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|El tiempo de la llamada comenta - aquí es donde usted puede poner loscomentarios para una definicio`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| +Default Start and Stop Times -<\/B> 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|Tiempos del comienzo y de parada del defecto - este es el tiempo dedefecto paran que el llamar será permitido que sea comenzado o dentrode esta definicio`n del tiempo de la llamada si la hora de salida dela di`a-de-$$$-SEMANA no se define. 0 es medianoche. Evitar el llamarfijo` totalmente este campo a 2400 y fijo` el tiempo de parada deldefecto a 2400. Permitir el llamar 24 horas al día fijo` la hora desalida a 0 y el tiempo de parada a 2400| +Weekday Start and Stop Times -<\/B> 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|Tiempos del comienzo y de parada del día laborable - estos son lostiempos de encargo por el día que se puede fijar para la definicio`ndel tiempo de la llamada que las mismas reglas se aplican como con lostiempos del comienzo y de parada del defecto| +State Call Time Definitions -<\/B> This is the list of State specific call time definitions that are followed in this Call Time Definition|Definiciones del tiempo de la llamada del estado - esta es la listade las definiciones específicas del tiempo de la llamada del estadoque se siguen en esta definicio`n del tiempo de la llamada| +State Call Time State -<\/B> 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|Estado del tiempo de la llamada del estado - este es el co`digo dedos letras para el estado que esta definicio`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 e`l así como todos los plomos quetienen dos co`digos del estado de la letra en ellos| +Delete Call Times -<\/B> This option allows the user to be able to delete vicidial call times records and vicidial state call times records from the system|Tiempos de la llamada de la cancelacio`n - esta opcio`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| +Modify Call Times -<\/B> 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|Modifique los tiempos de la llamada - esta opcio`n permite que elusuario visio`n y modifique los expedientes de los tiempos de lallamada y de los tiempos de la llamada del estado. Un usuario nonecesita esta opcio`n permitida si necesitan solamente cambiar laopcio`n de los tiempos de la llamada en la pantalla de las campañas| +Wrap Up Seconds -<\/B> 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|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 disposicion| +Wrap Up Message -<\/B> This is a campaign-specific message to be displayed on the wrap up screen if wrap up seconds is set|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| +You are not authorized to view this page. Please go back|Le no autorizan a visio`n esta página. Vaya por favor detrás| +Day and time options will appear once you have created the Call Time Definition|Las opciones del día y del tiempo aparecerán una vez que usted hayacreado la definicio`n del tiempo de la llamada| +State Call Time ID, name and state must be at least 2 characters in length|Indique que identificacio`n del tiempo de la llamada, nombre y estadodebe ser por lo menos 2 caracteres en longitud| +Call Time ID and name must be at least 2 characters in length|La identificacio`n del tiempo de la llamada y el nombre deben ser porlo menos 2 caracteres en longitud| +Active State Call Time Definitions for this Record|Definiciones activas del tiempo de la llamada del estado para estoexpediente| +there is already a call time entry with this ID|hay ya una entrada de tiempo de la llamada con esta identificacio`n| +CALL TIMES USING THIS STATE CALL TIME|TIEMPOS DE LA LLAMADA USANDO ESTE TIEMPO DE LA LLAMADA DEL ESTADO| +STATE CALL TIME DEFINITION NOT ADDED|DEFINICIo`N DEL TIEMPO DE LA LLAMADA DEL ESTADO NO AGREGADA| +DELETE THIS STATE CALL TIME DEFINITION|SUPRIMA ESTA DEFINICIo`N DEL TIEMPO DE LA LLAMADA DEL ESTADO| +Modify Call Time State Definitions List|Modifique La Lista De las Definiciones Del Estado Del Tiempo De laLlamada| +CALL TIME DEFINITION NOT ADDED|DEFINICIo`N DEL TIEMPO DE LA LLAMADA NO AGREGADA| +DELETE THIS CALL TIME DEFINITION|ELIMINA QUESTO ORARIO CHIAMATE| +short description of the call time|breve descrizione dell`orario chiamate| +CAMPAIGNS USING THIS CALL TIME|CAMPAGNE CHE UTILIZZANO QUESTO ORARIO| +STATE CALL TIME NOT MODIFIED|TIEMPO DE LA LLAMADA DEL ESTADO NO MODIFICADO| +CALL TIME NOT MODIFIED|TIEMPO DE LA LLAMADA NO MODIFICADO| +STATE CALL TIME MODIFIED|TIEMPO DE LA LLAMADA DEL ESTADO MODIFICADO| +CALL TIME MODIFIED|TIEMPO DE LA LLAMADA MODIFICADO| +Default Start:|Inizio di Default:| +Default Stop:|Fine di Default:| +Sunday Start:|Inizio Domenica:| +Sunday Stop:|Fine Domenica:| +Monday Start:|Inizio Lunedi:| +Monday Stop:|Fine Lunedi:| +Tuesday Start:|Inizio Martedi:| +Tuesday Stop:|Fine Martedi:| +Wednesday Start:|Inizio Mercoledi:| +Wednesday Stop:|Fine Mercoledi:| +Thursday Start:|Inizio Giovedi:| +Thursday Stop:|Fine Giovedi:| +Friday Start:|Inizio Venerdi:| +Friday Stop:|Fine Venerdi:| +Saturday Start:|Inizio Sabato:| +Saturday Stop:|Fine Sabato:| +State Rule Added|Regla Del Estado Agregada| +State Rule Removed|Regla Del Estado Quitada| +STATE CALL TIME LISTINGS|ELENCO ORARI CHIAMATE PER STATO| +CALL TIME LISTINGS|ELENCO ORARI CHIAMATE| +STATE CALL TIME ADDED|ORARIO CHIAMATE PER STATO AGGIUNTO| +CALL TIME ADDED|ORARIO CHIAMATE AGGIUNTO| +Drop Call Seconds|Secondi Abbattimento Telefonata| +Use Safe Harbor Message|Riproduci Messaggio Prima Di Abbattere La Telefonata| +Safe Harbor Exten|Interno Messaggio Telefonata Abbattuta| +Use Drop Message|Utilice El Mensaje De la Gota| +Drop Exten|Gota Exten| +SIP Listen Version|El Sip Escucha Versio`n| +Add New Call Time|Agregue El Nuevo Tiempo De la Llamada| +Add New State Call Time|Agregue El Nuevo Tiempo De la Llamada Del Estado| +New Call Time Addition|Nueva Adicio`n Del Tiempo De la Llamada| +New State Call Time Addition|Nueva Adicio`n Del Tiempo De la Llamada Del Estado| +Modify Call Time|Modifique El Tiempo De la Llamada| +MODIFY A CALL TIME|MODIFICA ORARIO CHIAMATE| +Modify State Call Time|Modifique El Tiempo De la Llamada Del Estado| +MODIFY A STATE CALL TIME|_ MODIFICAR Uno ESTADO LLAMAR TIEMPO| +Delete State Call Time|Tiempo De la Llamada Del Estado De la Cancelacio`n| +State Call Times|Tiempos De la Llamada Del Estado| +State Call Time ID|Identificacio`n Del Tiempo De la Llamada Del Estado| +State Call Time Name|_ Estado Llamar Tiempo Nombre| +State Call Time Comments|Comentarios Del Tiempo De la Llamada Del Estado| +STATE CALL TIME NOT DELETED|TIEMPO DE LA LLAMADA DEL ESTADO NO SUPRIMIDO| +CALL TIME DELETION COMPLETED|_ LLAMAR TIEMPO CANCELADURA TERMINAR| +STATE CALL TIME DELETION COMPLETED|CANCELADURA DEL TIEMPO DE LA LLAMADA DEL ESTADO TERMINADA| +CALL TIME NOT DELETED|TIEMPO DE LA LLAMADA NO SUPRIMIDO| +Call Time ID must be at least 2 characters in length|_ llamar tiempo identificacio`n deber ser por lo menos 2 carácter enlongitud| +STATE CALL TIME DELETION CONFIRMATION|CONFIRMACIo`N DE LA CANCELADURA DEL TIEMPO DE LA LLAMADA DEL ESTADO| +CALL TIME DELETION CONFIRMATION|CONFIRMACIo`N DE LA CANCELADURA DEL TIEMPO DE LA LLAMADA| +Call Times|Orari Chiamata| +CALL TIMES|ORARI CHIAMATA| +SHOW CALL TIMES|ELENCA ORARI CHIAMATE| +ADD NEW CALL TIME|AGGIUNGI ORARIO CHIAMATE| +SHOW STATE CALL TIMES|DEMUESTRE LOS TIEMPOS DE LA LLAMADA DEL ESTADO| +ADD NEW STATE CALL TIME|AGREGUE EL NUEVO TIEMPO DE LA LLAMADA DEL ESTADO| +Call Time ID|ID Orario Chiamate| +Call Time Name|Nome Orario Chiamate| +Call Time Comments|Note Orario Chiamate| +short description of the call time|breve descrizione dell`orario nel quale chiamare| +HIDE|NASCONDI| +SHOW|MOSTRA| +Show Dialable Leads Count|Demuestre La Cuenta De los Plomos De Dialable| +Dialable Lead Count|Cuenta Del Plomo De Dialable| +TEST ON CAMPAIGN|PRUEBE EN CAMPAÑA| +Wrap Up Seconds:|Secondi Riposo Operatore:| +Wrap Up Message:|Messaggio Riposo Operatore:| +Alt Number Dialing|El Marcar Del Número Del Alt| +no active lists selected for this campaign|nessuna lista attiva selezionata per questa campagna| +Real-Time Screen|Schermata Tempo Reale| +Allowable Inbound Groups -<\/B> 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|Grupos de entrada permisibles - Para campañas MÁS CERCANAS solamente. Aquí es donde usted selecciona a grupos de entrada que usted quisiera que los agentes en esta campaña MÁS CERCANA pudieran tomar llamadas de. Es importante que las campañas de entrada-de salida MEZCLADAS seleccionen solamente a los grupos de entrada que se utilizan para los agentes en esta campaña. Las llamadas que vienen en los grupos de entrada seleccionados aquí serán contadas como llamadas activas para una campaña mezclada incluso si todos los agentes en la campaña no se entran para recibir llamadas de todos esos grupos de entrada seleccionados| +Allowed Inbound Groups|Grupos De entrada Permitidos| +ADD NUMBER TO DNC|AGREGUE EL NÚMERO A DNC| +ADD A NUMBER TO THE DNC LIST|AGGIUNGI UN NUMERO ALLA LISTA DA NON CHIAMARE| +Add New DNC|Agregue DNC Nuevo| +Phone Number|Numero di Telefono| +VICIDIAL DNC List -<\/B> 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|Lista de VICIDIAL DNC - esto no llama la lista contiene cada plomo quese ha fijado a un estado de DNC en el sistema. A trave`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| +DNC NOT ADDED - This phone number is already in the Do Not Call List|DNC NO AGREGADO - este número de telefono está en no llama ya lalista| +DNC ADDED|DNC AGREGADO| +Use Internal DNC List -<\/B> 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|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 telefono 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| +Use Internal DNC List|Controlla In Lista Contatti Da NON CHIAMARE| +Campaign CallerID -<\/B> 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|Campaña CallerID - este campo permite enviar de un número de encargodel callerid en las llamadas de salida. este es el número quedemostraría para arriba en el callerid de la persona que usted estállamando. El defecto es DESCONOCIDO. Si usted está utilizando el T1 oEß para marcar hacia fuera esta opcio`n está solamente disponible siusted está utilizando PRIs - el ISDN Tß o Eß que tenga lacaracterística de encargo del callerid girada, este no trabajarácon los circuitos del service(RBS) del Robar-pedacito. Esto Tambientrabajará a trave`s los abastecedores de la mayoría de los troncosde VOIP(SIP o de IAX) que permiten el callerID de salida dinámico. ElcallerID de encargo se aplica solamente a las llamadas puestas para lacampaña de VICIDIAL directamente, cualquier tercer persona llama olas transferencias no enviarán el callerID de encargo. NOTA: A vecesel poner DESCONOCIDO o PRIVADO en el campo rendirá enviar de sunúmero del callerID del defecto por su portador con las llamadas.Usted puede desear probar esto y poner 0000000000 en el campo delcallerid en lugar de otro si usted no desea enviarle CallerID| +Login -<\/B> The login used for the phone user to login to the client applications|conexion - la conexion usada para el usuario del telefono a laconexion a los usos del cliente| +Password -<\/B> The password used for the phone user to login to the client applications|Contraseña - la contraseña usada para el usuario del telefono a laconexion a los usos del cliente| +New Campaign Lead Recycle Addition|El Nuevo Plomo De la Campaña Recicla La Adicio`n| +Modify Campaign Lead Recycle|Modifique El Plomo De la Campaña Reciclan| +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|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 e`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| +CAMPAIGN LEAD RECYCLE NOT ADDED - there is already a lead-recycle for this campaign with this status|El PLOMO de la CAMPAÑA RECICLA NO AGREGADO - hay ya unconducir-reciclaje para esta campaña con este estado| +status must be between 1 and 6 characters in length|el estado debe estar entre 1 y 6 caracteres en longitud| +attempt delay must be at least 120 seconds|la tentativa retrasa debe ser por lo menos 120 segundos| +maximum attempts must be from 1 to 10|las tentativas máximas deben ser a partir la 1 a 10| +CAMPAIGN LEAD RECYCLE ADDED|EL PLOMO DE LA CAMPAÑA RECICLA AGREGADO| +CAMPAIGN LEAD RECYCLE NOT DELETED|EL PLOMO DE LA CAMPAÑA RECICLA NO SUPRIMIDO| +CAMPAIGN LEAD RECYCLE DELETED|EL PLOMO DE LA CAMPAÑA RECICLA SUPRIMIDO| +Delete Lead Recycle|El Plomo De la Cancelacio`n Recicla| +LEAD RECYCLING WITHIN THIS CAMPAIGN|CONTATTI DA RICICLARE IN QUESTA CAMPAGNA| +ATTEMPT DELAY|RITARDO NUOVO TENTATIVO| +ATTEMPT MAXIMUM|MASSIMO TENTATIVI| +ADD NEW CAMPAIGN LEAD RECYCLE|AGGIUNGI NUOVO ESITO DA RICICLARE| +Attempt Delay|Intervallo Tra Tentativi| +Attempt Maximum|Massimo Tentativi| +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|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 puedeTambien especificar una extension de encargo despue`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| +System Performance -<\/B> 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|Funcionamiento del sistema - fijar esta opcio`n a Y permitirá laregistracion 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| +Server Logs -<\/B> 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|Registros del servidor - fijar esta opcio`n a Y permitirá laregistracion 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, Tambien laregistracion de la pantalla del asterisco será lisiado si esto sefija a N cuando se comienza el asterisco. El defecto es Y| +AGI Output -<\/B> 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|AGI hecho salir - fijar esta opcio`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| +Recording Delay -<\/B> 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|La registracion retrasa - para la grabacion de ALLCALLS y deALLFORCE solamente. Esta voluntad del ajuste retrasa comenzar de lagrabacion en todas las llamadas para el número de los segundosespecificados en este campo. El defecto es 0| +Omit Phone Code -<\/B> 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|Omita el co`digo del telefono - 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| +Campaign Recording -<\/B> 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|grabacion de la campaña - este menú permite que usted elija que`nivel de la grabacion se permite en esta campaña. NUNCAinhabilitará la grabacion en el cliente. ONDEMAND es el defecto ypermite que el agente comience y pare a registrar según lonecesitado. ALLCALLS comenzará la grabacion en el cliente siempreque una llamada se envíe a un agente. ALLFORCE comenzará lagrabacion en el cliente siempre que una llamada se envíe a un agenteque no da al agente ninguna opcio`n para parar el registrar. ParaALLCALLS y ALLFORCE hay una opcio`n para utilizar la grabacionretrasa para reducir en grabaciones y carga de sistema muy cortas delrecude| +Dial Method -<\/B> 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|Me`todo del dial - Este campo es la manera de definir co`mo el marcar debe ocurrir. Si el MANUAL entonces el auto_dial_level es bloqueado en 0 a menos que se cambie el me`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 despue`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 me`todos. Usted no puede cambiar el nivel auto del dial si usted está en cualesquiera de los me`todos del dial del ADAPTAR. Solamente el sintonizador puede cambiar el nivel del dial cuando en modo que marca profe`tico| +Available Only Tally -<\/B> 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|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| +Drop Percentage Limit -<\/B> 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|Límite del porcentaje de la gota - este campo es donde usted fijo` ellímite del porcentaje de llamadas caídas que usted quisiera mientrasque usaba un me`todo adaptante-profe`tico del dial, NO MANUAL o delCOCIENTE| +Maximum Adapt Dial Level -<\/B> 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|El máximo adapta el dial llano - este campo es donde usted fijo` ellímite del límite al numbr de líneas que usted quisiera marcado poragente mientras que usaba un me`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| +Latest Server Time -<\/B> 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|El tiempo más último del servidor - este campo es utilizadosolamente por el me`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 co`mo agresivamente al dial cerca cuánto tiempo usted tienehasta que usted será el llamar acabado| +Adapt Intensity Modifier -<\/B> 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|Adapte el modificante de la intensidad - este campo se utiliza paraajustar la intensidad profe`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 me`todos del dial del MANUALo del COCIENTE| +Dial Level Difference Target -<\/B> 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|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 me`todos del dial del MANUAL o del COCIENTE| +System Performance|Performance Di Sistema| +Server Logs|Log Server| +AGI Output|Salida de AGI| +Recording Delay|Ritardo Registrazione| +Omit Phone Code|Ometti Prefisso Telefono| +Campaign Recording|grabacion De la Campaña| +Dial Method|Metodo Chiamata| +Available Only Tally|Conta Solo Disponibili| +Drop Percentage Limit|Limita Percentuale Abbattuti| +Maximum Adapt Dial Level|Livello Auto-Dial Massimo In Modalita` Adapt| +Latest Server Time|Ultimo Orario Chiamate| +Adapt Intensity Modifier|Modifica Intensita` Adapt Auto-Dial| +Click here to see a VDAD report for this campaign|Clicca qui per vedere il report VDAD per questa campagna| +Dial Level Difference Target|Blanco Llana De la Diferencia Del Dial| +### START translations for 2.0.2 release ### +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|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 opcio`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| +VICIDIAL Balance Dialing -<\/B> 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|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| +VICIDIAL Balance Offlimits -<\/B> 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|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| +Allowed Campaigns -<\/B> 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|Campañas permitidas - esta es una lista seleccionable de lascampañas a las cuales los miembros de este grupo de usuario puedenabrirse una sesio`n. La opcio`n de ALL-CAMPAIGNS permite que losusuarios en este grupo consideren y se abran una sesio`n a cualquiercampaña en el sistema| +VICIDIAL SERVER TRUNK RECORD NOT ADDED|EXPEDIENTE DEL TRONCO DEL SERVIDOR DE VICIDIAL NO AGREGADO| +there is already a server-trunk record for this campaign|hay ya un expediente del servidor-tronco para esta campaña| +the number of vicidial trunks is too high|el número de troncos vicidial es demasiado alto| +VICIDIAL SERVER TRUNK RECORD ADDED|EL EXPEDIENTE DEL TRONCO DEL SERVIDOR DE VICIDIAL AGREGo`| +VICIDIAL SERVER TRUNK RECORD NOT MODIFIED|EXPEDIENTE DEL TRONCO DEL SERVIDOR DE VICIDIAL NO MODIFICADO| +VICIDIAL SERVER TRUNK RECORD MODIFIED|EXPEDIENTE DEL TRONCO DEL SERVIDOR DE VICIDIAL MODIFICADO| +VICIDIAL SERVER TRUNK RECORD NOT DELETED|EXPEDIENTE DEL TRONCO DEL SERVIDOR DE VICIDIAL NO SUPRIMIDO| +VICIDIAL SERVER TRUNK RECORD DELETED|EXPEDIENTE DEL TRONCO DEL SERVIDOR DE VICIDIAL SUPRIMIDO| +campaign must be between 3 and 8 characters in length|la campaña debe estar entre 3 y 8 caracteres en longitud| +server_ip delay must be at least 7 characters|el server_ip retrasa debe ser por lo menos 7 caracteres| +trunks must be a digit from 0 to 9999|los troncos deben ser un dígito a partir de la 0 a 9999| +VICIDIAL Balance Dialing|El Marcar Del Balance de VICIDIAL| +VICIDIAL Balance Offlimits|Balance Offlimits de VICIDIAL| +ADDING NEW SERVER VICIDIAL TRUNK RECORD|ADICIo`N DEL NUEVO EXPEDIENTE DEL TRONCO DEL SERVIDOR VICIDIAL| +ADD NEW SERVER VICIDIAL TRUNK RECORD|AGREGUE EL NUEVO EXPEDIENTE DEL TRONCO DEL SERVIDOR VICIDIAL| +MODIFY SERVER VICIDIAL TRUNK RECORD|MODIFIQUE EL EXPEDIENTE DEL TRONCO DEL SERVIDOR VICIDIAL| +DELETE SERVER VICIDIAL TRUNK RECORD|EXPEDIENTE DEL TRONCO DEL SERVIDOR VICIDIAL DE LA CANCELACIo`N| +VICIDIAL TRUNKS FOR THIS SERVER|TRONCOS DE VICIDIAL PARA ESTE SERVIDOR| + RESTRICTION | RESTRICCIo`N | + TRUNKS | TRONCOS | +Emergency VDAC Jam Clear|Claro Del Atasco De la Emergencia VDAC| +VDAC NOT CLEARED FOR CAMPAIGN|VDAC NO DESPEJo` PARA LA CAMPAÑA| +LAST VDAC RECORD CLEARED FOR CAMPAIGN|DE REGISTRO PASADO DE VDAC DESPEJADA PARA LA CAMPAÑA| +VDAC CLEAR CONFIRMATION|CONFIRMACIo`N CLARA DE VDAC| +Click here to delete the oldest LIVE record in VDAC for|Chasque aquí para suprimir el más viejo VIVEN expediente en VDACpara| +Allowed Campaigns|Campagne Permesse| +USERS CAN VIEW ANY CAMPAIGN|GLI UTENTI POSSONO VISUALIZZARE QUALSIASI CAMPAGNA| +Campaign Not Allowed|Campagna Non Autorizzata| +### START translations for 2.0.3 release ### +ADAPT OVERRIDE|FORZA LIVELLO ANCHE CON MODALITA` ADAPT| +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.|El checkbox de la INVALIDACIo`N del ADAPTAR permite que usted fuerceun nuevo nivel del dial aunque el me`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.| +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|Hay dos opciones especiales que usted puede utilizar conjuntamente conel número de telefono alterno que marca, ALTPH2 de HotKey - el dialcaliente del telefono 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| +Concurrent Transfers|Transferencias Concurrentes| +Concurrent Transfers -<\/B> 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|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 AUTOMo`VIL. Este campo no es utilizado por el me`todo MANUAL del dial| +Auto Alt-Number Dialing -<\/B> 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|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 me`todos del dial cuando no hay contacto en elnúmero de telefono principal para un plomo, los estados del NA, deB, de la C.C. y de N. Este ajuste no es utilizado por el me`todoMANUAL del dial| +Auto Alt-Number Dialing|El Marcar Auto Del Alt-Nu`mero| +View Reports -<\/B> This option allows the user to view the VICIDIAL reports.|La visio`n divulga - esta opcio`n permite que el usuario visio`n losinformes de VICIDIAL.| +Modify Sections -<\/B> 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|Modifique las secciones - estas opciones permiten que el usuariovisio`n y modifique cada uno los expedientes de las secciones. Si elsistema a 0, el usuario puede considerar la lista de la seccio`n, perono el detalle o la pantalla de la modificacio`n de un expediente enesa seccio`n| +VICIDIAL AUTO ALT DIAL STATUSES|ESTADOS AUTO DEL DIAL DE VICIDIAL ALT| +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|Si se fija el campo que marca del Alt-Nu`mero auto, despue`s losplomos que son dispositioned bajo estos estados del dial del alt delautomo`vil tendrán su alt_phone y-o los campos address3 marcadosdespue`s de que cualesquiera de estos ninguno-contesten a estados sefijan| +AUTO ALT NUMBER DIALING FOR THIS CAMPAIGN|ESITI PER I QUALI CHIAMARE I NUMERI ALTERNATIVI| +ADD NEW AUTO ALT NUMBER DIALING STATUS|AGGIUNGI NUOVO ESITO CHIAMA-AUTO-NUM-ALTERN| +AUTO ALT DIAL STATUS NOT ADDED|ESTADO AUTO DEL DIAL DEL ALT NO AGREGADO| +there is already an entry for this campaign with this status|hay ya una entrada para esta campaña con este estado| +AUTO ALT DIAL STATUS ADDED|ESTADO AUTO DEL DIAL DEL ALT AGREGADO| +AUTO ALT DIAL STATUS NOT DELETED|ESTADO AUTO DEL DIAL DEL ALT NO SUPRIMIDO| +AUTO ALT DIAL STATUS DELETED|ESTADO AUTO DEL DIAL DEL ALT SUPRIMIDO| +this auto alt dial status is not in this campaign|este estado del dial del alt del automo`vil no está en esta campaña| +New Auto Alt Dial Status|Nuevo Estado Del Dial Del Alt Del Automo`vil| +Delete Auto Alt Dial Status|Estado Auto Del Dial Del Alt De la Cancelacio`n| + Users | Utenti | + Campaigns | Campagne | + Lists | Liste | + Scripts | Script | + Filters | Filtri | + In-Groups | Gruppi Inbound | + User Groups | Gruppi Utenti | + Remote Agents | Operatori Remoti | + Admin | Admin | + Reports | Report | + Show Users | Visualizza Utenti | + Add A New User | Aggiungi Nuovo Utente | + Search For A User | Ricerca Utenti | + Show Campaigns | Visualizza Campagne | + Add A New Campaign | Aggiungi Nuova Campagna | + Real-Time Campaigns Summary | Riepilogo Campagne In Tempo Reale | + Show Lists | Visualizza Liste | + Add A New List | Nuova Lista | + Search For A Lead | Ricerca Contatti | + Add Number To DNC | Aggiungi Numero Alla Lista DNC | + Load New Leads | Carica Nuovi Contatti | + Show Scripts | Visualizza Script | + Add A New Script | Aggiungi Nuovo Script | + Show Filters | Visualizza Filtri | + Add A New Filter | Aggiungi Nuovo Filtro | + Show In-Groups | Visualizza Gruppi Inbound | + Add A New In-Group | Aggiungi Gruppo Inbound | + Show User Groups | Visualizza Gruppi Utenti | + Add A New User Group |Aggiungi Nuovo Gruppo Utente | + Group Hourly Report | Report Orario Per Gruppo | + Show Remote Agents | Visualizza Operatori Remoti | + Add New Remote Agents |Aggiungi Operatore Remoto | + Call Times | Orari Chiamata | + Phones | Telefoni | + Conferences | Conferencias | + Servers | Server | + Show Call Times | Elenca Orari Chiamata | + Add A New Call Time | Nuovo Orario Chiamate | + Show State Call Times | Elenca Orari Chiamata Per Stati | + Add A New State Call Time | Nuovo Orario Chiamate Per Stato | + Show Phones | Visualizza Telefoni | + Add A New Phone | Aggiungi Un Nuovo Telefono | + Show Conferences |Visualizza Conferenze | + Add A New Conference | Aggiungi Conferenza | + Show VICIDIAL Conferences | Visualizza Conferenze VICIDIAL | + Add A New VICIDIAL Conference | Aggiungi Conferenza VICIDIAL | + Show Servers | Visualizza Server | + Add A New Server | Aggiungi Un Nuovo Server | +CallBacks Within User Group|Richiami In Attesa In Questo Gruppo| +USERS WITHIN THIS USER GROUP|UTENTI IN QUESTO GRUPPO| +Modify Users: |Modifica Utenti: | +Modify Campaigns: |Modifica Campagne: | +Modify Lists: |Modifica Liste: | +Modify Scripts: |Modifica Script: | +Modify Filters: |Modifica Filtri: | +Modify In-Groups: |Modifica Gruppi Inbound: | +Modify User Groups: |Modifique A Grupos De Usuario: | +Modify Remote Agents: |Modifica Operatori Remoti: | +Modify Servers: |Modifica Server: | +View Reports: |Visualizza Report: | +You do not have permission to view this page|Non hai l`autorizzazione per accedere a questa pagina| +Lead Time Zone Lookup: |Ricerca Fusi Orari (Solo USA): | +Lead Duplicate Check: |Controlla Contatti Duplicati:| +Agent Pause Codes Active -<\/B> 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|La pausa del agente cifra activo - permite que los agentes seleccionenun co`digo de la pausa cuando chascan encendido el boton de PAUSA envicidial.php. Los co`digos de la pausa son definibles por campaña enel fondo de la pantalla del detalle de la opinio`n de la campaña y sealmacenan en la tabla del vicidial_agent_log. El defecto es N| +AGENT PAUSE CODES|CODICI PAUSA OPERATORE| +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.|Si la pausa del agente cifra el campo activo se fija a activo entonceslos agentes podrá seleccionar de estos co`digos de la pausa cuandochascan encendido el boton de PAUSA en sus pantallas. Estos datosentonces se almacenan en el registro vicidial del agente. El co`digode la pausa debe contener solamente letras y números y ser menos de 7caracteres de largo. El nombre del co`digo de la pausa puede estar nomás de largo de 30 caracteres.| +AGENT PAUSE CODES FOR THIS CAMPAIGN|CODICI PAUSA OPERATORE PER QUESTA CAMPAGNA| +>PAUSE CODES<|>CODICI PAUSA<| +BILLABLE|FATTURABILE| +ADD NEW AGENT PAUSE CODE|NUOVO CODICE PAUSA| +Pause Code: |Codice Pausa: | +Pause Code Name: |Nome Codice Pausa: | +Billable: |Fatturabile: | +New Agent Pause Code|Nuevo Co`digo De la Pausa Del Agente| +Modify Agent Pause Code|Modifique El Co`digo De la Pausa Del Agente| +Delete Agent Pause Code|Co`digo De la Pausa Del Agente De la Cancelacio`n| +AGENT PAUSE CODE NOT ADDED|Co`DIGO DE LA PAUSA DEL AGENTE NO AGREGADO| +there is already an entry for this campaign with this pause code|hay ya una entrada para esta campaña con este code de la pausa| +AGENT PAUSE CODE ADDED|EL Co`DIGO DE LA PAUSA DEL AGENTE AGREGo`| +AGENT PAUSE CODE NOT MODIFIED|Co`DIGO DE LA PAUSA DEL AGENTE NO MODIFICADO| +CAMPAIGN PAUSE CODE NOT DELETED|Co`DIGO DE LA PAUSA DE LA CAMPAÑA NO SUPRIMIDO| +Campaign Stats Refresh:|Aggiornamento Statistiche Campagna:| +Campaign Description -<\/B> This is a memo field for the campaign, it is optional and can be a maximum of 255 characters in length|Descripcio`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| +Campaign Change Date -<\/B> This is the last time that the settings for this campaign were modified in any way|Fecha del cambio de la campaña - esta es la vez última que losajustes para esta campaña fueron modificados de cualquier manera| +Campaign Stats Refresh -<\/B> This checkbox will allow you to force a vicidial stats refresh, even if the campaign is not active|Los Stats de la campaña restauran - este checkbox permitirá queusted fuerce un stats vicidial restaura, incluso si la campaña no esactiva| +Last Campaign Login Date -<\/B> This is the last time that an agent was logged into this campaign|La fecha pasada de la conexion de la campaña - esta es la vezúltima que un agente fue registrado en esta campaña| +List Description -<\/B> This is the memo field for the list, it is optional|Descripcio`n de la lista - este es el campo de la nota para la lista,e`l es opcional| +List Change Date -<\/B> This is the last time that the settings for this list were modified in any way|Fecha del cambio de la lista - esta es la vez última que los ajustespara esta lista fueron modificados de cualquier manera| +List Last Call Date -<\/B> This is the last time that lead was dialed from this list|Fecha de la llamada del último de la lista - esta es la vez últimaque conduce fue marcado de esta lista| +List Description: |Descrizione Lista: | +List Change Date: |Data Modifica Lista: | +Campaign Description: |Descrizione Campagna: | +VICIDIAL Recording Override -<\/B> 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|Invalidacio`n de la grabacion de VICIDIAL - esta opcio`n seeliminará lo que es la opcio`n en la campaña para la grabacion.LISIADO no eliminará el ajuste de la grabacion de la campaña. NUNCAinhabilitará la grabacion en el cliente. ONDEMAND es el defecto ypermite que el agente comience y pare a registrar según lonecesitado. ALLCALLS comenzará la grabacion en el cliente siempreque una llamada se envíe a un agente. ALLFORCE comenzará lagrabacion en el cliente siempre que una llamada se envíe a un agenteque no da al agente ninguna opcio`n para parar el registrar. ParaALLCALLS y ALLFORCE hay una opcio`n para utilizar la grabacionretrasa para reducir en grabaciones y carga de sistema muy cortas delrecude| +VICIDIAL Recording Override: |Invalidacio`n De la grabacion de VICIDIAL:| +MODIFY VICIDIAL SYSTEM SETTINGS|MODIFICA IMPOSTAZIONI DI SISTEMA| + System Settings | Impostazioni di Sistema | +VICIDIAL SYSTEM SETTINGS MODIFIED|IMPOSTAZIONI DI SISTEMA MODIFICATE| +Version: |Versione: | +Use Non-Latin: |UsA Non-Latino: | +Webroot Writable: |Webroot Escribible: | +Enable QueueMetrics Logging: |Permita La Registracion De QueueMetrics: | +QueueMetrics Server IP: |IP Del Servidor De QueueMetrics: | +QueueMetrics DB Name: |Nombre del DB De QueueMetrics: | +QueueMetrics DB Login: |conexion del DB De QueueMetrics: | +QueueMetrics DB Password: |Contraseña del DB De QueueMetrics: | +Use Non-Latin -<\/B> 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|Uso No-Latino - esta opcio`n permite que usted omita la escritura dela exhibicio`n de la tela los caracteres del uso UTF8 y que no haganinguna expresio`n regular de la latino-cara`cter-familia que sefiltra ni que no exhiba el formato. El defecto es 0| +Webroot Writable -<\/B> 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|Webroot escribible - este ajuste permite que usted defina si losarchivos de la temperatura y los archivos de la autentificacio`n seancolocados en el webroot en su web server. El defecto es 1| +Enable QueueMetrics Logging -<\/B> 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|Permita la registracion 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| +QueueMetrics Server IP -<\/B> This is the IP address of the database for your QueueMetrics installation|IP del servidor de QueueMetrics - este es el IP address de la base dedatos para su instalacio`n de QueueMetrics| +QueueMetrics Database Name -<\/B> This is the database name for your QueueMetrics database|Nombre de la base de datos de QueueMetrics - este es el nombre de labase de datos para su base de datos de QueueMetrics| +QueueMetrics Database Login -<\/B> This is the user name used to log in to your QueueMetrics database|conexion de la base de datos de QueueMetrics - este es el nombre delusuario usado para abrirse una sesio`n a su base de datos deQueueMetrics| +QueueMetrics Database Password -<\/B> This is the password used to log in to your QueueMetrics database|Contraseña de la base de datos de QueueMetrics - esta es lacontraseña usada para abrirse una sesio`n a su base de datos deQueueMetrics| +QueueMetrics URL -<\/B> This is the URL or web site address used to get to your QueueMetrics installation|URL de QueueMetrics - esta es la Direccion del URL o del Web siteusada para conseguir a su instalacio`n de QueueMetrics| +QueueMetrics Log ID -<\/B> This is the server ID that all VICIDIAL logs going into the QueueMetrics database will use as an identifier for each record|Identificacio`n del registro de QueueMetrics - esta es laidentificacio`n del servidor que todos los registros de VICIDIAL queentran la base de datos de QueueMetrics utilizarán como identificadorpara cada expediente| +QueueMetrics Log ID: |Log ID QueueMetrics: | +Campaign Dial Status Added|Esito Campagna Aggiunto| +Campaign Dial Status Removed|Esito Campagna Rimosso| +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|Para agregar otro estado al dial, seleccio`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| +CAMPAIGN DIAL STATUS NOT ADDED|ESITO CHIAMATA PER CAMPAGNA NON AGGIUNTO| +CAMPAIGN DIAL STATUS ADDED|ESITO CHIAMATA PER CAMPAGNA AGGIUNTO| +this dial status is not selected for this campaign|questo esito di chiamata non e` selezionato per questa campagna| +CAMPAIGN DIAL STATUS NOT REMOVED|ESITO CAMPAGNA NON RIMOSSO| +CAMPAIGN DIAL STATUS REMOVED|ESITO CAMPAGNA RIMOSSO| +>REMOVE<|>RIMUOVI<| +Dial Status |Esito Chiamata | +no dial statuses selected for this campaign|nessun esito di chiamata selezionato per questa campagna| +QueueMetrics EnterQueue Prepend -<\/B> 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|QueueMetrics EnterQueue prepend - este campo se utiliza para permitirprepending de una de las zonas de informaciones del vicidial_listdelante del número de telefono del cliente para los informesmodificados para requisitos particulares de QueueMetrics. El defectono es NINGUNO no poblar cualquier cosa| +QueueMetrics EnterQueue Prepend: |QueueMetrics EnterQueue Prepend: | +VICIDIAL Agent Disable Display -<\/B> 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|El agente de VICIDIAL inhabilita la exhibicio`n - este campo seutiliza para seleccionar cuando demostrar a un agente cuando susesio`n ha sido inhabilitada por el sistema, una accio`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| +VICIDIAL Agent Disable Display: |El Agente de VICIDIAL Inhabilita La Exhibicio`n:| +Disable Alter Customer Data -<\/B> If set to Y, does not change any of the customer data record when an agent dispositions the call. Default is 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| +Disable Alter Customer Data: |Disabilita modifica dati clienti: | +Agent Alter Customer Data Override -<\/B> 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|El agente altera la invalidacio`n de los datos del cliente - estaopcio`n se eliminará lo que es la opcio`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 que` es elajuste de la campaña. El defecto es NOT_ACTIVE| +Agent Alter Customer Data Override: |El Agente Altera La Invalidacio`n De los Datos Del Cliente: | +Allow No-Hopper-Leads Logins -<\/B> 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|Permita Ninguno-Tolva-Conduce conexiones - si el sistema a Y, permiteagentes a la conexion a la campaña incluso si no hay plomos cargadosen la tolva para esa campaña. Esta funcio`n no se necesita encampañas de CLOSER-type. El defecto es N| +Allow No-Hopper-Leads Logins: |Abilita Login Senza Contatti Da Chiamare: | +Enable SIPSAK Messages -<\/B> 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|Permita los mensajes de SIPSAK - si está permitido el servidorenviará mensajes al telefono del SIP a la exhibicio`n en laexhibicio`n del LCD del telefono cuando está registrado en VICIDIAL.La característica trabaja solamente con los telefonos del SIP yrequiere el uso del sipsak ser instalada en el web server. El defectoes 0| +Enable SIPSAK Messages: |Abilita messaggi SIPSAK: | +Allow SIPSAK Messages -<\/B> 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|Permita los mensajes de SIPSAK - si el sistema a 1, este permite queel ajuste de la tabla de los telefonos trabaje correctamente, elservidor enviará mensajes al telefono del SIP a la exhibicio`n en laexhibicio`n del LCD del telefono cuando está registrado en VICIDIAL.Esta característica trabaja solamente con los telefonos del SIP yrequiere el uso del sipsak ser instalada en el web server. El defectoes 0| +Allow SIPSAK Messages: |Permetti messaggi SIPSAK: | +Admin Home URL -<\/B> 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|URL casero del Admin - esta es la Direccion del URL o del Web siteque usted irá si usted chasca encendido el acoplamiento CASERO en latapa de la página de admin.php| +Admin Home URL: |URL Home Amministrazione: | +>HOME<|>HOME<| + Welcome | Benvenuti | +### START translations for 2.0.4 release ### +CHECK FOR DUPLICATES BY PHONE IN ALL CAMPAIGN LISTS|CONTROLLA DUPLICATI PER TELEFONO IN TUTTE LE LISTE DELLA CAMPAGNA| +CHECK FOR DUPLICATES BY PHONE IN ENTIRE SYSTEM|CONTROLLA DUPLICATI PER TELEFONO NELL` INTERO SISTEMA| +CHECK FOR DUPLICATES BY PHONE IN LIST ID|CONTROLLA DUPLICATI PER TELEFONO SOLO CON QUESTO ID LISTA| +NO DUPLICATE CHECK|NON CONTROLLARE DUPLICATI| +PHONE CODE OVERRIDE FOR THIS FILE|SOVRASCRITTURA DEL CODICE TELEFONO PER QUESTO FILE| +Phone Code Override:|Sovrascrittura Codice Telefono:| +List ID Override:|Sovrascrittura ID Lista:| +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. The lead loader 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, but it does allow you to check for duplicates in itself, within the campaign or within the entire system. Also, make sure that you have created the list that these leads are to be under so that you can use them. Here is a list of the fields in their proper order for the lead files:|El cargador tela-basado básico del plomo de VICIDIAL se diseñasimplemente para tomar un archivo del plomo - hasta 8MB de tamaño quees la lengüeta o la pipa delimitada y para cargarlo en la tabla delvicidial_list. El cargador del plomo permite el campo que elige y deTXT- el texto claramente, los valores separados coma de CSV- y XLS-sobresalen formatos del archivo. El cargador del plomo no hace lavalidacio`n de datos, sino que permite que usted compruebe para sabersi hay duplicados en sí mismo, dentro de la campaña o dentro delsistema entero. Tambien, cercio`rese de que usted haya creado lalista que estos plomos son estar debajo de modo que usted puedautilizarlos. Aquí está una lista de los campos en su orden apropiadapara los archivos del plomo:| +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. Also, for duplication checks against gampaign lists, the list that has new leads going into it does need to be created in the system before you start to load the leads.|NOTAS: La funcionalidad del cargador del plomo del sobresalir espermitida por una serie de escrituras del Perl y necesita tener unarchivo correctamente configurado de /etc/astguiclient.conf en lugaren el web server. Tambien, los mo`dulos de un Perl de los pares sedeben cargar para ella para trabajar Tambien -oLE-Storage_Lite-Storage_Lite y la Hoja de balance-ParseExcel. Ustedpuede comprobar para saber si hay errores runtime en estos mirando suarchivo del error_log de apache. Tambien, para los cheques deduplicacio`n contra gampaign enumera, la lista que tiene nuevos plomosel entrar e`l necesita ser creada en el sistema antes de que ustedcomience a cargar los plomos.| +Campaign List Mix Added|Mezcla De la Lista De la Campaña Agregada| +Modify Campaign List Mix|Modifique La Mezcla De la Lista De la Campaña| +Campaign List Mix Removed|La Mezcla De la Lista De la Campaña Quito`| +Campaign Statuses|Esiti Campagna| +Campaign HotKeys|HotKeys Campagna| +Campaign Lead Recycle Entries|El Plomo De la Campaña Recicla Entradas| +Campaign Auto Alt Dial Statuses|Estados Auto Del Dial Del Alt De la Campaña| +Campaign Agent Pause Codes|Codici Pausa Operatore per Campagna| +Campaign Dial Statuses|Estados Del Dial De la Campaña| +Campaign List Mixes|Mezclas De la Lista De la Campaña| + Lead Recycle |Riciclaggio Contatti| + Auto-Alt Dial | Chiama-Auto-Num-Altern| + Pause Codes |Codici Pausa| + List Mix |Mix Liste| + Campaigns Main |Main Campagne| +List Order Mix -<\/B> Overrides the Lead Order and Dial Status fields. Will use the List and status parameters for the selected List Mix entry in the List Mix sub section instead. Default is DISABLED|Mezcla de la orden de la lista - elimina los campos de la orden delplomo y del estado del dial. Utilizará los parámetros de la lista ydel estado para la entrada seleccionada de la mezcla de la lista en laseccio`n del submarino de la mezcla de la lista en lugar de otro. Eldefecto es LISIADO| +List Mix ID -<\/B> ID of the list mix. Must be from 2-20 characters in length with no spaces or other special punctuation.|Identificacio`n de la mezcla de la lista - identificacio`n de lamezcla de la lista. Debe ser a partir de 2-20 caracteres en longitudsin los espacios o la otra puntuacio`n especial.| +List Mix Name -<\/B> Descriptive name of the list mix. Must be from 2-50 characters in length|Nombre de la mezcla de la lista - nombre descriptivo de la mezcla dela lista. Debe ser a partir de 2-50 caracteres en longitud| +List Mix Detail -<\/B> The composition of the List Mix entry. Contains the List ID, mix order, percentages and statuses that make up this List Mix. The percentages always have to add up to 100, and the lists all have to be active and set to the campaign for the order mix entry to be Activated|Detalle de la mezcla de la lista - la composicio`n de la entrada de lamezcla de la lista. Contiene la identificacio`n de la lista, la ordende la mezcla, los porcentajes y los estados que hacen para arriba estamezcla de la lista. Los porcentajes tienen que agregar siempre hasta100, y las listas todas tienen que ser activas y fijadas a la campañapara que la entrada de la mezcla de la orden sea activada| +List Mix Method -<\/B> The method of mixing all of the parts of the List Mix Detail together. EVEN_MIX will mix leads from each part interleaved with the other parts, like this 1,2,3,1,2,3,1,2,3. IN_ORDER will put the leads in the order in which they are listed in the List Mix Detail screen 1,1,1,2,2,2,3,3,3. RANDOM will put them in RANDOM order 1,3,2,1,1,3,2,1,3. Default is IN_ORDER.|Me`todo de la mezcla de la lista - el me`todo de mezclar a todas laspartes del detalle de la mezcla de la lista juntas. EVEN_MIX mezclarálos plomos de cada parte interpolada con las otras partes, como estos1.2.3.1.2.3.1.2.3. IN_ORDER pondrá los plomos en la orden en la cualse enumeran en la pantalla 1.1.1.2.2.2.3.3.3 del detalle de la mezclade la lista. La voluntad AL AZAR los puso en la orden AL AZAR1.3.2.1.1.3.2.1.3. El defecto es IN_ORDER.| +LIST MIXES FOR THIS CAMPAIGN: |MIX LISTA PER QUESTA CAMPAGNA: | +The human_answered field is used when calculating the drop percentage, or abandon rate. Setting human_answered to Y will use this status when counting the human-answered calls.|Human_answered el campo se utiliza al calcular el porcentaje de lagota, o la tarifa del abandono. El ajuste human_answered a Yutilizará este estado al contar las llamadas humano-contestadas.| +HUMAN ANSWER|RISPOSTA UMANA| +Human Answer:|Risposta Umana:| +ADDING VICIDIAL SYSTEM STATUSES|AGGIUNGI ESITI DI DEFAULT VICIDIAL| +MODIFY VICIDIAL SYSTEM STATUSES|MODIFICA ESITI DI DEFAULT VICIDIAL| +SYSTEM STATUS NOT ADDED|ESITO DI DEFAULT NON AGGIUNTO| +SYSTEM STATUS ADDED|ESITO DI DEFAULT AGGIUNTO| +SYSTEM STATUS NOT DELETED|ESITO DI DEFAULT NON ELIMINATO| +the system status cannot be a reserved status: |el estado de sistema no puede ser un estado reservado:| +the system status needs to be at least 1 characters in length|el estado de sistema necesita ser por lo menos los caracteres 1 enlongitud| +VICIDIAL STATUSES WITHIN THIS SYSTEM: |ESITI DI DEFAULT IN QUESTO SISTEMA: | +ADD NEW SYSTEM STATUS|AGGIUNGI UN NUOVO ESITO DI DEFAULT| +CUSTOM CAMPAIGN STATUSES LISTINGS:|ELENCO ESITI PERSONALIZZATI PER CAMPAGNA:| +CAMPAIGN HOTKEYS LISTINGS:|ELENCO HOTKEY CAMPAGNE:| +CAMPAIGN LEAD RECYCLE LISTINGS:|ELENCO CONTATTI DA RICICLARE:| +>LEAD RECYCLES<|>ESITI DA RICICLARE<| +CAMPAIGN LEAD AUTO-ALT DIAL LISTINGS:|ELENCO ESITI PER I QUALI CHIAMARE AUTOMATICAMENTE IL NUMERO ALTERNATIVO:| +CAMPAIGN AGENT PAUSE CODE LISTINGS:|ELENCO CODICI PAUSA OPERATORE PER CAMPAGNA:| +CAMPAIGN LIST MIX LISTINGS:|LISTADOS DE LA MEZCLA DE LA LISTA DE LA CAMPAÑA:| +The Category option allows you to group several statuses into a catogy that can be used for statistical analysis.|La opcio`n de la categoría permite que usted agrupe varios estados enun catogy que se pueda utilizar para el análisis estadístico.| +MODIFY VICIDIAL STATUS CATEGORIES|MODIFIQUE LAS CATEGORÍAS DEL ESTADO DE VICIDIAL| +ADDING VICIDIAL STATUS CATEGORY|ADICIo`N DE CATEGORÍA DEL ESTADO DE VICIDIAL| + Status Categories | Categorie di esiti| + System Statuses | Esiti di Default| +MODIFY VICIDIAL SYSTEM STATUSES|MODIFICA GLI ESITI DI DEFAULT DI VICIDIAL| +MODIFY VICIDIAL STATUS CATEGORY|MODIFICA LE CATEGORIE DI ESITI DI VICIDIAL| +Through the use of system statuses, you can have statuses that exist for campaign and in-group. The Status must be 1-6 characters in length, the description must be 2-30 characters in length and Selectable defines whether it shows up in VICIDIAL as an agent disposition. The human_answered field is used when calculating the drop percentage, or abandon rate. Setting human_answered to Y will use this status when counting the human-answered calls. The Category option allows you to group several statuses into a catogy that can be used for statistical analysis|Con el uso de los estados de sistema, usted puede tener estados queexistan para la campaña y el en-grupo. El estado debe ser 1-6caracteres en longitud, la descripcio`n debe ser 2-30 caracteres enlongitud y seleccionable define si demuestra para arriba en VICIDIALcomo disposicion del agente. Human_answered el campo se utiliza alcalcular el porcentaje de la gota, o la tarifa del abandono. El ajustehuman_answered a Y utilizará este estado al contar las llamadashumano-contestadas. La opcio`n de la categoría permite que ustedagrupe varios estados en un catogy que se pueda utilizar para elanálisis estadístico| +Through the use of system status categories, you can group together statuses to allow for statistical analysis on a group of statuses. The Category ID must be 2-20 characters in length with no spaces, the name must be 2-50 characters in length, the description is optional and TimeonVDAD Display defines whether that status will be one of the upto 4 statuses that can be calculated and displayed on the Time On VDAD Real-Time report|Con el uso de las categorías del estado de sistema, usted puedeagrupar juntos estados para tener en cuenta análisis estadístico enun grupo de estados. La identificacio`n de la categoría debe ser 2-20caracteres en longitud sin espacios, el nombre debe ser 2-50caracteres en longitud, la descripcio`n es opcional y la exhibicio`nde TimeonVDAD define si ese estado será uno de hasta que 4 estadosque se puedan calcular y exhibir en el tiempo en informe del tiemporeal de VDAD| +ADD NEW STATUS CATEGORY|AGGIUNGI NUOVA CATEGORIA DI ESITI| +STATUS CATEGORY NOT ADDED|CATEGORIA DI ESITI NON AGGIUNTA| +there is already a status category in the system with this ID|Esiste gia` una categoria di esiti con questo ID| +ID must be between 2 and 20 characters in length|L` ID deve essere lungo tra i 2 e i 50 caratteri| +name name must be between 2 and 50 characters in length|il nome deve essere lungo tra i 2 e i 50 caratteri| +STATUS CATEGORY NOT MODIFIED|CATEGORIA ESITI NON MODIFICATA| +the status category cannot be a reserved category: |la categoria di esiti non puo` essere una categoria riservata: | +the status category needs to be at least 2 characters in length|il nome delle categorie di esiti deve essere lungo almeno 2 caratteri| +STATUS CATEGORY DELETED|CATEGORIA ESISI CANCELLATA| +STATUS CATEGORY MODIFIED|CATEGORIA ESITI MODIFICATA| +Category: |Categoria: | +the system status name needs to be at least 1 characters in length|il nome di un esito di default deve essere lungo almeno 1 carattere| +SYSTEM STATUS NOT MODIFIED|ESITO DI DEFAULT NON MODIFICATO| +SYSTEM STATUS MODIFIED|ESITO DI DEFAULT MODIFICATO| +ERROR: There are already 4 Status Categories set to TimeOnVDAD Display|ERRORE: Ci sono gia` 4 Categorie di Stato attivi nel display TimeOnVDAD| +CUSTOM CAMPAIGN STATUS MODIFIED|ESITO PERSONALIZZATO PER CAMPAGNA MODIFICATO| +LIST MIX NOT MODIFIED|MIX LISTA NON MODIFICATO| +LIST MIX MODIFIED|MIX LISTA MODIFICATO| +You cannot delete the last list_id entry from a list mix|Non puoi cancellare l`ultimo list_id da un mix di liste| +LIST MIX ADDED: |MIX LISTA AGGIUNTO: | +LIST MIX NOT ADDED |MIX LISTA NON AGGIUNTO| +There is already a list mix with this ID in the system|Esiste gia` un mix di lista con questo ID| +LIST MIX NOT DELETED|MIX LISTA NON CANCELLATO| +LIST MIX DELETED: |MIX LISTA CANCELLATO: | +SET TO ACTIVE|ATTIVA| +LIST MIX NOT ACTIVATED|MIX LISTA NON ATTIVATO| +LIST MIX ACTIVATED|MIX LISTA ATTIVATO| +Enable Agent Transfer Logfile -<\/B> This option will log to a text logfile on the webserver every time a call is transferred to an agent. Default is 0, disabled|Permita el logfile de la transferencia del agente - esta opcio`nregistrará a un logfile del texto en el webserver cada vez que unallamada se transfiere a un agente. El defecto es 0, inhabilitado| +Enable Agent Transfer Logfile|Permita El Logfile De la Transferencia Del Agente| +Call Time -<\/B> This is the call time scheme to use for this inbound group. Keep in mind that the time is based on the server time. Default is 24hours|Tiempo de la llamada - este es el esquema del tiempo de la llamada autilizar para este grupo de entrada. Tenga presente que el tiempoestá basado en el tiempo del servidor. El defecto es 24hours| +After Hours Action -<\/B> The action to perform if it is after hours as defined in the call time for this inbound group. HANGUP will immediately hangup the call, MESSASGE will play the file in the After Hours Message Filenam field, EXTENSION will send the call to the After Hours Extension in the dialplan and VOICEMAIL will send the call to the voicemail box listed in the After Hours Voicemail field. Default is MESSAGE|Despue`s de la accio`n de las horas - la accio`n a realizarse si esdespue`s de horas según lo definido en la e`poca de la llamada paraeste grupo de entrada. Del RETRASO de la voluntad el retrasoinmediatamente la llamada, MESSASGE jugará el archivo en despue`s delcampo de Filenam del mensaje de las horas, la Extension enviará lallamada a despue`s de la extension de las horas en el dialplan yVOICEMAIL enviará la llamada a la caja del voicemail enumerada endespue`s del campo de Voicemail de las horas. El defecto es MENSAJE| +After Hours Message Filename -<\/B> The audio file located on the server to be played if the Action is set to MESSAGE. Default is vm-goodbye|Despue`s del nombre de fichero del mensaje de las horas - el archivoaudio situado en el servidor que se jugará si la accio`n se fija alMENSAJE. El defecto es VM-ADIO`S| +After Hours Extension -<\/B> The dialplan extension to send the call to if the Action is set to EXTENSION. Default is 8300|Despue`s de la extension de las horas - la extension dialplan paraenviar la llamada si la accio`n se fija a la Extension. El defecto es8300| +After Hours Voicemail -<\/B> The voicemail box to send the call to if the Action is set to VOICEMAIL|Despue`s de las horas Voicemail - la caja del voicemail para enviar lallamada si la accio`n se fija a VOICEMAIL| +Welcome Message Filename -<\/B> The audio file located on the server to be played when the call comes in. If set to ---NONE--- then no message will be played. Default is ---NONE---|Nombre de fichero agradable del mensaje - el archivo audio situado enel servidor que se jugará cuando viene la llamada adentro. Si sistemaa ---NONE --- entonces no se jugará ningún mensaje. El defecto es---NONE ---| +Music On Hold Context -<\/B> The music on hold context to use when the customer is placed on hold. Default is default|Música en contexto del asimiento - la música en el contexto delasimiento para utilizar cuando colocan al cliente en asimiento. Eldefecto es defecto| +On Hold Prompt Filename -<\/B> The audio file located on the server to be played at a regular interval when the customer is on hold. Default is generic_hold. This audio file MUST be 9 seconds or less in length.|En el nombre de fichero del aviso del asimiento - el archivo audiosituado en el servidor que se jugará en un intervalo regular cuandoel cliente está en asimiento. El defecto es generic_hold. Estearchivo audio DEBE estar 9 segundos o menos en longitud.| +On Hold Prompt Interval -<\/B> The length of time in seconds to wait before playing the on hold prompt. Default is 60|En el intervalo del aviso del asimiento - la longitud de la hora ensegundos de esperar antes de jugar encendido el aviso del sostener. Eldefecto es 60| +Agent Alert Extension -<\/B> The extension to send into the agent session to announce that a call is coming to the agent. This extension should have a Playback of an audio file. To not use this function set this to X. Default is X|Extension alerta del agente - la extension a enviar en la sesio`ndel agente para anunciar que una llamada está viniendo al agente.Esta extension debe tener un aparato de lectura de un archivo audio.No utilizar esta funcio`n fijo` esto a X. Default es X| +Agent Alert Delay -<\/B> The length of time in milliseconds to wait before sending the call to the agent after playing the on Agent Alert Extension. Default is 1000|La alarma del agente retrasa - la longitud de la hora en milisegundosde esperar antes de enviar la llamada al agente despue`s de jugarencendido la extension alerta del agente. El defecto es 1000| +Call Time: |Tempo Chiamata: | +After Hours Action: |Despue`s De la Accio`n De las Horas:| +After Hours Message Filename: |Despue`s De Nombre de fichero Del Mensaje De las Horas:| +After Hours Extension: |Despue`s De la Extension De las Horas:| +After Hours Voicemail: |Despue`s De las Horas Voicemail:| +Welcome Message Filename: |Nombre de fichero Agradable Del Mensaje:| +Music On Hold Context: |Context Musica di Attesa:| +On Hold Prompt Filename: |En Nombre de fichero Del Aviso Del Asimiento:| +On Hold Prompt Interval: |En Intervalo Del Aviso Del Asimiento:| +Agent Alert Extension: |Extension Alerta Del Agente:| +Agent Alert Delay: |La Alarma Del Agente Retrasa:| +You will also be able to set the rank, or skill level, in this section for each of the inbound groups as well as being able to see the number of calls received from each inbound group for this specific agent|Usted Tambien podrá fijar la fila, o el nivel de habilidad, en estaseccio`n para cada uno de los grupos de entrada así como poder ver elnúmero de las llamadas recibidas de cada grupo de entrada para esteagente específico| +Allow Inbound and Blended -<\/B> This is where you can set whether the users of this campaign will have the option to take inbound calls with this campaign. If you want to do blended inbound and outbound then this must be set to Y. If you only want to do outbound dialing on this campaign set this to N. Default is N|Permita de entrada y mezclado - aquí es donde usted puede fijar silos usuarios de esta campaña tendrán la opcio`n para tomar llamadasde entrada con esta campaña. Si usted desea hacer de entrada y desalida mezclada entonces esto se debe fijar a Y. Si usted deseasolamente hacer marcar de salida en esta campaña fijo` esto a N.Default es N| +Allow Inbound and Blended: |Permita de entrada y mezclado:| +Add A Dial Status:|Aggiungi Un Esito Chiamata:| +Manual Dial List ID -<\/B> The default list_id to be used when an agent placces a manual call and a new lead record is created in vicidial_list. Default is 999. This field can contain digits only|Identificacio`n manual de la lista del dial - el list_id del defectoque se utilizará cuando los placces de un agente una llamada manual yun nuevo expediente del plomo se crean en vicidial_list. El defecto es999. Este campo puede contener dígitos solamente| +Manual Dial List ID: |ID Lista Chiamate Manuali:| +inbound_group_rank: orders by the rank given to the agent for the specific inbound group. Highest to Lowest|inbound_group_rank: o`rdenes de la fila dada al agente para el grupode entrada específico. Lo más arriba posible a lo más bajo posible| +fewest_calls: orders by the number of calls received by an agent for that specific inbound group. Least calls first|fewest_calls: o`rdenes por el número de las llamadas recibidas por unagente para ese grupo de entrada específico. Menos llamadas primero| +Campaign Ranks: |Classifiche Campagna:| +AGENT RANKS FOR THIS CAMPAIGN:|CLASSIFICA OPERATORI PER QUESTA CAMPAGNA:| +Copy Campaign|Copia Campagna| +COPY A CAMPAIGN|COPIA UNA CAMPAGNA| +Source Campaign: |Campagna da copiare:| +New Copied Campaign Addition|Nueva Adicio`n Copiada De la Campaña| +Copy In-Group|Copia Gruppo Inbound| +New Copied In-Group Addition|Nueva Adicin Copiada Del En-Grupo| +Copy User|Copia Utente| +New Copied User Addition|Nueva Adicio`n Copiada Del Usuario| +COPY USER|COPIA UTENTE| +Copy In-Group|Copia Gruppo Inbound| +COPY INBOUND GROUP|COPIA GRUPPO INBOUND| +campaign_rank: orders by the rank given to the agent for the campaign. Highest to Lowest|campaign_rank: o`rdenes de la fila dada al agente para la campaña. Lomás arriba posible a lo más bajo posible| +Default Transfer Group -<\/B> This field is the default In-Group that will be automatically selected when the agent goes to the transfer-conference frame in their agent interface|Grupo de la transferencia del defecto - este campo es el En-Grupo deldefecto que será seleccionado automáticamente cuando el agente va almarco de la transferir-conferencia en su interfaz del agente| +Default Transfer Group: |Grupo De la Transferencia Del Defecto:| +Allowed Transfer Groups: |Grupos Permitidos De la Transferencia:| +Allowed Transfer Groups -<\/B> With these checkbox listings you can select the groups that agents in this campaign can transfer calls to. Allow Closers must be enabled for this option to show up|Grupos permitidos de la transferencia - con estos listados delcheckbox usted puede seleccionar a los grupos a quienes los agentes enesta campaña pueden transferir llamadas. Permita Closers debe serpermitido para que esta opcio`n demuestre para arriba| +Campaign Ranks -<\/B> In this section you can define the rank an agent will have for each campaign. These ranks can be used to allow for preferred call routing when Next Agent Call is set to campaign_rank|La campaña alinea - en esta seccio`n usted puede definir a la filaque un agente tendrá para cada campaña. Estas filas pueden serutilizadas para tener en cuenta la encaminamiento preferida de lallamada cuando la llamada siguiente del agente se fija alcampaign_rank| +Also in this section is the ability to give the agent a rank for each inbound group. These ranks can be used for preferred call routing when that option is selected in the in-group screen|Tambien en esta seccio`n está la capacidad de dar al agente una filapara cada grupo de entrada. Estas filas pueden ser utilizadas para laencaminamiento preferida de la llamada cuando esa opcio`n seselecciona en la pantalla del en-grupo| +or leave blank for values in the file|o lasciare in bianco per usare i valori contenuti nel file| +AGENT PERFORMANCE DETAIL|DETTAGLI PERFORMANCE OPERATORE| +TOTALS|TOTALI| +VICIDIAL: Auto-dial Stats|VICIDIAL: Statistiche Auto-Dial| +DESCRIPTION|DESCRIZIONE| +VIEW MORE SETTINGS|VISUALIZZA PIU DATI| +VIEW LESS SETTINGS|VISUALIZZA MENO DATI| +Realtime All Campaigns Summary<|Riepilogo Di Tutte Le Campagne Aggiornato In Tempo Reale| +DROPPED MAX:|ABBATTIMENTO MAX:| +DIAL METHOD:|METODO CHIAMATA:| +DIALABLE LEADS:|CONTATTI CHIAMABILI:| +LEADS IN HOPPER:|CONTATTI IN CODA:| +DROPPED PERCENT:|PERCENT ABBATTIMENTO:| +HOPPER LEVEL:|LIVELLO CODA CHIAMATE:| +AVG AGENTS:|MEDIA OPERATORI:| +ORDER:|ORDINE:| +FILTER:|FILTRO:| +DIAL LEVEL:|LIVELLO CHIAMATE:| +DIAL TIMEOUT:|TIMEOUT CHIAMATA:| +VIEW USER GROUP|MOSTRA GRUPPI UTENTI| +HIDE USER GROUP|NASCONDI GRUPPI UTENTI| +SHOW AGENT NAME|MOSTRA NOME OPERATORE| +SHOW AGENT ID|MOSTRA ID OPERATORE| +HIDE SERVER INFO|NASCONDI INFO SERVER| +SHOW SERVER INFO|MOSTRA INFO SERVER| +SHOW WAITING CALLS DETAIL|MOSTRA DETTAGLI CHIAMATE IN ATTESA| +HIDE WAITING CALLS DETAIL|NASCONDI DETTAGLI CHIAMATE IN ATTESA| +>SUMMARY<|>RIEPILOGO<| +STATUSES:|ESITI:| + NO AGENTS ON CALLS| NESSUN OPERATORE AL TELEFONO| +PLEASE SELECT A CAMPAIGN AND DATE ABOVE AND CLICK|PER FAVORE SELEZIONA UNA CAMPAGNA E UNA DATA, POI PREMI| +PLEASE SELECT AN IN-GROUP AND DATE RANGE ABOVE AND CLICK|PER FAVORE SELEZIONA UN GRUPPO INBOUND E UN INTERVALLO DI TEMPO, POI PREMI| +PLEASE SELECT A SERVER AND DATE/TIME RANGE ABOVE AND CLICK|PER FAVORE SELEZIONA UN SERVER E UN INTERVALLO DI TEMPO, POI PREMI| +Date/Time Range:|Intervallo di tempo in formato Data/Ora:| +Server Stats and Reports<|Statistiche e Report<| +>Modify<|>Modifica<| +>DROPPED / ANSWERED:<|>ABBATTUTE / RISPOSTE:<| +>STATUSES:<|>ESITI:<| +>SLOW<|>PIU LENTO<| +>GO<|>INIZIA<| +>MAX LEVEL:<|>LIVELLO MAX:<| +> TIME:<|> DATA:<| +>CALLS TODAY:<|>CHIAMATE OGGI:<| +>FULL NAME<|>NOME COMPLETO<| +>LEVEL<|>LIVELLO<| +>GROUP<|>GRUPPO<| +>USER ID<|>ID UTENTE<| +>USER CALLBACK HOLD LISTINGS:|>ELENCO RICHIAMI DA EFFETTUARE PER L`UTENTE:| +>ENTRY DATA<|>DATA INSERIMENTO<| +>CALLBACK DATA<|>DATA RICHIAMO<| +>LEAD<|>CONTATTO<| +>Source User:|>Utente Da Copiare:| +>CAMPAIGN<|>CAMPAGNA<| +>STATUSES<|>ESITI<| +>MODIFY STATUSES<|>MODIFICA ESITI<| +>HOTKEYS<|>HOTKEY<| +>MODIFY LEAD RECYCLES<|>MODIFICA CONTATTI DA RICICLARE<| +>MODIFY HOTKEYS<|>MODIFICA HOTKEY<| +>MODIFY PAUSE CODES<|>MODIFICA CODICI PAUSA<| +>NONE<|>NESSUNO<| +>AUTO-ALT DIAL<|>CHIAMA-AUTO-NUM-ALTERN<| +>MODIFY AUTO-ALT DIAL<|>MODIFICA CHIAMA-AUTO-NUM-ALTERN<| +>Auto Alt Dial<|>Chiama Auto Num Altern<| +group:|gruppo:| +status:|esito:| +date with hour:|data e ora:| +example:|esempio:| +>TOTAL <|>TOTALE <| +>USER<|>UTENTE<| +>IP ADDRESS<|>INDIRIZZO IP<| +>Click here to see all CallBack Holds in this user group<|>Clicca qui per visualizzare tutti i richiami di questo utente<| +>DELETE THIS SERVER<|>CANCELLA QUESTO SERVER<| +>GMT Local: <|>Fuso Orario Locale: <| +>SELECT-<|>SELEZIO<| +>ABLE<|>NABILE<| +>HUMAN<|>RISPOSTA<| +>ANSWER<|>UMANA<| +>CATEGORY<|>CATEGORIA<| +>MODIFY/DELETE<|>MODIFICA/CANCELLA<| +value="MODIFY"|value="MODIFICA"| +>ADD NEW SCRIPT<|>AGGIUNGI NUOVO SCRIPT<| +no spaces|senza spazi| +>Source Group ID: <|>ID Gruppo Da Copiare: <| +>AGENT RANKS FOR THIS INBOUND GROUP:<|>CLASSIFICA OPERATORI PER QUESTO GRUPPO INBOUND:<| +RANK<|CLASSIFICA<| +CALLS TODAY<|CHIAMATE OGGI<| +>Click here to see a report for this inbound group<|>Clicca qui per visualizzare un report per questo gruppo inbound<| +>INBOUND GROUPS USING THIS CALL TIME:<|>GRUPPI INBOUND CHE UTILIZZANO QUESTO ORARIO:<| +>UNDEFINED - Default Category<|>NON DEFINITO - Categoria Di Default<| +>DELETE THIS CONFERENCE<|>CANCELLA QUESTA CONFERENZA<| +>DELETE THIS VICIDIAL CONFERENCE<|>CANCELLA QUESTA CONFERENZA VICIDIAL<| +>please select a campaign from the pulldown above<|>per favore seleziona una campagna dal menu qui in alto<| diff --git a/agc_2-X/branches/agc_2.0.4/www/agc/conf_exten_check.php b/agc_2-X/branches/agc_2.0.4/www/agc/conf_exten_check.php index ae3b84b5..f88500e0 100644 --- a/agc_2-X/branches/agc_2.0.4/www/agc/conf_exten_check.php +++ b/agc_2-X/branches/agc_2.0.4/www/agc/conf_exten_check.php @@ -1,7 +1,7 @@ LICENSE: GPLv2 +# Copyright (C) 2008 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 @@ -35,6 +35,7 @@ # 61128-2255 - Added update for manual dial vicidial_live_agents # 70319-1542 - Added agent disabled display function # 71122-0205 - Added vicidial_live_agent status output +# 80424-0442 - Added non_latin lookup from system_settings # require("dbconnect.php"); @@ -63,8 +64,32 @@ if (isset($_GET["auto_dial_level"])) {$auto_dial_level=$_GET["auto_dial_level" if (isset($_GET["campagentstdisp"])) {$campagentstdisp=$_GET["campagentstdisp"];} elseif (isset($_POST["campagentstdisp"])) {$campagentstdisp=$_POST["campagentstdisp"];} +header ("Content-type: text/html; charset=utf-8"); +header ("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1 +header ("Pragma: no-cache"); // HTTP/1.0 + + +############################################# +##### START SYSTEM_SETTINGS LOOKUP ##### +$stmt = "SELECT use_non_latin FROM system_settings;"; +$rslt=mysql_query($stmt, $link); +if ($DB) {echo "$stmt\n";} +$qm_conf_ct = mysql_num_rows($rslt); +$i=0; +while ($i < $qm_conf_ct) + { + $row=mysql_fetch_row($rslt); + $non_latin = $row[0]; + $i++; + } +##### END SETTINGS LOOKUP ##### +########################################### + +if ($non_latin < 1) +{ $user=ereg_replace("[^0-9a-zA-Z]","",$user); $pass=ereg_replace("[^0-9a-zA-Z]","",$pass); +} # default optional vars if not set if (!isset($format)) {$format="text";} @@ -81,11 +106,12 @@ if (!isset($query_date)) {$query_date = $NOW_DATE;} $random = (rand(1000000, 9999999) + 10000000); - $stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; +$stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$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]; if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) { diff --git a/agc_2-X/branches/agc_2.0.4/www/agc/dbconnect.php b/agc_2-X/branches/agc_2.0.4/www/agc/dbconnect.php index 64e3607d..1ec109c0 100644 --- a/agc_2-X/branches/agc_2.0.4/www/agc/dbconnect.php +++ b/agc_2-X/branches/agc_2.0.4/www/agc/dbconnect.php @@ -44,7 +44,7 @@ $local_AMP = '@'; $ext_context = 'demo'; $recording_exten = '8309'; $WeBRooTWritablE = '1'; -$non_latin = '0'; # set to 1 for UTF rules +$non_latin = '0'; # set to 1 for UTF rules, overridden by system_settings $flag_channels=0; $flag_string = 'VICIast20'; diff --git a/agc_2-X/branches/agc_2.0.4/www/agc/manager_send.php b/agc_2-X/branches/agc_2.0.4/www/agc/manager_send.php index 211a3e7e..6b322a41 100644 --- a/agc_2-X/branches/agc_2.0.4/www/agc/manager_send.php +++ b/agc_2-X/branches/agc_2.0.4/www/agc/manager_send.php @@ -1,7 +1,7 @@ LICENSE: GPLv2 +# Copyright (C) 2008 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 @@ -70,8 +70,12 @@ # 70322-1636 - Added sipsak display ability # 80331-1433 - Added second transfer try for VICIDIAL transfers on manual dial calls # 80402-0121 - Fixes for manual dial transfers on some systems +# 80424-0442 - Added non_latin lookup from system_settings # +$version = '2.0.4-31'; +$build = '80424-0442'; + require("dbconnect.php"); ### These are variable assignments for PHP globals off @@ -142,27 +146,49 @@ if (isset($_GET["allow_sipsak_messages"])) {$allow_sipsak_messages=$_GET["all if (isset($_GET["session_id"])) {$session_id=$_GET["session_id"];} elseif (isset($_POST["session_id"])) {$session_id=$_POST["session_id"];} +header ("Content-type: text/html; charset=utf-8"); +header ("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1 +header ("Pragma: no-cache"); // HTTP/1.0 + +############################################# +##### START SYSTEM_SETTINGS LOOKUP ##### +$stmt = "SELECT use_non_latin FROM system_settings;"; +$rslt=mysql_query($stmt, $link); +if ($DB) {echo "$stmt\n";} +$qm_conf_ct = mysql_num_rows($rslt); +$i=0; +while ($i < $qm_conf_ct) + { + $row=mysql_fetch_row($rslt); + $non_latin = $row[0]; + $i++; + } +##### END SETTINGS LOOKUP ##### +########################################### + +if ($non_latin < 1) +{ $user=ereg_replace("[^0-9a-zA-Z]","",$user); $pass=ereg_replace("[^0-9a-zA-Z]","",$pass); $secondS = ereg_replace("[^0-9]","",$secondS); +} # default optional vars if not set if (!isset($ACTION)) {$ACTION="Originate";} if (!isset($format)) {$format="alert";} if (!isset($ext_priority)) {$ext_priority="1";} -$version = '2.0.4-30'; -$build = '80402-0121'; $StarTtime = date("U"); $NOW_DATE = date("Y-m-d"); $NOW_TIME = date("Y-m-d H:i:s"); if (!isset($query_date)) {$query_date = $NOW_DATE;} - $stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; +$stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$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]; if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) { diff --git a/agc_2-X/branches/agc_2.0.4/www/agc/vdc_db_query.php b/agc_2-X/branches/agc_2.0.4/www/agc/vdc_db_query.php index 5ba421ab..2cf95474 100644 --- a/agc_2-X/branches/agc_2.0.4/www/agc/vdc_db_query.php +++ b/agc_2-X/branches/agc_2.0.4/www/agc/vdc_db_query.php @@ -142,10 +142,11 @@ # 71226-1117 - added option to kick all calls from conference upon logout # 80128-1159 - fixed vicidial_log bugs # 80402-0121 - Fixes for manual dial transfers on some systems, removed /n persist flag +# 80424-0442 - Added non_latin lookup from system_settings # -$version = '2.0.4-68'; -$build = '80402-0121'; +$version = '2.0.4-69'; +$build = '80424-0442'; require("dbconnect.php"); @@ -282,12 +283,34 @@ if (isset($_GET["LogouTKicKAlL"])) {$LogouTKicKAlL=$_GET["LogouTKicKAlL"];} elseif (isset($_POST["LogouTKicKAlL"])) {$LogouTKicKAlL=$_POST["LogouTKicKAlL"];} +header ("Content-type: text/html; charset=utf-8"); +header ("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1 +header ("Pragma: no-cache"); // HTTP/1.0 + +############################################# +##### START SYSTEM_SETTINGS LOOKUP ##### +$stmt = "SELECT use_non_latin FROM system_settings;"; +$rslt=mysql_query($stmt, $link); +if ($DB) {echo "$stmt\n";} +$qm_conf_ct = mysql_num_rows($rslt); +$i=0; +while ($i < $qm_conf_ct) + { + $row=mysql_fetch_row($rslt); + $non_latin = $row[0]; + $i++; + } +##### END SETTINGS LOOKUP ##### +########################################### + +if ($non_latin < 1) +{ $user=ereg_replace("[^0-9a-zA-Z]","",$user); $pass=ereg_replace("[^0-9a-zA-Z]","",$pass); $length_in_sec = ereg_replace("[^0-9]","",$length_in_sec); $phone_code = ereg_replace("[^0-9]","",$phone_code); $phone_number = ereg_replace("[^0-9]","",$phone_number); - +} # default optional vars if not set if (!isset($format)) {$format="text";} @@ -311,6 +334,7 @@ else { $stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$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]; @@ -387,7 +411,6 @@ if ($ACTION == 'LogiNCamPaigns') $LOGallowed_campaignsSQL=''; $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); if ( (!eregi("ALL-CAMPAIGNS",$row[0])) ) @@ -398,7 +421,6 @@ if ($ACTION == 'LogiNCamPaigns') } $stmt="SELECT campaign_id,campaign_name from vicidial_campaigns where active='Y' $LOGallowed_campaignsSQL order by campaign_id"; - if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); $camps_to_print = mysql_num_rows($rslt); @@ -1121,7 +1143,6 @@ if ($stage == "end") ############################################# ##### 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); @@ -1257,7 +1278,6 @@ if ($stage == "end") { $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); } @@ -1284,7 +1304,6 @@ if ($stage == "end") $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); @@ -1324,7 +1343,6 @@ if ($stage == "end") $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); @@ -1348,7 +1366,6 @@ if ($stage == "end") $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); @@ -1992,7 +2009,6 @@ else ############################################# ##### 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); @@ -2024,12 +2040,11 @@ else # $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"; @@ -2047,7 +2062,6 @@ else $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); @@ -2125,6 +2139,7 @@ if ($ACTION == 'updateDISPO') $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) { @@ -2174,7 +2189,6 @@ if ($ACTION == 'updateDISPO') ############################################# ##### 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); @@ -2199,7 +2213,6 @@ if ($ACTION == 'updateDISPO') $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); @@ -2228,7 +2241,6 @@ if ($ACTION == 'updateLEAD') { $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); @@ -2244,7 +2256,6 @@ if ($ACTION == 'updateLEAD') $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); @@ -2314,7 +2325,6 @@ if ( ($ACTION == 'VDADpause') || ($ACTION == 'VDADready') ) ############################################# ##### 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); @@ -2341,7 +2351,6 @@ if ( ($ACTION == 'VDADpause') || ($ACTION == 'VDADready') ) $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); @@ -2448,7 +2457,6 @@ if ($ACTION == 'PauseCodeSubmit') ############################################# ##### 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); @@ -2479,7 +2487,6 @@ if ($ACTION == 'PauseCodeSubmit') $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); diff --git a/agc_2-X/branches/agc_2.0.4/www/agc/vicidial.php b/agc_2-X/branches/agc_2.0.4/www/agc/vicidial.php index fe613a80..28c37819 100644 --- a/agc_2-X/branches/agc_2.0.4/www/agc/vicidial.php +++ b/agc_2-X/branches/agc_2.0.4/www/agc/vicidial.php @@ -174,10 +174,11 @@ # 71226-1117 - added option to kick all calls from conference upon logout # 80330-0823 - Added new AST_blind monitoring ability and minor cleanup for release # 80402-0121 - Fixes for Manual Dial hangups and transfers +# 80428-0413 - UTF8 changes and testing # -$version = '2.0.4-145'; -$build = '80402-0121'; +$version = '2.0.4-146'; +$build = '80428-0413'; require("dbconnect.php"); @@ -245,6 +246,22 @@ $CIDdate = date("ymdHis"); $random = (rand(1000000, 9999999) + 10000000); +############################################# +##### START SYSTEM_SETTINGS LOOKUP ##### +$stmt = "SELECT use_non_latin FROM system_settings;"; +$rslt=mysql_query($stmt, $link); +if ($DB) {echo "$stmt\n";} +$qm_conf_ct = mysql_num_rows($rslt); +$i=0; +while ($i < $qm_conf_ct) + { + $row=mysql_fetch_row($rslt); + $non_latin = $row[0]; + $i++; + } +##### END SETTINGS LOOKUP ##### +########################################### + $conf_silent_prefix = '7'; # vicidial_conferences prefix to enter silently $HKuser_level = '5'; # minimum vicidial user_level for HotKeys $campaign_login_list = '1'; # show drop-down list of campaigns at login @@ -337,13 +354,12 @@ $LOGallowed_campaignsSQL=''; if ($relogin == 'YES') { $stmt="SELECT user_group from vicidial_users where user='$VD_login' and pass='$VD_pass'"; - if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} + if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $VU_user_group=$row[0]; $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); if ( (!eregi("ALL-CAMPAIGNS",$row[0])) ) @@ -518,7 +534,6 @@ if ($user_login_first == 1) { $stmt="SELECT phone_login,phone_pass from vicidial_users where user='$VD_login' and pass='$VD_pass' and user_level > 0;"; if ($DB) {echo "|$stmt|\n";} - if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $phone_login=$row[0]; @@ -602,7 +617,6 @@ $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]; @@ -613,7 +627,6 @@ $VDloginDISPLAY=0; $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,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]; @@ -639,7 +652,6 @@ $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]; @@ -671,7 +683,6 @@ $VDloginDISPLAY=0; ##### check to see that the campaign is active $stmt="SELECT count(*) FROM vicidial_campaigns where campaign_id='$VD_campaign' and active='Y';"; if ($DB) {echo "|$stmt|\n";} - if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $CAMPactive=$row[0]; @@ -683,7 +694,6 @@ $VDloginDISPLAY=0; $VARstatusnames=''; ##### grab the statuses that can be used for dispositioning by an agent $stmt="SELECT status,status_name FROM vicidial_statuses WHERE $selectableSQL status != 'NEW' order by status limit 50;"; - if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $VD_statuses_ct = mysql_num_rows($rslt); @@ -700,7 +710,6 @@ $VDloginDISPLAY=0; ##### grab the campaign-specific statuses that can be used for dispositioning by an agent $stmt="SELECT status,status_name FROM vicidial_campaign_statuses WHERE $selectableSQL status != 'NEW' and campaign_id='$VD_campaign' order by status limit 50;"; - if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $VD_statuses_camp = mysql_num_rows($rslt); @@ -721,7 +730,6 @@ $VDloginDISPLAY=0; ##### grab the campaign-specific HotKey statuses that can be used for dispositioning by an agent $stmt="SELECT hotkey,status,status_name FROM vicidial_campaign_hotkeys WHERE selectable='Y' and status != 'NEW' and campaign_id='$VD_campaign' order by hotkey limit 9;"; - if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $HK_statuses_camp = mysql_num_rows($rslt); @@ -752,7 +760,6 @@ $VDloginDISPLAY=0; ##### grab the statuses to be dialed for your campaign as well as other campaign settings $stmt="SELECT park_ext,park_file_name,web_form_address,allow_closers,auto_dial_level,dial_timeout,dial_prefix,campaign_cid,campaign_vdad_exten,campaign_rec_exten,campaign_recording,campaign_rec_filename,campaign_script,get_call_launch,am_message_exten,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,alt_number_dialing,scheduled_callbacks,wrapup_seconds,wrapup_message,closer_campaigns,use_internal_dnc,allcalls_delay,omit_phone_code,agent_pause_codes_active,no_hopper_leads_logins,campaign_allow_inbound,manual_dial_list_id,default_xfer_group,xfer_groups FROM vicidial_campaigns where campaign_id = '$VD_campaign';"; - if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $row=mysql_fetch_row($rslt); @@ -811,7 +818,6 @@ $VDloginDISPLAY=0; { ##### grab the pause codes for this campaign $stmt="SELECT pause_code,pause_code_name FROM vicidial_pause_codes WHERE campaign_id='$VD_campaign' order by pause_code limit 50;"; - if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $VD_pause_codes = mysql_num_rows($rslt); @@ -837,7 +843,6 @@ $VDloginDISPLAY=0; { $VARingroups=''; $stmt="select group_id from vicidial_inbound_groups where active = 'Y' and group_id IN($closer_campaigns) order by group_id limit 60;"; - 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); @@ -861,7 +866,6 @@ $VDloginDISPLAY=0; { $VARxfergroups=''; $stmt="select group_id,group_name from vicidial_inbound_groups where active = 'Y' and group_id IN($xfer_groups) order by group_id limit 60;"; - if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $xfer_ct = mysql_num_rows($rslt); @@ -880,7 +884,6 @@ $VDloginDISPLAY=0; ##### grab the number of leads in the hopper for this campaign $stmt="SELECT count(*) FROM vicidial_hopper where campaign_id = '$VD_campaign' and status='READY';"; - if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $row=mysql_fetch_row($rslt); @@ -942,7 +945,6 @@ $VDloginDISPLAY=0; $authphone=0; $stmt="SELECT count(*) 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); $authphone=$row[0]; @@ -981,7 +983,6 @@ 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]; @@ -1059,7 +1060,6 @@ 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]; @@ -1113,12 +1113,10 @@ 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 ( ($campaign_allow_inbound == 'Y') || ($campaign_leads_to_call > 0) || (ereg('Y',$no_hopper_leads_logins)) ) @@ -1126,12 +1124,10 @@ else ### insert an entry into the user log for the login event $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); @@ -1148,7 +1144,6 @@ 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); @@ -1160,7 +1155,6 @@ 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"; @@ -1168,28 +1162,24 @@ 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"; $stmt="DELETE from vicidial_live_inbound_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"; @@ -1203,7 +1193,6 @@ else ############################################# ##### 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); @@ -1235,7 +1224,6 @@ else ### 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"; @@ -1246,7 +1234,6 @@ else ##### grab the campaign_weight and number of calls today on that campaign for the agent $stmt="SELECT campaign_weight,calls_today FROM vicidial_campaign_agents where user='$VD_login' and campaign_id = '$VD_campaign';"; - if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $vca_ct = mysql_num_rows($rslt); @@ -1263,7 +1250,6 @@ else $calls_today = '0'; $stmt="INSERT INTO vicidial_campaign_agents (user,campaign_id,campaign_rank,campaign_weight,calls_today) values('$VD_login','$VD_campaign','0','0','$calls_today');"; 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"; @@ -1271,7 +1257,6 @@ 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,campaign_weight,calls_today) values('$VD_login','$server_ip','$session_id','$SIP_user','PAUSED','','$VD_campaign','','','','$random','$NOW_TIME','$tsNOW_TIME','$NOW_TIME','$closer_chooser_string','$user_level','$campaign_weight','$calls_today');"; 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"; @@ -1283,14 +1268,12 @@ else $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"; @@ -1311,7 +1294,6 @@ 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"; @@ -1323,14 +1305,12 @@ else $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"; @@ -1403,7 +1383,6 @@ else ##### Agent is going to log in so insert the vicidial_agent_log entry now $stmt="INSERT INTO vicidial_agent_log (user,server_ip,event_time,campaign_id,pause_epoch,pause_sec,wait_epoch,user_group,sub_status) values('$VD_login','$server_ip','$NOW_TIME','$VD_campaign','$StarTtimE','0','$StarTtimE','$VU_user_group','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); $agent_log_id = mysql_insert_id($link); @@ -1423,7 +1402,6 @@ else ##### grab the datails of all active scripts in the system $stmt="SELECT script_id,script_name,script_text FROM vicidial_scripts WHERE active='Y' order by script_id limit 100;"; - if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $MM_scripts = mysql_num_rows($rslt); @@ -1432,8 +1410,8 @@ else { $row=mysql_fetch_row($rslt); $MMscriptid[$e] =$row[0]; - $MMscriptname[$e] = rawurlencode($row[1]); - $MMscripttext[$e] = rawurlencode($row[2]); + $MMscriptname[$e] = urlencode($row[1]); + $MMscripttext[$e] = urlencode($row[2]); $MMscriptids = "$MMscriptids'$MMscriptid[$e]',"; $MMscriptnames = "$MMscriptnames'$MMscriptname[$e]',"; $MMscripttexts = "$MMscripttexts'$MMscripttext[$e]',"; @@ -5461,10 +5439,14 @@ else var encoded = encodedvar; decoded = ''; var i = 0; - var RGnl = new RegExp("\n","g"); + var RGnl = new RegExp("[\r]\n","g"); var RGplus = new RegExp(" ","g"); var RGiframe = new RegExp("iframe","gi"); +var xtest; +xtest=unescape(encoded); +encoded=utf8_decode(xtest); + if (scriptformat == 'YES') { var SCvendor_lead_code = document.vicidial_form.vendor_lead_code.value; @@ -5636,30 +5618,64 @@ else encoded = encoded.replace(RGSIPexten, SCSIPexten); encoded = encoded.replace(RGsession_id, SCsession_id); } - while (i < encoded.length) { - var ch = encoded.charAt(i); - if (ch == "%") { - if (i < (encoded.length-2) - && HEXCHAR.indexOf(encoded.charAt(i+1)) != -1 - && HEXCHAR.indexOf(encoded.charAt(i+2)) != -1 ) { - decoded += unescape( encoded.substr(i,3) ); - i += 3; - } else { - alert( 'Bad escape combo near ...' + encoded.substr(i) ); - decoded += "%[ERR]"; - i++; - } - } else { - decoded += ch; - i++; - } - } // while - decoded = decoded.replace(RGnl, "
"); - +decoded=encoded; // simple no ? +decoded = decoded.replace(RGnl, "
"); +// while (i < encoded.length) { +// var ch = encoded.charAt(i); +// if (ch == "%") { +// if (i < (encoded.length-2) +// && HEXCHAR.indexOf(encoded.charAt(i+1)) != -1 +// && HEXCHAR.indexOf(encoded.charAt(i+2)) != -1 ) { +// decoded += unescape( encoded.substr(i,3) ); +// i += 3; +// } else { +// alert( 'Bad escape combo near ...' + encoded.substr(i) ); +// decoded += "%[ERR]"; +// i++; +// } +// } else { +// decoded += ch; +// i++; +// } +// } // while +// decoded = decoded.replace(RGnl, "
"); +// return false; }; +// ################################################################################ +// Taken form php.net Angelos +function utf8_decode(utftext) { + var string = ""; + var i = 0; + var c = c1 = c2 = 0; + + while ( i < utftext.length ) { + + c = utftext.charCodeAt(i); + + if (c < 128) { + string += String.fromCharCode(c); + i++; + } + else if((c > 191) && (c < 224)) { + c2 = utftext.charCodeAt(i+1); + string += String.fromCharCode(((c & 31) << 6) | (c2 & 63)); + i += 2; + } + else { + c2 = utftext.charCodeAt(i+1); + c3 = utftext.charCodeAt(i+2); + string += String.fromCharCode(((c & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63)); + i += 3; + } + + } + + return string; + }; + // ################################################################################ // Move the Dispo frame out of the way and change the link to maximize diff --git a/agc_2-X/branches/agc_2.0.4/www/vicidial/AST_agent_performance_detail.php b/agc_2-X/branches/agc_2.0.4/www/vicidial/AST_agent_performance_detail.php index 0c03dbfb..6fae3784 100644 --- a/agc_2-X/branches/agc_2.0.4/www/vicidial/AST_agent_performance_detail.php +++ b/agc_2-X/branches/agc_2.0.4/www/vicidial/AST_agent_performance_detail.php @@ -1,7 +1,7 @@ LICENSE: GPLv2 +### Copyright (C) 2008 Matt Florell LICENSE: GPLv2 ### # CHANGES # @@ -9,6 +9,7 @@ # 71121-0144 - Replace existing AST_agent_performance_detail.php script with this one # - Fixed zero division bug # 71218-1155 - added end_date for multi-day reports +# 80428-0144 - UTF8 cleanup # require("dbconnect.php"); @@ -33,15 +34,31 @@ if (isset($_GET["SUBMIT"])) {$SUBMIT=$_GET["SUBMIT"];} if (strlen($shift)<2) {$shift='ALL';} +############################################# +##### START SYSTEM_SETTINGS LOOKUP ##### +$stmt = "SELECT use_non_latin FROM system_settings;"; +$rslt=mysql_query($stmt, $link); +if ($DB) {echo "$stmt\n";} +$qm_conf_ct = mysql_num_rows($rslt); +$i=0; +while ($i < $qm_conf_ct) + { + $row=mysql_fetch_row($rslt); + $non_latin = $row[0]; + $i++; + } +##### END SETTINGS LOOKUP ##### +########################################### + $PHP_AUTH_USER = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_USER); $PHP_AUTH_PW = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_PW); - $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]; +$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]; if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or (!$auth)) { @@ -59,7 +76,6 @@ if (!isset($query_date)) {$query_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); @@ -71,7 +87,6 @@ while ($i < $campaigns_to_print) $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); @@ -189,7 +204,6 @@ $user_namesARY[0]=''; $k=0; $stmt="select count(*) as calls,sum(talk_sec) as talk,full_name,vicidial_users.user,sum(pause_sec),sum(wait_sec),sum(dispo_sec),status 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<36000 and wait_sec<36000 and talk_sec<36000 and dispo_sec<36000 $ugSQL group by full_name,status order by status desc,full_name limit 100000;"; -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); diff --git a/agc_2-X/branches/agc_2.0.4/www/vicidial/AST_inboundEXTstats.php b/agc_2-X/branches/agc_2.0.4/www/vicidial/AST_inboundEXTstats.php index 5bc24935..d5cb9547 100644 --- a/agc_2-X/branches/agc_2.0.4/www/vicidial/AST_inboundEXTstats.php +++ b/agc_2-X/branches/agc_2.0.4/www/vicidial/AST_inboundEXTstats.php @@ -76,7 +76,7 @@ while ($i < $inbound_to_print) \n"; +echo"\n"; #echo"\n"; echo "ASTERISK: Inbound Calls Stats\n"; echo "
\n"; diff --git a/agc_2-X/branches/agc_2.0.4/www/vicidial/AST_inboundEXTstats_department.php b/agc_2-X/branches/agc_2.0.4/www/vicidial/AST_inboundEXTstats_department.php index 015f6820..608364ea 100644 --- a/agc_2-X/branches/agc_2.0.4/www/vicidial/AST_inboundEXTstats_department.php +++ b/agc_2-X/branches/agc_2.0.4/www/vicidial/AST_inboundEXTstats_department.php @@ -28,11 +28,28 @@ 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 and view_reports='1';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); +############################################# +##### START SYSTEM_SETTINGS LOOKUP ##### +$stmt = "SELECT use_non_latin FROM system_settings;"; +$rslt=mysql_query($stmt, $link); +if ($DB) {echo "$stmt\n";} +$qm_conf_ct = mysql_num_rows($rslt); +$i=0; +while ($i < $qm_conf_ct) + { $row=mysql_fetch_row($rslt); - $auth=$row[0]; + $non_latin = $row[0]; + $i++; + } +##### END SETTINGS LOOKUP ##### +########################################### + +$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]; if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or (!$auth)) { @@ -76,7 +93,7 @@ while ($i < $dept_to_print) \n"; +echo"\n"; #echo"\n"; echo "ASTERISK: Inbound Calls Stats - By Department\n"; echo "\n"; diff --git a/agc_2-X/branches/agc_2.0.4/www/vicidial/AST_timeonVDADall.php b/agc_2-X/branches/agc_2.0.4/www/vicidial/AST_timeonVDADall.php index a6afbf6b..bcd3aae6 100644 --- a/agc_2-X/branches/agc_2.0.4/www/vicidial/AST_timeonVDADall.php +++ b/agc_2-X/branches/agc_2.0.4/www/vicidial/AST_timeonVDADall.php @@ -1,7 +1,7 @@ LICENSE: GPLv2 +# Copyright (C) 2008 Matt Florell LICENSE: GPLv2 # # live real-time stats for the VICIDIAL Auto-Dialer all servers # @@ -28,7 +28,8 @@ # 70206-1140 - Added call-type statuses to display(A-Auto, M-Manual, I-Inbound/Closer) # 70619-1339 - Added Status Category tally display # 71029-1900 - Changed CLOSER-type to not require campaign_id restriction -# +# 80424-0515 - Added non_latin lookup from system_settings +# header ("Content-type: text/html; charset=utf-8"); @@ -70,6 +71,22 @@ if (isset($_GET["SERVdisplay"])) {$SERVdisplay=$_GET["SERVdisplay"];} if (isset($_GET["CALLSdisplay"])) {$CALLSdisplay=$_GET["CALLSdisplay"];} elseif (isset($_POST["CALLSdisplay"])) {$CALLSdisplay=$_POST["CALLSdisplay"];} +############################################# +##### START SYSTEM_SETTINGS LOOKUP ##### +$stmt = "SELECT use_non_latin FROM system_settings;"; +$rslt=mysql_query($stmt, $link); +if ($DB) {echo "$stmt\n";} +$qm_conf_ct = mysql_num_rows($rslt); +$i=0; +while ($i < $qm_conf_ct) + { + $row=mysql_fetch_row($rslt); + $non_latin = $row[0]; + $i++; + } +##### END SETTINGS LOOKUP ##### +########################################### + if (!isset($RR)) {$gRRroup=4;} if (!isset($group)) {$group='';} @@ -124,15 +141,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 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]; +$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]; if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or (!$auth)) { @@ -150,10 +164,6 @@ $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";} @@ -167,10 +177,6 @@ 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";} @@ -299,10 +305,6 @@ 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'"); -} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $DIALlev = $row[0]; @@ -332,10 +334,6 @@ 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]; @@ -345,10 +343,6 @@ 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),min(status_category_1),sum(status_category_count_1),min(status_category_2),sum(status_category_count_2),min(status_category_3),sum(status_category_count_3),min(status_category_4),sum(status_category_count_4) 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]; @@ -380,10 +374,6 @@ 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]; @@ -505,10 +495,6 @@ echo "\n\n"; if ($campaign_allow_inbound > 0) { $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]); @@ -533,10 +519,6 @@ else $stmtA = "SELECT status"; } -if ($non_latin > 0) -{ -$rslt=mysql_query("SET NAMES 'UTF8'"); -} $k=0; $stmt = "$stmtA $stmtB"; @@ -737,10 +719,6 @@ $stmt="select extension,vicidial_live_agents.user,conf_exten,status,server_ip,UN #$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); diff --git a/agc_2-X/branches/agc_2.0.4/www/vicidial/admin.php b/agc_2-X/branches/agc_2.0.4/www/vicidial/admin.php index 770c97d7..978928b9 100644 --- a/agc_2-X/branches/agc_2.0.4/www/vicidial/admin.php +++ b/agc_2-X/branches/agc_2.0.4/www/vicidial/admin.php @@ -680,6 +680,22 @@ if (strlen($dial_status) > 0) $status = $dial_status; } +############################################# +##### START SYSTEM_SETTINGS LOOKUP ##### +$stmt = "SELECT use_non_latin FROM system_settings;"; +$rslt=mysql_query($stmt, $link); +if ($DB) {echo "$stmt\n";} +$qm_conf_ct = mysql_num_rows($rslt); +$i=0; +while ($i < $qm_conf_ct) + { + $row=mysql_fetch_row($rslt); + $non_latin = $row[0]; + $i++; + } +##### END SETTINGS LOOKUP ##### +########################################### + ###################################################################################################### ###################################################################################################### ####### Form variable filtering for security and data integrity @@ -1142,12 +1158,12 @@ $list_mix_container = ereg_replace(";","",$list_mix_container); # 71122-1135 - Added default transfer group for campaigns and inbound groups # 71125-1751 - Added allowable transfer groups to campaign detail screen # 80330-0814 - Added CBHOLD block on selecting, added user stats/status links -# +# 80424-0442 - Added non_latin system_settings lookup at top to override dbconnect setting # # 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.4-120'; -$build = '80330-0814'; +$admin_version = '2.0.4-121'; +$build = '80424-0442'; $STARTtime = date("U"); $SQLdate = date("Y-m-d H:i:s"); @@ -1170,11 +1186,28 @@ if ($force_logout) 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); +############################################# +##### START SYSTEM_SETTINGS LOOKUP ##### +$stmt = "SELECT use_non_latin FROM system_settings;"; +$rslt=mysql_query($stmt, $link); +if ($DB) {echo "$stmt\n";} +$qm_conf_ct = mysql_num_rows($rslt); +$i=0; +while ($i < $qm_conf_ct) + { $row=mysql_fetch_row($rslt); - $auth=$row[0]; + $non_latin = $row[0]; + $i++; + } +##### END SETTINGS LOOKUP ##### +########################################### + +$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";} +if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} +$rslt=mysql_query($stmt, $link); +$row=mysql_fetch_row($rslt); +$auth=$row[0]; if ($WeBRooTWritablE > 0) {$fp = fopen ("./project_auth_entries.txt", "a");} diff --git a/agc_2-X/branches/agc_2.0.4/www/vicidial/admin_modify_lead.php b/agc_2-X/branches/agc_2.0.4/www/vicidial/admin_modify_lead.php index f8a285ec..d32a8551 100644 --- a/agc_2-X/branches/agc_2.0.4/www/vicidial/admin_modify_lead.php +++ b/agc_2-X/branches/agc_2.0.4/www/vicidial/admin_modify_lead.php @@ -1,13 +1,28 @@ LICENSE: GPLv2 +# AST GUI database administration modify lead in vicidial_list +# admin_modify_lead.php +# +# this is the administration lead information modifier screen, the administrator +# just needs to enter the leadID and then they can view and modify the +# information in the record for that lead +# +# Copyright (C) 2008 Matt Florell LICENSE: GPLv2 # - # CHANGES # +# 60419-1705 - Added ability to change lead callback record from USERONLY to ANYONE or USERONLY-user +# 60421-1459 - check GET/POST vars lines with isset to not trigger PHP NOTICES +# 60609-1112 - Added DNC list addition if status changed to DNC +# 60619-1539 - Added variable filtering to eliminate SQL injection attack threat +# 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 +# 70424-1128 - Added campaign-specific statuses, reformatted recordings list # 70702-1259 - Added recording location link and truncation # 70906-2132 - Added closer_log records display +# 80428-0144 - UTF8 cleanup # require("dbconnect.php"); @@ -98,35 +113,32 @@ if (isset($_GET["modify_logs"])) {$modify_logs=$_GET["modify_logs"];} $PHP_AUTH_USER = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_USER); $PHP_AUTH_PW = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_PW); - - -### AST GUI database administration modify lead in vicidial_list -### admin_modify_lead.php - -# this is the administration lead information modifier screen, the administrator just needs to enter the leadID and then they can view and modify the information in the record for that lead - -# CHANGES -# -# 60419-1705 - Added ability to change lead callback record from USERONLY to ANYONE or USERONLY-user -# 60421-1459 - check GET/POST vars lines with isset to not trigger PHP NOTICES -# 60609-1112 - Added DNC list addition if status changed to DNC -# 60619-1539 - Added variable filtering to eliminate SQL injection attack threat -# 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 -# 70424-1128 - Added campaign-specific statuses, reformatted recordings list -# - $STARTtime = date("U"); $TODAY = date("Y-m-d"); $NOW_TIME = date("Y-m-d H:i:s"); - - $stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 7 and modify_leads='1';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); +############################################# +##### START SYSTEM_SETTINGS LOOKUP ##### +$stmt = "SELECT use_non_latin FROM system_settings;"; +$rslt=mysql_query($stmt, $link); +if ($DB) {echo "$stmt\n";} +$qm_conf_ct = mysql_num_rows($rslt); +$i=0; +while ($i < $qm_conf_ct) + { $row=mysql_fetch_row($rslt); - $auth=$row[0]; + $non_latin = $row[0]; + $i++; + } +##### END SETTINGS LOOKUP ##### +########################################### + +$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";} +if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} +$rslt=mysql_query($stmt, $link); +$row=mysql_fetch_row($rslt); +$auth=$row[0]; if ($WeBRooTWritablE > 0) {$fp = fopen ("./project_auth_entries.txt", "a");} diff --git a/agc_2-X/branches/agc_2.0.4/www/vicidial/listloader.pl b/agc_2-X/branches/agc_2.0.4/www/vicidial/listloader.pl index d926368b..d58321cb 100644 --- a/agc_2-X/branches/agc_2.0.4/www/vicidial/listloader.pl +++ b/agc_2-X/branches/agc_2.0.4/www/vicidial/listloader.pl @@ -1,8 +1,8 @@ #!/usr/bin/perl -### listloader.pl version 0.4 *DBI-version* +### listloader.pl version 2.0.4 *DBI-version* ### -### Copyright (C) 2007 Matt Florell,Joe Johnson LICENSE: GPLv2 +### Copyright (C) 2008 Matt Florell,Joe Johnson LICENSE: GPLv2 ### # # @@ -18,6 +18,7 @@ # 70205-1703 - Defaulted phone_code to 1 if not populated # 70417-1059 - Fixed default phone_code bug # 70510-1518 - Added campaign and system duplicate check and phonecode override +# 80428-0144 - UTF8 cleanup # ### begin parsing run-time options ### @@ -148,6 +149,23 @@ $pulldate="$year-$mon-$mday $hour:$min:$sec"; $inSD = $pulldate0; $dsec = ( ( ($hour * 3600) + ($min * 60) ) + $sec ); +############################################# +##### START SYSTEM_SETTINGS LOOKUP ##### +$stmtA = "SELECT use_non_latin FROM system_settings;"; +$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; +$sthA->execute or die "executing: $stmtA ", $dbhA->errstr; +$sthArows=$sthA->rows; +if ($sthArows > 0) + { + @aryA = $sthA->fetchrow_array; + $non_latin = "$aryA[0]"; + } +$sthA->finish(); +##### END SETTINGS LOOKUP ##### +########################################### + + +if ($non_latin > 0) {$affected_rows = $dbhA->do("SET NAMES 'UTF8'");} ### Grab Server values from the database $stmtA = "SELECT local_gmt FROM servers where server_ip = '$server_ip';"; diff --git a/agc_2-X/branches/agc_2.0.4/www/vicidial/listloader_super.pl b/agc_2-X/branches/agc_2.0.4/www/vicidial/listloader_super.pl index 167fff5e..9f6f8d52 100644 --- a/agc_2-X/branches/agc_2.0.4/www/vicidial/listloader_super.pl +++ b/agc_2-X/branches/agc_2.0.4/www/vicidial/listloader_super.pl @@ -1,8 +1,8 @@ #!/usr/bin/perl -### listloader_super.pl version 0.4 *DBI-version* +### listloader_super.pl version 2.0.4 *DBI-version* ### -### Copyright (C) 2007 Matt Florell,Joe Johnson LICENSE: GPLv2 +### Copyright (C) 2008 Matt Florell,Joe Johnson LICENSE: GPLv2 ### # # @@ -17,6 +17,7 @@ # 70205-1703 - Defaulted phone_code to 1 if not populated # 70417-1059 - Fixed default phone_code bug # 70510-1518 - Added campaign and system duplicate check and phonecode override +# 80428-0144 - UTF8 cleanup # ### begin parsing run-time options ### @@ -149,21 +150,38 @@ $pulldate="$year-$mon-$mday $hour:$min:$sec"; $inSD = $pulldate0; $dsec = ( ( ($hour * 3600) + ($min * 60) ) + $sec ); +############################################# +##### START SYSTEM_SETTINGS LOOKUP ##### +$stmtA = "SELECT use_non_latin FROM system_settings;"; +$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; +$sthA->execute or die "executing: $stmtA ", $dbhA->errstr; +$sthArows=$sthA->rows; +if ($sthArows > 0) + { + @aryA = $sthA->fetchrow_array; + $non_latin = "$aryA[0]"; + } +$sthA->finish(); +##### END SETTINGS LOOKUP ##### +########################################### - ### Grab Server values from the database - $stmtA = "SELECT local_gmt FROM servers where server_ip = '$server_ip';"; - $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; - $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; - $sthArows=$sthA->rows; - $rec_count=0; - while ($sthArows > $rec_count) - { - @aryA = $sthA->fetchrow_array; - $DBSERVER_GMT = "$aryA[0]"; - if ($DBSERVER_GMT) {$SERVER_GMT = $DBSERVER_GMT;} - $rec_count++; - } - $sthA->finish(); + +if ($non_latin > 0) {$affected_rows = $dbhA->do("SET NAMES 'UTF8'");} + +### Grab Server values from the database +$stmtA = "SELECT local_gmt FROM servers where server_ip = '$server_ip';"; +$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; +$sthA->execute or die "executing: $stmtA ", $dbhA->errstr; +$sthArows=$sthA->rows; +$rec_count=0; +while ($sthArows > $rec_count) + { + @aryA = $sthA->fetchrow_array; + $DBSERVER_GMT = "$aryA[0]"; + if ($DBSERVER_GMT) {$SERVER_GMT = $DBSERVER_GMT;} + $rec_count++; + } +$sthA->finish(); $LOCAL_GMT_OFF = $SERVER_GMT; $LOCAL_GMT_OFF_STD = $SERVER_GMT; diff --git a/agc_2-X/branches/agc_2.0.4/www/vicidial/new_listloader_superL.php b/agc_2-X/branches/agc_2.0.4/www/vicidial/new_listloader_superL.php index 629321ed..3a25a101 100644 --- a/agc_2-X/branches/agc_2.0.4/www/vicidial/new_listloader_superL.php +++ b/agc_2-X/branches/agc_2.0.4/www/vicidial/new_listloader_superL.php @@ -1,7 +1,7 @@ LICENSE: GPLv2 +# Copyright (C) 2008 Matt Florell,Joe Johnson LICENSE: GPLv2 # # AST GUI lead loader from formatted file # @@ -19,11 +19,12 @@ # 61128-1149 - added postal code GMT lookup and duplicate check options # 70417-1059 - Fixed default phone_code bug # 70510-1518 - Added campaign and system duplicate check and phonecode override +# 80428-0417 - UTF8 changes # # 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.4'; -$build = '70510-1518'; +$version = '2.0.4-24'; +$build = '80428-0417'; require("dbconnect.php"); @@ -113,10 +114,28 @@ if (isset($_GET["phone_code_override"])) {$phone_code_override=$_GET["phone_co # $country_field=$_GET["country_field"]; if (!$country_field) {$country_field=$_POST["country_field"];} +############################################# +##### START SYSTEM_SETTINGS LOOKUP ##### +$stmt = "SELECT use_non_latin FROM system_settings;"; +$rslt=mysql_query($stmt, $link); +if ($DB) {echo "$stmt\n";} +$qm_conf_ct = mysql_num_rows($rslt); +$i=0; +while ($i < $qm_conf_ct) + { + $row=mysql_fetch_row($rslt); + $non_latin = $row[0]; + $i++; + } +##### END SETTINGS LOOKUP ##### +########################################### + +if ($non_latin < 1) +{ $PHP_AUTH_USER = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_USER); $PHP_AUTH_PW = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_PW); $list_id_override = ereg_replace("[^0-9]","",$list_id_override); - +} $STARTtime = date("U"); $TODAY = date("Y-m-d"); @@ -125,6 +144,7 @@ $FILE_datetime = $STARTtime; $stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 7;"; if ($DB) {echo "|$stmt|\n";} +if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $auth=$row[0]; @@ -144,6 +164,9 @@ $browser = getenv("HTTP_USER_AGENT"); else { header ("Content-type: text/html; charset=utf-8"); + header ("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1 + header ("Pragma: no-cache"); // HTTP/1.0 + if($auth>0) { $office_no=strtoupper($PHP_AUTH_USER); diff --git a/agc_2-X/trunk/UPGRADE b/agc_2-X/trunk/UPGRADE index ea135900..fa64083e 100644 --- a/agc_2-X/trunk/UPGRADE +++ b/agc_2-X/trunk/UPGRADE @@ -100,6 +100,8 @@ NOTE: Upgrading from 1.1.12-3 to 2.0.1 is at the bottom agent login. Options set in the vicidial.php file to allow for overwrite every login or only if field is empty. +19. Several code changes for better UTF8 compatibility with the database as well + as special character leads in the agent screen, lead loading diff --git a/agc_2-X/trunk/bin/VICIDIAL_IN_new_leads_file.pl b/agc_2-X/trunk/bin/VICIDIAL_IN_new_leads_file.pl index 349e9774..886961cb 100644 --- a/agc_2-X/trunk/bin/VICIDIAL_IN_new_leads_file.pl +++ b/agc_2-X/trunk/bin/VICIDIAL_IN_new_leads_file.pl @@ -26,6 +26,7 @@ # 70801-0912 - Added called count and status to import leads format (fields 24 and 25) # 70815-2128 - Added entry_date to import leads format (field 26) # 80128-0105 - Fixed bugs in file loading +# 80428-0320 - UTF8 update # $secX = time(); @@ -195,6 +196,7 @@ else { print "no command line options set\n"; $args = ""; +$i=0; $forcelistid = ''; } ### end parsing run-time options ### @@ -210,6 +212,23 @@ use DBI; $dbhA = DBI->connect("DBI:mysql:$VARDB_database:$VARDB_server:$VARDB_port", "$VARDB_user", "$VARDB_pass") or die "Couldn't connect to database: " . DBI->errstr; +############################################# +##### START SYSTEM_SETTINGS LOOKUP ##### +$stmtA = "SELECT use_non_latin FROM system_settings;"; +$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; +$sthA->execute or die "executing: $stmtA ", $dbhA->errstr; +$sthArows=$sthA->rows; +if ($sthArows > 0) + { + @aryA = $sthA->fetchrow_array; + $non_latin = "$aryA[0]"; + } +$sthA->finish(); +##### END SETTINGS LOOKUP ##### +########################################### + +if ($non_latin > 0) {$affected_rows = $dbhA->do("SET NAMES 'UTF8'");} + $suf = '.txt'; $people_packages_id_update=''; $dir1 = "$PATHhome/LEADS_IN"; diff --git a/agc_2-X/trunk/docs/SCRATCH_INSTALL.txt b/agc_2-X/trunk/docs/SCRATCH_INSTALL.txt index b3dacf69..16b37944 100644 --- a/agc_2-X/trunk/docs/SCRATCH_INSTALL.txt +++ b/agc_2-X/trunk/docs/SCRATCH_INSTALL.txt @@ -1724,6 +1724,13 @@ to use our new mysql script file to add the tables to the database: ######------ BEGIN Mysql data entry(you can copy and paste this into terminal) # create database asterisk; +NOTE: if you will be using lead files with a language that does not use the +standard latin character set then you will want to use UTF8 for your default +characterset in the MySQL database. This requires at least MySQL 4.1.11 and you +can use the following query to create the database: + CREATE DATABASE `asterisk` DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci; + + GRANT SELECT,INSERT,UPDATE,DELETE,LOCK TABLES on asterisk.* TO cron@'%' IDENTIFIED BY '1234'; GRANT SELECT,INSERT,UPDATE,DELETE,LOCK TABLES on asterisk.* TO cron@localhost IDENTIFIED BY '1234'; diff --git a/agc_2-X/trunk/extras/UTF8_lead_file.txt b/agc_2-X/trunk/extras/UTF8_lead_file.txt new file mode 100644 index 00000000..06e3f49a --- /dev/null +++ b/agc_2-X/trunk/extras/UTF8_lead_file.txt @@ -0,0 +1,16 @@ +100001|10001|108|1|7275551213|MR|GREEK|P|Ενεργές|249 τηλ. συνδέσεις|||Καταγραμμένων|FL||33709|USA|M|1970-01-01|7275551212|test@test.com|nothing|Ελεγχος τηλ.σύνδεσης διάσκεψης +100002|10002|108|1|7275551213|MR|FRENCH|P|Vous êtes|249 maintenant déconnecté|||Numéro|FL||33709|USA|M|1970-01-01|7275551212|test@test.com|nothing|VOUS DEVEZ ÊTRE Français +100003|10003|108|1|7275551213|MR|SPANISH|P|Español|249 LA GRABACIÓN DURARÁ|||Inválido|FL||33709|USA|M|1970-01-01|7275551212|test@test.com|nothing|Inválido +100004|10004|108|1|7275551213|MR|RUSSIAN|P|языки|249 здравствулте! там|||MALDON|FL||33709|USA|M|1970-01-01|7275551212|test@test.com|nothing|добро пожаловать +100005|10005|108|1|7275551213|MR|ARABIC|P|مرحبا|249 مرحبا هناك|||MALDON|FL||33709|USA|M|1970-01-01|7275551212|test@test.com|nothing|اللغات +100006|10006|108|1|7275551213|MR|HEBREW|P|שפה, לשון|249 ברכת שלום, שלום, הלו|||MALDON|FL||33709|USA|M|1970-01-01|7275551212|test@test.com|nothing|ברכת "ברוך הבא", קריאת ברכה לאורח או לפנים חדשות +100007|10007|108|1|7275551213|MR|BULGARIAN|P|здравей!|249 говор|||MALDON|FL||33709|USA|M|1970-01-01|7275551212|test@test.com|nothing|добре дошъл домашно огнище +100007|10007|108|1|7275551213|MR|GERMAN|P|größer|249 Mädchen|||MALDON|FL||33709|USA|M|1970-01-01|7275551212|test@test.com|nothing|Mais im Alter von Kartoffel-Käse-Salat-türig +100001|10001|108|1|7275551213|MR|GREEK|P|Ενεργές|249 τηλ. συνδέσεις|||Καταγραμμένων|FL||33709|USA|M|1970-01-01|7275551212|test@test.com|nothing|Ελεγχος τηλ.σύνδεσης διάσκεψης +100002|10002|108|1|7275551213|MR|FRENCH|P|Vous êtes|249 maintenant déconnecté|||Numéro|FL||33709|USA|M|1970-01-01|7275551212|test@test.com|nothing|VOUS DEVEZ ÊTRE Français +100003|10003|108|1|7275551213|MR|SPANISH|P|Español|249 LA GRABACIÓN DURARÁ|||Inválido|FL||33709|USA|M|1970-01-01|7275551212|test@test.com|nothing|Inválido +100004|10004|108|1|7275551213|MR|RUSSIAN|P|языки|249 здравствулте! там|||MALDON|FL||33709|USA|M|1970-01-01|7275551212|test@test.com|nothing|добро пожаловать +100005|10005|108|1|7275551213|MR|ARABIC|P|مرحبا|249 مرحبا هناك|||MALDON|FL||33709|USA|M|1970-01-01|7275551212|test@test.com|nothing|اللغات +100006|10006|108|1|7275551213|MR|HEBREW|P|שפה, לשון|249 ברכת שלום, שלום, הלו|||MALDON|FL||33709|USA|M|1970-01-01|7275551212|test@test.com|nothing|ברכת "ברוך הבא", קריאת ברכה לאורח או לפנים חדשות +100007|10007|108|1|7275551213|MR|BULGARIAN|P|здравей!|249 говор|||MALDON|FL||33709|USA|M|1970-01-01|7275551212|test@test.com|nothing|добре дошъл домашно огнище +100007|10007|108|1|7275551213|MR|GERMAN|P|größer|249 Mädchen|||MALDON|FL||33709|USA|M|1970-01-01|7275551212|test@test.com|nothing|Mais im Alter von Kartoffel-Käse-Salat-türig diff --git a/agc_2-X/trunk/translations/it_language_admin.txt b/agc_2-X/trunk/translations/it_language_admin.txt new file mode 100644 index 00000000..29fe2439 --- /dev/null +++ b/agc_2-X/trunk/translations/it_language_admin.txt @@ -0,0 +1,1537 @@ +# it_language_admin.txt - this file is for the internationalization of the astGUIclient +# admin web pages. The associated install.pl file will take the language as an +# argument and alter the php scripts to the language typed in the command line: +# example: ./install.pl --language=it +# current languages in the file: +# - English - (en) no alterations +# - Italian - (it) first column +***LANGUAGES*** +en-English|it-Italiano| +***FILES*** +vicidial|admin.php|0 +vicidial|dbconnect.php|1 +vicidial|AST_VICIDIAL_hopperlist.php|0 +vicidial|AST_agent_time_sheet.php|0 +vicidial|user_status.php|0 +vicidial|server_stats.php|0 +vicidial|AST_VDADstats.php|0 +vicidial|AST_timeonVDAD.php|0 +vicidial|AST_timeonVDAD_closer.php|0 +vicidial|AST_timeonVDADall.php|0 +vicidial|AST_timeoncall.php|0 +vicidial|AST_timeonpark.php|0 +vicidial|listloader.php|0 +vicidial|listloaderMAIN.php|0 +vicidial|new_listloader_superL.php|0 +vicidial|count.htm|1 +vicidial|help.gif|1 +vicidial|listloader.pl|1 +vicidial|listloader_rowdisplay.pl|1 +vicidial|listloader_super.pl|1 +vicidial|user_stats.php|0 +vicidial|remote_dispo.php|0 +vicidial|group_hourly_stats.php|0 +vicidial|admin_search_lead.php|0 +vicidial|admin_modify_lead.php|0 +vicidial|AST_CLOSERstats.php|0 +vicidial|vdremote.php|0 +vicidial|AST_agent_performance_detail.php|0 +vicidial|AST_agent_performance.php|0 +vicidial|AST_server_performance.php|0 +vicidial|AST_admin_log_display.php|0 +vicidial|AST_timeonVDADallSUMMARY.php|0 +vicidial|inbound_popup.php|0 +vicidial|AST_inboundEXTstats.php|0 +vicidial|welcome.php|0 +***TRANSLATIONS*** +### special translations that should stay at the top of the file ### +BORDER|Border| +VALUE=SUBMIT|VALUE=SUBMIT| +TYPE=SUBMIT|TYPE=Submit| +\.\/images\/|../agc/images/| +help.gif|help.gif| +### BEGIN translation phrases through 1.1.11 release ### +English|Inglese| +Spanish|Spagnolo| +French|Francese| +German|Tedesco| +Italian|Italiano| +You have now logged out. Thank you|Ora non sei collegato. Grazie| +Invalid Username\/Password|Username/Password non validi| +ASTERISK ADMIN: Administration|ASTERISK ADMIN: Amministrazione| +PHONES TABLE|TABELLA TELEFONI| +Phone extension -<\/B> 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.|Extension del telefono - este campo es donde usted pone los nombres del telefono que aparecen al marcar con asterisco no incluyendo el protocolo o la barra vertical del principio. Por ejemplo: para el telefono SIP/test101 del SIP la extension del telefono sería test101. Tambien, para los telefonos IAX2 compruebe que usted utiliza el nombre del telefono completo: IAX2/IAXphone1@IAXphone1 sería IAXphone1@IAXphone1. Para zap los telefonos 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 telefono.| +Dial Plan Number -<\/B> 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|Número del Dial plan - este campo está para el número que usted marca para tener el anillo del telefono. Este número se define en el archivo de extensions.conf de su servidor asterisco| +Voicemail Box -<\/B> 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|Caja de Buzon de Voz - este campo es para la caja del Buzon de voz donde van los mensajes para al usuario de este telefono. Utilizamos esto para comprobar los mensajes del Buzon de voz y para que el usuario pueda acceder al Buzon de Voz desde astGUIclient| +Outbound CallerID -<\/B> 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|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| +Phone IP address -<\/B> This field is for the phone`s IP address if it is a VOIP phone. This is an optional field|Direccion IP del telefono - este campo es para la Direccion IP del telefono si es un telefono de VOZIP. Este es un campo opcional| +Computer IP address -<\/B> This field is for the user`s computer IP address. This is an optional field|Direccion IP del ordenador - este campo es para la Direccion IP del ordenador del usuario. Es un campo opcional| +Server IP -<\/B> This menu is where you select which server the phone is active on|IP del servidor - Este menú es donde usted selecciona en que servidor está el telefono activo| +Login -<\/B> The login used for the phone user to get to admin functions|Login - El nombre de usuario del telefono para conseguir los permisos de admin| +Password -<\/B> The password used for the phone user to get to admin functions|Contraseña - la contraseña usada por el usuario del telefono para conseguir los permisos de admin| +Status -<\/B> 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|Estado - el estado del telefono en el sistema, puede ser ACTIVO y ADMIN permiten que los clientes del GUI trabajen. ADMIN permite el acceso a este Web site de administracion. El resto de los estados no permiten el acceso al GUI o al Web de Admin| +Active Account -<\/B> Whether the phone is active to put it in the list in the GUI client|Cuenta activa - si el telefono está activado ponerla en la lista del cliente del GUI| +Phone Type -<\/B> Purely for administrative notes|Tipo de telefono - solamente para informacion administrativas| +Full Name -<\/B> Used by the GUIclient in the list of active phones|Nombre completo - usado por el GUIclient en la lista de telefonos activos| +Company -<\/B> Purely for administrative notes|Compañía - solamente para las notas administrativas| +Picture -<\/B> Not yet Implemented|Cuadro - todavía no puesto en ejecucio`n| +New Messages -<\/B> Number of new voicemail messages for this phone on the Asterisk server|Nuevos mensajes - número de los nuevos mensajes del Buzon de Voz para este telefono en el servidor del asterisco| +Old Messages -<\/B> Number of old voicemail messages for this phone on the Asterisk server|Viejos mensajes - número de los viejos mensajes del Buzon de Voz para este telefono en el servidor del asterisco| +Client Protocol -<\/B> 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|Protocolo del cliente - el protocolo que el telefono utiliza para conectar con el servidor del asterisco: El Sip, IAX2, Zap. Tambien, para los números External remotos o los números SpeedDial que usted desea enumerar como telefonos| +Local GMT -<\/B> 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|GMT local - La diferencia a partir del tiempo malo del ZULÚ del time(or de Greenwich) donde se localiza el telefono. 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| +Manager Login -<\/B> This is the login that the GUI clients for this phone will use to access the Database where the server data resides|conexion del encargado - esta es la conexion que los clientes del GUI para este telefono utilizarán tener acceso a la base de datos donde residen los datos del servidor| +Manager Secret -<\/B> This is the password that the GUI clients for this phone will use to access the Database where the server data resides|Secreto del encargado - esta es la contraseña que los clientes del GUI para este telefono utilizarán tener acceso a la base de datos donde residen los datos del servidor| +VICIDIAL Default User -<\/B> 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|Usuario del defecto de VICIDIAL - este debe poner un valor prefijado en el campo del usuario de VICIDIAL siempre que este usuario del telefono abra a cliente app de astVICIDIAL. Deje el espacio en blanco para ningún usuario| +VICIDIAL Default Pass -<\/B> 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|Paso del defecto de VICIDIAL - este debe poner un valor prefijado en el campo de la contraseña de VICIDIAL siempre que este usuario del telefono abra a cliente app de astVICIDIAL. Deje el espacio en blanco para ningún paso| +VICIDIAL Default Campaign -<\/B> 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|Campaña del defecto de VICIDIAL - este debe poner un valor prefijado en el campo de la campaña de VICIDIAL siempre que este usuario del telefono abra a cliente app de astVICIDIAL. Deje el espacio en blanco para ninguna campaña| +Park Exten -<\/B> This is the default Parking extension for the client apps. Verify that a different one works before you change this|Parque Exten - esta es la extension del estacionamiento del defecto para los apps del cliente. Verifique que diverso trabaje antes de que usted cambie esto| +Conf Exten -<\/B> This is the default Conference park extension for the client apps. Verify that a different one works before you change this|Conf Exten - esta es la extension del parque de la conferencia del defecto para los apps del cliente. Verifique que diverso trabaje antes de que usted cambie esto| +VICIDIAL Park Exten -<\/B> This is the default Parking extension for VICIDIAL client app. Verify that a different one works before you change this|Parque Exten de VICIDIAL - esta es la extension del estacionamiento del defecto para el cliente app de VICIDIAL. Verifique que diverso trabaje antes de que usted cambie esto| +VICIDIAL Park File -<\/B> 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|Archivo del parque de VICIDIAL - este es el nombre del archivo de la extension del parque del defecto VICIDIAL para los apps del cliente. Verifique que diverso trabaje antes de que usted cambie este limitado a 10 caracteres| +Monitor Prefix -<\/B> 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|Prefijo del monitor - este 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| +Recording Exten -<\/B> 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|grabacion Exten - esta es la extension dial plan para la extension de la grabacion 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 Main Exten -<\/B> This is the dial plan extension going to check your voicemail. verify with extensions.conf file before changing|VMAIL Exten principal - esta es la extension dial plan que va a comprobar su voicemail. verifica con el archivo de extensions.conf antes de cambiar| +VMAIL Dump Exten -<\/B> 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|Descarga Exten de VMAIL - este 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| +Exten Context -<\/B> 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|Contexto de Exten - este es el contexto dial plan que este telefono 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 este es el contexto más amplio posible verifica con el archivo de extensions.conf antes de cambiar| +DTMF send Channel -<\/B> 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|DTMF envían el canal - esta 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| +Outbound Call Group -<\/B> 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|Grupo de salida de la llamada - este es el grupo de canal que las llamadas de salida de este telefono 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)| +Browser Location -<\/B> 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|Localizacio`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| +Install Directory -<\/B> 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|Instale el directorio - este 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| +CallerID URL -<\/B> 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|URL de CallerID - Ústa es la Direccion de la tela de la página usada para hacer operaciones de búsqueda de encargo del callerID que es la Direccion de prueba del defecto: http://astguiclient.sf.net/test_callerid_output.php| +VICIDIAL Default URL -<\/B> 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|URL del defecto de VICIDIAL - esta es la Direccion de la tela de la página usada para hacer preguntas de encargo de la forma del Web de VICIDIAL que es la Direccion de prueba del defecto: http://astguiclient.sf.net/test_VICIDIAL_output.php| +Call Logging -<\/B> 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|Registracion 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| +User Switching -<\/B> 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|Conmutacio`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 grabacion en la conversacion de telefono del nuevo usuario| +Conferencing -<\/B> Set to true to allow user to start conference calls with upto six external lines|Comunicacio`n - fije para verdad para permitir que el usuario comience llamadas de conferencia con hasta que seis líneas externas| +Admin Hang Up -<\/B> 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|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| +Admin Hijack -<\/B> 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|Secuestro del Admin - fije para verdad para permitir que el usuario pueda asir y volver a dirigir a su extension 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| +Admin Monitor -<\/B> 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|Monitor del Admin - fije para verdad para permitir que el usuario pueda asir y volver a dirigir a su extension 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| +Call Park -<\/B> 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|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| +Updater Check -<\/B> Set to true to display a popup warning that the updater time has not changed in 20 seconds. Useful for Admin users|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 Logging -<\/B> Set to true to log many actions of astGUIclient usage to a text file on the user`s computer|Af que registra - fije para verdad para registrar muchas acciones del uso astGUIclient a un archivo de texto en la computadora del usuario| +Queue Enabled -<\/B> Set to true to have client apps use the Asterisk Central Queue system. Required for VICIDIAL and recommended for all users|La coleta permitio` - 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| +CallerID Popup -<\/B> Set to true to allow for numbers defined in the extensions.conf file to send CallerID popup screens to astGUIclient users|CallerID Popup - 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| +VMail Button -<\/B> Set to true to display the VOICEMAIL button and the messages count display on astGUIclient|Boto`n de VMail - fije para verdad para exhibir el boton de VOICEMAIL y los mensajes cuentan la exhibicio`n en astGUIclient| +Fast Refresh -<\/B> 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|Rápido restaure - fije para verdad para permitir un nuevo índice de restauran de la informacion 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| +Fast Refresh Rate -<\/B> 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|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 -<\/B> 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|Persistant MySQL - si está permitida la conexion 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| +Auto Dial Next Number -<\/B> 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|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 disposicion de una llamada a menos que seleccionaran "para parar el marcar" en la pantalla de la disposicion| +Stop Rec after each call -<\/B> 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|Pare Rec despue`s de cada llamada - si está permitido el cliente de VICIDIAL parará se está encendiendo cualquier grabacion despue`s de que haya sido cada llamada dispositioned. Útil si usted está haciendo muchos de la grabacion o usted están utilizando una forma de la tela para accionar la grabacion| +DBX Server -<\/B> The MySQL database server that this user should be connecting to|Servidor de DBX - el servidor de la base de datos de MySQL con el cual este usuario debe conectar| +DBX Database -<\/B> The MySQL database that this user should be connecting to. Default is asterisk|Base de datos de DBX - la base de datos de MySQL con la cual este usuario debe conectar. El defecto es asterisco| +DBX User -<\/B> The MySQL user login that this user should be using when connecting. Default is cron|Usuario de DBX - la conexion del usuario de MySQL que este usuario debe utilizar al conectar. El defecto es cron| +DBX Pass -<\/B> The MySQL user password that this user should be using when connecting. Default is 1234|Paso de DBX - la contraseña del usuario de MySQL que este usuario debe utilizar al conectar. El defecto es 1234| +DBX Port -<\/B> The MySQL TCP port that this user should be using when connecting. Default is 3306|DBX viran - el puerto de MySQL hacia el lado de babor TCP que este usuario debe utilizar al conectar. El defecto es 3306| +DBY Server -<\/B> The MySQL database server that this user should be connecting to|Servidor de DBY - el servidor de la base de datos de MySQL con el cual este usuario debe conectar| +DBY Database -<\/B> The MySQL database that this user should be connecting to. Default is asterisk|Base de datos de DBY - la base de datos de MySQL con la cual este usuario debe conectar. El defecto es asterisco| +DBY User -<\/B> The MySQL user login that this user should be using when connecting. Default is cron|Usuario de DBY - la conexion del usuario de MySQL que este usuario debe utilizar al conectar. El defecto es cron| +DBY Pass -<\/B> The MySQL user password that this user should be using when connecting. Default is 1234|Paso de DBY - la contraseña del usuario de MySQL que este usuario debe utilizar al conectar. El defecto es 1234| +DBY Port -<\/B> The MySQL TCP port that this user should be using when connecting. Default is 3306|DBY viran - el puerto de MySQL hacia el lado de babor TCP que este usuario debe utilizar al conectar. El defecto es 3306| +Redirect command sent for channel|Vuelva a dirigir el comando enviado para el canal| +Look up this customer in Customer Service System|Mire para arriba a este cliente en sistema del servicio de cliente| +Redirect command FAILED for channel|Vuelva a dirigir el comando FALLADO para el canal| +PLEASE SELECT A NUMBER AND DATE ABOVE AND CLICK SUBMIT|SELEZIONARE UN NUMERO E UNA DATA QUI IN ALTO E CLICCARE SU INVIA| +Total Calls That came into this number|Totale chiamate ricevute da questo numero| +Average Call Length(seconds) for all Calls|Durata Media Chiamate (secondi) per tutte le chiamate| +Total DROP Calls: (less than 10 seconds)|Totale chiamate ABBATTUTE: (meno di 10 secondi)| +Average Call Length(seconds) for DROP Calls|Durata Media Chiamate (secondi) per le chiamate ABBATTUTE| +GRAPH IN 15 MINUTE INCREMENTS OF TOTAL CALLS|GRAFICO AD INCREMENTO DI 15 MINUTI DEL TOTALE DELLE CHIAMATE| +Click on the channel below that you would like to have directed to your phone|Clicca sul canale che vuoi trasferire al tuo telefono| +LAST 1000 CALLS FOR DATE RANGE|ULTIME 1000 CHIAMATE PER INTERVALLO DI DATA| +Click here to see what leads are in the hopper right now|Clicca qui per vedere quali numeri sono nella coda chiamate in questo momento| +CUSTOM STATUSES WITHIN THIS CAMPAIGN|ESITI PERSONALIZZATI PER QUESTA CAMPAGNA| +PLEASE SELECT A CAMPAIGN ABOVE AND CLICK SUBMIT|PER FAVORE SELEZIONA UNA CAMPAGNA E PREMI INVIA| +PLEASE SELECT A CAMPAIGN AND DATE-TIME ABOVE AND CLICK SUBMIT|PER FAVORE SELEZIONA UNA CAMPAGNA E UNA DATA E PREMI INVIA| +PLEASE SELECT A SERVER, DATE AND TIME RANGE ABOVE AND CLICK SUBMIT|PER FAVORE SELEZIONA UN SERVER, UNA DATA, UN INTERVALLO DI TEMPO E PREMI INVIA| +GRAPH IN 15 MINUTE INCREMENTS OF TOTAL CALLS PLACED FROM THIS CAMPAIGN|GRAFICO AD INCREMENTO DI 15 MINUTI DEL TOTALE DELLE CHIAMATE EFFETTUATE PER QUESTA CAMPAGNA| +ERROR: The file does not have the required number of fields to process it|ERRORE: Il file non ha il numero di campi necessare per essere elaborato| +ERROR: File exceeds the 8MB limit|ERROR: Il file supera il limite di 8 MB| +Please enter the group you want to get hourly stats for|Per favore inserisci il gruppo per il quale vuoi le statistiche orarie| +The search variables you entered are not active in the system|Le variabili di ricerca inserite non sono attive in questo sistema| +Please go back and double check the information you entered and submit again|Per favore torna indietro e controlla di nuovo le informazioni inserite, quindi reinviale di nuovo| +Click here to see the Lead Details|Clicca qui per vedere i dettagli del contatto| +Detail|Dettagliata| +Statuses|Esiti| +HotKeys|Hot-Key| +Pause Codes|Codici Pausa| +Lead Recycling|Riciclaggio Contatti| +SERVERS TABLE|TABELLA SERVER| +Server ID -<\/B> 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|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| +Server Description -<\/B> The field where you use a small phrase to describe the Asterisk server|Descripcio`n del servidor - el campo donde usted utiliza una frase pequeña para describir el servidor del asterisco| +Server IP Address -<\/B> The field where you put the Network IP address of the Asterisk server|IP address del servidor - el campo donde usted puso el IP address de la red del servidor del asterisco| +Active -<\/B> Set whether the Asterisk server is active or inactive|Activo - fije si el servidor del asterisco es activo o inactivo| +Asterisk Version -<\/B> 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|Versio`n del asterisco - fije la versio`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 me`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 manipulacio`n de su Local/ acanala. Tambien, CVS_HEAD actual y las 1.2 aplicaciones diverso encargado y comando del árbol del lanzamiento hicieron salir así que debe ser tratado diverso Tambien| +Max VICIDIAL Trunks -<\/B> 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|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| +Telnet Host -<\/B> 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|Anfitrio`n del telnet - este es la Direccion o el nombre del servidor del asterisco y es co`mo los usos del encargado conectan con e`l de donde están funcionando. Si están funcionando en el servidor del asterisco, despue`s el defecto del ` localhost ` está muy bien| +Telnet Port -<\/B> 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|El telnet vira hacia el lado de babor - este es el puerto de la conexion del encargado del servidor del asterisco y es co`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| +Manager User -<\/B> The username or login used to connect genericly to the Asterisk server manager. Default is `cron`|Usuario del encargado - el username o la conexion conectaba genericly con el encargado del servidor del asterisco. El defecto es `cron`| +Manager Secret -<\/B> The secret or password used to connect genericly to the Asterisk server manager. Default is `1234`|Secreto del encargado - el secreto o la contraseña conectaba genericly con el encargado del servidor del asterisco. El defecto es `1234`| +Manager Update User -<\/B> 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|Usuario en modo actualizacio`n del encargado - el username o la conexion conectaba con el encargado del servidor del asterisco optimizado para las escrituras de la actualizacio`n. Omita es `updatecron` y asume el mismo secreto que el usuario gene`rico| +Manager Listen User -<\/B> 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|El encargado escucha usuario - el username o la conexion 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 gene`rico| +Manager Send User -<\/B> 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|El encargado envía a usuario - el username o la conexion 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 gene`rico| +Server GMT offset -<\/B> The difference in hours from GMT time not adjusted for Daylight-Savings-Time of the server. Default is `-5`|El GMT del servidor compenso` - 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`| +VMail Dump Exten -<\/B> The extension prefix used on this server to send calls directly through agc to a specific voicemail box. Default is `85026666666666`|Descarga Exten - el prefijo de VMail de la extension usado en este servidor para enviar llamadas directamente a trave`s de agc a una caja específica del voicemail. El defecto es `85026666666666`| +VICIDIAL AD extension -<\/B> The default extension if none is present in the campaign to send calls to for VICIDIAL auto dialing. Default is `8365`|Extension del ANUNCIO de VICIDIAL - la extension del defecto si ninguno está presente en la campaña enviar llamadas para a marcar auto de VICIDIAL. El defecto es `8365`| +Default Context -<\/B> The default dial plan context used for scripts that operate for this server. Default is `default`|Contexto del defecto - el contexto dial plan del defecto usado para las escrituras que funcionan para este servidor. El defecto es `defecto`| +User ID -<\/B> 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|Identificacio`n del usuario - este campo es donde usted pone el número de la identificacio`n del usuario de VICIDIAL, puede ser hasta 8 dígitos en longitud, debe ser por lo menos 2 caracteres en longitud| +Password -<\/B> This field is where you put the VICIDIAL users password. Must be at least 2 characters in length|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| +Full Name -<\/B> This field is where you put the VICIDIAL users full name. Must be at least 2 characters in length|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| +User Level -<\/B> 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|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 sesio`n como más cercano, deben ser el nivel de usuario 8 o mayor conseguir en la seccio`n de la tela del admin| +User Group -<\/B> 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|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, este es justo subdividir a usuarios y permitir las características futuras basadas sobre e`l| +Phone Login -<\/B> 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|conexion del telefono - aquí es para donde usted puede fijar un valor de la conexion del telefono 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 conexion de vicidial.php| +Phone Pass -<\/B> 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|Paso del telefono - aquí es para donde usted puede fijar un valor del paso del telefono 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 conexion de vicidial.php| +Delete Users -<\/B> This option if set to 1 allows the user to delete other users of equal or lesser user level from the system|Usuarios de la cancelacio`n - esta opcio`n si el sistema a 1 permite que el usuario suprima a otros usuarios del igual o de poco nivel de usuario del sistema| +Delete User Groups -<\/B> This option if set to 1 allows the user to delete user groups from the system|Suprima a grupos de usuario - esta opcio`n si el sistema a 1 permite que el usuario suprima a grupos de usuario del sistema| +Delete Lists -<\/B> This option if set to 1 allows the user to delete vicidial lists from the system|La cancelacio`n enumera - esta opcio`n si el sistema a 1 permite que el usuario suprima listas vicidial del sistema| +Delete Campaigns -<\/B> This option if set to 1 allows the user to delete vicidial campaigns from the system|La cancelacio`n hace campaña - esta opcio`n si el sistema a 1 permite que el usuario suprima campañas vicidial del sistema| +Delete In-Groups -<\/B> This option if set to 1 allows the user to delete vicidial In-Groups from the system|En-Grupos de la cancelacio`n - esta opcio`n si el sistema a 1 permite que el usuario suprima a En-Grupos vicidial del sistema| +Delete Remote Agents -<\/B> This option if set to 1 allows the user to delete vicidial remote agents from the system|Suprima los agentes alejados - esta opcio`n si el sistema a 1 permite que el usuario suprima agentes alejados vicidial del sistema| +Load Leads -<\/B> 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|La carga conduce - esta opcio`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| +Campaign Detail -<\/B> This option if set to 1 allows the user to view and modify the campaign detail screen elements|Detalle de la campaña - esta opcio`n si el sistema a 1 permite que el usuario visio`n y modifique los elementos de la pantalla del detalle de la campaña| +AGC Admin Access -<\/B> This option if set to 1 allows the user to login to the astGUIclient admin pages|Acceso de AGC Admin - esta opcio`n si el sistema a 1 permite a usuario a la conexion a las páginas astGUIclient del admin| +AGC Delete Phones -<\/B> This option if set to 1 allows the user to delete phone entries in the astGUIclient admin pages|La cancelacio`n de AGC telefona - esta opcio`n si el sistema a 1 permite que el usuario suprima entradas del telefono en las páginas astGUIclient del admin| +Delete Scripts -<\/B> This option if set to 1 allows the user to delete Campaign scripts in the script modification screen|Escrituras de la cancelacio`n - esta opcio`n si el sistema a 1 permite que el usuario suprima las escrituras de la campaña en la pantalla de la modificacio`n de la escritura| +Script ID -<\/B> 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|Identificacio`n de la escritura - este es el nombre corto de una escritura de Vicidial. este necesita ser un identificador único. Intente no utilizar ningunos espacios o puntuacio`n para los caracteres de este máximo 10 del campo, mínimo de 2 caracteres| +Script Name -<\/B> 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|Nombre de la escritura - este es el título de una escritura de Vicidial. este es un resumen corto de los caracteres del máximo 50 de la escritura, mínimo de 2 caracteres. No debe haber espacios o puntuacio`n de la clase en campo de los theis| +Script Comments -<\/B> 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|Comentarios de la escritura - este 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| +Script Text -<\/B> This is where you place the content of a Vicidial Script. Minimum of 2 characters. You can have customer information be auto-populated in this script using --A--field--B-- where field is one of the following fieldnames: vendor_lead_code, source_id, list_id, gmt_offset_now, called_since_last_reset, phone_code, phone_number, title, first_name, middle_initial, last_name, address1, address2, address3, city, state, province, postal_code, country_code, gender, date_of_birth, alt_phone, email, security_phrase, comments. For example, this sentence would print the persons name in it----

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

This would read----

Hello, can I speak with John Doe please? Well hello Mr. Doe how are you today?|Texto de la escritura - aquí es adonde usted pone el contenido de una escritura de Vicidial. Mínimo de 2 caracteres. Usted puede hacer la informacion del cliente automo`vil-poblar en esta escritura usando "--A--campo--B--" donde está uno el campo de los fieldnames siguientes: 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. ¿Por ejemplo, esta oracio`n imprimiría el nombre de las personas en e`l hola, puedo hablar con --A--first_name--B-- --A--last_name--B-- por favor? ¿Título del pozo hola --A--title--B-- --A--last_name--B-- co`mo está usted hoy? Esto leería ¿Hola, puedo hablar Juan Doe por favor? ¿Sr. Doe del pozo hola co`mo está usted hoy?| +Active -<\/B> This determines whether this script can be selected to be used by a campaign|Activo - esto se determina si esta escritura se puede seleccionar para ser utilizado por una campaña| +Campaign ID -<\/B> 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 lengt|Identificacio`n de la campaña - Úste es el nombre corto de la campaña, e`l no es editable despue`s de la sumisio`n inicial, no puede contener espacios y debe estar entre 2 y 8 caracteres en longitud| +Campaign Name -<\/B> This is the description of the campaign, it must be between 6 and 40 characters in length|Nombre de la campaña - esta es la descripcio`n de la campaña, debe estar entre 6 y 40 caracteres en longitud| +Active -<\/B> This is where you set the campaign to Active or Inactive. If Inactive, noone can log into it|Activo - aquí es adonde usted fija la campaña a activo o a inactivo. Si es inactivo, noone puede registrar en e`l| +Park Extension -<\/B> 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|Extension del parque - aquí es donde usted puede modificar para requisitos particulares en-sostiene la música para VICIDIAL. Cercio`rese de que la extension este` en lugar en el extensions.conf y eso que señala al nombre de fichero abajo| +Park File Name -<\/B> 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|Nombre del archivo del parque - aquí es donde usted puede modificar para requisitos particulares en-sostiene la música para VICIDIAL. Cercio`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| +Web Form -<\/B> This is where you can set the custom web page that will be opened when the user clicks on the WEB FORM button|Forma del Web - aquí es donde usted puede fijar el Web page de encargo que será abierto cuando el usuario chasca encendido el boton de la FORMA del WEB| +Allow Closers -<\/B> This is where you can set whether the users of this campaign will have the option to send the call to a closer|Permita Closers - aquí es donde usted puede fijar si los usuarios de esta campaña tendrán la opcio`n para enviar la llamada a un más cercano| +Dial Status -<\/B> This is where you set the statuses that you are wanting to dial on within the lists that are active for the campaign below|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| +List Order - This menu is where you select how the leads that match the statuses selected above will be put in the lead hopper|Orden de la lista - Este menú es donde usted selecciona co`mo los plomos que emparejan los estados seleccionados arriba serán puestos en la tolva del plomo| +select the first leads loaded into the vicidial_list table|seleziona i primi contatti caricati nella tabella vicidial_list| +select the last leads loaded into the vicidial_list table|seleziona gli ultimi contatti caricati nella tabella vicidial_list| +select the highest phone number and works its way down|seleziona il numero di telefono piu` grande e poi scorre verso il basso| +select the lowest phone number and works its way up|seleziona il numero di telefono piu` piccolo e poi scorre verso l`alto| +starts with last names starting with Z and works its way down|comienzo con los nombres pasados comenzando con Z y trabajos su manera abajo| +starts with last names starting with A and works its way up|comienzo con los nombres pasados comenzando con A y trabajos su manera para arriba| +starts with most called leads and works its way down|comienzo con los plomos y los trabajos llamados su manera abajo| +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|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)| +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|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)| +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|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)| +starts with least called leads and works its way up|comienzo con menos plomos y trabajos llamados su manera para arriba| +Hopper Level -<\/B> 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|Tolva llana - este 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 trave`s en un minuto| +Force Reset of Hopper -<\/B> This allows you to wipe out the hopper contents upon form submission. It should be filled again when the VDhopper script runs|Reajuste de la fuerza de la tolva - esto permite que usted limpie fuera del contenido de la tolva sobre la sumisio`n de la forma. Debe ser llenada otra vez cuando la escritura de VDhopper funciona| +Auto Dial Level -<\/B> 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|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 automo`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| +Next Agent Call -<\/B> This determines which agent receives the next call that is available|Llamada siguiente del agente - esto se determina que` agente recibe la llamada siguiente que está disponible| +orders by the random update value in the vicidial_live_agents table|o`rdenes por el valor al azar de la actualizacio`n en la tabla de los vicidial_live_agents| +orders by the last time an agent was sent a call. Results in agents receiving about the same number of calls overall|las o`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| +orders by the last time an agent finished a call. AKA agent waiting longest receives first call|las o`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| +Local Call Time -<\/B> 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|Tiempo de la llamada local - aquí es adonde usted fijo` durante que` horas usted quisiera marcar, según lo determinado por el tiempo local en está en cuál usted está llamando. Esto es controlada por co`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| +Voicemail -<\/B> If defined, calls that would normally DROP would instead be directed to this voicemail box to hear and leave a message|Voicemail - 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| +Dial Timeout -<\/B> 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|Descanso del dial - si está definido, llamadas que normalmente retraso despue`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 Voicemail usted puede desear intentar cambiar este valor entre a 21-26 y ver si los resultados mejoran| +Dial Prefix -<\/B> 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|Prefijo del dial - este campo permite más fácilmente cambiar una trayectoria de marcar a salir con un diverso me`todo sin hacer una recarga en asterisco. El defecto es 9 basados sobre un 91NXXNXXXXXX en el dial plan - extensions.conf| +Campaign CallerID -<\/B> 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|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 opcio`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 Tambien 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| +Campaign VDAD extension -<\/B> 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|Extension de la campaña VDAD - este campo permite una extension 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 e`l se tome. Una encuesta sobre política AGI la muestra adicional es Tambien (8366 agi-VDADtransferSURVEY.agi ) ese ahora incluido los juegos un mensaje a la persona llamada y permite que e`l haga una opcio`n presionando buttons(effectively la pre-investigacio`n el plomo). Observe por favor eso a excepcio`n de los exámenes, llamadas políticas y las caridades esta forma de llamar son ilegales en los Estados Unidos| +Campaign Rec extension -<\/B> 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|Extension de Rec de la Campaña - este campo permite para que una extension de encargo de la grabacion sea utilizada con VICIDIAL. Esto permite que usted utilice diversas extensiones dependiendo sobre cuánto tiempo usted desea permitir una grabacion máxima y que` 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 opcio`n incluida en los ejemplos es 8310 que registrarán en el formato del GSM para hasta que una hora| +Campaign Recording -<\/B> 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|grabacion de la campaña - este menú permite que usted elija que` nivel de la grabacion se permite en esta campaña. NEVER inhabilitará la grabacion en el cliente. ONDEMAND es el defecto y permite que el agente comience y pare a registrar según lo necesitado. ALLCALLS comenzará la grabacion en el cliente siempre que una llamada se envíe a un agente| +Campaign Rec Filename -<\/B> 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|Nombre de fichero de Rec de la campaña - este campo permite que usted modifique el nombre para requisitos particulares de la grabacion cuando la grabacion de la campaña es ONDEMAND o ALLCALLS. Las variables permitidas son CAMPAIGN CUSTPHONE FULLDATE TINYDATE EPOCH AGENT. El defecto es FULLDATE_AGENT y parecería este 20051020-103108_6666. Otro ejemplo es CAMPAIGN_TINYDATE_CUSTPHONE que parecería este TESTCAMP_51020103108_3125551212| +Campaign Script -<\/B> 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|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| +Get Call Launch -<\/B> 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|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| +Answering Machine Message -<\/B> 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|Mensaje del contestador automático - este campo está para entrar en una extension para cegar llamadas de la transferencia a cuando el agente consigue un contestador automático y chasca encendido el boton 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 despue`s que cuelga para arriba| +List ID -<\/B> 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|Identificacio`n de la lista - Úste es el nombre nume`rico de la lista, e`l no es editable despue`s de la sumisio`n inicial, debe contener solamente números y debe estar entre 2 y 8 caracteres en longitud| +List Name -<\/B> This is the description of the list, it must be between 2 and 20 characters in length|Nombre de la lista - esta es la descripcio`n de la lista, debe estar entre 2 y 20 caracteres en longitud| +Campaign -<\/B> This is the campaign that this list belongs to. A list can only be dialed on a single campaign at one time|Campaña - esta es la campaña que esta lista pertenece a. Una lista se puede marcar solamente en una sola campaña contemporáneamente| +Active -<\/B> This defines whether the list is to be dialed on or not|Activo - esto define si la lista debe ser marcada encendido o no| +Reset Lead-Called-Status for this list -<\/B> 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|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| +Group ID -<\/B> 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|Identificacio`n de grupo - Úste es el nombre corto del grupo de entrada, e`l no es editable despue`s de la sumisio`n inicial, no debe contener cualquier espacio y debe estar entre 2 y 20 caracteres en longitud| +Group Name -<\/B> This is the description of the group, it must be between 2 and 30 characters in length. Cannot include dashes, plusses or spaces|Nombre de grupo - esta es la descripcio`n del grupo, debe estar entre 2 y 30 caracteres en longitud. No puede incluir rociadas -, plusses + o espacios| +Group Color -<\/B> 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|Color del grupo - este 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 definicio`n del color de la tuerca hexagonal usted debe recordar poner a # al principio de la secuencia o VICIDIAL no trabajará correctamente| +Active -<\/B> This determines whether this group show up in the selection box when a VICIDIAL agent logs in|Activo - esto se determina si este grupo demuestra para arriba en la caja de la seleccio`n cuando un agente de VICIDIAL entra| +Web Form -<\/B> 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|Forma del Web - esta es la Direccion de encargo que el chascar en el boton de la FORMA del WEB en VICIDIAL le llevará para las llamadas que vienen adentro en este grupo| +Voicemail -<\/B> 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|Voicemail - si está definida, esta es la caja de Voicemail que las llamadas irán en vez a ser caído si no hay agentes disponibles despue`s del tiempo de asimiento están para arriba| +Fronter Display -<\/B> 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|Exhibicio`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| +User ID Start -<\/B> 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|Comienzo de la identificacio`n del usuario - esta es la identificacio`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| +Number of Lines -<\/B> 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|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| +Server IP -<\/B> A remote agent entry is only good for one specific server, here is where you select which server you want|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| +External Extension -<\/B> 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|Extension externa - este es el número que usted desea las llamadas remitidas a. Cercio`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 telefono en el sistema| +Status -<\/B> 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|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| +Campaign -<\/B> 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|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 e`sa que usted desea recibir llamadas de| +Inbound Groups -<\/B> Here is where you select the inbound groups you want to receive calls from if you have selected the CLOSER campaign|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| +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|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 identificacio`n de la lista en la primera columna| +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|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 descripcio`n debe ser 2-30 caracteres en longitud y seleccionable define si demuestra para arriba en VICIDIAL como disposicion| +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|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 disposicion llama apenas presionando una sola llave en su teclado| +User Group -<\/B> 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|Grupo de usuario - este es el nombre corto de un grupo de usuario de Vicidial, intento para no utilizar ningunos espacios o puntuacio`n para los caracteres de este máximo 20 del campo, mínimo de 2 caracteres| +Group Name -<\/B> This is the description of the vicidial user group max of 40 characters|Nombre de grupo - esta es la descripcio`n del máximo vicidial del grupo de usuario de 40 caracteres| +Xfer-Conf DTMF -<\/B> 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|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| +AMD send to vm exten -<\/B> 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|AMD envían a la VM exten - este menú permite que usted defina si un mensaje este` dejado en un contestador automático cuando se detecta la llamada será remitido inmediatamente a la extension del Contestar-Ma`quina-Mensaje si AMD es activo y se determina que la llamada es un contestador automático| +Modify Leads -<\/B> This option if set to 1 allows the user to modify leads in the admin section lead search results page|Modifique los plomos - esta opcio`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 seccio`n del admin| +Hot Keys Active -<\/B> This option if set to 1 allows the user to use the Hot Keys quick-dispositioning function in|Hot Keys activo - esta opcio`n si el sistema a 1 permite que el usuario utilice la funcio`n ra`pida-dispositioning de Hot Keys adentro| +Change Agent Campaign -<\/B> 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|Cambie la campaña del agente - esta opcio`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 e`l| +Agent Choose Ingroups -<\/B> 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|El agente elige Ingroups - esta opcio`n si el sistema a 1 permite que el usuario elija los ingroups de los cuales recibirán llamadas cuando ellos conexion 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| +Lead Filter -<\/B> 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|Filtro del plomo - este es un me`todo de filtrar sus plomos usando un fragmento de una pregunta del SQL. Utilice esta característica con la precaucio`n, e`l es fácil de parar el marcar accidentalmente con la alteracio`n más leve a la declaracio`n del SQL. El defecto no es NINGUNO| +Filter ID -<\/B> 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|Identificacio`n del filtro - este es el nombre corto de un filtro del plomo de Vicidial. este necesita ser un identificador único. No utilice ningunos espacios o puntuacio`n para los caracteres de este máximo 10 del campo, mínimo de 2 caracteres| +Filter Name -<\/B> This is a more descriptive name of the Filter. This is a short summary of the filter. max 30 characters, minimum of 2 characters|Nombre del filtro - este es un nombre más descriptivo del filtro. este es un resumen corto de los caracteres del máximo 30 del filtro, mínimo de 2 caracteres| +Filter Comments -<\/B> This is where you can place comments for a Vicidial Filter such as -calls all California leads-. max 255 characters, minimum of 2 characters|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| +Filter SQL -<\/B> 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 -|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| +Agent Alt Num Dialing -<\/B> This option allows an agent to manually dial the alternate phone number or address3 field after the main number has been called|El marcar nume`rico del Alt del agente - esta opcio`n permite que un agente marque manualmente el número de telefono o el campo alterno address3 despue`s de que se haya llamado el número principal| +Scheduled Callbacks -<\/B> 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|Servicios repetidos programar - esta opcio`n no prohibe a agente a la disposicion una llamada como CALLBK y elige los datos y el tiempo en los cuales el plomo será reactivado| +Agent-Only Callbacks -<\/B> 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|Servicios repetidos del Agente-Solamente - esta opcio`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 Tambien permite que el agente vea sus listados del servicio repetido y los llame detrás cualquier momento desean a| +Agent Call Manual -<\/B> 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|Manual de la llamada del agente - esta opcio`n permite que un agente incorpore manualmente un nuevo plomo en el sistema y los llame. Esto Tambien permite llamar de cualquier número de telefono de su pantalla vicidial y pone esa llamada en su sesio`n. Utilice esta opcio`n con la precaucio`n| +Vicidial Recording -<\/B> 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|grabacion de Vicidial - esta opcio`n puede evitar que un agente haga cualquier grabacion despue`s de que se abran una sesio`n a vicidial. Esta opcio`n debe estar encendido para que vicidial siga la sesio`n de la grabacion de la campaña| +Vicidial Transfers -<\/B> 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|Vicidial transfiere - esta opcio`n puede evitar que un agente abra la transferencia - la sesio`n de la conferencia de vicidial. Si esto es lisiado, el agente no puede llamada de los terceros o la transferencia oculta cualquiera llama| +Delete Filters -<\/B> This option allows the user to be able to delete vicidial lead filters from the system|La cancelacio`n se filtra - esta opcio`n permite que el usuario pueda suprimir los filtros vicidial del plomo del sistema| +Alter Agent Interface Options -<\/B> This option if set to 1 allows the administrative user to modify the Agents interface options in admin.php|Altere las opciones de interfaz del agente - esta opcio`n si el sistema a 1 permite que el usuario administrativo modifique las opciones de interfaz de los agentes en admin.php| +Closer Default Blended -<\/B> This option simply defaults the Blended checkbox on a CLOSER login screen|Un defecto más cercano mezclado - esta opcio`n omite simplemente el checkbox mezclado en una pantalla MÁS CERCANA de la conexion| +FILTER NOT ADDED - there is already a filter entry with this ID|FILTRO NON AGGIUNTO - Esiste gia` un altro filtro con questo ID| +Filter ID, name and SQL must be at least 2 characters in length|ID Filtro, nome e SQL devono essere lunghi almeno 2 caratteri| +Filter ID must be at least 2 characters in length|ID Filtro deve essere lungo almeno 2 caratteri| +Please go back and look at the data you entered|Per favore torna indietro e ricontrolla i dati inseriti| +CLICK HERE TO GO TO THE SUPER LEAD LOADER|CLICCA QUI PER ACCEDERE AL `SUPER LEAD LOADER`| +BACK TO ADMIN|TORNA AD AMMINISTRAZIONE| +File layout to use|Struttura del file da usare| +Standard VICIDIAL|Standard VICIDIAL| +Custom layout|Struttura personalizzata| +CLICK HERE TO GO TO THE BASIC LEAD LOADER|CLICCA QUI PER ACCEDERE AL CARICATORE CONTATTI STANDARD| +SUPER LIST LOADER|SUPER LIST LOADER| +OK TO PROCESS|OK PER ELABORARE| +File data|Dati File| +short description of the filter|breve descrizione del filtro| +Alter Agent Interface Options: |Modifica Opzioni Interfaccia Operatore: | +Click here to delete filter |Clicca qui per cancellare il filtro| +FILTER DELETION COMPLETED:|CANCELLAZIONE FILTRO COMPLETATA:| +ADMIN INTERFACE OPTIONS:|OPZIONI INTERFACCIA AMMINISTRATORE:| +AGENT INTERFACE OPTIONS:|OPZIONI INTERFACCIA OPERATORE:| +Time range:|Intervallo Di Tempo:| +Closer Default Blended:|Un Defecto Más cercano Mezclado:| +Agent Alt Num Dialing:|El Marcar Nume`rico Del Alt Del Agente:| +Scheduled Callbacks:|Servicios repetidos Programar:| +Agent-Only Callbacks:|Richiami esclusivi dell`operatore:| +New Filter Addition|Nueva Adicio`n Del Filtro| +LEAD FILTER LISTINGS:|ELENCO FILTRI CONTATTI:| +FILTER NOT MODIFIED|FILTRO NON MODIFICATO| +FILTER NOT DELETED|FILTRO NON CANCELLATO| +DELETE THIS FILTER|CANCELLA QUESTO FILTRO| +FILTER NOT ADDED|FILTRO NON AGGIUNTO| +Filter Comments: |Commenti Del Filtro: | +FILTER MODIFIED|FILTRO MODIFICATO| +MODIFY A FILTER|MODIFICA UN FILTRO| +ADD NEW FILTER|AGGIUNGI NUOVO FILTRO| +Add New Filter|Agiungi Nuovo Filtro| +Modify Filter|Modifica Filtro| +Delete Filter|Cancella Filtro| +Filter Name: |Nome Del Filtro:| +FILTER ADDED:|FILTRO AGGIUNTO:| +VIEW FILTERS|VISUALIZZA FILTRI| +Lead Filter:|Filtro Contatti:| +Filter SQL:|Filtro Sql:| +Users List|Lista Utenti| +Filter ID: |ID Filtro:| +Filters|Filtri| +Agent Call Manual|Chiamata Manuale Operatore| +Vicidial Recording|Registrazione Vicidial| +Vicidial Transfers|Trasferimenti Vicidial| +Click here for user time sheet|Clicca qui per la tabella degli orari dell`utente| +Click here for user status|Clicca qui per visualizzare lo stato dell`utente| +Click here for user CallBack Holds|Clicca qui per i richiami dell`utente| +Lead Filter|Filtro Contatti| +Click here to see all CallBack Holds in this campaign|Clicca qui per visualizzare tutti i richiami in attesa per questa campagna| +Click here to see all CallBack Holds in this list|Clicca qui per visualizzare tutti i richiami in attesa in questa lista| +STATUS NAME|NOME ESITO| +Script ID|ID Script:| +Script Name|Nome Script| +Script Comments|Note Script| +Script Text|Testo Script| +ADD FILTER|AGGIUNGI FILTRO| +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|overall_user_level: las o`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| +VICIDIAL LIST LOADER FUNCTIONALITY|FUNCIONALIDAD DEL CARGADOR DE LA LISTA DE VICIDIAL| +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|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 Tambien un cargador estupendo nuevo del plomo de la versio`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 validacio`n de datos o la comprobacio`n para duplicados en sí mismo u otras listas, de modo que este` algo usted necesita hacer antes de usted la carga los plomos. Tambien, cercio`rese de que usted haya creado la lista que estos plomos son estar debajo de modo que usted pueda utilizarlos. Hay Tambien 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| +NOTES: The Excel Lead loader functionality is enabled by a series of perl scripts and needs to have a properly configured /home/cron/AST_SERVER_conf.pl file in place on the web server. Also, a couple perl modules must be loaded for it to work as well - OLE-Storage_Lite and Spreadsheet-ParseExcel. You can check for runtime errors in these by looking at your apache error_log file|NOTAS: La funcionalidad del cargador del plomo del sobresalir es permitida por una serie de escrituras del Perl y necesita tener un archivo correctamente configurado de /home/cron/AST_SERVER_conf.pl en lugar en el web server. Tambien, los mo`dulos de un Perl de los pares se deben cargar para ella para trabajar Tambien - oLE-Storage_Lite-Storage_Lite y la Hoja de balance-ParseExcel. Usted puede comprobar para saber si hay errores runtime en estos mirando su archivo del error_log de apache| +Vendor Lead Code - shows up in the Vendor ID field of the GUI|Co`digo del plomo del vendedor - demuestra para arriba en el campo de la identificacio`n del vendedor del GUI| +Source Code - internal use only for admins and DBAs|Co`digo de fuente - uso interno solamente para los admins y DBAs| +List ID - the list number that these leads will show up under|Identificacio`n de la lista - el número de la lista que estos plomos demostrarán para arriba debajo| +Phone Code - the prefix for the phone number - 1 for US, 01144 for UK, 01161 for AUS, etc|Co`digo del telefono - el prefijo para el telefono number(1 para los E.E.U.U., 01144 para Reino Unido, 01161 para AUS, el etc)| +Phone Number - must be at least 8 digits long|Número de telefono - debe ser por lo menos 8 dígitos de largo| +Title - title of the customer - Mr. Ms. Mrs, etc...|Título - título del customer(Mr. Ms señ., etc...)| +NOTE: It can take up to 30 seconds for changes submitted on this screen to go live|NOTA: Potrebbero passare fino a 30 secondi prima che le modifiche qui effettuate possano essere accettate| +USER NOT ADDED - there is already a user in the system with this user number|UTENTE NON AGGIUNTO - Esiste gia` un utente nel sistema con questo numero utente| +USER NOT ADDED - Please go back and look at the data you entered|UTENTE NON AGGIUNTO - Per favore torna indietro e ricontrolla i dati inseriti| +user id must be between 2 and 8 characters long|L`ID utente deve essere lungo tra i 2 e gli 8 caratteri| +full name and password must be at least 2 characters long|il nome e la password devono essere lunghi almeno 2 caratteri| +CAMPAIGN NOT ADDED - there is already a campaign in the system with this ID|CAMPAGNA NON AGGIUNTA - Esiste gia` una campagna nel sistema con questo ID| +CAMPAIGN NOT ADDED - Please go back and look at the data you entered|CAMPAGNA NON AGGIUNTA - Per favore torna indietro e ricontrolla i dati inseriti| +campaign ID must be between 2 and 8 characters in length|L`ID Campagna deve essere lungo tra i 2 e gli 8 caratteri| +campaign name must be between 6 and 40 characters in length|il nome della campagna deve essere lungo tra i 6 e i 40 caratteri| +CAMPAIGN STATUS NOT ADDED - there is already a campaign-status in the system with this name|ESITO CAMPAGNA NON AGGIUNTO - Esiste gia` un esito campagna con questo nome| +CAMPAIGN STATUS NOT ADDED - there is already a global-status in the system with this name|ESITO CAMPAGNA NON AGGIUNTO - esiste gia` un esito globale con questo nome| +CAMPAIGN STATUS NOT ADDED - Please go back and look at the data you entered|ESITO CAMPAGNA NON AGGIUNTO - Per favore torna indietro e ricontrolla i dati inseriti| +status must be between 1 and 8 characters in length|l`esito deve essere lungo tra 1 e 8 caratteri| +status name must be between 2 and 30 characters in length|il nome dell`esito deve essere lungo tra i 2 e i 30 caratteri| +CAMPAIGN HOT KEY NOT ADDED - there is already a campaign hot key in the system with this hot key|CAMPAÚA HOT KEY NO AGREGADA - hay ya una campaña hot key en el sistema con este hot key| +CAMPAIGN HOT KEY NOT ADDED - Please go back and look at the data you entered|CAMPAÚA HOT KEY NO AGREGADA - Per favore torna indietro e ricontrolla i dati inseriti| +hot key must be a single character between 1 and 9|el hot key debe ser un solo carácter entre 1 y 9| +LIST NOT ADDED - there is already a list in the system with this ID|LISTA NON AGGIUNTA - Esiste gia` una lista nel sistema con questo ID| +LIST NOT ADDED - Please go back and look at the data you entered|LISTA NON AGGIUNTA - Per favore torna indietro e ricontrolla i dati inseriti| +List ID must be between 2 and 8 characters in length|La ID de la lista debe estar entre 2 y 8 caracteres en longitud| +List name must be at least 2 characters in length|El nombre de la lista debe ser por lo menos 2 caracteres en longitud| +GROUP NOT ADDED - there is already a group in the system with this ID|GRUPPO NON AGGIUNTO - l`ID specificato e` associato ad un gruppo gia` presente in sistema| +GROUP NOT ADDED - Please go back and look at the data you entered|GRUPPO NON AGGIUNTO - per favore torna indietro e ricontrolla i dati inseriti| +Group ID must be between 2 and 20 characters in length and contain no|L`ID deve essere lungo tra i 2 e i 20 caratteri e non deve contenere| +Group name and group color must be at least 2 characters in length|Il nome ed il colore del gruppo devono essere lunghi almeno 2 caratteri| +REMOTE AGENTS NOT ADDED - there is already a remote agents entry starting with this userID|AGENTES ALEJADOS NO AGREGADOS - hay ya una entrada alejada de los agentes comenzando con esta ID del usuario| +REMOTE AGENTS NOT ADDED - Please go back and look at the data you entered|AGENTES ALEJADOS NO AGREGADOS - Per favore torna indietro e ricontrolla i dati inseriti| +User ID start and external extension must be at least 2 characters in length|El comienzo de la ID del usuario y la extension externa deben ser por lo menos 2 caracteres en longitud| +USER GROUP NOT ADDED - there is already a user group entry with this name|GRUPO de USUARIO NO AGREGADO - hay ya una entrada del grupo de usuario con este nombre| +USER GROUP NOT ADDED - Please go back and look at the data you entered|GRUPO de USUARIO NO AGREGADO - Per favore torna indietro e ricontrolla i dati inseriti| +Group name and description must be at least 2 characters in length|El nombre y la descripcio`n de grupo deben ser por lo menos 2 caracteres en longitud| +USER NOT MODIFIED - Please go back and look at the data you entered|USUARIO NO MODIFICADO - Per favore torna indietro e ricontrolla i dati inseriti| +Password and Full Name each need ot be at least 2 characters in length|La contraseña y el nombre completo cada ot de la necesidad sean por lo menos 2 caracteres en longitud| +CAMPAIGN NOT MODIFIED - Please go back and look at the data you entered|CAMPAÚA NO MODIFICADA - Per favore torna indietro e ricontrolla i dati inseriti| +the campaign name needs to be at least 6 characters in length|el nombre de la campaña necesita ser por lo menos 6 caracteres en longitud| +RESETTING CAMPAIGN LEAD HOPPER|REAJUSTE DE LA TOLVA DEL PLOMO DE LA CAMPAÚA| +Wait 1 minute before dialing next number|Espera 1 minuto antes de marcar el número siguiente| +CAMPAIGN STATUS NOT MODIFIED - Please go back and look at the data you entered|ESTADO de la CAMPAÚA NO MODIFICADO - Per favore torna indietro e ricontrolla i dati inseriti| +the campaign id needs to be at least 2 characters in length|la ID de la campaña necesita ser por lo menos 2 caracteres en longitud| +the campaign status needs to be at least 1 characters in length|el estado de la campaña necesita ser por lo menos los caracteres 1 en longitud| +CUSTOM CAMPAIGN STATUS DELETED|ESTADO DE ENCARGO DE LA CAMPAÚA SUPRIMIDO| +CAMPAIGN HOT KEY NOT MODIFIED - Please go back and look at the data you entered|CAMPAÚA HOT KEY NO MODIFICADA - Per favore torna indietro e ricontrolla i dati inseriti| +the campaign hot key needs to be at least 1 characters in length|el hot key de la campaña necesita ser por lo menos los caracteres 1 en longitud| +CUSTOM CAMPAIGN HOT KEY DELETED|LA CAMPAÚA DE ENCARGO HOT KEY SUPRIMIÚ| +CAMPAIGN NOT MODIFIED - Please go back and look at the data you entered|CAMPAÚA NO MODIFICADA - Per favore torna indietro e ricontrolla i dati inseriti| +the campaign name needs to be at least 6 characters in length|el nombre de la campaña necesita ser por lo menos 6 caracteres en longitud| +LIST NOT MODIFIED - Please go back and look at the data you entered|LISTA NO MODIFICADA - Per favore torna indietro e ricontrolla i dati inseriti| +list name must be at least 2 characters in length|el nombre de la lista debe ser por lo menos 2 caracteres en longitud| +REMOVING LIST HOPPER LEADS FROM OLD CAMPAIGN HOPPER|QUITAR LOS PLOMOS DE LA TOLVA DE LA LISTA DE VIEJA TOLVA DE LA CAMPAÚA| +GROUP NOT MODIFIED - Please go back and look at the data you entered|GRUPO NO MODIFICADO - Per favore torna indietro e ricontrolla i dati inseriti| +group name and group color must be at least 2 characters in length|el color del nombre de grupo y del grupo debe ser por lo menos 2 caracteres en longitud| +REMOTE AGENTS NOT MODIFIED - Please go back and look at the data you entered|AGENTES ALEJADOS NO MODIFICADOS - Per favore torna indietro e ricontrolla i dati inseriti| +User ID Start and External Extension must be at least 2 characters in length|El comienzo de la ID del usuario y la extension externa deben ser por lo menos 2 caracteres en longitud| +REMOTE AGENTS MODIFIED|LOS AGENTES ALEJADOS SE MODIFICARON| +USER GROUP NOT MODIFIED - Please go back and look at the data you entered|GRUPO de USUARIO NO MODIFICADO - Per favore torna indietro e ricontrolla i dati inseriti| +Group name and description must be at least 2 characters in length|El nombre y la descripcio`n de grupo deben ser por lo menos 2 caracteres en longitud| +MODIFY A USERS RECORD|MODIFICA UN UTENTE| +Click here for user stats|Clicca qui per le statistiche dell`utente| +MODIFY A CAMPAIGNS RECORD|MODIFIQUE Un EXPEDIENTE De las CAMPAÚAS| +CONFERENCES TABLE|TABLA DE CONFERENCIAS| +Conference Number -<\/B> 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|Número de la conferencia - este campo es donde usted pone el número del dialpna de la conferencia del meetme. Tambien 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| +Server IP -<\/B> The menu where you select the Asterisk server that this conference will be on|IP del servidor - El menú donde usted selecciona el servidor del asterisco que esta conferencia estará encendido| +PHONE NOT ADDED - there is already a Phone in the system with this extension\/server|telefonO NO AGREGADO - hay ya un telefono en el sistema con esta extension/servidor| +PHONE NOT ADDED - Please go back and look at the data you entered|telefonO NO AGREGADO - Per favore torna indietro e ricontrolla i dati inseriti| +PHONE ADDED|TELEFONO AGGIUNTO| +SERVER NOT ADDED - there is already a server in the system with this ID|SERVER NON AGGIUNTO - Esiste gia` un altro server nel sistema con questo ID| +SERVER NOT ADDED - Please go back and look at the data you entered|SERVER NON AGGIUNTO - Per favore torna indietro e ricontrolla i dati inseriti| +SERVER ADDED|SERVER AGGIUNTO| +CONFERENCE NOT ADDED - there is already a conference in the system with this ID and server|CONFERENZA NON AGGIUNTA - Esiste gia` una conferenza nel sistema con questo ID e server| +CONFERENCE NOT ADDED - Please go back and look at the data you entered|CONFERENZA NON AGGIUNTA - Per favore torna indietro e ricontrolla i dati inseriti| +CONFERENCE ADDED|CONFERENZA AGGIUNTA| +PHONE NOT MODIFIED - there is already a Phone in the system with this extension\/server|TELEFONO NON MODIFICATO - Esiste gia` un Telefono nel sistema con questo interno\/server| +PHONE NOT MODIFIED - Please go back and look at the data you entered|TELEFONO NON MODIFICATO - Per favore torna indietro e ricontrolla i dati inseriti| +PHONE MODIFIED|TELEFONO MODIFICATO| +SERVER NOT MODIFIED - there is already a server in the system with this server_ip|SERVIDOR NO MODIFICADO - hay ya un servidor en el sistema con este server_ip| +SERVER NOT MODIFIED - Please go back and look at the data you entered|SERVIDOR NO MODIFICADO - Per favore torna indietro e ricontrolla i dati inseriti| +SERVER MODIFIED|SERVER MODIFICATO| +CONFERENCE NOT MODIFIED - there is already a Conference in the system with this extension-server|CONFERENCIA - hay ya una conferencia en el sistema con esta extension - servidor NO MODIFICADO| +CONFERENCE NOT MODIFIED - Please go back and look at the data you entered|CONFERENCIA NO MODIFICADA - Per favore torna indietro e ricontrolla i dati inseriti| +You do not have permissions to modify this user|Non hai l`autorizzazione per modificare questo utente| +Click here to delete user|Clicca qui per cancellare questo utente| +Please go back and look at the data you entered|Per favore torna indietro e ricontrolla i dati inseriti| +Click here to delete campaign|Clicca qui per cancellare la campagna| +Click here to delete list and all of its leads|Clicca qui per cancellare la lista e tutti i suoi contatti| +REMOVING LIST LEADS FROM VICIDIAL_LIST TABLE|QUITAR LOS PLOMOS DE LA LISTA DE LA TABLA DE VICIDIAL_LIST| +Click here to delete in-group|Clicca qui per cancellare il gruppo inbound| +Click here to delete remote agent|Chasque aquí para suprimir el agente alejado| +Click here to delete user group|Chasque aquí para suprimir a grupo de usuario| +Click here to delete phone|Clicca qui per cancellare il telefono| +there is already a script entry with this name|hay ya una entrada de la escritura con este nombre| +Script name, description and text must be at least 2 characters in length|El nombre, la descripcio`n y el texto de la escritura deben ser por lo menos 2 caracteres en longitud| +Click here to delete script|Clicca qui per cancellare lo script| +Phone Login|Login Telefono| +Phone Pass|Password Telefono| +Delete Users|Cancella Utenti| +Delete User Groups|Suprima a grupos de usuario| +Delete Lists|Cancella Liste| +Delete Campaigns|Cancella Campagne| +Delete In-Groups|En-Grupos de la cancelacio`n| +Delete Remote Agents|Suprima los agentes alejados| +Delete Script|Cancella Script| +Load Leads|Carica Contatti| +Campaign Detail|Dettagli Campagna| +AGC Admin Access|Acceso de AGC Admin| +AGC Delete Phones|La cancelacio`n de AGC telefona| +SCRIPT NOT ADDED|SCRIPT NON AGGIUNTO| +SCRIPT ADDED|SCRIPT AGGIUNTO| +SCRIPT NOT MODIFIED|SCRIPT NON MODIFICATO| +SCRIPT MODIFIED|SCRIPT MODIFICATO| +DELETE THIS USER|CANCELLA QUESTO UTENTE| +DELETE THIS CAMPAIGN|CANCELLA QUESTA CAMPAGNA| +DELETE THIS LIST|CANCELLA QUESTA LISTA| +DELETE THIS IN-GROUP|CANCELLA QUESTO GRUPPO INBOUND| +DELETE THIS REMOTE AGENT|SUPRIMA ESTE AGENTE ALEJADO| +DELETE THIS USER GROUP|CANCELLA QUESTO GRUPPO UTENTI| +DELETE THIS PHONE|CANCELLA QUESTO TELEFONO| +DELETE THIS SCRIPT|CANCELLA QUESTO SCRIPT| +USER NOT DELETED|UTENTE NON CANCELLATO| +CAMPAIGN NOT DELETED|CAMPAGNA NON CANCELLATA| +LIST NOT DELETED|LISTA NON CANCELLATA| +IN-GROUP NOT DELETED|GRUPPO INBOUND NON CANCELLATO| +REMOTE AGENT NOT DELETED|AGENTE ALEJADO NO SUPRIMIDO| +USER GROUP NOT DELETED|GRUPO DE USUARIO NO SUPRIMIDO| +PHONE NOT DELETED|TELEFONO NON CANCELLATO| +SCRIPT NOT DELETED|SCRIPT NON CANCELLATO| +USER DELETION CONFIRMATION|CONFIRMACIo`N DE LA CANCELADURA DEL USUARIO| +USER DELETION COMPLETED|CANCELADURA DEL USUARIO TERMINADA| +CAMPAIGN DELETION CONFIRMATION|CONFIRMACIo`N DE LA CANCELADURA DE LA CAMPAÑA| +CAMPAIGN DELETION COMPLETED|LA CANCELADURA DE LA CAMPAÑA TERMINo`| +Logout Agents|Disconnetti Operatori| +AGENTS NOT LOGGED OUT OF CAMPAIGN|OPERATORI NON DISCONNESSI DALLA CAMPAGNA| +AGENT LOGOUT CONFIRMATION|CONFERMA DISCONNESSIONE OPERATORE| +Click here to log all agents out of|Clicca qui per disconnettere tutti gli operatori| +AGENT LOGOUT COMPLETED|DISCONNESSIONE OPERATORI COMPLETATA| +LOG ALL AGENTS OUT OF THIS CAMPAIGN|DISCONNETTI TUTTI GLI OPERATORI DI QUESTA CAMPAGNA| +LIST DELETION CONFIRMATION|CONFIRMACIo`N DE LA CANCELADURA DE LA LISTA| +LIST DELETION COMPLETED|LA CANCELADURA DE LA LISTA TERMINo`| +IN-GROUP DELETION CONFIRMATION|CONFERMA ELIMINAZIONE GRUPPO INBOUND| +IN-GROUP DELETION COMPLETED|ELIMINAZIONE GRUPPO INBOUND COMPLETATA| +REMOTE AGENT DELETION CONFIRMATION|CONFIRMACIo`N ALEJADA DE LA CANCELADURA DEL AGENTE| +REMOTE AGENT DELETION COMPLETED|CANCELADURA ALEJADA DEL AGENTE TERMINADA| +USER GROUP DELETION CONFIRMATION|CONFIRMACIo`N DE LA CANCELADURA DEL GRUPO DE USUARIO| +USER GROUP DELETION COMPLETED|CANCELADURA DEL GRUPO DE USUARIO TERMINADA| +PHONE DELETION CONFIRMATION|CONFIRMACIo`N DE LA CANCELADURA DEL telefonO| +PHONE DELETION COMPLETED|LA CANCELADURA DEL telefonO TERMINo`| +SCRIPT DELETION CONFIRMATION|CONFIRMACIo`N DE LA CANCELADURA DE LA ESCRITURA| +SCRIPT DELETION COMPLETED|CANCELADURA DE LA ESCRITURA TERMINADA| +Preview Script|Anteprima Script| +MODIFY A SCRIPT|MODIFICA SCRIPT| +title of the script|titolo script| +CONFERENCE MODIFIED|CONFERENCIA MODIFICADA| +MODIFY A PHONE RECORD|MODIFICANDO EL telefonO| +THE END|FINE| +LIST ALL PHONES|MOSTRA TUTTI I TELEFONI| +ADD A NEW PHONE|AGGIUNGI UN NUOVO TELEFONO| +SEARCH FOR A PHONE|CERCA UN TELEFONO| +ADD A SERVER|AGGIUNGI UN SERVER| +LIST ALL SERVERS|MOSTRA TUTTI I SERVER| +SHOW ALL CONFERENCES|MOSTRA TUTTE LE CONFERENZE| +ADD A NEW CONFERENCE|CREA UNA NUOVA CONFERENZA| +>ADD A NEW VICIDIAL CONFERENCE<|>CREA UNA NUOVA CONFERENZA VICIDIAL<| +AMD Send to VM exten|AMD envían a la VM exten| +Transfer-Conf DTMF|Transfiera -Conf DTMF| +Transfer-Conf Number|Transfiera -Conf El Número| +Hot Keys Active|Hot Keys Activo| +Modify Leads|Modifica Contatti| +Change Agent Campaign|Cambia la campagna di un operatore| +Agent Choose Ingroups|El Agente Elige Ingroups| +CallBacks Within Campaign|Richiami Nella Campagna| +CallBacks Within List|Richiami Nella Lista| +CallBacks Within Agent|Richiami Dell`Operatore| +Phone extension|Interno Telefono| +Dial Plan Number|Numero De Dial plan| +digits only|solo cifre| +Voicemail Box|Buzon de voz| +Outbound CallerID|CallerID De salida| +Phone IP address|Direccion IP del telefono| +Computer IP address|Direccion IP del ordenador| +Server IP Address|Indirizzo IP del Server| +Server IP|IP Server| +Login: |Login: | +Password: |Password: | +Status: |Esito: | +Active Account|Cuenta Activa| +Phone Type|Tipo Del telefono| +Full Name|Nome Completo| +Company: |Compania: | +Picture: |Foto: | +Client Protocol|Protocollo Client| +Local GMT|Fuso Orario Locale| +Do NOT Adjust for DST|No ajustar para el DST| +VALUE=SUBMIT|VALUE=INVIA| +ADD A NEW SERVER|AGGIUNGI UN NUOVO SERVER| +Server ID|ID Server| +Server Description|Descrizione Server| +Active: |Attivo: | +Asterisk Version|Versione Di Asterisk| +Conference Number|Número de la Conferencia| +New Messages|Messaggi Nuovi| +Old Messages|Messaggi Vecchi| +Manager Login|Login del Manager| +Manager Secret|Contraseña del Manager| +VICIDIAL Default User|Usuario por defecto de VICIDIAL| +VICIDIAL Default Pass|Contraseña por defecto de VICIDIAL| +VICIDIAL Default Campaign|Campaña por defecto de VICIDIAL| +Park Extension|Extension del parking| +Park Exten|Extension del parking| +Conf Extension|Extension de la conferencia| +Conf Exten|Extension de la conferencia| +VICIDIAL Park Exten|Exten. Del parking de VICIDIAL| +VICIDIAL Park File|Archivo para música del parking de VICIDIAL| +Monitor Prefix|Prefijo al monitorizar| +Recording Exten|Exten de grabacion| +VMailMain Exten|Exten de VmailMain| +VMailDump Exten|Exten de VmaiDumpl| +Exten Context|Contexto De Exten| +DTMFSend Channel|Canal de envío del DTMF| +Outbound Call Group|Grupo de las llamadas de salida| +Browser Location|Localizacio`n del Navegador| +Install Directory|Directorio de instalacio`n| +CallerID URL|URL CallerID| +VICIDIAL Default URL|URL por defecto de VICIDIAL| +Call Logging|Call Logging| +User Switching|Cambio de Usuario| +Conferencing|Conferenze| +Admin Hang Up|Colgar del Admin| +Admin Hijack|Captura del Admin| +Admin Monitor|Monitorizacio`n del Admin| +Call Park|Parking de Llamada| +Updater Check|Uptader Check| +AF Logging|AF Logging| +Queue Enabled|Colas permitidas| +CallerID Popup|Ventana emergente del CallerID| +VMail Button|Boto`n Vmail| +Fast Refresh|Aggiornamento Veloce| +Fast Refresh Rate|Intervallo Aggiornamento Veloce| +Persistant MySQL|Persistant MySQL| +Auto Dial Next Number|Auto Marcar el Siguiente Número| +Stop Rec after each call|Parar de Grabar despue`s de cada llamada| +Primary |Primario | +Secondary |Secondario | +DBX Server|Servidor de DBX| +DBX Database|Base de datos de DBX| +DBX User|Usuario de DBX| +DBX Pass|Contraseña de DBX| +DBX Port|Puerto de DBX| +DBY Server|Servidor de DBY| +DBY Database|Base de datos de DBY| +DBY User|Usuario de DBY| +DBY Pass|Contraseña de DBY| +DBY Port|Puerto de DBY| +MODIFY A SERVER RECORD|MODIFICAR UN REGISTRO DEL SERVIDOR| +Max VICIDIAL Trunks|Máx. Trunks en VICIDIAL| +Telnet Host|Host Telnet| +Telnet Port|Porta Telnet| +Manager User|Usuario Del Manager| +Manager Update User|Usuario del Updater del Manager| +Manager Listen User|Usuario Listen del Manager| +Manager Send User|Usuario Send del Manager| +VMail Dump Exten|Extension de Vmail Dump | +VICIDIAL AD extension|Extension del AD de VICIDIAL| +Default Context|Contexto por Defecto| +PHONES WITHIN THIS SERVER|TELEFONI IN QUESTO SERVER| +>EXTENSION<|>INTERNO<| +>NAME<|>NOME<| +>ACTIVE<|>ATTIVO<| +>MODIFY<|>MODIFICA<| +This server has|Questo server ha| +active phones and|telefoni attivi e| +inactive phones|telefoni inattivi| +MODIFY A CONFERENCE RECORD|MODIFICA DELLA CONFERENZA| +Conference: |Conferenza: | +Current Extension|Interno Corrente| +extension: |interno: | +SEARCH RESULTS|RESULTADOS DE LA BÚSQUEDA| +PHONE LISTINGS|ELENCO TELEFONI| +SERVER LISTINGS|ELENCO SERVER| +CONFERENCE LISTINGS|ELENCO CONFERENZE| +script runtime|Tempo Esecuzione Script| +ADD NEW PHONE|AGGIUNGI TELEFONO| +ADD NEW SERVER|AGGIUNGI SERVER| +ADD NEW CONFERENCE|NUEVA CONFERENCIA| +ADD SCRIPT|AGGIUNGI SCRIPT| +VIEW SCRIPTS|VISUALIZZA SCRIPT| +SCRIPTS LISTINGS|ELENCO SCRIPT| +ADDING NEW PHONE|CREANDO telefono| +ADDING NEW SERVER|CREANDO SERVIDOR| +ADDING NEW CONFERENCE|CREANDO CONFERENCIA| +MODIFY PHONE|MODIFICAR EL telefonO| +MODIFY SERVER|MODIFICAR EL SERVIDOR| +MODIFY CONFERENCE|MODIFICAR LA CONFERENCIA| +MODIFYING PHONE|MODIFICANDO EL telefonO| +MODIFYING SERVER|MODIFICANDO EL SERVIDOR| +MODIFYING CONFERENCE|MODIFICANDO LA CONFERENCIA| +SEARCH PHONES|BUSCAR telefonOS| +SEARCH PHONES RESULTS|RESULTADO DE LA BÚSQUEDA DE telefonOS| +PHONE LIST|ELENCO TELEFONI| +SERVER LIST|ELENCO SEEVER| +CONFERENCE LIST|LISTA DE CONFERENCIAS| +HELP|AIUTO| +Click here for phone stats|Pinchar aquí­ para ver las estadísticas del telefono| +REMOTE INBOUND: Main|ENTRANTES REMOTOS: Principal| +REMOTE INBOUND: Popup|SALIENTES REMOTOS: Popup| +CALLS SENT TO|LLAMADAS REALIZADAS A| +Phone Stats|Estadísticas Del telefono| +CALL TIME AND CHANNELS|TIEMPO DE LLAMADA Y CANALES| +CHANNEL GROUP|GRUPO DE CANALES| +HOURS:MINUTES|ORE:MINUTI| +TOTAL CALLS|TOTALE CHIAMATE| +>NUMBER|>NUMERO| + DATE<| DATA<| +Close this window|Chiudi questa finestra| +Inbound Calls Stats|Statistiche Chiamate In Entrata| +Add New User|Aggiungi Nuovo Utente| +Add New Campaign|Aggiungi Nuova Campagna| +Add New List|Aggiungi Nuova Lista| +Add New In-Group|Aggiungi Nuovo Gruppo Inbound| +Add New Remote Agents|Aggiungi Nuovo Operatore Remoto| +Add New Users Group|Aggiungi Nuovo Gruppo Utente| +Add New Script|Aggiungi Nuovo Script| +New User Addition|Creazione Nuovo Utente| +New Campaign Addition|Creazione Nuova Campagna| +New Campaign Status Addition|Creazione Nuovo Esito Personalizzato Per Campagna| +New Campaign Hot Key Addition|Creazione Nuova HotKey Personalizzata Per Campagna| +New List Addition|Creazione Nuova Lista| +New In-Group Addition|Creazione Nuovo Gruppo Inbound| +New Remote Agents Addition|Creazuibe Nuovi Operatori Remoti| +New Users Group Addition|Creazione Nuovo Gruppo Utenti| +New Script Addition|Creazione Nuovo Script| +Modify User|Modifica Utente| +Modify Campaign - Basic View|Modifica Campagna - Vista Generale| +Modify Campaign|Modifica Campagna| +Modify List|Modifica Lista| +Modify In-Group|Modifica Gruppo Inbound| +Modify Remote Agents|Modifica Operatori Remoti| +Modify Users Groups|Modifica Gruppi Utenti| +Modify Script|Modifica Script| +Welcome|Benvenuto| +Lists|Liste| +In-Groups|In-Groups| +Remote Agents|Operatori Remoti| +User Groups|Gruppi Utenti| +Search Form|Form di Ricerca| +Search Results|Risultati Ricerca| +VICIDIAL ADMIN|VICIDIAL ADMIN| + TABLE| TABELLA| +First Name|Nome| +Middle Initial|Secondo Nome| +Last Name|Cognome| +Address Line 1|Indirizzo, linea 1| +Address Line 2|Indirizzo, linea 2| +Address Line 3|Indirizzo, linea 3| +City|Citta`| +State - limited to 2 characters|Stato - limitato a 2 caratteri| +Province|Provincia| +Postal Code|CAP| +Country|Stato| +Gender|Sesso| +Date of Birth|Data di Nascita| +Alternate Phone Number|Numero di Telefono Alternativo| +Email Address|Email| +Security Phrase|Frase De Seguridad| +Comments|Note| +THE END|FINE| +Logout|Logout| +LIST USERS|VISUALIZZA UTENTI| +ADD A NEW USER|NUOVO UTENTE | +SEARCH FOR A USER|RICERCA UTENTI| +ADD USER GROUP|NUOVO GRUPPO UTENTI| +LIST USER GROUPS|VISUALIZZA GRUPPI UTENTI| +ADD CAMPAIGN|AGGIUNGI CAMPAGNA| +LIST CAMPAIGNS|VISUALIZZA CAMPAGNE| +SHOW LISTS|VISUALIZZA LISTE| +ADD NEW LIST|AGGIUNGI NUOVA LISTA| +ADD A NEW LIST|AGGIUNGI NUOVA LISTA| +LOAD NEW LEADS|CARICA NUOVI CONTATTI| +SHOW IN-GROUPS|VISUALIZZA GRUPPI INBOUND| +ADD NEW IN-GROUP|AGGIUNGI NUOVO GRUPPO INBOUND| +SHOW REMOTE AGENTS|VISUALIZZA OPERATORI REMOTI| +ADD NEW REMOTE AGENTS|NUOVO OPERATORE REMOTO| +SERVER STATS|STATISTICHE SERVER| +PARK REPORT|INFORME DE PARKING| +VDAD REPORT|REPORT VDAD| +CLOSER REPORT|INFORME CLOSER| +SEARCH FOR A LEAD|RICERCA CONTATTI| +GROUP HOURLY|GRUPO POR HORA| +User Number|Numero Utente| +Full Name|Nome Completo| +User Level|Livello Utente| +User Group|Gruppo Utente| +ADD A NEW CAMPAIGN|NUOVA CAMPAGNA| +ADD A NEW INBOUND GROUP|NUOVO GRUPPO INBOUND| +ADD NEW USERS GROUP|NUOVO GRUPPO UTENTI| +Campaign ID|ID Campagna| +Campaign Name|Nome Campagna| +Park Extension|Extension Del Parking| +Park Filename|Nombre de fichero Del Parking| +Web Form|Web Form| +Allow Closers|Permitir Closers| +Hopper Level|Livello Coda Chiamate| +Auto Dial Level|Livello Auto Dial| +Next Agent Call|Operatore Da Scegliere Per La Chiamata Successiva| +Local Call Time|Orario Chiamate| +Voicemail|Casella Vocale| +SUBMIT|INVIA| +List ID|ID Lista| +List Name|Nome Lista| +Campaign|Campagna| +Group ID|ID Gruppo| +Group Name|Nome Gruppo| +Group Color|Colore Gruppo| +Fronter Display|Mostrar Fronter| +User ID Start|Inizio ID Utente| +Number of Lines|Numero di Linee| +External Extension|Numero Di Interno Remoto| +Inbound Groups|Gruppi Inbound| +Group: |Gruppo: | +Description: |Descrizione: | +USER ADDED|UTENTE AGGIUNTO| +CAMPAIGN ADDED|CAMPAGNA AGGIUNTA| +CAMPAIGN STATUS ADDED|STATO PERSONALIZZATO PER CAMPAGNA AGGIUNTO| +CAMPAIGN HOT KEY ADDED|HOTKEY AGGIUNTA| +LIST ADDED|LISTA AGGIUNTA| +GROUP ADDED|GRUPPO AGGIUNTO| +REMOTE AGENTS ADDED|OPERATORE REMOTO AGGIUNTO| +USER GROUP ADDED|GRUPPO UTENTI AGGIUNTO| +USER MODIFIED|UTENTE MODIFICATO| +GROUP MODIFIED|GRUPPO MODIFICATO| +CAMPAIGN MODIFIED|CAMPAGNA MODIFICATA| +LIST MODIFIED|LISTA MODIFICATA| +USER GROUP MODIFIED|GRUPPO UTENTI MODIFICATO| +RESETTING LIST-CALLED-STATUS|RESET ESITI CONTATTI DELLA LISTA CHIAMATI| +Dial status |Esito Chiamata | +List Order|Ordine Lista| +Hopper Level|Livello Coda Chiamate| +Force Reset of Hopper|Forza Il Reset Della Coda Chiamate| +Dial Timeout|Timeout Chiamata| +Dial Prefix|Prefisso Chiamata| +Campaign CallerID|CallerID della Campagna| +Campaign VDAD exten|Exten VDAD de La campaña| +Campaign Rec exten|Interno Registrazioni Per Questa Campagna| +Campaign Recording|Registrazioni Per Questa Campagna| +Campaign Rec Filename|Nome Registrazioni Per Questa Campagna| +LISTS WITHIN THIS CAMPAIGN|LISTE IN QUESTA CAMPAGNA| +LIST ID|ID LISTA| +LIST NAME|NOME LISTA| +>ACTIVE<|>ATTIVO<| +This campaign has |Questa campagna ha | +active lists and |liste attive e | +inactive lists|lista inattive| +leads to be dialed in those lists|contatti da chiamare in queste liste| +leads in the dial hopper|contatti nella coda chiamate| +>STATUS<|>ESITO<| +>DESCRIPTION<|>DESCRIZIONE<| +>SELECTABLE<|>SELEZIONABILE<| +>DELETE<|>CANCELLA<| +ADD NEW CUSTOM CAMPAIGN STATUS|AGGIUNGI NUOVO ESITO PERSONALIZZATO PER CAMPAGNA| +Selectable: |Selezionabile: | +value=ADD|value=ADD| +CUSTOM HOT KEYS WITHIN THIS CAMPAIGN|HOT KEY PERSONALIZZATE PER QUESTA CAMPAGNA| +>HOT KEY<|>HOT KEY<| +ADD NEW CUSTOM CAMPAIGN HOT KEY|AGGIUNGI NUOVA HOT KEY PERSONALIZZATA PER QUESTA CAMPAGNA| +Hot key: |Hot Key: | +Basic View|Vista Generale| +Detail View|Vista Dettagliata| +MODIFY A LISTS RECORD|MODIFICA I DATI DELLA LISTA| +Reset Lead-Called-Status for this list|Resetta questa lista allo stato di `contatti non chiamati`| +STATUSES WITHIN THIS LIST|ESITI IN QUESTA LISTA| +>CALLED<|>CHIAMATI<| +>NOT CALLED<|>NON CHIAMATI<| +>SUBTOTALS<|>SUBTOTALI<| +>SUBTOTAL<|>SUBTOTALE<| +TIME ZONES WITHIN THIS LIST|FUSI ORARI IN QUESTA LISTA| +GMT OFFSET NOW|FUSO ORARIO ATTUALE| +local time|ora locale| +List Last Call Date:|Data Ultima Telefonata| +>TOTAL<|>TOTALE<| +CALLED COUNTS WITHIN THIS LIST|CHIAMATE EFFETTUATE IN QUESTA LISTA| +MODIFY A GROUPS RECORD|MODIFICAR UN REGISTRO DE LOS GRUPOS| +MODIFY A REMOTE AGENTS ENTRY|MODIFICAR UNA ENTRADA DE LOS AGENTES REMOTOS| +numbers only|solo cifre| +dial plan number dialed to reach agents|numero del dialplan usato per raggiungere gli operatori| +MODIFY A USERS GROUP ENTRY|MODIFICA UN GRUPPO UTENTI| +no spaces or punctuation|senza spazi e punteggiatura| +description of group|Descrizione del gruppo| +SEARCH FOR A USER|RICERCA UTENTE| +SEARCH RESULTS|RISULTATI RICERCA| +>STATS<|>STATISTICHE<| +USER LISTINGS|ELENCO UTENTI| +CAMPAIGN LISTINGS|ELENCO CAMPAGNE| +LIST LISTINGS|ELENCO LISTE| +INBOUND GROUP LISTINGS|ELENCO GRUPPI INBOUND| +REMOTE AGENTS LISTINGS|ELENCO OPERATORI REMOTI| +USER GROUPS LISTINGS|ELENCO GRUPPI UTENTI| +script runtime|tempo di esecuzione script| +Hopper List|Coda Chiamate| +Live Current Hopper List|Coda Contatti Da Chiamare In Tempo Reale| +Total leads in hopper right now|Totale Contatti Nella Coda Chiamate In Questo Istante| +Server Stats|Statistiche Server| +Total Calls placed from this Campaign: |Totale Chiamate Effettuate Per Questa Campagna:| +Average Call Length for all Calls in seconds:|Durata Media per Tutte Le Chiamate In Secondi:| +Total DROP Calls: |Totale Chiamate ABBATTUTE:| +Average Length for DROP Calls in seconds: |Durata Media Chiamate ABBATTUTE in secondi: | +Total NA calls -Busy,Disconnect,RingNoAnswer: |Totale Chiamate Senza Risposta - occupato, disconnesso, fuori posto...: | +Average Call Length for NA Calls in seconds: |Durata Media Chiamate Senza Risposta in secondi: | +---------- DROPS|---------- ABBATTUTE| + AUTO-DIAL NO ANSWERS| NESSUNA RISPOSTA AUTO-DIAL| +---------- AGENT STATS|---------- STATISTICHE OPERATORE| +---------- TIME STATS|---------- STATISTICHE TEMPO| +USER |UTENTE | +Average Wait time between calls|Tempo Medio di Attesa Tra Due Chiamate| +TOTAL Agents:|TOTALE Operatori:| +Percent of DROP Calls taken out of Answers:|Percentuale Di Chiamate ABBATTUTE Su Chiamate Con Risposta:| +TIME M|TEMPO M| +AVRG M|MEDIA M| +Agents Time On Calls |Tempo Conversazione Operatori| +agents logged in on server|Operatori collegati al server| +Paused agents|Operatori in pausa| +5 minutes or more on call|5 o piu` minuti in conversazione| +Over 10 minutes on call|Oltre 10 minuti in conversazione| + NO AGENTS ON CALLS | NESSUN OPERATORE IN CONVERSAZIONE | +calls being placed on server|chiamate effettuate dal server| +LIVE CALL WAITING|CHIAMATA IN ATTESA| + NO LIVE CALLS WAITING | NESSUNA CHIAMATA IN ATTESA| +START OVER|RICOMINCIA| +Lead Loader Module|Modulo Caricamento Contatti| +Current file status|Stato attuale del file| +Load leads from this file|Carica Contatti Da Questo File| +Answering Machine Message|Messaggio Segreteria Telefonica| +Processing |Elaborazione in corso| +TALK TIME AND STATUS|TEMPO DI CHIAMATA E ESITO| +>COUNT<|>CUENTA<| +>HOURS:MINUTES<|>ORE:MINUTI<| +TOTAL CALLS |TOTALE CHIAMATE | +LOGIN/LOGOUT TIME|TIEMPO LOGIN/LOGOUT| +>EVENT <|>EVENTO <| +> CAMPAIGN<|> CAMPAGNA<| +CAMPAIGN: |CAMPAGNA: | +LAST 50 CALLS|ULTIME 50 CHIAMATE| +VICIDIAL REMOTE: Call Disposition|REMOTE VICIDIAL: disposicion De la Llamada| +Call has been dispositioned|La Chiamata Ha Avuto Un Esito| +Close This Window|Chiudi Questa Finestra| +Call information|Informazioni Chiamata| +lead lookup FAILED for lead_id|las operaciones de búsqueda del plomo FALLARON para el lead_id| +DISPO CALL|ESITO CHIAMATA| +>Address |>Indirizzo | +>City |>Citta` | +>State:|>Estado:| + Postal Code:| CAP:| +>Province |>Provincia | +>Country |>Stato | +>Alt Phone |>Numero Alt | +>Email |>Email | +>Security |>Seguridad| +>Comments |>Note | +>Disposition:|>Esito:| +Group Hourly Stats|Statistiche Orarie Del Gruppo| +TSR HOUR COUNTS|DATI ORARI| +Lead Search|Ricerca Contatti| +Lead Lookup|Operaciones de búsqueda del Lead| +Please enter a:|Per favore, inserisci:| +a Home Phone Number:|un numero di telefono:| +vendor lead code|co`digo del vendedor del Lead| +a lead ID:|un ID Contatto:| +>NEW SEARCH<|>NUOVA RICERCA<| +Lead record modification|Registro del Lead modificado| +information modified|informazione modificata| +CALLS TO THIS LEAD|CHIAMATE VERSO QUESTO CONTATTO| +VDAD Closer Stats|Estadísticas de VDAD Closer| +Auto-dial Closer Stats|Estadísticas de Auto-dial en CLOSER| +VICIDIAL REMOTE AGENTS|VICIDIAL, AGENTES REMOTOS| +INBOUND STATS|STATISTICHE INBOUND| +REMOTE AGENTS ERROR - Please go back and look at the data you entered|ERROR AGENTES REMOTOS – Por favor, vuelva atrás y compruebe los datos que introdujo| + - WAITING - |- IN ATTESA -| +Remote Agent inbound stats |Stats de entrada del agente alejado| +Total calls taken |Llamadas totales tomadas | +Total talk time on |Tiempo total de conversacion| +Call list for |Lista la llamada para | + NO CALLS ON THIS DAY |NESSUNA CHIAMATA IN QUESTO GIORNO| +Scripts|Script| +Script:|Script:| +Get Call Launch|Esegui all`avvio della telefonata| +not used currently|non utilizzato attualmente| +VERSION|VERSIONE| +BUILD|BUILD| +REPORTS|REPORT| + CAMPAIGNS| CAMPAGNE| +LISTS|LISTE| +SCRIPTS|SCRIPT| +FILTERS|FILTRI| +IN-GROUPS|GRUPPI INBOUND| +USER GROUPS|GRUPPI UTENTI| +REMOTE AGENTS|OPERATORI REMOTI| +Column|Colonna| + PERFORMANCE| PERFORMANCE| +SERVER |SERVER | +### END translation phrases through 1.1.11 release ### +Drop Call Seconds -<\/B> 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|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, so`lo se aplica a las llamadas desalida| +Safe Harbor Message -<\/B> 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|seguro puerto mensaje - si fijar y juego uno mensaje clientedespue`s gota llamar segundo descanso ser alcanzar sin ser transferiruno agente. _ este fijar eliminar sending uno voicemail caja si esteser fijar y| +Safe Harbor Exten -<\/B> This is the dial plan extension that the desired Safe Harbor audio file is located at on your server|seguro puerto Exten - este ser dial plan extension que desear seguropuerto audio archivo ser localizar en en su servidor| +Drop Message -<\/B> 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|Mensaje de la gota - si el sistema a Y juega un mensaje al clientedespue`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| +Drop Exten -<\/B> This is the dial plan extension that the desired Dropped call audio file is located at on your server|Gota Exten - esta es la extension dial plan que el archivo audiocaído deseado de la llamada está situado en en su servidor| +Call Time ID -<\/B> 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|Identificacio`n del tiempo de la llamada - este es el nombre corto deuna definicio`n del tiempo de la llamada de Vicidial. este necesitaser un identificador único. No utilice ningunos espacios opuntuacio`n para los caracteres de este máximo 10 del campo, mínimode 2 caracteres| +Call Time Name -<\/B> 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|Nombre del tiempo de la llamada - este es un nombre más descriptivode la definicio`n del tiempo de la llamada. este es un resumen cortode los caracteres del máximo 30 de la definicio`n del tiempo de lallamada, mínimo de 2 caracteres| +Call Time Comments -<\/B> 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|El tiempo de la llamada comenta - aquí es donde usted puede poner loscomentarios para una definicio`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| +Default Start and Stop Times -<\/B> 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|Tiempos del comienzo y de parada del defecto - este es el tiempo dedefecto paran que el llamar será permitido que sea comenzado o dentrode esta definicio`n del tiempo de la llamada si la hora de salida dela di`a-de-$$$-SEMANA no se define. 0 es medianoche. Evitar el llamarfijo` totalmente este campo a 2400 y fijo` el tiempo de parada deldefecto a 2400. Permitir el llamar 24 horas al día fijo` la hora desalida a 0 y el tiempo de parada a 2400| +Weekday Start and Stop Times -<\/B> 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|Tiempos del comienzo y de parada del día laborable - estos son lostiempos de encargo por el día que se puede fijar para la definicio`ndel tiempo de la llamada que las mismas reglas se aplican como con lostiempos del comienzo y de parada del defecto| +State Call Time Definitions -<\/B> This is the list of State specific call time definitions that are followed in this Call Time Definition|Definiciones del tiempo de la llamada del estado - esta es la listade las definiciones específicas del tiempo de la llamada del estadoque se siguen en esta definicio`n del tiempo de la llamada| +State Call Time State -<\/B> 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|Estado del tiempo de la llamada del estado - este es el co`digo dedos letras para el estado que esta definicio`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 e`l así como todos los plomos quetienen dos co`digos del estado de la letra en ellos| +Delete Call Times -<\/B> This option allows the user to be able to delete vicidial call times records and vicidial state call times records from the system|Tiempos de la llamada de la cancelacio`n - esta opcio`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| +Modify Call Times -<\/B> 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|Modifique los tiempos de la llamada - esta opcio`n permite que elusuario visio`n y modifique los expedientes de los tiempos de lallamada y de los tiempos de la llamada del estado. Un usuario nonecesita esta opcio`n permitida si necesitan solamente cambiar laopcio`n de los tiempos de la llamada en la pantalla de las campañas| +Wrap Up Seconds -<\/B> 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|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 disposicion| +Wrap Up Message -<\/B> This is a campaign-specific message to be displayed on the wrap up screen if wrap up seconds is set|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| +You are not authorized to view this page. Please go back|Le no autorizan a visio`n esta página. Vaya por favor detrás| +Day and time options will appear once you have created the Call Time Definition|Las opciones del día y del tiempo aparecerán una vez que usted hayacreado la definicio`n del tiempo de la llamada| +State Call Time ID, name and state must be at least 2 characters in length|Indique que identificacio`n del tiempo de la llamada, nombre y estadodebe ser por lo menos 2 caracteres en longitud| +Call Time ID and name must be at least 2 characters in length|La identificacio`n del tiempo de la llamada y el nombre deben ser porlo menos 2 caracteres en longitud| +Active State Call Time Definitions for this Record|Definiciones activas del tiempo de la llamada del estado para estoexpediente| +there is already a call time entry with this ID|hay ya una entrada de tiempo de la llamada con esta identificacio`n| +CALL TIMES USING THIS STATE CALL TIME|TIEMPOS DE LA LLAMADA USANDO ESTE TIEMPO DE LA LLAMADA DEL ESTADO| +STATE CALL TIME DEFINITION NOT ADDED|DEFINICIo`N DEL TIEMPO DE LA LLAMADA DEL ESTADO NO AGREGADA| +DELETE THIS STATE CALL TIME DEFINITION|SUPRIMA ESTA DEFINICIo`N DEL TIEMPO DE LA LLAMADA DEL ESTADO| +Modify Call Time State Definitions List|Modifique La Lista De las Definiciones Del Estado Del Tiempo De laLlamada| +CALL TIME DEFINITION NOT ADDED|DEFINICIo`N DEL TIEMPO DE LA LLAMADA NO AGREGADA| +DELETE THIS CALL TIME DEFINITION|ELIMINA QUESTO ORARIO CHIAMATE| +short description of the call time|breve descrizione dell`orario chiamate| +CAMPAIGNS USING THIS CALL TIME|CAMPAGNE CHE UTILIZZANO QUESTO ORARIO| +STATE CALL TIME NOT MODIFIED|TIEMPO DE LA LLAMADA DEL ESTADO NO MODIFICADO| +CALL TIME NOT MODIFIED|TIEMPO DE LA LLAMADA NO MODIFICADO| +STATE CALL TIME MODIFIED|TIEMPO DE LA LLAMADA DEL ESTADO MODIFICADO| +CALL TIME MODIFIED|TIEMPO DE LA LLAMADA MODIFICADO| +Default Start:|Inizio di Default:| +Default Stop:|Fine di Default:| +Sunday Start:|Inizio Domenica:| +Sunday Stop:|Fine Domenica:| +Monday Start:|Inizio Lunedi:| +Monday Stop:|Fine Lunedi:| +Tuesday Start:|Inizio Martedi:| +Tuesday Stop:|Fine Martedi:| +Wednesday Start:|Inizio Mercoledi:| +Wednesday Stop:|Fine Mercoledi:| +Thursday Start:|Inizio Giovedi:| +Thursday Stop:|Fine Giovedi:| +Friday Start:|Inizio Venerdi:| +Friday Stop:|Fine Venerdi:| +Saturday Start:|Inizio Sabato:| +Saturday Stop:|Fine Sabato:| +State Rule Added|Regla Del Estado Agregada| +State Rule Removed|Regla Del Estado Quitada| +STATE CALL TIME LISTINGS|ELENCO ORARI CHIAMATE PER STATO| +CALL TIME LISTINGS|ELENCO ORARI CHIAMATE| +STATE CALL TIME ADDED|ORARIO CHIAMATE PER STATO AGGIUNTO| +CALL TIME ADDED|ORARIO CHIAMATE AGGIUNTO| +Drop Call Seconds|Secondi Abbattimento Telefonata| +Use Safe Harbor Message|Riproduci Messaggio Prima Di Abbattere La Telefonata| +Safe Harbor Exten|Interno Messaggio Telefonata Abbattuta| +Use Drop Message|Utilice El Mensaje De la Gota| +Drop Exten|Gota Exten| +SIP Listen Version|El Sip Escucha Versio`n| +Add New Call Time|Agregue El Nuevo Tiempo De la Llamada| +Add New State Call Time|Agregue El Nuevo Tiempo De la Llamada Del Estado| +New Call Time Addition|Nueva Adicio`n Del Tiempo De la Llamada| +New State Call Time Addition|Nueva Adicio`n Del Tiempo De la Llamada Del Estado| +Modify Call Time|Modifique El Tiempo De la Llamada| +MODIFY A CALL TIME|MODIFICA ORARIO CHIAMATE| +Modify State Call Time|Modifique El Tiempo De la Llamada Del Estado| +MODIFY A STATE CALL TIME|_ MODIFICAR Uno ESTADO LLAMAR TIEMPO| +Delete State Call Time|Tiempo De la Llamada Del Estado De la Cancelacio`n| +State Call Times|Tiempos De la Llamada Del Estado| +State Call Time ID|Identificacio`n Del Tiempo De la Llamada Del Estado| +State Call Time Name|_ Estado Llamar Tiempo Nombre| +State Call Time Comments|Comentarios Del Tiempo De la Llamada Del Estado| +STATE CALL TIME NOT DELETED|TIEMPO DE LA LLAMADA DEL ESTADO NO SUPRIMIDO| +CALL TIME DELETION COMPLETED|_ LLAMAR TIEMPO CANCELADURA TERMINAR| +STATE CALL TIME DELETION COMPLETED|CANCELADURA DEL TIEMPO DE LA LLAMADA DEL ESTADO TERMINADA| +CALL TIME NOT DELETED|TIEMPO DE LA LLAMADA NO SUPRIMIDO| +Call Time ID must be at least 2 characters in length|_ llamar tiempo identificacio`n deber ser por lo menos 2 carácter enlongitud| +STATE CALL TIME DELETION CONFIRMATION|CONFIRMACIo`N DE LA CANCELADURA DEL TIEMPO DE LA LLAMADA DEL ESTADO| +CALL TIME DELETION CONFIRMATION|CONFIRMACIo`N DE LA CANCELADURA DEL TIEMPO DE LA LLAMADA| +Call Times|Orari Chiamata| +CALL TIMES|ORARI CHIAMATA| +SHOW CALL TIMES|ELENCA ORARI CHIAMATE| +ADD NEW CALL TIME|AGGIUNGI ORARIO CHIAMATE| +SHOW STATE CALL TIMES|DEMUESTRE LOS TIEMPOS DE LA LLAMADA DEL ESTADO| +ADD NEW STATE CALL TIME|AGREGUE EL NUEVO TIEMPO DE LA LLAMADA DEL ESTADO| +Call Time ID|ID Orario Chiamate| +Call Time Name|Nome Orario Chiamate| +Call Time Comments|Note Orario Chiamate| +short description of the call time|breve descrizione dell`orario nel quale chiamare| +HIDE|NASCONDI| +SHOW|MOSTRA| +Show Dialable Leads Count|Demuestre La Cuenta De los Plomos De Dialable| +Dialable Lead Count|Cuenta Del Plomo De Dialable| +TEST ON CAMPAIGN|PRUEBE EN CAMPAÑA| +Wrap Up Seconds:|Secondi Riposo Operatore:| +Wrap Up Message:|Messaggio Riposo Operatore:| +Alt Number Dialing|El Marcar Del Número Del Alt| +no active lists selected for this campaign|nessuna lista attiva selezionata per questa campagna| +Real-Time Screen|Schermata Tempo Reale| +Allowable Inbound Groups -<\/B> 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|Grupos de entrada permisibles - Para campañas MÁS CERCANAS solamente. Aquí es donde usted selecciona a grupos de entrada que usted quisiera que los agentes en esta campaña MÁS CERCANA pudieran tomar llamadas de. Es importante que las campañas de entrada-de salida MEZCLADAS seleccionen solamente a los grupos de entrada que se utilizan para los agentes en esta campaña. Las llamadas que vienen en los grupos de entrada seleccionados aquí serán contadas como llamadas activas para una campaña mezclada incluso si todos los agentes en la campaña no se entran para recibir llamadas de todos esos grupos de entrada seleccionados| +Allowed Inbound Groups|Grupos De entrada Permitidos| +ADD NUMBER TO DNC|AGREGUE EL NÚMERO A DNC| +ADD A NUMBER TO THE DNC LIST|AGGIUNGI UN NUMERO ALLA LISTA DA NON CHIAMARE| +Add New DNC|Agregue DNC Nuevo| +Phone Number|Numero di Telefono| +VICIDIAL DNC List -<\/B> 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|Lista de VICIDIAL DNC - esto no llama la lista contiene cada plomo quese ha fijado a un estado de DNC en el sistema. A trave`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| +DNC NOT ADDED - This phone number is already in the Do Not Call List|DNC NO AGREGADO - este número de telefono está en no llama ya lalista| +DNC ADDED|DNC AGREGADO| +Use Internal DNC List -<\/B> 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|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 telefono 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| +Use Internal DNC List|Controlla In Lista Contatti Da NON CHIAMARE| +Campaign CallerID -<\/B> 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|Campaña CallerID - este campo permite enviar de un número de encargodel callerid en las llamadas de salida. este es el número quedemostraría para arriba en el callerid de la persona que usted estállamando. El defecto es DESCONOCIDO. Si usted está utilizando el T1 oEß para marcar hacia fuera esta opcio`n está solamente disponible siusted está utilizando PRIs - el ISDN Tß o Eß que tenga lacaracterística de encargo del callerid girada, este no trabajarácon los circuitos del service(RBS) del Robar-pedacito. Esto Tambientrabajará a trave`s los abastecedores de la mayoría de los troncosde VOIP(SIP o de IAX) que permiten el callerID de salida dinámico. ElcallerID de encargo se aplica solamente a las llamadas puestas para lacampaña de VICIDIAL directamente, cualquier tercer persona llama olas transferencias no enviarán el callerID de encargo. NOTA: A vecesel poner DESCONOCIDO o PRIVADO en el campo rendirá enviar de sunúmero del callerID del defecto por su portador con las llamadas.Usted puede desear probar esto y poner 0000000000 en el campo delcallerid en lugar de otro si usted no desea enviarle CallerID| +Login -<\/B> The login used for the phone user to login to the client applications|conexion - la conexion usada para el usuario del telefono a laconexion a los usos del cliente| +Password -<\/B> The password used for the phone user to login to the client applications|Contraseña - la contraseña usada para el usuario del telefono a laconexion a los usos del cliente| +New Campaign Lead Recycle Addition|El Nuevo Plomo De la Campaña Recicla La Adicio`n| +Modify Campaign Lead Recycle|Modifique El Plomo De la Campaña Reciclan| +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|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 e`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| +CAMPAIGN LEAD RECYCLE NOT ADDED - there is already a lead-recycle for this campaign with this status|El PLOMO de la CAMPAÑA RECICLA NO AGREGADO - hay ya unconducir-reciclaje para esta campaña con este estado| +status must be between 1 and 6 characters in length|el estado debe estar entre 1 y 6 caracteres en longitud| +attempt delay must be at least 120 seconds|la tentativa retrasa debe ser por lo menos 120 segundos| +maximum attempts must be from 1 to 10|las tentativas máximas deben ser a partir la 1 a 10| +CAMPAIGN LEAD RECYCLE ADDED|EL PLOMO DE LA CAMPAÑA RECICLA AGREGADO| +CAMPAIGN LEAD RECYCLE NOT DELETED|EL PLOMO DE LA CAMPAÑA RECICLA NO SUPRIMIDO| +CAMPAIGN LEAD RECYCLE DELETED|EL PLOMO DE LA CAMPAÑA RECICLA SUPRIMIDO| +Delete Lead Recycle|El Plomo De la Cancelacio`n Recicla| +LEAD RECYCLING WITHIN THIS CAMPAIGN|CONTATTI DA RICICLARE IN QUESTA CAMPAGNA| +ATTEMPT DELAY|RITARDO NUOVO TENTATIVO| +ATTEMPT MAXIMUM|MASSIMO TENTATIVI| +ADD NEW CAMPAIGN LEAD RECYCLE|AGGIUNGI NUOVO ESITO DA RICICLARE| +Attempt Delay|Intervallo Tra Tentativi| +Attempt Maximum|Massimo Tentativi| +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|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 puedeTambien especificar una extension de encargo despue`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| +System Performance -<\/B> 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|Funcionamiento del sistema - fijar esta opcio`n a Y permitirá laregistracion 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| +Server Logs -<\/B> 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|Registros del servidor - fijar esta opcio`n a Y permitirá laregistracion 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, Tambien laregistracion de la pantalla del asterisco será lisiado si esto sefija a N cuando se comienza el asterisco. El defecto es Y| +AGI Output -<\/B> 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|AGI hecho salir - fijar esta opcio`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| +Recording Delay -<\/B> 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|La registracion retrasa - para la grabacion de ALLCALLS y deALLFORCE solamente. Esta voluntad del ajuste retrasa comenzar de lagrabacion en todas las llamadas para el número de los segundosespecificados en este campo. El defecto es 0| +Omit Phone Code -<\/B> 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|Omita el co`digo del telefono - 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| +Campaign Recording -<\/B> 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|grabacion de la campaña - este menú permite que usted elija que`nivel de la grabacion se permite en esta campaña. NUNCAinhabilitará la grabacion en el cliente. ONDEMAND es el defecto ypermite que el agente comience y pare a registrar según lonecesitado. ALLCALLS comenzará la grabacion en el cliente siempreque una llamada se envíe a un agente. ALLFORCE comenzará lagrabacion en el cliente siempre que una llamada se envíe a un agenteque no da al agente ninguna opcio`n para parar el registrar. ParaALLCALLS y ALLFORCE hay una opcio`n para utilizar la grabacionretrasa para reducir en grabaciones y carga de sistema muy cortas delrecude| +Dial Method -<\/B> 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|Me`todo del dial - Este campo es la manera de definir co`mo el marcar debe ocurrir. Si el MANUAL entonces el auto_dial_level es bloqueado en 0 a menos que se cambie el me`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 despue`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 me`todos. Usted no puede cambiar el nivel auto del dial si usted está en cualesquiera de los me`todos del dial del ADAPTAR. Solamente el sintonizador puede cambiar el nivel del dial cuando en modo que marca profe`tico| +Available Only Tally -<\/B> 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|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| +Drop Percentage Limit -<\/B> 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|Límite del porcentaje de la gota - este campo es donde usted fijo` ellímite del porcentaje de llamadas caídas que usted quisiera mientrasque usaba un me`todo adaptante-profe`tico del dial, NO MANUAL o delCOCIENTE| +Maximum Adapt Dial Level -<\/B> 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|El máximo adapta el dial llano - este campo es donde usted fijo` ellímite del límite al numbr de líneas que usted quisiera marcado poragente mientras que usaba un me`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| +Latest Server Time -<\/B> 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|El tiempo más último del servidor - este campo es utilizadosolamente por el me`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 co`mo agresivamente al dial cerca cuánto tiempo usted tienehasta que usted será el llamar acabado| +Adapt Intensity Modifier -<\/B> 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|Adapte el modificante de la intensidad - este campo se utiliza paraajustar la intensidad profe`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 me`todos del dial del MANUALo del COCIENTE| +Dial Level Difference Target -<\/B> 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|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 me`todos del dial del MANUAL o del COCIENTE| +System Performance|Performance Di Sistema| +Server Logs|Log Server| +AGI Output|Salida de AGI| +Recording Delay|Ritardo Registrazione| +Omit Phone Code|Ometti Prefisso Telefono| +Campaign Recording|grabacion De la Campaña| +Dial Method|Metodo Chiamata| +Available Only Tally|Conta Solo Disponibili| +Drop Percentage Limit|Limita Percentuale Abbattuti| +Maximum Adapt Dial Level|Livello Auto-Dial Massimo In Modalita` Adapt| +Latest Server Time|Ultimo Orario Chiamate| +Adapt Intensity Modifier|Modifica Intensita` Adapt Auto-Dial| +Click here to see a VDAD report for this campaign|Clicca qui per vedere il report VDAD per questa campagna| +Dial Level Difference Target|Blanco Llana De la Diferencia Del Dial| +### START translations for 2.0.2 release ### +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|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 opcio`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| +VICIDIAL Balance Dialing -<\/B> 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|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| +VICIDIAL Balance Offlimits -<\/B> 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|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| +Allowed Campaigns -<\/B> 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|Campañas permitidas - esta es una lista seleccionable de lascampañas a las cuales los miembros de este grupo de usuario puedenabrirse una sesio`n. La opcio`n de ALL-CAMPAIGNS permite que losusuarios en este grupo consideren y se abran una sesio`n a cualquiercampaña en el sistema| +VICIDIAL SERVER TRUNK RECORD NOT ADDED|EXPEDIENTE DEL TRONCO DEL SERVIDOR DE VICIDIAL NO AGREGADO| +there is already a server-trunk record for this campaign|hay ya un expediente del servidor-tronco para esta campaña| +the number of vicidial trunks is too high|el número de troncos vicidial es demasiado alto| +VICIDIAL SERVER TRUNK RECORD ADDED|EL EXPEDIENTE DEL TRONCO DEL SERVIDOR DE VICIDIAL AGREGo`| +VICIDIAL SERVER TRUNK RECORD NOT MODIFIED|EXPEDIENTE DEL TRONCO DEL SERVIDOR DE VICIDIAL NO MODIFICADO| +VICIDIAL SERVER TRUNK RECORD MODIFIED|EXPEDIENTE DEL TRONCO DEL SERVIDOR DE VICIDIAL MODIFICADO| +VICIDIAL SERVER TRUNK RECORD NOT DELETED|EXPEDIENTE DEL TRONCO DEL SERVIDOR DE VICIDIAL NO SUPRIMIDO| +VICIDIAL SERVER TRUNK RECORD DELETED|EXPEDIENTE DEL TRONCO DEL SERVIDOR DE VICIDIAL SUPRIMIDO| +campaign must be between 3 and 8 characters in length|la campaña debe estar entre 3 y 8 caracteres en longitud| +server_ip delay must be at least 7 characters|el server_ip retrasa debe ser por lo menos 7 caracteres| +trunks must be a digit from 0 to 9999|los troncos deben ser un dígito a partir de la 0 a 9999| +VICIDIAL Balance Dialing|El Marcar Del Balance de VICIDIAL| +VICIDIAL Balance Offlimits|Balance Offlimits de VICIDIAL| +ADDING NEW SERVER VICIDIAL TRUNK RECORD|ADICIo`N DEL NUEVO EXPEDIENTE DEL TRONCO DEL SERVIDOR VICIDIAL| +ADD NEW SERVER VICIDIAL TRUNK RECORD|AGREGUE EL NUEVO EXPEDIENTE DEL TRONCO DEL SERVIDOR VICIDIAL| +MODIFY SERVER VICIDIAL TRUNK RECORD|MODIFIQUE EL EXPEDIENTE DEL TRONCO DEL SERVIDOR VICIDIAL| +DELETE SERVER VICIDIAL TRUNK RECORD|EXPEDIENTE DEL TRONCO DEL SERVIDOR VICIDIAL DE LA CANCELACIo`N| +VICIDIAL TRUNKS FOR THIS SERVER|TRONCOS DE VICIDIAL PARA ESTE SERVIDOR| + RESTRICTION | RESTRICCIo`N | + TRUNKS | TRONCOS | +Emergency VDAC Jam Clear|Claro Del Atasco De la Emergencia VDAC| +VDAC NOT CLEARED FOR CAMPAIGN|VDAC NO DESPEJo` PARA LA CAMPAÑA| +LAST VDAC RECORD CLEARED FOR CAMPAIGN|DE REGISTRO PASADO DE VDAC DESPEJADA PARA LA CAMPAÑA| +VDAC CLEAR CONFIRMATION|CONFIRMACIo`N CLARA DE VDAC| +Click here to delete the oldest LIVE record in VDAC for|Chasque aquí para suprimir el más viejo VIVEN expediente en VDACpara| +Allowed Campaigns|Campagne Permesse| +USERS CAN VIEW ANY CAMPAIGN|GLI UTENTI POSSONO VISUALIZZARE QUALSIASI CAMPAGNA| +Campaign Not Allowed|Campagna Non Autorizzata| +### START translations for 2.0.3 release ### +ADAPT OVERRIDE|FORZA LIVELLO ANCHE CON MODALITA` ADAPT| +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.|El checkbox de la INVALIDACIo`N del ADAPTAR permite que usted fuerceun nuevo nivel del dial aunque el me`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.| +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|Hay dos opciones especiales que usted puede utilizar conjuntamente conel número de telefono alterno que marca, ALTPH2 de HotKey - el dialcaliente del telefono 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| +Concurrent Transfers|Transferencias Concurrentes| +Concurrent Transfers -<\/B> 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|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 AUTOMo`VIL. Este campo no es utilizado por el me`todo MANUAL del dial| +Auto Alt-Number Dialing -<\/B> 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|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 me`todos del dial cuando no hay contacto en elnúmero de telefono principal para un plomo, los estados del NA, deB, de la C.C. y de N. Este ajuste no es utilizado por el me`todoMANUAL del dial| +Auto Alt-Number Dialing|El Marcar Auto Del Alt-Nu`mero| +View Reports -<\/B> This option allows the user to view the VICIDIAL reports.|La visio`n divulga - esta opcio`n permite que el usuario visio`n losinformes de VICIDIAL.| +Modify Sections -<\/B> 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|Modifique las secciones - estas opciones permiten que el usuariovisio`n y modifique cada uno los expedientes de las secciones. Si elsistema a 0, el usuario puede considerar la lista de la seccio`n, perono el detalle o la pantalla de la modificacio`n de un expediente enesa seccio`n| +VICIDIAL AUTO ALT DIAL STATUSES|ESTADOS AUTO DEL DIAL DE VICIDIAL ALT| +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|Si se fija el campo que marca del Alt-Nu`mero auto, despue`s losplomos que son dispositioned bajo estos estados del dial del alt delautomo`vil tendrán su alt_phone y-o los campos address3 marcadosdespue`s de que cualesquiera de estos ninguno-contesten a estados sefijan| +AUTO ALT NUMBER DIALING FOR THIS CAMPAIGN|ESITI PER I QUALI CHIAMARE I NUMERI ALTERNATIVI| +ADD NEW AUTO ALT NUMBER DIALING STATUS|AGGIUNGI NUOVO ESITO CHIAMA-AUTO-NUM-ALTERN| +AUTO ALT DIAL STATUS NOT ADDED|ESTADO AUTO DEL DIAL DEL ALT NO AGREGADO| +there is already an entry for this campaign with this status|hay ya una entrada para esta campaña con este estado| +AUTO ALT DIAL STATUS ADDED|ESTADO AUTO DEL DIAL DEL ALT AGREGADO| +AUTO ALT DIAL STATUS NOT DELETED|ESTADO AUTO DEL DIAL DEL ALT NO SUPRIMIDO| +AUTO ALT DIAL STATUS DELETED|ESTADO AUTO DEL DIAL DEL ALT SUPRIMIDO| +this auto alt dial status is not in this campaign|este estado del dial del alt del automo`vil no está en esta campaña| +New Auto Alt Dial Status|Nuevo Estado Del Dial Del Alt Del Automo`vil| +Delete Auto Alt Dial Status|Estado Auto Del Dial Del Alt De la Cancelacio`n| + Users | Utenti | + Campaigns | Campagne | + Lists | Liste | + Scripts | Script | + Filters | Filtri | + In-Groups | Gruppi Inbound | + User Groups | Gruppi Utenti | + Remote Agents | Operatori Remoti | + Admin | Admin | + Reports | Report | + Show Users | Visualizza Utenti | + Add A New User | Aggiungi Nuovo Utente | + Search For A User | Ricerca Utenti | + Show Campaigns | Visualizza Campagne | + Add A New Campaign | Aggiungi Nuova Campagna | + Real-Time Campaigns Summary | Riepilogo Campagne In Tempo Reale | + Show Lists | Visualizza Liste | + Add A New List | Nuova Lista | + Search For A Lead | Ricerca Contatti | + Add Number To DNC | Aggiungi Numero Alla Lista DNC | + Load New Leads | Carica Nuovi Contatti | + Show Scripts | Visualizza Script | + Add A New Script | Aggiungi Nuovo Script | + Show Filters | Visualizza Filtri | + Add A New Filter | Aggiungi Nuovo Filtro | + Show In-Groups | Visualizza Gruppi Inbound | + Add A New In-Group | Aggiungi Gruppo Inbound | + Show User Groups | Visualizza Gruppi Utenti | + Add A New User Group |Aggiungi Nuovo Gruppo Utente | + Group Hourly Report | Report Orario Per Gruppo | + Show Remote Agents | Visualizza Operatori Remoti | + Add New Remote Agents |Aggiungi Operatore Remoto | + Call Times | Orari Chiamata | + Phones | Telefoni | + Conferences | Conferencias | + Servers | Server | + Show Call Times | Elenca Orari Chiamata | + Add A New Call Time | Nuovo Orario Chiamate | + Show State Call Times | Elenca Orari Chiamata Per Stati | + Add A New State Call Time | Nuovo Orario Chiamate Per Stato | + Show Phones | Visualizza Telefoni | + Add A New Phone | Aggiungi Un Nuovo Telefono | + Show Conferences |Visualizza Conferenze | + Add A New Conference | Aggiungi Conferenza | + Show VICIDIAL Conferences | Visualizza Conferenze VICIDIAL | + Add A New VICIDIAL Conference | Aggiungi Conferenza VICIDIAL | + Show Servers | Visualizza Server | + Add A New Server | Aggiungi Un Nuovo Server | +CallBacks Within User Group|Richiami In Attesa In Questo Gruppo| +USERS WITHIN THIS USER GROUP|UTENTI IN QUESTO GRUPPO| +Modify Users: |Modifica Utenti: | +Modify Campaigns: |Modifica Campagne: | +Modify Lists: |Modifica Liste: | +Modify Scripts: |Modifica Script: | +Modify Filters: |Modifica Filtri: | +Modify In-Groups: |Modifica Gruppi Inbound: | +Modify User Groups: |Modifique A Grupos De Usuario: | +Modify Remote Agents: |Modifica Operatori Remoti: | +Modify Servers: |Modifica Server: | +View Reports: |Visualizza Report: | +You do not have permission to view this page|Non hai l`autorizzazione per accedere a questa pagina| +Lead Time Zone Lookup: |Ricerca Fusi Orari (Solo USA): | +Lead Duplicate Check: |Controlla Contatti Duplicati:| +Agent Pause Codes Active -<\/B> 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|La pausa del agente cifra activo - permite que los agentes seleccionenun co`digo de la pausa cuando chascan encendido el boton de PAUSA envicidial.php. Los co`digos de la pausa son definibles por campaña enel fondo de la pantalla del detalle de la opinio`n de la campaña y sealmacenan en la tabla del vicidial_agent_log. El defecto es N| +AGENT PAUSE CODES|CODICI PAUSA OPERATORE| +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.|Si la pausa del agente cifra el campo activo se fija a activo entonceslos agentes podrá seleccionar de estos co`digos de la pausa cuandochascan encendido el boton de PAUSA en sus pantallas. Estos datosentonces se almacenan en el registro vicidial del agente. El co`digode la pausa debe contener solamente letras y números y ser menos de 7caracteres de largo. El nombre del co`digo de la pausa puede estar nomás de largo de 30 caracteres.| +AGENT PAUSE CODES FOR THIS CAMPAIGN|CODICI PAUSA OPERATORE PER QUESTA CAMPAGNA| +>PAUSE CODES<|>CODICI PAUSA<| +BILLABLE|FATTURABILE| +ADD NEW AGENT PAUSE CODE|NUOVO CODICE PAUSA| +Pause Code: |Codice Pausa: | +Pause Code Name: |Nome Codice Pausa: | +Billable: |Fatturabile: | +New Agent Pause Code|Nuevo Co`digo De la Pausa Del Agente| +Modify Agent Pause Code|Modifique El Co`digo De la Pausa Del Agente| +Delete Agent Pause Code|Co`digo De la Pausa Del Agente De la Cancelacio`n| +AGENT PAUSE CODE NOT ADDED|Co`DIGO DE LA PAUSA DEL AGENTE NO AGREGADO| +there is already an entry for this campaign with this pause code|hay ya una entrada para esta campaña con este code de la pausa| +AGENT PAUSE CODE ADDED|EL Co`DIGO DE LA PAUSA DEL AGENTE AGREGo`| +AGENT PAUSE CODE NOT MODIFIED|Co`DIGO DE LA PAUSA DEL AGENTE NO MODIFICADO| +CAMPAIGN PAUSE CODE NOT DELETED|Co`DIGO DE LA PAUSA DE LA CAMPAÑA NO SUPRIMIDO| +Campaign Stats Refresh:|Aggiornamento Statistiche Campagna:| +Campaign Description -<\/B> This is a memo field for the campaign, it is optional and can be a maximum of 255 characters in length|Descripcio`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| +Campaign Change Date -<\/B> This is the last time that the settings for this campaign were modified in any way|Fecha del cambio de la campaña - esta es la vez última que losajustes para esta campaña fueron modificados de cualquier manera| +Campaign Stats Refresh -<\/B> This checkbox will allow you to force a vicidial stats refresh, even if the campaign is not active|Los Stats de la campaña restauran - este checkbox permitirá queusted fuerce un stats vicidial restaura, incluso si la campaña no esactiva| +Last Campaign Login Date -<\/B> This is the last time that an agent was logged into this campaign|La fecha pasada de la conexion de la campaña - esta es la vezúltima que un agente fue registrado en esta campaña| +List Description -<\/B> This is the memo field for the list, it is optional|Descripcio`n de la lista - este es el campo de la nota para la lista,e`l es opcional| +List Change Date -<\/B> This is the last time that the settings for this list were modified in any way|Fecha del cambio de la lista - esta es la vez última que los ajustespara esta lista fueron modificados de cualquier manera| +List Last Call Date -<\/B> This is the last time that lead was dialed from this list|Fecha de la llamada del último de la lista - esta es la vez últimaque conduce fue marcado de esta lista| +List Description: |Descrizione Lista: | +List Change Date: |Data Modifica Lista: | +Campaign Description: |Descrizione Campagna: | +VICIDIAL Recording Override -<\/B> 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|Invalidacio`n de la grabacion de VICIDIAL - esta opcio`n seeliminará lo que es la opcio`n en la campaña para la grabacion.LISIADO no eliminará el ajuste de la grabacion de la campaña. NUNCAinhabilitará la grabacion en el cliente. ONDEMAND es el defecto ypermite que el agente comience y pare a registrar según lonecesitado. ALLCALLS comenzará la grabacion en el cliente siempreque una llamada se envíe a un agente. ALLFORCE comenzará lagrabacion en el cliente siempre que una llamada se envíe a un agenteque no da al agente ninguna opcio`n para parar el registrar. ParaALLCALLS y ALLFORCE hay una opcio`n para utilizar la grabacionretrasa para reducir en grabaciones y carga de sistema muy cortas delrecude| +VICIDIAL Recording Override: |Invalidacio`n De la grabacion de VICIDIAL:| +MODIFY VICIDIAL SYSTEM SETTINGS|MODIFICA IMPOSTAZIONI DI SISTEMA| + System Settings | Impostazioni di Sistema | +VICIDIAL SYSTEM SETTINGS MODIFIED|IMPOSTAZIONI DI SISTEMA MODIFICATE| +Version: |Versione: | +Use Non-Latin: |UsA Non-Latino: | +Webroot Writable: |Webroot Escribible: | +Enable QueueMetrics Logging: |Permita La Registracion De QueueMetrics: | +QueueMetrics Server IP: |IP Del Servidor De QueueMetrics: | +QueueMetrics DB Name: |Nombre del DB De QueueMetrics: | +QueueMetrics DB Login: |conexion del DB De QueueMetrics: | +QueueMetrics DB Password: |Contraseña del DB De QueueMetrics: | +Use Non-Latin -<\/B> 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|Uso No-Latino - esta opcio`n permite que usted omita la escritura dela exhibicio`n de la tela los caracteres del uso UTF8 y que no haganinguna expresio`n regular de la latino-cara`cter-familia que sefiltra ni que no exhiba el formato. El defecto es 0| +Webroot Writable -<\/B> 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|Webroot escribible - este ajuste permite que usted defina si losarchivos de la temperatura y los archivos de la autentificacio`n seancolocados en el webroot en su web server. El defecto es 1| +Enable QueueMetrics Logging -<\/B> 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|Permita la registracion 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| +QueueMetrics Server IP -<\/B> This is the IP address of the database for your QueueMetrics installation|IP del servidor de QueueMetrics - este es el IP address de la base dedatos para su instalacio`n de QueueMetrics| +QueueMetrics Database Name -<\/B> This is the database name for your QueueMetrics database|Nombre de la base de datos de QueueMetrics - este es el nombre de labase de datos para su base de datos de QueueMetrics| +QueueMetrics Database Login -<\/B> This is the user name used to log in to your QueueMetrics database|conexion de la base de datos de QueueMetrics - este es el nombre delusuario usado para abrirse una sesio`n a su base de datos deQueueMetrics| +QueueMetrics Database Password -<\/B> This is the password used to log in to your QueueMetrics database|Contraseña de la base de datos de QueueMetrics - esta es lacontraseña usada para abrirse una sesio`n a su base de datos deQueueMetrics| +QueueMetrics URL -<\/B> This is the URL or web site address used to get to your QueueMetrics installation|URL de QueueMetrics - esta es la Direccion del URL o del Web siteusada para conseguir a su instalacio`n de QueueMetrics| +QueueMetrics Log ID -<\/B> This is the server ID that all VICIDIAL logs going into the QueueMetrics database will use as an identifier for each record|Identificacio`n del registro de QueueMetrics - esta es laidentificacio`n del servidor que todos los registros de VICIDIAL queentran la base de datos de QueueMetrics utilizarán como identificadorpara cada expediente| +QueueMetrics Log ID: |Log ID QueueMetrics: | +Campaign Dial Status Added|Esito Campagna Aggiunto| +Campaign Dial Status Removed|Esito Campagna Rimosso| +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|Para agregar otro estado al dial, seleccio`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| +CAMPAIGN DIAL STATUS NOT ADDED|ESITO CHIAMATA PER CAMPAGNA NON AGGIUNTO| +CAMPAIGN DIAL STATUS ADDED|ESITO CHIAMATA PER CAMPAGNA AGGIUNTO| +this dial status is not selected for this campaign|questo esito di chiamata non e` selezionato per questa campagna| +CAMPAIGN DIAL STATUS NOT REMOVED|ESITO CAMPAGNA NON RIMOSSO| +CAMPAIGN DIAL STATUS REMOVED|ESITO CAMPAGNA RIMOSSO| +>REMOVE<|>RIMUOVI<| +Dial Status |Esito Chiamata | +no dial statuses selected for this campaign|nessun esito di chiamata selezionato per questa campagna| +QueueMetrics EnterQueue Prepend -<\/B> 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|QueueMetrics EnterQueue prepend - este campo se utiliza para permitirprepending de una de las zonas de informaciones del vicidial_listdelante del número de telefono del cliente para los informesmodificados para requisitos particulares de QueueMetrics. El defectono es NINGUNO no poblar cualquier cosa| +QueueMetrics EnterQueue Prepend: |QueueMetrics EnterQueue Prepend: | +VICIDIAL Agent Disable Display -<\/B> 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|El agente de VICIDIAL inhabilita la exhibicio`n - este campo seutiliza para seleccionar cuando demostrar a un agente cuando susesio`n ha sido inhabilitada por el sistema, una accio`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| +VICIDIAL Agent Disable Display: |El Agente de VICIDIAL Inhabilita La Exhibicio`n:| +Disable Alter Customer Data -<\/B> If set to Y, does not change any of the customer data record when an agent dispositions the call. Default is 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| +Disable Alter Customer Data: |Disabilita modifica dati clienti: | +Agent Alter Customer Data Override -<\/B> 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|El agente altera la invalidacio`n de los datos del cliente - estaopcio`n se eliminará lo que es la opcio`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 que` es elajuste de la campaña. El defecto es NOT_ACTIVE| +Agent Alter Customer Data Override: |El Agente Altera La Invalidacio`n De los Datos Del Cliente: | +Allow No-Hopper-Leads Logins -<\/B> 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|Permita Ninguno-Tolva-Conduce conexiones - si el sistema a Y, permiteagentes a la conexion a la campaña incluso si no hay plomos cargadosen la tolva para esa campaña. Esta funcio`n no se necesita encampañas de CLOSER-type. El defecto es N| +Allow No-Hopper-Leads Logins: |Abilita Login Senza Contatti Da Chiamare: | +Enable SIPSAK Messages -<\/B> 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|Permita los mensajes de SIPSAK - si está permitido el servidorenviará mensajes al telefono del SIP a la exhibicio`n en laexhibicio`n del LCD del telefono cuando está registrado en VICIDIAL.La característica trabaja solamente con los telefonos del SIP yrequiere el uso del sipsak ser instalada en el web server. El defectoes 0| +Enable SIPSAK Messages: |Abilita messaggi SIPSAK: | +Allow SIPSAK Messages -<\/B> 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|Permita los mensajes de SIPSAK - si el sistema a 1, este permite queel ajuste de la tabla de los telefonos trabaje correctamente, elservidor enviará mensajes al telefono del SIP a la exhibicio`n en laexhibicio`n del LCD del telefono cuando está registrado en VICIDIAL.Esta característica trabaja solamente con los telefonos del SIP yrequiere el uso del sipsak ser instalada en el web server. El defectoes 0| +Allow SIPSAK Messages: |Permetti messaggi SIPSAK: | +Admin Home URL -<\/B> 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|URL casero del Admin - esta es la Direccion del URL o del Web siteque usted irá si usted chasca encendido el acoplamiento CASERO en latapa de la página de admin.php| +Admin Home URL: |URL Home Amministrazione: | +>HOME<|>HOME<| + Welcome | Benvenuti | +### START translations for 2.0.4 release ### +CHECK FOR DUPLICATES BY PHONE IN ALL CAMPAIGN LISTS|CONTROLLA DUPLICATI PER TELEFONO IN TUTTE LE LISTE DELLA CAMPAGNA| +CHECK FOR DUPLICATES BY PHONE IN ENTIRE SYSTEM|CONTROLLA DUPLICATI PER TELEFONO NELL` INTERO SISTEMA| +CHECK FOR DUPLICATES BY PHONE IN LIST ID|CONTROLLA DUPLICATI PER TELEFONO SOLO CON QUESTO ID LISTA| +NO DUPLICATE CHECK|NON CONTROLLARE DUPLICATI| +PHONE CODE OVERRIDE FOR THIS FILE|SOVRASCRITTURA DEL CODICE TELEFONO PER QUESTO FILE| +Phone Code Override:|Sovrascrittura Codice Telefono:| +List ID Override:|Sovrascrittura ID Lista:| +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. The lead loader 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, but it does allow you to check for duplicates in itself, within the campaign or within the entire system. Also, make sure that you have created the list that these leads are to be under so that you can use them. Here is a list of the fields in their proper order for the lead files:|El cargador tela-basado básico del plomo de VICIDIAL se diseñasimplemente para tomar un archivo del plomo - hasta 8MB de tamaño quees la lengüeta o la pipa delimitada y para cargarlo en la tabla delvicidial_list. El cargador del plomo permite el campo que elige y deTXT- el texto claramente, los valores separados coma de CSV- y XLS-sobresalen formatos del archivo. El cargador del plomo no hace lavalidacio`n de datos, sino que permite que usted compruebe para sabersi hay duplicados en sí mismo, dentro de la campaña o dentro delsistema entero. Tambien, cercio`rese de que usted haya creado lalista que estos plomos son estar debajo de modo que usted puedautilizarlos. Aquí está una lista de los campos en su orden apropiadapara los archivos del plomo:| +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. Also, for duplication checks against gampaign lists, the list that has new leads going into it does need to be created in the system before you start to load the leads.|NOTAS: La funcionalidad del cargador del plomo del sobresalir espermitida por una serie de escrituras del Perl y necesita tener unarchivo correctamente configurado de /etc/astguiclient.conf en lugaren el web server. Tambien, los mo`dulos de un Perl de los pares sedeben cargar para ella para trabajar Tambien -oLE-Storage_Lite-Storage_Lite y la Hoja de balance-ParseExcel. Ustedpuede comprobar para saber si hay errores runtime en estos mirando suarchivo del error_log de apache. Tambien, para los cheques deduplicacio`n contra gampaign enumera, la lista que tiene nuevos plomosel entrar e`l necesita ser creada en el sistema antes de que ustedcomience a cargar los plomos.| +Campaign List Mix Added|Mezcla De la Lista De la Campaña Agregada| +Modify Campaign List Mix|Modifique La Mezcla De la Lista De la Campaña| +Campaign List Mix Removed|La Mezcla De la Lista De la Campaña Quito`| +Campaign Statuses|Esiti Campagna| +Campaign HotKeys|HotKeys Campagna| +Campaign Lead Recycle Entries|El Plomo De la Campaña Recicla Entradas| +Campaign Auto Alt Dial Statuses|Estados Auto Del Dial Del Alt De la Campaña| +Campaign Agent Pause Codes|Codici Pausa Operatore per Campagna| +Campaign Dial Statuses|Estados Del Dial De la Campaña| +Campaign List Mixes|Mezclas De la Lista De la Campaña| + Lead Recycle |Riciclaggio Contatti| + Auto-Alt Dial | Chiama-Auto-Num-Altern| + Pause Codes |Codici Pausa| + List Mix |Mix Liste| + Campaigns Main |Main Campagne| +List Order Mix -<\/B> Overrides the Lead Order and Dial Status fields. Will use the List and status parameters for the selected List Mix entry in the List Mix sub section instead. Default is DISABLED|Mezcla de la orden de la lista - elimina los campos de la orden delplomo y del estado del dial. Utilizará los parámetros de la lista ydel estado para la entrada seleccionada de la mezcla de la lista en laseccio`n del submarino de la mezcla de la lista en lugar de otro. Eldefecto es LISIADO| +List Mix ID -<\/B> ID of the list mix. Must be from 2-20 characters in length with no spaces or other special punctuation.|Identificacio`n de la mezcla de la lista - identificacio`n de lamezcla de la lista. Debe ser a partir de 2-20 caracteres en longitudsin los espacios o la otra puntuacio`n especial.| +List Mix Name -<\/B> Descriptive name of the list mix. Must be from 2-50 characters in length|Nombre de la mezcla de la lista - nombre descriptivo de la mezcla dela lista. Debe ser a partir de 2-50 caracteres en longitud| +List Mix Detail -<\/B> The composition of the List Mix entry. Contains the List ID, mix order, percentages and statuses that make up this List Mix. The percentages always have to add up to 100, and the lists all have to be active and set to the campaign for the order mix entry to be Activated|Detalle de la mezcla de la lista - la composicio`n de la entrada de lamezcla de la lista. Contiene la identificacio`n de la lista, la ordende la mezcla, los porcentajes y los estados que hacen para arriba estamezcla de la lista. Los porcentajes tienen que agregar siempre hasta100, y las listas todas tienen que ser activas y fijadas a la campañapara que la entrada de la mezcla de la orden sea activada| +List Mix Method -<\/B> The method of mixing all of the parts of the List Mix Detail together. EVEN_MIX will mix leads from each part interleaved with the other parts, like this 1,2,3,1,2,3,1,2,3. IN_ORDER will put the leads in the order in which they are listed in the List Mix Detail screen 1,1,1,2,2,2,3,3,3. RANDOM will put them in RANDOM order 1,3,2,1,1,3,2,1,3. Default is IN_ORDER.|Me`todo de la mezcla de la lista - el me`todo de mezclar a todas laspartes del detalle de la mezcla de la lista juntas. EVEN_MIX mezclarálos plomos de cada parte interpolada con las otras partes, como estos1.2.3.1.2.3.1.2.3. IN_ORDER pondrá los plomos en la orden en la cualse enumeran en la pantalla 1.1.1.2.2.2.3.3.3 del detalle de la mezclade la lista. La voluntad AL AZAR los puso en la orden AL AZAR1.3.2.1.1.3.2.1.3. El defecto es IN_ORDER.| +LIST MIXES FOR THIS CAMPAIGN: |MIX LISTA PER QUESTA CAMPAGNA: | +The human_answered field is used when calculating the drop percentage, or abandon rate. Setting human_answered to Y will use this status when counting the human-answered calls.|Human_answered el campo se utiliza al calcular el porcentaje de lagota, o la tarifa del abandono. El ajuste human_answered a Yutilizará este estado al contar las llamadas humano-contestadas.| +HUMAN ANSWER|RISPOSTA UMANA| +Human Answer:|Risposta Umana:| +ADDING VICIDIAL SYSTEM STATUSES|AGGIUNGI ESITI DI DEFAULT VICIDIAL| +MODIFY VICIDIAL SYSTEM STATUSES|MODIFICA ESITI DI DEFAULT VICIDIAL| +SYSTEM STATUS NOT ADDED|ESITO DI DEFAULT NON AGGIUNTO| +SYSTEM STATUS ADDED|ESITO DI DEFAULT AGGIUNTO| +SYSTEM STATUS NOT DELETED|ESITO DI DEFAULT NON ELIMINATO| +the system status cannot be a reserved status: |el estado de sistema no puede ser un estado reservado:| +the system status needs to be at least 1 characters in length|el estado de sistema necesita ser por lo menos los caracteres 1 enlongitud| +VICIDIAL STATUSES WITHIN THIS SYSTEM: |ESITI DI DEFAULT IN QUESTO SISTEMA: | +ADD NEW SYSTEM STATUS|AGGIUNGI UN NUOVO ESITO DI DEFAULT| +CUSTOM CAMPAIGN STATUSES LISTINGS:|ELENCO ESITI PERSONALIZZATI PER CAMPAGNA:| +CAMPAIGN HOTKEYS LISTINGS:|ELENCO HOTKEY CAMPAGNE:| +CAMPAIGN LEAD RECYCLE LISTINGS:|ELENCO CONTATTI DA RICICLARE:| +>LEAD RECYCLES<|>ESITI DA RICICLARE<| +CAMPAIGN LEAD AUTO-ALT DIAL LISTINGS:|ELENCO ESITI PER I QUALI CHIAMARE AUTOMATICAMENTE IL NUMERO ALTERNATIVO:| +CAMPAIGN AGENT PAUSE CODE LISTINGS:|ELENCO CODICI PAUSA OPERATORE PER CAMPAGNA:| +CAMPAIGN LIST MIX LISTINGS:|LISTADOS DE LA MEZCLA DE LA LISTA DE LA CAMPAÑA:| +The Category option allows you to group several statuses into a catogy that can be used for statistical analysis.|La opcio`n de la categoría permite que usted agrupe varios estados enun catogy que se pueda utilizar para el análisis estadístico.| +MODIFY VICIDIAL STATUS CATEGORIES|MODIFIQUE LAS CATEGORÍAS DEL ESTADO DE VICIDIAL| +ADDING VICIDIAL STATUS CATEGORY|ADICIo`N DE CATEGORÍA DEL ESTADO DE VICIDIAL| + Status Categories | Categorie di esiti| + System Statuses | Esiti di Default| +MODIFY VICIDIAL SYSTEM STATUSES|MODIFICA GLI ESITI DI DEFAULT DI VICIDIAL| +MODIFY VICIDIAL STATUS CATEGORY|MODIFICA LE CATEGORIE DI ESITI DI VICIDIAL| +Through the use of system statuses, you can have statuses that exist for campaign and in-group. The Status must be 1-6 characters in length, the description must be 2-30 characters in length and Selectable defines whether it shows up in VICIDIAL as an agent disposition. The human_answered field is used when calculating the drop percentage, or abandon rate. Setting human_answered to Y will use this status when counting the human-answered calls. The Category option allows you to group several statuses into a catogy that can be used for statistical analysis|Con el uso de los estados de sistema, usted puede tener estados queexistan para la campaña y el en-grupo. El estado debe ser 1-6caracteres en longitud, la descripcio`n debe ser 2-30 caracteres enlongitud y seleccionable define si demuestra para arriba en VICIDIALcomo disposicion del agente. Human_answered el campo se utiliza alcalcular el porcentaje de la gota, o la tarifa del abandono. El ajustehuman_answered a Y utilizará este estado al contar las llamadashumano-contestadas. La opcio`n de la categoría permite que ustedagrupe varios estados en un catogy que se pueda utilizar para elanálisis estadístico| +Through the use of system status categories, you can group together statuses to allow for statistical analysis on a group of statuses. The Category ID must be 2-20 characters in length with no spaces, the name must be 2-50 characters in length, the description is optional and TimeonVDAD Display defines whether that status will be one of the upto 4 statuses that can be calculated and displayed on the Time On VDAD Real-Time report|Con el uso de las categorías del estado de sistema, usted puedeagrupar juntos estados para tener en cuenta análisis estadístico enun grupo de estados. La identificacio`n de la categoría debe ser 2-20caracteres en longitud sin espacios, el nombre debe ser 2-50caracteres en longitud, la descripcio`n es opcional y la exhibicio`nde TimeonVDAD define si ese estado será uno de hasta que 4 estadosque se puedan calcular y exhibir en el tiempo en informe del tiemporeal de VDAD| +ADD NEW STATUS CATEGORY|AGGIUNGI NUOVA CATEGORIA DI ESITI| +STATUS CATEGORY NOT ADDED|CATEGORIA DI ESITI NON AGGIUNTA| +there is already a status category in the system with this ID|Esiste gia` una categoria di esiti con questo ID| +ID must be between 2 and 20 characters in length|L` ID deve essere lungo tra i 2 e i 50 caratteri| +name name must be between 2 and 50 characters in length|il nome deve essere lungo tra i 2 e i 50 caratteri| +STATUS CATEGORY NOT MODIFIED|CATEGORIA ESITI NON MODIFICATA| +the status category cannot be a reserved category: |la categoria di esiti non puo` essere una categoria riservata: | +the status category needs to be at least 2 characters in length|il nome delle categorie di esiti deve essere lungo almeno 2 caratteri| +STATUS CATEGORY DELETED|CATEGORIA ESISI CANCELLATA| +STATUS CATEGORY MODIFIED|CATEGORIA ESITI MODIFICATA| +Category: |Categoria: | +the system status name needs to be at least 1 characters in length|il nome di un esito di default deve essere lungo almeno 1 carattere| +SYSTEM STATUS NOT MODIFIED|ESITO DI DEFAULT NON MODIFICATO| +SYSTEM STATUS MODIFIED|ESITO DI DEFAULT MODIFICATO| +ERROR: There are already 4 Status Categories set to TimeOnVDAD Display|ERRORE: Ci sono gia` 4 Categorie di Stato attivi nel display TimeOnVDAD| +CUSTOM CAMPAIGN STATUS MODIFIED|ESITO PERSONALIZZATO PER CAMPAGNA MODIFICATO| +LIST MIX NOT MODIFIED|MIX LISTA NON MODIFICATO| +LIST MIX MODIFIED|MIX LISTA MODIFICATO| +You cannot delete the last list_id entry from a list mix|Non puoi cancellare l`ultimo list_id da un mix di liste| +LIST MIX ADDED: |MIX LISTA AGGIUNTO: | +LIST MIX NOT ADDED |MIX LISTA NON AGGIUNTO| +There is already a list mix with this ID in the system|Esiste gia` un mix di lista con questo ID| +LIST MIX NOT DELETED|MIX LISTA NON CANCELLATO| +LIST MIX DELETED: |MIX LISTA CANCELLATO: | +SET TO ACTIVE|ATTIVA| +LIST MIX NOT ACTIVATED|MIX LISTA NON ATTIVATO| +LIST MIX ACTIVATED|MIX LISTA ATTIVATO| +Enable Agent Transfer Logfile -<\/B> This option will log to a text logfile on the webserver every time a call is transferred to an agent. Default is 0, disabled|Permita el logfile de la transferencia del agente - esta opcio`nregistrará a un logfile del texto en el webserver cada vez que unallamada se transfiere a un agente. El defecto es 0, inhabilitado| +Enable Agent Transfer Logfile|Permita El Logfile De la Transferencia Del Agente| +Call Time -<\/B> This is the call time scheme to use for this inbound group. Keep in mind that the time is based on the server time. Default is 24hours|Tiempo de la llamada - este es el esquema del tiempo de la llamada autilizar para este grupo de entrada. Tenga presente que el tiempoestá basado en el tiempo del servidor. El defecto es 24hours| +After Hours Action -<\/B> The action to perform if it is after hours as defined in the call time for this inbound group. HANGUP will immediately hangup the call, MESSASGE will play the file in the After Hours Message Filenam field, EXTENSION will send the call to the After Hours Extension in the dialplan and VOICEMAIL will send the call to the voicemail box listed in the After Hours Voicemail field. Default is MESSAGE|Despue`s de la accio`n de las horas - la accio`n a realizarse si esdespue`s de horas según lo definido en la e`poca de la llamada paraeste grupo de entrada. Del RETRASO de la voluntad el retrasoinmediatamente la llamada, MESSASGE jugará el archivo en despue`s delcampo de Filenam del mensaje de las horas, la Extension enviará lallamada a despue`s de la extension de las horas en el dialplan yVOICEMAIL enviará la llamada a la caja del voicemail enumerada endespue`s del campo de Voicemail de las horas. El defecto es MENSAJE| +After Hours Message Filename -<\/B> The audio file located on the server to be played if the Action is set to MESSAGE. Default is vm-goodbye|Despue`s del nombre de fichero del mensaje de las horas - el archivoaudio situado en el servidor que se jugará si la accio`n se fija alMENSAJE. El defecto es VM-ADIO`S| +After Hours Extension -<\/B> The dialplan extension to send the call to if the Action is set to EXTENSION. Default is 8300|Despue`s de la extension de las horas - la extension dialplan paraenviar la llamada si la accio`n se fija a la Extension. El defecto es8300| +After Hours Voicemail -<\/B> The voicemail box to send the call to if the Action is set to VOICEMAIL|Despue`s de las horas Voicemail - la caja del voicemail para enviar lallamada si la accio`n se fija a VOICEMAIL| +Welcome Message Filename -<\/B> The audio file located on the server to be played when the call comes in. If set to ---NONE--- then no message will be played. Default is ---NONE---|Nombre de fichero agradable del mensaje - el archivo audio situado enel servidor que se jugará cuando viene la llamada adentro. Si sistemaa ---NONE --- entonces no se jugará ningún mensaje. El defecto es---NONE ---| +Music On Hold Context -<\/B> The music on hold context to use when the customer is placed on hold. Default is default|Música en contexto del asimiento - la música en el contexto delasimiento para utilizar cuando colocan al cliente en asimiento. Eldefecto es defecto| +On Hold Prompt Filename -<\/B> The audio file located on the server to be played at a regular interval when the customer is on hold. Default is generic_hold. This audio file MUST be 9 seconds or less in length.|En el nombre de fichero del aviso del asimiento - el archivo audiosituado en el servidor que se jugará en un intervalo regular cuandoel cliente está en asimiento. El defecto es generic_hold. Estearchivo audio DEBE estar 9 segundos o menos en longitud.| +On Hold Prompt Interval -<\/B> The length of time in seconds to wait before playing the on hold prompt. Default is 60|En el intervalo del aviso del asimiento - la longitud de la hora ensegundos de esperar antes de jugar encendido el aviso del sostener. Eldefecto es 60| +Agent Alert Extension -<\/B> The extension to send into the agent session to announce that a call is coming to the agent. This extension should have a Playback of an audio file. To not use this function set this to X. Default is X|Extension alerta del agente - la extension a enviar en la sesio`ndel agente para anunciar que una llamada está viniendo al agente.Esta extension debe tener un aparato de lectura de un archivo audio.No utilizar esta funcio`n fijo` esto a X. Default es X| +Agent Alert Delay -<\/B> The length of time in milliseconds to wait before sending the call to the agent after playing the on Agent Alert Extension. Default is 1000|La alarma del agente retrasa - la longitud de la hora en milisegundosde esperar antes de enviar la llamada al agente despue`s de jugarencendido la extension alerta del agente. El defecto es 1000| +Call Time: |Tempo Chiamata: | +After Hours Action: |Despue`s De la Accio`n De las Horas:| +After Hours Message Filename: |Despue`s De Nombre de fichero Del Mensaje De las Horas:| +After Hours Extension: |Despue`s De la Extension De las Horas:| +After Hours Voicemail: |Despue`s De las Horas Voicemail:| +Welcome Message Filename: |Nombre de fichero Agradable Del Mensaje:| +Music On Hold Context: |Context Musica di Attesa:| +On Hold Prompt Filename: |En Nombre de fichero Del Aviso Del Asimiento:| +On Hold Prompt Interval: |En Intervalo Del Aviso Del Asimiento:| +Agent Alert Extension: |Extension Alerta Del Agente:| +Agent Alert Delay: |La Alarma Del Agente Retrasa:| +You will also be able to set the rank, or skill level, in this section for each of the inbound groups as well as being able to see the number of calls received from each inbound group for this specific agent|Usted Tambien podrá fijar la fila, o el nivel de habilidad, en estaseccio`n para cada uno de los grupos de entrada así como poder ver elnúmero de las llamadas recibidas de cada grupo de entrada para esteagente específico| +Allow Inbound and Blended -<\/B> This is where you can set whether the users of this campaign will have the option to take inbound calls with this campaign. If you want to do blended inbound and outbound then this must be set to Y. If you only want to do outbound dialing on this campaign set this to N. Default is N|Permita de entrada y mezclado - aquí es donde usted puede fijar silos usuarios de esta campaña tendrán la opcio`n para tomar llamadasde entrada con esta campaña. Si usted desea hacer de entrada y desalida mezclada entonces esto se debe fijar a Y. Si usted deseasolamente hacer marcar de salida en esta campaña fijo` esto a N.Default es N| +Allow Inbound and Blended: |Permita de entrada y mezclado:| +Add A Dial Status:|Aggiungi Un Esito Chiamata:| +Manual Dial List ID -<\/B> The default list_id to be used when an agent placces a manual call and a new lead record is created in vicidial_list. Default is 999. This field can contain digits only|Identificacio`n manual de la lista del dial - el list_id del defectoque se utilizará cuando los placces de un agente una llamada manual yun nuevo expediente del plomo se crean en vicidial_list. El defecto es999. Este campo puede contener dígitos solamente| +Manual Dial List ID: |ID Lista Chiamate Manuali:| +inbound_group_rank: orders by the rank given to the agent for the specific inbound group. Highest to Lowest|inbound_group_rank: o`rdenes de la fila dada al agente para el grupode entrada específico. Lo más arriba posible a lo más bajo posible| +fewest_calls: orders by the number of calls received by an agent for that specific inbound group. Least calls first|fewest_calls: o`rdenes por el número de las llamadas recibidas por unagente para ese grupo de entrada específico. Menos llamadas primero| +Campaign Ranks: |Classifiche Campagna:| +AGENT RANKS FOR THIS CAMPAIGN:|CLASSIFICA OPERATORI PER QUESTA CAMPAGNA:| +Copy Campaign|Copia Campagna| +COPY A CAMPAIGN|COPIA UNA CAMPAGNA| +Source Campaign: |Campagna da copiare:| +New Copied Campaign Addition|Nueva Adicio`n Copiada De la Campaña| +Copy In-Group|Copia Gruppo Inbound| +New Copied In-Group Addition|Nueva Adicin Copiada Del En-Grupo| +Copy User|Copia Utente| +New Copied User Addition|Nueva Adicio`n Copiada Del Usuario| +COPY USER|COPIA UTENTE| +Copy In-Group|Copia Gruppo Inbound| +COPY INBOUND GROUP|COPIA GRUPPO INBOUND| +campaign_rank: orders by the rank given to the agent for the campaign. Highest to Lowest|campaign_rank: o`rdenes de la fila dada al agente para la campaña. Lomás arriba posible a lo más bajo posible| +Default Transfer Group -<\/B> This field is the default In-Group that will be automatically selected when the agent goes to the transfer-conference frame in their agent interface|Grupo de la transferencia del defecto - este campo es el En-Grupo deldefecto que será seleccionado automáticamente cuando el agente va almarco de la transferir-conferencia en su interfaz del agente| +Default Transfer Group: |Grupo De la Transferencia Del Defecto:| +Allowed Transfer Groups: |Grupos Permitidos De la Transferencia:| +Allowed Transfer Groups -<\/B> With these checkbox listings you can select the groups that agents in this campaign can transfer calls to. Allow Closers must be enabled for this option to show up|Grupos permitidos de la transferencia - con estos listados delcheckbox usted puede seleccionar a los grupos a quienes los agentes enesta campaña pueden transferir llamadas. Permita Closers debe serpermitido para que esta opcio`n demuestre para arriba| +Campaign Ranks -<\/B> In this section you can define the rank an agent will have for each campaign. These ranks can be used to allow for preferred call routing when Next Agent Call is set to campaign_rank|La campaña alinea - en esta seccio`n usted puede definir a la filaque un agente tendrá para cada campaña. Estas filas pueden serutilizadas para tener en cuenta la encaminamiento preferida de lallamada cuando la llamada siguiente del agente se fija alcampaign_rank| +Also in this section is the ability to give the agent a rank for each inbound group. These ranks can be used for preferred call routing when that option is selected in the in-group screen|Tambien en esta seccio`n está la capacidad de dar al agente una filapara cada grupo de entrada. Estas filas pueden ser utilizadas para laencaminamiento preferida de la llamada cuando esa opcio`n seselecciona en la pantalla del en-grupo| +or leave blank for values in the file|o lasciare in bianco per usare i valori contenuti nel file| +AGENT PERFORMANCE DETAIL|DETTAGLI PERFORMANCE OPERATORE| +TOTALS|TOTALI| +VICIDIAL: Auto-dial Stats|VICIDIAL: Statistiche Auto-Dial| +DESCRIPTION|DESCRIZIONE| +VIEW MORE SETTINGS|VISUALIZZA PIU DATI| +VIEW LESS SETTINGS|VISUALIZZA MENO DATI| +Realtime All Campaigns Summary<|Riepilogo Di Tutte Le Campagne Aggiornato In Tempo Reale| +DROPPED MAX:|ABBATTIMENTO MAX:| +DIAL METHOD:|METODO CHIAMATA:| +DIALABLE LEADS:|CONTATTI CHIAMABILI:| +LEADS IN HOPPER:|CONTATTI IN CODA:| +DROPPED PERCENT:|PERCENT ABBATTIMENTO:| +HOPPER LEVEL:|LIVELLO CODA CHIAMATE:| +AVG AGENTS:|MEDIA OPERATORI:| +ORDER:|ORDINE:| +FILTER:|FILTRO:| +DIAL LEVEL:|LIVELLO CHIAMATE:| +DIAL TIMEOUT:|TIMEOUT CHIAMATA:| +VIEW USER GROUP|MOSTRA GRUPPI UTENTI| +HIDE USER GROUP|NASCONDI GRUPPI UTENTI| +SHOW AGENT NAME|MOSTRA NOME OPERATORE| +SHOW AGENT ID|MOSTRA ID OPERATORE| +HIDE SERVER INFO|NASCONDI INFO SERVER| +SHOW SERVER INFO|MOSTRA INFO SERVER| +SHOW WAITING CALLS DETAIL|MOSTRA DETTAGLI CHIAMATE IN ATTESA| +HIDE WAITING CALLS DETAIL|NASCONDI DETTAGLI CHIAMATE IN ATTESA| +>SUMMARY<|>RIEPILOGO<| +STATUSES:|ESITI:| + NO AGENTS ON CALLS| NESSUN OPERATORE AL TELEFONO| +PLEASE SELECT A CAMPAIGN AND DATE ABOVE AND CLICK|PER FAVORE SELEZIONA UNA CAMPAGNA E UNA DATA, POI PREMI| +PLEASE SELECT AN IN-GROUP AND DATE RANGE ABOVE AND CLICK|PER FAVORE SELEZIONA UN GRUPPO INBOUND E UN INTERVALLO DI TEMPO, POI PREMI| +PLEASE SELECT A SERVER AND DATE/TIME RANGE ABOVE AND CLICK|PER FAVORE SELEZIONA UN SERVER E UN INTERVALLO DI TEMPO, POI PREMI| +Date/Time Range:|Intervallo di tempo in formato Data/Ora:| +Server Stats and Reports<|Statistiche e Report<| +>Modify<|>Modifica<| +>DROPPED / ANSWERED:<|>ABBATTUTE / RISPOSTE:<| +>STATUSES:<|>ESITI:<| +>SLOW<|>PIU LENTO<| +>GO<|>INIZIA<| +>MAX LEVEL:<|>LIVELLO MAX:<| +> TIME:<|> DATA:<| +>CALLS TODAY:<|>CHIAMATE OGGI:<| +>FULL NAME<|>NOME COMPLETO<| +>LEVEL<|>LIVELLO<| +>GROUP<|>GRUPPO<| +>USER ID<|>ID UTENTE<| +>USER CALLBACK HOLD LISTINGS:|>ELENCO RICHIAMI DA EFFETTUARE PER L`UTENTE:| +>ENTRY DATA<|>DATA INSERIMENTO<| +>CALLBACK DATA<|>DATA RICHIAMO<| +>LEAD<|>CONTATTO<| +>Source User:|>Utente Da Copiare:| +>CAMPAIGN<|>CAMPAGNA<| +>STATUSES<|>ESITI<| +>MODIFY STATUSES<|>MODIFICA ESITI<| +>HOTKEYS<|>HOTKEY<| +>MODIFY LEAD RECYCLES<|>MODIFICA CONTATTI DA RICICLARE<| +>MODIFY HOTKEYS<|>MODIFICA HOTKEY<| +>MODIFY PAUSE CODES<|>MODIFICA CODICI PAUSA<| +>NONE<|>NESSUNO<| +>AUTO-ALT DIAL<|>CHIAMA-AUTO-NUM-ALTERN<| +>MODIFY AUTO-ALT DIAL<|>MODIFICA CHIAMA-AUTO-NUM-ALTERN<| +>Auto Alt Dial<|>Chiama Auto Num Altern<| +group:|gruppo:| +status:|esito:| +date with hour:|data e ora:| +example:|esempio:| +>TOTAL <|>TOTALE <| +>USER<|>UTENTE<| +>IP ADDRESS<|>INDIRIZZO IP<| +>Click here to see all CallBack Holds in this user group<|>Clicca qui per visualizzare tutti i richiami di questo utente<| +>DELETE THIS SERVER<|>CANCELLA QUESTO SERVER<| +>GMT Local: <|>Fuso Orario Locale: <| +>SELECT-<|>SELEZIO<| +>ABLE<|>NABILE<| +>HUMAN<|>RISPOSTA<| +>ANSWER<|>UMANA<| +>CATEGORY<|>CATEGORIA<| +>MODIFY/DELETE<|>MODIFICA/CANCELLA<| +value="MODIFY"|value="MODIFICA"| +>ADD NEW SCRIPT<|>AGGIUNGI NUOVO SCRIPT<| +no spaces|senza spazi| +>Source Group ID: <|>ID Gruppo Da Copiare: <| +>AGENT RANKS FOR THIS INBOUND GROUP:<|>CLASSIFICA OPERATORI PER QUESTO GRUPPO INBOUND:<| +RANK<|CLASSIFICA<| +CALLS TODAY<|CHIAMATE OGGI<| +>Click here to see a report for this inbound group<|>Clicca qui per visualizzare un report per questo gruppo inbound<| +>INBOUND GROUPS USING THIS CALL TIME:<|>GRUPPI INBOUND CHE UTILIZZANO QUESTO ORARIO:<| +>UNDEFINED - Default Category<|>NON DEFINITO - Categoria Di Default<| +>DELETE THIS CONFERENCE<|>CANCELLA QUESTA CONFERENZA<| +>DELETE THIS VICIDIAL CONFERENCE<|>CANCELLA QUESTA CONFERENZA VICIDIAL<| +>please select a campaign from the pulldown above<|>per favore seleziona una campagna dal menu qui in alto<| diff --git a/agc_2-X/trunk/www/agc/conf_exten_check.php b/agc_2-X/trunk/www/agc/conf_exten_check.php index 736038a2..c5ca70a6 100644 --- a/agc_2-X/trunk/www/agc/conf_exten_check.php +++ b/agc_2-X/trunk/www/agc/conf_exten_check.php @@ -35,6 +35,7 @@ # 61128-2255 - Added update for manual dial vicidial_live_agents # 70319-1542 - Added agent disabled display function # 71122-0205 - Added vicidial_live_agent status output +# 80424-0442 - Added non_latin lookup from system_settings # require("dbconnect.php"); @@ -63,8 +64,32 @@ if (isset($_GET["auto_dial_level"])) {$auto_dial_level=$_GET["auto_dial_level" if (isset($_GET["campagentstdisp"])) {$campagentstdisp=$_GET["campagentstdisp"];} elseif (isset($_POST["campagentstdisp"])) {$campagentstdisp=$_POST["campagentstdisp"];} +header ("Content-type: text/html; charset=utf-8"); +header ("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1 +header ("Pragma: no-cache"); // HTTP/1.0 + + +############################################# +##### START SYSTEM_SETTINGS LOOKUP ##### +$stmt = "SELECT use_non_latin FROM system_settings;"; +$rslt=mysql_query($stmt, $link); +if ($DB) {echo "$stmt\n";} +$qm_conf_ct = mysql_num_rows($rslt); +$i=0; +while ($i < $qm_conf_ct) + { + $row=mysql_fetch_row($rslt); + $non_latin = $row[0]; + $i++; + } +##### END SETTINGS LOOKUP ##### +########################################### + +if ($non_latin < 1) +{ $user=ereg_replace("[^0-9a-zA-Z]","",$user); $pass=ereg_replace("[^0-9a-zA-Z]","",$pass); +} # default optional vars if not set if (!isset($format)) {$format="text";} @@ -81,11 +106,12 @@ if (!isset($query_date)) {$query_date = $NOW_DATE;} $random = (rand(1000000, 9999999) + 10000000); - $stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; +$stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$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]; if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) { diff --git a/agc_2-X/trunk/www/agc/dbconnect.php b/agc_2-X/trunk/www/agc/dbconnect.php index 38815b53..82d00b96 100644 --- a/agc_2-X/trunk/www/agc/dbconnect.php +++ b/agc_2-X/trunk/www/agc/dbconnect.php @@ -48,7 +48,7 @@ $local_AMP = '@'; $ext_context = 'demo'; $recording_exten = '8309'; $WeBRooTWritablE = '1'; -$non_latin = '0'; # set to 1 for UTF rules +$non_latin = '0'; # set to 1 for UTF rules, overridden by system_settings $flag_channels=0; $flag_string = 'VICIast20'; diff --git a/agc_2-X/trunk/www/agc/manager_send.php b/agc_2-X/trunk/www/agc/manager_send.php index 33c81249..7e70659e 100644 --- a/agc_2-X/trunk/www/agc/manager_send.php +++ b/agc_2-X/trunk/www/agc/manager_send.php @@ -70,6 +70,7 @@ # 70322-1636 - Added sipsak display ability # 80331-1433 - Added second transfer try for VICIDIAL transfers on manual dial calls # 80402-0121 - Fixes for manual dial transfers on some systems +# 80424-0442 - Added non_latin lookup from system_settings # require("dbconnect.php"); @@ -142,9 +143,32 @@ if (isset($_GET["allow_sipsak_messages"])) {$allow_sipsak_messages=$_GET["all if (isset($_GET["session_id"])) {$session_id=$_GET["session_id"];} elseif (isset($_POST["session_id"])) {$session_id=$_POST["session_id"];} +header ("Content-type: text/html; charset=utf-8"); +header ("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1 +header ("Pragma: no-cache"); // HTTP/1.0 + +############################################# +##### START SYSTEM_SETTINGS LOOKUP ##### +$stmt = "SELECT use_non_latin FROM system_settings;"; +$rslt=mysql_query($stmt, $link); +if ($DB) {echo "$stmt\n";} +$qm_conf_ct = mysql_num_rows($rslt); +$i=0; +while ($i < $qm_conf_ct) + { + $row=mysql_fetch_row($rslt); + $non_latin = $row[0]; + $i++; + } +##### END SETTINGS LOOKUP ##### +########################################### + +if ($non_latin < 1) +{ $user=ereg_replace("[^0-9a-zA-Z]","",$user); $pass=ereg_replace("[^0-9a-zA-Z]","",$pass); $secondS = ereg_replace("[^0-9]","",$secondS); +} # default optional vars if not set if (!isset($ACTION)) {$ACTION="Originate";} @@ -158,11 +182,12 @@ $NOW_DATE = date("Y-m-d"); $NOW_TIME = date("Y-m-d H:i:s"); if (!isset($query_date)) {$query_date = $NOW_DATE;} - $stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $auth=$row[0]; +$stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$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]; if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0)) { diff --git a/agc_2-X/trunk/www/agc/vdc_db_query.php b/agc_2-X/trunk/www/agc/vdc_db_query.php index fbfc8fe4..a51ed7ac 100644 --- a/agc_2-X/trunk/www/agc/vdc_db_query.php +++ b/agc_2-X/trunk/www/agc/vdc_db_query.php @@ -146,10 +146,11 @@ # 80125-1213 - fixed vicidial_log bug when call is from closer # 80317-2051 - Added in-group recording settings # 80402-0121 - Fixes for manual dial transfers on some systems, removed /n persist flag +# 80424-0442 - Added non_latin lookup from system_settings # $version = '2.0.5-71'; -$build = '80402-0121'; +$build = '80424-0442'; require("dbconnect.php"); @@ -287,12 +288,35 @@ if (isset($_GET["LogouTKicKAlL"])) {$LogouTKicKAlL=$_GET["LogouTKicKAlL"];} if (isset($_GET["closer_blended"])) {$closer_blended=$_GET["closer_blended"];} elseif (isset($_POST["closer_blended"])) {$closer_blended=$_POST["closer_blended"];} + +header ("Content-type: text/html; charset=utf-8"); +header ("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1 +header ("Pragma: no-cache"); // HTTP/1.0 + +############################################# +##### START SYSTEM_SETTINGS LOOKUP ##### +$stmt = "SELECT use_non_latin FROM system_settings;"; +$rslt=mysql_query($stmt, $link); +if ($DB) {echo "$stmt\n";} +$qm_conf_ct = mysql_num_rows($rslt); +$i=0; +while ($i < $qm_conf_ct) + { + $row=mysql_fetch_row($rslt); + $non_latin = $row[0]; + $i++; + } +##### END SETTINGS LOOKUP ##### +########################################### + +if ($non_latin < 1) +{ $user=ereg_replace("[^0-9a-zA-Z]","",$user); $pass=ereg_replace("[^0-9a-zA-Z]","",$pass); $length_in_sec = ereg_replace("[^0-9]","",$length_in_sec); $phone_code = ereg_replace("[^0-9]","",$phone_code); $phone_number = ereg_replace("[^0-9]","",$phone_number); - +} # default optional vars if not set if (!isset($format)) {$format="text";} @@ -316,6 +340,7 @@ else { $stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$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]; @@ -392,7 +417,6 @@ if ($ACTION == 'LogiNCamPaigns') $LOGallowed_campaignsSQL=''; $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); if ( (!eregi("ALL-CAMPAIGNS",$row[0])) ) @@ -403,7 +427,6 @@ if ($ACTION == 'LogiNCamPaigns') } $stmt="SELECT campaign_id,campaign_name from vicidial_campaigns where active='Y' $LOGallowed_campaignsSQL order by campaign_id"; - if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); $camps_to_print = mysql_num_rows($rslt); @@ -1140,7 +1163,6 @@ if ($stage == "end") ############################################# ##### 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); @@ -1276,7 +1298,6 @@ if ($stage == "end") { $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); } @@ -1303,7 +1324,6 @@ if ($stage == "end") $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); @@ -1343,7 +1363,6 @@ if ($stage == "end") $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); @@ -1367,7 +1386,6 @@ if ($stage == "end") $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); @@ -2015,7 +2033,6 @@ else ############################################# ##### 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); @@ -2047,12 +2064,11 @@ else # $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"; @@ -2070,7 +2086,6 @@ else $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); @@ -2197,7 +2212,6 @@ if ($ACTION == 'updateDISPO') ############################################# ##### 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); @@ -2222,7 +2236,6 @@ if ($ACTION == 'updateDISPO') $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); @@ -2251,7 +2264,6 @@ if ($ACTION == 'updateLEAD') { $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); @@ -2267,7 +2279,6 @@ if ($ACTION == 'updateLEAD') $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); @@ -2337,7 +2348,6 @@ if ( ($ACTION == 'VDADpause') || ($ACTION == 'VDADready') ) ############################################# ##### 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); @@ -2364,7 +2374,6 @@ if ( ($ACTION == 'VDADpause') || ($ACTION == 'VDADready') ) $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); @@ -2471,7 +2480,6 @@ if ($ACTION == 'PauseCodeSubmit') ############################################# ##### 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); @@ -2502,7 +2510,6 @@ if ($ACTION == 'PauseCodeSubmit') $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); diff --git a/agc_2-X/trunk/www/agc/vicidial.php b/agc_2-X/trunk/www/agc/vicidial.php index ad66ddaf..62b7df6c 100644 --- a/agc_2-X/trunk/www/agc/vicidial.php +++ b/agc_2-X/trunk/www/agc/vicidial.php @@ -172,10 +172,11 @@ # 80402-0121 - Fixes for manual dial transfers on some systems # 80407-2112 - Work on adding phone login load balancing across servers # 80416-0559 - Added ability to log computer_ip at login, set the $PhoneSComPIP variable +# 80428-0413 - UTF8 changes and testing # -$version = '2.0.5-151'; -$build = '80416-0559'; +$version = '2.0.5-152'; +$build = '80428-0413'; require("dbconnect.php"); @@ -245,6 +246,22 @@ $CIDdate = date("ymdHis"); $random = (rand(1000000, 9999999) + 10000000); +############################################# +##### START SYSTEM_SETTINGS LOOKUP ##### +$stmt = "SELECT use_non_latin FROM system_settings;"; +$rslt=mysql_query($stmt, $link); +if ($DB) {echo "$stmt\n";} +$qm_conf_ct = mysql_num_rows($rslt); +$i=0; +while ($i < $qm_conf_ct) + { + $row=mysql_fetch_row($rslt); + $non_latin = $row[0]; + $i++; + } +##### END SETTINGS LOOKUP ##### +########################################### + $conf_silent_prefix = '7'; # vicidial_conferences prefix to enter silently $HKuser_level = '5'; # minimum vicidial user_level for HotKeys $campaign_login_list = '1'; # show drop-down list of campaigns at login @@ -344,7 +361,6 @@ if ($relogin == 'YES') $VU_user_group=$row[0]; $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); if ( (!eregi("ALL-CAMPAIGNS",$row[0])) ) @@ -519,7 +535,6 @@ if ($user_login_first == 1) { $stmt="SELECT phone_login,phone_pass from vicidial_users where user='$VD_login' and pass='$VD_pass' and user_level > 0;"; if ($DB) {echo "|$stmt|\n";} - if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $phone_login=$row[0]; @@ -603,7 +618,6 @@ $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]; @@ -614,7 +628,6 @@ $VDloginDISPLAY=0; $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,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]; @@ -640,7 +653,6 @@ $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]; @@ -672,7 +684,6 @@ $VDloginDISPLAY=0; ##### check to see that the campaign is active $stmt="SELECT count(*) FROM vicidial_campaigns where campaign_id='$VD_campaign' and active='Y';"; if ($DB) {echo "|$stmt|\n";} - if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $CAMPactive=$row[0]; @@ -684,7 +695,6 @@ $VDloginDISPLAY=0; $VARstatusnames=''; ##### grab the statuses that can be used for dispositioning by an agent $stmt="SELECT status,status_name FROM vicidial_statuses WHERE $selectableSQL status != 'NEW' order by status limit 50;"; - if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $VD_statuses_ct = mysql_num_rows($rslt); @@ -701,7 +711,6 @@ $VDloginDISPLAY=0; ##### grab the campaign-specific statuses that can be used for dispositioning by an agent $stmt="SELECT status,status_name FROM vicidial_campaign_statuses WHERE $selectableSQL status != 'NEW' and campaign_id='$VD_campaign' order by status limit 50;"; - if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $VD_statuses_camp = mysql_num_rows($rslt); @@ -722,7 +731,6 @@ $VDloginDISPLAY=0; ##### grab the campaign-specific HotKey statuses that can be used for dispositioning by an agent $stmt="SELECT hotkey,status,status_name FROM vicidial_campaign_hotkeys WHERE selectable='Y' and status != 'NEW' and campaign_id='$VD_campaign' order by hotkey limit 9;"; - if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $HK_statuses_camp = mysql_num_rows($rslt); @@ -753,7 +761,6 @@ $VDloginDISPLAY=0; ##### grab the campaign settings $stmt="SELECT park_ext,park_file_name,web_form_address,allow_closers,auto_dial_level,dial_timeout,dial_prefix,campaign_cid,campaign_vdad_exten,campaign_rec_exten,campaign_recording,campaign_rec_filename,campaign_script,get_call_launch,am_message_exten,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,alt_number_dialing,scheduled_callbacks,wrapup_seconds,wrapup_message,closer_campaigns,use_internal_dnc,allcalls_delay,omit_phone_code,agent_pause_codes_active,no_hopper_leads_logins,campaign_allow_inbound,manual_dial_list_id,default_xfer_group,xfer_groups FROM vicidial_campaigns where campaign_id = '$VD_campaign';"; - if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $row=mysql_fetch_row($rslt); @@ -812,7 +819,6 @@ $VDloginDISPLAY=0; { ##### grab the pause codes for this campaign $stmt="SELECT pause_code,pause_code_name FROM vicidial_pause_codes WHERE campaign_id='$VD_campaign' order by pause_code limit 50;"; - if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $VD_pause_codes = mysql_num_rows($rslt); @@ -838,7 +844,6 @@ $VDloginDISPLAY=0; { $VARingroups=''; $stmt="select group_id from vicidial_inbound_groups where active = 'Y' and group_id IN($closer_campaigns) order by group_id limit 60;"; - 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); @@ -862,7 +867,6 @@ $VDloginDISPLAY=0; { $VARxfergroups=''; $stmt="select group_id,group_name from vicidial_inbound_groups where active = 'Y' and group_id IN($xfer_groups) order by group_id limit 60;"; - if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $xfer_ct = mysql_num_rows($rslt); @@ -881,7 +885,6 @@ $VDloginDISPLAY=0; ##### grab the number of leads in the hopper for this campaign $stmt="SELECT count(*) FROM vicidial_hopper where campaign_id = '$VD_campaign' and status='READY';"; - if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $row=mysql_fetch_row($rslt); @@ -964,7 +967,6 @@ else {$phoneSQL = "login='$phone_login' and pass='$phone_pass'";} $authphone=0; $stmt="SELECT count(*) from phones where $phoneSQL 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); $authphone=$row[0]; @@ -1057,7 +1059,6 @@ 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]; @@ -1152,7 +1153,6 @@ 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]; @@ -1206,12 +1206,10 @@ 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 ( ($campaign_allow_inbound == 'Y') || ($campaign_leads_to_call > 0) || (ereg('Y',$no_hopper_leads_logins)) ) @@ -1219,12 +1217,10 @@ else ### insert an entry into the user log for the login event $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); @@ -1241,7 +1237,6 @@ 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); @@ -1253,7 +1248,6 @@ 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"; @@ -1261,28 +1255,24 @@ 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"; $stmt="DELETE from vicidial_live_inbound_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"; @@ -1296,7 +1286,6 @@ else ############################################# ##### 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); @@ -1328,7 +1317,6 @@ else ### 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"; @@ -1339,7 +1327,6 @@ else ##### grab the campaign_weight and number of calls today on that campaign for the agent $stmt="SELECT campaign_weight,calls_today FROM vicidial_campaign_agents where user='$VD_login' and campaign_id = '$VD_campaign';"; - if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $vca_ct = mysql_num_rows($rslt); @@ -1356,7 +1343,6 @@ else $calls_today = '0'; $stmt="INSERT INTO vicidial_campaign_agents (user,campaign_id,campaign_rank,campaign_weight,calls_today) values('$VD_login','$VD_campaign','0','0','$calls_today');"; 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"; @@ -1364,7 +1350,6 @@ 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,campaign_weight,calls_today) values('$VD_login','$server_ip','$session_id','$SIP_user','PAUSED','','$VD_campaign','','','','$random','$NOW_TIME','$tsNOW_TIME','$NOW_TIME','$closer_chooser_string','$user_level','$campaign_weight','$calls_today');"; 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"; @@ -1376,14 +1361,12 @@ else $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"; @@ -1404,7 +1387,6 @@ 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"; @@ -1416,14 +1398,12 @@ else $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"; @@ -1496,7 +1476,6 @@ else ##### Agent is going to log in so insert the vicidial_agent_log entry now $stmt="INSERT INTO vicidial_agent_log (user,server_ip,event_time,campaign_id,pause_epoch,pause_sec,wait_epoch,user_group,sub_status) values('$VD_login','$server_ip','$NOW_TIME','$VD_campaign','$StarTtimE','0','$StarTtimE','$VU_user_group','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); $agent_log_id = mysql_insert_id($link); @@ -1516,7 +1495,6 @@ else ##### grab the datails of all active scripts in the system $stmt="SELECT script_id,script_name,script_text FROM vicidial_scripts WHERE active='Y' order by script_id limit 100;"; - if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} $MM_scripts = mysql_num_rows($rslt); @@ -1525,8 +1503,8 @@ else { $row=mysql_fetch_row($rslt); $MMscriptid[$e] =$row[0]; - $MMscriptname[$e] = rawurlencode($row[1]); - $MMscripttext[$e] = rawurlencode($row[2]); + $MMscriptname[$e] = urlencode($row[1]); + $MMscripttext[$e] = urlencode($row[2]); $MMscriptids = "$MMscriptids'$MMscriptid[$e]',"; $MMscriptnames = "$MMscriptnames'$MMscriptname[$e]',"; $MMscripttexts = "$MMscripttexts'$MMscripttext[$e]',"; @@ -5596,10 +5574,14 @@ else var encoded = encodedvar; decoded = ''; var i = 0; - var RGnl = new RegExp("\n","g"); + var RGnl = new RegExp("[\r]\n","g"); var RGplus = new RegExp(" ","g"); var RGiframe = new RegExp("iframe","gi"); +var xtest; +xtest=unescape(encoded); +encoded=utf8_decode(xtest); + if (scriptformat == 'YES') { var SCvendor_lead_code = document.vicidial_form.vendor_lead_code.value; @@ -5771,30 +5753,64 @@ else encoded = encoded.replace(RGSIPexten, SCSIPexten); encoded = encoded.replace(RGsession_id, SCsession_id); } - while (i < encoded.length) { - var ch = encoded.charAt(i); - if (ch == "%") { - if (i < (encoded.length-2) - && HEXCHAR.indexOf(encoded.charAt(i+1)) != -1 - && HEXCHAR.indexOf(encoded.charAt(i+2)) != -1 ) { - decoded += unescape( encoded.substr(i,3) ); - i += 3; - } else { - alert( 'Bad escape combo near ...' + encoded.substr(i) ); - decoded += "%[ERR]"; - i++; - } - } else { - decoded += ch; - i++; - } - } // while - decoded = decoded.replace(RGnl, "
"); - +decoded=encoded; // simple no ? +decoded = decoded.replace(RGnl, "
"); +// while (i < encoded.length) { +// var ch = encoded.charAt(i); +// if (ch == "%") { +// if (i < (encoded.length-2) +// && HEXCHAR.indexOf(encoded.charAt(i+1)) != -1 +// && HEXCHAR.indexOf(encoded.charAt(i+2)) != -1 ) { +// decoded += unescape( encoded.substr(i,3) ); +// i += 3; +// } else { +// alert( 'Bad escape combo near ...' + encoded.substr(i) ); +// decoded += "%[ERR]"; +// i++; +// } +// } else { +// decoded += ch; +// i++; +// } +// } // while +// decoded = decoded.replace(RGnl, "
"); +// return false; }; +// ################################################################################ +// Taken form php.net Angelos +function utf8_decode(utftext) { + var string = ""; + var i = 0; + var c = c1 = c2 = 0; + + while ( i < utftext.length ) { + + c = utftext.charCodeAt(i); + + if (c < 128) { + string += String.fromCharCode(c); + i++; + } + else if((c > 191) && (c < 224)) { + c2 = utftext.charCodeAt(i+1); + string += String.fromCharCode(((c & 31) << 6) | (c2 & 63)); + i += 2; + } + else { + c2 = utftext.charCodeAt(i+1); + c3 = utftext.charCodeAt(i+2); + string += String.fromCharCode(((c & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63)); + i += 3; + } + + } + + return string; + }; + // ################################################################################ // Move the Dispo frame out of the way and change the link to maximize diff --git a/agc_2-X/trunk/www/vicidial/AST_agent_performance_detail.php b/agc_2-X/trunk/www/vicidial/AST_agent_performance_detail.php index b39dfa43..caf101d5 100644 --- a/agc_2-X/trunk/www/vicidial/AST_agent_performance_detail.php +++ b/agc_2-X/trunk/www/vicidial/AST_agent_performance_detail.php @@ -9,6 +9,7 @@ # 71121-0144 - Replace existing AST_agent_performance_detail.php script with this one # - Fixed zero division bug # 71218-1155 - added end_date for multi-day reports +# 80428-0144 - UTF8 cleanup # require("dbconnect.php"); @@ -33,15 +34,31 @@ if (isset($_GET["SUBMIT"])) {$SUBMIT=$_GET["SUBMIT"];} if (strlen($shift)<2) {$shift='ALL';} +############################################# +##### START SYSTEM_SETTINGS LOOKUP ##### +$stmt = "SELECT use_non_latin FROM system_settings;"; +$rslt=mysql_query($stmt, $link); +if ($DB) {echo "$stmt\n";} +$qm_conf_ct = mysql_num_rows($rslt); +$i=0; +while ($i < $qm_conf_ct) + { + $row=mysql_fetch_row($rslt); + $non_latin = $row[0]; + $i++; + } +##### END SETTINGS LOOKUP ##### +########################################### + $PHP_AUTH_USER = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_USER); $PHP_AUTH_PW = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_PW); - $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]; +$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]; if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or (!$auth)) { @@ -59,7 +76,6 @@ if (!isset($query_date)) {$query_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); @@ -71,7 +87,6 @@ while ($i < $campaigns_to_print) $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); @@ -189,7 +204,6 @@ $user_namesARY[0]=''; $k=0; $stmt="select count(*) as calls,sum(talk_sec) as talk,full_name,vicidial_users.user,sum(pause_sec),sum(wait_sec),sum(dispo_sec),status 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<36000 and wait_sec<36000 and talk_sec<36000 and dispo_sec<36000 $ugSQL group by full_name,status order by status desc,full_name limit 100000;"; -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); diff --git a/agc_2-X/trunk/www/vicidial/AST_inboundEXTstats.php b/agc_2-X/trunk/www/vicidial/AST_inboundEXTstats.php index 9e3594af..2df59f5d 100644 --- a/agc_2-X/trunk/www/vicidial/AST_inboundEXTstats.php +++ b/agc_2-X/trunk/www/vicidial/AST_inboundEXTstats.php @@ -76,7 +76,7 @@ while ($i < $inbound_to_print) \n"; +echo"\n"; #echo"\n"; echo "ASTERISK: Inbound Calls Stats\n"; echo "
\n"; diff --git a/agc_2-X/trunk/www/vicidial/AST_inboundEXTstats_department.php b/agc_2-X/trunk/www/vicidial/AST_inboundEXTstats_department.php index 9720f349..57546931 100644 --- a/agc_2-X/trunk/www/vicidial/AST_inboundEXTstats_department.php +++ b/agc_2-X/trunk/www/vicidial/AST_inboundEXTstats_department.php @@ -28,11 +28,28 @@ 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 and view_reports='1';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); +############################################# +##### START SYSTEM_SETTINGS LOOKUP ##### +$stmt = "SELECT use_non_latin FROM system_settings;"; +$rslt=mysql_query($stmt, $link); +if ($DB) {echo "$stmt\n";} +$qm_conf_ct = mysql_num_rows($rslt); +$i=0; +while ($i < $qm_conf_ct) + { $row=mysql_fetch_row($rslt); - $auth=$row[0]; + $non_latin = $row[0]; + $i++; + } +##### END SETTINGS LOOKUP ##### +########################################### + +$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]; if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or (!$auth)) { @@ -76,7 +93,7 @@ while ($i < $dept_to_print) \n"; +echo"\n"; #echo"\n"; echo "ASTERISK: Inbound Calls Stats - By Department\n"; echo "\n"; diff --git a/agc_2-X/trunk/www/vicidial/AST_timeonVDADall.php b/agc_2-X/trunk/www/vicidial/AST_timeonVDADall.php index eee31b17..8dd3dc44 100644 --- a/agc_2-X/trunk/www/vicidial/AST_timeonVDADall.php +++ b/agc_2-X/trunk/www/vicidial/AST_timeonVDADall.php @@ -32,6 +32,7 @@ # 80311-1550 - Added calls_today on all agents and wait time/in-group for inbound calls # 80422-0033 - Added phonediaplay option, allow for toggle-sorting on sortable fields # 80422-1001 - Fixed sort by phone login +# 80424-0515 - Added non_latin lookup from system_settings # header ("Content-type: text/html; charset=utf-8"); @@ -76,6 +77,22 @@ if (isset($_GET["CALLSdisplay"])) {$CALLSdisplay=$_GET["CALLSdisplay"];} if (isset($_GET["PHONEdisplay"])) {$PHONEdisplay=$_GET["PHONEdisplay"];} elseif (isset($_POST["PHONEdisplay"])) {$PHONEdisplay=$_POST["PHONEdisplay"];} +############################################# +##### START SYSTEM_SETTINGS LOOKUP ##### +$stmt = "SELECT use_non_latin FROM system_settings;"; +$rslt=mysql_query($stmt, $link); +if ($DB) {echo "$stmt\n";} +$qm_conf_ct = mysql_num_rows($rslt); +$i=0; +while ($i < $qm_conf_ct) + { + $row=mysql_fetch_row($rslt); + $non_latin = $row[0]; + $i++; + } +##### END SETTINGS LOOKUP ##### +########################################### + if (!isset($RR)) {$gRRroup=4;} if (!isset($group)) {$group='';} if (!isset($usergroup)) {$usergroup='';} @@ -129,15 +146,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 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]; +$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]; if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or (!$auth)) { @@ -155,10 +169,6 @@ $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";} @@ -172,10 +182,6 @@ 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";} @@ -312,10 +318,6 @@ 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'"); -} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $DIALlev = $row[0]; @@ -345,10 +347,6 @@ 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]; @@ -358,10 +356,6 @@ 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),min(status_category_1),sum(status_category_count_1),min(status_category_2),sum(status_category_count_2),min(status_category_3),sum(status_category_count_3),min(status_category_4),sum(status_category_count_4) 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]; @@ -393,10 +387,6 @@ 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]; @@ -526,10 +516,6 @@ echo "
\n\n"; if ($campaign_allow_inbound > 0) { $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]); @@ -554,10 +540,6 @@ else $stmtA = "SELECT status"; } -if ($non_latin > 0) -{ -$rslt=mysql_query("SET NAMES 'UTF8'"); -} $k=0; $stmt = "$stmtA $stmtB"; diff --git a/agc_2-X/trunk/www/vicidial/admin.php b/agc_2-X/trunk/www/vicidial/admin.php index ddeb32a5..9a9c537c 100644 --- a/agc_2-X/trunk/www/vicidial/admin.php +++ b/agc_2-X/trunk/www/vicidial/admin.php @@ -717,6 +717,22 @@ if (strlen($dial_status) > 0) $status = $dial_status; } +############################################# +##### START SYSTEM_SETTINGS LOOKUP ##### +$stmt = "SELECT use_non_latin FROM system_settings;"; +$rslt=mysql_query($stmt, $link); +if ($DB) {echo "$stmt\n";} +$qm_conf_ct = mysql_num_rows($rslt); +$i=0; +while ($i < $qm_conf_ct) + { + $row=mysql_fetch_row($rslt); + $non_latin = $row[0]; + $i++; + } +##### END SETTINGS LOOKUP ##### +########################################### + ###################################################################################################### ###################################################################################################### ####### Form variable filtering for security and data integrity @@ -1203,11 +1219,12 @@ $list_mix_container = ereg_replace(";","",$list_mix_container); # 80310-1504 - added QC settings section to campaign screen # 80317-2037 - Added Recording override settings to in-groups # 80414-1505 - More work on QC, added vicidial_qc_codes +# 80424-0442 - Added non_latin system_settings lookup at top to override dbconnect setting # # 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.5-126'; -$build = '80414-1505'; +$admin_version = '2.0.5-127'; +$build = '80424-0442'; $STARTtime = date("U"); $SQLdate = date("Y-m-d H:i:s"); @@ -1230,11 +1247,28 @@ if ($force_logout) 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); +############################################# +##### START SYSTEM_SETTINGS LOOKUP ##### +$stmt = "SELECT use_non_latin FROM system_settings;"; +$rslt=mysql_query($stmt, $link); +if ($DB) {echo "$stmt\n";} +$qm_conf_ct = mysql_num_rows($rslt); +$i=0; +while ($i < $qm_conf_ct) + { $row=mysql_fetch_row($rslt); - $auth=$row[0]; + $non_latin = $row[0]; + $i++; + } +##### END SETTINGS LOOKUP ##### +########################################### + +$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";} +if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} +$rslt=mysql_query($stmt, $link); +$row=mysql_fetch_row($rslt); +$auth=$row[0]; if ($WeBRooTWritablE > 0) {$fp = fopen ("./project_auth_entries.txt", "a");} diff --git a/agc_2-X/trunk/www/vicidial/admin_modify_lead.php b/agc_2-X/trunk/www/vicidial/admin_modify_lead.php index b58a0946..e498d9f0 100644 --- a/agc_2-X/trunk/www/vicidial/admin_modify_lead.php +++ b/agc_2-X/trunk/www/vicidial/admin_modify_lead.php @@ -1,13 +1,28 @@ LICENSE: AGPLv2 # - # CHANGES # +# 60419-1705 - Added ability to change lead callback record from USERONLY to ANYONE or USERONLY-user +# 60421-1459 - check GET/POST vars lines with isset to not trigger PHP NOTICES +# 60609-1112 - Added DNC list addition if status changed to DNC +# 60619-1539 - Added variable filtering to eliminate SQL injection attack threat +# 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 +# 70424-1128 - Added campaign-specific statuses, reformatted recordings list # 70702-1259 - Added recording location link and truncation # 70906-2132 - Added closer_log records display +# 80428-0144 - UTF8 cleanup # require("dbconnect.php"); @@ -98,35 +113,32 @@ if (isset($_GET["modify_logs"])) {$modify_logs=$_GET["modify_logs"];} $PHP_AUTH_USER = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_USER); $PHP_AUTH_PW = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_PW); - - -### AST GUI database administration modify lead in vicidial_list -### admin_modify_lead.php - -# this is the administration lead information modifier screen, the administrator just needs to enter the leadID and then they can view and modify the information in the record for that lead - -# CHANGES -# -# 60419-1705 - Added ability to change lead callback record from USERONLY to ANYONE or USERONLY-user -# 60421-1459 - check GET/POST vars lines with isset to not trigger PHP NOTICES -# 60609-1112 - Added DNC list addition if status changed to DNC -# 60619-1539 - Added variable filtering to eliminate SQL injection attack threat -# 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 -# 70424-1128 - Added campaign-specific statuses, reformatted recordings list -# - $STARTtime = date("U"); $TODAY = date("Y-m-d"); $NOW_TIME = date("Y-m-d H:i:s"); - - $stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 7 and modify_leads='1';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); +############################################# +##### START SYSTEM_SETTINGS LOOKUP ##### +$stmt = "SELECT use_non_latin FROM system_settings;"; +$rslt=mysql_query($stmt, $link); +if ($DB) {echo "$stmt\n";} +$qm_conf_ct = mysql_num_rows($rslt); +$i=0; +while ($i < $qm_conf_ct) + { $row=mysql_fetch_row($rslt); - $auth=$row[0]; + $non_latin = $row[0]; + $i++; + } +##### END SETTINGS LOOKUP ##### +########################################### + +$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";} +if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} +$rslt=mysql_query($stmt, $link); +$row=mysql_fetch_row($rslt); +$auth=$row[0]; if ($WeBRooTWritablE > 0) {$fp = fopen ("./project_auth_entries.txt", "a");} diff --git a/agc_2-X/trunk/www/vicidial/listloader.pl b/agc_2-X/trunk/www/vicidial/listloader.pl index e22aef15..7ea00e6e 100644 --- a/agc_2-X/trunk/www/vicidial/listloader.pl +++ b/agc_2-X/trunk/www/vicidial/listloader.pl @@ -17,6 +17,7 @@ # 70205-1703 - Defaulted phone_code to 1 if not populated # 70417-1059 - Fixed default phone_code bug # 70510-1518 - Added campaign and system duplicate check and phonecode override +# 80428-0144 - UTF8 cleanup # ### begin parsing run-time options ### @@ -147,6 +148,23 @@ $pulldate="$year-$mon-$mday $hour:$min:$sec"; $inSD = $pulldate0; $dsec = ( ( ($hour * 3600) + ($min * 60) ) + $sec ); +############################################# +##### START SYSTEM_SETTINGS LOOKUP ##### +$stmtA = "SELECT use_non_latin FROM system_settings;"; +$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; +$sthA->execute or die "executing: $stmtA ", $dbhA->errstr; +$sthArows=$sthA->rows; +if ($sthArows > 0) + { + @aryA = $sthA->fetchrow_array; + $non_latin = "$aryA[0]"; + } +$sthA->finish(); +##### END SETTINGS LOOKUP ##### +########################################### + + +if ($non_latin > 0) {$affected_rows = $dbhA->do("SET NAMES 'UTF8'");} ### Grab Server values from the database $stmtA = "SELECT local_gmt FROM servers where server_ip = '$server_ip';"; diff --git a/agc_2-X/trunk/www/vicidial/listloader_super.pl b/agc_2-X/trunk/www/vicidial/listloader_super.pl index 3df592a0..7e7270c0 100644 --- a/agc_2-X/trunk/www/vicidial/listloader_super.pl +++ b/agc_2-X/trunk/www/vicidial/listloader_super.pl @@ -16,6 +16,7 @@ # 70205-1703 - Defaulted phone_code to 1 if not populated # 70417-1059 - Fixed default phone_code bug # 70510-1518 - Added campaign and system duplicate check and phonecode override +# 80428-0144 - UTF8 cleanup # ### begin parsing run-time options ### @@ -148,21 +149,38 @@ $pulldate="$year-$mon-$mday $hour:$min:$sec"; $inSD = $pulldate0; $dsec = ( ( ($hour * 3600) + ($min * 60) ) + $sec ); +############################################# +##### START SYSTEM_SETTINGS LOOKUP ##### +$stmtA = "SELECT use_non_latin FROM system_settings;"; +$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; +$sthA->execute or die "executing: $stmtA ", $dbhA->errstr; +$sthArows=$sthA->rows; +if ($sthArows > 0) + { + @aryA = $sthA->fetchrow_array; + $non_latin = "$aryA[0]"; + } +$sthA->finish(); +##### END SETTINGS LOOKUP ##### +########################################### - ### Grab Server values from the database - $stmtA = "SELECT local_gmt FROM servers where server_ip = '$server_ip';"; - $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; - $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; - $sthArows=$sthA->rows; - $rec_count=0; - while ($sthArows > $rec_count) - { - @aryA = $sthA->fetchrow_array; - $DBSERVER_GMT = "$aryA[0]"; - if ($DBSERVER_GMT) {$SERVER_GMT = $DBSERVER_GMT;} - $rec_count++; - } - $sthA->finish(); + +if ($non_latin > 0) {$affected_rows = $dbhA->do("SET NAMES 'UTF8'");} + +### Grab Server values from the database +$stmtA = "SELECT local_gmt FROM servers where server_ip = '$server_ip';"; +$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; +$sthA->execute or die "executing: $stmtA ", $dbhA->errstr; +$sthArows=$sthA->rows; +$rec_count=0; +while ($sthArows > $rec_count) + { + @aryA = $sthA->fetchrow_array; + $DBSERVER_GMT = "$aryA[0]"; + if ($DBSERVER_GMT) {$SERVER_GMT = $DBSERVER_GMT;} + $rec_count++; + } +$sthA->finish(); $LOCAL_GMT_OFF = $SERVER_GMT; $LOCAL_GMT_OFF_STD = $SERVER_GMT; diff --git a/agc_2-X/trunk/www/vicidial/new_listloader_superL.php b/agc_2-X/trunk/www/vicidial/new_listloader_superL.php index 4ae2050f..c8b32631 100644 --- a/agc_2-X/trunk/www/vicidial/new_listloader_superL.php +++ b/agc_2-X/trunk/www/vicidial/new_listloader_superL.php @@ -19,6 +19,7 @@ # 61128-1149 - added postal code GMT lookup and duplicate check options # 70417-1059 - Fixed default phone_code bug # 70510-1518 - Added campaign and system duplicate check and phonecode override +# 80428-0417 - UTF8 changes # # 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. @@ -113,10 +114,28 @@ if (isset($_GET["phone_code_override"])) {$phone_code_override=$_GET["phone_co # $country_field=$_GET["country_field"]; if (!$country_field) {$country_field=$_POST["country_field"];} +############################################# +##### START SYSTEM_SETTINGS LOOKUP ##### +$stmt = "SELECT use_non_latin FROM system_settings;"; +$rslt=mysql_query($stmt, $link); +if ($DB) {echo "$stmt\n";} +$qm_conf_ct = mysql_num_rows($rslt); +$i=0; +while ($i < $qm_conf_ct) + { + $row=mysql_fetch_row($rslt); + $non_latin = $row[0]; + $i++; + } +##### END SETTINGS LOOKUP ##### +########################################### + +if ($non_latin < 1) +{ $PHP_AUTH_USER = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_USER); $PHP_AUTH_PW = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_PW); $list_id_override = ereg_replace("[^0-9]","",$list_id_override); - +} $STARTtime = date("U"); $TODAY = date("Y-m-d"); @@ -125,6 +144,7 @@ $FILE_datetime = $STARTtime; $stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 7;"; if ($DB) {echo "|$stmt|\n";} +if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $auth=$row[0]; @@ -144,6 +164,9 @@ $browser = getenv("HTTP_USER_AGENT"); else { header ("Content-type: text/html; charset=utf-8"); + header ("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1 + header ("Pragma: no-cache"); // HTTP/1.0 + if($auth>0) { $office_no=strtoupper($PHP_AUTH_USER);