diff --git a/LANG_www/agc_es/conf_exten_check.php b/LANG_www/agc_es/conf_exten_check.php index e0bd50ec..c8215eb1 100644 --- a/LANG_www/agc_es/conf_exten_check.php +++ b/LANG_www/agc_es/conf_exten_check.php @@ -52,17 +52,22 @@ # 100109-1337 - Fixed Manual dial live call detection # 100527-0957 - Added send_dtmf, transfer_conference and park_call API functions # 100727-2209 - Added timer actions for hangup, extension, callmenu and ingroup as well as destination +# 101123-1105 - Added api manual dial queue feature to external_dial function +# 101208-0308 - Moved the Calls in Queue count and other counts outside of the autodial section (issue 406) # -$version = '2.4-27'; -$build = '100727-2209'; +$version = '2.4-29'; +$build = '101208-0308'; $mel=1; # Mysql Error Log enabled = 1 -$mysql_log_count=32; +$mysql_log_count=36; $one_mysql_log=0; +$DB=0; require("dbconnect.php"); ### If you have globals turned off uncomment these lines +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["pass"])) {$pass=$_GET["pass"];} @@ -215,7 +220,7 @@ echo "
if ($Acount > 0) { - $stmt="SELECT status,callerid,agent_log_id,campaign_id from vicidial_live_agents where user='$user' and server_ip='$server_ip';"; + $stmt="SELECT status,callerid,agent_log_id,campaign_id,lead_id from vicidial_live_agents where user='$user' and server_ip='$server_ip';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_query($stmt, $link); if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'03004',$user,$server_ip,$session_name,$one_mysql_log);} @@ -224,6 +229,17 @@ echo " $Acallerid = $row[1]; $Aagent_log_id = $row[2]; $Acampaign_id = $row[3]; + $Alead_id = $row[4]; + + $api_manual_dial='STANDARD'; + $stmt = "SELECT api_manual_dial FROM vicidial_campaigns where campaign_id='$Acampaign_id';"; + $rslt=mysql_query($stmt, $link); + $vcc_conf_ct = mysql_num_rows($rslt); + if ($vcc_conf_ct > 0) + { + $row=mysql_fetch_row($rslt); + $api_manual_dial = $row[0]; + } } # ### find out if external table shows agent should be disabled # $stmt="SELECT count(*) from another_table where user='$user' and status='DEAD';"; @@ -232,6 +248,53 @@ echo " # $row=mysql_fetch_row($rslt); # $AexternalDEAD=$row[0]; + ##### BEGIN check en calls in queue, number of active calls in the campaign + if ($campagentstdisp == 'YES') + { + $ADsql=''; + ### grab the status of this agent to display + $stmt="SELECT status,campaign_id,closer_campaigns from vicidial_live_agents where user='$user' and server_ip='$server_ip';"; + if ($DB) {echo "|$stmt|\n";} + $rslt=mysql_query($stmt, $link); + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'03006',$user,$server_ip,$session_name,$one_mysql_log);} + $row=mysql_fetch_row($rslt); + $Alogin=$row[0]; + $Acampaign=$row[1]; + $AccampSQL=$row[2]; + $AccampSQL = ereg_replace(' -','', $AccampSQL); + $AccampSQL = ereg_replace(' ',"','", $AccampSQL); + if (eregi('AGENTDIRECT', $AccampSQL)) + { + $AccampSQL = ereg_replace('AGENTDIRECT','', $AccampSQL); + $ADsql = "or ( (campaign_id LIKE \"%AGENTDIRECT%\") and (agent_only='$user') )"; + } + + ### grab the number of calls being placed from this server and campaign + $stmt="SELECT count(*) from vicidial_auto_calls where status IN('LIVE') and ( (campaign_id='$Acampaign') or (campaign_id IN('$AccampSQL')) $ADsql);"; + if ($DB) {echo "|$stmt|\n";} + $rslt=mysql_query($stmt, $link); + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'03007',$user,$server_ip,$session_name,$one_mysql_log);} + $row=mysql_fetch_row($rslt); + $RingCalls=$row[0]; + if ($RingCalls > 0) {$RingCalls = "Pide, en la cola: $RingCalls";} + else {$RingCalls = "Pide, en la cola: $RingCalls";} + + ### grab the number of calls being placed from this server and campaign + $stmt="SELECT count(*) from vicidial_auto_calls where status NOT IN('XFER') and ( (campaign_id='$Acampaign') or (campaign_id IN('$AccampSQL')) );"; + if ($DB) {echo "|$stmt|\n";} + $rslt=mysql_query($stmt, $link); + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'03008',$user,$server_ip,$session_name,$one_mysql_log);} + $row=mysql_fetch_row($rslt); + $DiaLCalls=$row[0]; + } + else + { + $Alogin='N'; + $RingCalls='N'; + $DiaLCalls='N'; + } + ##### END check en calls in queue, number of active calls in the campaign + if ($auto_dial_level > 0) { ### update the vicidial_live_agents every second with a new random number so it is shown to be alive @@ -285,59 +348,9 @@ echo " } } ##### END DEAD logging section ##### - - if ($campagentstdisp == 'YES') - { - $ADsql=''; - ### grab the status of this agent to display - $stmt="SELECT status,campaign_id,closer_campaigns from vicidial_live_agents where user='$user' and server_ip='$server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'03006',$user,$server_ip,$session_name,$one_mysql_log);} - $row=mysql_fetch_row($rslt); - $Alogin=$row[0]; - $Acampaign=$row[1]; - $AccampSQL=$row[2]; - $AccampSQL = ereg_replace(' -','', $AccampSQL); - $AccampSQL = ereg_replace(' ',"','", $AccampSQL); - if (eregi('AGENTDIRECT', $AccampSQL)) - { - $AccampSQL = ereg_replace('AGENTDIRECT','', $AccampSQL); - $ADsql = "or ( (campaign_id LIKE \"%AGENTDIRECT%\") and (agent_only='$user') )"; - } - - ### grab the number of calls being placed from this server and campaign - $stmt="SELECT count(*) from vicidial_auto_calls where status IN('LIVE') and ( (campaign_id='$Acampaign') or (campaign_id IN('$AccampSQL')) $ADsql);"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'03007',$user,$server_ip,$session_name,$one_mysql_log);} - $row=mysql_fetch_row($rslt); - $RingCalls=$row[0]; - if ($RingCalls > 0) {$RingCalls = "Pide, en la cola: $RingCalls";} - else {$RingCalls = "Pide, en la cola: $RingCalls";} - - ### grab the number of calls being placed from this server and campaign - $stmt="SELECT count(*) from vicidial_auto_calls where status NOT IN('XFER') and ( (campaign_id='$Acampaign') or (campaign_id IN('$AccampSQL')) );"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'03008',$user,$server_ip,$session_name,$one_mysql_log);} - $row=mysql_fetch_row($rslt); - $DiaLCalls=$row[0]; - - } - else - { - $Alogin='N'; - $RingCalls='N'; - $DiaLCalls='N'; - } } else { - $Alogin='N'; - $RingCalls='N'; - $DiaLCalls='N'; - ### update the vicidial_live_agents every second with a new random number so it is shown to be alive $stmt="UPDATE vicidial_live_agents set random_id='$random' where user='$user' and server_ip='$server_ip';"; if ($format=='debug') {echo "\n";} @@ -410,6 +423,52 @@ echo " $external_park = $row[11]; $timer_action_destination = $row[12]; + $MDQ_count=0; + if ( ($api_manual_dial=='QUEUE') or ($api_manual_dial=='QUEUE_AND_AUTOCALL') ) + { + $stmt="SELECT count(*) FROM vicidial_manual_dial_queue where user='$user' and status='READY';"; + $rslt=mysql_query($stmt, $link); + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'03033',$user,$server_ip,$session_name,$one_mysql_log);} + if ($DB) {echo "$stmt\n";} + $mdq_count_record_ct = mysql_num_rows($rslt); + if ($mdq_count_record_ct > 0) + { + $row=mysql_fetch_row($rslt); + $MDQ_count = $row[0]; + } + + if ( ($MDQ_count > 0) and (strlen($external_dial) < 16) and ($Astatus=='PAUSED') and ($Alead_id < 1) ) + { + $stmt="SELECT mdq_id,external_dial FROM vicidial_manual_dial_queue where user='$user' and status='READY' order by entry_time limit 1;"; + $rslt=mysql_query($stmt, $link); + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'03034',$user,$server_ip,$session_name,$one_mysql_log);} + if ($DB) {echo "$stmt\n";} + $mdq_record_ct = mysql_num_rows($rslt); + if ($mdq_record_ct > 0) + { + $row=mysql_fetch_row($rslt); + $MDQ_mdq_id = $row[0]; + $MDQ_external_dial = $row[1]; + $external_dial = $MDQ_external_dial; + + $stmt="UPDATE vicidial_manual_dial_queue SET status='QUEUE' where mdq_id='$MDQ_mdq_id';"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'03035',$VD_login,$server_ip,$session_name,$one_mysql_log);} + $UMDQaffected_rows_update = mysql_affected_rows($link); + + if ($UMDQaffected_rows_update > 0) + { + $stmt="UPDATE vicidial_live_agents SET external_dial='$MDQ_external_dial' where user='$user' and server_ip='$server_ip';"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'03036',$VD_login,$server_ip,$session_name,$one_mysql_log);} + $VLAMDQaffected_rows_update = mysql_affected_rows($link); + } + } + } + } + if (strlen($external_status)<1) {$external_status = '::::::::::';} $web_epoch = date("U"); @@ -578,7 +637,7 @@ echo " if ($Ashift_logout > 0) {$Alogin='SHIFT_LOGOUT';} - echo 'DateTime: ' . $NOW_TIME . '|UnixTime: ' . $StarTtime . '|Logged-in: ' . $Alogin . '|CampCalls: ' . $RingCalls . '|Estado: ' . $Astatus . '|DiaLCalls: ' . $DiaLCalls . '|APIHanguP: ' . $external_hangup . '|APIStatuS: ' . $external_status . '|APIPausE: ' . $external_pause . '|APIDiaL: ' . $external_dial . '|DEADcall: ' . $DEADcustomer . '|InGroupChange: ' . $InGroupChangeDetails . '|APIFields: ' . $external_update_fields . '|APIFieldsData: ' . $external_update_fields_data . '|APITimerAction: ' . $timer_action . '|APITimerMessage: ' . $timer_action_message . '|APITimerSeconds: ' . $timer_action_seconds . '|APIdtmf: ' . $external_dtmf . '|APItransferconf: ' . $external_transferconf . '|APIpark: ' . $external_park . '|APITimerDestination: ' . $timer_action_destination . "\n"; + echo 'DateTime: ' . $NOW_TIME . '|UnixTime: ' . $StarTtime . '|Logged-in: ' . $Alogin . '|CampCalls: ' . $RingCalls . '|Estado: ' . $Astatus . '|DiaLCalls: ' . $DiaLCalls . '|APIHanguP: ' . $external_hangup . '|APIStatuS: ' . $external_status . '|APIPausE: ' . $external_pause . '|APIDiaL: ' . $external_dial . '|DEADcall: ' . $DEADcustomer . '|InGroupChange: ' . $InGroupChangeDetails . '|APIFields: ' . $external_update_fields . '|APIFieldsData: ' . $external_update_fields_data . '|APITimerAction: ' . $timer_action . '|APITimerMessage: ' . $timer_action_message . '|APITimerSeconds: ' . $timer_action_seconds . '|APIdtmf: ' . $external_dtmf . '|APItransferconf: ' . $external_transferconf . '|APIpark: ' . $external_park . '|APITimerDestination: ' . $timer_action_destination . '|APIManualDialQueue: ' . $MDQ_count . "\n"; if (strlen($timer_action) > 3) { diff --git a/LANG_www/agc_es/css/custom.css b/LANG_www/agc_es/css/custom.css new file mode 100644 index 00000000..8d1c8b69 --- /dev/null +++ b/LANG_www/agc_es/css/custom.css @@ -0,0 +1 @@ + diff --git a/LANG_www/agc_es/css/style.css b/LANG_www/agc_es/css/style.css new file mode 100644 index 00000000..2e30a009 --- /dev/null +++ b/LANG_www/agc_es/css/style.css @@ -0,0 +1,26 @@ +/* /!\ DO NOT EDIT THIS FILE !!! Please edit custom.css to keep your customizations after an upgrade /!\ */ + +body { padding:0; margin:0; background: #FFF; } + +div.scroll_list { height: 400px; width: 140px; overflow: scroll; } +div.text_input { overflow: auto; font-size: 10px; font-family: sans-serif; } +.body_text { font-size: 13px; font-family: sans-serif; } +.queue_text_red { font-size: 12px; font-family: sans-serif; font-weight: bold; color: red; } +.queue_text { font-size: 12px; font-family: sans-serif; color: black; text-decoration:none; } +.preview_text { font-size: 13px; font-family: sans-serif; background: #CCFFCC; } +.preview_text_red { font-size: 13px; font-family: sans-serif; background: #FFCCCC; } +.body_small { font-size: 11px; font-family: sans-serif; } +.body_small_bold { font-size: 11px; font-family: sans-serif; font-weight: bold; } +.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; } +.cust_form { font-family: sans-serif; font-size: 10px; overflow: hidden; } +.cust_form_text { font-family: sans-serif; font-size: 10px; overflow: auto; } diff --git a/LANG_www/agc_es/functions.php b/LANG_www/agc_es/functions.php index 9af6831b..12fd19a6 100644 --- a/LANG_www/agc_es/functions.php +++ b/LANG_www/agc_es/functions.php @@ -9,6 +9,7 @@ # # CHANGES: # 100629-1201 - First Build +# 101124-0625 - Added lookup_gmt and dialable_gmt functions # @@ -496,6 +497,902 @@ function custom_list_fields_values($lead_id,$list_id,$uniqueid,$user) +##### LOOKUP GMT, FINDS THE CURRENT GMT OFFSET FOR A PHONE NUMBER ##### + +function lookup_gmt($phone_code,$USarea,$state,$LOCAL_GMT_OFF_STD,$Shour,$Smin,$Ssec,$Smon,$Smday,$Syear,$postalgmt,$postal_code) + { + require("dbconnect.php"); + + $postalgmt_found=0; + if ( (eregi("POSTAL",$postalgmt)) && (strlen($postal_code)>4) ) + { + if (preg_match('/^1$/', $phone_code)) + { + $stmt="select postal_code,state,GMT_offset,DST,DST_range,country,country_code 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 country_code,country,areacode,state,GMT_offset,DST,DST_range,geographic_description 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 country_code,country,areacode,state,GMT_offset,DST,DST_range,geographic_description 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 country_code,country,areacode,state,GMT_offset,DST,DST_range,geographic_description 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 country_code,country,areacode,state,GMT_offset,DST,DST_range,geographic_description 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 { # local time 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 { # local time calculations + if ($ns < 7200) { + $USA_DST=1; + } else { + $USA_DST=0; + } + } + } else { + $USA_DST=0; + } + } # end of month checks + + if ($DBX) {print " DST: $USA_DST\n";} + if ($USA_DST) {$gmt_offset++;} + $AC_processed++; + } + + if ( (!$AC_processed) and ($dst_range == 'LSM-LSO') ) + { + if ($DBX) {print " Last Sunday March to Last Sunday October\n";} + #********************************************************************** + # This is s 1 if Daylight Savings Time is in effect and 0 if + # Standard time is in effect. + # Based on last Sunday in March and last Sunday in October at 1 am. + #********************************************************************** + + $GBR_DST=0; + $mm = $mon; + $dd = $mday; + $ns = $dsec; + $dow= $wday; + + if ($mm < 3 || $mm > 10) { + $GBR_DST=0; + } elseif ($mm >= 4 and $mm <= 9) { + $GBR_DST=1; + } elseif ($mm == 3) { + if ($dd < 25) { + $GBR_DST=0; + } elseif ($dd < ($dow+25)) { + $GBR_DST=0; + } elseif ($dow == 0) { + if ($timezone) { # UTC calculations + if ($ns < (3600+($timezone-1)*3600)) { + $GBR_DST=0; + } else { + $GBR_DST=1; + } + } else { # local time calculations + if ($ns < 3600) { + $GBR_DST=0; + } else { + $GBR_DST=1; + } + } + } else { + $GBR_DST=1; + } + } elseif ($mm == 10) { + if ($dd < 25) { + $GBR_DST=1; + } elseif ($dd < ($dow+25)) { + $GBR_DST=1; + } elseif ($dow == 0) { + if ($timezone) { # UTC calculations + if ($ns < (3600+($timezone-1)*3600)) { + $GBR_DST=1; + } else { + $GBR_DST=0; + } + } else { # local time calculations + if ($ns < 3600) { + $GBR_DST=1; + } else { + $GBR_DST=0; + } + } + } else { + $GBR_DST=0; + } + } # end of month checks + if ($DBX) {print " DST: $GBR_DST\n";} + if ($GBR_DST) {$gmt_offset++;} + $AC_processed++; + } + if ( (!$AC_processed) and ($dst_range == 'LSO-LSM') ) + { + if ($DBX) {print " Last Sunday October to Last Sunday March\n";} + #********************************************************************** + # This is s 1 if Daylight Savings Time is in effect and 0 if + # Standard time is in effect. + # Based on last Sunday in October and last Sunday in March at 1 am. + #********************************************************************** + + $AUS_DST=0; + $mm = $mon; + $dd = $mday; + $ns = $dsec; + $dow= $wday; + + if ($mm < 3 || $mm > 10) { + $AUS_DST=1; + } elseif ($mm >= 4 and $mm <= 9) { + $AUS_DST=0; + } elseif ($mm == 3) { + if ($dd < 25) { + $AUS_DST=1; + } elseif ($dd < ($dow+25)) { + $AUS_DST=1; + } elseif ($dow == 0) { + if ($timezone) { # UTC calculations + if ($ns < (3600+($timezone-1)*3600)) { + $AUS_DST=1; + } else { + $AUS_DST=0; + } + } else { # local time calculations + if ($ns < 3600) { + $AUS_DST=1; + } else { + $AUS_DST=0; + } + } + } else { + $AUS_DST=0; + } + } elseif ($mm == 10) { + if ($dd < 25) { + $AUS_DST=0; + } elseif ($dd < ($dow+25)) { + $AUS_DST=0; + } elseif ($dow == 0) { + if ($timezone) { # UTC calculations + if ($ns < (3600+($timezone-1)*3600)) { + $AUS_DST=0; + } else { + $AUS_DST=1; + } + } else { # local time calculations + if ($ns < 3600) { + $AUS_DST=0; + } else { + $AUS_DST=1; + } + } + } else { + $AUS_DST=1; + } + } # end of month checks + if ($DBX) {print " DST: $AUS_DST\n";} + if ($AUS_DST) {$gmt_offset++;} + $AC_processed++; + } + + if ( (!$AC_processed) and ($dst_range == 'FSO-LSM') ) + { + if ($DBX) {print " First Sunday October to Last Sunday March\n";} + #********************************************************************** + # TASMANIA ONLY + # This is s 1 if Daylight Savings Time is in effect and 0 if + # Standard time is in effect. + # Based on first Sunday in October and last Sunday in March at 1 am. + #********************************************************************** + + $AUST_DST=0; + $mm = $mon; + $dd = $mday; + $ns = $dsec; + $dow= $wday; + + if ($mm < 3 || $mm > 10) { + $AUST_DST=1; + } elseif ($mm >= 4 and $mm <= 9) { + $AUST_DST=0; + } elseif ($mm == 3) { + if ($dd < 25) { + $AUST_DST=1; + } elseif ($dd < ($dow+25)) { + $AUST_DST=1; + } elseif ($dow == 0) { + if ($timezone) { # UTC calculations + if ($ns < (3600+($timezone-1)*3600)) { + $AUST_DST=1; + } else { + $AUST_DST=0; + } + } else { # local time calculations + if ($ns < 3600) { + $AUST_DST=1; + } else { + $AUST_DST=0; + } + } + } else { + $AUST_DST=0; + } + } elseif ($mm == 10) { + if ($dd > 7) { + $AUST_DST=1; + } elseif ($dd >= ($dow+1)) { + if ($timezone) { + if ($dow == 0 and $ns < (7200+$timezone*3600)) { + $AUST_DST=0; + } else { + $AUST_DST=1; + } + } else { + if ($dow == 0 and $ns < 3600) { + $AUST_DST=0; + } else { + $AUST_DST=1; + } + } + } else { + $AUST_DST=0; + } + } # end of month checks + if ($DBX) {print " DST: $AUST_DST\n";} + if ($AUST_DST) {$gmt_offset++;} + $AC_processed++; + } + + if ( (!$AC_processed) and ($dst_range == 'FSO-FSA') ) + { + if ($DBX) {print " Sunday in October to First Sunday in April\n";} + #********************************************************************** + # FSO-FSA + # 2008+ AUSTRALIA ONLY (country code 61) + # This is returns 1 if Daylight Savings Time is in effect and 0 if + # Standard time is in effect. + # Based on first Sunday in October and first Sunday in April at 1 am. + #********************************************************************** + + $AUSE_DST=0; + $mm = $mon; + $dd = $mday; + $ns = $dsec; + $dow= $wday; + + if ($mm < 4 or $mm > 10) { + $AUSE_DST=1; + } elseif ($mm >= 5 and $mm <= 9) { + $AUSE_DST=0; + } elseif ($mm == 4) { + if ($dd > 7) { + $AUSE_DST=0; + } elseif ($dd >= ($dow+1)) { + if ($timezone) { + if ($dow == 0 and $ns < (3600+$timezone*3600)) { + $AUSE_DST=1; + } else { + $AUSE_DST=0; + } + } else { + if ($dow == 0 and $ns < 7200) { + $AUSE_DST=1; + } else { + $AUSE_DST=0; + } + } + } else { + $AUSE_DST=1; + } + } elseif ($mm == 10) { + if ($dd >= 8) { + $AUSE_DST=1; + } elseif ($dd >= ($dow+1)) { + if ($timezone) { + if ($dow == 0 and $ns < (7200+$timezone*3600)) { + $AUSE_DST=0; + } else { + $AUSE_DST=1; + } + } else { + if ($dow == 0 and $ns < 3600) { + $AUSE_DST=0; + } else { + $AUSE_DST=1; + } + } + } else { + $AUSE_DST=0; + } + } # end of month checks + if ($DBX) {print " DST: $AUSE_DST\n";} + if ($AUSE_DST) {$gmt_offset++;} + $AC_processed++; + } + + if ( (!$AC_processed) and ($dst_range == 'FSO-TSM') ) + { + if ($DBX) {print " First Sunday October to Third Sunday March\n";} + #********************************************************************** + # This is s 1 if Daylight Savings Time is in effect and 0 if + # Standard time is in effect. + # Based on first Sunday in October and third Sunday in March at 1 am. + #********************************************************************** + + $NZL_DST=0; + $mm = $mon; + $dd = $mday; + $ns = $dsec; + $dow= $wday; + + if ($mm < 3 || $mm > 10) { + $NZL_DST=1; + } elseif ($mm >= 4 and $mm <= 9) { + $NZL_DST=0; + } elseif ($mm == 3) { + if ($dd < 14) { + $NZL_DST=1; + } elseif ($dd < ($dow+14)) { + $NZL_DST=1; + } elseif ($dow == 0) { + if ($timezone) { # UTC calculations + if ($ns < (3600+($timezone-1)*3600)) { + $NZL_DST=1; + } else { + $NZL_DST=0; + } + } else { # local time calculations + if ($ns < 3600) { + $NZL_DST=1; + } else { + $NZL_DST=0; + } + } + } else { + $NZL_DST=0; + } + } elseif ($mm == 10) { + if ($dd > 7) { + $NZL_DST=1; + } elseif ($dd >= ($dow+1)) { + if ($timezone) { + if ($dow == 0 and $ns < (7200+$timezone*3600)) { + $NZL_DST=0; + } else { + $NZL_DST=1; + } + } else { + if ($dow == 0 and $ns < 3600) { + $NZL_DST=0; + } else { + $NZL_DST=1; + } + } + } else { + $NZL_DST=0; + } + } # end of month checks + if ($DBX) {print " DST: $NZL_DST\n";} + if ($NZL_DST) {$gmt_offset++;} + $AC_processed++; + } + + if ( (!$AC_processed) and ($dst_range == 'LSS-FSA') ) + { + if ($DBX) {print " Last Sunday in September to First Sunday in April\n";} + #********************************************************************** + # LSS-FSA + # 2007+ NEW ZEALAND (country code 64) + # This is returns 1 if Daylight Savings Time is in effect and 0 if + # Standard time is in effect. + # Based on last Sunday in September and first Sunday in April at 1 am. + #********************************************************************** + + $NZLN_DST=0; + $mm = $mon; + $dd = $mday; + $ns = $dsec; + $dow= $wday; + + if ($mm < 4 || $mm > 9) { + $NZLN_DST=1; + } elseif ($mm >= 5 && $mm <= 9) { + $NZLN_DST=0; + } elseif ($mm == 4) { + if ($dd > 7) { + $NZLN_DST=0; + } elseif ($dd >= ($dow+1)) { + if ($timezone) { + if ($dow == 0 && $ns < (3600+$timezone*3600)) { + $NZLN_DST=1; + } else { + $NZLN_DST=0; + } + } else { + if ($dow == 0 && $ns < 7200) { + $NZLN_DST=1; + } else { + $NZLN_DST=0; + } + } + } else { + $NZLN_DST=1; + } + } elseif ($mm == 9) { + if ($dd < 25) { + $NZLN_DST=0; + } elseif ($dd < ($dow+25)) { + $NZLN_DST=0; + } elseif ($dow == 0) { + if ($timezone) { # UTC calculations + if ($ns < (3600+($timezone-1)*3600)) { + $NZLN_DST=0; + } else { + $NZLN_DST=1; + } + } else { # local time calculations + if ($ns < 3600) { + $NZLN_DST=0; + } else { + $NZLN_DST=1; + } + } + } else { + $NZLN_DST=1; + } + } # end of month checks + if ($DBX) {print " DST: $NZLN_DST\n";} + if ($NZLN_DST) {$gmt_offset++;} + $AC_processed++; + } + + if ( (!$AC_processed) and ($dst_range == 'TSO-LSF') ) + { + if ($DBX) {print " Third Sunday October to Last Sunday February\n";} + #********************************************************************** + # 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 { # local time 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 { # local time 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; + } + + + + + +##### DETERMINE IF LEAD IS DIALABLE ##### +function dialable_gmt($DB,$link,$local_call_time,$gmt_offset,$state) + { + require("dbconnect.php"); + + $dialable=0; + + $pzone=3600 * $gmt_offset; + $pmin=(gmdate("i", time() + $pzone)); + $phour=( (gmdate("G", time() + $pzone)) * 100); + $pday=gmdate("w", time() + $pzone); + $tz = sprintf("%.2f", $p); + $GMT_gmt = "$tz"; + $GMT_day = "$pday"; + $GMT_hour = ($phour + $pmin); + + $stmt="SELECT call_time_id,call_time_name,call_time_comments,ct_default_start,ct_default_stop,ct_sunday_start,ct_sunday_stop,ct_monday_start,ct_monday_stop,ct_tuesday_start,ct_tuesday_stop,ct_wednesday_start,ct_wednesday_stop,ct_thursday_start,ct_thursday_stop,ct_friday_start,ct_friday_stop,ct_saturday_start,ct_saturday_stop,ct_state_call_times 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]; + + if ($GMT_day==0) #### Sunday local time + { + if (($Gct_sunday_start==0) and ($Gct_sunday_stop==0)) + { + if ( ($GMT_hour>=$Gct_default_start) and ($GMT_hour<$Gct_default_stop) ) + {$dialable=1;} + } + else + { + if ( ($GMT_hour>=$Gct_sunday_start) and ($GMT_hour<$Gct_sunday_stop) ) + {$dialable=1;} + } + } + if ($GMT_day==1) #### Monday local time + { + if (($Gct_monday_start==0) and ($Gct_monday_stop==0)) + { + if ( ($GMT_hour>=$Gct_default_start) and ($GMT_hour<$Gct_default_stop) ) + {$dialable=1;} + } + else + { + if ( ($GMT_hour>=$Gct_monday_start) and ($GMT_hour<$Gct_monday_stop) ) + {$dialable=1;} + } + } + if ($GMT_day==2) #### Tuesday local time + { + if (($Gct_tuesday_start==0) and ($Gct_tuesday_stop==0)) + { + if ( ($GMT_hour>=$Gct_default_start) and ($GMT_hour<$Gct_default_stop) ) + {$dialable=1;} + } + else + { + if ( ($GMT_hour>=$Gct_tuesday_start) and ($GMT_hour<$Gct_tuesday_stop) ) + {$dialable=1;} + } + } + if ($GMT_day==3) #### Wednesday local time + { + if (($Gct_wednesday_start==0) and ($Gct_wednesday_stop==0)) + { + if ( ($GMT_hour>=$Gct_default_start) and ($GMT_hour<$Gct_default_stop) ) + {$dialable=1;} + } + else + { + if ( ($GMT_hour>=$Gct_wednesday_start) and ($GMT_hour<$Gct_wednesday_stop) ) + {$dialable=1;} + } + } + if ($GMT_day==4) #### Thursday local time + { + if (($Gct_thursday_start==0) and ($Gct_thursday_stop==0)) + { + if ( ($GMT_hour>=$Gct_default_start) and ($GMT_hour<$Gct_default_stop) ) + {$dialable=1;} + } + else + { + if ( ($GMT_hour>=$Gct_thursday_start) and ($GMT_hour<$Gct_thursday_stop) ) + {$dialable=1;} + } + } + if ($GMT_day==5) #### Friday local time + { + if (($Gct_friday_start==0) and ($Gct_friday_stop==0)) + { + if ( ($GMT_hour>=$Gct_default_start) and ($GMT_hour<$Gct_default_stop) ) + {$dialable=1;} + } + else + { + if ( ($GMT_hour>=$Gct_friday_start) and ($GMT_hour<$Gct_friday_stop) ) + {$dialable=1;} + } + } + if ($GMT_day==6) #### Saturday local time + { + if (($Gct_saturday_start==0) and ($Gct_saturday_stop==0)) + { + if ( ($GMT_hour>=$Gct_default_start) and ($GMT_hour<$Gct_default_stop) ) + {$dialable=1;} + } + else + { + if ( ($GMT_hour>=$Gct_saturday_start) and ($GMT_hour<$Gct_saturday_stop) ) + {$dialable=1;} + } + } + + return $dialable; + } + + ##### MySQL Error Logging ##### function mysql_error_logging($NOW_TIME,$link,$mel,$stmt,$query_id,$user,$server_ip,$session_name,$one_mysql_log) diff --git a/LANG_www/agc_es/manager_send.php b/LANG_www/agc_es/manager_send.php index 952beb0d..70cc3849 100644 --- a/LANG_www/agc_es/manager_send.php +++ b/LANG_www/agc_es/manager_send.php @@ -1,7 +1,7 @@ LICENSE: AGPLv2 +# Copyright (C) 2011 Matt Florell| # | "; + echo "NAME | "; + echo "PHONE | "; + echo "ESTADO | "; + echo "LAST LLAMADA | "; + echo "CITY | "; + echo "STATE | "; + echo "ZIP | "; + echo "INFO | "; + echo "DIAL | "; + echo "
| No results found | |||||||||
| $u | "; + echo "$ALLname[$i] | \n"; + echo "$ALLphone_code[$i] $ALLphone_number[$i] | \n"; + echo "$ALLstatus[$i] | \n"; + echo "$ALLcall_date[$i] | \n"; + echo "$ALLcity[$i] | \n"; + echo "$ALLstate[$i] | \n"; + echo "$ALLpostal_code[$i] | \n"; + echo "INFO | \n"; + echo "DIAL | \n"; + echo "
| No results found | |||||||||
| Callback Estado: | $row[0] |
| Callback Lead Estado: | $row[7] |
| Callback Entry Time: | $row[1] |
| Callback Trigger Time: | $row[2] |
| Callback Comentarios: | $row[6] |
| Estado: | $row[0] |
| $label_vendor_lead_code: | $row[1] |
| List ID: | $row[2] |
| Timezone: | $row[3] |
| Llamado Since Último Reset: | $row[4] |
| $label_phone_code: | $row[5] |
| $label_phone_number: | $row[6] - DIAL |
| $label_title: | $row[7] |
| $label_first_name: | $row[8] |
| $label_middle_initial: | $row[9] |
| $label_last_name: | $row[10] |
| $label_address1: | $row[11] |
| $label_address2: | $row[12] |
| $label_address3: | $row[13] |
| $label_city: | $row[14] |
| $label_state: | $row[15] |
| $label_province: | $row[16] |
| $label_postal_code: | $row[17] |
| Country: | $row[18] |
| $label_gender: | $row[19] |
| $label_alt_phone: | $row[20] - DIAL |
| $label_email: | $row[21] |
| $label_security_phrase: | $row[22] |
| $label_comments: | $row[23] |
| Llamado Count: | $row[24] |
| Último Local Call Time: | $row[25] |
| Rank: | $row[26] |
| Owner: | $row[27] |
| Entry List ID: | $row[28] |
| Estado: | $row[0] |
| $label_vendor_lead_code: | $row[1] |
| List ID: | $row[2] |
| Timezone: | $row[3] |
| Llamado Since Último Reset: | $row[4] |
| $label_phone_code: | $row[5] |
| $label_phone_number: | $row[6] - "; + if ($hide_dial_links < 1) + {$INFOout .= "DIAL";} + $INFOout .= " |
| $label_title: | $row[7] |
| $label_first_name: | $row[8] |
| $label_middle_initial: | $row[9] |
| $label_last_name: | $row[10] |
| $label_address1: | $row[11] |
| $label_address2: | $row[12] |
| $label_address3: | $row[13] |
| $label_city: | $row[14] |
| $label_state: | $row[15] |
| $label_province: | $row[16] |
| $label_postal_code: | $row[17] |
| Country: | $row[18] |
| $label_gender: | $row[19] |
| $label_alt_phone: | $row[20] - "; + if ($hide_dial_links < 1) + {$INFOout .= "DIAL";} + $INFOout .= " |
| $label_email: | $row[21] |
| $label_security_phrase: | $row[22] |
| $label_comments: | $row[23] |
| Llamado Count: | $row[24] |
| Último Local Call Time: | $row[25] |
| Rank: | $row[26] |
| Owner: | $row[27] |
| Entry List ID: | $row[28] |
| $A_field_name[$o]: | $A_field_value |
| # | "; + $NOTESout .= "DATE/TIME | "; + $NOTESout .= "AGENT | "; + $NOTESout .= "LENGTH | "; + $NOTESout .= "ESTADO | "; + $NOTESout .= "PHONE | "; + $NOTESout .= "CAMPAIGN | "; + $NOTESout .= "IN/OUT | "; + $NOTESout .= "ALT | "; + $NOTESout .= "HANGUP | "; + # $NOTESout .= "|
| FULL NAME | "; + $NOTESout .= "||||||||||
| No calls found | ||||||||||
| $u | "; + $NOTESout .= "$ALLcall_date[$i] | "; + $NOTESout .= "$ALLuser[$i] | \n"; + $NOTESout .= "$ALLlength_in_sec[$i] | \n"; + $NOTESout .= "$ALLstatus[$i] | \n"; + $NOTESout .= "$ALLphone_code[$i] $ALLphone_number[$i] | \n"; + $NOTESout .= "$ALLcampaign_id[$i] | \n"; + $NOTESout .= "$ALLin_out[$i] | \n"; + $NOTESout .= "$ALLalt_dial[$i] | \n"; + $NOTESout .= "$ALLhangup_reason[$i] | \n"; + $NOTESout .= "|
| "; + $NOTESout .= " | $Allcall_notes[$i] | "; + $NOTESout .= "|||||||||
| # | "; + echo "NAME | "; + echo "PHONE | "; + echo "STATO | "; + echo "LAST CHIAMATA | "; + echo "CITY | "; + echo "STATE | "; + echo "ZIP | "; + echo "INFO | "; + echo "CHIAMA | "; + echo "
| No results found | |||||||||
| $u | "; + echo "$ALLname[$i] | \n"; + echo "$ALLphone_code[$i] $ALLphone_number[$i] | \n"; + echo "$ALLstatus[$i] | \n"; + echo "$ALLcall_date[$i] | \n"; + echo "$ALLcity[$i] | \n"; + echo "$ALLstate[$i] | \n"; + echo "$ALLpostal_code[$i] | \n"; + echo "INFO | \n"; + echo "DIAL | \n"; + echo "
| No results found | |||||||||
| Callback Stato: | $row[0] |
| Callback Lead Stato: | $row[7] |
| Callback Entry Time: | $row[1] |
| Callback Trigger Time: | $row[2] |
| Callback Note: | $row[6] |
| Stato: | $row[0] |
| $label_vendor_lead_code: | $row[1] |
| List ID: | $row[2] |
| Timezone: | $row[3] |
| Chiamato Since Cognome Reset: | $row[4] |
| $label_phone_code: | $row[5] |
| $label_phone_number: | $row[6] - DIAL |
| $label_title: | $row[7] |
| $label_first_name: | $row[8] |
| $label_middle_initial: | $row[9] |
| $label_last_name: | $row[10] |
| $label_address1: | $row[11] |
| $label_address2: | $row[12] |
| $label_address3: | $row[13] |
| $label_city: | $row[14] |
| $label_state: | $row[15] |
| $label_province: | $row[16] |
| $label_postal_code: | $row[17] |
| Country: | $row[18] |
| $label_gender: | $row[19] |
| $label_alt_phone: | $row[20] - DIAL |
| $label_email: | $row[21] |
| $label_security_phrase: | $row[22] |
| $label_comments: | $row[23] |
| Chiamato Count: | $row[24] |
| Cognome Local Call Time: | $row[25] |
| Rank: | $row[26] |
| Owner: | $row[27] |
| Entry List ID: | $row[28] |
| Stato: | $row[0] |
| $label_vendor_lead_code: | $row[1] |
| List ID: | $row[2] |
| Timezone: | $row[3] |
| Chiamato Since Cognome Reset: | $row[4] |
| $label_phone_code: | $row[5] |
| $label_phone_number: | $row[6] - "; + if ($hide_dial_links < 1) + {$INFOout .= "DIAL";} + $INFOout .= " |
| $label_title: | $row[7] |
| $label_first_name: | $row[8] |
| $label_middle_initial: | $row[9] |
| $label_last_name: | $row[10] |
| $label_address1: | $row[11] |
| $label_address2: | $row[12] |
| $label_address3: | $row[13] |
| $label_city: | $row[14] |
| $label_state: | $row[15] |
| $label_province: | $row[16] |
| $label_postal_code: | $row[17] |
| Country: | $row[18] |
| $label_gender: | $row[19] |
| $label_alt_phone: | $row[20] - "; + if ($hide_dial_links < 1) + {$INFOout .= "DIAL";} + $INFOout .= " |
| $label_email: | $row[21] |
| $label_security_phrase: | $row[22] |
| $label_comments: | $row[23] |
| Chiamato Count: | $row[24] |
| Cognome Local Call Time: | $row[25] |
| Rank: | $row[26] |
| Owner: | $row[27] |
| Entry List ID: | $row[28] |
| $A_field_name[$o]: | $A_field_value |
| # | "; + $NOTESout .= "DATE/TIME | "; + $NOTESout .= "AGENT | "; + $NOTESout .= "LENGTH | "; + $NOTESout .= "STATO | "; + $NOTESout .= "PHONE | "; + $NOTESout .= "CAMPAIGN | "; + $NOTESout .= "IN/OUT | "; + $NOTESout .= "ALT | "; + $NOTESout .= "HANGUP | "; + # $NOTESout .= "|
| FULL NAME | "; + $NOTESout .= "||||||||||
| No calls found | ||||||||||
| $u | "; + $NOTESout .= "$ALLcall_date[$i] | "; + $NOTESout .= "$ALLuser[$i] | \n"; + $NOTESout .= "$ALLlength_in_sec[$i] | \n"; + $NOTESout .= "$ALLstatus[$i] | \n"; + $NOTESout .= "$ALLphone_code[$i] $ALLphone_number[$i] | \n"; + $NOTESout .= "$ALLcampaign_id[$i] | \n"; + $NOTESout .= "$ALLin_out[$i] | \n"; + $NOTESout .= "$ALLalt_dial[$i] | \n"; + $NOTESout .= "$ALLhangup_reason[$i] | \n"; + $NOTESout .= "|
| "; + $NOTESout .= " | $Allcall_notes[$i] | "; + $NOTESout .= "|||||||||