cleanup of LANG
git-svn-id: svn://192.168.202.10@15 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
@@ -1,369 +0,0 @@
|
||||
<?
|
||||
require("dbconnect.php");
|
||||
|
||||
##### depricated
|
||||
#require_once("htglobalize.php");
|
||||
|
||||
$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER'];
|
||||
$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW'];
|
||||
$PHP_SELF=$_SERVER['PHP_SELF'];
|
||||
$group=$_GET["group"]; if (!$group) {$group=$_POST["group"];}
|
||||
$query_date=$_GET["query_date"]; if (!$query_date) {$query_date=$_POST["query_date"];}
|
||||
$server_ip=$_GET["server_ip"]; if (!$server_ip) {$server_ip=$_POST["server_ip"];}
|
||||
$submit=$_GET["submit"]; if (!$submit) {$submit=$_POST["submit"];}
|
||||
$SUBMIT=$_GET["SUBMIT"]; if (!$SUBMIT) {$SUBMIT=$_POST["SUBMIT"];}
|
||||
|
||||
# AST_inboundEXTstats.php
|
||||
|
||||
$NOW_DATE = date("Y-m-d");
|
||||
$NOW_TIME = date("Y-m-d H:i:s");
|
||||
$STARTtime = date("U");
|
||||
if (!$query_date) {$query_date = $NOW_DATE;}
|
||||
if (!$server_ip) {$server_ip = '10.10.11.11';}
|
||||
|
||||
$stmt="select extension,full_number,inbound_name from inbound_numbers where server_ip='$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++;
|
||||
}
|
||||
?>
|
||||
|
||||
<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=iso-8859-1\">\n";
|
||||
#echo"<META HTTP-EQUIV=Refresh CONTENT=\"7; URL=$PHP_SELF?server_ip=$server_ip&DB=$DB\">\n";
|
||||
echo "<TITLE>ASTERISK: Inbound Calls Stats</TITLE></HEAD><BODY BGCOLOR=WHITE>\n";
|
||||
echo "<FORM ACTION=\"$PHP_SELF\" METHOD=GET>\n";
|
||||
echo "<INPUT TYPE=HIDDEN NAME=server_ip VALUE=\"$server_ip\">\n";
|
||||
echo "<INPUT TYPE=TEXT NAME=query_date SIZE=10 MAXLENGTH=10 VALUE=\"$query_date\">\n";
|
||||
echo "<SELECT SIZE=1 NAME=group>\n";
|
||||
$o=0;
|
||||
while ($inbound_to_print > $o)
|
||||
{
|
||||
if ($inbound[$o] == $group) {echo "<option selected value=\"$inbound[$o]\">$fullnum[$o] - $inbname[$o]</option>\n";}
|
||||
else {echo "<option value=\"$inbound[$o]\">$fullnum[$o] - $inbname[$o]</option>\n";}
|
||||
$o++;
|
||||
}
|
||||
echo "</SELECT>\n";
|
||||
echo "<INPUT TYPE=SUBMIT NAME=SUBMIT VALUE=SUBMIT>\n";
|
||||
echo "</FORM>\n\n";
|
||||
|
||||
echo "<PRE><FONT SIZE=2>\n\n";
|
||||
|
||||
|
||||
if (!$group)
|
||||
{
|
||||
echo "\n\n";
|
||||
echo "PLEASE SELECT A NUMBER AND DATE ABOVE AND CLICK SUBMIT\n";
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
|
||||
|
||||
echo "ASTERISK: Inbound Calls Stats $NOW_TIME\n";
|
||||
|
||||
echo "\n";
|
||||
echo "---------- TOTALS\n";
|
||||
|
||||
$stmt="select count(*),sum(length_in_sec) from call_log where start_time >= '$query_date 00:00:01' and start_time <= '$query_date 23:59:59' and server_ip='$server_ip' and extension='$group';";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$row=mysql_fetch_row($rslt);
|
||||
|
||||
$TOTALcalls = sprintf("%10s", $row[0]);
|
||||
$average_hold_seconds = ($row[1] / $row[0]);
|
||||
$average_hold_seconds = round($average_hold_seconds, 0);
|
||||
$average_hold_seconds = sprintf("%10s", $average_hold_seconds);
|
||||
|
||||
echo "Total Calls That came into this number: $TOTALcalls\n";
|
||||
echo "Average Call Length(seconds) for all Calls: $average_hold_seconds\n";
|
||||
|
||||
echo "\n";
|
||||
echo "---------- DROPS\n";
|
||||
|
||||
$stmt="select count(*),sum(length_in_sec) from call_log where start_time >= '$query_date 00:00:01' and start_time <= '$query_date 23:59:59' and server_ip='$server_ip' and extension='$group' 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 >= '$query_date 00:00:01' and start_time <= '$query_date 23:59:59' and server_ip='$server_ip' and extension='$group';";
|
||||
$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("%-10s", $row[0]);
|
||||
$CIDname = sprintf("%-15s", $row[1]); while(strlen($full_name)>15) {$full_name = substr("$full_name", 0, -1);}
|
||||
$datetime = sprintf("%-19s", $row[3]);
|
||||
$USERavgTALK = $row[2];
|
||||
|
||||
$USERavgTALK_M = ($USERavgTALK / 60);
|
||||
$USERavgTALK_M = round($USERavgTALK_M, 2);
|
||||
$USERavgTALK_M_int = intval("$USERavgTALK_M");
|
||||
$USERavgTALK_S = ($USERavgTALK_M - $USERavgTALK_M_int);
|
||||
$USERavgTALK_S = ($USERavgTALK_S * 60);
|
||||
$USERavgTALK_S = round($USERavgTALK_S, 0);
|
||||
if ($USERavgTALK_S < 10) {$USERavgTALK_S = "0$USERavgTALK_S";}
|
||||
$USERavgTALK_MS = "$USERavgTALK_M_int:$USERavgTALK_S";
|
||||
$USERavgTALK_MS = sprintf("%6s", $USERavgTALK_MS);
|
||||
|
||||
echo "| $CID | $CIDname | $USERavgTALK_MS | $datetime |\n";
|
||||
|
||||
$i++;
|
||||
}
|
||||
|
||||
echo "+------------+-----------------+--------+---------------------+\n";
|
||||
|
||||
##############################
|
||||
######### TIME STATS
|
||||
|
||||
if ($output == 'FULL')
|
||||
{
|
||||
|
||||
echo "\n";
|
||||
echo "---------- TIME STATS\n";
|
||||
|
||||
echo "<FONT SIZE=0>\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 >= '$query_date $h:00:00' and start_time <= '$query_date $h:14:59' and server_ip='$server_ip' and extension='$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 call_log where start_time >= '$query_date $h:00:00' and start_time <= '$query_date $h:14:59' and server_ip='$server_ip' and extension='$group' 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 >= '$query_date $h:15:00' and start_time <= '$query_date $h:29:59' and server_ip='$server_ip' and extension='$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 call_log where start_time >= '$query_date $h:15:00' and start_time <= '$query_date $h:29:59' and server_ip='$server_ip' and extension='$group' 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 >= '$query_date $h:30:00' and start_time <= '$query_date $h:44:59' and server_ip='$server_ip' and extension='$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 call_log where start_time >= '$query_date $h:30:00' and start_time <= '$query_date $h:44:59' and server_ip='$server_ip' and extension='$group' 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 >= '$query_date $h:45:00' and start_time <= '$query_date $h:59:59' and server_ip='$server_ip' and extension='$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 call_log where start_time >= '$query_date $h:45:00' and start_time <= '$query_date $h:59:59' and server_ip='$server_ip' and extension='$group' 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 "<!-- HICOUNT: $hi_hour_count|$hour_multiplier -->\n";
|
||||
echo "GRAPH IN 15 MINUTE INCREMENTS OF TOTAL CALLS\n";
|
||||
|
||||
$k=1;
|
||||
$Mk=0;
|
||||
$call_scale = '0';
|
||||
while ($k <= 102)
|
||||
{
|
||||
if ($Mk >= 5)
|
||||
{
|
||||
$Mk=0;
|
||||
$scale_num=($k / $hour_multiplier);
|
||||
$scale_num = round($scale_num, 0);
|
||||
$LENscale_num = (strlen($scale_num));
|
||||
$k = ($k + $LENscale_num);
|
||||
$call_scale .= "$scale_num";
|
||||
}
|
||||
else
|
||||
{
|
||||
$call_scale .= " ";
|
||||
$k++; $Mk++;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
echo "+------+-------------------------------------------------------------------------------------------------------+-------+-------+\n";
|
||||
#echo "| HOUR | GRAPH IN 15 MINUTE INCREMENTS OF TOTAL INCOMING CALLS FOR THIS GROUP | DROPS | TOTAL |\n";
|
||||
echo "| HOUR |$call_scale| DROPS | TOTAL |\n";
|
||||
echo "+------+-------------------------------------------------------------------------------------------------------+-------+-------+\n";
|
||||
|
||||
$ZZ = '00';
|
||||
$i=0;
|
||||
$h=4;
|
||||
$hour= -1;
|
||||
$no_lines_yet=1;
|
||||
|
||||
while ($i <= 96)
|
||||
{
|
||||
$char_counter=0;
|
||||
$time = ' ';
|
||||
if ($h >= 4)
|
||||
{
|
||||
$hour++;
|
||||
$h=0;
|
||||
if ($hour < 10) {$hour = "0$hour";}
|
||||
$time = "+$hour$ZZ+";
|
||||
}
|
||||
if ($h == 1) {$time = " 15 ";}
|
||||
if ($h == 2) {$time = " 30 ";}
|
||||
if ($h == 3) {$time = " 45 ";}
|
||||
$Ghour_count = $hour_count[$i];
|
||||
if ($Ghour_count < 1)
|
||||
{
|
||||
if ( ($no_lines_yet) or ($i > $last_full_record) )
|
||||
{
|
||||
$do_nothing=1;
|
||||
}
|
||||
else
|
||||
{
|
||||
$hour_count[$i] = sprintf("%-5s", $hour_count[$i]);
|
||||
echo "|$time|";
|
||||
$k=0; while ($k <= 102) {echo " "; $k++;}
|
||||
echo "| $hour_count[$i] |\n";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$no_lines_yet=0;
|
||||
$Xhour_count = ($Ghour_count * $hour_multiplier);
|
||||
$Yhour_count = (99 - $Xhour_count);
|
||||
|
||||
$Gdrop_count = $drop_count[$i];
|
||||
if ($Gdrop_count < 1)
|
||||
{
|
||||
$hour_count[$i] = sprintf("%-5s", $hour_count[$i]);
|
||||
|
||||
echo "|$time|<SPAN class=\"green\">";
|
||||
$k=0; while ($k <= $Xhour_count) {echo "*"; $k++; $char_counter++;}
|
||||
echo "*X</SPAN>"; $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|<SPAN class=\"red\">";
|
||||
$k=0; while ($k <= $Xdrop_count) {echo ">"; $k++; $char_counter++;}
|
||||
echo "D</SPAN><SPAN class=\"green\">"; $char_counter++;
|
||||
$k=0; while ($k <= $XXhour_count) {echo "*"; $k++; $char_counter++;}
|
||||
echo "X</SPAN>"; $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";
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
?>
|
||||
</PRE>
|
||||
|
||||
</BODY></HTML>
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,15 +0,0 @@
|
||||
<?
|
||||
|
||||
$link=mysql_connect("localhost", "cron", "1234");
|
||||
mysql_select_db("asterisk");
|
||||
|
||||
$local_DEF = 'Local/';
|
||||
$conf_silent_prefix = '7';
|
||||
$local_AMP = '@';
|
||||
$ext_context = 'demo';
|
||||
$recording_exten = '8309';
|
||||
|
||||
$WeBServeRRooT = '/usr/local/apache2/htdocs';
|
||||
$WeBRooTWritablE = '1';
|
||||
|
||||
?>
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 492 B |
@@ -1,23 +0,0 @@
|
||||
<?php
|
||||
/*
|
||||
author: Paul Concepcion
|
||||
date: April 18, 2004
|
||||
iterate through the $_GET, $_POST, and $_SERVER hashes,
|
||||
creating global variables with the same values.
|
||||
|
||||
security risk: equal to running with register_globals "on"
|
||||
|
||||
*/
|
||||
|
||||
function array_conv($array){
|
||||
foreach ($array as $key -> $value){
|
||||
${$key} = $value;
|
||||
global ${$key};// = $value;
|
||||
}
|
||||
|
||||
}
|
||||
array_conv($_GET);
|
||||
array_conv($_POST);
|
||||
array_conv($_SERVER);
|
||||
|
||||
?>
|
||||
@@ -1,194 +0,0 @@
|
||||
<?
|
||||
|
||||
require("dbconnect.php");
|
||||
|
||||
##### depricated
|
||||
#require_once("htglobalize.php");
|
||||
|
||||
$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER'];
|
||||
$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW'];
|
||||
$PHP_SELF=$_SERVER['PHP_SELF'];
|
||||
$vendor_id=$_GET["vendor_id"]; if (!$vendor_id) {$vendor_id=$_POST["vendor_id"];}
|
||||
$phone=$_GET["phone"]; if (!$phone) {$phone=$_POST["phone"];}
|
||||
$lead_id=$_GET["lead_id"]; if (!$lead_id) {$lead_id=$_POST["lead_id"];}
|
||||
$first_name=$_GET["first_name"]; if (!$first_name) {$first_name=$_POST["first_name"];}
|
||||
$last_name=$_GET["last_name"]; if (!$last_name) {$last_name=$_POST["last_name"];}
|
||||
$phone_number=$_GET["phone_number"]; if (!$phone_number) {$phone_number=$_POST["phone_number"];}
|
||||
$end_call=$_GET["end_call"]; if (!$end_call) {$end_call=$_POST["end_call"];}
|
||||
$DB=$_GET["DB"]; if (!$DB) {$DB=$_POST["DB"];}
|
||||
$dispo=$_GET["dispo"]; if (!$dispo) {$dispo=$_POST["dispo"];}
|
||||
$list_id=$_GET["list_id"]; if (!$list_id) {$list_id=$_POST["list_id"];}
|
||||
$campaign_id=$_GET["campaign_id"]; if (!$campaign_id) {$campaign_id=$_POST["campaign_id"];}
|
||||
$phone_code=$_GET["phone_code"]; if (!$phone_code) {$phone_code=$_POST["phone_code"];}
|
||||
$server_ip=$_GET["server_ip"]; if (!$server_ip) {$server_ip=$_POST["server_ip"];}
|
||||
$extension=$_GET["extension"]; if (!$extension) {$extension=$_POST["extension"];}
|
||||
$channel=$_GET["channel"]; if (!$channel) {$channel=$_POST["channel"];}
|
||||
$call_began=$_GET["call_began"]; if (!$call_began) {$call_began=$_POST["call_began"];}
|
||||
$parked_time=$_GET["parked_time"]; if (!$parked_time) {$parked_time=$_POST["parked_time"];}
|
||||
$tsr=$_GET["tsr"]; if (!$tsr) {$tsr=$_POST["tsr"];}
|
||||
$address1=$_GET["address1"]; if (!$address1) {$address1=$_POST["address1"];}
|
||||
$address2=$_GET["address2"]; if (!$address2) {$address2=$_POST["address2"];}
|
||||
$address3=$_GET["address3"]; if (!$address3) {$address3=$_POST["address3"];}
|
||||
$city=$_GET["city"]; if (!$city) {$city=$_POST["city"];}
|
||||
$state=$_GET["state"]; if (!$state) {$state=$_POST["state"];}
|
||||
$postal_code=$_GET["postal_code"]; if (!$postal_code) {$postal_code=$_POST["postal_code"];}
|
||||
$province=$_GET["province"]; if (!$province) {$province=$_POST["province"];}
|
||||
$country_code=$_GET["country_code"]; if (!$country_code) {$country_code=$_POST["country_code"];}
|
||||
$alt_phone=$_GET["alt_phone"]; if (!$alt_phone) {$alt_phone=$_POST["alt_phone"];}
|
||||
$email=$_GET["email"]; if (!$email) {$email=$_POST["email"];}
|
||||
$security=$_GET["security"]; if (!$security) {$security=$_POST["security"];}
|
||||
$comments=$_GET["comments"]; if (!$comments) {$comments=$_POST["comments"];}
|
||||
$status=$_GET["status"]; if (!$status) {$status=$_POST["status"];}
|
||||
$submit=$_GET["submit"]; if (!$submit) {$submit=$_POST["submit"];}
|
||||
$SUBMIT=$_GET["SUBMIT"]; if (!$SUBMIT) {$SUBMIT=$_POST["SUBMIT"];}
|
||||
|
||||
### AST GUI database administration
|
||||
### inbound_popup.php
|
||||
|
||||
# this is the inbound popup of a specific call that grabs the call and allows you to go and fetch info on that caller in the local CRM system.
|
||||
|
||||
|
||||
$STARTtime = date("U");
|
||||
$TODAY = date("Y-m-d");
|
||||
$NOW_TIME = date("Y-m-d H:i:s");
|
||||
$popup_page = './inbound_popup.php';
|
||||
$FILE_datetime = $STARTtime;
|
||||
|
||||
$ext_context = 'demo';
|
||||
if (!$begin_date) {$begin_date = $TODAY;}
|
||||
if (!$end_date) {$end_date = $TODAY;}
|
||||
|
||||
#$link=mysql_connect("localhost", "cron", "1234");
|
||||
#mysql_select_db("asterisk");
|
||||
|
||||
$stmt="SELECT count(*) from phones where login='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and active = 'Y' and status IN('ACTIVE','ADMIN');";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$auth=$row[0];
|
||||
|
||||
$fp = fopen ("./project_auth_entries.txt", "a");
|
||||
$date = date("r");
|
||||
$ip = getenv("REMOTE_ADDR");
|
||||
$browser = getenv("HTTP_USER_AGENT");
|
||||
|
||||
if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or (!$auth))
|
||||
{
|
||||
Header("WWW-Authenticate: Basic realm=\"VICI-ASTERISK\"");
|
||||
Header("HTTP/1.0 401 Unauthorized");
|
||||
echo "Invalid Username/Password: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n";
|
||||
exit;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
if($auth>0)
|
||||
{
|
||||
$office_no=strtoupper($PHP_AUTH_USER);
|
||||
$password=strtoupper($PHP_AUTH_PW);
|
||||
$stmt="SELECT fullname,dialplan_number from phones where login='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW'";
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$LOGfullname=$row[0];
|
||||
fwrite ($fp, "ASTERISK|GOOD|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|$LOGfullname|\n");
|
||||
fclose($fp);
|
||||
|
||||
##### get server listing for dynamic pulldown
|
||||
$stmt="SELECT fullname,dialplan_number,server_ip from phones where login='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW'";
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$rsltx=mysql_query($stmt, $link);
|
||||
$rowx=mysql_fetch_row($rsltx);
|
||||
$fullname = $rowx[0];
|
||||
$dialplan_number = $rowx[1];
|
||||
$user_server_ip = $rowx[2];
|
||||
if ($DB) {echo "|$rowx[0]|$rowx[1]|$rowx[2]|\n";}
|
||||
}
|
||||
else
|
||||
{
|
||||
fwrite ($fp, "ASTERISK|FAIL|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|\n");
|
||||
fclose($fp);
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
<html>
|
||||
<head>
|
||||
<title>ASTERISK REMOTE INBOUND: Popup</title>
|
||||
</head>
|
||||
<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0>
|
||||
<CENTER><FONT FACE="Courier" COLOR=BLACK SIZE=3>
|
||||
|
||||
<?
|
||||
|
||||
$stmt="SELECT count(*) from parked_channels where server_ip='$user_server_ip' and parked_time='$parked_time' and channel='$channel'";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$parked_count = $row[0];
|
||||
|
||||
if ($parked_count > 0)
|
||||
{
|
||||
|
||||
$stmt="DELETE from parked_channels where server_ip='$user_server_ip' and parked_time='$parked_time' and channel='$channel' LIMIT 1";
|
||||
if ($DB) {echo "|$stmt|\n";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
|
||||
$DTqueryCID = "RR$FILE_datetime$PHP_AUTH_USER";
|
||||
|
||||
### insert a NEW record to the vicidial_manager table to be processed
|
||||
$stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$user_server_ip','','Redirect','$DTqueryCID','Exten: $dialplan_number','Channel: $channel','Context: $ext_context','Priority: 1','Callerid: $DTqueryCID','','','','','')";
|
||||
if ($DB) {echo "|$stmt|\n";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
|
||||
echo "Redirect command sent for channel $channel $NOW_TIME\n<BR><BR>\n";
|
||||
|
||||
|
||||
$url = 'https://10.10.10.15/internal/back_end_systems/cust_serv/index.php?Search=SEARCH&';
|
||||
$Suser = 'username=';
|
||||
$Spass = '&passwd=';
|
||||
$Sphone = '&phone=';
|
||||
|
||||
$newurl = "$url$Suser$PHP_AUTH_USER$Spass$PHP_AUTH_PW$Sphone$phone";
|
||||
if ( ($phone == 'unknown') or (strlen($phone)<9) )
|
||||
{$newurl = "$url$Suser$PHP_AUTH_USER$Spass$PHP_AUTH_PW";}
|
||||
|
||||
echo "<a href=\"$newurl\">Look up this customer in Customer Service System</a>\n<BR><BR>\n";
|
||||
|
||||
echo "<a href=\"$PHP_SELF\">Close this window</a>\n<BR><BR>\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "Redirect command FAILED for channel $channel $NOW_TIME\n<BR><BR>\n";
|
||||
echo "<a href=\"$PHP_SELF\">Close this window</a>\n<BR><BR>\n";
|
||||
}
|
||||
|
||||
|
||||
|
||||
$ENDtime = date("U");
|
||||
|
||||
$RUNtime = ($ENDtime - $STARTtime);
|
||||
|
||||
echo "\n\n\n<br><br><br>\n\n";
|
||||
|
||||
|
||||
echo "<font size=0>\n\n\n<br><br><br>\nscript runtime: $RUNtime seconds</font>";
|
||||
|
||||
|
||||
?>
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
<?
|
||||
|
||||
exit;
|
||||
|
||||
|
||||
|
||||
?>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,228 +0,0 @@
|
||||
<?
|
||||
|
||||
require("dbconnect.php");
|
||||
|
||||
##### depricated
|
||||
#require_once("htglobalize.php");
|
||||
|
||||
$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER'];
|
||||
$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW'];
|
||||
$PHP_SELF=$_SERVER['PHP_SELF'];
|
||||
$group=$_GET["group"]; if (!$group) {$group=$_POST["group"];}
|
||||
$query_date=$_GET["query_date"]; if (!$query_date) {$query_date=$_POST["query_date"];}
|
||||
$begin_date=$_GET["begin_date"]; if (!$begin_date) {$begin_date=$_POST["begin_date"];}
|
||||
$end_date=$_GET["end_date"]; if (!$end_date) {$end_date=$_POST["end_date"];}
|
||||
$extension=$_GET["extension"]; if (!$extension) {$extension=$_POST["extension"];}
|
||||
$server_ip=$_GET["server_ip"]; if (!$server_ip) {$server_ip=$_POST["server_ip"];}
|
||||
$user=$_GET["user"]; if (!$user) {$user=$_POST["user"];}
|
||||
$full_name=$_GET["full_name"]; if (!$full_name) {$full_name=$_POST["full_name"];}
|
||||
$submit=$_GET["submit"]; if (!$submit) {$submit=$_POST["submit"];}
|
||||
$SUBMIT=$_GET["SUBMIT"]; if (!$SUBMIT) {$SUBMIT=$_POST["SUBMIT"];}
|
||||
|
||||
### AST GUI database administration
|
||||
### user_stats.php
|
||||
|
||||
$STARTtime = date("U");
|
||||
$TODAY = date("Y-m-d");
|
||||
$admin_page = './admin.php';
|
||||
|
||||
if (!$begin_date) {$begin_date = $TODAY;}
|
||||
if (!$end_date) {$end_date = $TODAY;}
|
||||
|
||||
$stmt="SELECT count(*) from phones where login='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and active = 'Y' and status='ADMIN';";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$auth=$row[0];
|
||||
|
||||
$fp = fopen ("./project_auth_entries.txt", "a");
|
||||
$date = date("r");
|
||||
$ip = getenv("REMOTE_ADDR");
|
||||
$browser = getenv("HTTP_USER_AGENT");
|
||||
|
||||
if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or (!$auth))
|
||||
{
|
||||
Header("WWW-Authenticate: Basic realm=\"VICI-ASTERISK\"");
|
||||
Header("HTTP/1.0 401 Unauthorized");
|
||||
echo "Invalid Username/Password: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n";
|
||||
exit;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
if($auth>0)
|
||||
{
|
||||
$office_no=strtoupper($PHP_AUTH_USER);
|
||||
$password=strtoupper($PHP_AUTH_PW);
|
||||
$stmt="SELECT fullname from phones where login='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW'";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$LOGfullname=$row[0];
|
||||
fwrite ($fp, "ASTERISK|GOOD|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|$LOGfullname|\n");
|
||||
fclose($fp);
|
||||
|
||||
##### get server listing for dynamic pulldown
|
||||
$stmt="SELECT fullname from phones where server_ip='$server_ip' and extension='$extension'";
|
||||
$rsltx=mysql_query($stmt, $link);
|
||||
$rowx=mysql_fetch_row($rsltx);
|
||||
$fullname = $row[0];
|
||||
}
|
||||
else
|
||||
{
|
||||
fwrite ($fp, "ASTERISK|FAIL|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|\n");
|
||||
fclose($fp);
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
<html>
|
||||
<head>
|
||||
<title>ASTERISK ADMIN: Phone Stats</title>
|
||||
</head>
|
||||
<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0>
|
||||
<CENTER>
|
||||
<TABLE WIDTH=620 BGCOLOR=#D9E6FE cellpadding=2 cellspacing=0><TR BGCOLOR=#015B91><TD ALIGN=LEFT><FONT FACE="ARIAL,HELVETICA" COLOR=WHITE SIZE=2><B> ASTERISK ADMIN: Administration</TD><TD ALIGN=RIGHT><FONT FACE="ARIAL,HELVETICA" COLOR=WHITE SIZE=2><B><? echo date("l F j, Y G:i:s A") ?> </TD></TR>
|
||||
<TR BGCOLOR=#F0F5FE><TD ALIGN=LEFT COLSPAN=2><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=1><B> <a href="<? echo $admin_page ?>"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=1>LIST ALL PHONES</a> | <a href="<? echo $admin_page ?>?ADD=1"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=1>ADD A NEW PHONE</a> | <a href="<? echo $admin_page ?>?ADD=5"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=1>SEARCH FOR A PHONE</a> | <a href="<? echo $admin_page ?>?ADD=11"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=1>ADD A SERVER</a> | <a href="<? echo $admin_page ?>?ADD=10"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=1>LIST ALL SERVERS</a></TD></TR>
|
||||
<TR BGCOLOR=#F0F5FE><TD ALIGN=LEFT COLSPAN=2><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=1><B> <a href="<? echo $admin_page ?>?ADD=100"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=1>SHOW ALL CONFERENCES</a> | <a href="<? echo $admin_page ?>?ADD=111"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=1>ADD A NEW CONFERENCE</a></TD></TR>
|
||||
|
||||
|
||||
|
||||
|
||||
<?
|
||||
|
||||
echo "<TR BGCOLOR=\"#F0F5FE\"><TD ALIGN=LEFT COLSPAN=2><FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2><B> \n";
|
||||
|
||||
echo "<form action=$PHP_SELF method=POST>\n";
|
||||
echo "<input type=hidden name=extension value=\"$extension\">\n";
|
||||
echo "<input type=hidden name=server_ip value=\"$server_ip\">\n";
|
||||
echo "<input type=text name=begin_date value=\"$begin_date\" size=10 maxsize=10> to \n";
|
||||
echo "<input type=text name=end_date value=\"$end_date\" size=10 maxsize=10> \n";
|
||||
echo "<input type=submit name=submit value=submit>\n";
|
||||
|
||||
|
||||
echo " $user - $full_name\n";
|
||||
|
||||
echo "</B></TD></TR>\n";
|
||||
echo "<TR><TD ALIGN=LEFT COLSPAN=2>\n";
|
||||
|
||||
|
||||
$stmt="SELECT count(*),channel_group, sum(length_in_sec) from call_log where extension='$extension' and server_ip='$server_ip' and start_time >= '$begin_date 0:00:01' and start_time <= '$end_date 23:59:59' group by channel_group order by channel_group";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
$statuses_to_print = mysql_num_rows($rslt);
|
||||
# echo "|$stmt|\n";
|
||||
|
||||
echo "<br><center>\n";
|
||||
|
||||
echo "<B>CALL TIME AND CHANNELS:</B>\n";
|
||||
|
||||
echo "<center><TABLE width=300 cellspacing=0 cellpadding=1>\n";
|
||||
echo "<tr><td><font size=2>CHANNEL GROUP </td><td align=right><font size=2>COUNT</td><td align=right><font size=2> HOURS:MINUTES</td></tr>\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 "<tr $bgcolor><td><font size=2>$row[1]</td>";
|
||||
echo "<td align=right><font size=2> $row[0]</td>\n";
|
||||
echo "<td align=right><font size=2> $call_hours_int:$call_minutes_int</td></tr>\n";
|
||||
$total_calls = ($total_calls + $row[0]);
|
||||
|
||||
$call_seconds=0;
|
||||
$o++;
|
||||
}
|
||||
|
||||
$stmt="SELECT sum(length_in_sec) from call_log where extension='$extension' and server_ip='$server_ip' and start_time >= '$begin_date 0:00:01' and start_time <= '$end_date 23:59:59'";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
$counts_to_print = mysql_num_rows($rslt);
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$call_seconds = $row[0];
|
||||
$call_hours = ($call_seconds / 3600);
|
||||
$call_hours = round($call_hours, 2);
|
||||
$call_hours_int = intval("$call_hours");
|
||||
$call_minutes = ($call_hours - $call_hours_int);
|
||||
$call_minutes = ($call_minutes * 60);
|
||||
$call_minutes_int = round($call_minutes, 0);
|
||||
if ($call_minutes_int < 10) {$call_minutes_int = "0$call_minutes_int";}
|
||||
# echo "|$stmt|\n";
|
||||
|
||||
echo "<tr><td><font size=2>TOTAL CALLS </td><td align=right><font size=2> $total_calls</td><td align=right><font size=2> $call_hours_int:$call_minutes_int</td></tr>\n";
|
||||
echo "</TABLE></center>\n";
|
||||
echo "<br><br>\n";
|
||||
|
||||
echo "<center>\n";
|
||||
|
||||
echo "<B>LAST 1000 CALLS FOR DATE RANGE:</B>\n";
|
||||
echo "<TABLE width=400 cellspacing=0 cellpadding=1>\n";
|
||||
echo "<tr><td><font size=2>NUMBER </td><td><font size=2>CHANNEL GROUP </td><td align=right><font size=2> DATE</td><td align=right><font size=2> LENGTH(MIN.)</td></tr>\n";
|
||||
|
||||
$stmt="SELECT number_dialed,channel_group,start_time,length_in_min from call_log where extension='$extension' and server_ip='$server_ip' and start_time >= '$begin_date 0:00:01' and start_time <= '$end_date 23:59:59' LIMIT 1000";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
$events_to_print = mysql_num_rows($rslt);
|
||||
# echo "|$stmt|\n";
|
||||
|
||||
$total_calls=0;
|
||||
$o=0;
|
||||
$event_start_seconds='';
|
||||
$event_stop_seconds='';
|
||||
while ($events_to_print > $o) {
|
||||
$row=mysql_fetch_row($rslt);
|
||||
if (eregi("1$|3$|5$|7$|9$", $o))
|
||||
{$bgcolor='bgcolor="#B9CBFD"';}
|
||||
else
|
||||
{$bgcolor='bgcolor="#9BB9FB"';}
|
||||
echo "<tr $bgcolor><td><font size=2>$row[0]</td>";
|
||||
echo "<td align=right><font size=2> $row[1]</td>\n";
|
||||
echo "<td align=right><font size=2> $row[2]</td>\n";
|
||||
echo "<td align=right><font size=2> $row[3]</td></tr>\n";
|
||||
|
||||
|
||||
$call_seconds=0;
|
||||
$o++;
|
||||
}
|
||||
|
||||
|
||||
echo "</TABLE></center>\n";
|
||||
|
||||
|
||||
$ENDtime = date("U");
|
||||
|
||||
$RUNtime = ($ENDtime - $STARTtime);
|
||||
|
||||
echo "\n\n\n<br><br><br>\n\n";
|
||||
|
||||
|
||||
echo "<font size=0>\n\n\n<br><br><br>\nscript runtime: $RUNtime seconds</font>";
|
||||
|
||||
|
||||
?>
|
||||
|
||||
|
||||
</TD></TR><TABLE>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
<?
|
||||
|
||||
exit;
|
||||
|
||||
|
||||
|
||||
?>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,165 +0,0 @@
|
||||
<?
|
||||
|
||||
require("dbconnect.php");
|
||||
|
||||
##### depricated
|
||||
#require_once("htglobalize.php");
|
||||
|
||||
$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER'];
|
||||
$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW'];
|
||||
$PHP_SELF=$_SERVER['PHP_SELF'];
|
||||
$submit=$_GET["submit"]; if (!$submit) {$submit=$_POST["submit"];}
|
||||
$SUBMIT=$_GET["SUBMIT"]; if (!$SUBMIT) {$SUBMIT=$_POST["SUBMIT"];}
|
||||
|
||||
### AST GUI database administration
|
||||
### remote_inbound.php
|
||||
|
||||
# the purpose of this script and webpage is to allow for remote or local users of the system to log in and grab phone calls that are coming inbound into the Asterisk server and being put in the parked_channels table while they hear a soundfile for a limited amount of time before being forwarded on to either a set extension or a voicemail box. This gives remote or local agents a way to grab calls without tying up their phone lines all day. The agent sees the refreshing screen of calls on park and when they want to take one they just click on it, and a small window opens that will allow them to grab the call and/or look up more information on the caller through the callerID that is given(if available)
|
||||
|
||||
|
||||
$STARTtime = date("U");
|
||||
$TODAY = date("Y-m-d");
|
||||
$NOW_TIME = date("Y-m-d H:i:s");
|
||||
$popup_page = './inbound_popup.php';
|
||||
|
||||
$stmt="SELECT count(*) from phones where login='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and active = 'Y' and status IN('ACTIVE','ADMIN');";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$auth=$row[0];
|
||||
|
||||
$fp = fopen ("./project_auth_entries.txt", "a");
|
||||
$date = date("r");
|
||||
$ip = getenv("REMOTE_ADDR");
|
||||
$browser = getenv("HTTP_USER_AGENT");
|
||||
|
||||
if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or (!$auth))
|
||||
{
|
||||
Header("WWW-Authenticate: Basic realm=\"VICI-ASTERISK\"");
|
||||
Header("HTTP/1.0 401 Unauthorized");
|
||||
echo "Invalid Username/Password: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n";
|
||||
exit;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
if($auth>0)
|
||||
{
|
||||
$office_no=strtoupper($PHP_AUTH_USER);
|
||||
$password=strtoupper($PHP_AUTH_PW);
|
||||
$stmt="SELECT fullname,dialplan_number from phones where login='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW'";
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$LOGfullname=$row[0];
|
||||
fwrite ($fp, "ASTERISK|GOOD|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|$LOGfullname|\n");
|
||||
fclose($fp);
|
||||
|
||||
##### get server listing for dynamic pulldown
|
||||
$stmt="SELECT fullname,dialplan_number,server_ip from phones where login='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW'";
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$rsltx=mysql_query($stmt, $link);
|
||||
$rowx=mysql_fetch_row($rsltx);
|
||||
$fullname = $rowx[0];
|
||||
$dialplan_number = $rowx[1];
|
||||
$user_server_ip = $rowx[2];
|
||||
if ($DB) {echo "|$rowx[0]|$rowx[1]|$rowx[2]|\n";}
|
||||
}
|
||||
else
|
||||
{
|
||||
fwrite ($fp, "ASTERISK|FAIL|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|\n");
|
||||
fclose($fp);
|
||||
}
|
||||
}
|
||||
|
||||
echo"<HTML><HEAD>\n";
|
||||
echo"<TITLE>ASTERISK REMOTE INBOUND: Main</TITLE></HEAD>\n";
|
||||
echo"<META HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html; charset=iso-8859-1\">\n";
|
||||
echo"<META HTTP-EQUIV=Refresh CONTENT=\"5; URL=$PHP_SELF\">\n";
|
||||
echo"</HEAD>\n";
|
||||
|
||||
?>
|
||||
|
||||
<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0>
|
||||
<CENTER><FONT FACE="Courier" COLOR=BLACK SIZE=3>
|
||||
|
||||
<?
|
||||
|
||||
|
||||
echo "$NOW_TIME $PHP_AUTH_USER - $fullname - CALLS SENT TO: $dialplan_number<BR><BR>\n";
|
||||
|
||||
echo "Click on the channel below that you would like to have directed to your phone<BR><BR>\n";
|
||||
|
||||
echo "<PRE>\n";
|
||||
echo "CHANNEL SERVER CHANNEL_GROUP EXTENSION PARKED_BY PARKED_TIME \n";
|
||||
echo "----------------------------------------------------------------------------------------------\n";
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
$stmt="SELECT count(*) from parked_channels where server_ip='$user_server_ip' order by parked_time";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$parked_count = $row[0];
|
||||
if ($parked_count > 0)
|
||||
{
|
||||
$stmt="SELECT * from parked_channels where server_ip='$user_server_ip' and channel_group LIKE \"IN_%\" order by parked_time";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$parked_to_print = mysql_num_rows($rslt);
|
||||
$i=0;
|
||||
while ($i < $parked_to_print)
|
||||
{
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$channel = sprintf("%-11s", $row[0]);
|
||||
$server = sprintf("%-14s", $row[1]);
|
||||
$channel_group = sprintf("%-16s", $row[2]);
|
||||
$extension = sprintf("%-13s", $row[3]);
|
||||
$parked_by = sprintf("%-21s", $row[4]);
|
||||
$parked_time = sprintf("%-19s", $row[5]);
|
||||
|
||||
echo "<A HREF=\"$popup_page?phone=$row[4]&channel=$row[0]&parked_time=$row[5]&server_ip=$user_server_ip&DB=\" target=\"_blank\">$channel</A>$server$channel_group$extension$parked_by$parked_time\n";
|
||||
|
||||
$i++;
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "**********************************************************************************************\n";
|
||||
echo "**********************************************************************************************\n";
|
||||
echo "*************************************** NO PARKED CALLS **************************************\n";
|
||||
echo "**********************************************************************************************\n";
|
||||
echo "**********************************************************************************************\n";
|
||||
}
|
||||
|
||||
|
||||
$ENDtime = date("U");
|
||||
|
||||
$RUNtime = ($ENDtime - $STARTtime);
|
||||
|
||||
echo "</PRE>\n\n\n<br><br><br>\n\n";
|
||||
|
||||
|
||||
echo "<font size=0>\n\n\n<br><br><br>\nscript runtime: $RUNtime seconds</font>";
|
||||
|
||||
|
||||
?>
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
<?
|
||||
|
||||
exit;
|
||||
|
||||
|
||||
|
||||
?>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,369 +0,0 @@
|
||||
<?
|
||||
require("dbconnect.php");
|
||||
|
||||
##### depricated
|
||||
#require_once("htglobalize.php");
|
||||
|
||||
$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER'];
|
||||
$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW'];
|
||||
$PHP_SELF=$_SERVER['PHP_SELF'];
|
||||
$group=$_GET["group"]; if (!$group) {$group=$_POST["group"];}
|
||||
$query_date=$_GET["query_date"]; if (!$query_date) {$query_date=$_POST["query_date"];}
|
||||
$server_ip=$_GET["server_ip"]; if (!$server_ip) {$server_ip=$_POST["server_ip"];}
|
||||
$submit=$_GET["submit"]; if (!$submit) {$submit=$_POST["submit"];}
|
||||
$ΕΠΙΒΕΒΑΙΩΣΗ=$_GET["ΕΠΙΒΕΒΑΙΩΣΗ"]; if (!$ΕΠΙΒΕΒΑΙΩΣΗ) {$ΕΠΙΒΕΒΑΙΩΣΗ=$_POST["ΕΠΙΒΕΒΑΙΩΣΗ"];}
|
||||
|
||||
# AST_inboundEXTstats.php
|
||||
|
||||
$NOW_DATE = date("Y-m-d");
|
||||
$NOW_TIME = date("Y-m-d H:i:s");
|
||||
$STARTtime = date("U");
|
||||
if (!$query_date) {$query_date = $NOW_DATE;}
|
||||
if (!$server_ip) {$server_ip = '10.10.11.11';}
|
||||
|
||||
$stmt="select extension,full_number,inbound_name from inbound_numbers where server_ip='$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++;
|
||||
}
|
||||
?>
|
||||
|
||||
<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=iso-8859-1\">\n";
|
||||
#echo"<META HTTP-EQUIV=Refresh CONTENT=\"7; URL=$PHP_SELF?server_ip=$server_ip&DB=$DB\">\n";
|
||||
echo "<TITLE>ASTERISK: Στατιστικά Εισερχομένων Κλησεων</TITLE></HEAD><BODY BGCOLOR=WHITE>\n";
|
||||
echo "<FORM ACTION=\"$PHP_SELF\" METHOD=GET>\n";
|
||||
echo "<INPUT TYPE=HIDDEN NAME=server_ip VALUE=\"$server_ip\">\n";
|
||||
echo "<INPUT TYPE=TEXT NAME=query_date SIZE=10 MAXLENGTH=10 VALUE=\"$query_date\">\n";
|
||||
echo "<SELECT SIZE=1 NAME=group>\n";
|
||||
$o=0;
|
||||
while ($inbound_to_print > $o)
|
||||
{
|
||||
if ($inbound[$o] == $group) {echo "<option selected value=\"$inbound[$o]\">$fullnum[$o] - $inbname[$o]</option>\n";}
|
||||
else {echo "<option value=\"$inbound[$o]\">$fullnum[$o] - $inbname[$o]</option>\n";}
|
||||
$o++;
|
||||
}
|
||||
echo "</SELECT>\n";
|
||||
echo "<INPUT TYPE=ΕΠΙΒΕΒΑΙΩΣΗ NAME=ΕΠΙΒΕΒΑΙΩΣΗ ΤΙΜΗ=ΥΠΟΒΑΛΛΩ>\n";
|
||||
echo "</FORM>\n\n";
|
||||
|
||||
echo "<PRE><FONT SIZE=2>\n\n";
|
||||
|
||||
|
||||
if (!$group)
|
||||
{
|
||||
echo "\n\n";
|
||||
echo "ΠΑΡΑΚΑΛΩ ΕΠΙΛΕΞΤΕ ΕΝΑΝ ΑΡΙΘΜΟ ΚΑΙ ΗΜΕΡΟΜΗΝΙΑ ΑΝΩΤΕΡΩ, ΚΑΙ ΠΑΤΗΣΤΕ ΕΠΙΒΕΒΑΙΩΣΗ\n";
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
|
||||
|
||||
echo "ASTERISK: Στατιστικά Εισερχομένων Κλησεων $NOW_TIME\n";
|
||||
|
||||
echo "\n";
|
||||
echo "---------- TOTALS\n";
|
||||
|
||||
$stmt="select count(*),sum(length_in_sec) from call_log where start_time >= '$query_date 00:00:01' and start_time <= '$query_date 23:59:59' and server_ip='$server_ip' and extension='$group';";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$row=mysql_fetch_row($rslt);
|
||||
|
||||
$TOTALcalls = sprintf("%10s", $row[0]);
|
||||
$average_hold_seconds = ($row[1] / $row[0]);
|
||||
$average_hold_seconds = round($average_hold_seconds, 0);
|
||||
$average_hold_seconds = sprintf("%10s", $average_hold_seconds);
|
||||
|
||||
echo "Συνολικές κλήσεις που ήρθαν σε αυτό τον αριθμό: $TOTALcalls\n";
|
||||
echo "Average Call Length(seconds) for all Calls: $average_hold_seconds\n";
|
||||
|
||||
echo "\n";
|
||||
echo "---------- DROPS\n";
|
||||
|
||||
$stmt="select count(*),sum(length_in_sec) from call_log where start_time >= '$query_date 00:00:01' and start_time <= '$query_date 23:59:59' and server_ip='$server_ip' and extension='$group' 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 >= '$query_date 00:00:01' and start_time <= '$query_date 23:59:59' and server_ip='$server_ip' and extension='$group';";
|
||||
$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("%-10s", $row[0]);
|
||||
$CIDname = sprintf("%-15s", $row[1]); while(strlen($full_name)>15) {$full_name = substr("$full_name", 0, -1);}
|
||||
$datetime = sprintf("%-19s", $row[3]);
|
||||
$USERavgTALK = $row[2];
|
||||
|
||||
$USERavgTALK_M = ($USERavgTALK / 60);
|
||||
$USERavgTALK_M = round($USERavgTALK_M, 2);
|
||||
$USERavgTALK_M_int = intval("$USERavgTALK_M");
|
||||
$USERavgTALK_S = ($USERavgTALK_M - $USERavgTALK_M_int);
|
||||
$USERavgTALK_S = ($USERavgTALK_S * 60);
|
||||
$USERavgTALK_S = round($USERavgTALK_S, 0);
|
||||
if ($USERavgTALK_S < 10) {$USERavgTALK_S = "0$USERavgTALK_S";}
|
||||
$USERavgTALK_MS = "$USERavgTALK_M_int:$USERavgTALK_S";
|
||||
$USERavgTALK_MS = sprintf("%6s", $USERavgTALK_MS);
|
||||
|
||||
echo "| $CID | $CIDname | $USERavgTALK_MS | $datetime |\n";
|
||||
|
||||
$i++;
|
||||
}
|
||||
|
||||
echo "+------------+-----------------+--------+---------------------+\n";
|
||||
|
||||
##############################
|
||||
######### TIME STATS
|
||||
|
||||
if ($output == 'FULL')
|
||||
{
|
||||
|
||||
echo "\n";
|
||||
echo "---------- ΣΤΑΤΙΣΤΙΚΑ ΧΡΟΝΟΥ\n";
|
||||
|
||||
echo "<FONT SIZE=0>\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 >= '$query_date $h:00:00' and start_time <= '$query_date $h:14:59' and server_ip='$server_ip' and extension='$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 call_log where start_time >= '$query_date $h:00:00' and start_time <= '$query_date $h:14:59' and server_ip='$server_ip' and extension='$group' 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 >= '$query_date $h:15:00' and start_time <= '$query_date $h:29:59' and server_ip='$server_ip' and extension='$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 call_log where start_time >= '$query_date $h:15:00' and start_time <= '$query_date $h:29:59' and server_ip='$server_ip' and extension='$group' 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 >= '$query_date $h:30:00' and start_time <= '$query_date $h:44:59' and server_ip='$server_ip' and extension='$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 call_log where start_time >= '$query_date $h:30:00' and start_time <= '$query_date $h:44:59' and server_ip='$server_ip' and extension='$group' 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 >= '$query_date $h:45:00' and start_time <= '$query_date $h:59:59' and server_ip='$server_ip' and extension='$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 call_log where start_time >= '$query_date $h:45:00' and start_time <= '$query_date $h:59:59' and server_ip='$server_ip' and extension='$group' 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 "<!-- HICOUNT: $hi_hour_count|$hour_multiplier -->\n";
|
||||
echo "ΓΡΑΦΙΚΗ ΠΑΡΑΣΤΑΣΗ ΜΕ 15ΛΕΠΤΕΣ ΑΥΞΗΣΕΙΣ ΤΩΝ ΣΥΝΟΛΙΚΩΝ ΚΛΗΣΕΩΝ\n";
|
||||
|
||||
$k=1;
|
||||
$Mk=0;
|
||||
$call_scale = '0';
|
||||
while ($k <= 102)
|
||||
{
|
||||
if ($Mk >= 5)
|
||||
{
|
||||
$Mk=0;
|
||||
$scale_num=($k / $hour_multiplier);
|
||||
$scale_num = round($scale_num, 0);
|
||||
$LENscale_num = (strlen($scale_num));
|
||||
$k = ($k + $LENscale_num);
|
||||
$call_scale .= "$scale_num";
|
||||
}
|
||||
else
|
||||
{
|
||||
$call_scale .= " ";
|
||||
$k++; $Mk++;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
echo "+------+-------------------------------------------------------------------------------------------------------+-------+-------+\n";
|
||||
#echo "| HOUR | GRAPH IN 15 MINUTE INCREMENTS OF TOTAL INCOMING CALLS FOR THIS GROUP | DROPS | TOTAL |\n";
|
||||
echo "| HOUR |$call_scale| DROPS | TOTAL |\n";
|
||||
echo "+------+-------------------------------------------------------------------------------------------------------+-------+-------+\n";
|
||||
|
||||
$ZZ = '00';
|
||||
$i=0;
|
||||
$h=4;
|
||||
$hour= -1;
|
||||
$no_lines_yet=1;
|
||||
|
||||
while ($i <= 96)
|
||||
{
|
||||
$char_counter=0;
|
||||
$time = ' ';
|
||||
if ($h >= 4)
|
||||
{
|
||||
$hour++;
|
||||
$h=0;
|
||||
if ($hour < 10) {$hour = "0$hour";}
|
||||
$time = "+$hour$ZZ+";
|
||||
}
|
||||
if ($h == 1) {$time = " 15 ";}
|
||||
if ($h == 2) {$time = " 30 ";}
|
||||
if ($h == 3) {$time = " 45 ";}
|
||||
$Ghour_count = $hour_count[$i];
|
||||
if ($Ghour_count < 1)
|
||||
{
|
||||
if ( ($no_lines_yet) or ($i > $last_full_record) )
|
||||
{
|
||||
$do_nothing=1;
|
||||
}
|
||||
else
|
||||
{
|
||||
$hour_count[$i] = sprintf("%-5s", $hour_count[$i]);
|
||||
echo "|$time|";
|
||||
$k=0; while ($k <= 102) {echo " "; $k++;}
|
||||
echo "| $hour_count[$i] |\n";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$no_lines_yet=0;
|
||||
$Xhour_count = ($Ghour_count * $hour_multiplier);
|
||||
$Yhour_count = (99 - $Xhour_count);
|
||||
|
||||
$Gdrop_count = $drop_count[$i];
|
||||
if ($Gdrop_count < 1)
|
||||
{
|
||||
$hour_count[$i] = sprintf("%-5s", $hour_count[$i]);
|
||||
|
||||
echo "|$time|<SPAN class=\"green\">";
|
||||
$k=0; while ($k <= $Xhour_count) {echo "*"; $k++; $char_counter++;}
|
||||
echo "*X</SPAN>"; $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|<SPAN class=\"red\">";
|
||||
$k=0; while ($k <= $Xdrop_count) {echo ">"; $k++; $char_counter++;}
|
||||
echo "D</SPAN><SPAN class=\"green\">"; $char_counter++;
|
||||
$k=0; while ($k <= $XXhour_count) {echo "*"; $k++; $char_counter++;}
|
||||
echo "X</SPAN>"; $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";
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
?>
|
||||
</PRE>
|
||||
|
||||
</BODY></HTML>
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,15 +0,0 @@
|
||||
<?
|
||||
|
||||
$link=mysql_connect("localhost", "cron", "1234");
|
||||
mysql_select_db("asterisk");
|
||||
|
||||
$local_DEF = 'Local/';
|
||||
$conf_silent_prefix = '7';
|
||||
$local_AMP = '@';
|
||||
$ext_context = 'demo';
|
||||
$recording_exten = '8309';
|
||||
|
||||
$WeBServeRRooT = '/usr/local/apache2/htdocs';
|
||||
$WeBRooTWritablE = '1';
|
||||
|
||||
?>
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 492 B |
@@ -1,23 +0,0 @@
|
||||
<?php
|
||||
/*
|
||||
author: Paul Concepcion
|
||||
date: April 18, 2004
|
||||
iterate through the $_GET, $_POST, and $_SERVER hashes,
|
||||
creating global variables with the same values.
|
||||
|
||||
security risk: equal to running with register_globals "on"
|
||||
|
||||
*/
|
||||
|
||||
function array_conv($array){
|
||||
foreach ($array as $key -> $value){
|
||||
${$key} = $value;
|
||||
global ${$key};// = $value;
|
||||
}
|
||||
|
||||
}
|
||||
array_conv($_GET);
|
||||
array_conv($_POST);
|
||||
array_conv($_SERVER);
|
||||
|
||||
?>
|
||||
@@ -1,194 +0,0 @@
|
||||
<?
|
||||
|
||||
require("dbconnect.php");
|
||||
|
||||
##### depricated
|
||||
#require_once("htglobalize.php");
|
||||
|
||||
$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER'];
|
||||
$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW'];
|
||||
$PHP_SELF=$_SERVER['PHP_SELF'];
|
||||
$vendor_id=$_GET["vendor_id"]; if (!$vendor_id) {$vendor_id=$_POST["vendor_id"];}
|
||||
$phone=$_GET["phone"]; if (!$phone) {$phone=$_POST["phone"];}
|
||||
$lead_id=$_GET["lead_id"]; if (!$lead_id) {$lead_id=$_POST["lead_id"];}
|
||||
$first_name=$_GET["first_name"]; if (!$first_name) {$first_name=$_POST["first_name"];}
|
||||
$last_name=$_GET["last_name"]; if (!$last_name) {$last_name=$_POST["last_name"];}
|
||||
$phone_number=$_GET["phone_number"]; if (!$phone_number) {$phone_number=$_POST["phone_number"];}
|
||||
$end_call=$_GET["end_call"]; if (!$end_call) {$end_call=$_POST["end_call"];}
|
||||
$DB=$_GET["DB"]; if (!$DB) {$DB=$_POST["DB"];}
|
||||
$dispo=$_GET["dispo"]; if (!$dispo) {$dispo=$_POST["dispo"];}
|
||||
$list_id=$_GET["list_id"]; if (!$list_id) {$list_id=$_POST["list_id"];}
|
||||
$campaign_id=$_GET["campaign_id"]; if (!$campaign_id) {$campaign_id=$_POST["campaign_id"];}
|
||||
$phone_code=$_GET["phone_code"]; if (!$phone_code) {$phone_code=$_POST["phone_code"];}
|
||||
$server_ip=$_GET["server_ip"]; if (!$server_ip) {$server_ip=$_POST["server_ip"];}
|
||||
$extension=$_GET["extension"]; if (!$extension) {$extension=$_POST["extension"];}
|
||||
$channel=$_GET["channel"]; if (!$channel) {$channel=$_POST["channel"];}
|
||||
$call_began=$_GET["call_began"]; if (!$call_began) {$call_began=$_POST["call_began"];}
|
||||
$parked_time=$_GET["parked_time"]; if (!$parked_time) {$parked_time=$_POST["parked_time"];}
|
||||
$tsr=$_GET["tsr"]; if (!$tsr) {$tsr=$_POST["tsr"];}
|
||||
$address1=$_GET["address1"]; if (!$address1) {$address1=$_POST["address1"];}
|
||||
$address2=$_GET["address2"]; if (!$address2) {$address2=$_POST["address2"];}
|
||||
$address3=$_GET["address3"]; if (!$address3) {$address3=$_POST["address3"];}
|
||||
$city=$_GET["city"]; if (!$city) {$city=$_POST["city"];}
|
||||
$state=$_GET["state"]; if (!$state) {$state=$_POST["state"];}
|
||||
$postal_code=$_GET["postal_code"]; if (!$postal_code) {$postal_code=$_POST["postal_code"];}
|
||||
$province=$_GET["province"]; if (!$province) {$province=$_POST["province"];}
|
||||
$country_code=$_GET["country_code"]; if (!$country_code) {$country_code=$_POST["country_code"];}
|
||||
$alt_phone=$_GET["alt_phone"]; if (!$alt_phone) {$alt_phone=$_POST["alt_phone"];}
|
||||
$email=$_GET["email"]; if (!$email) {$email=$_POST["email"];}
|
||||
$security=$_GET["security"]; if (!$security) {$security=$_POST["security"];}
|
||||
$comments=$_GET["comments"]; if (!$comments) {$comments=$_POST["comments"];}
|
||||
$status=$_GET["status"]; if (!$status) {$status=$_POST["status"];}
|
||||
$submit=$_GET["submit"]; if (!$submit) {$submit=$_POST["submit"];}
|
||||
$ΕΠΙΒΕΒΑΙΩΣΗ=$_GET["ΕΠΙΒΕΒΑΙΩΣΗ"]; if (!$ΕΠΙΒΕΒΑΙΩΣΗ) {$ΕΠΙΒΕΒΑΙΩΣΗ=$_POST["ΕΠΙΒΕΒΑΙΩΣΗ"];}
|
||||
|
||||
### AST GUI database administration
|
||||
### inbound_popup.php
|
||||
|
||||
# this is the inbound popup of a specific call that grabs the call and allows you to go and fetch info on that caller in the local CRM system.
|
||||
|
||||
|
||||
$STARTtime = date("U");
|
||||
$TODAY = date("Y-m-d");
|
||||
$NOW_TIME = date("Y-m-d H:i:s");
|
||||
$popup_page = './inbound_popup.php';
|
||||
$FILE_datetime = $STARTtime;
|
||||
|
||||
$ext_context = 'demo';
|
||||
if (!$begin_date) {$begin_date = $TODAY;}
|
||||
if (!$end_date) {$end_date = $TODAY;}
|
||||
|
||||
#$link=mysql_connect("localhost", "cron", "1234");
|
||||
#mysql_select_db("asterisk");
|
||||
|
||||
$stmt="SELECT count(*) from phones where login='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and active = 'Y' and status IN('ACTIVE','ADMIN');";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$auth=$row[0];
|
||||
|
||||
$fp = fopen ("./project_auth_entries.txt", "a");
|
||||
$date = date("r");
|
||||
$ip = getenv("REMOTE_ADDR");
|
||||
$browser = getenv("HTTP_USER_AGENT");
|
||||
|
||||
if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or (!$auth))
|
||||
{
|
||||
Header("WWW-Authenticate: Basic realm=\"VICI-ASTERISK\"");
|
||||
Header("HTTP/1.0 401 Unauthorized");
|
||||
echo "Ακυρο Ονομα Χρήστη/Κωδικός Πρόσβασης: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n";
|
||||
exit;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
if($auth>0)
|
||||
{
|
||||
$office_no=strtoupper($PHP_AUTH_USER);
|
||||
$password=strtoupper($PHP_AUTH_PW);
|
||||
$stmt="SELECT fullname,dialplan_number from phones where login='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW'";
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$LOGfullname=$row[0];
|
||||
fwrite ($fp, "ASTERISK|GOOD|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|$LOGfullname|\n");
|
||||
fclose($fp);
|
||||
|
||||
##### get server listing for dynamic pulldown
|
||||
$stmt="SELECT fullname,dialplan_number,server_ip from phones where login='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW'";
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$rsltx=mysql_query($stmt, $link);
|
||||
$rowx=mysql_fetch_row($rsltx);
|
||||
$fullname = $rowx[0];
|
||||
$dialplan_number = $rowx[1];
|
||||
$user_server_ip = $rowx[2];
|
||||
if ($DB) {echo "|$rowx[0]|$rowx[1]|$rowx[2]|\n";}
|
||||
}
|
||||
else
|
||||
{
|
||||
fwrite ($fp, "ASTERISK|FAIL|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|\n");
|
||||
fclose($fp);
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
<html>
|
||||
<head>
|
||||
<title>ASTERISK ΑΠΟΜΑΚΡΥΣΜΕΝΟ ΕΙΣΕΡΧΟΜΕΝΟ: Υπερεμφανιζόμενο Παραθύρο</title>
|
||||
</head>
|
||||
<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0>
|
||||
<CENTER><FONT FACE="Courier" COLOR=BLACK SIZE=3>
|
||||
|
||||
<?
|
||||
|
||||
$stmt="SELECT count(*) from parked_channels where server_ip='$user_server_ip' and parked_time='$parked_time' and channel='$channel'";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$parked_count = $row[0];
|
||||
|
||||
if ($parked_count > 0)
|
||||
{
|
||||
|
||||
$stmt="DELETE from parked_channels where server_ip='$user_server_ip' and parked_time='$parked_time' and channel='$channel' LIMIT 1";
|
||||
if ($DB) {echo "|$stmt|\n";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
|
||||
$DTqueryCID = "RR$FILE_datetime$PHP_AUTH_USER";
|
||||
|
||||
### insert a NEW record to the vicidial_manager table to be processed
|
||||
$stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$user_server_ip','','Redirect','$DTqueryCID','Exten: $dialplan_number','Channel: $channel','Context: $ext_context','Priority: 1','Callerid: $DTqueryCID','','','','','')";
|
||||
if ($DB) {echo "|$stmt|\n";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
|
||||
echo "Η εντολή ανακατεύθυνσης στάλθηκε για το κανάλι $channel $NOW_TIME\n<BR><BR>\n";
|
||||
|
||||
|
||||
$url = 'https://10.10.10.15/internal/back_end_systems/cust_serv/index.php?Search=SEARCH&';
|
||||
$Suser = 'username=';
|
||||
$Spass = '&passwd=';
|
||||
$Sphone = '&phone=';
|
||||
|
||||
$newurl = "$url$Suser$PHP_AUTH_USER$Spass$PHP_AUTH_PW$Sphone$phone";
|
||||
if ( ($phone == 'unknown') or (strlen($phone)<9) )
|
||||
{$newurl = "$url$Suser$PHP_AUTH_USER$Spass$PHP_AUTH_PW";}
|
||||
|
||||
echo "<a href=\"$newurl\">Αναζήτηση του Πελάτη στο Σύστημα Εξυπηρέτησης Πελατών</a>\n<BR><BR>\n";
|
||||
|
||||
echo "<a href=\"$PHP_SELF\">Κλείσε αυτό το παράθυρο</a>\n<BR><BR>\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "Η εντολή ανακατεύθυνσης ΑΠΕΤΥΧΕ για το κανάλι $channel $NOW_TIME\n<BR><BR>\n";
|
||||
echo "<a href=\"$PHP_SELF\">Κλείσε αυτό το παράθυρο</a>\n<BR><BR>\n";
|
||||
}
|
||||
|
||||
|
||||
|
||||
$ENDtime = date("U");
|
||||
|
||||
$RUNtime = ($ENDtime - $STARTtime);
|
||||
|
||||
echo "\n\n\n<br><br><br>\n\n";
|
||||
|
||||
|
||||
echo "<font size=0>\n\n\n<br><br><br>\nδιαδικασία που τρέχει: $RUNtime seconds</font>";
|
||||
|
||||
|
||||
?>
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
<?
|
||||
|
||||
exit;
|
||||
|
||||
|
||||
|
||||
?>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,228 +0,0 @@
|
||||
<?
|
||||
|
||||
require("dbconnect.php");
|
||||
|
||||
##### depricated
|
||||
#require_once("htglobalize.php");
|
||||
|
||||
$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER'];
|
||||
$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW'];
|
||||
$PHP_SELF=$_SERVER['PHP_SELF'];
|
||||
$group=$_GET["group"]; if (!$group) {$group=$_POST["group"];}
|
||||
$query_date=$_GET["query_date"]; if (!$query_date) {$query_date=$_POST["query_date"];}
|
||||
$begin_date=$_GET["begin_date"]; if (!$begin_date) {$begin_date=$_POST["begin_date"];}
|
||||
$end_date=$_GET["end_date"]; if (!$end_date) {$end_date=$_POST["end_date"];}
|
||||
$extension=$_GET["extension"]; if (!$extension) {$extension=$_POST["extension"];}
|
||||
$server_ip=$_GET["server_ip"]; if (!$server_ip) {$server_ip=$_POST["server_ip"];}
|
||||
$user=$_GET["user"]; if (!$user) {$user=$_POST["user"];}
|
||||
$full_name=$_GET["full_name"]; if (!$full_name) {$full_name=$_POST["full_name"];}
|
||||
$submit=$_GET["submit"]; if (!$submit) {$submit=$_POST["submit"];}
|
||||
$ΕΠΙΒΕΒΑΙΩΣΗ=$_GET["ΕΠΙΒΕΒΑΙΩΣΗ"]; if (!$ΕΠΙΒΕΒΑΙΩΣΗ) {$ΕΠΙΒΕΒΑΙΩΣΗ=$_POST["ΕΠΙΒΕΒΑΙΩΣΗ"];}
|
||||
|
||||
### AST GUI database administration
|
||||
### user_stats.php
|
||||
|
||||
$STARTtime = date("U");
|
||||
$TODAY = date("Y-m-d");
|
||||
$admin_page = './admin.php';
|
||||
|
||||
if (!$begin_date) {$begin_date = $TODAY;}
|
||||
if (!$end_date) {$end_date = $TODAY;}
|
||||
|
||||
$stmt="SELECT count(*) from phones where login='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and active = 'Y' and status='ADMIN';";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$auth=$row[0];
|
||||
|
||||
$fp = fopen ("./project_auth_entries.txt", "a");
|
||||
$date = date("r");
|
||||
$ip = getenv("REMOTE_ADDR");
|
||||
$browser = getenv("HTTP_USER_AGENT");
|
||||
|
||||
if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or (!$auth))
|
||||
{
|
||||
Header("WWW-Authenticate: Basic realm=\"VICI-ASTERISK\"");
|
||||
Header("HTTP/1.0 401 Unauthorized");
|
||||
echo "Ακυρο Ονομα Χρήστη/Κωδικός Πρόσβασης: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n";
|
||||
exit;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
if($auth>0)
|
||||
{
|
||||
$office_no=strtoupper($PHP_AUTH_USER);
|
||||
$password=strtoupper($PHP_AUTH_PW);
|
||||
$stmt="SELECT fullname from phones where login='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW'";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$LOGfullname=$row[0];
|
||||
fwrite ($fp, "ASTERISK|GOOD|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|$LOGfullname|\n");
|
||||
fclose($fp);
|
||||
|
||||
##### get server listing for dynamic pulldown
|
||||
$stmt="SELECT fullname from phones where server_ip='$server_ip' and extension='$extension'";
|
||||
$rsltx=mysql_query($stmt, $link);
|
||||
$rowx=mysql_fetch_row($rsltx);
|
||||
$fullname = $row[0];
|
||||
}
|
||||
else
|
||||
{
|
||||
fwrite ($fp, "ASTERISK|FAIL|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|\n");
|
||||
fclose($fp);
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
<html>
|
||||
<head>
|
||||
<title>ASTERISK ADMIN: Στατιστικά Τηλεφώνου</title>
|
||||
</head>
|
||||
<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0>
|
||||
<CENTER>
|
||||
<TABLE WIDTH=620 BGCOLOR=#D9E6FE cellpadding=2 cellspacing=0><TR BGCOLOR=#015B91><TD ALIGN=LEFT><FONT FACE="ARIAL,HELVETICA" COLOR=WHITE SIZE=2><B> ΔΙΑΧ ASTERISK: Διαχείριση</TD><TD ALIGN=RIGHT><FONT FACE="ARIAL,HELVETICA" COLOR=WHITE SIZE=2><B><? echo date("l F j, Y G:i:s A") ?> </TD></TR>
|
||||
<TR BGCOLOR=#F0F5FE><TD ALIGN=LEFT COLSPAN=2><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=1><B> <a href="<? echo $admin_page ?>"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=1>ΛΙΣΤΑ ΟΛΩΝ ΤΩΝ ΤΗΛΕΦΩΝΩΝ</a> | <a href="<? echo $admin_page ?>?ADD=1"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=1>ΠΡΟΣΘΗΚΗ ΝΕΟΥ ΤΗΛΕΦΩΝΟΥ</a> | <a href="<? echo $admin_page ?>?ADD=5"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=1>ΑΝΑΖΗΤΗΣΗ ΤΗΛΕΦΩΝΟΥ</a> | <a href="<? echo $admin_page ?>?ADD=11"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=1>ΠΡΟΣΘΗΚΗ ΔΙΑΚΟΜΙΣΤΗ</a> | <a href="<? echo $admin_page ?>?ADD=10"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=1>ΛΙΣΤΑ ΟΛΩΝ ΤΩΝ ΔΙΑΚΟΜΙΣΤΩΝ</a></TD></TR>
|
||||
<TR BGCOLOR=#F0F5FE><TD ALIGN=LEFT COLSPAN=2><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=1><B> <a href="<? echo $admin_page ?>?ADD=100"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=1>ΕΜΦΑΝΙΣΗ ΟΛΩΝ ΤΩΝ ΣΥΝΔΙΑΛΕΞΕΩΝ</a> | <a href="<? echo $admin_page ?>?ADD=111"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=1>ΠΡΟΣΘΗΚΗ ΝΕΑΣ ΣΥΝΔΙΑΛΕΞΗΣ</a></TD></TR>
|
||||
|
||||
|
||||
|
||||
|
||||
<?
|
||||
|
||||
echo "<TR BGCOLOR=\"#F0F5FE\"><TD ALIGN=LEFT COLSPAN=2><FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2><B> \n";
|
||||
|
||||
echo "<form action=$PHP_SELF method=POST>\n";
|
||||
echo "<input type=hidden name=extension value=\"$extension\">\n";
|
||||
echo "<input type=hidden name=server_ip value=\"$server_ip\">\n";
|
||||
echo "<input type=text name=begin_date value=\"$begin_date\" size=10 maxsize=10> to \n";
|
||||
echo "<input type=text name=end_date value=\"$end_date\" size=10 maxsize=10> \n";
|
||||
echo "<input type=submit name=submit value=submit>\n";
|
||||
|
||||
|
||||
echo " $user - $full_name\n";
|
||||
|
||||
echo "</B></TD></TR>\n";
|
||||
echo "<TR><TD ALIGN=LEFT COLSPAN=2>\n";
|
||||
|
||||
|
||||
$stmt="SELECT count(*),channel_group, sum(length_in_sec) from call_log where extension='$extension' and server_ip='$server_ip' and start_time >= '$begin_date 0:00:01' and start_time <= '$end_date 23:59:59' group by channel_group order by channel_group";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
$statuses_to_print = mysql_num_rows($rslt);
|
||||
# echo "|$stmt|\n";
|
||||
|
||||
echo "<br><center>\n";
|
||||
|
||||
echo "<B>ΧΡΟΝΟΣ ΟΜΙΛΙΑΣ ΚΑΙ ΚΑΝΑΛΙΑ:</B>\n";
|
||||
|
||||
echo "<center><TABLE width=300 cellspacing=0 cellpadding=1>\n";
|
||||
echo "<tr><td><font size=2>ΚΑΝΑΛΙ ΟΜΑΔΑΣ </td><td align=right><font size=2>ΚΑΤΑΜΕΤΡΗΣΗ</td><td align=right><font size=2> ΩΡΕΣ:ΛΕΠΤΑ</td></tr>\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 "<tr $bgcolor><td><font size=2>$row[1]</td>";
|
||||
echo "<td align=right><font size=2> $row[0]</td>\n";
|
||||
echo "<td align=right><font size=2> $call_hours_int:$call_minutes_int</td></tr>\n";
|
||||
$total_calls = ($total_calls + $row[0]);
|
||||
|
||||
$call_seconds=0;
|
||||
$o++;
|
||||
}
|
||||
|
||||
$stmt="SELECT sum(length_in_sec) from call_log where extension='$extension' and server_ip='$server_ip' and start_time >= '$begin_date 0:00:01' and start_time <= '$end_date 23:59:59'";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
$counts_to_print = mysql_num_rows($rslt);
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$call_seconds = $row[0];
|
||||
$call_hours = ($call_seconds / 3600);
|
||||
$call_hours = round($call_hours, 2);
|
||||
$call_hours_int = intval("$call_hours");
|
||||
$call_minutes = ($call_hours - $call_hours_int);
|
||||
$call_minutes = ($call_minutes * 60);
|
||||
$call_minutes_int = round($call_minutes, 0);
|
||||
if ($call_minutes_int < 10) {$call_minutes_int = "0$call_minutes_int";}
|
||||
# echo "|$stmt|\n";
|
||||
|
||||
echo "<tr><td><font size=2>ΣΥΝΟΛΙΚΕΣ ΚΛΗΣΕΙΣ </td><td align=right><font size=2> $total_calls</td><td align=right><font size=2> $call_hours_int:$call_minutes_int</td></tr>\n";
|
||||
echo "</TABLE></center>\n";
|
||||
echo "<br><br>\n";
|
||||
|
||||
echo "<center>\n";
|
||||
|
||||
echo "<B>ΤΕΛΕΥΤΑΙΕΣ 1000 ΚΛΗΣΕΙΣ ΓΙΑ ΤΟ ΔΙΑΣΤΗΜΑ ΗΜΕΡΟΜΗΝΙΑΣ:</B>\n";
|
||||
echo "<TABLE width=400 cellspacing=0 cellpadding=1>\n";
|
||||
echo "<tr><td><font size=2>ΑΡΙΘΜΟΣ </td><td><font size=2>ΚΑΝΑΛΙ ΟΜΑΔΑΣ </td><td align=right><font size=2> ΗΜΕΡΑ</td><td align=right><font size=2> LENGTH(MIN.)</td></tr>\n";
|
||||
|
||||
$stmt="SELECT number_dialed,channel_group,start_time,length_in_min from call_log where extension='$extension' and server_ip='$server_ip' and start_time >= '$begin_date 0:00:01' and start_time <= '$end_date 23:59:59' LIMIT 1000";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
$events_to_print = mysql_num_rows($rslt);
|
||||
# echo "|$stmt|\n";
|
||||
|
||||
$total_calls=0;
|
||||
$o=0;
|
||||
$event_start_seconds='';
|
||||
$event_stop_seconds='';
|
||||
while ($events_to_print > $o) {
|
||||
$row=mysql_fetch_row($rslt);
|
||||
if (eregi("1$|3$|5$|7$|9$", $o))
|
||||
{$bgcolor='bgcolor="#B9CBFD"';}
|
||||
else
|
||||
{$bgcolor='bgcolor="#9BB9FB"';}
|
||||
echo "<tr $bgcolor><td><font size=2>$row[0]</td>";
|
||||
echo "<td align=right><font size=2> $row[1]</td>\n";
|
||||
echo "<td align=right><font size=2> $row[2]</td>\n";
|
||||
echo "<td align=right><font size=2> $row[3]</td></tr>\n";
|
||||
|
||||
|
||||
$call_seconds=0;
|
||||
$o++;
|
||||
}
|
||||
|
||||
|
||||
echo "</TABLE></center>\n";
|
||||
|
||||
|
||||
$ENDtime = date("U");
|
||||
|
||||
$RUNtime = ($ENDtime - $STARTtime);
|
||||
|
||||
echo "\n\n\n<br><br><br>\n\n";
|
||||
|
||||
|
||||
echo "<font size=0>\n\n\n<br><br><br>\nδιαδικασία που τρέχει: $RUNtime seconds</font>";
|
||||
|
||||
|
||||
?>
|
||||
|
||||
|
||||
</TD></TR><TABLE>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
<?
|
||||
|
||||
exit;
|
||||
|
||||
|
||||
|
||||
?>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,165 +0,0 @@
|
||||
<?
|
||||
|
||||
require("dbconnect.php");
|
||||
|
||||
##### depricated
|
||||
#require_once("htglobalize.php");
|
||||
|
||||
$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER'];
|
||||
$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW'];
|
||||
$PHP_SELF=$_SERVER['PHP_SELF'];
|
||||
$submit=$_GET["submit"]; if (!$submit) {$submit=$_POST["submit"];}
|
||||
$ΕΠΙΒΕΒΑΙΩΣΗ=$_GET["ΕΠΙΒΕΒΑΙΩΣΗ"]; if (!$ΕΠΙΒΕΒΑΙΩΣΗ) {$ΕΠΙΒΕΒΑΙΩΣΗ=$_POST["ΕΠΙΒΕΒΑΙΩΣΗ"];}
|
||||
|
||||
### AST GUI database administration
|
||||
### remote_inbound.php
|
||||
|
||||
# the purpose of this script and webpage is to allow for remote or local users of the system to log in and grab phone calls that are coming inbound into the Asterisk server and being put in the parked_channels table while they hear a soundfile for a limited amount of time before being forwarded on to either a set extension or a voicemail box. This gives remote or local agents a way to grab calls without tying up their phone lines all day. The agent sees the refreshing screen of calls on park and when they want to take one they just click on it, and a small window opens that will allow them to grab the call and/or look up more information on the caller through the callerID that is given(if available)
|
||||
|
||||
|
||||
$STARTtime = date("U");
|
||||
$TODAY = date("Y-m-d");
|
||||
$NOW_TIME = date("Y-m-d H:i:s");
|
||||
$popup_page = './inbound_popup.php';
|
||||
|
||||
$stmt="SELECT count(*) from phones where login='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and active = 'Y' and status IN('ACTIVE','ADMIN');";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$auth=$row[0];
|
||||
|
||||
$fp = fopen ("./project_auth_entries.txt", "a");
|
||||
$date = date("r");
|
||||
$ip = getenv("REMOTE_ADDR");
|
||||
$browser = getenv("HTTP_USER_AGENT");
|
||||
|
||||
if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or (!$auth))
|
||||
{
|
||||
Header("WWW-Authenticate: Basic realm=\"VICI-ASTERISK\"");
|
||||
Header("HTTP/1.0 401 Unauthorized");
|
||||
echo "Ακυρο Ονομα Χρήστη/Κωδικός Πρόσβασης: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n";
|
||||
exit;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
if($auth>0)
|
||||
{
|
||||
$office_no=strtoupper($PHP_AUTH_USER);
|
||||
$password=strtoupper($PHP_AUTH_PW);
|
||||
$stmt="SELECT fullname,dialplan_number from phones where login='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW'";
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$LOGfullname=$row[0];
|
||||
fwrite ($fp, "ASTERISK|GOOD|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|$LOGfullname|\n");
|
||||
fclose($fp);
|
||||
|
||||
##### get server listing for dynamic pulldown
|
||||
$stmt="SELECT fullname,dialplan_number,server_ip from phones where login='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW'";
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$rsltx=mysql_query($stmt, $link);
|
||||
$rowx=mysql_fetch_row($rsltx);
|
||||
$fullname = $rowx[0];
|
||||
$dialplan_number = $rowx[1];
|
||||
$user_server_ip = $rowx[2];
|
||||
if ($DB) {echo "|$rowx[0]|$rowx[1]|$rowx[2]|\n";}
|
||||
}
|
||||
else
|
||||
{
|
||||
fwrite ($fp, "ASTERISK|FAIL|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|\n");
|
||||
fclose($fp);
|
||||
}
|
||||
}
|
||||
|
||||
echo"<HTML><HEAD>\n";
|
||||
echo"<TITLE>ASTERISK ΑΠΟΜΑΚΡΥΣΜΕΝΟ ΕΙΣΕΡΧΟΜΕΝΟ: Κύριο</TITLE></HEAD>\n";
|
||||
echo"<META HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html; charset=iso-8859-1\">\n";
|
||||
echo"<META HTTP-EQUIV=Refresh CONTENT=\"5; URL=$PHP_SELF\">\n";
|
||||
echo"</HEAD>\n";
|
||||
|
||||
?>
|
||||
|
||||
<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0>
|
||||
<CENTER><FONT FACE="Courier" COLOR=BLACK SIZE=3>
|
||||
|
||||
<?
|
||||
|
||||
|
||||
echo "$NOW_TIME $PHP_AUTH_USER - $fullname - ΚΛΗΣΕΙΣ ΣΤΑΛΘΗΚΑΝ ΠΡΟΣ: $dialplan_number<BR><BR>\n";
|
||||
|
||||
echo "Πατήστε στο κανάλι παρακάτω, που θα επιθυμούσατε να έχετε κατευθύνει στο τηλέφωνό σας<BR><BR>\n";
|
||||
|
||||
echo "<PRE>\n";
|
||||
echo "CHANNEL SERVER CHANNEL_GROUP EXTENSION PARKED_BY PARKED_TIME \n";
|
||||
echo "----------------------------------------------------------------------------------------------\n";
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
$stmt="SELECT count(*) from parked_channels where server_ip='$user_server_ip' order by parked_time";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$parked_count = $row[0];
|
||||
if ($parked_count > 0)
|
||||
{
|
||||
$stmt="SELECT * from parked_channels where server_ip='$user_server_ip' and channel_group LIKE \"IN_%\" order by parked_time";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$parked_to_print = mysql_num_rows($rslt);
|
||||
$i=0;
|
||||
while ($i < $parked_to_print)
|
||||
{
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$channel = sprintf("%-11s", $row[0]);
|
||||
$server = sprintf("%-14s", $row[1]);
|
||||
$channel_group = sprintf("%-16s", $row[2]);
|
||||
$extension = sprintf("%-13s", $row[3]);
|
||||
$parked_by = sprintf("%-21s", $row[4]);
|
||||
$parked_time = sprintf("%-19s", $row[5]);
|
||||
|
||||
echo "<A HREF=\"$popup_page?phone=$row[4]&channel=$row[0]&parked_time=$row[5]&server_ip=$user_server_ip&DB=\" target=\"_blank\">$channel</A>$server$channel_group$extension$parked_by$parked_time\n";
|
||||
|
||||
$i++;
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "**********************************************************************************************\n";
|
||||
echo "**********************************************************************************************\n";
|
||||
echo "*************************************** NO PARKED CALLS **************************************\n";
|
||||
echo "**********************************************************************************************\n";
|
||||
echo "**********************************************************************************************\n";
|
||||
}
|
||||
|
||||
|
||||
$ENDtime = date("U");
|
||||
|
||||
$RUNtime = ($ENDtime - $STARTtime);
|
||||
|
||||
echo "</PRE>\n\n\n<br><br><br>\n\n";
|
||||
|
||||
|
||||
echo "<font size=0>\n\n\n<br><br><br>\nδιαδικασία που τρέχει: $RUNtime seconds</font>";
|
||||
|
||||
|
||||
?>
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
<?
|
||||
|
||||
exit;
|
||||
|
||||
|
||||
|
||||
?>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,369 +0,0 @@
|
||||
<?
|
||||
require("dbconnect.php");
|
||||
|
||||
##### depricated
|
||||
#require_once("htglobalize.php");
|
||||
|
||||
$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER'];
|
||||
$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW'];
|
||||
$PHP_SELF=$_SERVER['PHP_SELF'];
|
||||
$group=$_GET["group"]; if (!$group) {$group=$_POST["group"];}
|
||||
$query_date=$_GET["query_date"]; if (!$query_date) {$query_date=$_POST["query_date"];}
|
||||
$server_ip=$_GET["server_ip"]; if (!$server_ip) {$server_ip=$_POST["server_ip"];}
|
||||
$submit=$_GET["submit"]; if (!$submit) {$submit=$_POST["submit"];}
|
||||
$SUBMIT=$_GET["SUBMIT"]; if (!$SUBMIT) {$SUBMIT=$_POST["SUBMIT"];}
|
||||
|
||||
# AST_inboundEXTstats.php
|
||||
|
||||
$NOW_DATE = date("Y-m-d");
|
||||
$NOW_TIME = date("Y-m-d H:i:s");
|
||||
$STARTtime = date("U");
|
||||
if (!$query_date) {$query_date = $NOW_DATE;}
|
||||
if (!$server_ip) {$server_ip = '10.10.11.11';}
|
||||
|
||||
$stmt="select extension,full_number,inbound_name from inbound_numbers where server_ip='$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++;
|
||||
}
|
||||
?>
|
||||
|
||||
<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=iso-8859-1\">\n";
|
||||
#echo"<META HTTP-EQUIV=Refresh CONTENT=\"7; URL=$PHP_SELF?server_ip=$server_ip&DB=$DB\">\n";
|
||||
echo "<TITLE>ASTERISK: Inbound Calls Stats</TITLE></HEAD><BODY BGCOLOR=WHITE>\n";
|
||||
echo "<FORM ACTION=\"$PHP_SELF\" METHOD=GET>\n";
|
||||
echo "<INPUT TYPE=HIDDEN NAME=server_ip VALUE=\"$server_ip\">\n";
|
||||
echo "<INPUT TYPE=TEXT NAME=query_date SIZE=10 MAXLENGTH=10 VALUE=\"$query_date\">\n";
|
||||
echo "<SELECT SIZE=1 NAME=group>\n";
|
||||
$o=0;
|
||||
while ($inbound_to_print > $o)
|
||||
{
|
||||
if ($inbound[$o] == $group) {echo "<option selected value=\"$inbound[$o]\">$fullnum[$o] - $inbname[$o]</option>\n";}
|
||||
else {echo "<option value=\"$inbound[$o]\">$fullnum[$o] - $inbname[$o]</option>\n";}
|
||||
$o++;
|
||||
}
|
||||
echo "</SELECT>\n";
|
||||
echo "<INPUT TYPE=SUBMIT NAME=SUBMIT VALUE=SUBMIT>\n";
|
||||
echo "</FORM>\n\n";
|
||||
|
||||
echo "<PRE><FONT SIZE=2>\n\n";
|
||||
|
||||
|
||||
if (!$group)
|
||||
{
|
||||
echo "\n\n";
|
||||
echo "PLEASE SELECT A NUMBER AND DATE ABOVE AND CLICK SUBMIT\n";
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
|
||||
|
||||
echo "ASTERISK: Inbound Calls Stats $NOW_TIME\n";
|
||||
|
||||
echo "\n";
|
||||
echo "---------- TOTALS\n";
|
||||
|
||||
$stmt="select count(*),sum(length_in_sec) from call_log where start_time >= '$query_date 00:00:01' and start_time <= '$query_date 23:59:59' and server_ip='$server_ip' and extension='$group';";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$row=mysql_fetch_row($rslt);
|
||||
|
||||
$TOTALcalls = sprintf("%10s", $row[0]);
|
||||
$average_hold_seconds = ($row[1] / $row[0]);
|
||||
$average_hold_seconds = round($average_hold_seconds, 0);
|
||||
$average_hold_seconds = sprintf("%10s", $average_hold_seconds);
|
||||
|
||||
echo "Total Calls That came into this number: $TOTALcalls\n";
|
||||
echo "Average Call Length(seconds) for all Calls: $average_hold_seconds\n";
|
||||
|
||||
echo "\n";
|
||||
echo "---------- DROPS\n";
|
||||
|
||||
$stmt="select count(*),sum(length_in_sec) from call_log where start_time >= '$query_date 00:00:01' and start_time <= '$query_date 23:59:59' and server_ip='$server_ip' and extension='$group' 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 >= '$query_date 00:00:01' and start_time <= '$query_date 23:59:59' and server_ip='$server_ip' and extension='$group';";
|
||||
$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("%-10s", $row[0]);
|
||||
$CIDname = sprintf("%-15s", $row[1]); while(strlen($full_name)>15) {$full_name = substr("$full_name", 0, -1);}
|
||||
$datetime = sprintf("%-19s", $row[3]);
|
||||
$USERavgTALK = $row[2];
|
||||
|
||||
$USERavgTALK_M = ($USERavgTALK / 60);
|
||||
$USERavgTALK_M = round($USERavgTALK_M, 2);
|
||||
$USERavgTALK_M_int = intval("$USERavgTALK_M");
|
||||
$USERavgTALK_S = ($USERavgTALK_M - $USERavgTALK_M_int);
|
||||
$USERavgTALK_S = ($USERavgTALK_S * 60);
|
||||
$USERavgTALK_S = round($USERavgTALK_S, 0);
|
||||
if ($USERavgTALK_S < 10) {$USERavgTALK_S = "0$USERavgTALK_S";}
|
||||
$USERavgTALK_MS = "$USERavgTALK_M_int:$USERavgTALK_S";
|
||||
$USERavgTALK_MS = sprintf("%6s", $USERavgTALK_MS);
|
||||
|
||||
echo "| $CID | $CIDname | $USERavgTALK_MS | $datetime |\n";
|
||||
|
||||
$i++;
|
||||
}
|
||||
|
||||
echo "+------------+-----------------+--------+---------------------+\n";
|
||||
|
||||
##############################
|
||||
######### TIME STATS
|
||||
|
||||
if ($output == 'FULL')
|
||||
{
|
||||
|
||||
echo "\n";
|
||||
echo "---------- TIME STATS\n";
|
||||
|
||||
echo "<FONT SIZE=0>\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 >= '$query_date $h:00:00' and start_time <= '$query_date $h:14:59' and server_ip='$server_ip' and extension='$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 call_log where start_time >= '$query_date $h:00:00' and start_time <= '$query_date $h:14:59' and server_ip='$server_ip' and extension='$group' 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 >= '$query_date $h:15:00' and start_time <= '$query_date $h:29:59' and server_ip='$server_ip' and extension='$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 call_log where start_time >= '$query_date $h:15:00' and start_time <= '$query_date $h:29:59' and server_ip='$server_ip' and extension='$group' 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 >= '$query_date $h:30:00' and start_time <= '$query_date $h:44:59' and server_ip='$server_ip' and extension='$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 call_log where start_time >= '$query_date $h:30:00' and start_time <= '$query_date $h:44:59' and server_ip='$server_ip' and extension='$group' 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 >= '$query_date $h:45:00' and start_time <= '$query_date $h:59:59' and server_ip='$server_ip' and extension='$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 call_log where start_time >= '$query_date $h:45:00' and start_time <= '$query_date $h:59:59' and server_ip='$server_ip' and extension='$group' 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 "<!-- HICOUNT: $hi_hour_count|$hour_multiplier -->\n";
|
||||
echo "GRAPH IN 15 MINUTE INCREMENTS OF TOTAL CALLS\n";
|
||||
|
||||
$k=1;
|
||||
$Mk=0;
|
||||
$call_scale = '0';
|
||||
while ($k <= 102)
|
||||
{
|
||||
if ($Mk >= 5)
|
||||
{
|
||||
$Mk=0;
|
||||
$scale_num=($k / $hour_multiplier);
|
||||
$scale_num = round($scale_num, 0);
|
||||
$LENscale_num = (strlen($scale_num));
|
||||
$k = ($k + $LENscale_num);
|
||||
$call_scale .= "$scale_num";
|
||||
}
|
||||
else
|
||||
{
|
||||
$call_scale .= " ";
|
||||
$k++; $Mk++;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
echo "+------+-------------------------------------------------------------------------------------------------------+-------+-------+\n";
|
||||
#echo "| HOUR | GRAPH IN 15 MINUTE INCREMENTS OF TOTAL INCOMING CALLS FOR THIS GROUP | DROPS | TOTAL |\n";
|
||||
echo "| HOUR |$call_scale| DROPS | TOTAL |\n";
|
||||
echo "+------+-------------------------------------------------------------------------------------------------------+-------+-------+\n";
|
||||
|
||||
$ZZ = '00';
|
||||
$i=0;
|
||||
$h=4;
|
||||
$hour= -1;
|
||||
$no_lines_yet=1;
|
||||
|
||||
while ($i <= 96)
|
||||
{
|
||||
$char_counter=0;
|
||||
$time = ' ';
|
||||
if ($h >= 4)
|
||||
{
|
||||
$hour++;
|
||||
$h=0;
|
||||
if ($hour < 10) {$hour = "0$hour";}
|
||||
$time = "+$hour$ZZ+";
|
||||
}
|
||||
if ($h == 1) {$time = " 15 ";}
|
||||
if ($h == 2) {$time = " 30 ";}
|
||||
if ($h == 3) {$time = " 45 ";}
|
||||
$Ghour_count = $hour_count[$i];
|
||||
if ($Ghour_count < 1)
|
||||
{
|
||||
if ( ($no_lines_yet) or ($i > $last_full_record) )
|
||||
{
|
||||
$do_nothing=1;
|
||||
}
|
||||
else
|
||||
{
|
||||
$hour_count[$i] = sprintf("%-5s", $hour_count[$i]);
|
||||
echo "|$time|";
|
||||
$k=0; while ($k <= 102) {echo " "; $k++;}
|
||||
echo "| $hour_count[$i] |\n";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$no_lines_yet=0;
|
||||
$Xhour_count = ($Ghour_count * $hour_multiplier);
|
||||
$Yhour_count = (99 - $Xhour_count);
|
||||
|
||||
$Gdrop_count = $drop_count[$i];
|
||||
if ($Gdrop_count < 1)
|
||||
{
|
||||
$hour_count[$i] = sprintf("%-5s", $hour_count[$i]);
|
||||
|
||||
echo "|$time|<SPAN class=\"green\">";
|
||||
$k=0; while ($k <= $Xhour_count) {echo "*"; $k++; $char_counter++;}
|
||||
echo "*X</SPAN>"; $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|<SPAN class=\"red\">";
|
||||
$k=0; while ($k <= $Xdrop_count) {echo ">"; $k++; $char_counter++;}
|
||||
echo "D</SPAN><SPAN class=\"green\">"; $char_counter++;
|
||||
$k=0; while ($k <= $XXhour_count) {echo "*"; $k++; $char_counter++;}
|
||||
echo "X</SPAN>"; $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";
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
?>
|
||||
</PRE>
|
||||
|
||||
</BODY></HTML>
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,16 +0,0 @@
|
||||
<?
|
||||
|
||||
$link=mysql_connect("10.10.11.10", "astcron", "astcron");
|
||||
mysql_select_db("asterisk");
|
||||
|
||||
$local_DEF = 'Local/';
|
||||
$conf_silent_prefix = '7';
|
||||
$local_AMP = '@';
|
||||
$ext_context = 'demo';
|
||||
$recording_exten = '8309';
|
||||
|
||||
$WeBServeRRooT = '/home/www/htdocs';
|
||||
#$WeBServeRRooT = '/usr/local/apache2/htdocs';
|
||||
$WeBRooTWritablE = '1';
|
||||
|
||||
?>
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 492 B |
@@ -1,23 +0,0 @@
|
||||
<?php
|
||||
/*
|
||||
author: Paul Concepcion
|
||||
date: April 18, 2004
|
||||
iterate through the $_GET, $_POST, and $_SERVER hashes,
|
||||
creating global variables with the same values.
|
||||
|
||||
security risk: equal to running with register_globals "on"
|
||||
|
||||
*/
|
||||
|
||||
function array_conv($array){
|
||||
foreach ($array as $key -> $value){
|
||||
${$key} = $value;
|
||||
global ${$key};// = $value;
|
||||
}
|
||||
|
||||
}
|
||||
array_conv($_GET);
|
||||
array_conv($_POST);
|
||||
array_conv($_SERVER);
|
||||
|
||||
?>
|
||||
@@ -1,194 +0,0 @@
|
||||
<?
|
||||
|
||||
require("dbconnect.php");
|
||||
|
||||
##### depricated
|
||||
#require_once("htglobalize.php");
|
||||
|
||||
$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER'];
|
||||
$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW'];
|
||||
$PHP_SELF=$_SERVER['PHP_SELF'];
|
||||
$vendor_id=$_GET["vendor_id"]; if (!$vendor_id) {$vendor_id=$_POST["vendor_id"];}
|
||||
$phone=$_GET["phone"]; if (!$phone) {$phone=$_POST["phone"];}
|
||||
$lead_id=$_GET["lead_id"]; if (!$lead_id) {$lead_id=$_POST["lead_id"];}
|
||||
$first_name=$_GET["first_name"]; if (!$first_name) {$first_name=$_POST["first_name"];}
|
||||
$last_name=$_GET["last_name"]; if (!$last_name) {$last_name=$_POST["last_name"];}
|
||||
$phone_number=$_GET["phone_number"]; if (!$phone_number) {$phone_number=$_POST["phone_number"];}
|
||||
$end_call=$_GET["end_call"]; if (!$end_call) {$end_call=$_POST["end_call"];}
|
||||
$DB=$_GET["DB"]; if (!$DB) {$DB=$_POST["DB"];}
|
||||
$dispo=$_GET["dispo"]; if (!$dispo) {$dispo=$_POST["dispo"];}
|
||||
$list_id=$_GET["list_id"]; if (!$list_id) {$list_id=$_POST["list_id"];}
|
||||
$campaign_id=$_GET["campaign_id"]; if (!$campaign_id) {$campaign_id=$_POST["campaign_id"];}
|
||||
$phone_code=$_GET["phone_code"]; if (!$phone_code) {$phone_code=$_POST["phone_code"];}
|
||||
$server_ip=$_GET["server_ip"]; if (!$server_ip) {$server_ip=$_POST["server_ip"];}
|
||||
$extension=$_GET["extension"]; if (!$extension) {$extension=$_POST["extension"];}
|
||||
$channel=$_GET["channel"]; if (!$channel) {$channel=$_POST["channel"];}
|
||||
$call_began=$_GET["call_began"]; if (!$call_began) {$call_began=$_POST["call_began"];}
|
||||
$parked_time=$_GET["parked_time"]; if (!$parked_time) {$parked_time=$_POST["parked_time"];}
|
||||
$tsr=$_GET["tsr"]; if (!$tsr) {$tsr=$_POST["tsr"];}
|
||||
$address1=$_GET["address1"]; if (!$address1) {$address1=$_POST["address1"];}
|
||||
$address2=$_GET["address2"]; if (!$address2) {$address2=$_POST["address2"];}
|
||||
$address3=$_GET["address3"]; if (!$address3) {$address3=$_POST["address3"];}
|
||||
$city=$_GET["city"]; if (!$city) {$city=$_POST["city"];}
|
||||
$state=$_GET["state"]; if (!$state) {$state=$_POST["state"];}
|
||||
$postal_code=$_GET["postal_code"]; if (!$postal_code) {$postal_code=$_POST["postal_code"];}
|
||||
$province=$_GET["province"]; if (!$province) {$province=$_POST["province"];}
|
||||
$country_code=$_GET["country_code"]; if (!$country_code) {$country_code=$_POST["country_code"];}
|
||||
$alt_phone=$_GET["alt_phone"]; if (!$alt_phone) {$alt_phone=$_POST["alt_phone"];}
|
||||
$email=$_GET["email"]; if (!$email) {$email=$_POST["email"];}
|
||||
$security=$_GET["security"]; if (!$security) {$security=$_POST["security"];}
|
||||
$comments=$_GET["comments"]; if (!$comments) {$comments=$_POST["comments"];}
|
||||
$status=$_GET["status"]; if (!$status) {$status=$_POST["status"];}
|
||||
$submit=$_GET["submit"]; if (!$submit) {$submit=$_POST["submit"];}
|
||||
$SUBMIT=$_GET["SUBMIT"]; if (!$SUBMIT) {$SUBMIT=$_POST["SUBMIT"];}
|
||||
|
||||
### AST GUI database administration
|
||||
### inbound_popup.php
|
||||
|
||||
# this is the inbound popup of a specific call that grabs the call and allows you to go and fetch info on that caller in the local CRM system.
|
||||
|
||||
|
||||
$STARTtime = date("U");
|
||||
$TODAY = date("Y-m-d");
|
||||
$NOW_TIME = date("Y-m-d H:i:s");
|
||||
$popup_page = './inbound_popup.php';
|
||||
$FILE_datetime = $STARTtime;
|
||||
|
||||
$ext_context = 'demo';
|
||||
if (!$begin_date) {$begin_date = $TODAY;}
|
||||
if (!$end_date) {$end_date = $TODAY;}
|
||||
|
||||
#$link=mysql_connect("localhost", "cron", "1234");
|
||||
#mysql_select_db("asterisk");
|
||||
|
||||
$stmt="SELECT count(*) from phones where login='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and active = 'Y' and status IN('ACTIVE','ADMIN');";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$auth=$row[0];
|
||||
|
||||
$fp = fopen ("./project_auth_entries.txt", "a");
|
||||
$date = date("r");
|
||||
$ip = getenv("REMOTE_ADDR");
|
||||
$browser = getenv("HTTP_USER_AGENT");
|
||||
|
||||
if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or (!$auth))
|
||||
{
|
||||
Header("WWW-Authenticate: Basic realm=\"VICI-ASTERISK\"");
|
||||
Header("HTTP/1.0 401 Unauthorized");
|
||||
echo "Invalid Username/Password: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n";
|
||||
exit;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
if($auth>0)
|
||||
{
|
||||
$office_no=strtoupper($PHP_AUTH_USER);
|
||||
$password=strtoupper($PHP_AUTH_PW);
|
||||
$stmt="SELECT fullname,dialplan_number from phones where login='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW'";
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$LOGfullname=$row[0];
|
||||
fwrite ($fp, "ASTERISK|GOOD|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|$LOGfullname|\n");
|
||||
fclose($fp);
|
||||
|
||||
##### get server listing for dynamic pulldown
|
||||
$stmt="SELECT fullname,dialplan_number,server_ip from phones where login='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW'";
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$rsltx=mysql_query($stmt, $link);
|
||||
$rowx=mysql_fetch_row($rsltx);
|
||||
$fullname = $rowx[0];
|
||||
$dialplan_number = $rowx[1];
|
||||
$user_server_ip = $rowx[2];
|
||||
if ($DB) {echo "|$rowx[0]|$rowx[1]|$rowx[2]|\n";}
|
||||
}
|
||||
else
|
||||
{
|
||||
fwrite ($fp, "ASTERISK|FAIL|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|\n");
|
||||
fclose($fp);
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
<html>
|
||||
<head>
|
||||
<title>ASTERISK REMOTE INBOUND: Popup</title>
|
||||
</head>
|
||||
<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0>
|
||||
<CENTER><FONT FACE="Courier" COLOR=BLACK SIZE=3>
|
||||
|
||||
<?
|
||||
|
||||
$stmt="SELECT count(*) from parked_channels where server_ip='$user_server_ip' and parked_time='$parked_time' and channel='$channel'";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$parked_count = $row[0];
|
||||
|
||||
if ($parked_count > 0)
|
||||
{
|
||||
|
||||
$stmt="DELETE from parked_channels where server_ip='$user_server_ip' and parked_time='$parked_time' and channel='$channel' LIMIT 1";
|
||||
if ($DB) {echo "|$stmt|\n";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
|
||||
$DTqueryCID = "RR$FILE_datetime$PHP_AUTH_USER";
|
||||
|
||||
### insert a NEW record to the vicidial_manager table to be processed
|
||||
$stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$user_server_ip','','Redirect','$DTqueryCID','Exten: $dialplan_number','Channel: $channel','Context: $ext_context','Priority: 1','Callerid: $DTqueryCID','','','','','')";
|
||||
if ($DB) {echo "|$stmt|\n";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
|
||||
echo "Redirect command sent for channel $channel $NOW_TIME\n<BR><BR>\n";
|
||||
|
||||
|
||||
$url = 'https://10.10.10.15/internal/back_end_systems/cust_serv/index.php?Search=SEARCH&';
|
||||
$Suser = 'username=';
|
||||
$Spass = '&passwd=';
|
||||
$Sphone = '&phone=';
|
||||
|
||||
$newurl = "$url$Suser$PHP_AUTH_USER$Spass$PHP_AUTH_PW$Sphone$phone";
|
||||
if ( ($phone == 'unknown') or (strlen($phone)<9) )
|
||||
{$newurl = "$url$Suser$PHP_AUTH_USER$Spass$PHP_AUTH_PW";}
|
||||
|
||||
echo "<a href=\"$newurl\">Look up this customer in Customer Service System</a>\n<BR><BR>\n";
|
||||
|
||||
echo "<a href=\"$PHP_SELF\">Close this window</a>\n<BR><BR>\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "Redirect command FAILED for channel $channel $NOW_TIME\n<BR><BR>\n";
|
||||
echo "<a href=\"$PHP_SELF\">Close this window</a>\n<BR><BR>\n";
|
||||
}
|
||||
|
||||
|
||||
|
||||
$ENDtime = date("U");
|
||||
|
||||
$RUNtime = ($ENDtime - $STARTtime);
|
||||
|
||||
echo "\n\n\n<br><br><br>\n\n";
|
||||
|
||||
|
||||
echo "<font size=0>\n\n\n<br><br><br>\nscript runtime: $RUNtime seconds</font>";
|
||||
|
||||
|
||||
?>
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
<?
|
||||
|
||||
exit;
|
||||
|
||||
|
||||
|
||||
?>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,228 +0,0 @@
|
||||
<?
|
||||
|
||||
require("dbconnect.php");
|
||||
|
||||
##### depricated
|
||||
#require_once("htglobalize.php");
|
||||
|
||||
$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER'];
|
||||
$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW'];
|
||||
$PHP_SELF=$_SERVER['PHP_SELF'];
|
||||
$group=$_GET["group"]; if (!$group) {$group=$_POST["group"];}
|
||||
$query_date=$_GET["query_date"]; if (!$query_date) {$query_date=$_POST["query_date"];}
|
||||
$begin_date=$_GET["begin_date"]; if (!$begin_date) {$begin_date=$_POST["begin_date"];}
|
||||
$end_date=$_GET["end_date"]; if (!$end_date) {$end_date=$_POST["end_date"];}
|
||||
$extension=$_GET["extension"]; if (!$extension) {$extension=$_POST["extension"];}
|
||||
$server_ip=$_GET["server_ip"]; if (!$server_ip) {$server_ip=$_POST["server_ip"];}
|
||||
$user=$_GET["user"]; if (!$user) {$user=$_POST["user"];}
|
||||
$full_name=$_GET["full_name"]; if (!$full_name) {$full_name=$_POST["full_name"];}
|
||||
$submit=$_GET["submit"]; if (!$submit) {$submit=$_POST["submit"];}
|
||||
$SUBMIT=$_GET["SUBMIT"]; if (!$SUBMIT) {$SUBMIT=$_POST["SUBMIT"];}
|
||||
|
||||
### AST GUI database administration
|
||||
### user_stats.php
|
||||
|
||||
$STARTtime = date("U");
|
||||
$TODAY = date("Y-m-d");
|
||||
$admin_page = './admin.php';
|
||||
|
||||
if (!$begin_date) {$begin_date = $TODAY;}
|
||||
if (!$end_date) {$end_date = $TODAY;}
|
||||
|
||||
$stmt="SELECT count(*) from phones where login='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and active = 'Y' and status='ADMIN';";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$auth=$row[0];
|
||||
|
||||
$fp = fopen ("./project_auth_entries.txt", "a");
|
||||
$date = date("r");
|
||||
$ip = getenv("REMOTE_ADDR");
|
||||
$browser = getenv("HTTP_USER_AGENT");
|
||||
|
||||
if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or (!$auth))
|
||||
{
|
||||
Header("WWW-Authenticate: Basic realm=\"VICI-ASTERISK\"");
|
||||
Header("HTTP/1.0 401 Unauthorized");
|
||||
echo "Invalid Username/Password: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n";
|
||||
exit;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
if($auth>0)
|
||||
{
|
||||
$office_no=strtoupper($PHP_AUTH_USER);
|
||||
$password=strtoupper($PHP_AUTH_PW);
|
||||
$stmt="SELECT fullname from phones where login='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW'";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$LOGfullname=$row[0];
|
||||
fwrite ($fp, "ASTERISK|GOOD|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|$LOGfullname|\n");
|
||||
fclose($fp);
|
||||
|
||||
##### get server listing for dynamic pulldown
|
||||
$stmt="SELECT fullname from phones where server_ip='$server_ip' and extension='$extension'";
|
||||
$rsltx=mysql_query($stmt, $link);
|
||||
$rowx=mysql_fetch_row($rsltx);
|
||||
$fullname = $row[0];
|
||||
}
|
||||
else
|
||||
{
|
||||
fwrite ($fp, "ASTERISK|FAIL|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|\n");
|
||||
fclose($fp);
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
<html>
|
||||
<head>
|
||||
<title>ASTERISK ADMIN: Phone Stats</title>
|
||||
</head>
|
||||
<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0>
|
||||
<CENTER>
|
||||
<TABLE WIDTH=620 BGCOLOR=#D9E6FE cellpadding=2 cellspacing=0><TR BGCOLOR=#015B91><TD ALIGN=LEFT><FONT FACE="ARIAL,HELVETICA" COLOR=WHITE SIZE=2><B> ASTERISK ADMIN: Administration</TD><TD ALIGN=RIGHT><FONT FACE="ARIAL,HELVETICA" COLOR=WHITE SIZE=2><B><? echo date("l F j, Y G:i:s A") ?> </TD></TR>
|
||||
<TR BGCOLOR=#F0F5FE><TD ALIGN=LEFT COLSPAN=2><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=1><B> <a href="<? echo $admin_page ?>"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=1>LIST ALL PHONES</a> | <a href="<? echo $admin_page ?>?ADD=1"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=1>ADD A NEW PHONE</a> | <a href="<? echo $admin_page ?>?ADD=5"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=1>SEARCH FOR A PHONE</a> | <a href="<? echo $admin_page ?>?ADD=11"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=1>ADD A SERVER</a> | <a href="<? echo $admin_page ?>?ADD=10"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=1>LIST ALL SERVERS</a></TD></TR>
|
||||
<TR BGCOLOR=#F0F5FE><TD ALIGN=LEFT COLSPAN=2><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=1><B> <a href="<? echo $admin_page ?>?ADD=100"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=1>SHOW ALL CONFERENCES</a> | <a href="<? echo $admin_page ?>?ADD=111"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=1>ADD A NEW CONFERENCE</a></TD></TR>
|
||||
|
||||
|
||||
|
||||
|
||||
<?
|
||||
|
||||
echo "<TR BGCOLOR=\"#F0F5FE\"><TD ALIGN=LEFT COLSPAN=2><FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2><B> \n";
|
||||
|
||||
echo "<form action=$PHP_SELF method=POST>\n";
|
||||
echo "<input type=hidden name=extension value=\"$extension\">\n";
|
||||
echo "<input type=hidden name=server_ip value=\"$server_ip\">\n";
|
||||
echo "<input type=text name=begin_date value=\"$begin_date\" size=10 maxsize=10> to \n";
|
||||
echo "<input type=text name=end_date value=\"$end_date\" size=10 maxsize=10> \n";
|
||||
echo "<input type=submit name=submit value=submit>\n";
|
||||
|
||||
|
||||
echo " $user - $full_name\n";
|
||||
|
||||
echo "</B></TD></TR>\n";
|
||||
echo "<TR><TD ALIGN=LEFT COLSPAN=2>\n";
|
||||
|
||||
|
||||
$stmt="SELECT count(*),channel_group, sum(length_in_sec) from call_log where extension='$extension' and server_ip='$server_ip' and start_time >= '$begin_date 0:00:01' and start_time <= '$end_date 23:59:59' group by channel_group order by channel_group";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
$statuses_to_print = mysql_num_rows($rslt);
|
||||
# echo "|$stmt|\n";
|
||||
|
||||
echo "<br><center>\n";
|
||||
|
||||
echo "<B>CALL TIME AND CHANNELS:</B>\n";
|
||||
|
||||
echo "<center><TABLE width=300 cellspacing=0 cellpadding=1>\n";
|
||||
echo "<tr><td><font size=2>CHANNEL GROUP </td><td align=right><font size=2>COUNT</td><td align=right><font size=2> HOURS:MINUTES</td></tr>\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 "<tr $bgcolor><td><font size=2>$row[1]</td>";
|
||||
echo "<td align=right><font size=2> $row[0]</td>\n";
|
||||
echo "<td align=right><font size=2> $call_hours_int:$call_minutes_int</td></tr>\n";
|
||||
$total_calls = ($total_calls + $row[0]);
|
||||
|
||||
$call_seconds=0;
|
||||
$o++;
|
||||
}
|
||||
|
||||
$stmt="SELECT sum(length_in_sec) from call_log where extension='$extension' and server_ip='$server_ip' and start_time >= '$begin_date 0:00:01' and start_time <= '$end_date 23:59:59'";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
$counts_to_print = mysql_num_rows($rslt);
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$call_seconds = $row[0];
|
||||
$call_hours = ($call_seconds / 3600);
|
||||
$call_hours = round($call_hours, 2);
|
||||
$call_hours_int = intval("$call_hours");
|
||||
$call_minutes = ($call_hours - $call_hours_int);
|
||||
$call_minutes = ($call_minutes * 60);
|
||||
$call_minutes_int = round($call_minutes, 0);
|
||||
if ($call_minutes_int < 10) {$call_minutes_int = "0$call_minutes_int";}
|
||||
# echo "|$stmt|\n";
|
||||
|
||||
echo "<tr><td><font size=2>TOTAL CALLS </td><td align=right><font size=2> $total_calls</td><td align=right><font size=2> $call_hours_int:$call_minutes_int</td></tr>\n";
|
||||
echo "</TABLE></center>\n";
|
||||
echo "<br><br>\n";
|
||||
|
||||
echo "<center>\n";
|
||||
|
||||
echo "<B>LAST 1000 CALLS FOR DATE RANGE:</B>\n";
|
||||
echo "<TABLE width=400 cellspacing=0 cellpadding=1>\n";
|
||||
echo "<tr><td><font size=2>NUMBER </td><td><font size=2>CHANNEL GROUP </td><td align=right><font size=2> DATE</td><td align=right><font size=2> LENGTH(MIN.)</td></tr>\n";
|
||||
|
||||
$stmt="SELECT number_dialed,channel_group,start_time,length_in_min from call_log where extension='$extension' and server_ip='$server_ip' and start_time >= '$begin_date 0:00:01' and start_time <= '$end_date 23:59:59' LIMIT 1000";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
$events_to_print = mysql_num_rows($rslt);
|
||||
# echo "|$stmt|\n";
|
||||
|
||||
$total_calls=0;
|
||||
$o=0;
|
||||
$event_start_seconds='';
|
||||
$event_stop_seconds='';
|
||||
while ($events_to_print > $o) {
|
||||
$row=mysql_fetch_row($rslt);
|
||||
if (eregi("1$|3$|5$|7$|9$", $o))
|
||||
{$bgcolor='bgcolor="#B9CBFD"';}
|
||||
else
|
||||
{$bgcolor='bgcolor="#9BB9FB"';}
|
||||
echo "<tr $bgcolor><td><font size=2>$row[0]</td>";
|
||||
echo "<td align=right><font size=2> $row[1]</td>\n";
|
||||
echo "<td align=right><font size=2> $row[2]</td>\n";
|
||||
echo "<td align=right><font size=2> $row[3]</td></tr>\n";
|
||||
|
||||
|
||||
$call_seconds=0;
|
||||
$o++;
|
||||
}
|
||||
|
||||
|
||||
echo "</TABLE></center>\n";
|
||||
|
||||
|
||||
$ENDtime = date("U");
|
||||
|
||||
$RUNtime = ($ENDtime - $STARTtime);
|
||||
|
||||
echo "\n\n\n<br><br><br>\n\n";
|
||||
|
||||
|
||||
echo "<font size=0>\n\n\n<br><br><br>\nscript runtime: $RUNtime seconds</font>";
|
||||
|
||||
|
||||
?>
|
||||
|
||||
|
||||
</TD></TR><TABLE>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
<?
|
||||
|
||||
exit;
|
||||
|
||||
|
||||
|
||||
?>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,165 +0,0 @@
|
||||
<?
|
||||
|
||||
require("dbconnect.php");
|
||||
|
||||
##### depricated
|
||||
#require_once("htglobalize.php");
|
||||
|
||||
$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER'];
|
||||
$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW'];
|
||||
$PHP_SELF=$_SERVER['PHP_SELF'];
|
||||
$submit=$_GET["submit"]; if (!$submit) {$submit=$_POST["submit"];}
|
||||
$SUBMIT=$_GET["SUBMIT"]; if (!$SUBMIT) {$SUBMIT=$_POST["SUBMIT"];}
|
||||
|
||||
### AST GUI database administration
|
||||
### remote_inbound.php
|
||||
|
||||
# the purpose of this script and webpage is to allow for remote or local users of the system to log in and grab phone calls that are coming inbound into the Asterisk server and being put in the parked_channels table while they hear a soundfile for a limited amount of time before being forwarded on to either a set extension or a voicemail box. This gives remote or local agents a way to grab calls without tying up their phone lines all day. The agent sees the refreshing screen of calls on park and when they want to take one they just click on it, and a small window opens that will allow them to grab the call and/or look up more information on the caller through the callerID that is given(if available)
|
||||
|
||||
|
||||
$STARTtime = date("U");
|
||||
$TODAY = date("Y-m-d");
|
||||
$NOW_TIME = date("Y-m-d H:i:s");
|
||||
$popup_page = './inbound_popup.php';
|
||||
|
||||
$stmt="SELECT count(*) from phones where login='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and active = 'Y' and status IN('ACTIVE','ADMIN');";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$auth=$row[0];
|
||||
|
||||
$fp = fopen ("./project_auth_entries.txt", "a");
|
||||
$date = date("r");
|
||||
$ip = getenv("REMOTE_ADDR");
|
||||
$browser = getenv("HTTP_USER_AGENT");
|
||||
|
||||
if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or (!$auth))
|
||||
{
|
||||
Header("WWW-Authenticate: Basic realm=\"VICI-ASTERISK\"");
|
||||
Header("HTTP/1.0 401 Unauthorized");
|
||||
echo "Invalid Username/Password: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n";
|
||||
exit;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
if($auth>0)
|
||||
{
|
||||
$office_no=strtoupper($PHP_AUTH_USER);
|
||||
$password=strtoupper($PHP_AUTH_PW);
|
||||
$stmt="SELECT fullname,dialplan_number from phones where login='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW'";
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$LOGfullname=$row[0];
|
||||
fwrite ($fp, "ASTERISK|GOOD|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|$LOGfullname|\n");
|
||||
fclose($fp);
|
||||
|
||||
##### get server listing for dynamic pulldown
|
||||
$stmt="SELECT fullname,dialplan_number,server_ip from phones where login='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW'";
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$rsltx=mysql_query($stmt, $link);
|
||||
$rowx=mysql_fetch_row($rsltx);
|
||||
$fullname = $rowx[0];
|
||||
$dialplan_number = $rowx[1];
|
||||
$user_server_ip = $rowx[2];
|
||||
if ($DB) {echo "|$rowx[0]|$rowx[1]|$rowx[2]|\n";}
|
||||
}
|
||||
else
|
||||
{
|
||||
fwrite ($fp, "ASTERISK|FAIL|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|\n");
|
||||
fclose($fp);
|
||||
}
|
||||
}
|
||||
|
||||
echo"<HTML><HEAD>\n";
|
||||
echo"<TITLE>ASTERISK REMOTE INBOUND: Main</TITLE></HEAD>\n";
|
||||
echo"<META HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html; charset=iso-8859-1\">\n";
|
||||
echo"<META HTTP-EQUIV=Refresh CONTENT=\"5; URL=$PHP_SELF\">\n";
|
||||
echo"</HEAD>\n";
|
||||
|
||||
?>
|
||||
|
||||
<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0>
|
||||
<CENTER><FONT FACE="Courier" COLOR=BLACK SIZE=3>
|
||||
|
||||
<?
|
||||
|
||||
|
||||
echo "$NOW_TIME $PHP_AUTH_USER - $fullname - CALLS SENT TO: $dialplan_number<BR><BR>\n";
|
||||
|
||||
echo "Click on the channel below that you would like to have directed to your phone<BR><BR>\n";
|
||||
|
||||
echo "<PRE>\n";
|
||||
echo "CHANNEL SERVER CHANNEL_GROUP EXTENSION PARKED_BY PARKED_TIME \n";
|
||||
echo "----------------------------------------------------------------------------------------------\n";
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
$stmt="SELECT count(*) from parked_channels where server_ip='$user_server_ip' order by parked_time";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$parked_count = $row[0];
|
||||
if ($parked_count > 0)
|
||||
{
|
||||
$stmt="SELECT * from parked_channels where server_ip='$user_server_ip' and channel_group LIKE \"IN_%\" order by parked_time";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$parked_to_print = mysql_num_rows($rslt);
|
||||
$i=0;
|
||||
while ($i < $parked_to_print)
|
||||
{
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$channel = sprintf("%-11s", $row[0]);
|
||||
$server = sprintf("%-14s", $row[1]);
|
||||
$channel_group = sprintf("%-16s", $row[2]);
|
||||
$extension = sprintf("%-13s", $row[3]);
|
||||
$parked_by = sprintf("%-21s", $row[4]);
|
||||
$parked_time = sprintf("%-19s", $row[5]);
|
||||
|
||||
echo "<A HREF=\"$popup_page?phone=$row[4]&channel=$row[0]&parked_time=$row[5]&server_ip=$user_server_ip&DB=\" target=\"_blank\">$channel</A>$server$channel_group$extension$parked_by$parked_time\n";
|
||||
|
||||
$i++;
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "**********************************************************************************************\n";
|
||||
echo "**********************************************************************************************\n";
|
||||
echo "*************************************** NO PARKED CALLS **************************************\n";
|
||||
echo "**********************************************************************************************\n";
|
||||
echo "**********************************************************************************************\n";
|
||||
}
|
||||
|
||||
|
||||
$ENDtime = date("U");
|
||||
|
||||
$RUNtime = ($ENDtime - $STARTtime);
|
||||
|
||||
echo "</PRE>\n\n\n<br><br><br>\n\n";
|
||||
|
||||
|
||||
echo "<font size=0>\n\n\n<br><br><br>\nscript runtime: $RUNtime seconds</font>";
|
||||
|
||||
|
||||
?>
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
<?
|
||||
|
||||
exit;
|
||||
|
||||
|
||||
|
||||
?>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,369 +0,0 @@
|
||||
<?
|
||||
require("dbconnect.php");
|
||||
|
||||
##### depricated
|
||||
#require_once("htglobalize.php");
|
||||
|
||||
$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER'];
|
||||
$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW'];
|
||||
$PHP_SELF=$_SERVER['PHP_SELF'];
|
||||
$group=$_GET["group"]; if (!$group) {$group=$_POST["group"];}
|
||||
$query_date=$_GET["query_date"]; if (!$query_date) {$query_date=$_POST["query_date"];}
|
||||
$server_ip=$_GET["server_ip"]; if (!$server_ip) {$server_ip=$_POST["server_ip"];}
|
||||
$submit=$_GET["submit"]; if (!$submit) {$submit=$_POST["submit"];}
|
||||
$ENVIAR=$_GET["ENVIAR"]; if (!$ENVIAR) {$ENVIAR=$_POST["ENVIAR"];}
|
||||
|
||||
# AST_inboundEXTstats.php
|
||||
|
||||
$NOW_DATE = date("Y-m-d");
|
||||
$NOW_TIME = date("Y-m-d H:i:s");
|
||||
$STARTtime = date("U");
|
||||
if (!$query_date) {$query_date = $NOW_DATE;}
|
||||
if (!$server_ip) {$server_ip = '10.10.11.11';}
|
||||
|
||||
$stmt="select extension,full_number,inbound_name from inbound_numbers where server_ip='$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++;
|
||||
}
|
||||
?>
|
||||
|
||||
<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=iso-8859-1\">\n";
|
||||
#echo"<META HTTP-EQUIV=Refresh CONTENT=\"7; URL=$PHP_SELF?server_ip=$server_ip&DB=$DB\">\n";
|
||||
echo "<TITLE>ASTERISK: Estadística de Llamadas Entrantes</TITLE></HEAD><BODY BGCOLOR=WHITE>\n";
|
||||
echo "<FORM ACTION=\"$PHP_SELF\" METHOD=GET>\n";
|
||||
echo "<INPUT TYPE=HIDDEN NAME=server_ip VALUE=\"$server_ip\">\n";
|
||||
echo "<INPUT TYPE=TEXT NAME=query_date SIZE=10 MAXLENGTH=10 VALUE=\"$query_date\">\n";
|
||||
echo "<SELECT SIZE=1 NAME=group>\n";
|
||||
$o=0;
|
||||
while ($inbound_to_print > $o)
|
||||
{
|
||||
if ($inbound[$o] == $group) {echo "<option selected value=\"$inbound[$o]\">$fullnum[$o] - $inbname[$o]</option>\n";}
|
||||
else {echo "<option value=\"$inbound[$o]\">$fullnum[$o] - $inbname[$o]</option>\n";}
|
||||
$o++;
|
||||
}
|
||||
echo "</SELECT>\n";
|
||||
echo "<INPUT TYPE=ENVIAR NAME=ENVIAR VALUE=ENVIAR>\n";
|
||||
echo "</FORM>\n\n";
|
||||
|
||||
echo "<PRE><FONT SIZE=2>\n\n";
|
||||
|
||||
|
||||
if (!$group)
|
||||
{
|
||||
echo "\n\n";
|
||||
echo "SELECCIONE POR FAVOR Un NÚMERO Y La FECHA ARRIBA Y El TECLEO SOMETEN\n";
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
|
||||
|
||||
echo "ASTERISK: Estadística de Llamadas Entrantes $NOW_TIME\n";
|
||||
|
||||
echo "\n";
|
||||
echo "---------- TOTALS\n";
|
||||
|
||||
$stmt="select count(*),sum(length_in_sec) from call_log where start_time >= '$query_date 00:00:01' and start_time <= '$query_date 23:59:59' and server_ip='$server_ip' and extension='$group';";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$row=mysql_fetch_row($rslt);
|
||||
|
||||
$TOTALcalls = sprintf("%10s", $row[0]);
|
||||
$average_hold_seconds = ($row[1] / $row[0]);
|
||||
$average_hold_seconds = round($average_hold_seconds, 0);
|
||||
$average_hold_seconds = sprintf("%10s", $average_hold_seconds);
|
||||
|
||||
echo "Llamadas totales que vinieron en este número: $TOTALcalls\n";
|
||||
echo "Average Call Length(seconds) for all Calls: $average_hold_seconds\n";
|
||||
|
||||
echo "\n";
|
||||
echo "---------- DROPS\n";
|
||||
|
||||
$stmt="select count(*),sum(length_in_sec) from call_log where start_time >= '$query_date 00:00:01' and start_time <= '$query_date 23:59:59' and server_ip='$server_ip' and extension='$group' 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 >= '$query_date 00:00:01' and start_time <= '$query_date 23:59:59' and server_ip='$server_ip' and extension='$group';";
|
||||
$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("%-10s", $row[0]);
|
||||
$CIDname = sprintf("%-15s", $row[1]); while(strlen($full_name)>15) {$full_name = substr("$full_name", 0, -1);}
|
||||
$datetime = sprintf("%-19s", $row[3]);
|
||||
$USERavgTALK = $row[2];
|
||||
|
||||
$USERavgTALK_M = ($USERavgTALK / 60);
|
||||
$USERavgTALK_M = round($USERavgTALK_M, 2);
|
||||
$USERavgTALK_M_int = intval("$USERavgTALK_M");
|
||||
$USERavgTALK_S = ($USERavgTALK_M - $USERavgTALK_M_int);
|
||||
$USERavgTALK_S = ($USERavgTALK_S * 60);
|
||||
$USERavgTALK_S = round($USERavgTALK_S, 0);
|
||||
if ($USERavgTALK_S < 10) {$USERavgTALK_S = "0$USERavgTALK_S";}
|
||||
$USERavgTALK_MS = "$USERavgTALK_M_int:$USERavgTALK_S";
|
||||
$USERavgTALK_MS = sprintf("%6s", $USERavgTALK_MS);
|
||||
|
||||
echo "| $CID | $CIDname | $USERavgTALK_MS | $datetime |\n";
|
||||
|
||||
$i++;
|
||||
}
|
||||
|
||||
echo "+------------+-----------------+--------+---------------------+\n";
|
||||
|
||||
##############################
|
||||
######### TIME STATS
|
||||
|
||||
if ($output == 'FULL')
|
||||
{
|
||||
|
||||
echo "\n";
|
||||
echo "---------- ESTADÍSTICAS DEL TIEMPO\n";
|
||||
|
||||
echo "<FONT SIZE=0>\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 >= '$query_date $h:00:00' and start_time <= '$query_date $h:14:59' and server_ip='$server_ip' and extension='$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 call_log where start_time >= '$query_date $h:00:00' and start_time <= '$query_date $h:14:59' and server_ip='$server_ip' and extension='$group' 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 >= '$query_date $h:15:00' and start_time <= '$query_date $h:29:59' and server_ip='$server_ip' and extension='$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 call_log where start_time >= '$query_date $h:15:00' and start_time <= '$query_date $h:29:59' and server_ip='$server_ip' and extension='$group' 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 >= '$query_date $h:30:00' and start_time <= '$query_date $h:44:59' and server_ip='$server_ip' and extension='$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 call_log where start_time >= '$query_date $h:30:00' and start_time <= '$query_date $h:44:59' and server_ip='$server_ip' and extension='$group' 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 >= '$query_date $h:45:00' and start_time <= '$query_date $h:59:59' and server_ip='$server_ip' and extension='$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 call_log where start_time >= '$query_date $h:45:00' and start_time <= '$query_date $h:59:59' and server_ip='$server_ip' and extension='$group' 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 "<!-- HICOUNT: $hi_hour_count|$hour_multiplier -->\n";
|
||||
echo "GRÁFICO EN 15 INCREMENTOS MINUCIOSOS DE LLAMADAS TOTALES\n";
|
||||
|
||||
$k=1;
|
||||
$Mk=0;
|
||||
$call_scale = '0';
|
||||
while ($k <= 102)
|
||||
{
|
||||
if ($Mk >= 5)
|
||||
{
|
||||
$Mk=0;
|
||||
$scale_num=($k / $hour_multiplier);
|
||||
$scale_num = round($scale_num, 0);
|
||||
$LENscale_num = (strlen($scale_num));
|
||||
$k = ($k + $LENscale_num);
|
||||
$call_scale .= "$scale_num";
|
||||
}
|
||||
else
|
||||
{
|
||||
$call_scale .= " ";
|
||||
$k++; $Mk++;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
echo "+------+-------------------------------------------------------------------------------------------------------+-------+-------+\n";
|
||||
#echo "| HOUR | GRAPH IN 15 MINUTE INCREMENTS OF TOTAL INCOMING CALLS FOR THIS GROUP | DROPS | TOTAL |\n";
|
||||
echo "| HOUR |$call_scale| DROPS | TOTAL |\n";
|
||||
echo "+------+-------------------------------------------------------------------------------------------------------+-------+-------+\n";
|
||||
|
||||
$ZZ = '00';
|
||||
$i=0;
|
||||
$h=4;
|
||||
$hour= -1;
|
||||
$no_lines_yet=1;
|
||||
|
||||
while ($i <= 96)
|
||||
{
|
||||
$char_counter=0;
|
||||
$time = ' ';
|
||||
if ($h >= 4)
|
||||
{
|
||||
$hour++;
|
||||
$h=0;
|
||||
if ($hour < 10) {$hour = "0$hour";}
|
||||
$time = "+$hour$ZZ+";
|
||||
}
|
||||
if ($h == 1) {$time = " 15 ";}
|
||||
if ($h == 2) {$time = " 30 ";}
|
||||
if ($h == 3) {$time = " 45 ";}
|
||||
$Ghour_count = $hour_count[$i];
|
||||
if ($Ghour_count < 1)
|
||||
{
|
||||
if ( ($no_lines_yet) or ($i > $last_full_record) )
|
||||
{
|
||||
$do_nothing=1;
|
||||
}
|
||||
else
|
||||
{
|
||||
$hour_count[$i] = sprintf("%-5s", $hour_count[$i]);
|
||||
echo "|$time|";
|
||||
$k=0; while ($k <= 102) {echo " "; $k++;}
|
||||
echo "| $hour_count[$i] |\n";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$no_lines_yet=0;
|
||||
$Xhour_count = ($Ghour_count * $hour_multiplier);
|
||||
$Yhour_count = (99 - $Xhour_count);
|
||||
|
||||
$Gdrop_count = $drop_count[$i];
|
||||
if ($Gdrop_count < 1)
|
||||
{
|
||||
$hour_count[$i] = sprintf("%-5s", $hour_count[$i]);
|
||||
|
||||
echo "|$time|<SPAN class=\"green\">";
|
||||
$k=0; while ($k <= $Xhour_count) {echo "*"; $k++; $char_counter++;}
|
||||
echo "*X</SPAN>"; $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|<SPAN class=\"red\">";
|
||||
$k=0; while ($k <= $Xdrop_count) {echo ">"; $k++; $char_counter++;}
|
||||
echo "D</SPAN><SPAN class=\"green\">"; $char_counter++;
|
||||
$k=0; while ($k <= $XXhour_count) {echo "*"; $k++; $char_counter++;}
|
||||
echo "X</SPAN>"; $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";
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
?>
|
||||
</PRE>
|
||||
|
||||
</BODY></HTML>
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,15 +0,0 @@
|
||||
<?
|
||||
|
||||
$link=mysql_connect("localhost", "cron", "1234");
|
||||
mysql_select_db("asterisk");
|
||||
|
||||
$local_DEF = 'Local/';
|
||||
$conf_silent_prefix = '7';
|
||||
$local_AMP = '@';
|
||||
$ext_context = 'demo';
|
||||
$recording_exten = '8309';
|
||||
|
||||
$WeBServeRRooT = '/usr/local/apache2/htdocs';
|
||||
$WeBRooTWritablE = '1';
|
||||
|
||||
?>
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 492 B |
@@ -1,23 +0,0 @@
|
||||
<?php
|
||||
/*
|
||||
author: Paul Concepcion
|
||||
date: April 18, 2004
|
||||
iterate through the $_GET, $_POST, and $_SERVER hashes,
|
||||
creating global variables with the same values.
|
||||
|
||||
security risk: equal to running with register_globals "on"
|
||||
|
||||
*/
|
||||
|
||||
function array_conv($array){
|
||||
foreach ($array as $key -> $value){
|
||||
${$key} = $value;
|
||||
global ${$key};// = $value;
|
||||
}
|
||||
|
||||
}
|
||||
array_conv($_GET);
|
||||
array_conv($_POST);
|
||||
array_conv($_SERVER);
|
||||
|
||||
?>
|
||||
@@ -1,194 +0,0 @@
|
||||
<?
|
||||
|
||||
require("dbconnect.php");
|
||||
|
||||
##### depricated
|
||||
#require_once("htglobalize.php");
|
||||
|
||||
$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER'];
|
||||
$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW'];
|
||||
$PHP_SELF=$_SERVER['PHP_SELF'];
|
||||
$vendor_id=$_GET["vendor_id"]; if (!$vendor_id) {$vendor_id=$_POST["vendor_id"];}
|
||||
$phone=$_GET["phone"]; if (!$phone) {$phone=$_POST["phone"];}
|
||||
$lead_id=$_GET["lead_id"]; if (!$lead_id) {$lead_id=$_POST["lead_id"];}
|
||||
$first_name=$_GET["first_name"]; if (!$first_name) {$first_name=$_POST["first_name"];}
|
||||
$last_name=$_GET["last_name"]; if (!$last_name) {$last_name=$_POST["last_name"];}
|
||||
$phone_number=$_GET["phone_number"]; if (!$phone_number) {$phone_number=$_POST["phone_number"];}
|
||||
$end_call=$_GET["end_call"]; if (!$end_call) {$end_call=$_POST["end_call"];}
|
||||
$DB=$_GET["DB"]; if (!$DB) {$DB=$_POST["DB"];}
|
||||
$dispo=$_GET["dispo"]; if (!$dispo) {$dispo=$_POST["dispo"];}
|
||||
$list_id=$_GET["list_id"]; if (!$list_id) {$list_id=$_POST["list_id"];}
|
||||
$campaign_id=$_GET["campaign_id"]; if (!$campaign_id) {$campaign_id=$_POST["campaign_id"];}
|
||||
$phone_code=$_GET["phone_code"]; if (!$phone_code) {$phone_code=$_POST["phone_code"];}
|
||||
$server_ip=$_GET["server_ip"]; if (!$server_ip) {$server_ip=$_POST["server_ip"];}
|
||||
$extension=$_GET["extension"]; if (!$extension) {$extension=$_POST["extension"];}
|
||||
$channel=$_GET["channel"]; if (!$channel) {$channel=$_POST["channel"];}
|
||||
$call_began=$_GET["call_began"]; if (!$call_began) {$call_began=$_POST["call_began"];}
|
||||
$parked_time=$_GET["parked_time"]; if (!$parked_time) {$parked_time=$_POST["parked_time"];}
|
||||
$tsr=$_GET["tsr"]; if (!$tsr) {$tsr=$_POST["tsr"];}
|
||||
$address1=$_GET["address1"]; if (!$address1) {$address1=$_POST["address1"];}
|
||||
$address2=$_GET["address2"]; if (!$address2) {$address2=$_POST["address2"];}
|
||||
$address3=$_GET["address3"]; if (!$address3) {$address3=$_POST["address3"];}
|
||||
$city=$_GET["city"]; if (!$city) {$city=$_POST["city"];}
|
||||
$state=$_GET["state"]; if (!$state) {$state=$_POST["state"];}
|
||||
$postal_code=$_GET["postal_code"]; if (!$postal_code) {$postal_code=$_POST["postal_code"];}
|
||||
$province=$_GET["province"]; if (!$province) {$province=$_POST["province"];}
|
||||
$country_code=$_GET["country_code"]; if (!$country_code) {$country_code=$_POST["country_code"];}
|
||||
$alt_phone=$_GET["alt_phone"]; if (!$alt_phone) {$alt_phone=$_POST["alt_phone"];}
|
||||
$email=$_GET["email"]; if (!$email) {$email=$_POST["email"];}
|
||||
$security=$_GET["security"]; if (!$security) {$security=$_POST["security"];}
|
||||
$comments=$_GET["comments"]; if (!$comments) {$comments=$_POST["comments"];}
|
||||
$status=$_GET["status"]; if (!$status) {$status=$_POST["status"];}
|
||||
$submit=$_GET["submit"]; if (!$submit) {$submit=$_POST["submit"];}
|
||||
$ENVIAR=$_GET["ENVIAR"]; if (!$ENVIAR) {$ENVIAR=$_POST["ENVIAR"];}
|
||||
|
||||
### AST GUI database administration
|
||||
### inbound_popup.php
|
||||
|
||||
# this is the inbound popup of a specific call that grabs the call and allows you to go and fetch info on that caller in the local CRM system.
|
||||
|
||||
|
||||
$STARTtime = date("U");
|
||||
$TODAY = date("Y-m-d");
|
||||
$NOW_TIME = date("Y-m-d H:i:s");
|
||||
$popup_page = './inbound_popup.php';
|
||||
$FILE_datetime = $STARTtime;
|
||||
|
||||
$ext_context = 'demo';
|
||||
if (!$begin_date) {$begin_date = $TODAY;}
|
||||
if (!$end_date) {$end_date = $TODAY;}
|
||||
|
||||
#$link=mysql_connect("localhost", "cron", "1234");
|
||||
#mysql_select_db("asterisk");
|
||||
|
||||
$stmt="SELECT count(*) from phones where login='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and active = 'Y' and status IN('ACTIVE','ADMIN');";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$auth=$row[0];
|
||||
|
||||
$fp = fopen ("./project_auth_entries.txt", "a");
|
||||
$date = date("r");
|
||||
$ip = getenv("REMOTE_ADDR");
|
||||
$browser = getenv("HTTP_USER_AGENT");
|
||||
|
||||
if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or (!$auth))
|
||||
{
|
||||
Header("WWW-Authenticate: Basic realm=\"VICI-ASTERISK\"");
|
||||
Header("HTTP/1.0 401 Unauthorized");
|
||||
echo "Nombre y contraseña inválidos del usuario: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n";
|
||||
exit;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
if($auth>0)
|
||||
{
|
||||
$office_no=strtoupper($PHP_AUTH_USER);
|
||||
$password=strtoupper($PHP_AUTH_PW);
|
||||
$stmt="SELECT fullname,dialplan_number from phones where login='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW'";
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$LOGfullname=$row[0];
|
||||
fwrite ($fp, "ASTERISK|GOOD|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|$LOGfullname|\n");
|
||||
fclose($fp);
|
||||
|
||||
##### get server listing for dynamic pulldown
|
||||
$stmt="SELECT fullname,dialplan_number,server_ip from phones where login='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW'";
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$rsltx=mysql_query($stmt, $link);
|
||||
$rowx=mysql_fetch_row($rsltx);
|
||||
$fullname = $rowx[0];
|
||||
$dialplan_number = $rowx[1];
|
||||
$user_server_ip = $rowx[2];
|
||||
if ($DB) {echo "|$rowx[0]|$rowx[1]|$rowx[2]|\n";}
|
||||
}
|
||||
else
|
||||
{
|
||||
fwrite ($fp, "ASTERISK|FAIL|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|\n");
|
||||
fclose($fp);
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
<html>
|
||||
<head>
|
||||
<title>ASTERISK SALIENTES REMOTOS: Popup</title>
|
||||
</head>
|
||||
<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0>
|
||||
<CENTER><FONT FACE="Courier" COLOR=BLACK SIZE=3>
|
||||
|
||||
<?
|
||||
|
||||
$stmt="SELECT count(*) from parked_channels where server_ip='$user_server_ip' and parked_time='$parked_time' and channel='$channel'";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$parked_count = $row[0];
|
||||
|
||||
if ($parked_count > 0)
|
||||
{
|
||||
|
||||
$stmt="DELETE from parked_channels where server_ip='$user_server_ip' and parked_time='$parked_time' and channel='$channel' LIMIT 1";
|
||||
if ($DB) {echo "|$stmt|\n";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
|
||||
$DTqueryCID = "RR$FILE_datetime$PHP_AUTH_USER";
|
||||
|
||||
### insert a NEW record to the vicidial_manager table to be processed
|
||||
$stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$user_server_ip','','Redirect','$DTqueryCID','Exten: $dialplan_number','Channel: $channel','Context: $ext_context','Priority: 1','Callerid: $DTqueryCID','','','','','')";
|
||||
if ($DB) {echo "|$stmt|\n";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
|
||||
echo "Vuelva a dirigir el comando enviado para el canal $channel $NOW_TIME\n<BR><BR>\n";
|
||||
|
||||
|
||||
$url = 'https://10.10.10.15/internal/back_end_systems/cust_serv/index.php?Search=SEARCH&';
|
||||
$Suser = 'username=';
|
||||
$Spass = '&passwd=';
|
||||
$Sphone = '&phone=';
|
||||
|
||||
$newurl = "$url$Suser$PHP_AUTH_USER$Spass$PHP_AUTH_PW$Sphone$phone";
|
||||
if ( ($phone == 'unknown') or (strlen($phone)<9) )
|
||||
{$newurl = "$url$Suser$PHP_AUTH_USER$Spass$PHP_AUTH_PW";}
|
||||
|
||||
echo "<a href=\"$newurl\">Mire para arriba a este cliente en sistema del servicio de cliente</a>\n<BR><BR>\n";
|
||||
|
||||
echo "<a href=\"$PHP_SELF\">Cierre esta ventana</a>\n<BR><BR>\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "Vuelva a dirigir el comando FALLADO para el canal $channel $NOW_TIME\n<BR><BR>\n";
|
||||
echo "<a href=\"$PHP_SELF\">Cierre esta ventana</a>\n<BR><BR>\n";
|
||||
}
|
||||
|
||||
|
||||
|
||||
$ENDtime = date("U");
|
||||
|
||||
$RUNtime = ($ENDtime - $STARTtime);
|
||||
|
||||
echo "\n\n\n<br><br><br>\n\n";
|
||||
|
||||
|
||||
echo "<font size=0>\n\n\n<br><br><br>\nScript runtime: $RUNtime seconds</font>";
|
||||
|
||||
|
||||
?>
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
<?
|
||||
|
||||
exit;
|
||||
|
||||
|
||||
|
||||
?>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,228 +0,0 @@
|
||||
<?
|
||||
|
||||
require("dbconnect.php");
|
||||
|
||||
##### depricated
|
||||
#require_once("htglobalize.php");
|
||||
|
||||
$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER'];
|
||||
$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW'];
|
||||
$PHP_SELF=$_SERVER['PHP_SELF'];
|
||||
$group=$_GET["group"]; if (!$group) {$group=$_POST["group"];}
|
||||
$query_date=$_GET["query_date"]; if (!$query_date) {$query_date=$_POST["query_date"];}
|
||||
$begin_date=$_GET["begin_date"]; if (!$begin_date) {$begin_date=$_POST["begin_date"];}
|
||||
$end_date=$_GET["end_date"]; if (!$end_date) {$end_date=$_POST["end_date"];}
|
||||
$extension=$_GET["extension"]; if (!$extension) {$extension=$_POST["extension"];}
|
||||
$server_ip=$_GET["server_ip"]; if (!$server_ip) {$server_ip=$_POST["server_ip"];}
|
||||
$user=$_GET["user"]; if (!$user) {$user=$_POST["user"];}
|
||||
$full_name=$_GET["full_name"]; if (!$full_name) {$full_name=$_POST["full_name"];}
|
||||
$submit=$_GET["submit"]; if (!$submit) {$submit=$_POST["submit"];}
|
||||
$ENVIAR=$_GET["ENVIAR"]; if (!$ENVIAR) {$ENVIAR=$_POST["ENVIAR"];}
|
||||
|
||||
### AST GUI database administration
|
||||
### user_stats.php
|
||||
|
||||
$STARTtime = date("U");
|
||||
$TODAY = date("Y-m-d");
|
||||
$admin_page = './admin.php';
|
||||
|
||||
if (!$begin_date) {$begin_date = $TODAY;}
|
||||
if (!$end_date) {$end_date = $TODAY;}
|
||||
|
||||
$stmt="SELECT count(*) from phones where login='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and active = 'Y' and status='ADMIN';";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$auth=$row[0];
|
||||
|
||||
$fp = fopen ("./project_auth_entries.txt", "a");
|
||||
$date = date("r");
|
||||
$ip = getenv("REMOTE_ADDR");
|
||||
$browser = getenv("HTTP_USER_AGENT");
|
||||
|
||||
if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or (!$auth))
|
||||
{
|
||||
Header("WWW-Authenticate: Basic realm=\"VICI-ASTERISK\"");
|
||||
Header("HTTP/1.0 401 Unauthorized");
|
||||
echo "Nombre y contraseña inválidos del usuario: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n";
|
||||
exit;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
if($auth>0)
|
||||
{
|
||||
$office_no=strtoupper($PHP_AUTH_USER);
|
||||
$password=strtoupper($PHP_AUTH_PW);
|
||||
$stmt="SELECT fullname from phones where login='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW'";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$LOGfullname=$row[0];
|
||||
fwrite ($fp, "ASTERISK|GOOD|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|$LOGfullname|\n");
|
||||
fclose($fp);
|
||||
|
||||
##### get server listing for dynamic pulldown
|
||||
$stmt="SELECT fullname from phones where server_ip='$server_ip' and extension='$extension'";
|
||||
$rsltx=mysql_query($stmt, $link);
|
||||
$rowx=mysql_fetch_row($rsltx);
|
||||
$fullname = $row[0];
|
||||
}
|
||||
else
|
||||
{
|
||||
fwrite ($fp, "ASTERISK|FAIL|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|\n");
|
||||
fclose($fp);
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
<html>
|
||||
<head>
|
||||
<title>ASTERISK ADMIN: Estadísticas Del Teléfono</title>
|
||||
</head>
|
||||
<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0>
|
||||
<CENTER>
|
||||
<TABLE WIDTH=620 BGCOLOR=#D9E6FE cellpadding=2 cellspacing=0><TR BGCOLOR=#015B91><TD ALIGN=LEFT><FONT FACE="ARIAL,HELVETICA" COLOR=WHITE SIZE=2><B> ASTERISK ADMIN: Administración</TD><TD ALIGN=RIGHT><FONT FACE="ARIAL,HELVETICA" COLOR=WHITE SIZE=2><B><? echo date("l F j, Y G:i:s A") ?> </TD></TR>
|
||||
<TR BGCOLOR=#F0F5FE><TD ALIGN=LEFT COLSPAN=2><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=1><B> <a href="<? echo $admin_page ?>"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=1>ENUMERE TODOS LOS TELÉFONOS</a> | <a href="<? echo $admin_page ?>?ADD=1"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=1>AGREGUE Un TELÉFONO NUEVO</a> | <a href="<? echo $admin_page ?>?ADD=5"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=1>BÚSQUEDA PARA Un TELÉFONO</a> | <a href="<? echo $admin_page ?>?ADD=11"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=1>AGREGUE Un SERVIDOR</a> | <a href="<? echo $admin_page ?>?ADD=10"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=1>ENUMERE TODOS LOS SERVIDORES</a></TD></TR>
|
||||
<TR BGCOLOR=#F0F5FE><TD ALIGN=LEFT COLSPAN=2><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=1><B> <a href="<? echo $admin_page ?>?ADD=100"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=1>DEMUESTRE TODAS LAS CONFERENCIAS</a> | <a href="<? echo $admin_page ?>?ADD=111"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=1>AGREGUE Una NUEVA CONFERENCIA</a></TD></TR>
|
||||
|
||||
|
||||
|
||||
|
||||
<?
|
||||
|
||||
echo "<TR BGCOLOR=\"#F0F5FE\"><TD ALIGN=LEFT COLSPAN=2><FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2><B> \n";
|
||||
|
||||
echo "<form action=$PHP_SELF method=POST>\n";
|
||||
echo "<input type=hidden name=extension value=\"$extension\">\n";
|
||||
echo "<input type=hidden name=server_ip value=\"$server_ip\">\n";
|
||||
echo "<input type=text name=begin_date value=\"$begin_date\" size=10 maxsize=10> to \n";
|
||||
echo "<input type=text name=end_date value=\"$end_date\" size=10 maxsize=10> \n";
|
||||
echo "<input type=submit name=submit value=submit>\n";
|
||||
|
||||
|
||||
echo " $user - $full_name\n";
|
||||
|
||||
echo "</B></TD></TR>\n";
|
||||
echo "<TR><TD ALIGN=LEFT COLSPAN=2>\n";
|
||||
|
||||
|
||||
$stmt="SELECT count(*),channel_group, sum(length_in_sec) from call_log where extension='$extension' and server_ip='$server_ip' and start_time >= '$begin_date 0:00:01' and start_time <= '$end_date 23:59:59' group by channel_group order by channel_group";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
$statuses_to_print = mysql_num_rows($rslt);
|
||||
# echo "|$stmt|\n";
|
||||
|
||||
echo "<br><center>\n";
|
||||
|
||||
echo "<B>TIEMPO DE LLAMADA Y CANALES:</B>\n";
|
||||
|
||||
echo "<center><TABLE width=300 cellspacing=0 cellpadding=1>\n";
|
||||
echo "<tr><td><font size=2>GRUPO DE CANALES </td><td align=right><font size=2>CUENTA</td><td align=right><font size=2> HORAS:MINUTOS</td></tr>\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 "<tr $bgcolor><td><font size=2>$row[1]</td>";
|
||||
echo "<td align=right><font size=2> $row[0]</td>\n";
|
||||
echo "<td align=right><font size=2> $call_hours_int:$call_minutes_int</td></tr>\n";
|
||||
$total_calls = ($total_calls + $row[0]);
|
||||
|
||||
$call_seconds=0;
|
||||
$o++;
|
||||
}
|
||||
|
||||
$stmt="SELECT sum(length_in_sec) from call_log where extension='$extension' and server_ip='$server_ip' and start_time >= '$begin_date 0:00:01' and start_time <= '$end_date 23:59:59'";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
$counts_to_print = mysql_num_rows($rslt);
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$call_seconds = $row[0];
|
||||
$call_hours = ($call_seconds / 3600);
|
||||
$call_hours = round($call_hours, 2);
|
||||
$call_hours_int = intval("$call_hours");
|
||||
$call_minutes = ($call_hours - $call_hours_int);
|
||||
$call_minutes = ($call_minutes * 60);
|
||||
$call_minutes_int = round($call_minutes, 0);
|
||||
if ($call_minutes_int < 10) {$call_minutes_int = "0$call_minutes_int";}
|
||||
# echo "|$stmt|\n";
|
||||
|
||||
echo "<tr><td><font size=2>LLAMADAS TOTALES </td><td align=right><font size=2> $total_calls</td><td align=right><font size=2> $call_hours_int:$call_minutes_int</td></tr>\n";
|
||||
echo "</TABLE></center>\n";
|
||||
echo "<br><br>\n";
|
||||
|
||||
echo "<center>\n";
|
||||
|
||||
echo "<B>LLAMADAS DEL ÚLTIMO 1000 PARA LA GAMA DE LA FECHA:</B>\n";
|
||||
echo "<TABLE width=400 cellspacing=0 cellpadding=1>\n";
|
||||
echo "<tr><td><font size=2>NÚMERO </td><td><font size=2>GRUPO DE CANALES </td><td align=right><font size=2> FECHA</td><td align=right><font size=2> LENGTH(MIN.)</td></tr>\n";
|
||||
|
||||
$stmt="SELECT number_dialed,channel_group,start_time,length_in_min from call_log where extension='$extension' and server_ip='$server_ip' and start_time >= '$begin_date 0:00:01' and start_time <= '$end_date 23:59:59' LIMIT 1000";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
$events_to_print = mysql_num_rows($rslt);
|
||||
# echo "|$stmt|\n";
|
||||
|
||||
$total_calls=0;
|
||||
$o=0;
|
||||
$event_start_seconds='';
|
||||
$event_stop_seconds='';
|
||||
while ($events_to_print > $o) {
|
||||
$row=mysql_fetch_row($rslt);
|
||||
if (eregi("1$|3$|5$|7$|9$", $o))
|
||||
{$bgcolor='bgcolor="#B9CBFD"';}
|
||||
else
|
||||
{$bgcolor='bgcolor="#9BB9FB"';}
|
||||
echo "<tr $bgcolor><td><font size=2>$row[0]</td>";
|
||||
echo "<td align=right><font size=2> $row[1]</td>\n";
|
||||
echo "<td align=right><font size=2> $row[2]</td>\n";
|
||||
echo "<td align=right><font size=2> $row[3]</td></tr>\n";
|
||||
|
||||
|
||||
$call_seconds=0;
|
||||
$o++;
|
||||
}
|
||||
|
||||
|
||||
echo "</TABLE></center>\n";
|
||||
|
||||
|
||||
$ENDtime = date("U");
|
||||
|
||||
$RUNtime = ($ENDtime - $STARTtime);
|
||||
|
||||
echo "\n\n\n<br><br><br>\n\n";
|
||||
|
||||
|
||||
echo "<font size=0>\n\n\n<br><br><br>\nScript runtime: $RUNtime seconds</font>";
|
||||
|
||||
|
||||
?>
|
||||
|
||||
|
||||
</TD></TR><TABLE>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
<?
|
||||
|
||||
exit;
|
||||
|
||||
|
||||
|
||||
?>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,165 +0,0 @@
|
||||
<?
|
||||
|
||||
require("dbconnect.php");
|
||||
|
||||
##### depricated
|
||||
#require_once("htglobalize.php");
|
||||
|
||||
$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER'];
|
||||
$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW'];
|
||||
$PHP_SELF=$_SERVER['PHP_SELF'];
|
||||
$submit=$_GET["submit"]; if (!$submit) {$submit=$_POST["submit"];}
|
||||
$ENVIAR=$_GET["ENVIAR"]; if (!$ENVIAR) {$ENVIAR=$_POST["ENVIAR"];}
|
||||
|
||||
### AST GUI database administration
|
||||
### remote_inbound.php
|
||||
|
||||
# the purpose of this script and webpage is to allow for remote or local users of the system to log in and grab phone calls that are coming inbound into the Asterisk server and being put in the parked_channels table while they hear a soundfile for a limited amount of time before being forwarded on to either a set extension or a voicemail box. This gives remote or local agents a way to grab calls without tying up their phone lines all day. The agent sees the refreshing screen of calls on park and when they want to take one they just click on it, and a small window opens that will allow them to grab the call and/or look up more information on the caller through the callerID that is given(if available)
|
||||
|
||||
|
||||
$STARTtime = date("U");
|
||||
$TODAY = date("Y-m-d");
|
||||
$NOW_TIME = date("Y-m-d H:i:s");
|
||||
$popup_page = './inbound_popup.php';
|
||||
|
||||
$stmt="SELECT count(*) from phones where login='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and active = 'Y' and status IN('ACTIVE','ADMIN');";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$auth=$row[0];
|
||||
|
||||
$fp = fopen ("./project_auth_entries.txt", "a");
|
||||
$date = date("r");
|
||||
$ip = getenv("REMOTE_ADDR");
|
||||
$browser = getenv("HTTP_USER_AGENT");
|
||||
|
||||
if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or (!$auth))
|
||||
{
|
||||
Header("WWW-Authenticate: Basic realm=\"VICI-ASTERISK\"");
|
||||
Header("HTTP/1.0 401 Unauthorized");
|
||||
echo "Nombre y contraseña inválidos del usuario: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n";
|
||||
exit;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
if($auth>0)
|
||||
{
|
||||
$office_no=strtoupper($PHP_AUTH_USER);
|
||||
$password=strtoupper($PHP_AUTH_PW);
|
||||
$stmt="SELECT fullname,dialplan_number from phones where login='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW'";
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$LOGfullname=$row[0];
|
||||
fwrite ($fp, "ASTERISK|GOOD|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|$LOGfullname|\n");
|
||||
fclose($fp);
|
||||
|
||||
##### get server listing for dynamic pulldown
|
||||
$stmt="SELECT fullname,dialplan_number,server_ip from phones where login='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW'";
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$rsltx=mysql_query($stmt, $link);
|
||||
$rowx=mysql_fetch_row($rsltx);
|
||||
$fullname = $rowx[0];
|
||||
$dialplan_number = $rowx[1];
|
||||
$user_server_ip = $rowx[2];
|
||||
if ($DB) {echo "|$rowx[0]|$rowx[1]|$rowx[2]|\n";}
|
||||
}
|
||||
else
|
||||
{
|
||||
fwrite ($fp, "ASTERISK|FAIL|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|\n");
|
||||
fclose($fp);
|
||||
}
|
||||
}
|
||||
|
||||
echo"<HTML><HEAD>\n";
|
||||
echo"<TITLE>ASTERISK ENTRANTES REMOTOS: Principal</TITLE></HEAD>\n";
|
||||
echo"<META HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html; charset=iso-8859-1\">\n";
|
||||
echo"<META HTTP-EQUIV=Refresh CONTENT=\"5; URL=$PHP_SELF\">\n";
|
||||
echo"</HEAD>\n";
|
||||
|
||||
?>
|
||||
|
||||
<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0>
|
||||
<CENTER><FONT FACE="Courier" COLOR=BLACK SIZE=3>
|
||||
|
||||
<?
|
||||
|
||||
|
||||
echo "$NOW_TIME $PHP_AUTH_USER - $fullname - LLAMADAS REALIZADAS A: $dialplan_number<BR><BR>\n";
|
||||
|
||||
echo "Chasque encendido el canal debajo de ése que usted quisiera haber dirigido a su teléfono<BR><BR>\n";
|
||||
|
||||
echo "<PRE>\n";
|
||||
echo "CHANNEL SERVER CHANNEL_GROUP EXTENSION PARKED_BY PARKED_TIME \n";
|
||||
echo "----------------------------------------------------------------------------------------------\n";
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
$stmt="SELECT count(*) from parked_channels where server_ip='$user_server_ip' order by parked_time";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$parked_count = $row[0];
|
||||
if ($parked_count > 0)
|
||||
{
|
||||
$stmt="SELECT * from parked_channels where server_ip='$user_server_ip' and channel_group LIKE \"IN_%\" order by parked_time";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$parked_to_print = mysql_num_rows($rslt);
|
||||
$i=0;
|
||||
while ($i < $parked_to_print)
|
||||
{
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$channel = sprintf("%-11s", $row[0]);
|
||||
$server = sprintf("%-14s", $row[1]);
|
||||
$channel_group = sprintf("%-16s", $row[2]);
|
||||
$extension = sprintf("%-13s", $row[3]);
|
||||
$parked_by = sprintf("%-21s", $row[4]);
|
||||
$parked_time = sprintf("%-19s", $row[5]);
|
||||
|
||||
echo "<A HREF=\"$popup_page?phone=$row[4]&channel=$row[0]&parked_time=$row[5]&server_ip=$user_server_ip&DB=\" target=\"_blank\">$channel</A>$server$channel_group$extension$parked_by$parked_time\n";
|
||||
|
||||
$i++;
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "**********************************************************************************************\n";
|
||||
echo "**********************************************************************************************\n";
|
||||
echo "*************************************** NO PARKED CALLS **************************************\n";
|
||||
echo "**********************************************************************************************\n";
|
||||
echo "**********************************************************************************************\n";
|
||||
}
|
||||
|
||||
|
||||
$ENDtime = date("U");
|
||||
|
||||
$RUNtime = ($ENDtime - $STARTtime);
|
||||
|
||||
echo "</PRE>\n\n\n<br><br><br>\n\n";
|
||||
|
||||
|
||||
echo "<font size=0>\n\n\n<br><br><br>\nScript runtime: $RUNtime seconds</font>";
|
||||
|
||||
|
||||
?>
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
<?
|
||||
|
||||
exit;
|
||||
|
||||
|
||||
|
||||
?>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,426 +0,0 @@
|
||||
#!/usr/bin/perl
|
||||
|
||||
############################################
|
||||
# install_server_files.pl - puts server files in the right places
|
||||
#
|
||||
# modify the variables below to customize for your system.
|
||||
#
|
||||
# path to home directory: (assumes it already exists)
|
||||
$home = '/home/cron';
|
||||
|
||||
# path to agi-bin directory: (assumes it already exists)
|
||||
$agibin = '/var/lib/asterisk/agi-bin';
|
||||
|
||||
# path to web root directory: (assumes it already exists)
|
||||
$webroot = '/home/www/htdocs';
|
||||
#$webroot = '/usr/local/apache2/htdocs';
|
||||
|
||||
# path to asterisk sounds directory: (assumes it already exists)
|
||||
$sounds = '/var/lib/asterisk/sounds';
|
||||
|
||||
# path to asterisk recordings directory: (assumes it already exists)
|
||||
$monitor = '/var/spool/asterisk';
|
||||
|
||||
############################################
|
||||
|
||||
$secX = time();
|
||||
|
||||
# constants
|
||||
$DB=1; # Debug flag, set to 0 for no debug messages, lots of output
|
||||
$US='_';
|
||||
$MT[0]='';
|
||||
$LANG_FILE='./languages.txt';
|
||||
$LANG_FILE_ADMIN='./languages_admin.txt';
|
||||
|
||||
### begin parsing run-time options ###
|
||||
if (length($ARGV[0])>1)
|
||||
{
|
||||
$i=0;
|
||||
while ($#ARGV >= $i)
|
||||
{
|
||||
$args = "$args $ARGV[$i]";
|
||||
$i++;
|
||||
}
|
||||
|
||||
if ($args =~ /--help/i)
|
||||
{
|
||||
print "allowed run time options:\n [-t] = test\n [-debug] = verbose debug messages\n[--language-web-build] = build only the multi-language client files\n\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
if ($args =~ /-debug/i)
|
||||
{
|
||||
$DB=1; # Debug flag
|
||||
}
|
||||
if ($args =~ /--language-web-build/i)
|
||||
{
|
||||
$LANG=1;
|
||||
print "\n----- LANGUAGE WEB SCRIPT ONLY BUILD -----\n\n";
|
||||
}
|
||||
if ($args =~ /-t/i)
|
||||
{
|
||||
$TEST=1;
|
||||
$T=1;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
# print "no command line options set\n";
|
||||
}
|
||||
### end parsing run-time options ###
|
||||
|
||||
|
||||
if ($LANG)
|
||||
{
|
||||
open(lang, "$LANG_FILE_ADMIN") || die "can't open $LANG_FILE_ADMIN: $!\n";
|
||||
@lang = <lang>;
|
||||
close(lang);
|
||||
&translate_pages;
|
||||
|
||||
@lang=@MT;
|
||||
@LANGUAGES=@MT;
|
||||
@FILES=@MT;
|
||||
@TRANSLATIONS=@MT;
|
||||
|
||||
open(lang, "$LANG_FILE") || die "can't open $LANG_FILE: $!\n";
|
||||
@lang = <lang>;
|
||||
close(lang);
|
||||
&translate_pages;
|
||||
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
print "INSTALLING SERVER SIDE COMPONENTS...\n";
|
||||
|
||||
print "Creating cron/LOGS directory...\n";
|
||||
`mkdir $home/LOGS/`;
|
||||
|
||||
print "setting LOGS directory to executable...\n";
|
||||
`chmod 0766 $home/LOGS`;
|
||||
|
||||
print "Creating $home/VICIDIAL/LEADS_IN/DONE directory...\n";
|
||||
`mkdir $home/VICIDIAL`;
|
||||
`mkdir $home/VICIDIAL/LEADS_IN`;
|
||||
`mkdir $home/VICIDIAL/LEADS_IN/DONE`;
|
||||
`chmod -R 0766 $home/VICIDIAL`;
|
||||
|
||||
print "Creating $monitor directories...\n";
|
||||
`mkdir $monitor/monitor`;
|
||||
`mkdir $monitor/monitor/ORIG`;
|
||||
`mkdir $monitor/monitor/DONE`;
|
||||
`chmod -R 0766 $monitor/monitor`;
|
||||
|
||||
print "Copying cron scripts...\n";
|
||||
`cp -f ./ADMIN_adjust_GMTnow_on_leads.pl $home/`;
|
||||
`cp -f ./ADMIN_area_code_populate.pl $home/`;
|
||||
`cp -f ./ADMIN_keepalive_AST_send_listen.pl $home/`;
|
||||
`cp -f ./ADMIN_keepalive_send_listen.at $home/`;
|
||||
`cp -f ./ADMIN_keepalive_AST_update.pl $home/`;
|
||||
`cp -f ./ADMIN_keepalive_AST_VDautodial.pl $home/`;
|
||||
`cp -f ./ADMIN_keepalive_AST_VDremote_agents.pl $home/`;
|
||||
`cp -f ./ADMIN_restart_roll_logs.pl $home/`;
|
||||
`cp -f ./AST_conf_update.pl $home/`;
|
||||
`cp -f ./AST_CRON_mix_recordings.pl $home/`;
|
||||
`cp -f ./AST_CRON_mix_recordings_BASIC.pl $home/`;
|
||||
`cp -f ./AST_DB_optimize.pl $home/`;
|
||||
`cp -f ./AST_flush_DBqueue.pl $home/`;
|
||||
`cp -f ./AST_manager_kill_hung_congested.pl $home/`;
|
||||
`cp -f ./AST_manager_listen.pl $home/`;
|
||||
`cp -f ./AST_manager_send.pl $home/`;
|
||||
`cp -f ./AST_reset_mysql_vars.pl $home/`;
|
||||
`cp -f ./AST_send_action_child.pl $home/`;
|
||||
`cp -f ./AST_SERVER_conf.pl $home/`;
|
||||
`cp -f ./AST_update.pl $home/`;
|
||||
`cp -f ./AST_VDauto_dial.pl $home/`;
|
||||
`cp -f ./AST_VDhopper.pl $home/`;
|
||||
`cp -f ./AST_VDremote_agents.pl $home/`;
|
||||
`cp -f ./AST_vm_update.pl $home/`;
|
||||
`cp -f ./phone_codes_GMT.txt $home/`;
|
||||
`cp -f ./start_asterisk_boot.pl $home/`;
|
||||
`cp -f ./VICIDIAL_IN_new_leads_file.pl $home/`;
|
||||
`cp -f ./test_VICIDIAL_lead_file.txt $home/VICIDIAL/LEADS_IN/`;
|
||||
|
||||
|
||||
print "setting cron scripts to executable...\n";
|
||||
`chmod 0755 $home/*`;
|
||||
|
||||
print "Copying agi-bin scripts...\n";
|
||||
`cp -f ./agi-dtmf.agi $agibin/`;
|
||||
`cp -f ./agi-VDADtransfer.agi $agibin/`;
|
||||
`cp -f ./agi-VDADcloser.agi $agibin/`;
|
||||
`cp -f ./agi-VDADcloser_inbound.agi $agibin/`;
|
||||
`cp -f ./agi-VDADcloser_inboundANI.agi $agibin/`;
|
||||
`cp -f ./agi-VDADcloser_inboundCID.agi $agibin/`;
|
||||
`cp -f ./agi-VDADcloser_inbound_NOCID.agi $agibin/`;
|
||||
`cp -f ./agi-VDADcloser_inbound_5ID.agi $agibin/`;
|
||||
`cp -f ./call_inbound.agi $agibin/`;
|
||||
`cp -f ./call_log.agi $agibin/`;
|
||||
`cp -f ./call_logCID.agi $agibin/`;
|
||||
`cp -f ./call_park.agi $agibin/`;
|
||||
`cp -f ./call_park_EXT.agi $agibin/`;
|
||||
`cp -f ./call_park_I.agi $agibin/`;
|
||||
`cp -f ./call_park_L.agi $agibin/`;
|
||||
`cp -f ./call_park_W.agi $agibin/`;
|
||||
`cp -f ./debug_speak.agi $agibin/`;
|
||||
`cp -f ./invalid_speak.agi $agibin/`;
|
||||
|
||||
|
||||
print "setting agi-bin scripts to executable...\n";
|
||||
`chmod 0755 $agibin/*`;
|
||||
|
||||
print "Copying sounds...\n";
|
||||
`cp -f ./DTMF_sounds/* $sounds/`;
|
||||
|
||||
print "Creating vicidial web directory...\n";
|
||||
`mkdir $webroot/vicidial/`;
|
||||
`mkdir $webroot/vicidial/ploticus/`;
|
||||
|
||||
print "Copying VICIDIALweb php files...\n";
|
||||
`cp -f ./VICIDIAL_web/* $webroot/vicidial/`;
|
||||
|
||||
print "setting VICIDIALweb scripts to executable...\n";
|
||||
`chmod 0755 -R $webroot/vicidial/`;
|
||||
`chmod 0777 $webroot/vicidial/`;
|
||||
`chmod 0777 $webroot/vicidial/ploticus/`;
|
||||
|
||||
print "Creating agc web directory...\n";
|
||||
`mkdir $webroot/agc/`;
|
||||
|
||||
print "Copying agc php files...\n";
|
||||
`cp -R -f ./agc/* $webroot/agc/`;
|
||||
|
||||
print "setting agc scripts to executable...\n";
|
||||
`chmod 0755 -R $webroot/agc/`;
|
||||
`chmod 0777 $webroot/agc/`;
|
||||
|
||||
print "Creating astguiclient web directory...\n";
|
||||
`mkdir $webroot/astguiclient/`;
|
||||
|
||||
print "Copying astguiclient web php files...\n";
|
||||
`cp -f ./astguiclient_web/* $webroot/astguiclient/`;
|
||||
|
||||
print "setting astguiclient web scripts to executable...\n";
|
||||
`chmod 0755 -R $webroot/astguiclient/`;
|
||||
`chmod 0777 $webroot/astguiclient/`;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
$secy = time(); $secz = ($secy - $secX); $minz = ($secz/60); # calculate script runtime so far
|
||||
print "\n - process runtime ($secz sec) ($minz minutes)\n";
|
||||
print "\n\nDONE and EXITING\n";
|
||||
|
||||
|
||||
exit;
|
||||
|
||||
|
||||
|
||||
sub translate_pages
|
||||
{
|
||||
#***LANGUAGES***
|
||||
#en-English|es-Espaol|fr|de|it|
|
||||
#***FILES***
|
||||
#agc/astguiclient.php
|
||||
#agc/vicidial.php
|
||||
#***TRANSLATIONS***
|
||||
#English|Ingls|Anglais|Englisch|Inglese|
|
||||
#Spanish|Espaol||||
|
||||
|
||||
##### PARSE THE LANGUAGES SETTING FILE #####
|
||||
$section='';
|
||||
$i=0;
|
||||
$Lct=0; $Fct=0; $Tct=0;
|
||||
foreach(@lang)
|
||||
{
|
||||
if ($lang[$i] !~ /^\#/)
|
||||
{
|
||||
if ($lang[$i] =~ /^\*\*\*/)
|
||||
{
|
||||
$section = $lang[$i];
|
||||
$section =~ s/\*|\n|\r//gi;
|
||||
# print "section heading: $section: $lang[$i]";
|
||||
}
|
||||
else
|
||||
{
|
||||
if ($section =~ /LANGUAGES/)
|
||||
{
|
||||
$LANGUAGES = $lang[$i];
|
||||
$Lct++;
|
||||
}
|
||||
else
|
||||
{
|
||||
if ($section =~ /FILES/)
|
||||
{
|
||||
# print "section: $section line: $lang[$i]";
|
||||
$FILES[$Fct] = $lang[$i];
|
||||
$Fct++;
|
||||
}
|
||||
else
|
||||
{
|
||||
if ($section =~ /TRANSLATIONS/)
|
||||
{
|
||||
# print "section: $section line: $lang[$i]";
|
||||
$TRANSLATIONS[$Tct] = $lang[$i];
|
||||
$Tct++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
|
||||
if ($DB)
|
||||
{
|
||||
print "LANGUAGE FILE PARSE RESULTS: $#lang lines in file\n";
|
||||
print "LANGUAGES: $LANGUAGES\n";
|
||||
print "FILES: $Fct\n";
|
||||
print "TRANSLATIONS: $Tct\n";
|
||||
}
|
||||
|
||||
##### LOOP THROUGH THE LANGUAGES && ($lang_list[$i] !~ /^en/) )
|
||||
@lang_list = split(/\|/, $LANGUAGES);
|
||||
@lang_link_list = @lang_list;
|
||||
$i=0;
|
||||
$gif = '.gif';
|
||||
foreach(@lang_list)
|
||||
{
|
||||
if (length($lang_list[$i]) > 2)
|
||||
{
|
||||
@lang_detail = split(/-/, $lang_list[$i]);
|
||||
$lang_abb = $lang_detail[0];
|
||||
$lang_name = $lang_detail[1];
|
||||
|
||||
##### LOOP THROUGH THE FILES
|
||||
$Fct=0;
|
||||
foreach(@FILES)
|
||||
{
|
||||
$a=0;
|
||||
@file_detail = split(/\|/, $FILES[$Fct]);
|
||||
$file_path = $file_detail[0];
|
||||
$file_name = $file_detail[1];
|
||||
$file_name =~ s/\t|\r|\n//gi;
|
||||
$file_passthru = $file_detail[2];
|
||||
$file_passthru =~ s/\t|\r|\n//gi;
|
||||
if (-e "$webroot/$file_path/$file_name")
|
||||
{
|
||||
open(file, "$webroot/$file_path/$file_name") || die "can't open $webroot/$file_path/$file_name: $!\n";
|
||||
@file = @MT;
|
||||
@file = <file>;
|
||||
close(file);
|
||||
|
||||
print "File exists: ./$file_path/$file_name\n";
|
||||
if (-e "$webroot/$file_path$US$lang_abb")
|
||||
{
|
||||
print "Lang Directory exists: $webroot/$file_path$US$lang_abb\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
`mkdir $webroot/$file_path$US$lang_abb`;
|
||||
`chmod 0777 $webroot/$file_path$US$lang_abb`;
|
||||
print "Lang Directory created: $webroot/$file_path$US$lang_abb\n";
|
||||
}
|
||||
|
||||
if ($file_passthru < 1)
|
||||
{
|
||||
##### LOOP THROUGH THE TRANSLATIONS
|
||||
$Tct=0;
|
||||
foreach(@TRANSLATIONS)
|
||||
{
|
||||
@TRANSline = split(/\|/, $TRANSLATIONS[$Tct]);
|
||||
$ORIGtext = "$TRANSline[0]";
|
||||
$TRANStext = "$TRANSline[$i]";
|
||||
$LINESct=0;
|
||||
foreach(@file)
|
||||
{
|
||||
if ($file[$LINESct] !~ /^\#|^\s*function |'INCALL'|'PAUSED'|'READY'|'NEW'|xmlhttp|ILPV |ILPA |SELECT cmd_line_f/)
|
||||
{
|
||||
if ($file[$LINESct] =~ /INTERNATIONALIZATION-LINKS-PLACEHOLDER-VICIDIAL/)
|
||||
{
|
||||
$file[$LINESct] =~ s/INTERNATIONALIZATION-LINKS-PLACEHOLDER-VICIDIAL/ILPV/g;
|
||||
$e=0;
|
||||
$gif = '.gif';
|
||||
foreach(@lang_link_list)
|
||||
{
|
||||
if (length($lang_link_list[$e]) > 2)
|
||||
{
|
||||
@lang_list_detail = split(/-/, $lang_link_list[$e]);
|
||||
$lang_list_abb = $lang_list_detail[0];
|
||||
$lang_list_name = $lang_list_detail[1];
|
||||
if ($lang_list_abb =~ /$lang_abb/) {$list_bgcolor = ' BGCOLOR=\"#CCFFCC\"';}
|
||||
else {$list_bgcolor = '';}
|
||||
$file[$LINESct] .= "echo \"<TD WIDTH=100 ALIGN=RIGHT VALIGN=TOP $list_bgcolor NOWRAP><a href=\\\"../$file_path$US$lang_list_abb/$file_name?relogin=YES&VD_login=\$VD_login&VD_campaign=\$VD_campaign&phone_login=\$phone_login&phone_pass=\$phone_pass&VD_pass=\$VD_pass\\\">$lang_list_name <img src=\\\"../agc/images/$lang_list_abb$gif\\\" BORDER=0 HEIGHT=14 WIDTH=20></a></TD>\\n\";";
|
||||
}
|
||||
$e++;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if ($file[$LINESct] =~ /INTERNATIONALIZATION-LINKS-PLACEHOLDER-AGC/)
|
||||
{
|
||||
$file[$LINESct] =~ s/INTERNATIONALIZATION-LINKS-PLACEHOLDER-AGC/ILPA/g;
|
||||
$e=0;
|
||||
$gif = '.gif';
|
||||
foreach(@lang_link_list)
|
||||
{
|
||||
if (length($lang_link_list[$e]) > 2)
|
||||
{
|
||||
@lang_list_detail = split(/-/, $lang_link_list[$e]);
|
||||
$lang_list_abb = $lang_list_detail[0];
|
||||
$lang_list_name = $lang_list_detail[1];
|
||||
if ($lang_list_abb =~ /$lang_abb/) {$list_bgcolor = ' BGCOLOR=\"#CCFFCC\"';}
|
||||
else {$list_bgcolor = '';}
|
||||
$file[$LINESct] .= "echo \"<TD WIDTH=100 ALIGN=RIGHT VALIGN=TOP $list_bgcolor NOWRAP><a href=\\\"../$file_path$US$lang_list_abb/$file_name?relogin=YES&user=\$user&pass=\$pass&phone_login=\$phone_login&phone_pass=\$phone_pass\\\">$lang_list_name <img src=\\\"../agc/images/$lang_list_abb$gif\\\" BORDER=0 HEIGHT=14 WIDTH=20></a></TD>\\n\";";
|
||||
}
|
||||
$e++;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( ($lang_abb =~ /^en/) && ($Tct > 2) )
|
||||
{
|
||||
$file[$LINESct] =~ s/\.\/images\//\.\.\/agc\/images\//g;
|
||||
$file[$LINESct] =~ s/\"help.gif/\"..\/astguiclient\/help.gif/g;
|
||||
}
|
||||
if ($lang_abb !~ /^en/)
|
||||
{$file[$LINESct] =~ s/$ORIGtext/$TRANStext/g;}
|
||||
}
|
||||
}
|
||||
}
|
||||
$LINESct++;
|
||||
|
||||
if ($a =~ /00000$/i) {print "$a $file[$LINESct]\n|$ORIGtext|$TRANStext|";}
|
||||
$a++;
|
||||
}
|
||||
$Tct++;
|
||||
}
|
||||
}
|
||||
### open the translation result file for writing ###
|
||||
open(out, ">$webroot/$file_path$US$lang_abb/$file_name")
|
||||
|| die "Can't open $webroot/$file_path$US$lang_abb/$file_name: $!\n";
|
||||
# print out "Header(\"Content-type: text/html; charset=utf-8\");\n";
|
||||
$LINESct=0;
|
||||
foreach(@file)
|
||||
{
|
||||
print out "$file[$LINESct]";
|
||||
$LINESct++;
|
||||
}
|
||||
close(out);
|
||||
print "\n";
|
||||
print "File Written: $webroot/$file_path$US$lang_abb/$file_name\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
print "File does not exist: $webroot/$file_path/$file_name\n";
|
||||
}
|
||||
$Fct++;
|
||||
}
|
||||
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,358 +0,0 @@
|
||||
# languages.txt - this file is for the internationalization of the astGUIclient
|
||||
# client web pages. The associated config.pl file will take the language as an
|
||||
# argument and alter the php scripts to the language typed in the command line:
|
||||
# example: ./config.pl --language=es
|
||||
# current languages in the file:
|
||||
# - English - (en) no alterations
|
||||
# - Spanish - (es) first column
|
||||
# - French - (fr) second column
|
||||
# - German - (de) third column
|
||||
# - Italian - (it) fourth column
|
||||
***LANGUAGES***
|
||||
en-English|es-Español|fr-Français|de-Deutsch|it-Italiano|pt-Português|el-Ελληνικά|
|
||||
***FILES***
|
||||
agc|astguiclient.php|0
|
||||
agc|vicidial.php|0
|
||||
agc|vdc_db_query.php|0
|
||||
agc|manager_send.php|0
|
||||
agc|conf_exten_check.php|0
|
||||
agc|inbound_popup.php|0
|
||||
agc|active_list_refresh.php|0
|
||||
agc|park_calls_display.php|0
|
||||
agc|live_exten_check.php|0
|
||||
agc|call_log_display.php|0
|
||||
agc|voicemail_check.php|0
|
||||
agc|dbconnect.php|1
|
||||
agc|htglobalize.php|1
|
||||
***TRANSLATIONS***
|
||||
English|Inglés|Anglais|Englisch|Inglese|Inglês|Αγγλικά|||
|
||||
Spanish|Español|Espagnol|Spanisch|Spagnolo|Espanhol|Ισπανικά|||
|
||||
French|Francés|Français|Französisch|Francese|Francês|Γαλλικά|||
|
||||
German|Alemán|Allemand|Deutsch|Tedesco|Alemão|Γερμανικά|||
|
||||
Italian|Italiano|Italien|Italienisch|Italiano|Italiano|Ιταλικά|||
|
||||
agc_check_voicemail_BLINK.gif|agc_check_voicemail_BLINK_es.gif|agc_check_voicemail_BLINK_fr.gif|agc_check_voicemail_BLINK_de.gif|agc_check_voicemail_BLINK_it.gif|agc_check_voicemail_BLINK_pt.gif|agc_check_voicemail_BLINK_el.gif|||
|
||||
agc_check_voicemail_OFF.gif|agc_check_voicemail_OFF_es.gif|agc_check_voicemail_OFF_fr.gif|agc_check_voicemail_OFF_de.gif|agc_check_voicemail_OFF_it.gif|agc_check_voicemail_OFF_pt.gif|agc_check_voicemail_OFF_el.gif|||
|
||||
agc_check_voicemail_ON.gif|agc_check_voicemail_ON_es.gif|agc_check_voicemail_ON_fr.gif|agc_check_voicemail_ON_de.gif|agc_check_voicemail_ON_it.gif|agc_check_voicemail_ON_pt.gif|agc_check_voicemail_ON_el.gif|||
|
||||
agc_live_call_OFF.gif|agc_live_call_OFF_es.gif|agc_live_call_OFF_fr.gif|agc_live_call_OFF_de.gif|agc_live_call_OFF_it.gif|agc_live_call_OFF_pt.gif|agc_live_call_OFF_el.gif|||
|
||||
agc_live_call_ON.gif|agc_live_call_ON_es.gif|agc_live_call_ON_fr.gif|agc_live_call_ON_de.gif|agc_live_call_ON_it.gif|agc_live_call_ON_pt.gif|agc_live_call_ON_el.gif|||
|
||||
agc_tab_active_lines.gif|agc_tab_active_lines_es.gif|agc_tab_active_lines_fr.gif|agc_tab_active_lines_de.gif|agc_tab_active_lines_it.gif|agc_tab_active_lines_pt.gif|agc_tab_active_lines_el.gif|||
|
||||
agc_tab_conferences.gif|agc_tab_conferences_es.gif|agc_tab_conferences_fr.gif|agc_tab_conferences_de.gif|agc_tab_conferences_it.gif|agc_tab_conferences_pt.gif|agc_tab_conferences_el.gif|||
|
||||
agc_tab_main.gif|agc_tab_main_es.gif|agc_tab_main_fr.gif|agc_tab_main_de.gif|agc_tab_main_it.gif|agc_tab_main_pt.gif|agc_tab_main_el.gif|||
|
||||
vdc_LB_dialnextnumber.gif|vdc_LB_dialnextnumber_es.gif|vdc_LB_dialnextnumber_fr.gif|vdc_LB_dialnextnumber_de.gif|vdc_LB_dialnextnumber_it.gif|vdc_LB_dialnextnumber_pt.gif|vdc_LB_dialnextnumber_el.gif|||
|
||||
vdc_LB_dialnextnumber_OFF.gif|vdc_LB_dialnextnumber_OFF_es.gif|vdc_LB_dialnextnumber_OFF_fr.gif|vdc_LB_dialnextnumber_OFF_de.gif|vdc_LB_dialnextnumber_OFF_it.gif|vdc_LB_dialnextnumber_OFF_pt.gif|vdc_LB_dialnextnumber_OFF_el.gif|||
|
||||
vdc_LB_grabparkedcall.gif|vdc_LB_grabparkedcall_es.gif|vdc_LB_grabparkedcall_fr.gif|vdc_LB_grabparkedcall_de.gif|vdc_LB_grabparkedcall_it.gif|vdc_LB_grabparkedcall_pt.gif|vdc_LB_grabparkedcall_el.gif|||
|
||||
vdc_LB_hangupcustomer.gif|vdc_LB_hangupcustomer_es.gif|vdc_LB_hangupcustomer_fr.gif|vdc_LB_hangupcustomer_de.gif|vdc_LB_hangupcustomer_it.gif|vdc_LB_hangupcustomer_pt.gif|vdc_LB_hangupcustomer_el.gif|||
|
||||
vdc_LB_hangupcustomer_OFF.gif|vdc_LB_hangupcustomer_OFF_es.gif|vdc_LB_hangupcustomer_OFF_fr.gif|vdc_LB_hangupcustomer_OFF_de.gif|vdc_LB_hangupcustomer_OFF_it.gif|vdc_LB_hangupcustomer_OFF_pt.gif|vdc_LB_hangupcustomer_OFF_el.gif|||
|
||||
vdc_LB_parkcall.gif|vdc_LB_parkcall_es.gif|vdc_LB_parkcall_fr.gif|vdc_LB_parkcall_de.gif|vdc_LB_parkcall_it.gif|vdc_LB_parkcall_pt.gif|vdc_LB_parkcall_el.gif|||
|
||||
vdc_LB_parkcall_OFF.gif|vdc_LB_parkcall_OFF_es.gif|vdc_LB_parkcall_OFF_fr.gif|vdc_LB_parkcall_OFF_de.gif|vdc_LB_parkcall_OFF_it.gif|vdc_LB_parkcall_OFF_pt.gif|vdc_LB_parkcall_OFF_el.gif|||
|
||||
vdc_LB_pause.gif|vdc_LB_pause_es.gif|vdc_LB_pause_fr.gif|vdc_LB_pause_de.gif|vdc_LB_pause_it.gif|vdc_LB_pause_pt.gif|vdc_LB_pause_el.gif|||
|
||||
vdc_LB_pause_OFF.gif|vdc_LB_pause_OFF_es.gif|vdc_LB_pause_OFF_fr.gif|vdc_LB_pause_OFF_de.gif|vdc_LB_pause_OFF_it.gif|vdc_LB_pause_OFF_pt.gif|vdc_LB_pause_OFF_el.gif|||
|
||||
vdc_LB_resume.gif|vdc_LB_resume_es.gif|vdc_LB_resume_fr.gif|vdc_LB_resume_de.gif|vdc_LB_resume_it.gif|vdc_LB_resume_pt.gif|vdc_LB_resume_el.gif|||
|
||||
vdc_LB_resume_OFF.gif|vdc_LB_resume_OFF_es.gif|vdc_LB_resume_OFF_fr.gif|vdc_LB_resume_OFF_de.gif|vdc_LB_resume_OFF_it.gif|vdc_LB_resume_OFF_pt.gif|vdc_LB_resume_OFF_el.gif|||
|
||||
vdc_LB_startrecording.gif|vdc_LB_startrecording_es.gif|vdc_LB_startrecording_fr.gif|vdc_LB_startrecording_de.gif|vdc_LB_startrecording_it.gif|vdc_LB_startrecording_pt.gif|vdc_LB_startrecording_el.gif|||
|
||||
vdc_LB_stoprecording.gif|vdc_LB_stoprecording_es.gif|vdc_LB_stoprecording_fr.gif|vdc_LB_stoprecording_de.gif|vdc_LB_stoprecording_it.gif|vdc_LB_stoprecording_pt.gif|vdc_LB_stoprecording_el.gif|||
|
||||
vdc_LB_transferconf.gif|vdc_LB_transferconf_es.gif|vdc_LB_transferconf_fr.gif|vdc_LB_transferconf_de.gif|vdc_LB_transferconf_it.gif|vdc_LB_transferconf_pt.gif|vdc_LB_transferconf_el.gif|||
|
||||
vdc_LB_transferconf_OFF.gif|vdc_LB_transferconf_OFF_es.gif|vdc_LB_transferconf_OFF_fr.gif|vdc_LB_transferconf_OFF_de.gif|vdc_LB_transferconf_OFF_it.gif|vdc_LB_transferconf_OFF_pt.gif|vdc_LB_transferconf_OFF_el.gif|||
|
||||
vdc_LB_webform.gif|vdc_LB_webform_es.gif|vdc_LB_webform_fr.gif|vdc_LB_webform_de.gif|vdc_LB_webform_it.gif|vdc_LB_webform_pt.gif|vdc_LB_webform_el.gif|||
|
||||
vdc_LB_webform_OFF.gif|vdc_LB_webform_OFF_es.gif|vdc_LB_webform_OFF_fr.gif|vdc_LB_webform_OFF_de.gif|vdc_LB_webform_OFF_it.gif|vdc_LB_webform_OFF_pt.gif|vdc_LB_webform_OFF_el.gif|||
|
||||
vdc_XB_blindtransfer.gif|vdc_XB_blindtransfer_es.gif|vdc_XB_blindtransfer_fr.gif|vdc_XB_blindtransfer_de.gif|vdc_XB_blindtransfer_it.gif|vdc_XB_blindtransfer_pt.gif|vdc_XB_blindtransfer_el.gif|||
|
||||
vdc_XB_blindtransfer_OFF.gif|vdc_XB_blindtransfer_OFF_es.gif|vdc_XB_blindtransfer_OFF_fr.gif|vdc_XB_blindtransfer_OFF_de.gif|vdc_XB_blindtransfer_OFF_it.gif|vdc_XB_blindtransfer_OFF_pt.gif|vdc_XB_blindtransfer_OFF_el.gif|||
|
||||
vdc_XB_dialwithcustomer.gif|vdc_XB_dialwithcustomer_es.gif|vdc_XB_dialwithcustomer_fr.gif|vdc_XB_dialwithcustomer_de.gif|vdc_XB_dialwithcustomer_it.gif|vdc_XB_dialwithcustomer_pt.gif|vdc_XB_dialwithcustomer_el.gif|||
|
||||
vdc_XB_dialwithcustomer_OFF.gif|vdc_XB_dialwithcustomer_OFF_es.gif|vdc_XB_dialwithcustomer_OFF_fr.gif|vdc_XB_dialwithcustomer_OFF_de.gif|vdc_XB_dialwithcustomer_OFF_it.gif|vdc_XB_dialwithcustomer_OFF_pt.gif|vdc_XB_dialwithcustomer_OFF_el.gif|||
|
||||
vdc_XB_hangupbothlines.gif|vdc_XB_hangupbothlines_es.gif|vdc_XB_hangupbothlines_fr.gif|vdc_XB_hangupbothlines_de.gif|vdc_XB_hangupbothlines_it.gif|vdc_XB_hangupbothlines_pt.gif|vdc_XB_hangupbothlines_el.gif|||
|
||||
vdc_XB_hangupbothlines_OFF.gif|vdc_XB_hangupbothlines_OFF_es.gif|vdc_XB_hangupbothlines_OFF_fr.gif|vdc_XB_hangupbothlines_OFF_de.gif|vdc_XB_hangupbothlines_OFF_it.gif|vdc_XB_hangupbothlines_OFF_pt.gif|vdc_XB_hangupbothlines_OFF_el.gif|||
|
||||
vdc_XB_hangupxferline.gif|vdc_XB_hangupxferline_es.gif|vdc_XB_hangupxferline_fr.gif|vdc_XB_hangupxferline_de.gif|vdc_XB_hangupxferline_it.gif|vdc_XB_hangupxferline_pt.gif|vdc_XB_hangupxferline_el.gif|||
|
||||
vdc_XB_hangupxferline_OFF.gif|vdc_XB_hangupxferline_OFF_es.gif|vdc_XB_hangupxferline_OFF_fr.gif|vdc_XB_hangupxferline_OFF_de.gif|vdc_XB_hangupxferline_OFF_it.gif|vdc_XB_hangupxferline_OFF_pt.gif|vdc_XB_hangupxferline_OFF_el.gif|||
|
||||
vdc_XB_internalcloser.gif|vdc_XB_internalcloser_es.gif|vdc_XB_internalcloser_fr.gif|vdc_XB_internalcloser_de.gif|vdc_XB_internalcloser_it.gif|vdc_XB_internalcloser_pt.gif|vdc_XB_internalcloser_el.gif|||
|
||||
vdc_XB_internalcloser_OFF.gif|vdc_XB_internalcloser_OFF_es.gif|vdc_XB_internalcloser_OFF_fr.gif|vdc_XB_internalcloser_OFF_de.gif|vdc_XB_internalcloser_OFF_it.gif|vdc_XB_internalcloser_OFF_pt.gif|vdc_XB_internalcloser_OFF_el.gif|||
|
||||
vdc_XB_leave3waycall.gif|vdc_XB_leave3waycall_es.gif|vdc_XB_leave3waycall_fr.gif|vdc_XB_leave3waycall_de.gif|vdc_XB_leave3waycall_it.gif|vdc_XB_leave3waycall_pt.gif|vdc_XB_leave3waycall_el.gif|||
|
||||
vdc_XB_leave3waycall_OFF.gif|vdc_XB_leave3waycall_OFF_es.gif|vdc_XB_leave3waycall_OFF_fr.gif|vdc_XB_leave3waycall_OFF_de.gif|vdc_XB_leave3waycall_OFF_it.gif|vdc_XB_leave3waycall_OFF_pt.gif|vdc_XB_leave3waycall_OFF_el.gif|||
|
||||
vdc_XB_localcloser.gif|vdc_XB_localcloser_es.gif|vdc_XB_localcloser_fr.gif|vdc_XB_localcloser_de.gif|vdc_XB_localcloser_it.gif|vdc_XB_localcloser_pt.gif|vdc_XB_localcloser_el.gif|||
|
||||
vdc_XB_localcloser_OFF.gif|vdc_XB_localcloser_OFF_es.gif|vdc_XB_localcloser_OFF_fr.gif|vdc_XB_localcloser_OFF_de.gif|vdc_XB_localcloser_OFF_it.gif|vdc_XB_localcloser_OFF_pt.gif|vdc_XB_localcloser_OFF_el.gif|||
|
||||
vdc_XB_parkcustomerdial.gif|vdc_XB_parkcustomerdial_es.gif|vdc_XB_parkcustomerdial_fr.gif|vdc_XB_parkcustomerdial_de.gif|vdc_XB_parkcustomerdial_it.gif|vdc_XB_parkcustomerdial_pt.gif|vdc_XB_parkcustomerdial_el.gif|||
|
||||
vdc_XB_parkcustomerdial_OFF.gif|vdc_XB_parkcustomerdial_OFF_es.gif|vdc_XB_parkcustomerdial_OFF_fr.gif|vdc_XB_parkcustomerdial_OFF_de.gif|vdc_XB_parkcustomerdial_OFF_it.gif|vdc_XB_parkcustomerdial_OFF_pt.gif|vdc_XB_parkcustomerdial_OFF_el.gif|||
|
||||
vdc_XB_hotkeysactive.gif|vdc_XB_hotkeysactive_es.gif|vdc_XB_hotkeysactive_fr.gif|vdc_XB_hotkeysactive_de.gif|vdc_XB_hotkeysactive_it.gif|vdc_XB_hotkeysactive_pt.gif|vdc_XB_hotkeysactive_el.gif|||
|
||||
vdc_XB_hotkeysactive_OFF.gif|vdc_XB_hotkeysactive_OFF_es.gif|vdc_XB_hotkeysactive_OFF_fr.gif|vdc_XB_hotkeysactive_OFF_de.gif|vdc_XB_hotkeysactive_OFF_it.gif|vdc_XB_hotkeysactive_OFF_pt.gif|vdc_XB_hotkeysactive_OFF_el.gif|||
|
||||
vdc_LB_senddtmf.gif|vdc_LB_senddtmf_es.gif|vdc_LB_senddtmf_fr.gif|vdc_LB_senddtmf_de.gif|vdc_LB_senddtmf_it.gif|vdc_LB_senddtmf_pt.gif|vdc_LB_senddtmf_el.gif|||
|
||||
vdc_LB_senddtmf_OFF.gif|vdc_LB_senddtmf_OFF_es.gif|vdc_LB_senddtmf_OFF_fr.gif|vdc_LB_senddtmf_OFF_de.gif|vdc_LB_senddtmf_OFF_it.gif|vdc_LB_senddtmf_OFF_pt.gif|vdc_LB_senddtmf_OFF_el.gif|||
|
||||
vdc_XB_header.gif|vdc_XB_header_es.gif|vdc_XB_header_fr.gif|vdc_XB_header_de.gif|vdc_XB_header_it.gif|vdc_XB_header_pt.gif|vdc_XB_header_el.gif|||
|
||||
vdc_XB_number.gif|vdc_XB_number_es.gif|vdc_XB_number_fr.gif|vdc_XB_number_de.gif|vdc_XB_number_it.gif|vdc_XB_number_pt.gif|vdc_XB_number_el.gif|||
|
||||
vdc_XB_channel.gif|vdc_XB_channel_es.gif|vdc_XB_channel_fr.gif|vdc_XB_channel_de.gif|vdc_XB_channel_it.gif|vdc_XB_channel_pt.gif|vdc_XB_channel_el.gif|||
|
||||
vdc_XB_seconds.gif|vdc_XB_seconds_es.gif|vdc_XB_seconds_fr.gif|vdc_XB_seconds_de.gif|vdc_XB_seconds_it.gif|vdc_XB_seconds_pt.gif|vdc_XB_seconds_el.gif|||
|
||||
You have now logged out. Thank you|Usted ahora ha registrado hacia fuera. Gracias|Vous vous êtes maintenant déconnecté. Merci|Sie haben jetzt heraus geloggt. Danke|Ora avete annotato fuori. Grazie|Você tem registrado agora para fora. Obrigado|Έχετε αποσυνδεθεί τώρα. Σας ευχαριστούμε|||
|
||||
astGUIclient web-client VERSION|versión astGUIclient del tela-cliente|VERSION astGUIclient d'enchaînement-client|astGUIclient Netz-Klient VERSION|VERSIONE astGUIclient del fotoricettore-cliente|VERSÃO astGUIclient do correia-cliente|ΈΚΔΟΣΗ Ιστός-πελατών astGUIclient|||
|
||||
astGUIclient web client|web client astGUIclient|web client astGUIclient|astGUIclient web client|web client astGUIclient|web client astGUIclient|astGUIclient πελάτης Ιστού|||
|
||||
VICIDIAL web client|web client VICIDIAL|Web client de VICIDIAL|VICIDIAL web client|Web client di VICIDIAL|Web client de VICIDIAL|VICIDIAL πελάτης Ιστού|||
|
||||
VICIDIAL web-client version|versión web client VICIDIAL|Version d'enchaînement-client de VICIDIAL|VICIDIAL Netz-Klient Version|Versione del fotoricettore-cliente di VICIDIAL|Versão do correia-cliente de VICIDIAL|Έκδοση Ιστός-πελατών VICIDIAL|||
|
||||
You can only monitor Zap channels|Usted puede supervisa solamente Zap los canales|Vous pouvez surveillez seulement zap des canaux |Sie können überwachen nur Zap Führungen|Potete soltanto controllate zap le scanalature|Você pode monitora somente zap as canaletas|Μπορείτε μόνο να ελέγξετε τα κανάλια Zap|||
|
||||
Stop Record|Pare la grabación|Arrêtez Le Disque|Stoppen Sie Aufzeichnung|Arresti L'Annotazione|Pare O Registro|Αρχείο στάσεων|||
|
||||
you are logged into this phone|su teléfono|votre téléphone|Ihr Telefon|il vostro telefono|seu telefone|τηλέφωνο |||
|
||||
Back to Main Window|Volver a la pantalla principal|De nouveau à la fenêtre principale|Zurück zu Hauptfenster|Di nuovo alla finestra principale|Para trás à janela principal|Πίσω στο κύριο παράθυρο|||
|
||||
LIVE CALLS ON THIS PHONE|LLAMADAS ACTIVAS EN ESTE TELÉFONO|DE PHASE INVITE CE TÉLÉPHONE|PHASEN ERSUCHT UM DIESES TELEFON|IN TENSIONE INVITA QUESTO TELEFONO|VIVO CONVIDA ESTE TELEFONE|ΖΗΣΤΕ ΚΑΛΕΙ ΑΥΤΟ ΤΟ ΤΗΛΕΦΩΝΟ|||
|
||||
LIVE CALLS IN THIS CONFERENCE|LLAMADAS ACTIVAS EN ESTA CONFERENCIA|VIVENT LES APPELS DANS CETTE CONFÉRENCE|LEBEN ANRUFE IN DIESER KONFERENZ|VIVONO LE CHIAMATE IN QUESTO CONGRESSO|VIVEM AS CHAMADAS NCESTA CONFERÊNCIA|ΖΗΣΤΕ ΚΛΗΣΕΙΣ ΣΕ ΑΥΤΗΝ ΤΗΝ ΔΙΑΣΚΕΨΗ|||
|
||||
LIVE CALL TRANSFER|TRANSFERIR LLAMADA ACTIVA|TRANSFERT DE PHASE D'APPEL|PHASENANRUF-ÜBERTRAGUNG|TRASFERIMENTO IN TENSIONE DI CHIAMATA|TRANSFERÊNCIA VIVA DA CHAMADA|ΖΗΣΤΕ ΜΕΤΑΦΟΡΑ ΚΛΗΣΗΣ|||
|
||||
CLIENT CHANNEL|CANAL CLIENTE|LA MANCHE DE CLIENT|KLIENT FÜHRUNG|MANICA DEL CLIENTE|CANALETA DO CLIENTE|ΚΑΝΑΛΙ ΠΕΛΑΤΩΝ|||
|
||||
REMOTE CHANNEL|CANAL REMOTO|LA MANCHE À DISTANCE|REMOTEFÜHRUNG|MANICA A DISTANZA|CANALETA REMOTA|ΜΑΚΡΙΝΟ ΚΑΝΑΛΙ|||
|
||||
CLICK HERE TO LOG IN AGAIN|PINCHA AQUÍ PARA ENTRAR OTRA VEZ|CLIC ICI À L'OUVERTURE ENCORE|KLICKEN SIE HIER, UM INNEN WIEDER ZU LOGGEN|SCATTISI QUI PER ENTRARE ANCORA|ESTALE AQUI PARA LOGON OUTRA VEZ|ΧΤΥΠΗΣΤΕ ΕΔΩ ΓΙΑ ΝΑ ΚΑΤΑΓΡΑΨΕΤΕ ΠΑΛΙ|||
|
||||
ACTIVE DISPLAY PAUSED|DISPLAY ACTIVO PAUSADO|L'AFFICHAGE ACTIF A FAIT UNE PAUSE|AKTIVE ANZEIGE PAUSIERTE|L'ESPOSIZIONE ATTIVA HA FATTO UNA PAUSA|A EXPOSIÇÃO ATIVA PAUSOU|Η ΕΝΕΡΓΟΣ ΕΠΙΔΕΙΞΗ ΣΤΑΜΑΤΗΣΕ|||
|
||||
Main Panel|Pantalla Principal|Panneau Principal|Hauptverkleidung|Pannello Principale|Painel Principal|Κύρια επιτροπή|||
|
||||
Active Lines Panel|Pantalla Lineas Activas|Lignes Actives Panneau|Aktive Linien Verkleidung|Linee Attive Pannello|Linhas Ativas Painel|Ενεργός επιτροπή γραμμών|||
|
||||
Conferences Panel|Pantalla de Conferencias|Panneau De Conférences|Konferenz-Verkleidung|Pannello Di Congressi|Painel Das Conferências|Επιτροπή διασκέψεων|||
|
||||
Check Voicemail|Comprobar buzón de voz|Vérifiez Voicemail|Überprüfen Sie Voicemail|Controlli Voicemail|Verifique Voicemail|Φωνητικό ταχυδρομείο ελέγχου|||
|
||||
Live Call|Llamada Activa|Vivent L'Appel|Leben Anruf|Vive La Chiamata|Vive A Chamada|Ζήστε κλήση|||
|
||||
Hangup Trunk|Colgar Trunk|Tronc De Décrochement|Hängezustand-Stamm|Tronco Di Hangup|Tronco Do Hangup|Κορμός Κλείστε το τηλέφωνο|||
|
||||
Hijack Trunk|Capturar Trunk|Tronc De Détournement|Straßenräuber-Stamm|Tronco Di Dirottamento|Tronco Do Hijack|Κορμός αεροπειρατείας|||
|
||||
Listen Trunk|Escuchar Trunk|Écoutent Le Tronc|Hören Stamm|Ascolta Il Tronco|Escuta O Tronco|Ακούστε κορμός|||
|
||||
Active Local Menu|Menú Local Activa|Menu Local Actif|Aktives Lokales Menü|Menu Locale Attivo|Menu Local Ativo|Ενεργές τοπικές επιλογές|||
|
||||
Hangup Local|Colgar Local|Gens du pays De Décrochement|Hängezustand-Einheimischer|Local Di Hangup|Local Do Hangup|Hangup τοπικό|||
|
||||
Hijack Local|Capturar Local|Gens du pays De Détournement|Straßenräuber-Einheimischer|Local Di Dirottamento|Local Do Hijack|Αεροπειρατεία τοπική|||
|
||||
Listen Local|Escuchar Local|Écoutent Les Gens du pays|Hören Einheimischer|Ascolta Il Local|Escuta O Local|Ακούστε τοπικός|||
|
||||
Channel to be transferred|Canal que va a ser transferido|La Manche à transférer|Gebracht zu werden Führung|Manica da trasferire|Canaleta a ser transferida|Κανάλι που μεταφέρεται|||
|
||||
Extensions Menu|Menú Extensiones|Menu De Prolongements|Verlängerungen Menü|Menu Di Estensioni|Menu Das Extensões|Επιλογές επεκτάσεων|||
|
||||
Send to selected extension|Envíe a la extensión seleccionada|Envoyez à la prolongation choisie|Senden Sie zu vorgewählter Verlängerung|Trasmetta all'estensione selezionata|Emita à extensão selecionada|Στείλετε στην επιλεγμένη επέκταση|||
|
||||
Send to selected vmail box|Enviar al buzón de voz seleccionada|Envoyez dans la boîte choisie de vmail|Senden Sie zu vorgewähltem vmail Kasten|Trasmetta alla scatola selezionata del vmail|Emita à caixa selecionada do vmail|Στείλετε στο επιλεγμένο vmail κιβώτιο|||
|
||||
Send to this number|Envíe a este número|Envoyez à ce nombre|Senden Sie zu dieser Zahl|_ trasmett questo numero|Emita a este número|Στείλετε σε αυτόν τον αριθμό|||
|
||||
click on a number below to send to a conference|Pinchar en un número de abajo para enviar a una conferencia|cliquez sur un nombre ci-dessous pour envoyer à une|klicken Sie an eine Zahl unten, um zu einer Konferenz zu senden|scatti sopra un numero qui sotto per trasmettere ad un congresso|estale sobre um número abaixo para emitir a uma conferência|χτυπήστε σε έναν αριθμό κατωτέρω που στέλνει σε μια διάσκεψη|||
|
||||
Send my channel too|Enviar mi canal también|Envoyez mon canal aussi|Senden Sie meine Führung auch|Trasmetta la mia scanalatura anche|Emita minha canaleta demasiado|Στείλετε το κανάλι μου επίσης|||
|
||||
Conferences Menu|Menú de Conferencias|Menu De Conférences|Konferenz-Menü|Menu Di Congressi|Menu Das Conferências|Επιλογές διασκέψεων|||
|
||||
LOCAL Extensions Dial|Marcar a Extensiones LOCALES|Cadran LOCAL De Prolongements|LOKALER Verlängerungen Vorwahlknopf|Manopola LOCALE Di Estensioni|Seletor LOCAL Das Extensões|ΤΟΠΙΚΟΣ πίνακας επεκτάσεων|||
|
||||
Phone calling from|Teléfono llamando desde|Téléphone appelant de|Telefon, das von benennt|Telefono che denomina da|Telefone que chama-se de|Τηλέφωνο που καλεί από|||
|
||||
Call selected extension|Llamar extensión seleccionada|Prolongation choisie par appel|Anruf vorgewählte Verlängerung|Estensione selezionata chiamata|Extensão selecionada chamada|Επιλεγμένη κλήση επέκταση|||
|
||||
Call selected vmail box|Llamar buzón de voz seleccionado|Boîte de vmail choisie par appel|Anruf vorgewählter vmail Kasten|Scatola del vmail selezionata chiamata|Caixa selecionada chamada do vmail|Επιλεγμένο κλήση vmail κιβώτιο|||
|
||||
LOCAL DIAL EXTENSIONS|MARCAR EXTENSIONES LOCALES|PROLONGEMENTS LOCAUX DE CADRAN|LOKALE VORWAHLKNOPF-VERLÄNGERUNGEN|ESTENSIONI LOCALI DELLA MANOPOLA|EXTENSÕES LOCAIS DO SELETOR|ΤΟΠΙΚΕΣ ΕΠΕΚΤΑΣΕΙΣ ΠΙΝΑΚΩΝ|||
|
||||
OUTBOUND CALLS|LLAMADAS SALIENTES|APPELS EN PARTANCE|OUTBOUND ANRUFE|CHIAMATE OUTBOUND|CHAMADAS OUTBOUND |ΕΞΕΡΧΟΜΕΝΕΣ ΚΛΗΣΕΙΣ|||
|
||||
INBOUND CALLS|LLAMADAS ENTRANTES|APPELS D'ARRIVÉE|INBOUND ANRUFE|CHIAMATE INBOUND|CHAMADAS INBOUND|ΕΙΣΕΡΧΟΜΕΝΕΣ ΚΛΗΣΕΙΣ|||
|
||||
Refresh rate|Actualizar la tarifa|La vitesse de régénération|Erneuern Sie Rate|La velocità di rinfrescamento|Refresque a taxa|Αναζωογονήστε το ποσοστό|||
|
||||
MANUAL DIAL|MARCADO MANUAL|CADRAN MANUEL|MANUELLER VORWAHLKNOPF|MANOPOLA MANUALE|SELETOR MANUAL|ΧΕΙΡΩΝΑΚΤΙΚΟΣ ΠΙΝΑΚΑΣ|||
|
||||
CALL DATE/TIME|FECHA/HORA DE LA LLAMADA|DATE/HEURE D'APPEL|ANRUFDATE/TIME|DATE/TIME DI CHIAMATA|DATE/TIME DA CHAMADA|ΗΜΕΡΟΜΗΝΙΑ/ΧΡΟΝΟΣ ΚΛΗΣΗΣ|||
|
||||
LOCAL HANGUP|Colgar Local|DÉCROCHEMENT LOCAL|LOKALER HÄNGEZUSTAND|HANGUP LOCALE|HANGUP LOCAL|ΤΟΠΙΚΟ ΚΛΕΙΣΤΕ ΤΟ ΤΗΛΈΦΩΝΟ|||
|
||||
PARKED CALLS|LLAMADAS APARCADAS|APPELS GARÉS|GEPARKTE ANRUFE|CHIAMATE PARCHEGGIATE|CHAMADAS ESTACIONADAS|ΣΤΑΘΜΕΥΜΕΝΕΣ ΚΛΗΣΕΙΣ|||
|
||||
PARKED BY|APARCAR POR|GARÉ PRÈS|VORBEI GEPARKT|PARCHEGGIATO VICINO|ESTACIONADO PERTO|ΣΤΑΘΜΕΥΜΕΝΟΣ ΚΟΝΤΑ|||
|
||||
PARKED TIME|TIEMPO EN PARKING|TEMPS GARÉ|GEPARKTE ZEIT|TEMPO PARCHEGGIATO|TEMPO ESTACIONADO|ΣΤΑΘΜΕΥΜΕΝΟΣ ΧΡΟΝΟΣ|||
|
||||
Registered to|Registrado a|Enregistré à|Registriert zu|Registrato a|Registado a|Καταχωρημένος|||
|
||||
Enter Conference|Entrar en la conferencia|Écrivez La Conférence|Tragen Sie Konferenz Ein|Entri Nel Congresso|Incorpore A Conferência|Εισάγετε τη διάσκεψη|||
|
||||
Dial From Conf|Marcar desde la Conf|Cadran de conf |Vorwahlknopf Von Conf|Manopola Da Conf|Seletor De Conf|Πίνακας από τη διάσκεψη|||
|
||||
Active Extensions|Extensiones Activas|Prolongements Actifs|Aktive Verlängerungen|Estensioni Attive|Extensões Ativas|Ενεργές επεκτάσεις|||
|
||||
Outside Lines|Líneas de salida|Lignes Extérieures|Äußere Linien|Linee Esterne|Linhas Exteriores|Εξωτερικές γραμμές|||
|
||||
Local Extensions|Extensiones Locales|Prolongements Locaux|Lokale Verlängerungen|Estensioni Locali|Extensões Locais|Τοπικές επεκτάσεις|||
|
||||
Data Goes Here|Los Datos Van Aquí|Les Données Vont Ici|Daten Gehen Hier|I Dati Vanno Qui|Os Dados Vão Aqui|Το στοιχείο πηγαίνει εδώ|||
|
||||
Trunk Action|Acciones en Trunk|Action De Tronc|Stamm-Tätigkeit|Azione Del Tronco|Ação Do Tronco|Δράση κορμών|||
|
||||
Local Action|Acción Local|Action Locale|Lokale Tätigkeit|Azione Locale|Ação Local|Τοπική δράση|||
|
||||
Conferences List|Lista De las Conferencias|Liste De Conférences|Konferenz-Liste|Lista Di Congressi|Lista Das Conferências|Κατάλογος διασκέψεων|||
|
||||
Click on a conference room number on the left for info on that conference|Pinchar a la izquierda del número de una sala de conferencias para obtener información|Cliquez sur un nombre de salle de conférence du côté gauche|Klicken Sie an Konferenzzimmernummer auf dem links für Info auf|Scatti sopra un numero di stanza di congresso a sinistra per l'Info su|Estale sobre um número de quarto da conferência na esquerda para o|Χτυπήστε σε έναν αριθμό δωματίων διασκέψεων στο αριστερό για τις πληροφορίες σε εκείνη την διάσκεψη|||
|
||||
List Display|Mostrar Listas|Affichage De Liste|Liste Anzeige|Esposizione Della Lista|Exposição Da Lista|Επίδειξη καταλόγων|||
|
||||
Live Extensions|Extensiones Activas|Prolongements De phase|Phasenverlängerungen|Estensioni In tensione|Extensões Vivas|Ζήστε επεκτάσεις|||
|
||||
Busy Extensions|Extensiones Ocupadas|Prolongements Occupés|Beschäftigte Verlängerungen|Estensioni Occupate|Extensões Ocupadas|Πολυάσχολες επεκτάσεις|||
|
||||
Outside Lines|Extensiones Salientes|Lignes Extérieures|Äußere Linien|Linee Esterne|Linhas Exteriores|Εξωτερικές γραμμές|||
|
||||
script runtime|tiempo de ejecución del Script|temps d'exécution de manuscrit|Indexlaufzeit|tempo di esecuzione dello scritto|runtime do certificado|χρόνος εκτέλεσης χειρογράφων|||
|
||||
Call Log Display|Motrar el registro de llamadas|Affichage De Notation D'Appel|Anruf-Maschinenbordbuch-Anzeige|Esposizione Del Ceppo Di Chiamata|Exposição Do Registro Da Chamada|Επίδειξη κούτσουρων κλήσης|||
|
||||
is not valid|No es válido|est inadmissible|ist unzulässig|è non valido|é inválido|δεν ισχύει|||
|
||||
or protocol|o protocolo|ou protocole|oder Protokoll|o protocollo|ou protocolo|ή πρωτόκολλο|||
|
||||
Conf Extension Check|Comprobar la Extensión de Conf|Contrôle De Prolongation De Conf|Conf Verlängerung Überprüfung|Controllo Di Estensione Di Conf|Verificação Da Extensão De Conf|Έλεγχος επέκτασης διασκέψεων|||
|
||||
has been registered to|Ha sido registrado para|a été enregistré à|ist zu registriert worden|è stato registrato a|foi registado a|έχει καταχωρηθεί|||
|
||||
LIVE INBOUND CALL|LLAMADA DE ENTRADA ACTIVA|APPEL D'ARRIVÉE DE PHASE|INBOUND LEBHAFTANRUF|CHIAMATA INBOUND IN TENSIONE|CHAMADA INBOUND VIVA|ΖΗΣΤΕ ΕΙΣΕΡΧΟΜΕΝΗ ΚΛΗΣΗ|||
|
||||
Number Dialed|Número Marcado|Numéro Composé|Nummer Gewählt|Il Numero Ha composto|O Número Marcou|Αριθμός που σχηματίζεται|||
|
||||
SEND TO MY VOICEMAIL|ENVIAR A MI BUZÓN DE VOZ|ENVOYEZ À MON VOICEMAIL|SENDEN SIE ZU MEINEM VOICEMAIL|TRASMETTA AL MIO VOICEMAIL|EMITA A MEU VOICEMAIL|ΣΤΕΙΛΕΤΕ ΣΤΟ ΦΩΝΗΤΙΚΟ ΤΑΧΥΔΡΟΜΕΊΟ ΜΟΥ|||
|
||||
Live Extension Check|Comprobar Extensión Activa|Contrôle De phase De Prolongation|Phasenverlängerung Überprüfung|Controllo In tensione Di Estensione|Verificação Viva Da Extensão|Ζήστε έλεγχος επέκτασης|||
|
||||
Manager Send|Enviar al Manager|Le Directeur Envoient|Manager Senden|Il Responsabile Trasmette|O Gerente Emite|Ο διευθυντής στέλνει|||
|
||||
command not inserted|comando no insertado|commande non insérée|Befehl nicht eingesetzt|ordine non inserito|comando não introduzido|που δεν παρεμβάλλεται εντολή|||
|
||||
command sent for|comando enviado a|commande envoyée pour|Befehl gesendet für|ordine trasmesso per|comando emitido para|εντολή που στέλνεται για|||
|
||||
One of these variables|Una de estas variables|Une de ces variables|Eine dieser Variablen|Una di queste variabili|Uma destas variáveis|Μια από αυτές τις μεταβλητές|||
|
||||
must be greater than 2 characters|debe ser mayor de 2 caracteres|doivent être les 2 caractères plus grands que|muß als 2 Buchstaben grösser sein|deve essere più grande di 2 caratteri|deve ser mais grande de 2 caráteres|πρέπει να είστε μεγαλύτερος από 2 χαρακτήρες|||
|
||||
must be greater than 14 characters|debe ser mayor de 14 caracteres|doivent être les 14 caractères plus grands que|muß als 14 Buchstaben grösser sein|deve essere più grande di 14 caratteri|deve ser mais grande de 14 caráteres|πρέπει να είστε μεγαλύτερος από 14 χαρακτήρες|||
|
||||
must be set|debe ser fijado|doit être placé|muß eingestellt werden|deve essere regolato|deve ser ajustado|πρέπει να τεθείτε|||
|
||||
not sent|no enviado|non envoyé|nicht gesendet|non trasmesso|não emitido|μην σταλμένος|||
|
||||
Cannot find empty conference|No puede encontrar conferencia vacía|Ne peut pas trouver la conférence vide|Kann nicht leere Konferenz finden|Non può trovare il congresso vuoto|Não pode encontrar a conferência vazia|Μην μπορέστε να βρείτε την κενή διάσκεψη|||
|
||||
is not live|no está activo|n'est pas de phase|ist nicht Phasen|non è in tensione|não está vivo|δεν είναι ζωντανός|||
|
||||
RECORDING WILL LAST UP TO 60 MINUTES|LA GRABACIÓN DURARÁ HASTA 60 MINUTOS|L'ENREGISTREMENT DURERA JUSQU'À 60 MINUTES|AUFNAHME DAUERT BIS 60 MINUTEN|LA REGISTRAZIONE DURERÀ FINO A 60 MINUTI|A GRAVAÇÃO DURARÁ ATÉ 60 MINUTOS|Η ΚΑΤΑΓΡΑΦΗ ΘΑ ΔΙΑΡΚΕΣΕΙ ΜΕΧΡΙ 60 ΛΕΠΤΑ|||
|
||||
Parked Calls Display|Mostrar Llamadas Aparcadas|Affichage Garé D'Appels|Geparkte Anruf-Anzeige|Esposizione Parcheggiata Di Chiamate|Exposição Estacionada Das Chamadas|Σταθμευμένη επίδειξη κλήσεων|||
|
||||
Database Query Script|Database Query Script|Manuscrit De Question De Base de données|Datenbank-Frage Index|Scritto Di Domanda Della Base di dati|Certificado Da Pergunta Da Base de dados|Χειρόγραφο ερώτησης βάσεων δεδομένων|||
|
||||
Group Choice|Opción Del Grupo|Choix De Groupe|Gruppe Wahl|Scelta Del Gruppo|Escolha Do Grupo|Επιλογή ομάδας|||
|
||||
has been registered to user|se ha registrado al usuario|a été enregistré à l'utilisateur|ist zum Benutzer registriert worden|è stato registrato all'utente|foi registado ao usuário|έχει καταχωρηθεί στο χρήστη|||
|
||||
HOPPER EMPTY|TOLVA VACÍA|DISTRIBUTEUR VIDE|ZUFUHRBEHÄLTER LEER|TRAMOGGIA VUOTA|FUNIL VAZIO|ΧΟΑΝΗ ΚΕΝΗ|||
|
||||
LOG NOT ENTERED|REGISTRO NO ENTRADO|NOTATION NON ENTRÉE|MASCHINENBORDBUCH NICHT BETRETEN|CEPPO NON INSERITO|REGISTRO NÃO ENTRADO|ΠΟΥ ΔΕΝ ΕΙΣΑΓΕΤΑΙ ΚΟΥΤΣΟΥΡΟ|||
|
||||
has been changed to|se ha cambiado a|a été changé en|ist zu geändert worden|è stato cambiato a|foi mudado a|έχει αλλαχτεί|||
|
||||
information has been updated|La información ha sido actualizada|l'information a été mise à jour|Informationen sind aktualisiert worden|le informazioni sono state aggiornate|a informação foi atualizada|οι πληροφορίες έχουν ενημερωθεί|||
|
||||
is now in status|ahora está en estado|est maintenant dans le statut|ist jetzt im Status|è ora nella condizione|está agora no status|είναι τώρα στη θέση|||
|
||||
Voicemail Check|Comprobar el buzón de voz|Contrôle De Voicemail|Voicemail Überprüfung|Controllo Di Voicemail|Verificação De Voicemail|Έλεγχος φωνητικού ταχυδρομείου|||
|
||||
voicemail box|caja del buzón de voz|boîte de voicemail|voicemail Kasten|scatola del voicemail|caixa do voicemail|κιβώτιο φωνητικού ταχυδρομείου|||
|
||||
Re-Login|Conexión Otra Vez|Re-Ouverture|Re-LOGON|Re-Inizio attività|Re-Início de uma sessão|Επαν-σύνδεση|||
|
||||
User Password|Contraseña Del Usuario|Mot de passe D'Utilisateur|Benutzer-Kennwort|Parola d'accesso Dell'Utente|Senha Do Usuário|Κωδικός πρόσβασης χρηστών|||
|
||||
User Login|Conexión Del Usuario|Ouverture D'Utilisateur|Benutzer-LOGON|Inizio attività Dell'Utente|Início de uma sessão Do Usuário|Σύνδεση χρηστών|||
|
||||
Phone Login|Conexión Del Teléfono|Ouverture De Téléphone|Telefon-LOGON|Inizio attività Del Telefono|Início de uma sessão Do Telefone|Τηλεφωνική σύνδεση|||
|
||||
Phone Password|Contraseña Del Teléfono|Mot de passe De Téléphone|Telefon-Kennwort|Parola d'accesso Del Telefono|Senha Do Telefone|Τηλεφωνικός κωδικός πρόσβασης|||
|
||||
VALUE=SUBMIT|VALUE=SUBMIT|VALUE=SUBMIT|VALUE=SUBMIT|VALUE=SUBMIT|VALUE=SUBMIT|VALUE=SUBMIT|||
|
||||
Campaign not active, please try again|La campaña no está activa, intentelo otra vez, por favor|La campagne non active, essayent svp encore|Die aktive Kampagne nicht, versuchen bitte noch einmal|La campagna non attiva, prova prego ancora|A campanha nao ativa, tenta por favor outra vez|Η εκστρατεία μη ενεργός, παρακαλώ προσπαθεί πάλι|||
|
||||
Login incorrect, please try again|La conexión incorrecta, intentelo otra vez, por favor|L'ouverture incorrecte, essayent svp encore|Der falsche LOGON, versuchen bitte noch einmal|L'inizio attività errato, prova prego ancora|O início de uma sessão incorreto, tenta por favor outra vez|Η σύνδεση ανακριβής, παρακαλώ προσπαθεί πάλι|||
|
||||
Campaign Login|Conexión en la Campaña|Ouverture De Campagne|Kampagne LOGON|Inizio attività Di Campagna|Início de uma sessão Da Campanha|Σύνδεση εκστρατείας|||
|
||||
Sorry, your phone login and password are not active in this system, please try again|Disculpe, la conexión del teléfono y contraseña no están activos en este sistema, intentelo otra vez por favor|Désolé, votre ouverture de téléphone et mot de passe ne soyez pas|Traurig, Ihr Telefon-LOGON und Kennwort seien Sie nicht in diesem|Spiacente, il vostri inizio attività del telefono e parola d'accesso|Pesaroso, seus início de uma sessão do telefone e senha não seja|Θλιβερός, η τηλεφωνική σύνδεση και ο κωδικός πρόσβασής σας δεν είναι ενεργός σε αυτό το σύστημα, παρακαλώ προσπαθήστε πάλι|||
|
||||
leads left to call in hopper|Leads a la izquierda para llamar en Hopper|mène à gauche à appeler dans le distributeur|führt nach links, um im Zufuhrbehälter zu benennen|conduce a sinistra per denominare in tramoggia|conduz à esquerda para chamar-se no funil|μόλυβδοι που αφήνονται για να καλέσουν μέσα τη χοάνη|||
|
||||
CAMPAIGN CUSTOM PARKING|PARKING PERSONALIZADO DE LA CAMPAÑA|STATIONNEMENT FAIT SUR COMMANDE DE CAMPAGNE|KAMPAGNE KUNDENSPEZIFISCHES PARKEN|PARCHEGGIO SU ORDINAZIONE DI CAMPAGNA|ESTACIONAMENTO FEITO SOB ENCOMENDA DA CAMPANHA|ΧΩΡΟΣ ΣΤΑΘΜΕΥΣΗΣ ΣΥΝΗΘΕΙΑΣ ΕΚΣΤΡΑΤΕΙΑΣ|||
|
||||
CAMPAIGN DEFAULT PARKING|PARKING POR DEFECTO DE LA CAMPAñA|STATIONNEMENT DE DÉFAUT DE CAMPAGNE|KAMPAGNE RÜCKSTELLUNG PARKEN|PARCHEGGIO DI DIFETTO DI CAMPAGNA|ESTACIONAMENTO DO DEFEITO DA CAMPANHA|ΧΩΡΟΣ ΣΤΑΘΜΕΥΣΗΣ ΠΡΟΕΠΙΛΟΓΗΣ ΕΚΣΤΡΑΤΕΙΑΣ|||
|
||||
CAMPAIGN CUSTOM WEB FORM|FORMULARIO WEB PERSONALIZADO DE LA CAMPAÑA|FORME FAITE SUR COMMANDE DE WEB DE CAMPAGNE|KAMPAGNE KUNDENSPEZIFISCHE NETZ-FORM|FORMA SU ORDINAZIONE DI FOTORICETTORE DI CAMPAGNA|FORMULÁRIO FEITO SOB ENCOMENDA DA CORREIA FOTORRECEPTORA DA CAMPANHA|ΜΟΡΦΗ ΙΣΤΟΥ ΣΥΝΗΘΕΙΑΣ ΕΚΣΤΡΑΤΕΙΑΣ|||
|
||||
CAMPAIGN DEFAULT WEB FORM|FORMULARIO WEB POR DEFECTO DE LA CAMPAÑA|FORME DE WEB DE DÉFAUT DE CAMPAGNE|KAMPAGNE RÜCKSTELLUNG NETZ-FORM|FORMA DI FOTORICETTORE DI DIFETTO DI CAMPAGNA|FORMULÁRIO DA CORREIA FOTORRECEPTORA DO DEFEITO DA CAMPANHA|ΜΟΡΦΗ ΙΣΤΟΥ ΠΡΟΕΠΙΛΟΓΗΣ ΕΚΣΤΡΑΤΕΙΑΣ|||
|
||||
CAMPAIGN ALLOWS CLOSERS|LA CAMPAÑA PERMITE CLOSERS|LA CAMPAGNE PERMET CLOSERS|KAMPAGNE ERLAUBT CLOSERS|LA CAMPAGNA PERMETTE CLOSERS|A CAMPANHA PERMITE CLOSERS|Η ΕΚΣΤΡΑΤΕΙΑ ΕΠΙΤΡΕΠΕΙ ΠΙΟ ΚΟΝΤΑ|||
|
||||
CAMPAIGN ALLOWS NO CLOSERS|LA CAMPAÑA NO PERMITE CLOSERS|LA CAMPAGNE NE PERMET AUCUN CLOSERS|KAMPAGNE ERLAUBT KEIN CLOSERS|LA CAMPAGNA NON PERMETTE CLOSERS|A CAMPANHA NÃO PERMITE NENHUM CLOSERS|Η ΕΚΣΤΡΑΤΕΙΑ ΔΕΝ ΕΠΙΤΡΕΠΕΙ ΚΑΝΕΝΑ ΠΙΟ ΚΟΝΤΑ|||
|
||||
USING PREVIOUS MEETME ROOM|USAR EL SITIO ANTERIOR DE MEETME|EMPLOYER LA PIÈCE PRÉCÉDENTE DE MEETME|VERWENDEN DES VORHERGEHENDEN MEETME RAUMES|USANDO LA STANZA PRECEDENTE DI MEETME|USANDO O QUARTO PRECEDENTE DE MEETME|ΧΡΗΣΙΜΟΠΟΙΗΣΗ ΤΟΥ ΠΡΟΗΓΟΥΜΕΝΟΥ ΔΩΜΑΤΊΟΥ MEETME|||
|
||||
USING NEW MEETME ROOM|USAR EL NUEVO SITIO DE MEETME|EMPLOYER LA NOUVELLE PIÈCE DE MEETME|VERWENDEN DES NEUEN MEETME RAUMES|USANDO LA NUOVA STANZA DI MEETME|USANDO O QUARTO NOVO DE MEETME|ΧΡΗΣΙΜΟΠΟΙΗΣΗ ΤΟΥ ΝΕΟΥ ΔΩΜΑΤΊΟΥ MEETME|||
|
||||
old QUEUE and INCALL reverted list|vieja COLA y lista invertida INCALL|vieille FILE D'ATTENTE et liste retournée par INCALL|alte WARTESCHLANGE und INCALL umgeschaltete Liste|vecchia CODA e lista ritornata INCALL|FILA velha e lista reverted INCALL|παλαιά ΣΕΙΡΑ ΑΝΑΜΟΝΉΣ και επανερχόμενος INCALL κατάλογος|||
|
||||
old QUEUE and INCALL reverted hopper|vieja COLA y tolva invertida INCALL|vieille FILE D'ATTENTE et distributeur retourné par INCALL|alte WARTESCHLANGE und INCALL umgeschalteter Zufuhrbehälter|vecchia CODA e tramoggia ritornata INCALL|FILA velha e funil reverted INCALL|παλαιά ΣΕΙΡΑ ΑΝΑΜΟΝΉΣ και επανερχόμενη INCALL χοάνη|||
|
||||
old vicidial_live_agents records cleared|viejos expedientes de los vicidial_live_agents despejados|vieux disques de vicidial_live_agents dégagés|alte vicidial_live_agents Aufzeichnungen löschten|vecchie annotazioni dei vicidial_live_agents eliminate|os registros velhos dos vicidial_live_agents cancelaram|παλαιά αρχεία vicidial_live_agents που καθαρίζονται|||
|
||||
campaign is set to auto_dial_level|la campaña se fija al auto_dial_level|la campagne est placée à l'auto_dial_level|Kampagne wird auf auto_dial_level eingestellt|la campagna è regolata a auto_dial_level|a campanha é ajustada ao auto_dial_level|η εκστρατεία τίθεται auto_dial_level|||
|
||||
new vicidial_live_agents record inserted|Insertadas las grabaciones nueva de los vicidial_live_agents|nouveau disque de vicidial_live_agents inséré|neue vicidial_live_agents Aufzeichnung eingesetzt|la nuova annotazione dei vicidial_live_agents ha inserito|o registro novo dos vicidial_live_agents introduziu|νέο αρχείο vicidial_live_agents που παρεμβάλλεται|||
|
||||
campaign is set to manual dial|la campaña está configurada con marcaje manual|la campagne est placée au cadran manuel|Kampagne wird auf manuellen Vorwahlknopf eingestellt|la campagna è regolata alla manopola manuale|a campanha é ajustada ao seletor manual|η εκστρατεία τίθεται το χειρωνακτικό πίνακα|||
|
||||
Sorry, there are no leads in the hopper for this campaign|Lo siento, no hay leads en el hopper de esta campaña|Désolé, il n'y a aucun fil dans le distributeur pour cette campagne|Traurig, gibt es keine Leitungen im Zufuhrbehälter für diese|Spiacenti, non ci sono cavi nella tramoggia per questa campagna|Pesaroso, não há nenhuma ligação no funil para esta campanha|Θλιβερός, δεν υπάρχει κανένας μόλυβδος στη χοάνη για αυτήν την εκστρατεία|||
|
||||
Dial Next Number|Marcar el Siguiente Número|Prochain Nombre De Cadran|Vorwahlknopf-Folgende Zahl|Numero Seguente Della Manopola|Número Seguinte Do Seletor|Επόμενος αριθμός πινάκων|||
|
||||
LIVE CALLS IN YOUR SESSION|LLAMADAS ACTIVAS EN SU SESIÓN|VIVENT LES APPELS EN VOTRE SESSION|LEBEN ANRUFE IN IHREM LERNABSCHNITT|VIVONO LE CHIAMATE NELLA VOSTRA SESSIONE|VIVEM AS CHAMADAS EM SUA SESSÃO|ΖΗΣΤΕ ΚΛΗΣΕΙΣ ΣΤΗ ΣΥΝΟΔΟ ΣΑΣ|||
|
||||
Stop Recording|Parar La Grabación|Cessez L'Enregistrement|Stoppen Sie Zu notieren|Smetta Di registrare|Pare de Gravar|Καταγραφή στάσεων|||
|
||||
Start Recording|Comenzar La Grabación|Commencez À enregistrer|Fangen Sie an Zu notieren|Inizi A registrare|Comece Gravar|Καταγραφή έναρξης|||
|
||||
Transfer number must have more than 1 digit|El número de la transferencia debe tener más de 1 dígito|Le nombre de transfert doit avoir plus de 1 chiffre|Übergangszahl muß mehr als 1 Stelle haben|Il numero di trasferimento deve avere più di 1 cifra|O número de transferência deve ter mais de 1 dígito|Ο αριθμός μεταφοράς πρέπει να έχει περισσότερο από 1 ψηφίο|||
|
||||
Grab Parked Call|Capturar llamada en Parking|Appel Garé Par Encavateur|Zupacken Geparkter Anruf|Chiamata Parcheggiata Gru a benna|Chamada Estacionada Garra|Η αρπαγή στάθμευσε την κλήση|||
|
||||
Park Call|Aparcar llamada|Appel De Parc|Park-Anruf|Chiamata Del Parco|Chamada Do Parque|Κλήση πάρκων|||
|
||||
Waiting for Ring|Espeerar al Ring|Anneau d'attente|Wartering|Anello attendente|Anel de espera|Αναμονή το δαχτυλίδι|||
|
||||
Called 3rd party|Terceros llamados|Tiers appelé|Angerufene 3. Partei|Terzi denominati|Ó partido chamado|Αποκαλούμενο 3$ο συμβαλλόμενο μέρος|||
|
||||
LEAVE 3-WAY CALL|ABANDONAR LLAMADA 3-WAY|APPEL DU CONGÉ 3-WAY|ANRUF DES URLAUB-3-WAY|CHIAMATA DI PERMESSO 3-WAY|CHAMADA DA LICENÇA 3-WAY|3-ΤΡΟΠΟΣ ΚΛΗΣΗ ΑΔΕΙΑΣ|||
|
||||
Dial With Customer|Marcar Con El Cliente|Cadran Avec Le Client|Vorwahlknopf Mit Kunden|Manopola Con Il Cliente|Seletor Com Cliente|Πίνακας με τον πελάτη|||
|
||||
Park Customer Dial|Dial Del Cliente Del Parque|Cadran De Client De Parc|Park-Kunde Vorwahlknopf|Manopola Del Cliente Del Parco|Seletor Do Cliente Do Parque|Πίνακας πελατών πάρκων|||
|
||||
Hangup Xfer Line|Colgar Línea Xfer |Ligne De Xfer De Décrochement|Hängezustand Xfer Linie|Linea Di Xfer Di Hangup|Linha De Xfer Do Hangup|Γραμμή Xfer Hangup|||
|
||||
Hangup Both Lines|Colgar Ambas Líneas|Décrochement Les deux Lignes|Hängezustand Beide Linien|Hangup Entrambe le Linee|Hangup Ambas as Linhas|Hangup και οι δύο γραμμές|||
|
||||
Hangup Customer|Colgar al Cliente|Client De Décrochement|Hängezustand-Kunde|Cliente Di Hangup|Cliente Do Hangup|Πελάτης Hangup|||
|
||||
Transfer - Conference|Transferencia - Conferencia|Transfert - Conférence|Übertragung - Konferenz|Trasferimento - Congresso|Transferência - Conferência|Μεταφορά - διάσκεψη|||
|
||||
LOCAL CLOSER|CLOSER LOCAL|GENS DU PAYS PLUS ÉTROITS|EINHEIMISCHER GENAUER|LOCAL PIÙ VICINO|LOCAL MAIS PRÓXIMO|ΤΟΠΙΚΟΣ ΠΙΟ ΣΤΕΝΌΣ|||
|
||||
INTERNAL CLOSER|CLOSER INTERNO|PLUS ÉTROIT INTERNE|INTERNES GENAUERES|PIÙ VICINO INTERNO|MAIS PRÓXIMO INTERNO|ΕΣΩΤΕΡΙΚΟΣ ΠΙΟ ΣΤΕΝΌΣ|||
|
||||
Dial Blind Transfer|Marcar Blind Transfer|Transfert D'Aveugle De Cadran|Vorwahlknopf-Vorhang-Übertragung|Trasferimento Dei Ciechi Della Manopola|Transferência Da Cortina Do Seletor|Τυφλή μεταφορά πινάκων|||
|
||||
Dial timed out, contact your system administrator|Tiempo de espera superado, pongase en contacto con su administrador de sistema|Le cadran chronométré dehors, contactent votre interface|Zeit Vorwahlknopf, der heraus festgesetzt wird, treten mit Ihrem|La manopola cronometrata fuori, si mette in contatto con il vostro|O seletor cronometrado para fora, contata seu administrador de|Ο πίνακας χρονομετρημένος έξω, έρχεται σε επαφή με το διοικητή συστημάτων σας|||
|
||||
No more leads in the hopper for campaign|No más Leads en el hopper de la campaña|Pas plus ne mène dans le distributeur pour la campagne|Kein mehr führt im Zufuhrbehälter für Kampagne|Nient'altro conduce nella tramoggia per la campagna|Não mais conduz no funil para a campanha|Όχι άλλοι μόλυβδοι στη χοάνη για την εκστρατεία|||
|
||||
Web Form|Formulario Web|Forme de Web|Netz-Form|Forma Di Fotoricettore|Formulário Da Correia fotorreceptora|Μορφή Ιστού|||
|
||||
You Must Select a Disposition|Usted debe seleccionar una disposición|Vous devez choisir une disposition|Sie müssen eine Einteilung vorwählen|Dovete selezionare una disposizione|Você deve selecionar uma disposição|Πρέπει να επιλέξετε μια διάθεση|||
|
||||
GROUPS NOT SELECTED|GRUPOS NO SELECCIONADOS|GROUPES NON CHOISIS|GRUPPEN NICHT VORGEWÄHLT|GRUPPI NON SELEZIONATI|GRUPOS NÃO SELECIONADOS|ΠΟΥ ΔΕΝ ΕΠΙΛΕΓΟΝΤΑΙ ΟΜΑΔΕΣ|||
|
||||
SELECTED GROUPS|GRUPOS SELECCIONADOS|GROUPES CHOISIS|VORGEWÄHLTE GRUPPEN|GRUPPI SELEZIONATI|GRUPOS SELECIONADOS|ΕΠΙΛΕΓΜΕΝΕΣ ΟΜΑΔΕΣ|||
|
||||
You cannot log out during a Dial attempt|Usted no puede salir durante un intento de marcado|Vous ne pouvez pas vous déconnecter pendant une tentative de|Sie können nicht heraus während eines Vorwahlknopfversuchs loggen|Non potete annotare fuori durante il tentativo della manopola|Você não pode registrar para fora durante uma tentativa do seletor|Δεν μπορείτε αποσύνδεση κατά τη διάρκεια μιας προσπάθειας πινάκων|||
|
||||
Wait 50 seconds for the dial to fail out if it is not answered|Esperar 50 segundos para que el marcado falle si no es respondido|Attendez 50 secondes le cadran pour échouer dehors si on ne lui|Warten Sie, daß 50 Sekunden auf den Vorwahlknopf heraus ausfallen,|Aspetti 50 secondi la manopola per venire a mancare fuori se non è|Espere 50 segundos pelo seletor para falhar para fora se não se|Περιμένετε 50 δευτερόλεπτα τον πίνακα για να αποτύχετε έξω εάν δεν απαντιέται|||
|
||||
STILL A LIVE CALL! Hang it up then you can log out|TODAVÍA UNA LLAMADA ACTIVA! Colgar y luego salir|Un APPEL TOUJOURS DE PHASE ! Accrochez-le vers le haut alors que vous|NOCH Ein PHASENANRUF! Hängen Sie ihn, oben dann, das Sie heraus|ANCORA Una CHIAMATA IN TENSIONE! Appendala in su allora che potete|AINDA Uma CHAMADA VIVA! Pendure-a acima então que você pode|ΑΚΟΜΑ μια ΖΩΝΤΑΝΗ ΚΛΗΣΗ! Το κρεμάστε επάνω έπειτα εσείς μπορεί αποσύνδεση|||
|
||||
Hide conference call channel information|Ocultar la información del canal Conferencia|L'information de canal de conférence téléphonique de peau|Fellkonferenzanruf-Führung Informationen|Le informazioni della scanalatura di chiamata di congresso del|Informação da canaleta da chamada de conferência do hide|Πληροφορίες καναλιών κλήσης διασκέψεων δορών|||
|
||||
Show conference call channel information|Mostrar la información del canal Conferencia|Montrez l'information de canal de conférence téléphonique|Zeigen Sie Konferenzanruf-Führung Informationen|Mostri le informazioni della scanalatura di chiamata di congresso|Mostre a informação da canaleta da chamada de conferência|Παρουσιάστε πληροφορίες καναλιών κλήσης διασκέψεων|||
|
||||
Logged in as User|Usuario|Utilisateur|Benutzer|Utente|Usuário|Χρήστης |||
|
||||
Noone is in your session|Nadie está en su sesión|Aucun n'est en votre session|Noone ist in Ihrem Lernabschnitt|Nessuno è nella vostra sessione|Noone está em sua sessão|Κανένας δεν είναι στη σύνοδό σας|||
|
||||
Customer has hung up|El cliente ha colgado|Le client a raccroché|Kunde hat oben gehangen|Il cliente ha appeso in su|O cliente pendurou acima|Ο πελάτης έχει κλείσει το τηλέφωνο|||
|
||||
End-of-call Disposition Selection|selección de la disposición del End-of-call|Extrémité-de-appelez Le Choix De Disposition|Ende-von-benennen Sie Einteilung Vorwähler|Estremità-de-denomini La Selezione Di Disposizione|Extremidade-$$$-CHAME A Seleção Da Disposição|Επιλογή διάθεσης τέλος-$$$-ΚΛΉΣΗΣ|||
|
||||
CLOSER INBOUND GROUP SELECTION|SELECCIÓN DEL GRUPO DE ENTRANTES CLOSER|UN CHOIX DE GROUPE D'ARRIVÉE PLUS ÉTROIT|GENAUERE INBOUND GRUPPENWAHL|SELEZIONE DI GRUPPO INBOUND PIÙ VICINA|SELEÇÃO DE GRUPO INBOUND MAIS PRÓXIMA|ΠΙΟ ΣΤΕΝΉ ΕΙΣΕΡΧΟΜΕΝΗ ΕΠΙΛΟΓΗ ΟΜΑΔΑΣ|||
|
||||
Closer Inbound Group Selection|SELECCIÓN DEL GRUPO DE ENTRANTES CLOSER|Un Choix De Groupe D'arrivée Plus étroit|Genauere Inbound Gruppenwahl|Selezione Di Gruppo Inbound Più vicina|Seleção De Grupo Inbound Mais próxima|Πιό στενή εισερχόμενη επιλογή ομάδας|||
|
||||
BLENDED CALLING|BLENDED CALLING|APPELER MÉLANGÉ|GEMISCHTES BENENNEN|CHIAMATA MESCOLATA|CHAMADA MISTURADA|ΣΥΝΔΥΑΣΜΕΝΗ ΚΛΗΣΗ|||
|
||||
outbound activated|Salientes activdas|en partance activé|outbound aktiviert|outbound attivato|outbound ativado|εξερχόμενος που ενεργοποιείται|||
|
||||
Preview the Lead then|Mostrar el Lead entonces|Visionnez le fil alors|Sehen Sie die Leitung dann vorher|Allora veda in anteprima il cavo|Inspecione a ligação então|Πρόβλεψη ο μόλυβδος έπειτα|||
|
||||
Lead was not reverted, there was an error|El Lead no fue invertido, hubo un error|Le fil n'a pas été retourné, il n'y avait pas une erreur|Leitung wurde nicht umgeschaltet, es gab eine Störung|Il cavo non è stato ritornato, ci non era un errore|A ligação não reverted, não havia um erro|Ο μόλυβδος δεν επανήλθε, υπήρξε ένα λάθος|||
|
||||
call was not placed, there was an error|la llamada no fue atendida, hubo un error|l'appel n'a pas été placé, il n'y avait pas une erreur|Anruf wurde nicht gesetzt, es gab eine Störung|la chiamata non è stata disposta, ci non era un errore|a chamada não foi colocada, não havia um erro|η κλήση δεν τοποθετήθηκε, υπήρξε ένα λάθος|||
|
||||
Number to call|Número a llamar|Nombre à appeler|Zahl zum zu benennen|Numero da denominare|Número a chamar-se|Αριθμός που καλεί|||
|
||||
Customer Information|Información Del Cliente|L'Information De Client|Kunde Informationen|Le Informazioni Del Cliente|Informação Do Cliente|Πληροφορίες πελατών|||
|
||||
Lead Dispositioned As|Lead Dispositioned Como|Fil Dispositioned As|Leitung Dispositioned Wie|Cavo Dispositioned As|Ligação Dispositioned Como|Μόλυβδος Dispositioned όπως|||
|
||||
When active, simply press the keyboard key for the desired disposition for this call. The call will then be hungup and dispositioned automatically|Cuando esté activo, presione simplemente la tecla para la disposición deseada para esta llamada. La llamada después será colgada y dispositioned automáticamente|Si actif, appuyez sur simplement la touche de clavier pour la|Wenn aktiv, betätigen Sie einfach die Taste für die gewünschte|Una volta attivo, premi semplicemente la chiave di tastiera per la|Quando ativo, pressione simplesmente a chave de teclado para a|Όταν ενεργός, πιέστε απλά το πλήκτρο πληκτρολογίων για την επιθυμητή διάθεση για αυτήν την κλήση. Η κλήση θα είναι έπειτα hungup και αυτόματα|||
|
||||
Disposition Hot Keys|Teclas de acceso rápido a la Disposición|Touches Directes De Disposition|Einteilung Heiße Schlüssel|Chiavi Calde Di Disposizione|Chaves Quentes Da Disposição|Καυτά κλειδιά διάθεσης|||
|
||||
Cust Time|Tiempo|Temps De Cust|Cust Zeit|Tempo Di Cust|Tempo De Cust|Χρόνος Cust|||
|
||||
RECORD ID|GRABACIÓN ID|IDENTIFICATION RECORD|SATZ IDENTIFIKATION|IDENTIFICAZIONE RECORD|ID RECORD|ΑΡΧΕΙΟ ΤΑΥΤΌΤΗΤΑ|||
|
||||
RECORDING FILE|GRABANDO ARCHIVO|DOSSIER D'ENREGISTREMENT|REGISTERAKTE|LIMA DI REGISTRAZIONE|LIMA DE GRAVAÇÃO|ΑΡΧΕΙΟ ΚΑΤΑΓΡΑΦΗΣ|||
|
||||
HOT KEYS ACTIVE|TECLAS ACCESO RÁPIDO ACTIVAS|TOUCHES DIRECTES ACTIVES|HEISSE SCHLÜSSEL AKTIV|CHIAVI CALDE ATTIVE|CHAVES QUENTES ATIVAS|ΚΑΥΤΑ ΚΛΕΙΔΙΑ ΕΝΕΡΓΑ|||
|
||||
HOT KEYS INACTIVE|TECLAS ACCESO RÁPIDO INACTIVAS|TOUCHES DIRECTES INACTIVES|HEISSE SCHLÜSSEL UNAKTIVIERT|CHIAVI CALDE INATTIVE|CHAVES QUENTES INATIVAS|ΚΑΥΤΑ ΚΛΕΙΔΙΑ ΑΝΕΝΕΡΓΑ|||
|
||||
DIAL OVERRIDE|INVALIDACIÓN DEL MARCADO|DÉPASSEMENT DE CADRAN|VORWAHLKNOPF-ÜBERSTEUERUNG|SOVRAPPOSIZIONE DI UN COMANDO MANUALE DELLA MANOPOLA|ULTRAPASSAGEM DO SELETOR|ΣΥΜΠΛΗΡΩΜΑΤΙΚΗ ΠΡΟΜΉΘΕΙΑ ΠΙΝΑΚΩΝ|||
|
||||
SKIP LEAD|SALTAR LEAD|FIL DE SAUT|ZEILENSPRUNG-LEITUNG|CAVO DI SALTO|LIGAÇÃO DA FAIXA CLARA|ΜΟΛΥΒΔΟΣ ΕΚΣΚΑΦΕΩΝ|||
|
||||
DIAL LEAD|MARCAR LEAD|FIL DE CADRAN|VORWAHLKNOPF-LEITUNG|CAVO DELLA MANOPOLA|LIGAÇÃO DO SELETOR|ΜΟΛΥΒΔΟΣ ΠΙΝΑΚΩΝ|||
|
||||
LEAD PREVIEW|MOSTRAR LEAD|PRÉVISION DE FIL|LEITUNG VORBETRACHTUNG|PREVISIONE DEL CAVO|INSPECÇÃO PRÉVIA DA LIGAÇÃO|ΠΡΟΒΛΕΨΗ ΜΟΛΥΒΔΟΥ|||
|
||||
STOP CALLING|PARAR LA LLAMADA|CESSEZ D'APPELER|STOPPEN SIE ZU BENENNEN|SMETTA DI DENOMINARE|PARE DE CHAMAR-SE|ΚΛΗΣΗ ΣΤΑΣΕΩΝ|||
|
||||
DISPOSITION CALL|DISPOSITION CALL|APPEL DE DISPOSITION|EINTEILUNG ANRUF|CHIAMATA DI DISPOSIZIONE|CHAMADA DA DISPOSIÇÃO|ΚΛΗΣΗ ΔΙΑΘΕΣΗΣ|||
|
||||
session ID| sesión ID| ID de session| Lernabschnitt ID| ID di sessione| sessão ID| Ταυτότητα συνόδου|||
|
||||
to campaign| a la campaña| à la campagne| zur Kampagne| alla campagna| à campanha| Στην εκστρατεία|||
|
||||
Title|Título|Titre|Titel|Titolo|Título|Τίτλος|||
|
||||
STATUS|ESTADO|STATUT|STATUS|CONDIZIONE|STATUS|ΘΕΣΗ|||
|
||||
RESET|REINICIAR|REMISE|ZURÜCKSTELLEN|RISISTEMAZIONE|RESTAURAÇÃO|ΑΝΑΣΤΟΙΧΕΙΟΘΕΤΗΣΗ|||
|
||||
TYPE=SUBMIT|TYPE=submit|TYPE=submit|TYPE=submit|TYPE=submit|TYPE=submit|TYPE=submit|||
|
||||
SUBMIT|ENVIAR|SOUMETTEZ|SUBMITSie|PRESENTI|SUBMETA|ΥΠΟΒΑΛΤΕ|||
|
||||
Incoming|Entrante|Entrant|Ankommend|Ricevuto|Entrante|Εισερχόμενος|||
|
||||
Calling|Llamando|Appeler|Benennen|Chiamata|Chamada|Κλήση|||
|
||||
Called|Llamado|Appelé|Benannt|Denominato|Chamado|Αποκαλούμενος|||
|
||||
Campaign|Campaña|Campagne|Kampagne|Campagna|Campanha|Εκστρατεία|||
|
||||
Status|Estado|Statut|Status|Condizione|Status|Θέση|||
|
||||
Inserted|Insertado|Inséré|Eingesetzt|Inserito|Introduzido|Ένθετο |||
|
||||
seconds|segundos|secondes|Sekunden|secondi|segundos|δευτερόλεπτα|||
|
||||
HELP|AYUDA|AIDE|HILFE|AIUTO|AJUDA|ΒΟΗΘΕΙΑ|||
|
||||
Login|Conexión|Ouverture|LOGON|Inizio attività|Início de uma sessão|Σύνδεση|||
|
||||
User|Usuario|Utilisateur|Benutzer|Utente|Usuário|Χρήστης|||
|
||||
Password|Contraseña|Mot de passe|Kennwort|Parola d'accesso|Senha|Κωδικός πρόσβασης|||
|
||||
VERSION|VERSIÓN|VERSION|VERSION|VERSIONE|VERSÃO|ΕΚΔΟΣΗ|||
|
||||
BUILD|CONSTRUCCION|CONSTRUCTION|BAU|CONFIGURAZIONE|CONFIGURAÇÃO|ΧΤΙΣΤΕ|||
|
||||
Server|Servidor|Serveur|Bediener|Assistente|Usuário|Κεντρικός υπολογιστής|||
|
||||
RECORD|GRABACIÓN|DISQUE|SATZ|ANNOTAZIONE|REGISTRO|ΑΡΧΕΙΟ|||
|
||||
HANGUP|COLGAR|DÉCROCHEMENT|HÄNGEZUSTAND|HANGUP|HANGUP|HANGUP|||
|
||||
XFER|TRANSFERENCIA|XFER|XFER|XFER|XFER|XFER|||
|
||||
PARK|PARKING|PARC|PARK|PARCO|PARQUE|ΠΑΡΚΟ|||
|
||||
IN-NUMBER|NÚMERO-ENTRANTE|IN-NUMBER|IN-NUMBER|IN-NUMBER|IN-NUMBER|$$$-ΑΡΙΘΜΟΣ|||
|
||||
NUMBER|NÚMERO|NOMBRE|ZAHL|NUMERO|NÚMERO|ΑΡΙΘΜΟΣ|||
|
||||
MAXLENGTH|maxlength|MAXLENGTH|MAXLENGTH|MAXLENGTH|MAXLENGTH|MAXLENGTH|||
|
||||
LENGTH|LONGITUD|LONGUEUR|LÄNGE|LUNGHEZZA|COMPRIMENTO|ΜΗΚΟΣ|||
|
||||
CALLERID|LLAMADORID|CALLERID|CALLERID|CALLERID|CALLERID|CALLERID|||
|
||||
CallerID|LlamadorID|CallerID|CallerID|CallerID|CallerID|CallerID|||
|
||||
CALL|LLAMADA|APPEL|ANRUF|CHIAMATA|CHAMADA|ΚΛΗΣΗ|||
|
||||
PICKUP|CAPTURAR|COLLECTE|AUFNAHME|RACCOLTA|COLETOR|ΕΠΑΝΑΛΕΙΨΗ|||
|
||||
CONFERENCE|CONFERENCIA|CONFÉRENCE|KONFERENZ|CONGRESSO|CONFERÊNCIA|ΔΙΑΣΚΕΨΗ|||
|
||||
Refresh|Recarga|Régénérez|ErneuernSie|Rinfreschi|Refresque|Αναζωογονήστε|||
|
||||
Send DTMF|Enviar DTMF|Envoyez DTMF|Senden Sie DTMF|Trasmetta DTMF|Emita DTMF|Στείλετε DTMF|||
|
||||
BORDER|Border|Border|Border|Border|Border|Border|||
|
||||
ORDER|ORDEN|ORDRE|AUFTRAG|ORDINE|ORDEM|ΔΙΑΤΑΓΗ|||
|
||||
on | en | sur | auf | su | em | Στην |||
|
||||
LOGOUT|SALIR|DÉCONNEXION|LOGOUT|TERMINE|LOGOUT|ΑΠΟΣΥΝΔΕΣΗ|||
|
||||
Channel|Canal|LaManche|Führung|Manica|Canaleta|Κανάλι|||
|
||||
Extensions|Extensiones|Prolongements|Verlängerungen|Estensioni|Extensões|Επεκτάσεις|||
|
||||
Conferences|Conferencias|Conférences|Konferenzen|Congressi|Conferências|Διασκέψεις|||
|
||||
Conference|Conferencia|Conférence|Konferenz|Congresso|Conferência|Διάσκεψη|||
|
||||
Recording|GRABANDO|Enregistrement|Aufnahme|Registrazione|Gravação|Καταγραφή|||
|
||||
Record|Grabar|Disque|Aufzeichnung|Annotazione|Registro|Αρχείο|||
|
||||
Welcome|Bienvenido|Bienvenue|Willkommen|Benvenuto|Boa vinda|Υποδοχή|||
|
||||
VOICEMAIL|BUZÓN DE VOZ|VOICEMAIL|VOICEMAIL|VOICEMAIL|VOICEMAIL|ΦΩΝΗΤΙΚΟ ΤΑΧΥΔΡΟΜΕΊΟ|||
|
||||
NEW|NUEVO|NOUVEAU|NEU|NUOVO|NOVO|ΝΕΟΣ|||
|
||||
OLD|VIEJO|VIEUX|ALT|VECCHIO|VELHO|ΠΑΛΑΙΟΣ|||
|
||||
PAUSE|PAUSA|PAUSE|PAUSE|PAUSA|PAUSA|ΜΙΚΡΗ ΔΙΑΚΟΠΉ|||
|
||||
START|COMIENZO|DÉBUT|ANFANG|INIZIO|COMEÇO|ΕΝΑΡΞΗ|||
|
||||
Pause|Pausa|Pause|Pause|Pausa|Pausa|Στάση|||
|
||||
Resume|Comienzo|Résumé|Zusammenfassung|Resume|Resumo|Επαναλάβετε|||
|
||||
Faster|Más rápido|Plus rapidement|Schneller|Più velocemente|Mais rapidamente|Γρηγορότερα|||
|
||||
Slower|Más lento|Plus lent|Langsamer|Più lento|Mais lento|Πιό αργός|||
|
||||
Initializing|Inizializando|Initialisation|Initialisierung|Inizializzazione|Inicializar|Μονογραφή|||
|
||||
Invalid|Inválido|Inadmissible|Unzulässig|Non valido|Inválido|Ακυρος|||
|
||||
Username|Nombre del usuario|Username|Username|Username|Username|Όνομα χρήστη|||
|
||||
CUSTOM|A MEDIDA|COUTUME|GEWOHNHEIT|ABITUDINE|COSTUME|ΣΥΝΗΘΕΙΑ|||
|
||||
Notes|Notas|Notes|Anmerkungen|Note|Notas|Σημειώσεις|||
|
||||
First|Primero|D'abord|Zuerst|In primo luogo|Primeiramente|Πρώτα|||
|
||||
MI: |IM: |MI :|MI:|Mi:|Mi:|MI:|||
|
||||
Last|Último|Bout|Letztes|Ultimo|Último|Διαρκέστε|||
|
||||
Address|Dirección|Adresse|Adresse|Indirizzo|Endereço|Διεύθυνση|||
|
||||
City|Ciudad|Ville|Stadt|Città|Cidade|Πόλη|||
|
||||
State|Estado|État|Zustand|Dichiari|Estado|Κράτος|||
|
||||
PostCode|Código Postal|Code postal|PostCode|PostCode|PostCode|PostCode|||
|
||||
Province|Provincia|Province|Provinz|Provincia|Província|Επαρχία|||
|
||||
Vendor ID|Vendedor ID|Identification De Fournisseur|Verkäufer Identifikation|Identificazione Del Fornitore|Vendedor Id|Ταυτότητα προμηθευτών|||
|
||||
DialCode|Código Del Dial|DialCode|DialCode|DialCode|DialCode|DialCode|||
|
||||
Alt. Phone|Teléfono Alt|Alt. Téléphone|Wech Telefon|Alt. Telefono|Alt. Telefone|ΕΝΑ. Τηλέφωνο|||
|
||||
Show|Demostración|Exposition|Erscheinen|Esposizione|Mostra|Παρουσιάστε|||
|
||||
Email|Email|Email|Email|Email|Email|Ηλεκτρονικό ταχυδρομείο|||
|
||||
Comments|Comentarios|Commentaires|Anmerkungen|Osservazioni|Comentários|Σχόλια|||
|
||||
REFRESH|ACTUALIZAR|RÉGÉNÉREZ|ERNEUERNSie|RINFRESCHI|REFRESQUE|ΑΝΑΖΩΟΓΟΝΗΣΤΕ|||
|
||||
ALT PHONE DIAL|TELÉFONO DEL ALT|TÉLÉPHONE D'ALT|WECH TELEFON|ALT DEL TELEFONO|ALT DO TELEFONE|ENA ΤΗΛΕΦΩΝΙΚΟΣ|||
|
||||
MAIN PHONE|TELÉFONO PRINCIPAL|TÉLÉPHONE PRINCIPAL|MAIN TELEFON|TELEFONO PRINCIPALE|TELEFONE PRINCIPAL|ΚΥΡΙΟ ΤΗΛΕΦΩΝΟ|||
|
||||
ALT PHONE|TELÉFONO ALT|TELÉFONO DEL ALT|TÉLÉPHONE D'ALT|WECH TELEFON|ALT DEL TELEFONO|ALT DO TELEFONE|||
|
||||
ADDRESS3|DIRECCIÓN3|ADRESSE3|ADRESSE3|INDIRIZZO3|ENDEREÇO3|ΔΙΕΥΘΥΝΣΗ3|||
|
||||
FINISH LEAD|ACABAR LEAD|FINITION|ENDE|RIVESTIMENTO|REVESTIMENTO|ΤΕΛΕΙΩΣΤΕ|||
|
||||
Dial Alt Phone Number|Marcar Número de teléfono Alt|Nombre Alt De Cadran|Vorwahlknopf-Wech Zahl|Numero Alt Della Manopola|Número Alt Do Seletor|Ενα αριθμός πινάκων|||
|
||||
Phone|Teléfono|Téléphone|Telefon|Telefono|Telefone|Τηλέφωνο|||
|
||||
DIAL|DIAL|CADRAN|VORWAHLKNOPF|MANOPOLA|SELETOR|ΠΙΝΑΚΑΣ|||
|
||||
"JAN"|"ENE"|"JAN"|"JAN"|"GEN"|"JAN"|"ΙΑΝ"|""|""|"
|
||||
"FEB"|"FEB"|"FÉV"|"FEB"|"FEB"|"FEV"|"ΦΕΒ"|""|""|"
|
||||
"MAR"|"MAR"|"MAR"|"MÄR"|"MAR"|"MAR"|"ΜΑΡ"|""|""|"
|
||||
"APR"|"ABR"|"AVR"|"APR"|"APR"|"ABR"|"ΑΠΡ"|""|""|"
|
||||
"MAY"|"PUE"|"PEU"|"MÖG"|"POS"|"POS"|"ΜΆΙ"|""|""|"
|
||||
"JUN"|"JUN"|"JUN"|"JUN"|"GIU"|"JUN"|"ΙΟΝ"|""|""|"
|
||||
"JLY"|"JUL"|"JUL"|"JLY"|"LUG"|"JLY"|"ΙΟΛ"|""|""|"
|
||||
"AUG"|"AGO"|"AOÛ"|"AUG"|"AGO"|"AGO"|"ΑΥΓ"|""|""|"
|
||||
"SEP"|"SEP"|"SEP"|"SEP"|"SET"|"SET"|"ΣΕΠ"|""|""|"
|
||||
"OCT"|"OCT"|"OCT"|"OKT"|"OTT"|"OUT"|"ΟΚΤ"|""|""|"
|
||||
"NOV"|"NOV"|"NOV"|"NOV"|"NOV"|"NOV"|"ΝΟΕ"|""|""|"
|
||||
"DEC"|"DIC"|"DÉC"|"DEZ"|"DIC"|"DEZ"|"ΔΕΚ"|""|""|"
|
||||
\./images/|../agc/images/|../agc/images/|../agc/images/|../agc/images/|../agc/images/|../agc/images/|||
|
||||
@@ -1,709 +0,0 @@
|
||||
# languages_admin.txt - this file is for the internationalization of the astGUIclient ||
|
||||
# admin web pages. The associated config.pl file will take the language as an ||
|
||||
# argument and alter the php scripts to the language typed in the command line:||
|
||||
# example: ./config.pl --language=es||
|
||||
# current languages in the file:||
|
||||
# - English - (en) no alterations||
|
||||
# - Spanish - (es) first column||
|
||||
# - French - (fr) second column||
|
||||
# - German - (de) third column||
|
||||
# - Italian - (it) fourth column||
|
||||
***LANGUAGES***||
|
||||
en-English|es-Español|
|
||||
***FILES***||
|
||||
astguiclient|admin.php|0
|
||||
astguiclient|remote_inbound.php|0
|
||||
astguiclient|phone_stats.php|0
|
||||
astguiclient|inbound_popup.php|0
|
||||
astguiclient|AST_inboundEXTstats.php|0
|
||||
astguiclient|dbconnect.php|1
|
||||
astguiclient|htglobalize.php|1
|
||||
vicidial|admin.php|0
|
||||
vicidial|dbconnect.php|1
|
||||
vicidial|htglobalize.php|1
|
||||
vicidial|AST_VICIDIAL_hopperlist.php|0
|
||||
vicidial|server_stats.php|0
|
||||
vicidial|AST_VDADstats.php|0
|
||||
vicidial|AST_timeonVDAD.php|0
|
||||
vicidial|AST_timeonVDAD_closer.php|0
|
||||
vicidial|listloader.php|0
|
||||
vicidial|listloaderMAIN.php|0
|
||||
vicidial|count.htm|1
|
||||
vicidial|help.gif|1
|
||||
astguiclient|help.gif|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
|
||||
***TRANSLATIONS***||
|
||||
English|Inglés|
|
||||
Spanish|Español|
|
||||
French|Francés|
|
||||
German|Alemán|
|
||||
Italian|Italiano|
|
||||
\.\/images\/|../agc/images/|
|
||||
You have now logged out. Thank you|Usted ahora ha salido. Gracias|
|
||||
Invalid Username\/Password|Nombre y contraseña inválidos del usuario|
|
||||
help.gif|help.gif|
|
||||
ASTERISK ADMIN: Administration|ASTERISK ADMIN: Administración|
|
||||
PHONES TABLE|TABLA DE LOS TELÉFONOS|
|
||||
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.|Extensión del teléfono -</B> este campo es donde usted pone los nombres del teléfono que aparecen al marcar con asterisco no incluyendo el protocolo o la barra vertical del principio. Por ejemplo: para el teléfono SIP/test101 del SIP la extensión del teléfono sería test101. También, para los teléfonos IAX2 compruebe que usted utiliza el nombre del teléfono completo: IAX2/IAXphone1@IAXphone1 sería IAXphone1@IAXphone1. Para zap los teléfonos compruebe que usted pone el canal completo: Zap/25-1 sería 25-1. Otra nota, compruebe que usted fija el protocolo abajo correctamente para su tipo de teléfono.|
|
||||
Dialplan 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 Dialplan -</B> este campo está para el número que usted marca para tener el anillo del teléfono. Este número se define en el archivo de extensions.conf de su servidor asterisco|
|
||||
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 Buzón de Voz -</B> este campo es para la caja del buzón de voz donde van los mensajes para al usuario de este teléfono. Utilizamos esto para comprobar los mensajes del buzón de voz y para que el usuario pueda acceder al Buzón de Voz desde astGUIclient|
|
||||
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 -</B> 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|Dirección IP del teléfono -</B> este campo es para la dirección IP del teléfono si es un teléfono 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|Dirección IP del ordenador -</B> este campo es para la dirección 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 -</B> Este menú es donde usted selecciona en que servidor está el teléfono activo|
|
||||
Login -<\/B> The login used for the phone user to get to admin functions|Login -</B> El nombre de usuario del teléfono para conseguir los permisos de admin|
|
||||
Password -<\/B> The password used for the phone user to get to admin functions|Contraseña -</B> la contraseña usada por el usuario del teléfono 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 -</B> el estado del teléfono en el sistema, puede ser ACTIVO y ADMIN permiten que los clientes del GUI trabajen. ADMIN permite el acceso a este Web site de administración. El resto de los estados no permiten el acceso al GUI o al Web de Admin|
|
||||
Active Account -<\/B> Whether the phone is active to put it in the list in the GUI client|Cuenta activa -</B> si el teléfono está activado ponerla en la lista del cliente del GUI|
|
||||
Phone Type -<\/B> Purely for administrative notes|Tipo de teléfono -</B> solamente para información administrativas|
|
||||
Full Name -<\/B> Used by the GUIclient in the list of active phones|Nombre completo -</B> usado por el GUIclient en la lista de teléfonos activos|
|
||||
Company -<\/B> Purely for administrative notes|Compañía -</B> solamente para las notas administrativas|
|
||||
Picture -<\/B> Not yet Implemented|Cuadro -</B> todavía no puesto en ejecución|
|
||||
New Messages -<\/B> Number of new voicemail messages for this phone on the Asterisk server|Nuevos mensajes -</B> número de los nuevos mensajes del Buzón de Voz para este teléfono en el servidor del asterisco|
|
||||
Old Messages -<\/B> Number of old voicemail messages for this phone on the Asterisk server|Viejos mensajes -</B> número de los viejos mensajes del Buzón de Voz para este teléfono 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 -</B> el protocolo que el teléfono utiliza para conectar con el servidor del asterisco: El Sip, IAX2, Zap. También, para los números External remotos o los números SpeedDial que usted desea enumerar como teléfonos|
|
||||
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 -</B> La diferencia a partir del tiempo malo del ZULÚ del time(or de Greenwich) donde se localiza el teléfono. NO AJUSTE POR TIEMPO DE LOS AHORROS DE LA LUZ DEL DÍA. Esto es utilizada por la campaña de VICIDIAL para exhibir exactamente el tiempo y el tiempo del cliente|
|
||||
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|Conexión del encargado -</B> Ésta es la conexión que los clientes del GUI para este teléfono utilizarán tener acceso a la base de datos donde residen los datos del servidor|
|
||||
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 -</B> Ésta es la contraseña que los clientes del GUI para este teléfono utilizarán tener acceso a la base de datos donde residen los datos del servidor|
|
||||
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 -</B> éste debe poner un valor prefijado en el campo del usuario de VICIDIAL siempre que este usuario del teléfono abra a cliente app de astVICIDIAL. Deje el espacio en blanco para ningún usuario|
|
||||
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 -</B> éste debe poner un valor prefijado en el campo de la contraseña de VICIDIAL siempre que este usuario del teléfono abra a cliente app de astVICIDIAL. Deje el espacio en blanco para ningún paso|
|
||||
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 -</B> éste debe poner un valor prefijado en el campo de la campaña de VICIDIAL siempre que este usuario del teléfono abra a cliente app de astVICIDIAL. Deje el espacio en blanco para ninguna campaña|
|
||||
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 -</B> Ésta es la extensión 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 -</B> Ésta es la extensión del parque de la conferencia del defecto para los apps del cliente. Verifique que diverso trabaje antes de que usted cambie esto|
|
||||
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 -</B> Ésta es la extensión del estacionamiento del defecto para el cliente app de VICIDIAL. Verifique que diverso trabaje antes de que usted cambie esto|
|
||||
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 -</B> éste es el nombre del archivo de la extensión del parque del defecto VICIDIAL para los apps del cliente. Verifique que diverso trabaje antes de que usted cambie éste limitado a 10 caracteres|
|
||||
Monitor Prefix -<\/B> This is the dialplan prefix for monitoring of Zap channels automatically within the astGUIclient app. Only change according to the extensions.conf ZapBarge extensions records|Prefijo del monitor -</B> éste es el prefijo dialplan para supervisar de zap los canales automáticamente dentro del app astGUIclient. Cambie solamente según los expedientes de extensiones de extensions.conf ZapBarge|
|
||||
Recording Exten -<\/B> This is the dialplan extension for the recording extension that is used to drop into meetme conferences to record them. It usually lasts upto one hour if not stopped. verify with extensions.conf file before changing|Grabación Exten -</B> Ésta es la extensión dialplan para la extensión de la grabación que se utiliza para caer en conferencias del meetme para registrarlas. Dura generalmente hasta que una hora si no parada verifica con el archivo de extensions.conf antes de cambiar|
|
||||
VMAIL Main Exten -<\/B> This is the dialplan extension going to check your voicemail. verify with extensions.conf file before changing|VMAIL Exten principal -</B> Ésta es la extensión dialplan que va a comprobar su voicemail. verifica con el archivo de extensions.conf antes de cambiar|
|
||||
VMAIL Dump Exten -<\/B> This is the dialplan prefix used to send calls directly to a user's voicemail from a live call in the astGUIclient app. verify with extensions.conf file before changing|Descarga Exten de VMAIL -</B> éste es el prefijo dialplan usado para enviar llamadas directamente al voicemail de un usuario de una llamada viva en el app. astGUIclient verifica con el archivo de extensions.conf antes de cambiar|
|
||||
Exten Context -<\/B> This is the dialplan context that this phone primarily uses. It is assumed that all numbers dialed by the client apps are using this context so it is a good idea to make sure this is the most wide context possible. verify with extensions.conf file before changing|Contexto de Exten -</B> éste es el contexto dialplan que este teléfono utiliza sobre todo. Se asume que todos los números marcados por los apps del cliente están utilizando este contexto así que es una buena idea cerciorarse de que éste es el contexto más amplio posible verifica con el archivo de extensions.conf antes de cambiar|
|
||||
DTMF 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 -</B> Ésta es la secuencia del canal usada para enviar sonidos de DTMF en conferencias del meetme de los apps del cliente. Verifique que exten y contexto con el archivo de extensions.conf|
|
||||
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 -</B> éste es el grupo de canal que las llamadas de salida de este teléfono están puestas de. Hay rutinas de un par en los apps del cliente que utilizan esto. Para zap los canales que usted desea utilizar algo como Zap/g2, porque los troncos IAX2 usted desearía utilizar el prefijo completo de IAX como IAX2/VICItest1:secret@10.10.10.15:4569. Verifique que los troncos con el file(it de extensions.conf sean generalmente lo que usted ha definido como la variable global del TRUNK en la tapa del archivo)|
|
||||
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|Localización del browser -</B> 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 -</B> éste es el lugar en donde las escrituras astGUIclient y de astVICIDIAL están situadas en su máquina. Para Win32 debe ser algo como C:\AST_VICI y para UNIX debe ser algo como /usr/local/perl_TK. verifica esto manualmente|
|
||||
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 -</B> Ústa es la dirección de la tela de la página usada para hacer operaciones de búsqueda de encargo del callerID que es la dirección de prueba del defecto: http://astguiclient.sf.net/test_callerid_output.php|
|
||||
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 -</B> Ésta es la dirección de la tela de la página usada para hacer preguntas de encargo de la forma del Web de VICIDIAL que es la dirección de prueba del defecto: http://astguiclient.sf.net/test_VICIDIAL_output.php|
|
||||
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 hangup 'h' extensions to log all calls. This should always be 1 because it is manditory for many astGUIclient and VICIDIAL features to work properly|Registración de la llamada -</B> 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|Conmutación del usuario -</B> fije para verdad para permitir que el usuario cambie a otra cuenta del usuario. NOTA: Si los interruptores del usuario ellos pueden iniciar la grabación en la conversación de teléfono del nuevo usuario|
|
||||
Conferencing -<\/B> Set to true to allow user to start conference calls with upto six external lines|Comunicación -</B> fije para verdad para permitir que el usuario comience llamadas de conferencia con hasta que seis líneas externas|
|
||||
Admin Hangup -<\/B> Set to true to allow user to be able to hangup any line at will through astGUIclient. Good idea only to enable this for Admin users|Retraso del Admin -</B> 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 -</B> fije para verdad para permitir que el usuario pueda asir y volver a dirigir a su extensión cualquier línea en la voluntad con astGUIclient. Buena idea de permitir solamente esto para los usuarios del Admin. Pero es muy útil para los encargados|
|
||||
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 -</B> fije para verdad para permitir que el usuario pueda asir y volver a dirigir a su extensión cualquier línea en la voluntad con astGUIclient. Buena idea de permitir solamente esto para los usuarios del Admin. Pero es muy útil para los encargados y como herramienta del entrenamiento|
|
||||
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 hangup. Usually enabled for all|Parque de llamada -</B> 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 -</B> 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 -</B> 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 permitió -</B> 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 -</B> 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|Botón de VMail -</B> fije para verdad para exhibir el botón de VOICEMAIL y los mensajes cuentan la exhibició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 -</B> fije para verdad para permitir un nuevo índice de restauran de la información de la llamada para el astGUIclient. La tarifa inhabilitada defecto es el ms 1000 (1 segundo). Puede aumentar la carga de sistema si usted baja este número|
|
||||
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 -</B> 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 -</B> si está permitida la conexión astGUIclient seguirá conectada en vez de conectar cada segundo. Útil si usted hace que un rápido restaure la tarifa fijada. Aumentará el número de conexiones en su máquina de MySQL|
|
||||
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 -</B> si está permitido el cliente de VICIDIAL marcará el número siguiente en la lista automáticamente sobre la disposición de una llamada a menos que seleccionaran "para parar el marcar" en la pantalla de la disposición|
|
||||
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 después de cada llamada -</B> si está permitido el cliente de VICIDIAL parará se está encendiendo cualquier grabación después de que haya sido cada llamada dispositioned. Útil si usted está haciendo muchos de la grabación o usted están utilizando una forma de la tela para accionar la grabación|
|
||||
DBX Server -<\/B> The MySQL database server that this user should be connecting to|Servidor de DBX -</B> 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 -</B> 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 -</B> la conexión 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 -</B> 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 -</B> 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 -</B> 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 -</B> 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 -</B> la conexión 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 -</B> 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 -</B> 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|SELECCIONE POR FAVOR Un NÚMERO Y La FECHA ARRIBA Y El TECLEO SOMETEN|
|
||||
Total Calls That came into this number|Llamadas totales que vinieron en este número|
|
||||
Average Call Length(seconds) for all Calls|La llamada media Length(seconds) para toda llama|
|
||||
Total DROP Calls: (less than 10 seconds)|Llamadas Totales de la GOTA: (menos de 10 segundos)|
|
||||
Average Call Length(seconds) for DROP Calls|Llamada media Length(seconds) para las llamadas de la GOTA|
|
||||
GRAPH IN 15 MINUTE INCREMENTS OF TOTAL CALLS|GRÁFICO EN 15 INCREMENTOS MINUCIOSOS DE LLAMADAS TOTALES|
|
||||
Click on the channel below that you would like to have directed to your phone|Chasque encendido el canal debajo de ése que usted quisiera haber dirigido a su teléfono|
|
||||
LAST 1000 CALLS FOR DATE RANGE|LLAMADAS DEL ÚLTIMO 1000 PARA LA GAMA DE LA FECHA|
|
||||
Click here to see what leads are in the hopper right now|Chasque aquí para ver qué plomos están en la tolva ahora|
|
||||
CUSTOM STATUSES WITHIN THIS CAMPAIGN|ESTADOS DE ENCARGO DENTRO DE ESTA CAMPAÚA|
|
||||
PLEASE SELECT A CAMPAIGN ABOVE AND CLICK SUBMIT|SELECCIONE POR FAVOR Una CAMPAÚA ARRIBA Y El TECLEO SOMETE|
|
||||
PLEASE SELECT A CAMPAIGN AND DATE ABOVE AND CLICK SUBMIT|SELECCIONE POR FAVOR Una CAMPAÚA Y La FECHA ARRIBA Y El TECLEO SOMETEN|
|
||||
GRAPH IN 15 MINUTE INCREMENTS OF TOTAL CALLS PLACED FROM THIS CAMPAIGN|GRÁFICO EN 15 INCREMENTOS MINUCIOSOS DE LAS LLAMADAS TOTALES PUESTAS DE ESTA CAMPAÚA|
|
||||
ERROR: The file does not have the required number of fields to process it|ERROR: El archivo no tiene el número requerido de los campos para procesarlo|
|
||||
ERROR: File exceeds the 8MB limit|ERROR: El archivo excede el límite 8MB|
|
||||
Please enter the group you want to get hourly stats for|Inscriba por favor a grupo que usted desea conseguir el stats cada hora para|
|
||||
The search variables you entered are not active in the system|Las variables de la búsqueda que usted incorporó no son activas en el sistema|
|
||||
Please go back and double check the information you entered and submit again|Va por favor detrás y dobla el cheque la información que usted incorporó y somete otra vez|
|
||||
Click here to see the Lead Details|Chasque aquí para ver los detalles del plomo|
|
||||
SERVERS TABLE|TABLA DE LOS SERVIDORES|
|
||||
Server ID -<\/B> This field is where you put the Asterisk server's name, doesn't have to be an official domain sub, just a nickname to identify the server to Admin users|Server ID -</B> This field is where you put the Asterisk server's name, doesn't have to be an official domain sub, just a nickname to identify the server to Admin users|
|
||||
Server Description -<\/B> The field where you use a small phrase to describe the Asterisk server|Descripción del servidor -</B> 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 -</B> 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 -</B> 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|Versión del asterisco -</B> fije la versión del asterisco que usted ha instalado en este servidor. Ejemplos: ' 1.2 ', ' 1.0.8 ', ' 1.0.7 ', ' CVS_HEAD ', ' REALMENTE VIEJO ', etc... Se utiliza esto porque las versiones 1.0.8 y 1.0.9 tienen un diverso método de ocuparse del insecto local del channels(a que ha estado fijado en CVS v1.0) y necesidad de ser tratado diferentemente cuando la manipulación de su Local/ acanala. También, CVS_HEAD actual y las 1.2 aplicaciones diverso encargado y comando del árbol del lanzamiento hicieron salir así que debe ser tratado diverso también|
|
||||
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 -</B> 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|Anfitrión del telnet -</B> éste es la dirección o el nombre del servidor del asterisco y es cómo los usos del encargado conectan con él de donde están funcionando. Si están funcionando en el servidor del asterisco, después el defecto del ' localhost ' está muy bien|
|
||||
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 -</B> éste es el puerto de la conexión del encargado del servidor del asterisco y es cómo los usos del encargado conectan con ella de donde están funcionando. El defecto de ' 5038 ' está para un estándar instala muy bien|
|
||||
Manager User -<\/B> The username or login used to connect genericly to the Asterisk server manager. Default is 'cron'|Usuario del encargado -</B> el username o la conexión 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 -</B> 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 actualización del encargado -</B> el username o la conexión conectaba con el encargado del servidor del asterisco optimizado para las escrituras de la actualización. Omita es 'updatecron' y asume el mismo secreto que el usuario genérico|
|
||||
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 -</B> el username o la conexión usada para conectar con el encargado del servidor del asterisco optimizado para las escrituras que esperan a escuchar solamente salida. Omita es 'listencron' y asume el mismo secreto que el usuario genérico|
|
||||
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 -</B> el username o la conexión usada para conectar con el encargado del servidor del asterisco optimizado para las escrituras que envían solamente acciones al encargado. Omita es 'sendcron' y asume el mismo secreto que el usuario genérico|
|
||||
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 compensó -</B> 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 -</B> el prefijo de VMail de la extensión usado en este servidor para enviar llamadas directamente a través de agc a una caja específica del voicemail. El defecto es '85026666666666'|
|
||||
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'|Extensión del ANUNCIO de VICIDIAL -</B> la extensión del defecto si ninguno está presente en la campaña enviar llamadas para a marcar auto de VICIDIAL. El defecto es '8365'|
|
||||
Default Context -<\/B> The default dialplan context used for scripts that operate for this server. Default is 'default'|Contexto del defecto -</B> el contexto dialplan 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|Identificación del usuario -</B> este campo es donde usted pone el número de la identificación del usuario de VICIDIAL, puede ser hasta 8 dígitos en longitud, debe ser por lo menos 2 caracteres en longitud|
|
||||
Password -<\/B> This field is where you put the VICIDIAL users password. Must be at least 2 characters in length|Contraseña -</B> 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 -</B> 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 -</B> este menú es donde usted selecciona el nivel de usuario de los usuarios de VICIDIAL. Debe ser un nivel de 1 a registrar en VICIDIAL, debe ser llano mayor de 2 a abrirse una sesión como más cercano, deben ser el nivel de usuario 8 o mayor conseguir en la sección de la tela del admin|
|
||||
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 -</B> este menú es donde usted selecciona a grupo de usuarios de VICIDIAL que este usuario pertenecerá a. Esto no tiene ninguna restricciones en este tiempo, éste es justo subdividir a usuarios y permitir las características futuras basadas sobre él|
|
||||
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|Identificación de la campaña -</B> Úste es el nombre corto de la campaña, él no es editable después de la sumisión inicial, no puede contener espacios y debe estar entre 2 y 8 caracteres en 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 -</B> Ésta es la descripció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 -</B> aquí es adonde usted fija la campaña a activo o a inactivo. Si es inactivo, noone puede registrar en é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|Extensión del parque -</B> aquí es donde usted puede modificar para requisitos particulares en-sostiene la música para VICIDIAL. Cerciórese de que la extensión esté en lugar en el extensions.conf y eso que señala al nombre de fichero abajo|
|
||||
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 -</B> aquí es donde usted puede modificar para requisitos particulares en-sostiene la música para VICIDIAL. Cerciórese de que el nombre de fichero sea 10 caracteres en longitud o menos y que el archivo está en lugar en el directorio de /var/lib/asterisk/sounds|
|
||||
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 -</B> aquí es donde usted puede fijar el Web page de encargo que será abierto cuando el usuario chasca encendido el botón de la FORMA del WEB|
|
||||
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 -</B> aquí es donde usted puede fijar si los usuarios de esta campaña tendrán la opción para enviar la llamada a un más cercano|
|
||||
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 -</B> 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 -</B> 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 -</B> Este menú es donde usted selecciona có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|seleccione los primeros plomos cargados en la tabla del vicidial_list|
|
||||
select the last leads loaded into the vicidial_list table|seleccione los plomos pasados cargados en la tabla del vicidial_list|
|
||||
select the highest phone number and works its way down|seleccione el número y los trabajos más altos de teléfono su manera abajo|
|
||||
select the lowest phone number and works its way up|seleccione el número y los trabajos más bajos de teléfono su manera para arriba|
|
||||
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 -</B> éste es cuántos conducen los intentos de la escritura de VDhopper para mantener la tabla del vicidial_hopper para esta campaña. Si funciona la escritura de VDhopper cada minuto, haga esto levemente mayor que el número de plomos que usted entra a través en un minuto|
|
||||
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 -</B> esto permite que usted limpie fuera del contenido de la tolva sobre la sumisión de la forma. Debe ser llenada otra vez cuando la escritura de VDhopper funciona|
|
||||
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 -</B> aquí es adonde usted fija cuántos alinea VICIDIAL debe utilizar por medios del agente activo cero 0 que el marcar del automóvil está apagado y los agentes chascarán para marcar cada número. Si no VICIDIAL mantendrá líneas que marcan iguales a los agentes activos multiplicados por el nivel del dial para llegar cuántas líneas debe permitir esta campaña en cada servidor|
|
||||
Next Agent Call -<\/B> This determines which agent receives the next call that is available|Llamada siguiente del agente -</B> esto se determina qué agente recibe la llamada siguiente que está disponible|
|
||||
orders by the random update value in the vicidial_live_agents table|órdenes por el valor al azar de la actualizació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 ó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 ó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 -</B> aquí es adonde usted fijó durante qué horas usted quisiera marcar, según lo determinado por el tiempo local en está en cuál usted está llamando. Esto es controlada por código de área y ajustada por tiempo de los ahorros de la luz del día si es aplicable. Las pautas generales en los E.E.U.U. para el negocio al negocio son los 9am a los 5pm y el negocio a las llamadas del consumidor es los 9am a los 9pm|
|
||||
Voicemail -<\/B> If defined, calls that would normally DROP would instead be directed to this voicemail box to hear and leave a message|Voicemail -</B> 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 hangup after the timeout defined in extensions.conf would instead timeout at this amount of seconds if it is less than the extensions.conf timeout. This allows for quickly changing dial timeouts from server to server and limiting the effects to a single campaign. If you are having a lot of Answering Machine or Voicemail calls you may want to try changing this value to between 21-26 and see if results improve|Descanso del dial -</B> si está definido, llamadas que normalmente retraso después de que el descanso definido en extensions.conf en lugar de otro descanso en esta cantidad de segundos si es menos que el descanso de extensions.conf. Esto permite descansos del dial rápidamente que cambian del servidor al servidor y a limitar los efectos a una sola campaña. Si usted está teniendo muchos de llamadas del contestador automático o de 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 dialplan - extensions.conf|Prefijo del dial -</B> este campo permite más fácilmente cambiar una trayectoria de marcar a salir con un diverso método sin hacer una recarga en asterisco. El defecto es 9 basados sobre un 91NXXNXXXXXX en el dialplan - extensions.conf|
|
||||
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. This option is only available if you are using PRIs - ISDN T1s or E1s - that have the custom callerid feature turned on. This feature may also work with IAX2 trunks depending on what your provider allows. The custom callerID only applies to calls placed for the VICIDIAL campaign directly, any 3rd party calls or transfers will not send the custom callerID. NOTE: Sometimes putting UNKNOWN or PRIVATE in the field will yield the sending of your default callerID number by your carrier with the calls. You may want to test this and put 0000000000 in the callerid field instead if you do not want to send you CallerID|Campaña CallerID -</B> este campo permite enviar de un número de encargo del callerid en las llamadas de salida. Úste es el número que demostraría para arriba en el callerid de la persona que usted está llamando. El defecto es DESCONOCIDO. Esta opción está solamente disponible si usted está utilizando PRIs - ISDN T1 o E1 - que tienen la característica de encargo del callerid se giraron. Esta característica puede también trabajar con los troncos IAX2 dependiendo de lo que admite su abastecedor. El callerID de encargo se aplica solamente a las llamadas puestas para la campaña de VICIDIAL directamente, cualquier tercer persona llama o las transferencias no enviarán el callerID de encargo. NOTA: A veces el poner DESCONOCIDO o PRIVADO en el campo rendirá enviar de su número del callerID del defecto por su portador con las llamadas. Usted puede desear probar esto y poner 0000000000 en el campo del callerid en lugar de otro si usted no desea enviarle CallerID|
|
||||
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|Extensión de la campaña VDAD -</B> este campo permite una extensión de la transferencia del costumbre VDAD. Esto permite que usted utilice diversas escrituras del agi de VDADtransfer... dependiendo de su campaña. La transferencia AGI(exten 8365 agi-VDADtransfer.agi del defecto) apenas envía inmediatamente invita a los agentes tan pronto como él se tome. Una encuesta sobre política AGI la muestra adicional es también (8366 agi-VDADtransferSURVEY.agi ) ese ahora incluido los juegos un mensaje a la persona llamada y permite que él haga una opción presionando buttons(effectively la pre-investigacio'n el plomo). Observe por favor eso a excepción de los exámenes, llamadas políticas y las caridades esta forma de llamar son ilegales en los Estados Unidos|
|
||||
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|Identificación de la lista -</B> Úste es el nombre numérico de la lista, él no es editable después de la sumisión inicial, debe contener solamente números y debe estar entre 2 y 8 caracteres en longitud|
|
||||
List Name -<\/B> This is the description of the list, it must be between 2 and 20 characters in length|Nombre de la lista -</B> Ésta es la descripció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 -</B> Ésta 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 -</B> 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 -</B> 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|Identificación de grupo -</B> Úste es el nombre corto del grupo de entrada, él no es editable después de la sumisión inicial, no debe contener cualquier espacio y debe estar entre 2 y 20 caracteres en longitud|
|
||||
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 -</B> Ésta es la descripció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 -</B> éste es el color que exhibe en el cliente app de VICIDIAL cuando una llamada viene adentro en este grupo. Debe estar entre 2 y 7 caracteres de largo. Si esto es una definición del color de la tuerca hexagonal usted debe recordar poner a # al principio de la secuencia o VICIDIAL no trabajará correctamente|
|
||||
Active -<\/B> This determines whether this group show up in the selection box when a VICIDIAL agent logs in|Activo -</B> esto se determina si este grupo demuestra para arriba en la caja de la selecció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 -</B> Ésta es la dirección de encargo que el chascar en el botón de la FORMA del WEB en VICIDIAL le llevará para las llamadas que vienen adentro en este grupo|
|
||||
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 -</B> si está definida, Ésta es la caja de Voicemail que las llamadas irán en vez a ser caído si no hay agentes disponibles despué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|Exhibición de Fronter -</B> 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 identificación del usuario -</B> Ésta es la identificación del usuario que comienza se utiliza que cuando las entradas alejadas del agente se insertan en el sistema. Si el número de líneas se fija más altamente de 1, este número es incrementado por uno hasta que cada línea tiene una entrada. Se cerciora de usted crear una nueva cuenta del usuario de VICIDIAL con un nivel de usuario de 4 o grande si usted quisiera que pudieran utilizar la página de vdremote.php para el acceso alejado de la tela de esta cuenta|
|
||||
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 -</B> 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 -</B> 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 dialplan number and that if you need a 9 at the beginning you put it in here. Test by dialing this number from a phone on the system|Extensión externa -</B> éste es el número que usted desea las llamadas remitidas a. Cerciórese de que sea un número dialplan completo y que si usted necesita 9 al principio usted lo pone adentro aquí. Pruebe marcando este número de un teléfono en el sistema|
|
||||
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 -</B> 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 -</B> aquí es donde usted selecciona la campaña que estos agentes alejados serán registrados en. Necesidades de entrada de utilizar la campaña MÁS CERCANA y de seleccionar las campañas de entrada debajo de ésa que usted desea recibir llamadas de|
|
||||
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 -</B> 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 identificació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 descripción debe ser 2-30 caracteres en longitud y seleccionable define si demuestra para arriba en VICIDIAL como disposición|
|
||||
Through the use of custom campaign hotkeys, agents that use the vicidial web-client can hangup and disposition calls just by pressing a single key on their keyboard|Con el uso de los hotkeys de encargo de la campaña, los agentes que utilizan el retraso vicidial de la lata del tela-cliente y la disposición llama apenas presionando una sola llave en su teclado|
|
||||
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 -</B> éste es el nombre corto de un grupo de usuario de Vicidial, intento para no utilizar ningunos espacios o puntuación para los caracteres de este máximo 20 del campo, mínimo de 2 caracteres|
|
||||
Group Name -<\/B> This is the description of the vicidial user group max of 40 characters|Nombre de grupo -</B> Ésta es la descripción del máximo vicidial del grupo de usuario de 40 caracteres|
|
||||
VICIDIAL LIST LOADER FUNCTIONALITY|FUNCIONALIDAD DEL CARGADOR DE LA LISTA DE VICIDIAL|
|
||||
The VICIDIAL web-based lead loader is designed simply to take a lead file - up to 8MB in size - that is either tab or pipe delimited and load it into the vicidial_list table. The lead loader does not do data validation or check for duplicates in itself or other lists, so that is something you need to do before you load the leads. Also, make sure that you have created the list that these leads are to be under so that you can use them. There is also the matter of time-zone-coding these leads. You may want to increase the frequency that the ADMIN_adjust_GMTnow_on_leads.pl is being run in the cron on your Asterisk server so that any loaded leads can be coded faster. Here is a list of the fields in their proper order for the lead files|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. El cargador del plomo no hace la validación de datos o la comprobación para duplicados en sí mismo u otras listas, de modo que esté algo usted necesita hacer antes de usted la carga los plomos. También, cerciórese de que usted haya creado la lista que estos plomos son estar debajo de modo que usted pueda utilizarlos. Hay también la materia de la tiempo-zona-codificacio'n estos plomos. Usted puede desear aumentar la frecuencia que el ADMIN_adjust_GMTnow_on_leads.pl se está funcionando en el cron en su servidor del asterisco para poder cifrar cualquier plomo cargado más rápidamente. Aquí está una lista de los campos en su orden apropiada para los archivos del plomo|
|
||||
Vendor Lead Code - shows up in the Vendor ID field of the GUI|Código del plomo del vendedor - demuestra para arriba en el campo de la identificación del vendedor del GUI|
|
||||
Source Code - internal use only for admins and DBAs|Código de fuente - uso interno solamente para los admins y DBAs|
|
||||
List ID - the list number that these leads will show up under|Identificació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|Código del teléfono - el prefijo para el teléfono number(1 para los E.E.U.U., 01144 para Reino Unido, 01161 para AUS, el etc)|
|
||||
Phone Number - must be at least 8 digits long|Número de teléfono - 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: Puede tomar hasta 30 segundos para los cambios sometidos en esta pantalla para ir viva|
|
||||
USER NOT ADDED - there is already a user in the system with this user number|USUARIO NO AGREGADO - hay ya un usuario en el sistema con este número del usuario|
|
||||
USER NOT ADDED - Please go back and look at the data you entered|USUARIO NO AGREGADO - vaya por favor detrás y mire los datos que usted incorporó|
|
||||
user id must be between 2 and 8 characters long|la ID del usuario debe estar entre 2 y 8 caracteres de largo|
|
||||
full name and password must be at least 2 characters long|el nombre completo y la contraseña deben ser por lo menos 2 caracteres de largo|
|
||||
CAMPAIGN NOT ADDED - there is already a campaign in the system with this ID|CAMPAÚA NO AGREGADA - hay ya una campaña en el sistema con esta identificación|
|
||||
CAMPAIGN NOT ADDED - Please go back and look at the data you entered|CAMPAÚA NO AGREGADA - vaya por favor detrás y mire los datos que usted incorporó|
|
||||
campaign ID must be between 2 and 8 characters in length|la ID de la campaña debe estar entre 2 y 8 caracteres en longitud|
|
||||
campaign name must be between 6 and 40 characters in length|el nombre de la campaña debe estar entre 6 y 40 caracteres en longitud|
|
||||
CAMPAIGN STATUS NOT ADDED - there is already a campaign-status in the system with this name|ESTADO de la CAMPAÚA - hay ya una campaña - estado NO AGREGADO en el sistema con este nombre|
|
||||
CAMPAIGN STATUS NOT ADDED - there is already a global-status in the system with this name|ESTADO de la CAMPAÚA NO AGREGADO - hay ya un global-estado en el sistema con este nombre|
|
||||
CAMPAIGN STATUS NOT ADDED - Please go back and look at the data you entered|ESTADO de la CAMPAÚA NO AGREGADO - vaya por favor detrás y mire los datos que usted incorporó|
|
||||
status must be between 1 and 8 characters in length|el estado debe estar entre 1 y 8 caracteres en longitud|
|
||||
status name must be between 2 and 30 characters in length|el nombre del estado debe estar entre 2 y 30 caracteres en longitud|
|
||||
CAMPAIGN HOTKEY NOT ADDED - there is already a campaign-hotkey in the system with this hotkey|CAMPAÚA HOTKEY NO AGREGADA - hay ya una campaña-hotkey en el sistema con este hotkey|
|
||||
CAMPAIGN HOTKEY NOT ADDED - Please go back and look at the data you entered|CAMPAÚA HOTKEY NO AGREGADA - vaya por favor detrás y mire los datos que usted incorporó|
|
||||
hotkey must be a single character between 1 and 9|el hotkey 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 NO AGREGADA - hay ya una lista en el sistema con esta ID|
|
||||
LIST NOT ADDED - Please go back and look at the data you entered|LISTA NO AGREGADA - vaya por favor detrás y mire los datos que usted incorporó|
|
||||
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|GRUPO NO AGREGADO - hay ya un grupo en el sistema con esta ID|
|
||||
GROUP NOT ADDED - Please go back and look at the data you entered|GRUPO NO AGREGADO - vaya por favor detrás y mire los datos que usted incorporó|
|
||||
Group ID must be between 2 and 20 characters in length and contain no|La ID de grupo debe estar entre 2 y 20 caracteres en longitud y contener no|
|
||||
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 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 - vaya por favor detrás y mire los datos que usted incorporó|
|
||||
User ID start and external extension must be at least 2 characters in length|El comienzo de la ID del usuario y la extensión 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 - vaya por favor detrás y mire los datos que usted incorporó|
|
||||
Group name and description must be at least 2 characters in length|El nombre y la descripció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 - vaya por favor detrás y mire los datos que usted incorporó|
|
||||
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 - vaya por favor detrás y mire los datos que usted incorporó|
|
||||
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 - vaya por favor detrás y mire los datos que usted incorporó|
|
||||
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 HOTKEY NOT MODIFIED - Please go back and look at the data you entered|CAMPAÚA HOTKEY NO MODIFICADA - vaya por favor detrás y mire los datos que usted incorporó|
|
||||
the campaign hotkey needs to be at least 1 characters in length|el hotkey de la campaña necesita ser por lo menos los caracteres 1 en longitud|
|
||||
CUSTOM CAMPAIGN HOTKEY DELETED|LA CAMPAÚA DE ENCARGO HOTKEY SUPRIMIÚ|
|
||||
CAMPAIGN NOT MODIFIED - Please go back and look at the data you entered|CAMPAÚA NO MODIFICADA - vaya por favor detrás y mire los datos que usted incorporó|
|
||||
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 - vaya por favor detrás y mire los datos que usted incorporó|
|
||||
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 - vaya por favor detrás y mire los datos que usted incorporó|
|
||||
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 - vaya por favor detrás y mire los datos que usted incorporó|
|
||||
User ID Start and External Extension must be at least 2 characters in length|El comienzo de la ID del usuario y la extensión 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 - vaya por favor detrás y mire los datos que usted incorporó|
|
||||
Group name and description must be at least 2 characters in length|El nombre y la descripción de grupo deben ser por lo menos 2 caracteres en longitud|
|
||||
MODIFY A USERS RECORD|MODIFIQUE Un EXPEDIENTE De los USUARIOS|
|
||||
Click here for user stats|Clique aquí para ver las estadísticas del usuario|
|
||||
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 -</B> este campo es donde usted pone el número del dialpna de la conferencia del meetme. También se recomienda que el número del meetme en meetme.conf empareja este número para cada entrada. Esto está para las conferencias en astGUIclient y se utiliza para la funcionalidad de leave-3way-call en VICIDIAL|
|
||||
Server IP -<\/B> The menu where you select the Asterisk server that this conference will be on|IP del servidor -</B> 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|TELÉFONO NO AGREGADO - hay ya un teléfono en el sistema con esta extensión/servidor|
|
||||
PHONE NOT ADDED - Please go back and look at the data you entered|TELÉFONO NO AGREGADO - vaya por favor detrás y mire los datos que usted incorporó|
|
||||
PHONE ADDED|EL TELÉFONO AGREGÚ|
|
||||
SERVER NOT ADDED - there is already a server in the system with this ID|SERVIDOR NO AGREGADO - hay ya un servidor en el sistema con esta identificación|
|
||||
SERVER NOT ADDED - Please go back and look at the data you entered|SERVIDOR NO AGREGADO - vaya por favor detrás y mire los datos que usted incorporó|
|
||||
SERVER ADDED|SERVIDOR AGREGADO|
|
||||
CONFERENCE NOT ADDED - there is already a conference in the system with this ID and server|CONFERENCIA NO AGREGADA - hay ya una conferencia en el sistema con esta identificación y servidor|
|
||||
CONFERENCE NOT ADDED - Please go back and look at the data you entered|CONFERENCIA NO AGREGADA - vaya por favor detrás y mire los datos que usted incorporó|
|
||||
CONFERENCE ADDED|LA CONFERENCIA AGREGÚ|
|
||||
PHONE NOT MODIFIED - there is already a Phone in the system with this extension\/server|TELÉFONO NO MODIFICADO - hay ya un teléfono en el sistema con esta extensión/servidor|
|
||||
PHONE NOT MODIFIED - Please go back and look at the data you entered|TELÉFONO NO MODIFICADO - vaya por favor detrás y mire los datos que usted incorporó|
|
||||
PHONE MODIFIED|TELÉFONO MODIFICADO|
|
||||
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 - vaya por favor detrás y mire los datos que usted incorporó|
|
||||
SERVER MODIFIED|SERVIDOR MODIFICADO|
|
||||
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 extensión - servidor NO MODIFICADO|
|
||||
CONFERENCE NOT MODIFIED - Please go back and look at the data you entered|CONFERENCIA NO MODIFICADA - vaya por favor detrás y mire los datos que usted incorporó|
|
||||
CONFERENCE MODIFIED|CONFERENCIA MODIFICADA|
|
||||
MODIFY A PHONE RECORD|MODIFICANDO EL TELÉFONO|
|
||||
THE END|EL EXTREMO|
|
||||
LIST ALL PHONES|ENUMERE TODOS LOS TELÉFONOS|
|
||||
ADD A NEW PHONE|AGREGUE Un TELÉFONO NUEVO|
|
||||
SEARCH FOR A PHONE|BÚSQUEDA PARA Un TELÉFONO|
|
||||
ADD A SERVER|AGREGUE Un SERVIDOR|
|
||||
LIST ALL SERVERS|ENUMERE TODOS LOS SERVIDORES|
|
||||
SHOW ALL CONFERENCES|DEMUESTRE TODAS LAS CONFERENCIAS|
|
||||
ADD A NEW CONFERENCE|AGREGUE Una NUEVA CONFERENCIA|
|
||||
Phone extension|Extensión del teléfono|
|
||||
Dialplan Number|Número De Dialplan|
|
||||
digits only|Solamente dígitos|
|
||||
Voicemail Box|Buzón de voz|
|
||||
Outbound CallerID|CallerID De salida|
|
||||
Phone IP address|Dirección IP del teléfono|
|
||||
Computer IP address|Dirección IP del ordenador|
|
||||
Server IP Address|Dirección IP del Servidor|
|
||||
Server IP|IP Del Servidor|
|
||||
Login: |Login: |
|
||||
Password: |Contraseña: |
|
||||
Status: |Estado: |
|
||||
Active Account|Cuenta Activa|
|
||||
Phone Type|Tipo Del Teléfono|
|
||||
Full Name|Nombre Completo|
|
||||
Company: |Compañía: |
|
||||
Picture: |Foto: |
|
||||
Client Protocol|Protocolo Del Cliente|
|
||||
Local GMT|GMT Local|
|
||||
Do NOT Adjust for DST|No ajustar para el DST|
|
||||
VALUE=SUBMIT|VALUE=ENVIAR|
|
||||
ADD A NEW SERVER|AGREGAR Un SERVIDOR NUEVO|
|
||||
Server ID|ID Del Servidor|
|
||||
Server Description|Descripción Del Servidor|
|
||||
Active: |Activo: |
|
||||
Asterisk Version|Versión De Asterisk|
|
||||
Conference Number|Número de la Conferencia|
|
||||
New Messages|Mensajes Nuevos|
|
||||
Old Messages|Mensajes Viejos|
|
||||
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|Extensión del parking|
|
||||
Park Exten|Extensión del parking|
|
||||
Conf Extension|Extensión de la conferencia|
|
||||
Conf Exten|Extensión 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 Grabación|
|
||||
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|Localización del Navegador|
|
||||
Install Directory|Directorio de instalación|
|
||||
CallerID URL|URL del CallerID|
|
||||
VICIDIAL Default URL|URL por defecto de VICIDIAL|
|
||||
Call Logging|Call Logging|
|
||||
User Switching|Cambio de Usuario|
|
||||
Conferencing|Conferencias|
|
||||
Admin Hangup|Colgar del Admin|
|
||||
Admin Hijack|Captura del Admin|
|
||||
Admin Monitor|Monitorizació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|Botón Vmail|
|
||||
Fast Refresh|Refresco rápido|
|
||||
Fast Refresh Rate|Refresco rápido de la tarifa|
|
||||
Persistant MySQL|Persistant MySQL|
|
||||
Auto Dial Next Number|Auto Marcar el Siguiente Número|
|
||||
Stop Rec after each call|Parar de Grabar después de cada llamada|
|
||||
Primary |Primario |
|
||||
Secondary |Secundario |
|
||||
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 Del Telnet|
|
||||
Telnet Port|Puerto Del 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|Extensión de Vmail Dump |
|
||||
VICIDIAL AD extension|Extensión del AD de VICIDIAL|
|
||||
Default Context|Contexto por Defecto|
|
||||
PHONES WITHIN THIS SERVER|TELÉFONOS DENTRO DE ESTE SERVIDOR|
|
||||
>EXTENSION<|>EXTENSIÓN<|
|
||||
>NAME<|>NOMBRE<|
|
||||
>ACTIVE<|>ACTIVO<|
|
||||
>MODIFY<|>MODIFICAR<|
|
||||
This server has|Este servidor tiene|
|
||||
active phones and|Teléfonos activos y|
|
||||
inactive phones|Teléfonos inactivos|
|
||||
MODIFY A CONFERENCE RECORD|MODIFICAR UN REGISTRO DE LA CONFERENCIA|
|
||||
Conference: |Conferencia: |
|
||||
Current Extension|Extensión Actual|
|
||||
extension: |Extensión: |
|
||||
SEARCH RESULTS|RESULTADOS DE LA BÚSQUEDA|
|
||||
PHONE LISTINGS|LISTADOS DE TELÉFONOS|
|
||||
SERVER LISTINGS|LISTADOS DEL SERVIDOR|
|
||||
CONFERENCE LISTINGS|LISTADOS DE CONFERENCIAS|
|
||||
script runtime|Script runtime|
|
||||
ADD NEW PHONE|NUEVO TELÉFONO|
|
||||
ADD NEW SERVER|NUEVO SERVIDOR|
|
||||
ADD NEW CONFERENCE|NUEVA CONFERENCIA|
|
||||
ADDING NEW PHONE|CREANDO TELÉFONO|
|
||||
ADDING NEW SERVER|CREANDO SERVIDOR|
|
||||
ADDING NEW CONFERENCE|CREANDO CONFERENCIA|
|
||||
MODIFY PHONE|MODIFICAR EL TELÉFONO|
|
||||
MODIFY SERVER|MODIFICAR EL SERVIDOR|
|
||||
MODIFY CONFERENCE|MODIFICAR LA CONFERENCIA|
|
||||
MODIFYING PHONE|MODIFICANDO EL TELÉFONO|
|
||||
MODIFYING SERVER|MODIFICANDO EL SERVIDOR|
|
||||
MODIFYING CONFERENCE|MODIFICANDO LA CONFERENCIA|
|
||||
SEARCH PHONES|BUSCAR TELÉFONOS|
|
||||
SEARCH PHONES RESULTS|RESULTADO DE LA BÚSQUEDA DE TELÉFONOS|
|
||||
PHONE LIST|LISTA DE TELÉFONOS|
|
||||
SERVER LIST|LISTA DE SERVIDORES|
|
||||
CONFERENCE LIST|LISTA DE CONFERENCIAS|
|
||||
HELP|AYUDA|
|
||||
Click here for phone stats|Pinchar aquí para ver las estadísticas del teléfono|
|
||||
REMOTE INBOUND: Main|ENTRANTES REMOTOS: Principal|
|
||||
REMOTE INBOUND: Popup|SALIENTES REMOTOS: Popup|
|
||||
CALLS SENT TO|LLAMADAS REALIZADAS A|
|
||||
Phone Stats|Estadísticas Del Teléfono|
|
||||
CALL TIME AND CHANNELS|TIEMPO DE LLAMADA Y CANALES|
|
||||
CHANNEL GROUP|GRUPO DE CANALES|
|
||||
HOURS:MINUTES|HORAS:MINUTOS|
|
||||
TOTAL CALLS|LLAMADAS TOTALES|
|
||||
>NUMBER|>NÚMERO|
|
||||
DATE<| FECHA<|
|
||||
Close this window|Cierre esta ventana|
|
||||
Inbound Calls Stats|Estadística de Llamadas Entrantes|
|
||||
Add New User|Añadir un Usuario|
|
||||
Add New Campaign|Añadir una Campaña|
|
||||
Add New List|Añadir una Lista|
|
||||
Add New In-Group|Añadir un Grupo-Entrantes|
|
||||
Add New Remote Agents|Añadir Agentes Remotos|
|
||||
Add New Users Group|Añadir un Grupo De Usuarios|
|
||||
New User Addition|Nueva Adición De Usuario|
|
||||
New Campaign Addition|Nueva Adición De la Campaña|
|
||||
New Campaign Status Addition|Nueva Adición Del Estado De la Campaña|
|
||||
New Campaign HotKey Addition|Nueva Adición De Tecla De Acceso Directo De la Campaña|
|
||||
New List Addition|Nueva Adición De la Lista|
|
||||
New In-Group Addition|Nueva Adición Del Grupo de Entrantes|
|
||||
New Remote Agents Addition|Nueva Adición de Agentes Remotos|
|
||||
New Users Group Addition|Nueva Adición Del Grupo De Usuarios|
|
||||
Modify User|Modificar Usuario|
|
||||
Modify Campaign - Basic View|Modificar Campaña - Vista Básica|
|
||||
Modify Campaign|Modifcar Campaña|
|
||||
Modify List|Modificar Lista|
|
||||
Modify In-Group|Modificar In-Group|
|
||||
Modify Remote Agents|Modificar Agentes Remotos|
|
||||
Modify Users Groups|Modificar Grupos De Usuarios|
|
||||
Welcome|Bienvenido|
|
||||
Campaigns|Campañas|
|
||||
Lists|Listas|
|
||||
In-Groups|In-Groups|
|
||||
Remote Agents|Agentes Remotos|
|
||||
User Groups|Grupos De Usuario|
|
||||
Search Form|Formulario De Búsqueda|
|
||||
Search Results|RESULTADOS DE LA BÚSQUEDA|
|
||||
VICIDIAL ADMIN|VICIDIAL ADMIN|
|
||||
TABLE| TABLA|
|
||||
First Name|Nombre|
|
||||
Middle Initial|Inicial Media|
|
||||
Last Name|Apellidos|
|
||||
Address Line 1|Dirección, línea 1|
|
||||
Address Line 2|Dirección, línea 2|
|
||||
Address Line 3|Dirección, línea 3|
|
||||
City|Ciudad|
|
||||
State - limited to 2 characters|Estado - limitado a 2 caracteres|
|
||||
Province|Provincia|
|
||||
Postal Code|Código Postal|
|
||||
Country|País|
|
||||
Gender|Sexo|
|
||||
Date of Birth|Fecha de nacimiento|
|
||||
Alternate Phone Number|Número De Teléfono Alternativo|
|
||||
Email Address|Dirección Email|
|
||||
Security Phrase|Frase De Seguridad|
|
||||
Comments|Comentarios|
|
||||
THE END|EL FIN|
|
||||
Logout|Salir|
|
||||
LIST USERS|MOSTRAR USUARIOS|
|
||||
ADD A NEW USER|NUEVO USUARIO |
|
||||
SEARCH FOR A USER|BUSCAR UN USUARIO|
|
||||
ADD USER GROUP|NUEVO GRUPO DE USUARIO|
|
||||
LIST USER GROUPS|MOSTRAR GRUPOS DE USUARIO|
|
||||
ADD CAMPAIGN|NUEVA CAMPAÑA |
|
||||
LIST CAMPAIGNS|MOSTRAR CAMPAÑAS|
|
||||
SHOW LISTS|MOSTRAR LISTAS|
|
||||
ADD NEW LIST|NUEVA LISTA |
|
||||
LOAD NEW LEADS|CARGAR LEADS|
|
||||
SHOW IN-GROUPS|MOSTRAR IN-GROUPS|
|
||||
ADD NEW IN-GROUP|NUEVO IN-GROUP|
|
||||
SHOW REMOTE AGENTS|MOSTRAR LOS AGENTES REMOTOS|
|
||||
ADD NEW REMOTE AGENTS|NUEVO AGENTE REMOTO|
|
||||
SERVER STATS|ESTADÍSTICAS DEL SERVIDOR|
|
||||
PARK REPORT|INFORME DE PARKING|
|
||||
VDAD REPORT|INFORME DE VDAD|
|
||||
CLOSER REPORT|INFORME CLOSER|
|
||||
SEARCH FOR A LEAD|BÚSCAR UN LEAD|
|
||||
GROUP HOURLY|GRUPO POR HORA|
|
||||
User Number|NÚmero De Usuario|
|
||||
Full Name|Nombre Completo|
|
||||
User Level|Nivel Del Usuario|
|
||||
User Group|Grupo Del Usuario|
|
||||
ADD A NEW CAMPAIGN|NUEVA CAMPAÑA|
|
||||
ADD A NEW INBOUND GROUP|NUEVO GRUPO DE ENTRADA|
|
||||
ADD NEW USERS GROUP|NUEVO GRUPO DE USUARIOS|
|
||||
Campaign ID|ID De la Campaña|
|
||||
Campaign Name|Nombre de la Campaña|
|
||||
Park Extension|Extensión Del Parking|
|
||||
Park Filename|Nombre de fichero Del Parking|
|
||||
Web Form|Formulario Web|
|
||||
Allow Closers|Permitir Closers|
|
||||
Hopper Level|Nivel Del Hopper|
|
||||
Auto Dial Level|Nivel del Auto-Dial|
|
||||
Next Agent Call|Llamar al Siguiente Agente|
|
||||
Local Call Time|Franja horaria de llamada|
|
||||
Voicemail|Buzón de Voz|
|
||||
SUBMIT|ENVIAR|
|
||||
List ID|ID De la Lista|
|
||||
List Name|Nombre De la Lista|
|
||||
Campaign: |Campaña: |
|
||||
Group ID|ID De Grupo|
|
||||
Group Name|Nombre De Grupo|
|
||||
Group Color|Color Del Grupo|
|
||||
Fronter Display|Mostrar Fronter|
|
||||
User ID Start|Comienzo Del ID del usuario|
|
||||
Number of Lines|Número de líneas|
|
||||
External Extension|Extensión Externa|
|
||||
Inbound Groups|Grupos De entrada|
|
||||
Group: |Grupo: |
|
||||
Description: |Descripción: |
|
||||
USER ADDED|EL USUARIOAÑADIDO|
|
||||
CAMPAIGN ADDED|CAMPAÑA AÑADIDA|
|
||||
CAMPAIGN STATUS ADDED|ESTADO DE LA CAMPAÑA AÑADIDA|
|
||||
CAMPAIGN HOTKEY ADDED|ACCESO DIRECTO A LA CAMPAÑA AÑADIDO|
|
||||
LIST ADDED|LISTA AÑADIDA|
|
||||
GROUP ADDED|GRUPO AÑADIDO|
|
||||
REMOTE AGENTS ADDED|AGENTES REMOTO AÑADIDO|
|
||||
USER GROUP ADDED|GRUPO DE USUARIO AÑADIDO|
|
||||
USER MODIFIED|USUARIO MODIFICADO|
|
||||
CAMPAIGN MODIFIED|CAMPAÑA MODIFICADA|
|
||||
GROUP MODIFIED|GRUPO MODIFICADO|
|
||||
CAMPAIGN MODIFIED|CAMPAÑA MODIFICADA|
|
||||
LIST MODIFIED|LISTA MODIFICADA|
|
||||
USER GROUP MODIFIED|GRUPO DE USUARIO MODIFICADO|
|
||||
RESETTING LIST-CALLED-STATUS|REAJUSTANDO LA LISTA - LLAMADA - ESTADO|
|
||||
Dial status |Estado del dial |
|
||||
List Order|Orden De la Lista|
|
||||
Hopper Level|Nivel Del Hopper|
|
||||
Force Reset of Hopper|Forzar el Reinicio del Hopper|
|
||||
Dial Timeout|Tiempo de espera Del Dial|
|
||||
Dial Prefix|Prefijo al marcar|
|
||||
Campaign CallerID|CallerID de la Campaña|
|
||||
Campaign VDAD exten|Exten VDAD de La campaña|
|
||||
LISTS WITHIN THIS CAMPAIGN|LISTAS DENTRO DE ESTA CAMPAÑA|
|
||||
LIST ID|ID DE LA LISTA|
|
||||
LIST NAME|NOMBRE DE LA LISTA|
|
||||
>ACTIVE<|>ACTIVO<|
|
||||
This campaign has |Esta campaña tiene |
|
||||
active lists and |listas activas y |
|
||||
inactive lists|listas inactivas|
|
||||
leads to be dialed in those lists|Leads para ser llamados en estas listas|
|
||||
leads in the dial hopper|Leads en el Hopper|
|
||||
>STATUS<|>ESTADO<|
|
||||
>DESCRIPTION<|>DESCRIPCIÓN<|
|
||||
>SELECTABLE<|>SELECCIONABLE<|
|
||||
>DELETE<|>ELIMINAR<|
|
||||
ADD NEW CUSTOM CAMPAIGN STATUS|AGREGAR ESTADO PERSONALIZADO A LA CAMPAÑA|
|
||||
Selectable: |Seleccionable: |
|
||||
value=ADD|value=ADD|
|
||||
CUSTOM HOTKEYS WITHIN THIS CAMPAIGN|PERSONALIZAR ACCEDOS DIRECTOS PARA ESTA CAMPAÑA|
|
||||
>HOTKEY<|>ACCESO DIRECTO<|
|
||||
ADD NEW CUSTOM CAMPAIGN HOTKEY|AÑADIR ACCESO DIRECTO A LA CAMPAÑA|
|
||||
Hotkey: |Acceso Directo:|
|
||||
Basic View|Vista Básica|
|
||||
Detail View|Vista Detallada|
|
||||
MODIFY A LISTS RECORD|MODIFICAR UN REGISTRO DE LAS LISTAS|
|
||||
Reset Lead-Called-Status for this list|Reiniciar el Lead-Called-Status para esta lista|
|
||||
STATUSES WITHIN THIS LIST|ESTADOS DENTRO DE ESTA LISTA|
|
||||
>CALLED<|>LLAMADO<|
|
||||
>NOT CALLED<|>NO LLAMADO<|
|
||||
>SUBTOTALS<|>SUBTOTALES<|
|
||||
>SUBTOTAL<|>SUBTOTAL<|
|
||||
TIME ZONES WITHIN THIS LIST|ZONAS DE TIEMPO DENTRO DE ESTA LISTA|
|
||||
GMT OFFSET NOW|DESPLAZAMIENTO GMT AHORA|
|
||||
local time|tiempo local|
|
||||
>TOTAL<|>TOTAL<|
|
||||
CALLED COUNTS WITHIN THIS LIST|LLAMADAS REALIZADAS DENTRO DE ESTA 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|Solamente números|
|
||||
dialplan number dialed to reach agents|número del dialplan para alcanzar agentes|
|
||||
MODIFY A USERS GROUP ENTRY|MODIFICAR UNA ENTRADA EN LOS GRUPOS DE USUARIOS|
|
||||
no spaces or punctuation|sin espacios o signos de puntuación|
|
||||
description of group|Descripción del grupo|
|
||||
SEARCH FOR A USER|BUSCAR UN USUARIO|
|
||||
SEARCH RESULTS|RESULTADOS DE LA BÚSQUEDA|
|
||||
>STATS<|>ESTADÍSTICAS<|
|
||||
USER LISTINGS|USUARIOS|
|
||||
CAMPAIGN LISTINGS|CAMPAÑAS|
|
||||
LIST LISTINGS|LISTAS|
|
||||
INBOUND GROUP LISTINGS|GRUPOS DE ENTRADA |
|
||||
REMOTE AGENTS LISTINGS|AGENTES REMOTOS|
|
||||
USER GROUPS LISTINGS|GRUPOS DE USUARIO |
|
||||
script runtime|Script runtime|
|
||||
Hopper List|Lista De Hopper|
|
||||
Live Current Hopper List|Live Current Hopper List|
|
||||
Total leads in hopper right now|Total de Leads en el hopper ahora mismo|
|
||||
Server Stats|ESTADÍSTICAS DEL SERVIDOR|
|
||||
Total Calls placed from this Campaign: |Llamadas dentro de esta campaña|
|
||||
Average Call Length for all Calls in seconds:|Longitud media para las llamadas en segundos:|
|
||||
Total DROP Calls: |Total DROP Calls:|
|
||||
Average Length for DROP Calls in seconds: |Longitud media para las llamadas DROP en segundos: |
|
||||
Total NA calls -Busy,Disconnect,BTvoicemail: |Llamadas sin Respuesta - ocupado, desconexión,..: |
|
||||
Average Call Length for NA Calls in seconds: |Longitud media para las Llamadas sin Respuesta en segundos: |
|
||||
---------- DROPS|---------- DROPS|
|
||||
AUTO-DIAL NO ANSWERS| AUTO-DIAL SIN RESPUESTA|
|
||||
---------- USER STATS|---------- ESTADÍSTICAS DEL USUARIO|
|
||||
---------- TIME STATS|---------- ESTADÍSTICAS DEL TIEMPO|
|
||||
USER |USUARIO |
|
||||
Agents Time On Calls |Tiempo de los Agentes En Llamadas|
|
||||
agents logged in on server|agentes identificados en el servidor|
|
||||
Paused agents|Agentes detenidos brevemente|
|
||||
5 minutes or more on call|Llamadas de 5 minutos o más|
|
||||
Over 10 minutes on call|Sobre 10 minutos en llamada|
|
||||
NO AGENTS ON CALLS |AGENTES SIN LLAMADAS|
|
||||
calls being placed on server|llamadas en el servidor|
|
||||
LIVE CALL WAITING|LLAMADAS ACTUALES EN ESPERA|
|
||||
NO LIVE CALLS WAITING |LLAMADAS EN ESPERA|
|
||||
START OVER|RECARGAR|
|
||||
Lead Loader Module|Módulo Cargador de Leads|
|
||||
Current file status|Estado actual del archivo|
|
||||
Load leads from this file|Cargar Leads de este archivo|
|
||||
Processing |Procesando|
|
||||
TALK TIME AND STATUS|TIEMPO Y ESTADO DE CONVERSACIÓN|
|
||||
>COUNT<|>CUENTA<|
|
||||
>HOURS:MINUTES<|>HORAS:MINUTOS<|
|
||||
TOTAL CALLS |LLAMADAS TOTALES |
|
||||
LOGIN/LOGOUT TIME|TIEMPO LOGIN/LOGOUT|
|
||||
>EVENT <|>EVENTO<|
|
||||
> CAMPAIGN<|> CAMPAÑA<|
|
||||
LAST 50 CALLS|ÚLTIMAS 50 LLAMADAS|
|
||||
VICIDIAL REMOTE: Call Disposition|REMOTE VICIDIAL: Disposición De la Llamada|
|
||||
Call has been dispositioned|La llamada ha sido dispositioned|
|
||||
Close This Window|Cierre Esta Ventana|
|
||||
Call information|Información de la llamada|
|
||||
lead lookup FAILED for lead_id|las operaciones de búsqueda del plomo FALLARON para el lead_id|
|
||||
DISPO CALL|DISPO CALL|
|
||||
>Address |>Dirección |
|
||||
>City |>Ciudad |
|
||||
>State:|>Estado:|
|
||||
Postal Code:| Código Postal:|
|
||||
>Province |>Provincia|
|
||||
>Country |>País |
|
||||
>Alt Phone |>Alt Phone |
|
||||
>Email |>Email |
|
||||
>Security |>Seguridad|
|
||||
>Comments |>Comentarios |
|
||||
>Disposition:|>Disposición:|
|
||||
Group Hourly Stats|Stats Cada hora Del Grupo|
|
||||
TSR HOUR COUNTS|CUENTAS DE HORAS DE TSR|
|
||||
Lead Search|Buscar Lead|
|
||||
Lead Lookup|Operaciones de búsqueda del Lead|
|
||||
Please enter a:|Por favor, Introduzca un:|
|
||||
a Home Phone Number:|un número de teléfono de casa:|
|
||||
vendor lead code|código del vendedor del Lead|
|
||||
a lead ID:|ID del Lead:|
|
||||
>NEW SEARCH<|>NUEVA BÚSQUEDA<|
|
||||
Lead record modification|Registro del Lead modificado|
|
||||
information modified|Información modificada|
|
||||
CALLS TO THIS LEAD|LLAMADAS A ESTE LEAD|
|
||||
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|ESTADÍSTICAS DE ENTRADA|
|
||||
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 - |- ESPERANDO -|
|
||||
Remote Agent inbound stats |Stats de entrada del agente alejado|
|
||||
Total calls taken |Llamadas totales tomadas |
|
||||
Total talk time on |Tiempo total de conversación|
|
||||
Call list for |Lista la llamada para |
|
||||
NO CALLS ON THIS DAY |NINGUNA LLAMADA PARA HOY|
|
||||
@@ -1,370 +0,0 @@
|
||||
<?
|
||||
require("dbconnect.php");
|
||||
|
||||
|
||||
##### depricated
|
||||
#require_once("htglobalize.php");
|
||||
|
||||
$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER'];
|
||||
$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW'];
|
||||
$PHP_SELF=$_SERVER['PHP_SELF'];
|
||||
$group=$_GET["group"]; if (!$group) {$group=$_POST["group"];}
|
||||
$query_date=$_GET["query_date"]; if (!$query_date) {$query_date=$_POST["query_date"];}
|
||||
$submit=$_GET["submit"]; if (!$submit) {$submit=$_POST["submit"];}
|
||||
$SUBMIT=$_GET["SUBMIT"]; if (!$SUBMIT) {$SUBMIT=$_POST["SUBMIT"];}
|
||||
|
||||
# AST_CLOSERstats.php
|
||||
|
||||
$NOW_DATE = date("Y-m-d");
|
||||
$NOW_TIME = date("Y-m-d H:i:s");
|
||||
$STARTtime = date("U");
|
||||
if (!$query_date) {$query_date = $NOW_DATE;}
|
||||
|
||||
$stmt="select group_id from vicidial_inbound_groups;";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$groups_to_print = mysql_num_rows($rslt);
|
||||
$i=0;
|
||||
while ($i < $groups_to_print)
|
||||
{
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$groups[$i] =$row[0];
|
||||
$i++;
|
||||
}
|
||||
?>
|
||||
|
||||
<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=iso-8859-1\">\n";
|
||||
#echo"<META HTTP-EQUIV=Refresh CONTENT=\"7; URL=$PHP_SELF?server_ip=$server_ip&DB=$DB\">\n";
|
||||
echo "<TITLE>VICIDIAL: VDAD Closer Stats</TITLE></HEAD><BODY BGCOLOR=WHITE>\n";
|
||||
echo "<FORM ACTION=\"$PHP_SELF\" METHOD=GET>\n";
|
||||
echo "<INPUT TYPE=TEXT NAME=query_date SIZE=10 MAXLENGTH=10 VALUE=\"$query_date\">\n";
|
||||
echo "<SELECT SIZE=1 NAME=group>\n";
|
||||
$o=0;
|
||||
while ($groups_to_print > $o)
|
||||
{
|
||||
if ($groups[$o] == $group) {echo "<option selected value=\"$groups[$o]\">$groups[$o]</option>\n";}
|
||||
else {echo "<option value=\"$groups[$o]\">$groups[$o]</option>\n";}
|
||||
$o++;
|
||||
}
|
||||
echo "</SELECT>\n";
|
||||
echo "<INPUT TYPE=submit NAME=SUBMIT VALUE=SUBMIT>\n";
|
||||
echo "</FORM>\n\n";
|
||||
|
||||
echo "<PRE><FONT SIZE=2>\n\n";
|
||||
|
||||
|
||||
if (!$group)
|
||||
{
|
||||
echo "\n\n";
|
||||
echo "PLEASE SELECT A CAMPAIGN AND DATE ABOVE AND CLICK SUBMIT\n";
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
|
||||
|
||||
echo "VICIDIAL: Auto-dial Closer Stats $NOW_TIME\n";
|
||||
|
||||
echo "\n";
|
||||
echo "---------- TOTALS\n";
|
||||
|
||||
$stmt="select count(*),sum(length_in_sec) from vicidial_closer_log where call_date >= '$query_date 00:00:01' and call_date <= '$query_date 23:59:59' and campaign_id='$group';";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$row=mysql_fetch_row($rslt);
|
||||
|
||||
$TOTALcalls = sprintf("%10s", $row[0]);
|
||||
$average_hold_seconds = ($row[1] / $row[0]);
|
||||
$average_hold_seconds = round($average_hold_seconds, 0);
|
||||
$average_hold_seconds = sprintf("%10s", $average_hold_seconds);
|
||||
|
||||
echo "Total Calls placed from this Campaign: $TOTALcalls\n";
|
||||
echo "Average Call Length for all Calls in seconds: $average_hold_seconds\n";
|
||||
|
||||
echo "\n";
|
||||
echo "---------- DROPS\n";
|
||||
|
||||
$stmt="select count(*),sum(length_in_sec) from vicidial_closer_log where call_date >= '$query_date 00:00:01' and call_date <= '$query_date 23:59:59' and campaign_id='$group' and status='DROP' and (length_in_sec <= 999 or length_in_sec is null);";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$row=mysql_fetch_row($rslt);
|
||||
|
||||
$DROPcalls = sprintf("%10s", $row[0]);
|
||||
$DROPpercent = (($DROPcalls / $TOTALcalls) * 100);
|
||||
$DROPpercent = round($DROPpercent, 0);
|
||||
|
||||
$average_hold_seconds = ($row[1] / $row[0]);
|
||||
$average_hold_seconds = round($average_hold_seconds, 0);
|
||||
$average_hold_seconds = sprintf("%10s", $average_hold_seconds);
|
||||
|
||||
echo "Total DROP Calls: $DROPcalls $DROPpercent%\n";
|
||||
echo "Average Length for DROP Calls in seconds: $average_hold_seconds\n";
|
||||
|
||||
|
||||
##############################
|
||||
######### USER STATS
|
||||
|
||||
echo "\n";
|
||||
echo "---------- USER STATS\n";
|
||||
echo "+--------------------------+------------+--------+--------+\n";
|
||||
echo "| USER | CALLS | TIME M | AVRG M |\n";
|
||||
echo "+--------------------------+------------+--------+--------+\n";
|
||||
|
||||
$stmt="select vicidial_closer_log.user,full_name,count(*),sum(length_in_sec),avg(length_in_sec) from vicidial_closer_log,vicidial_users where call_date >= '$query_date 00:00:01' and call_date <= '$query_date 23:59:59' and campaign_id='$group' and vicidial_closer_log.user is not null and length_in_sec is not null and length_in_sec > 4 and vicidial_closer_log.user=vicidial_users.user group by vicidial_closer_log.user;";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$users_to_print = mysql_num_rows($rslt);
|
||||
$i=0;
|
||||
while ($i < $users_to_print)
|
||||
{
|
||||
$row=mysql_fetch_row($rslt);
|
||||
|
||||
$user = sprintf("%-6s", $row[0]);
|
||||
$full_name = sprintf("%-15s", $row[1]); while(strlen($full_name)>15) {$full_name = substr("$full_name", 0, -1);}
|
||||
$USERcalls = sprintf("%10s", $row[2]);
|
||||
$USERtotTALK = $row[3];
|
||||
$USERavgTALK = $row[4];
|
||||
|
||||
$USERtotTALK_M = ($USERtotTALK / 60);
|
||||
$USERtotTALK_M = round($USERtotTALK_M, 2);
|
||||
$USERtotTALK_M_int = intval("$USERtotTALK_M");
|
||||
$USERtotTALK_S = ($USERtotTALK_M - $USERtotTALK_M_int);
|
||||
$USERtotTALK_S = ($USERtotTALK_S * 60);
|
||||
$USERtotTALK_S = round($USERtotTALK_S, 0);
|
||||
if ($USERtotTALK_S < 10) {$USERtotTALK_S = "0$USERtotTALK_S";}
|
||||
$USERtotTALK_MS = "$USERtotTALK_M_int:$USERtotTALK_S";
|
||||
$USERtotTALK_MS = sprintf("%6s", $USERtotTALK_MS);
|
||||
|
||||
$USERavgTALK_M = ($USERavgTALK / 60);
|
||||
$USERavgTALK_M = round($USERavgTALK_M, 2);
|
||||
$USERavgTALK_M_int = intval("$USERavgTALK_M");
|
||||
$USERavgTALK_S = ($USERavgTALK_M - $USERavgTALK_M_int);
|
||||
$USERavgTALK_S = ($USERavgTALK_S * 60);
|
||||
$USERavgTALK_S = round($USERavgTALK_S, 0);
|
||||
if ($USERavgTALK_S < 10) {$USERavgTALK_S = "0$USERavgTALK_S";}
|
||||
$USERavgTALK_MS = "$USERavgTALK_M_int:$USERavgTALK_S";
|
||||
$USERavgTALK_MS = sprintf("%6s", $USERavgTALK_MS);
|
||||
|
||||
echo "| $user - $full_name | $USERcalls | $USERtotTALK_MS | $USERavgTALK_MS |\n";
|
||||
|
||||
$i++;
|
||||
}
|
||||
|
||||
echo "+--------------------------+------------+--------+--------+\n";
|
||||
|
||||
##############################
|
||||
######### TIME STATS
|
||||
|
||||
echo "\n";
|
||||
echo "---------- TIME STATS\n";
|
||||
|
||||
echo "<FONT SIZE=0>\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='$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='$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='$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='$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='$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='$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='$group' and status='DROP';";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$drop_count[$i] = $row[0];
|
||||
$i++;
|
||||
$h++;
|
||||
}
|
||||
|
||||
$hour_multiplier = (100 / $hi_hour_count);
|
||||
#$hour_multiplier = round($hour_multiplier, 0);
|
||||
|
||||
echo "<!-- HICOUNT: $hi_hour_count|$hour_multiplier -->\n";
|
||||
echo "GRAPH IN 15 MINUTE INCREMENTS OF TOTAL CALLS PLACED FROM THIS CAMPAIGN\n";
|
||||
|
||||
$k=1;
|
||||
$Mk=0;
|
||||
$call_scale = '0';
|
||||
while ($k <= 102)
|
||||
{
|
||||
if ($Mk >= 5)
|
||||
{
|
||||
$Mk=0;
|
||||
$scale_num=($k / $hour_multiplier);
|
||||
$scale_num = round($scale_num, 0);
|
||||
$LENscale_num = (strlen($scale_num));
|
||||
$k = ($k + $LENscale_num);
|
||||
$call_scale .= "$scale_num";
|
||||
}
|
||||
else
|
||||
{
|
||||
$call_scale .= " ";
|
||||
$k++; $Mk++;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
echo "+------+-------------------------------------------------------------------------------------------------------+-------+-------+\n";
|
||||
#echo "| HOUR | GRAPH IN 15 MINUTE INCREMENTS OF TOTAL INCOMING CALLS FOR THIS GROUP | DROPS | TOTAL |\n";
|
||||
echo "| HOUR |$call_scale| DROPS | TOTAL |\n";
|
||||
echo "+------+-------------------------------------------------------------------------------------------------------+-------+-------+\n";
|
||||
|
||||
$ZZ = '00';
|
||||
$i=0;
|
||||
$h=4;
|
||||
$hour= -1;
|
||||
$no_lines_yet=1;
|
||||
|
||||
while ($i <= 96)
|
||||
{
|
||||
$char_counter=0;
|
||||
$time = ' ';
|
||||
if ($h >= 4)
|
||||
{
|
||||
$hour++;
|
||||
$h=0;
|
||||
if ($hour < 10) {$hour = "0$hour";}
|
||||
$time = "+$hour$ZZ+";
|
||||
}
|
||||
if ($h == 1) {$time = " 15 ";}
|
||||
if ($h == 2) {$time = " 30 ";}
|
||||
if ($h == 3) {$time = " 45 ";}
|
||||
$Ghour_count = $hour_count[$i];
|
||||
if ($Ghour_count < 1)
|
||||
{
|
||||
if ( ($no_lines_yet) or ($i > $last_full_record) )
|
||||
{
|
||||
$do_nothing=1;
|
||||
}
|
||||
else
|
||||
{
|
||||
$hour_count[$i] = sprintf("%-5s", $hour_count[$i]);
|
||||
echo "|$time|";
|
||||
$k=0; while ($k <= 102) {echo " "; $k++;}
|
||||
echo "| $hour_count[$i] |\n";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$no_lines_yet=0;
|
||||
$Xhour_count = ($Ghour_count * $hour_multiplier);
|
||||
$Yhour_count = (99 - $Xhour_count);
|
||||
|
||||
$Gdrop_count = $drop_count[$i];
|
||||
if ($Gdrop_count < 1)
|
||||
{
|
||||
$hour_count[$i] = sprintf("%-5s", $hour_count[$i]);
|
||||
|
||||
echo "|$time|<SPAN class=\"green\">";
|
||||
$k=0; while ($k <= $Xhour_count) {echo "*"; $k++; $char_counter++;}
|
||||
echo "*X</SPAN>"; $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|<SPAN class=\"red\">";
|
||||
$k=0; while ($k <= $Xdrop_count) {echo ">"; $k++; $char_counter++;}
|
||||
echo "D</SPAN><SPAN class=\"green\">"; $char_counter++;
|
||||
$k=0; while ($k <= $XXhour_count) {echo "*"; $k++; $char_counter++;}
|
||||
echo "X</SPAN>"; $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";
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
?>
|
||||
</PRE>
|
||||
|
||||
</BODY></HTML>
|
||||
@@ -1,390 +0,0 @@
|
||||
<?
|
||||
header ("Content-type: text/html; charset=utf-8");
|
||||
|
||||
require("dbconnect.php");
|
||||
|
||||
##### depricated
|
||||
#require_once("htglobalize.php");
|
||||
|
||||
$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER'];
|
||||
$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW'];
|
||||
$PHP_SELF=$_SERVER['PHP_SELF'];
|
||||
$group=$_GET["group"]; if (!$group) {$group=$_POST["group"];}
|
||||
$query_date=$_GET["query_date"]; if (!$query_date) {$query_date=$_POST["query_date"];}
|
||||
$submit=$_GET["submit"]; if (!$submit) {$submit=$_POST["submit"];}
|
||||
$SUBMIT=$_GET["SUBMIT"]; if (!$SUBMIT) {$SUBMIT=$_POST["SUBMIT"];}
|
||||
|
||||
# AST_VDADstats.php
|
||||
|
||||
$NOW_DATE = date("Y-m-d");
|
||||
$NOW_TIME = date("Y-m-d H:i:s");
|
||||
$STARTtime = date("U");
|
||||
if (!$query_date) {$query_date = $NOW_DATE;}
|
||||
|
||||
$stmt="select campaign_id from vicidial_campaigns;";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$groups_to_print = mysql_num_rows($rslt);
|
||||
$i=0;
|
||||
while ($i < $groups_to_print)
|
||||
{
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$groups[$i] =$row[0];
|
||||
$i++;
|
||||
}
|
||||
?>
|
||||
|
||||
<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=iso-8859-1\">\n";
|
||||
#echo"<META HTTP-EQUIV=Refresh CONTENT=\"7; URL=$PHP_SELF?server_ip=$server_ip&DB=$DB\">\n";
|
||||
echo "<TITLE>VICIDIAL: VDAD Stats</TITLE></HEAD><BODY BGCOLOR=WHITE>\n";
|
||||
echo "<FORM ACTION=\"$PHP_SELF\" METHOD=GET>\n";
|
||||
echo "<INPUT TYPE=TEXT NAME=query_date SIZE=10 MAXLENGTH=10 VALUE=\"$query_date\">\n";
|
||||
echo "<SELECT SIZE=1 NAME=group>\n";
|
||||
$o=0;
|
||||
while ($groups_to_print > $o)
|
||||
{
|
||||
if ($groups[$o] == $group) {echo "<option selected value=\"$groups[$o]\">$groups[$o]</option>\n";}
|
||||
else {echo "<option value=\"$groups[$o]\">$groups[$o]</option>\n";}
|
||||
$o++;
|
||||
}
|
||||
echo "</SELECT>\n";
|
||||
echo "<INPUT type=submit NAME=SUBMIT VALUE=SUBMIT>\n";
|
||||
echo "</FORM>\n\n";
|
||||
|
||||
echo "<PRE><FONT SIZE=2>\n\n";
|
||||
|
||||
|
||||
if (!$group)
|
||||
{
|
||||
echo "\n\n";
|
||||
echo "PLEASE SELECT A CAMPAIGN AND DATE ABOVE AND CLICK SUBMIT\n";
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
|
||||
|
||||
echo "VICIDIAL: Auto-dial Stats $NOW_TIME\n";
|
||||
|
||||
echo "\n";
|
||||
echo "---------- TOTALS\n";
|
||||
|
||||
$stmt="select count(*),sum(length_in_sec) from vicidial_log where call_date >= '$query_date 00:00:01' and call_date <= '$query_date 23:59:59' and campaign_id='$group';";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$row=mysql_fetch_row($rslt);
|
||||
|
||||
$TOTALcalls = sprintf("%10s", $row[0]);
|
||||
$average_hold_seconds = ($row[1] / $row[0]);
|
||||
$average_hold_seconds = round($average_hold_seconds, 0);
|
||||
$average_hold_seconds = sprintf("%10s", $average_hold_seconds);
|
||||
|
||||
echo "Total Calls placed from this Campaign: $TOTALcalls\n";
|
||||
echo "Average Call Length for all Calls in seconds: $average_hold_seconds\n";
|
||||
|
||||
echo "\n";
|
||||
echo "---------- DROPS\n";
|
||||
|
||||
$stmt="select count(*),sum(length_in_sec) from vicidial_log where call_date >= '$query_date 00:00:01' and call_date <= '$query_date 23:59:59' and campaign_id='$group' and status='DROP' and (length_in_sec <= 60 or length_in_sec is null);";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$row=mysql_fetch_row($rslt);
|
||||
|
||||
$DROPcalls = sprintf("%10s", $row[0]);
|
||||
$DROPpercent = (($DROPcalls / $TOTALcalls) * 100);
|
||||
$DROPpercent = round($DROPpercent, 0);
|
||||
|
||||
$average_hold_seconds = ($row[1] / $row[0]);
|
||||
$average_hold_seconds = round($average_hold_seconds, 0);
|
||||
$average_hold_seconds = sprintf("%10s", $average_hold_seconds);
|
||||
|
||||
echo "Total DROP Calls: $DROPcalls $DROPpercent%\n";
|
||||
echo "Average Length for DROP Calls in seconds: $average_hold_seconds\n";
|
||||
|
||||
echo "\n";
|
||||
echo "---------- AUTO-DIAL NO ANSWERS\n";
|
||||
|
||||
$stmt="select count(*),sum(length_in_sec) from vicidial_log where call_date >= '$query_date 00:00:01' and call_date <= '$query_date 23:59:59' and campaign_id='$group' and status='NA' and (length_in_sec <= 60 or length_in_sec is null);";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$row=mysql_fetch_row($rslt);
|
||||
|
||||
$NAcalls = sprintf("%10s", $row[0]);
|
||||
$NApercent = (($NAcalls / $TOTALcalls) * 100);
|
||||
$NApercent = round($NApercent, 0);
|
||||
|
||||
$average_na_seconds = ($row[1] / $row[0]);
|
||||
$average_na_seconds = round($average_na_seconds, 0);
|
||||
$average_na_seconds = sprintf("%10s", $average_na_seconds);
|
||||
|
||||
echo "Total NA calls -Busy,Disconnect,BTvoicemail: $NAcalls $NApercent%\n";
|
||||
echo "Average Call Length for NA Calls in seconds: $average_na_seconds\n";
|
||||
|
||||
|
||||
##############################
|
||||
######### USER STATS
|
||||
|
||||
echo "\n";
|
||||
echo "---------- USER STATS\n";
|
||||
echo "+--------------------------+------------+--------+--------+\n";
|
||||
echo "| USER | CALLS | TIME M | AVRG M |\n";
|
||||
echo "+--------------------------+------------+--------+--------+\n";
|
||||
|
||||
$stmt="select vicidial_log.user,full_name,count(*),sum(length_in_sec),avg(length_in_sec) from vicidial_log,vicidial_users where call_date >= '$query_date 00:00:01' and call_date <= '$query_date 23:59:59' and campaign_id='$group' and vicidial_log.user is not null and length_in_sec is not null and length_in_sec > 4 and vicidial_log.user=vicidial_users.user group by vicidial_log.user;";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$users_to_print = mysql_num_rows($rslt);
|
||||
$i=0;
|
||||
while ($i < $users_to_print)
|
||||
{
|
||||
$row=mysql_fetch_row($rslt);
|
||||
|
||||
$user = sprintf("%-6s", $row[0]);
|
||||
$full_name = sprintf("%-15s", $row[1]); while(strlen($full_name)>15) {$full_name = substr("$full_name", 0, -1);}
|
||||
$USERcalls = sprintf("%10s", $row[2]);
|
||||
$USERtotTALK = $row[3];
|
||||
$USERavgTALK = $row[4];
|
||||
|
||||
$USERtotTALK_M = ($USERtotTALK / 60);
|
||||
$USERtotTALK_M = round($USERtotTALK_M, 2);
|
||||
$USERtotTALK_M_int = intval("$USERtotTALK_M");
|
||||
$USERtotTALK_S = ($USERtotTALK_M - $USERtotTALK_M_int);
|
||||
$USERtotTALK_S = ($USERtotTALK_S * 60);
|
||||
$USERtotTALK_S = round($USERtotTALK_S, 0);
|
||||
if ($USERtotTALK_S < 10) {$USERtotTALK_S = "0$USERtotTALK_S";}
|
||||
$USERtotTALK_MS = "$USERtotTALK_M_int:$USERtotTALK_S";
|
||||
$USERtotTALK_MS = sprintf("%6s", $USERtotTALK_MS);
|
||||
|
||||
$USERavgTALK_M = ($USERavgTALK / 60);
|
||||
$USERavgTALK_M = round($USERavgTALK_M, 2);
|
||||
$USERavgTALK_M_int = intval("$USERavgTALK_M");
|
||||
$USERavgTALK_S = ($USERavgTALK_M - $USERavgTALK_M_int);
|
||||
$USERavgTALK_S = ($USERavgTALK_S * 60);
|
||||
$USERavgTALK_S = round($USERavgTALK_S, 0);
|
||||
if ($USERavgTALK_S < 10) {$USERavgTALK_S = "0$USERavgTALK_S";}
|
||||
$USERavgTALK_MS = "$USERavgTALK_M_int:$USERavgTALK_S";
|
||||
$USERavgTALK_MS = sprintf("%6s", $USERavgTALK_MS);
|
||||
|
||||
echo "| $user - $full_name | $USERcalls | $USERtotTALK_MS | $USERavgTALK_MS |\n";
|
||||
|
||||
$i++;
|
||||
}
|
||||
|
||||
echo "+--------------------------+------------+--------+--------+\n";
|
||||
|
||||
##############################
|
||||
######### TIME STATS
|
||||
|
||||
echo "\n";
|
||||
echo "---------- TIME STATS\n";
|
||||
|
||||
echo "<FONT SIZE=0>\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='$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='$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='$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='$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='$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='$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='$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='$group' and status='DROP';";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$drop_count[$i] = $row[0];
|
||||
$i++;
|
||||
$h++;
|
||||
}
|
||||
|
||||
$hour_multiplier = (100 / $hi_hour_count);
|
||||
#$hour_multiplier = round($hour_multiplier, 0);
|
||||
|
||||
echo "<!-- HICOUNT: $hi_hour_count|$hour_multiplier -->\n";
|
||||
echo "GRAPH IN 15 MINUTE INCREMENTS OF TOTAL CALLS PLACED FROM THIS CAMPAIGN\n";
|
||||
|
||||
$k=1;
|
||||
$Mk=0;
|
||||
$call_scale = '0';
|
||||
while ($k <= 102)
|
||||
{
|
||||
if ($Mk >= 5)
|
||||
{
|
||||
$Mk=0;
|
||||
$scale_num=($k / $hour_multiplier);
|
||||
$scale_num = round($scale_num, 0);
|
||||
$LENscale_num = (strlen($scale_num));
|
||||
$k = ($k + $LENscale_num);
|
||||
$call_scale .= "$scale_num";
|
||||
}
|
||||
else
|
||||
{
|
||||
$call_scale .= " ";
|
||||
$k++; $Mk++;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
echo "+------+-------------------------------------------------------------------------------------------------------+-------+-------+\n";
|
||||
#echo "| HOUR | GRAPH IN 15 MINUTE INCREMENTS OF TOTAL INCOMING CALLS FOR THIS GROUP | DROPS | TOTAL |\n";
|
||||
echo "| HOUR |$call_scale| DROPS | TOTAL |\n";
|
||||
echo "+------+-------------------------------------------------------------------------------------------------------+-------+-------+\n";
|
||||
|
||||
$ZZ = '00';
|
||||
$i=0;
|
||||
$h=4;
|
||||
$hour= -1;
|
||||
$no_lines_yet=1;
|
||||
|
||||
while ($i <= 96)
|
||||
{
|
||||
$char_counter=0;
|
||||
$time = ' ';
|
||||
if ($h >= 4)
|
||||
{
|
||||
$hour++;
|
||||
$h=0;
|
||||
if ($hour < 10) {$hour = "0$hour";}
|
||||
$time = "+$hour$ZZ+";
|
||||
}
|
||||
if ($h == 1) {$time = " 15 ";}
|
||||
if ($h == 2) {$time = " 30 ";}
|
||||
if ($h == 3) {$time = " 45 ";}
|
||||
$Ghour_count = $hour_count[$i];
|
||||
if ($Ghour_count < 1)
|
||||
{
|
||||
if ( ($no_lines_yet) or ($i > $last_full_record) )
|
||||
{
|
||||
$do_nothing=1;
|
||||
}
|
||||
else
|
||||
{
|
||||
$hour_count[$i] = sprintf("%-5s", $hour_count[$i]);
|
||||
echo "|$time|";
|
||||
$k=0; while ($k <= 102) {echo " "; $k++;}
|
||||
echo "| $hour_count[$i] |\n";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$no_lines_yet=0;
|
||||
$Xhour_count = ($Ghour_count * $hour_multiplier);
|
||||
$Yhour_count = (99 - $Xhour_count);
|
||||
|
||||
$Gdrop_count = $drop_count[$i];
|
||||
if ($Gdrop_count < 1)
|
||||
{
|
||||
$hour_count[$i] = sprintf("%-5s", $hour_count[$i]);
|
||||
|
||||
echo "|$time|<SPAN class=\"green\">";
|
||||
$k=0; while ($k <= $Xhour_count) {echo "*"; $k++; $char_counter++;}
|
||||
echo "*X</SPAN>"; $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|<SPAN class=\"red\">";
|
||||
$k=0; while ($k <= $Xdrop_count) {echo ">"; $k++; $char_counter++;}
|
||||
echo "D</SPAN><SPAN class=\"green\">"; $char_counter++;
|
||||
$k=0; while ($k <= $XXhour_count) {echo "*"; $k++; $char_counter++;}
|
||||
echo "X</SPAN>"; $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";
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
?>
|
||||
</PRE>
|
||||
|
||||
</BODY></HTML>
|
||||
@@ -1,135 +0,0 @@
|
||||
<?
|
||||
### AST_VICIDIAL_hopperlist.php
|
||||
###
|
||||
### Copyright (C) 2006 Matt Florell <vicidial@gmail.com> LICENSE: GPLv2
|
||||
###
|
||||
|
||||
require("dbconnect.php");
|
||||
|
||||
$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER'];
|
||||
$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW'];
|
||||
$PHP_SELF=$_SERVER['PHP_SELF'];
|
||||
$group=$_GET["group"]; if (!$group) {$group=$_POST["group"];}
|
||||
$submit=$_GET["submit"]; if (!$submit) {$submit=$_POST["submit"];}
|
||||
$SUBMIT=$_GET["SUBMIT"]; if (!$SUBMIT) {$SUBMIT=$_POST["SUBMIT"];}
|
||||
|
||||
$NOW_DATE = date("Y-m-d");
|
||||
$NOW_TIME = date("Y-m-d H:i:s");
|
||||
$STARTtime = date("U");
|
||||
if (!$query_date) {$query_date = $NOW_DATE;}
|
||||
if (!$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++;
|
||||
}
|
||||
?>
|
||||
|
||||
<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=iso-8859-1\">\n";
|
||||
#echo"<META HTTP-EQUIV=Refresh CONTENT=\"7; URL=$PHP_SELF?server_ip=$server_ip&DB=$DB\">\n";
|
||||
echo "<TITLE>VICIDIAL: Hopper List</TITLE></HEAD><BODY BGCOLOR=WHITE>\n";
|
||||
echo "<FORM ACTION=\"$PHP_SELF\" METHOD=GET>\n";
|
||||
#echo "<INPUT TYPE=HIDDEN NAME=server_ip VALUE=\"$server_ip\">\n";
|
||||
#echo "<INPUT TYPE=TEXT NAME=query_date SIZE=10 MAXLENGTH=10 VALUE=\"$query_date\">\n";
|
||||
echo "<SELECT SIZE=1 NAME=group>\n";
|
||||
$o=0;
|
||||
while ($campaigns_to_print > $o)
|
||||
{
|
||||
if ($campaign_id[$o] == $group) {echo "<option selected value=\"$campaign_id[$o]\">$campaign_id[$o] - $campaign_name[$o]</option>\n";}
|
||||
else {echo "<option value=\"$campaign_id[$o]\">$campaign_id[$o] - $campaign_name[$o]</option>\n";}
|
||||
$o++;
|
||||
}
|
||||
echo "</SELECT>\n";
|
||||
echo "<INPUT TYPE=SUBMIT NAME=SUBMIT VALUE=SUBMIT>\n";
|
||||
echo "</FORM>\n\n";
|
||||
|
||||
echo "<PRE><FONT SIZE=2>\n\n";
|
||||
|
||||
|
||||
if (!$group)
|
||||
{
|
||||
echo "\n\n";
|
||||
echo "PLEASE SELECT A CAMPAIGN ABOVE AND CLICK SUBMIT\n";
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
|
||||
|
||||
echo "VICIDIAL: Live Current Hopper List $NOW_TIME\n";
|
||||
|
||||
echo "\n";
|
||||
echo "---------- TOTALS\n";
|
||||
|
||||
$stmt="select count(*) from vicidial_hopper where campaign_id='$group';";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$row=mysql_fetch_row($rslt);
|
||||
|
||||
$TOTALcalls = sprintf("%10s", $row[0]);
|
||||
|
||||
echo "Total leads in hopper right now: $TOTALcalls\n";
|
||||
|
||||
|
||||
##############################
|
||||
######### LEAD STATS
|
||||
|
||||
echo "\n";
|
||||
echo "---------- LEADS IN HOPPER\n";
|
||||
echo "+------+-----------+------------+-------+--------+-------+--------+\n";
|
||||
echo "| | LEAD_ID | PHONE NUM | STATE | STATUS | COUNT | GMT |\n";
|
||||
echo "+------+-----------+------------+-------+--------+-------+--------+\n";
|
||||
|
||||
$stmt="select vicidial_hopper.lead_id,phone_number,state,vicidial_list.status,called_count,vicidial_hopper.gmt_offset_now from vicidial_hopper,vicidial_list where vicidial_hopper.CAMPAIGN_ID='$group' and vicidial_hopper.lead_id=vicidial_list.lead_id order by hopper_id limit 2000;";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$users_to_print = mysql_num_rows($rslt);
|
||||
$i=0;
|
||||
while ($i < $users_to_print)
|
||||
{
|
||||
$row=mysql_fetch_row($rslt);
|
||||
|
||||
$FMT_i = sprintf("%-4s", $i);
|
||||
$lead_id = sprintf("%-9s", $row[0]);
|
||||
$phone_number = sprintf("%-10s", $row[1]);
|
||||
$state = sprintf("%-5s", $row[2]);
|
||||
$status = sprintf("%-6s", $row[3]);
|
||||
$count = sprintf("%-5s", $row[4]);
|
||||
$gmt = sprintf("%-6s", $row[5]);
|
||||
|
||||
echo "| $FMT_i | $lead_id | $phone_number | $state | $status | $count | $gmt |\n";
|
||||
|
||||
$i++;
|
||||
}
|
||||
|
||||
echo "+------+-----------+------------+-------+--------+-------+--------+\n";
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
?>
|
||||
</PRE>
|
||||
|
||||
</BODY></HTML>
|
||||
@@ -1,105 +0,0 @@
|
||||
<?
|
||||
require("dbconnect.php");
|
||||
|
||||
##### depricated
|
||||
#require_once("htglobalize.php");
|
||||
|
||||
$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER'];
|
||||
$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW'];
|
||||
$PHP_SELF=$_SERVER['PHP_SELF'];
|
||||
$query_date=$_GET["query_date"]; if (!$query_date) {$query_date=$_POST["query_date"];}
|
||||
$submit=$_GET["submit"]; if (!$submit) {$submit=$_POST["submit"];}
|
||||
$SUBMIT=$_GET["SUBMIT"]; if (!$SUBMIT) {$SUBMIT=$_POST["SUBMIT"];}
|
||||
|
||||
### AST GUI database administration
|
||||
### AST_admin_log_display.php
|
||||
###
|
||||
### CHANGES
|
||||
### 50325-0932 - First build
|
||||
### 51123-1443 - removed globals=on requirement
|
||||
|
||||
|
||||
$version = '0.0.1';
|
||||
$build = '50325-0932';
|
||||
|
||||
$STARTtime = date("U");
|
||||
|
||||
$stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 7;";
|
||||
if ($DB) {echo "|$stmt|\n";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$auth=$row[0];
|
||||
|
||||
$fp = fopen ("./project_auth_entries.txt", "a");
|
||||
$date = date("r");
|
||||
$ip = getenv("REMOTE_ADDR");
|
||||
$browser = getenv("HTTP_USER_AGENT");
|
||||
|
||||
if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or (!$auth))
|
||||
{
|
||||
Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\"");
|
||||
Header("HTTP/1.0 401 Unauthorized");
|
||||
echo "Invalid Username/Password: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n";
|
||||
exit;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
if($auth>0)
|
||||
{
|
||||
$office_no=strtoupper($PHP_AUTH_USER);
|
||||
$password=strtoupper($PHP_AUTH_PW);
|
||||
$stmt="SELECT full_name from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW'";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$LOGfullname=$row[0];
|
||||
fwrite ($fp, "VICIDIAL|GOOD|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|$LOGfullname|\n");
|
||||
fclose($fp);
|
||||
}
|
||||
else
|
||||
{
|
||||
fwrite ($fp, "VICIDIAL|FAIL|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|\n");
|
||||
fclose($fp);
|
||||
}
|
||||
}
|
||||
|
||||
echo "<html>\n";
|
||||
echo "<head>\n";
|
||||
echo "<!-- VERSION: $version BUILD: $build ADD: $ADD-->\n";
|
||||
echo "<title>VICIDIAL ADMIN LOG DISPLAY</title>";
|
||||
echo "</head>\n";
|
||||
|
||||
# Fri, 25 Mar 2005
|
||||
|
||||
$DAY_DATE = date("j");
|
||||
if ($DAY_DATE < 10)
|
||||
{$GREP_DATE = date("D, j 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 "<!-- |$query_date|$Gquery_date| -->\n";
|
||||
|
||||
echo "<FORM ACTION=\"$PHP_SELF\" METHOD=GET>\n";
|
||||
echo "<INPUT TYPE=TEXT NAME=query_date SIZE=20 MAXLENGTH=20 VALUE=\"$query_date\">\n";
|
||||
echo "<INPUT TYPE=SUBMIT NAME=SUBMIT VALUE=SUBMIT>\n";
|
||||
echo "</FORM>\n\n";
|
||||
|
||||
echo "<PRE><FONT SIZE=2>\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");
|
||||
|
||||
|
||||
?>
|
||||
</PRE>
|
||||
|
||||
</BODY></HTML>
|
||||
@@ -1,205 +0,0 @@
|
||||
<?
|
||||
require("dbconnect.php");
|
||||
|
||||
##### depricated
|
||||
#require_once("htglobalize.php");
|
||||
|
||||
$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER'];
|
||||
$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW'];
|
||||
$PHP_SELF=$_SERVER['PHP_SELF'];
|
||||
$group=$_GET["group"]; if (!$group) {$group=$_POST["group"];}
|
||||
$query_date=$_GET["query_date"]; if (!$query_date) {$query_date=$_POST["query_date"];}
|
||||
$shift=$_GET["shift"]; if (!$shift) {$shift=$_POST["shift"];}
|
||||
$submit=$_GET["submit"]; if (!$submit) {$submit=$_POST["submit"];}
|
||||
$SUBMIT=$_GET["SUBMIT"]; if (!$SUBMIT) {$SUBMIT=$_POST["SUBMIT"];}
|
||||
|
||||
# AST_agent_performance.php
|
||||
|
||||
$NOW_DATE = date("Y-m-d");
|
||||
$NOW_TIME = date("Y-m-d H:i:s");
|
||||
$STARTtime = date("U");
|
||||
if (!$query_date) {$query_date = $NOW_DATE;}
|
||||
|
||||
$stmt="select campaign_id from vicidial_campaigns;";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$campaigns_to_print = mysql_num_rows($rslt);
|
||||
$i=0;
|
||||
while ($i < $campaigns_to_print)
|
||||
{
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$groups[$i] =$row[0];
|
||||
$i++;
|
||||
}
|
||||
?>
|
||||
|
||||
<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=iso-8859-1\">\n";
|
||||
#echo"<META HTTP-EQUIV=Refresh CONTENT=\"7; URL=$PHP_SELF?server_ip=$server_ip&DB=$DB\">\n";
|
||||
# query_date - 2005-05-10
|
||||
echo "<TITLE>VICIDIAL: Agent Performance</TITLE></HEAD><BODY BGCOLOR=WHITE>\n";
|
||||
echo "<FORM ACTION=\"$PHP_SELF\" METHOD=GET>\n";
|
||||
echo "<INPUT TYPE=TEXT NAME=query_date SIZE=19 MAXLENGTH=19 VALUE=\"$query_date\">\n";
|
||||
echo "<SELECT SIZE=1 NAME=group>\n";
|
||||
$o=0;
|
||||
while ($campaigns_to_print > $o)
|
||||
{
|
||||
if ($groups[$o] == $group) {echo "<option selected value=\"$groups[$o]\">$groups[$o]</option>\n";}
|
||||
else {echo "<option value=\"$groups[$o]\">$groups[$o]</option>\n";}
|
||||
$o++;
|
||||
}
|
||||
echo "</SELECT>\n";
|
||||
echo "<SELECT SIZE=1 NAME=shift>\n";
|
||||
echo "<option selected value=\"AM\">AM</option>\n";
|
||||
echo "<option value=\"PM\">PM</option>\n";
|
||||
echo "</SELECT>\n";
|
||||
echo "<INPUT TYPE=SUBMIT NAME=SUBMIT VALUE=SUBMIT>\n";
|
||||
echo "</FORM>\n\n";
|
||||
|
||||
echo "<PRE><FONT SIZE=2>\n";
|
||||
|
||||
|
||||
if (!$group)
|
||||
{
|
||||
echo "\n";
|
||||
echo "PLEASE SELECT A SERVER AND DATE-TIME ABOVE AND CLICK SUBMIT\n";
|
||||
echo " NOTE: stats taken from 6 hour shift specified\n";
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
if ($shift == 'AM')
|
||||
{
|
||||
$query_date_BEGIN = "$query_date 08:45:00";
|
||||
$query_date_END = "$query_date 15:33:00";
|
||||
$time_BEGIN = "08:45:00";
|
||||
$time_END = "15:33:00";
|
||||
}
|
||||
if ($shift == 'PM')
|
||||
{
|
||||
$query_date_BEGIN = "$query_date 15:33:00";
|
||||
$query_date_END = "$query_date 23:15:00";
|
||||
$time_BEGIN = "15:33:00";
|
||||
$time_END = "23:15:00";
|
||||
}
|
||||
|
||||
echo "VICIDIAL: Agent Performance $NOW_TIME\n";
|
||||
|
||||
echo "Time range: $query_date_BEGIN to $query_date_END\n\n";
|
||||
echo "---------- AGENTS Details -------------\n\n";
|
||||
|
||||
echo "+-----------------+--------+--------+--------+--------+------+------+------+------+------+------+------+\n";
|
||||
echo "| USER NAME | ID | CALLS | TALK | TALKAVG| A | B | DC | DNC | N | NI | SALE |\n";
|
||||
echo "+-----------------+--------+--------+--------+--------+------+------+------+------+------+------+------+\n";
|
||||
|
||||
$stmt="select count(*) as calls,sum(length_in_sec) as talk,full_name,vicidial_users.user,avg(length_in_sec) from vicidial_users,vicidial_log where call_date <= '$query_date_END' and call_date >= '$query_date_BEGIN' and vicidial_users.user=vicidial_log.user and campaign_id='$group' group by full_name order by calls desc limit 1000;";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$rows_to_print = mysql_num_rows($rslt);
|
||||
$i=0;
|
||||
while ($i < $rows_to_print)
|
||||
{
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$TOTcalls=($TOTcalls + $row[0]);
|
||||
$TOTtotTALK=($TOTtotTALK + $row[1]);
|
||||
$calls[$i] = sprintf("%-6s", $row[0]);
|
||||
$full_name[$i]= sprintf("%-15s", $row[2]); while(strlen($full_name[$i])>15) {$full_name[$i] = substr("$full_name[$i]", 0, -1);}
|
||||
$user[$i] = sprintf("%-6s", $row[3]);
|
||||
$USERtotTALK = $row[1];
|
||||
$USERavgTALK = $row[4];
|
||||
|
||||
$USERtotTALK_M = ($USERtotTALK / 60);
|
||||
$USERtotTALK_M = round($USERtotTALK_M, 2);
|
||||
$USERtotTALK_M_int = intval("$USERtotTALK_M");
|
||||
$USERtotTALK_S = ($USERtotTALK_M - $USERtotTALK_M_int);
|
||||
$USERtotTALK_S = ($USERtotTALK_S * 60);
|
||||
$USERtotTALK_S = round($USERtotTALK_S, 0);
|
||||
if ($USERtotTALK_S < 10) {$USERtotTALK_S = "0$USERtotTALK_S";}
|
||||
$USERtotTALK_MS = "$USERtotTALK_M_int:$USERtotTALK_S";
|
||||
$pfUSERtotTALK_MS[$i] = sprintf("%6s", $USERtotTALK_MS);
|
||||
|
||||
$USERavgTALK_M = ($USERavgTALK / 60);
|
||||
$USERavgTALK_M = round($USERavgTALK_M, 2);
|
||||
$USERavgTALK_M_int = intval("$USERavgTALK_M");
|
||||
$USERavgTALK_S = ($USERavgTALK_M - $USERavgTALK_M_int);
|
||||
$USERavgTALK_S = ($USERavgTALK_S * 60);
|
||||
$USERavgTALK_S = round($USERavgTALK_S, 0);
|
||||
if ($USERavgTALK_S < 10) {$USERavgTALK_S = "0$USERavgTALK_S";}
|
||||
$USERavgTALK_MS = "$USERavgTALK_M_int:$USERavgTALK_S";
|
||||
$pfUSERavgTALK_MS[$i] = sprintf("%6s", $USERavgTALK_MS);
|
||||
$i++;
|
||||
}
|
||||
|
||||
$k=0;
|
||||
while($k < $i)
|
||||
{
|
||||
$ctA[$k]="0 "; $ctB[$k]="0 "; $ctDC[$k]="0 "; $ctDNC[$k]="0 "; $ctN[$k]="0 "; $ctNI[$k]="0 "; $ctSALE[$k]="0 ";
|
||||
$stmt="select count(*),status from vicidial_log where call_date <= '$query_date_END' and call_date >= '$query_date_BEGIN' and user='$user[$k]' and campaign_id='$group' group by status;";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$rows_to_print = mysql_num_rows($rslt);
|
||||
$m=0;
|
||||
while ($m < $rows_to_print)
|
||||
{
|
||||
$row=mysql_fetch_row($rslt);
|
||||
if ($row[1] == 'A') {$ctA[$k]=sprintf("%-4s", $row[0]); $TOT_A = ($TOT_A + $row[0]);}
|
||||
if ($row[1] == 'B') {$ctB[$k]=sprintf("%-4s", $row[0]); $TOT_B = ($TOT_B + $row[0]);}
|
||||
if ($row[1] == 'DC') {$ctDC[$k]=sprintf("%-4s", $row[0]); $TOT_DC = ($TOT_DC + $row[0]);}
|
||||
if ($row[1] == 'DNC') {$ctDNC[$k]=sprintf("%-4s", $row[0]); $TOT_DNC = ($TOT_DNC + $row[0]);}
|
||||
if ($row[1] == 'N') {$ctN[$k]=sprintf("%-4s", $row[0]); $TOT_N = ($TOT_N + $row[0]);}
|
||||
if ($row[1] == 'NI') {$ctNI[$k]=sprintf("%-4s", $row[0]); $TOT_NI = ($TOT_NI + $row[0]);}
|
||||
if (($row[1] == 'SALE') || ($row[1] == 'XFER') ) {$ctSALE[$k]=sprintf("%-4s", $row[0]); $TOT_SALE = ($TOT_SALE + $row[0]);}
|
||||
$m++;
|
||||
}
|
||||
echo "| $full_name[$k] | $user[$k] | $calls[$k] | $pfUSERtotTALK_MS[$k] | $pfUSERavgTALK_MS[$k] | $ctA[$k] | $ctB[$k] | $ctDC[$k] | $ctDNC[$k] | $ctN[$k] | $ctNI[$k] | $ctSALE[$k] |\n";
|
||||
|
||||
|
||||
|
||||
$k++;
|
||||
}
|
||||
|
||||
$TOTcalls = sprintf("%-7s", $TOTcalls);
|
||||
|
||||
$TOTtotTALK_M = ($TOTtotTALK / 60);
|
||||
$TOTtotTALK_M = round($TOTtotTALK_M, 2);
|
||||
$TOTtotTALK_M_int = intval("$TOTtotTALK_M");
|
||||
$TOTtotTALK_S = ($TOTtotTALK_M - $TOTtotTALK_M_int);
|
||||
$TOTtotTALK_S = ($TOTtotTALK_S * 60);
|
||||
$TOTtotTALK_S = round($TOTtotTALK_S, 0);
|
||||
if ($TOTtotTALK_S < 10) {$TOTtotTALK_S = "0$TOTtotTALK_S";}
|
||||
$TOTtotTALK_MS = "$TOTtotTALK_M_int:$TOTtotTALK_S";
|
||||
$TOTtotTALK_MS = sprintf("%7s", $TOTtotTALK_MS);
|
||||
while(strlen($TOTtotTALK_MS)>7) {$TOTtotTALK_MS = substr("$TOTtotTALK_MS", 0, -1);}
|
||||
|
||||
$TOT_A = sprintf("%-5s", $TOT_A);
|
||||
$TOT_B = sprintf("%-5s", $TOT_B);
|
||||
$TOT_DC = sprintf("%-5s", $TOT_DC);
|
||||
$TOT_DNC = sprintf("%-5s", $TOT_DNC);
|
||||
$TOT_N = sprintf("%-5s", $TOT_N);
|
||||
$TOT_NI = sprintf("%-5s", $TOT_NI);
|
||||
$TOT_SALE = sprintf("%-5s", $TOT_SALE);
|
||||
|
||||
echo "+-----------------+--------+--------+--------+--------+------+------+------+------+------+------+------+\n";
|
||||
echo "| TOTALS | $TOTcalls| $TOTtotTALK_MS| | $TOT_A| $TOT_B| $TOT_DC| $TOT_DNC| $TOT_N| $TOT_NI| $TOT_SALE|\n";
|
||||
echo "+-----------------+--------+--------+--------+--------+------+------+------+------+------+------+------+\n";
|
||||
|
||||
echo "\n";
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
?>
|
||||
|
||||
</BODY></HTML>
|
||||
@@ -1,379 +0,0 @@
|
||||
<?
|
||||
### AST_agent_performance_detail.php
|
||||
###
|
||||
### Copyright (C) 2006 Matt Florell <vicidial@gmail.com> LICENSE: GPLv2
|
||||
###
|
||||
|
||||
require("dbconnect.php");
|
||||
|
||||
$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER'];
|
||||
$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW'];
|
||||
$PHP_SELF=$_SERVER['PHP_SELF'];
|
||||
$query_date=$_GET["query_date"]; if (!$query_date) {$query_date=$_POST["query_date"];}
|
||||
$group=$_GET["group"]; if (!$group) {$group=$_POST["group"];}
|
||||
$shift=$_GET["shift"]; if (!$shift) {$shift=$_POST["shift"];}
|
||||
$submit=$_GET["submit"]; if (!$submit) {$submit=$_POST["submit"];}
|
||||
$SUBMIT=$_GET["SUBMIT"]; if (!$SUBMIT) {$SUBMIT=$_POST["SUBMIT"];}
|
||||
|
||||
$NOW_DATE = date("Y-m-d");
|
||||
$NOW_TIME = date("Y-m-d H:i:s");
|
||||
$STARTtime = date("U");
|
||||
if (!$query_date) {$query_date = $NOW_DATE;}
|
||||
|
||||
$stmt="select campaign_id from vicidial_campaigns;";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$campaigns_to_print = mysql_num_rows($rslt);
|
||||
$i=0;
|
||||
while ($i < $campaigns_to_print)
|
||||
{
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$groups[$i] =$row[0];
|
||||
$i++;
|
||||
}
|
||||
?>
|
||||
|
||||
<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=iso-8859-1\">\n";
|
||||
#echo"<META HTTP-EQUIV=Refresh CONTENT=\"7; URL=$PHP_SELF?server_ip=$server_ip&DB=$DB\">\n";
|
||||
# query_date - 2005-05-10
|
||||
echo "<TITLE>VICIDIAL: Agent Performance</TITLE></HEAD><BODY BGCOLOR=WHITE>\n";
|
||||
echo "<FORM ACTION=\"$PHP_SELF\" METHOD=GET>\n";
|
||||
echo "<INPUT TYPE=TEXT NAME=query_date SIZE=19 MAXLENGTH=19 VALUE=\"$query_date\">\n";
|
||||
echo "<SELECT SIZE=1 NAME=group>\n";
|
||||
$o=0;
|
||||
while ($campaigns_to_print > $o)
|
||||
{
|
||||
if ($groups[$o] == $group) {echo "<option selected value=\"$groups[$o]\">$groups[$o]</option>\n";}
|
||||
else {echo "<option value=\"$groups[$o]\">$groups[$o]</option>\n";}
|
||||
$o++;
|
||||
}
|
||||
echo "</SELECT>\n";
|
||||
echo "<SELECT SIZE=1 NAME=shift>\n";
|
||||
echo "<option selected value=\"AM\">AM</option>\n";
|
||||
echo "<option value=\"PM\">PM</option>\n";
|
||||
echo "</SELECT>\n";
|
||||
echo "<INPUT TYPE=SUBMIT NAME=SUBMIT VALUE=SUBMIT>\n";
|
||||
echo "</FORM>\n\n";
|
||||
|
||||
echo "<PRE><FONT SIZE=2>\n";
|
||||
|
||||
|
||||
if (!$group)
|
||||
{
|
||||
echo "\n";
|
||||
echo "PLEASE SELECT A CAMPAIGN AND DATE-TIME ABOVE AND CLICK SUBMIT\n";
|
||||
echo " NOTE: stats taken from 6 hour shift specified\n";
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
if ($shift == 'AM')
|
||||
{
|
||||
$query_date_BEGIN = "$query_date 03:45:00";
|
||||
$query_date_END = "$query_date 15:15:00";
|
||||
$time_BEGIN = "03:45:00";
|
||||
$time_END = "15:15:00";
|
||||
}
|
||||
if ($shift == 'PM')
|
||||
{
|
||||
$query_date_BEGIN = "$query_date 15:15:00";
|
||||
$query_date_END = "$query_date 23:15:00";
|
||||
$time_BEGIN = "15:15:00";
|
||||
$time_END = "23:15:00";
|
||||
}
|
||||
|
||||
echo "VICIDIAL: Agent Performance Detail $NOW_TIME\n";
|
||||
|
||||
echo "Time range: $query_date_BEGIN to $query_date_END\n\n";
|
||||
echo "---------- AGENTS Details -------------\n\n";
|
||||
|
||||
echo "+-----------------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+------+------+------+------+------+------+------+------+\n";
|
||||
echo "| USER NAME | ID | CALLS | TIME | PAUSE | PAUSAVG| WAIT | WAITAVG| TALK | TALKAVG| DISPO | DISPAVG| A | B | DC | DNC | N | NI | CB | SALE |\n";
|
||||
echo "+-----------------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+------+------+------+------+------+------+------+------+\n";
|
||||
|
||||
$stmt="select count(*) as calls,sum(talk_sec) as talk,full_name,vicidial_users.user,avg(talk_sec),sum(pause_sec),avg(pause_sec),sum(wait_sec),avg(wait_sec),sum(dispo_sec),avg(dispo_sec) from vicidial_users,vicidial_agent_log where event_time <= '$query_date_END' and event_time >= '$query_date_BEGIN' and vicidial_users.user=vicidial_agent_log.user and campaign_id='$group' and pause_sec<48800 and wait_sec<48800 and talk_sec<48800 and dispo_sec<48800 group by full_name order by calls desc limit 1000;";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$rows_to_print = mysql_num_rows($rslt);
|
||||
$i=0;
|
||||
while ($i < $rows_to_print)
|
||||
{
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$TOTcalls=($TOTcalls + $row[0]);
|
||||
$TOTtime=($TOTtime + $row[1] + $row[5] + $row[7] + $row[9]);
|
||||
$TOTtotTALK=($TOTtotTALK + $row[1]);
|
||||
$TOTtotWAIT=($TOTtotWAIT + $row[7]);
|
||||
$TOTtotPAUSE=($TOTtotPAUSE + $row[5]);
|
||||
$TOTtotDISPO=($TOTtotDISPO + $row[9]);
|
||||
$calls[$i] = sprintf("%-6s", $row[0]);
|
||||
$full_name[$i]= sprintf("%-15s", $row[2]); while(strlen($full_name[$i])>15) {$full_name[$i] = substr("$full_name[$i]", 0, -1);}
|
||||
$user[$i] = sprintf("%-6s", $row[3]);
|
||||
$USERtime = ($row[1] + $row[5] + $row[7] + $row[9]);
|
||||
$USERtotTALK = $row[1];
|
||||
$USERavgTALK = $row[4];
|
||||
$USERtotPAUSE = $row[5];
|
||||
$USERavgPAUSE = $row[6];
|
||||
$USERtotWAIT = $row[7];
|
||||
$USERavgWAIT = $row[8];
|
||||
$USERtotDISPO = $row[9];
|
||||
$USERavgDISPO = $row[10];
|
||||
|
||||
$USERtime_M = ($USERtime / 60);
|
||||
$USERtime_M = round($USERtime_M, 2);
|
||||
$USERtime_M_int = intval("$USERtime_M");
|
||||
$USERtime_S = ($USERtime_M - $USERtime_M_int);
|
||||
$USERtime_S = ($USERtime_S * 60);
|
||||
$USERtime_S = round($USERtime_S, 0);
|
||||
if ($USERtime_S < 10) {$USERtime_S = "0$USERtime_S";}
|
||||
$USERtime_MS = "$USERtime_M_int:$USERtime_S";
|
||||
$pfUSERtime_MS[$i] = sprintf("%7s", $USERtime_MS);
|
||||
|
||||
$USERtotTALK_M = ($USERtotTALK / 60);
|
||||
$USERtotTALK_M = round($USERtotTALK_M, 2);
|
||||
$USERtotTALK_M_int = intval("$USERtotTALK_M");
|
||||
$USERtotTALK_S = ($USERtotTALK_M - $USERtotTALK_M_int);
|
||||
$USERtotTALK_S = ($USERtotTALK_S * 60);
|
||||
$USERtotTALK_S = round($USERtotTALK_S, 0);
|
||||
if ($USERtotTALK_S < 10) {$USERtotTALK_S = "0$USERtotTALK_S";}
|
||||
$USERtotTALK_MS = "$USERtotTALK_M_int:$USERtotTALK_S";
|
||||
$pfUSERtotTALK_MS[$i] = sprintf("%6s", $USERtotTALK_MS);
|
||||
|
||||
$USERavgTALK_M = ($USERavgTALK / 60);
|
||||
$USERavgTALK_M = round($USERavgTALK_M, 2);
|
||||
$USERavgTALK_M_int = intval("$USERavgTALK_M");
|
||||
$USERavgTALK_S = ($USERavgTALK_M - $USERavgTALK_M_int);
|
||||
$USERavgTALK_S = ($USERavgTALK_S * 60);
|
||||
$USERavgTALK_S = round($USERavgTALK_S, 0);
|
||||
if ($USERavgTALK_S < 10) {$USERavgTALK_S = "0$USERavgTALK_S";}
|
||||
$USERavgTALK_MS = "$USERavgTALK_M_int:$USERavgTALK_S";
|
||||
$pfUSERavgTALK_MS[$i] = sprintf("%6s", $USERavgTALK_MS);
|
||||
|
||||
$USERtotPAUSE_M = ($USERtotPAUSE / 60);
|
||||
$USERtotPAUSE_M = round($USERtotPAUSE_M, 2);
|
||||
$USERtotPAUSE_M_int = intval("$USERtotPAUSE_M");
|
||||
$USERtotPAUSE_S = ($USERtotPAUSE_M - $USERtotPAUSE_M_int);
|
||||
$USERtotPAUSE_S = ($USERtotPAUSE_S * 60);
|
||||
$USERtotPAUSE_S = round($USERtotPAUSE_S, 0);
|
||||
if ($USERtotPAUSE_S < 10) {$USERtotPAUSE_S = "0$USERtotPAUSE_S";}
|
||||
$USERtotPAUSE_MS = "$USERtotPAUSE_M_int:$USERtotPAUSE_S";
|
||||
$pfUSERtotPAUSE_MS[$i] = sprintf("%6s", $USERtotPAUSE_MS);
|
||||
|
||||
$USERavgPAUSE_M = ($USERavgPAUSE / 60);
|
||||
$USERavgPAUSE_M = round($USERavgPAUSE_M, 2);
|
||||
$USERavgPAUSE_M_int = intval("$USERavgPAUSE_M");
|
||||
$USERavgPAUSE_S = ($USERavgPAUSE_M - $USERavgPAUSE_M_int);
|
||||
$USERavgPAUSE_S = ($USERavgPAUSE_S * 60);
|
||||
$USERavgPAUSE_S = round($USERavgPAUSE_S, 0);
|
||||
if ($USERavgPAUSE_S < 10) {$USERavgPAUSE_S = "0$USERavgPAUSE_S";}
|
||||
$USERavgPAUSE_MS = "$USERavgPAUSE_M_int:$USERavgPAUSE_S";
|
||||
$pfUSERavgPAUSE_MS[$i] = sprintf("%6s", $USERavgPAUSE_MS);
|
||||
|
||||
$USERtotWAIT_M = ($USERtotWAIT / 60);
|
||||
$USERtotWAIT_M = round($USERtotWAIT_M, 2);
|
||||
$USERtotWAIT_M_int = intval("$USERtotWAIT_M");
|
||||
$USERtotWAIT_S = ($USERtotWAIT_M - $USERtotWAIT_M_int);
|
||||
$USERtotWAIT_S = ($USERtotWAIT_S * 60);
|
||||
$USERtotWAIT_S = round($USERtotWAIT_S, 0);
|
||||
if ($USERtotWAIT_S < 10) {$USERtotWAIT_S = "0$USERtotWAIT_S";}
|
||||
$USERtotWAIT_MS = "$USERtotWAIT_M_int:$USERtotWAIT_S";
|
||||
$pfUSERtotWAIT_MS[$i] = sprintf("%6s", $USERtotWAIT_MS);
|
||||
|
||||
$USERavgWAIT_M = ($USERavgWAIT / 60);
|
||||
$USERavgWAIT_M = round($USERavgWAIT_M, 2);
|
||||
$USERavgWAIT_M_int = intval("$USERavgWAIT_M");
|
||||
$USERavgWAIT_S = ($USERavgWAIT_M - $USERavgWAIT_M_int);
|
||||
$USERavgWAIT_S = ($USERavgWAIT_S * 60);
|
||||
$USERavgWAIT_S = round($USERavgWAIT_S, 0);
|
||||
if ($USERavgWAIT_S < 10) {$USERavgWAIT_S = "0$USERavgWAIT_S";}
|
||||
$USERavgWAIT_MS = "$USERavgWAIT_M_int:$USERavgWAIT_S";
|
||||
$pfUSERavgWAIT_MS[$i] = sprintf("%6s", $USERavgWAIT_MS);
|
||||
|
||||
$USERtotDISPO_M = ($USERtotDISPO / 60);
|
||||
$USERtotDISPO_M = round($USERtotDISPO_M, 2);
|
||||
$USERtotDISPO_M_int = intval("$USERtotDISPO_M");
|
||||
$USERtotDISPO_S = ($USERtotDISPO_M - $USERtotDISPO_M_int);
|
||||
$USERtotDISPO_S = ($USERtotDISPO_S * 60);
|
||||
$USERtotDISPO_S = round($USERtotDISPO_S, 0);
|
||||
if ($USERtotDISPO_S < 10) {$USERtotDISPO_S = "0$USERtotDISPO_S";}
|
||||
$USERtotDISPO_MS = "$USERtotDISPO_M_int:$USERtotDISPO_S";
|
||||
$pfUSERtotDISPO_MS[$i] = sprintf("%6s", $USERtotDISPO_MS);
|
||||
|
||||
$USERavgDISPO_M = ($USERavgDISPO / 60);
|
||||
$USERavgDISPO_M = round($USERavgDISPO_M, 2);
|
||||
$USERavgDISPO_M_int = intval("$USERavgDISPO_M");
|
||||
$USERavgDISPO_S = ($USERavgDISPO_M - $USERavgDISPO_M_int);
|
||||
$USERavgDISPO_S = ($USERavgDISPO_S * 60);
|
||||
$USERavgDISPO_S = round($USERavgDISPO_S, 0);
|
||||
if ($USERavgDISPO_S < 10) {$USERavgDISPO_S = "0$USERavgDISPO_S";}
|
||||
$USERavgDISPO_MS = "$USERavgDISPO_M_int:$USERavgDISPO_S";
|
||||
$pfUSERavgDISPO_MS[$i] = sprintf("%6s", $USERavgDISPO_MS);
|
||||
|
||||
$i++;
|
||||
}
|
||||
|
||||
$k=0;
|
||||
while($k < $i)
|
||||
{
|
||||
$ctA[$k]="0 "; $ctB[$k]="0 "; $ctDC[$k]="0 "; $ctDNC[$k]="0 "; $ctN[$k]="0 "; $ctNI[$k]="0 "; $ctSALE[$k]="0 "; $ctCB[$k]="0 ";
|
||||
$stmt="select count(*),status from vicidial_agent_log where event_time <= '$query_date_END' and event_time >= '$query_date_BEGIN' and user='$user[$k]' and campaign_id='$group' group by status;";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$rows_to_print = mysql_num_rows($rslt);
|
||||
$m=0;
|
||||
while ($m < $rows_to_print)
|
||||
{
|
||||
$row=mysql_fetch_row($rslt);
|
||||
if ($row[1] == 'A') {$ctA[$k]=sprintf("%-4s", $row[0]); $TOT_A = ($TOT_A + $row[0]);}
|
||||
if ($row[1] == 'B') {$ctB[$k]=sprintf("%-4s", $row[0]); $TOT_B = ($TOT_B + $row[0]);}
|
||||
if ($row[1] == 'DC') {$ctDC[$k]=sprintf("%-4s", $row[0]); $TOT_DC = ($TOT_DC + $row[0]);}
|
||||
if ($row[1] == 'DNC') {$ctDNC[$k]=sprintf("%-4s", $row[0]); $TOT_DNC = ($TOT_DNC + $row[0]);}
|
||||
if ($row[1] == 'N') {$ctN[$k]=sprintf("%-4s", $row[0]); $TOT_N = ($TOT_N + $row[0]);}
|
||||
if ($row[1] == 'NI') {$ctNI[$k]=sprintf("%-4s", $row[0]); $TOT_NI = ($TOT_NI + $row[0]);}
|
||||
if (($row[1] == 'SALE') || ($row[1] == 'XFER') ) {$ctSALE[$k]=sprintf("%-4s", $row[0]); $TOT_SALE = ($TOT_SALE + $row[0]);}
|
||||
if (($row[1] == 'CALLBK') || ($row[1] == 'CBHOLD') ) {$ctCB[$k]=sprintf("%-4s", $row[0]); $TOT_CB = ($TOT_CB + $row[0]);}
|
||||
$m++;
|
||||
}
|
||||
echo "| $full_name[$k] | $user[$k] | $calls[$k] | $pfUSERtime_MS[$k]| $pfUSERtotPAUSE_MS[$k] | $pfUSERavgPAUSE_MS[$k] | $pfUSERtotWAIT_MS[$k] | $pfUSERavgWAIT_MS[$k] | $pfUSERtotTALK_MS[$k] | $pfUSERavgTALK_MS[$k] | $pfUSERtotDISPO_MS[$k] | $pfUSERavgDISPO_MS[$k] | $ctA[$k] | $ctB[$k] | $ctDC[$k] | $ctDNC[$k] | $ctN[$k] | $ctNI[$k] | $ctCB[$k] | $ctSALE[$k] |\n";
|
||||
|
||||
|
||||
|
||||
$k++;
|
||||
}
|
||||
|
||||
$TOTcalls = sprintf("%-7s", $TOTcalls);
|
||||
|
||||
$TOTtime_M = ($TOTtime / 60);
|
||||
$TOTtime_M = round($TOTtime_M, 2);
|
||||
$TOTtime_M_int = intval("$TOTtime_M");
|
||||
$TOTtime_S = ($TOTtime_M - $TOTtime_M_int);
|
||||
$TOTtime_S = ($TOTtime_S * 60);
|
||||
$TOTtime_S = round($TOTtime_S, 0);
|
||||
if ($TOTtime_S < 10) {$TOTtime_S = "0$TOTtime_S";}
|
||||
$TOTtime_MS = "$TOTtime_M_int:$TOTtime_S";
|
||||
$TOTtime_MS = sprintf("%7s", $TOTtime_MS);
|
||||
while(strlen($TOTtime_MS)>7) {$TOTtime_MS = substr("$TOTtime_MS", 0, -1);}
|
||||
|
||||
$TOTtotTALK_M = ($TOTtotTALK / 60);
|
||||
$TOTtotTALK_M = round($TOTtotTALK_M, 2);
|
||||
$TOTtotTALK_M_int = intval("$TOTtotTALK_M");
|
||||
$TOTtotTALK_S = ($TOTtotTALK_M - $TOTtotTALK_M_int);
|
||||
$TOTtotTALK_S = ($TOTtotTALK_S * 60);
|
||||
$TOTtotTALK_S = round($TOTtotTALK_S, 0);
|
||||
if ($TOTtotTALK_S < 10) {$TOTtotTALK_S = "0$TOTtotTALK_S";}
|
||||
$TOTtotTALK_MS = "$TOTtotTALK_M_int:$TOTtotTALK_S";
|
||||
$TOTtotTALK_MS = sprintf("%7s", $TOTtotTALK_MS);
|
||||
while(strlen($TOTtotTALK_MS)>7) {$TOTtotTALK_MS = substr("$TOTtotTALK_MS", 0, -1);}
|
||||
|
||||
$TOTtotDISPO_M = ($TOTtotDISPO / 60);
|
||||
$TOTtotDISPO_M = round($TOTtotDISPO_M, 2);
|
||||
$TOTtotDISPO_M_int = intval("$TOTtotDISPO_M");
|
||||
$TOTtotDISPO_S = ($TOTtotDISPO_M - $TOTtotDISPO_M_int);
|
||||
$TOTtotDISPO_S = ($TOTtotDISPO_S * 60);
|
||||
$TOTtotDISPO_S = round($TOTtotDISPO_S, 0);
|
||||
if ($TOTtotDISPO_S < 10) {$TOTtotDISPO_S = "0$TOTtotDISPO_S";}
|
||||
$TOTtotDISPO_MS = "$TOTtotDISPO_M_int:$TOTtotDISPO_S";
|
||||
$TOTtotDISPO_MS = sprintf("%7s", $TOTtotDISPO_MS);
|
||||
while(strlen($TOTtotDISPO_MS)>7) {$TOTtotDISPO_MS = substr("$TOTtotDISPO_MS", 0, -1);}
|
||||
|
||||
$TOTtotPAUSE_M = ($TOTtotPAUSE / 60);
|
||||
$TOTtotPAUSE_M = round($TOTtotPAUSE_M, 2);
|
||||
$TOTtotPAUSE_M_int = intval("$TOTtotPAUSE_M");
|
||||
$TOTtotPAUSE_S = ($TOTtotPAUSE_M - $TOTtotPAUSE_M_int);
|
||||
$TOTtotPAUSE_S = ($TOTtotPAUSE_S * 60);
|
||||
$TOTtotPAUSE_S = round($TOTtotPAUSE_S, 0);
|
||||
if ($TOTtotPAUSE_S < 10) {$TOTtotPAUSE_S = "0$TOTtotPAUSE_S";}
|
||||
$TOTtotPAUSE_MS = "$TOTtotPAUSE_M_int:$TOTtotPAUSE_S";
|
||||
$TOTtotPAUSE_MS = sprintf("%7s", $TOTtotPAUSE_MS);
|
||||
while(strlen($TOTtotPAUSE_MS)>7) {$TOTtotPAUSE_MS = substr("$TOTtotPAUSE_MS", 0, -1);}
|
||||
|
||||
$TOTtotWAIT_M = ($TOTtotWAIT / 60);
|
||||
$TOTtotWAIT_M = round($TOTtotWAIT_M, 2);
|
||||
$TOTtotWAIT_M_int = intval("$TOTtotWAIT_M");
|
||||
$TOTtotWAIT_S = ($TOTtotWAIT_M - $TOTtotWAIT_M_int);
|
||||
$TOTtotWAIT_S = ($TOTtotWAIT_S * 60);
|
||||
$TOTtotWAIT_S = round($TOTtotWAIT_S, 0);
|
||||
if ($TOTtotWAIT_S < 10) {$TOTtotWAIT_S = "0$TOTtotWAIT_S";}
|
||||
$TOTtotWAIT_MS = "$TOTtotWAIT_M_int:$TOTtotWAIT_S";
|
||||
$TOTtotWAIT_MS = sprintf("%7s", $TOTtotWAIT_MS);
|
||||
while(strlen($TOTtotWAIT_MS)>7) {$TOTtotWAIT_MS = substr("$TOTtotWAIT_MS", 0, -1);}
|
||||
|
||||
|
||||
$TOTavgTALK_M = ( ($TOTtotTALK / $TOTcalls) / 60);
|
||||
$TOTavgTALK_M = round($TOTavgTALK_M, 2);
|
||||
$TOTavgTALK_M_int = intval("$TOTavgTALK_M");
|
||||
$TOTavgTALK_S = ($TOTavgTALK_M - $TOTavgTALK_M_int);
|
||||
$TOTavgTALK_S = ($TOTavgTALK_S * 60);
|
||||
$TOTavgTALK_S = round($TOTavgTALK_S, 0);
|
||||
if ($TOTavgTALK_S < 10) {$TOTavgTALK_S = "0$TOTavgTALK_S";}
|
||||
$TOTavgTALK_MS = "$TOTavgTALK_M_int:$TOTavgTALK_S";
|
||||
$TOTavgTALK_MS = sprintf("%6s", $TOTavgTALK_MS);
|
||||
while(strlen($TOTavgTALK_MS)>6) {$TOTavgTALK_MS = substr("$TOTavgTALK_MS", 0, -1);}
|
||||
|
||||
$TOTavgDISPO_M = ( ($TOTtotDISPO / $TOTcalls) / 60);
|
||||
$TOTavgDISPO_M = round($TOTavgDISPO_M, 2);
|
||||
$TOTavgDISPO_M_int = intval("$TOTavgDISPO_M");
|
||||
$TOTavgDISPO_S = ($TOTavgDISPO_M - $TOTavgDISPO_M_int);
|
||||
$TOTavgDISPO_S = ($TOTavgDISPO_S * 60);
|
||||
$TOTavgDISPO_S = round($TOTavgDISPO_S, 0);
|
||||
if ($TOTavgDISPO_S < 10) {$TOTavgDISPO_S = "0$TOTavgDISPO_S";}
|
||||
$TOTavgDISPO_MS = "$TOTavgDISPO_M_int:$TOTavgDISPO_S";
|
||||
$TOTavgDISPO_MS = sprintf("%6s", $TOTavgDISPO_MS);
|
||||
while(strlen($TOTavgDISPO_MS)>6) {$TOTavgDISPO_MS = substr("$TOTavgDISPO_MS", 0, -1);}
|
||||
|
||||
$TOTavgPAUSE_M = ( ($TOTtotPAUSE / $TOTcalls) / 60);
|
||||
$TOTavgPAUSE_M = round($TOTavgPAUSE_M, 2);
|
||||
$TOTavgPAUSE_M_int = intval("$TOTavgPAUSE_M");
|
||||
$TOTavgPAUSE_S = ($TOTavgPAUSE_M - $TOTavgPAUSE_M_int);
|
||||
$TOTavgPAUSE_S = ($TOTavgPAUSE_S * 60);
|
||||
$TOTavgPAUSE_S = round($TOTavgPAUSE_S, 0);
|
||||
if ($TOTavgPAUSE_S < 10) {$TOTavgPAUSE_S = "0$TOTavgPAUSE_S";}
|
||||
$TOTavgPAUSE_MS = "$TOTavgPAUSE_M_int:$TOTavgPAUSE_S";
|
||||
$TOTavgPAUSE_MS = sprintf("%6s", $TOTavgPAUSE_MS);
|
||||
while(strlen($TOTavgPAUSE_MS)>6) {$TOTavgPAUSE_MS = substr("$TOTavgPAUSE_MS", 0, -1);}
|
||||
|
||||
$TOTavgWAIT_M = ( ($TOTtotWAIT / $TOTcalls) / 60);
|
||||
$TOTavgWAIT_M = round($TOTavgWAIT_M, 2);
|
||||
$TOTavgWAIT_M_int = intval("$TOTavgWAIT_M");
|
||||
$TOTavgWAIT_S = ($TOTavgWAIT_M - $TOTavgWAIT_M_int);
|
||||
$TOTavgWAIT_S = ($TOTavgWAIT_S * 60);
|
||||
$TOTavgWAIT_S = round($TOTavgWAIT_S, 0);
|
||||
if ($TOTavgWAIT_S < 10) {$TOTavgWAIT_S = "0$TOTavgWAIT_S";}
|
||||
$TOTavgWAIT_MS = "$TOTavgWAIT_M_int:$TOTavgWAIT_S";
|
||||
$TOTavgWAIT_MS = sprintf("%6s", $TOTavgWAIT_MS);
|
||||
while(strlen($TOTavgWAIT_MS)>6) {$TOTavgWAIT_MS = substr("$TOTavgWAIT_MS", 0, -1);}
|
||||
|
||||
|
||||
$TOT_A = sprintf("%-5s", $TOT_A);
|
||||
$TOT_B = sprintf("%-5s", $TOT_B);
|
||||
$TOT_DC = sprintf("%-5s", $TOT_DC);
|
||||
$TOT_DNC = sprintf("%-5s", $TOT_DNC);
|
||||
$TOT_N = sprintf("%-5s", $TOT_N);
|
||||
$TOT_NI = sprintf("%-5s", $TOT_NI);
|
||||
$TOT_CB = sprintf("%-5s", $TOT_CB);
|
||||
$TOT_SALE = sprintf("%-5s", $TOT_SALE);
|
||||
|
||||
echo "+-----------------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+------+------+------+------+------+------+------+------+\n";
|
||||
echo "| TOTALS | $TOTcalls| $TOTtime_MS| $TOTtotPAUSE_MS| $TOTavgPAUSE_MS | $TOTtotWAIT_MS| $TOTavgWAIT_MS | $TOTtotTALK_MS| $TOTavgTALK_MS | $TOTtotDISPO_MS| $TOTavgDISPO_MS | $TOT_A| $TOT_B| $TOT_DC| $TOT_DNC| $TOT_N| $TOT_NI| $TOT_CB| $TOT_SALE|\n";
|
||||
echo "+--------------------------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+------+------+------+------+------+------+------+------+\n";
|
||||
|
||||
echo "\n";
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
?>
|
||||
|
||||
</BODY></HTML>
|
||||
@@ -1,256 +0,0 @@
|
||||
<?
|
||||
### AST_agent_time_sheet.php
|
||||
###
|
||||
### Copyright (C) 2006 Matt Florell <vicidial@gmail.com> LICENSE: GPLv2
|
||||
###
|
||||
|
||||
require("dbconnect.php");
|
||||
|
||||
$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER'];
|
||||
$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW'];
|
||||
$PHP_SELF=$_SERVER['PHP_SELF'];
|
||||
$agent=$_GET["agent"]; if (!$agent) {$agent=$_POST["agent"];}
|
||||
$query_date=$_GET["query_date"]; if (!$query_date) {$query_date=$_POST["query_date"];}
|
||||
$calls_summary=$_GET["calls_summary"]; if (!$calls_summary) {$calls_summary=$_POST["calls_summary"];}
|
||||
$submit=$_GET["submit"]; if (!$submit) {$submit=$_POST["submit"];}
|
||||
$SUBMIT=$_GET["SUBMIT"]; if (!$SUBMIT) {$SUBMIT=$_POST["SUBMIT"];}
|
||||
|
||||
$NOW_DATE = date("Y-m-d");
|
||||
$NOW_TIME = date("Y-m-d H:i:s");
|
||||
$STARTtime = date("U");
|
||||
if (!$query_date) {$query_date = $NOW_DATE;}
|
||||
|
||||
?>
|
||||
|
||||
<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=iso-8859-1\">\n";
|
||||
#echo"<META HTTP-EQUIV=Refresh CONTENT=\"7; URL=$PHP_SELF?server_ip=$server_ip&DB=$DB\">\n";
|
||||
# query_date - 2005-05-10
|
||||
echo "<TITLE>VICIDIAL: Agent Time Sheet</TITLE></HEAD><BODY BGCOLOR=WHITE>\n";
|
||||
echo "<FORM ACTION=\"$PHP_SELF\" METHOD=GET>\n";
|
||||
echo "<INPUT TYPE=TEXT NAME=query_date SIZE=19 MAXLENGTH=19 VALUE=\"$query_date\">\n";
|
||||
echo "<INPUT TYPE=TEXT NAME=agent SIZE=10 MAXLENGTH=20 VALUE=\"$agent\">\n";
|
||||
echo "<INPUT TYPE=SUBMIT NAME=SUBMIT VALUE=SUBMIT>\n";
|
||||
echo "</FORM>\n\n";
|
||||
|
||||
echo "<PRE><FONT SIZE=3>\n";
|
||||
|
||||
|
||||
if (!$agent)
|
||||
{
|
||||
echo "\n";
|
||||
echo "PLEASE SELECT AN AGENT ID AND DATE-TIME ABOVE AND CLICK SUBMIT\n";
|
||||
echo " NOTE: stats taken from available agent log data\n";
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
$query_date_BEGIN = "$query_date 00:00:00";
|
||||
$query_date_END = "$query_date 23:59:59";
|
||||
$time_BEGIN = "00:00:00";
|
||||
$time_END = "23:59:59";
|
||||
|
||||
$stmt="select full_name from vicidial_users where user='$agent';";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$full_name = $row[0];
|
||||
|
||||
echo "VICIDIAL: Agent Time Sheet $NOW_TIME\n";
|
||||
|
||||
echo "Time range: $query_date_BEGIN to $query_date_END\n\n";
|
||||
echo "---------- AGENT TIME SHEET: $agent - $full_name -------------\n\n";
|
||||
|
||||
if ($calls_summary)
|
||||
{
|
||||
$stmt="select count(*) as calls,sum(talk_sec) as talk,avg(talk_sec),sum(pause_sec),avg(pause_sec),sum(wait_sec),avg(wait_sec),sum(dispo_sec),avg(dispo_sec) from vicidial_agent_log where event_time <= '$query_date_END' and event_time >= '$query_date_BEGIN' and user='$agent' and pause_sec<48800 and wait_sec<48800 and talk_sec<48800 and dispo_sec<48800 limit 1;";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$row=mysql_fetch_row($rslt);
|
||||
|
||||
$TOTAL_TIME = ($row[1] + $row[3] + $row[5] + $row[7]);
|
||||
|
||||
$TOTAL_TIME_H = ($TOTAL_TIME / 3600);
|
||||
$TOTAL_TIME_H = round($TOTAL_TIME_H, 2);
|
||||
$TOTAL_TIME_H_int = intval("$TOTAL_TIME_H");
|
||||
$TOTAL_TIME_M = ($TOTAL_TIME_H - $TOTAL_TIME_H_int);
|
||||
$TOTAL_TIME_M = ($TOTAL_TIME_M * 60);
|
||||
$TOTAL_TIME_M = round($TOTAL_TIME_M, 2);
|
||||
$TOTAL_TIME_M_int = intval("$TOTAL_TIME_M");
|
||||
$TOTAL_TIME_S = ($TOTAL_TIME_M - $TOTAL_TIME_M_int);
|
||||
$TOTAL_TIME_S = ($TOTAL_TIME_S * 60);
|
||||
$TOTAL_TIME_S = round($TOTAL_TIME_S, 0);
|
||||
if ($TOTAL_TIME_S < 10) {$TOTAL_TIME_S = "0$TOTAL_TIME_S";}
|
||||
if ($TOTAL_TIME_M_int < 10) {$TOTAL_TIME_M_int = "0$TOTAL_TIME_M_int";}
|
||||
$TOTAL_TIME_HMS = "$TOTAL_TIME_H_int:$TOTAL_TIME_M_int:$TOTAL_TIME_S";
|
||||
$pfTOTAL_TIME_HMS = sprintf("%8s", $TOTAL_TIME_HMS);
|
||||
|
||||
$TALK_TIME_H = ($row[1] / 3600);
|
||||
$TALK_TIME_H = round($TALK_TIME_H, 2);
|
||||
$TALK_TIME_H_int = intval("$TALK_TIME_H");
|
||||
$TALK_TIME_M = ($TALK_TIME_H - $TALK_TIME_H_int);
|
||||
$TALK_TIME_M = ($TALK_TIME_M * 60);
|
||||
$TALK_TIME_M = round($TALK_TIME_M, 2);
|
||||
$TALK_TIME_M_int = intval("$TALK_TIME_M");
|
||||
$TALK_TIME_S = ($TALK_TIME_M - $TALK_TIME_M_int);
|
||||
$TALK_TIME_S = ($TALK_TIME_S * 60);
|
||||
$TALK_TIME_S = round($TALK_TIME_S, 0);
|
||||
if ($TALK_TIME_S < 10) {$TALK_TIME_S = "0$TALK_TIME_S";}
|
||||
if ($TALK_TIME_M_int < 10) {$TALK_TIME_M_int = "0$TALK_TIME_M_int";}
|
||||
$TALK_TIME_HMS = "$TALK_TIME_H_int:$TALK_TIME_M_int:$TALK_TIME_S";
|
||||
$pfTALK_TIME_HMS = sprintf("%8s", $TALK_TIME_HMS);
|
||||
|
||||
$PAUSE_TIME_H = ($row[3] / 3600);
|
||||
$PAUSE_TIME_H = round($PAUSE_TIME_H, 2);
|
||||
$PAUSE_TIME_H_int = intval("$PAUSE_TIME_H");
|
||||
$PAUSE_TIME_M = ($PAUSE_TIME_H - $PAUSE_TIME_H_int);
|
||||
$PAUSE_TIME_M = ($PAUSE_TIME_M * 60);
|
||||
$PAUSE_TIME_M = round($PAUSE_TIME_M, 2);
|
||||
$PAUSE_TIME_M_int = intval("$PAUSE_TIME_M");
|
||||
$PAUSE_TIME_S = ($PAUSE_TIME_M - $PAUSE_TIME_M_int);
|
||||
$PAUSE_TIME_S = ($PAUSE_TIME_S * 60);
|
||||
$PAUSE_TIME_S = round($PAUSE_TIME_S, 0);
|
||||
if ($PAUSE_TIME_S < 10) {$PAUSE_TIME_S = "0$PAUSE_TIME_S";}
|
||||
if ($PAUSE_TIME_M_int < 10) {$PAUSE_TIME_M_int = "0$PAUSE_TIME_M_int";}
|
||||
$PAUSE_TIME_HMS = "$PAUSE_TIME_H_int:$PAUSE_TIME_M_int:$PAUSE_TIME_S";
|
||||
$pfPAUSE_TIME_HMS = sprintf("%8s", $PAUSE_TIME_HMS);
|
||||
|
||||
$WAIT_TIME_H = ($row[5] / 3600);
|
||||
$WAIT_TIME_H = round($WAIT_TIME_H, 2);
|
||||
$WAIT_TIME_H_int = intval("$WAIT_TIME_H");
|
||||
$WAIT_TIME_M = ($WAIT_TIME_H - $WAIT_TIME_H_int);
|
||||
$WAIT_TIME_M = ($WAIT_TIME_M * 60);
|
||||
$WAIT_TIME_M = round($WAIT_TIME_M, 2);
|
||||
$WAIT_TIME_M_int = intval("$WAIT_TIME_M");
|
||||
$WAIT_TIME_S = ($WAIT_TIME_M - $WAIT_TIME_M_int);
|
||||
$WAIT_TIME_S = ($WAIT_TIME_S * 60);
|
||||
$WAIT_TIME_S = round($WAIT_TIME_S, 0);
|
||||
if ($WAIT_TIME_S < 10) {$WAIT_TIME_S = "0$WAIT_TIME_S";}
|
||||
if ($WAIT_TIME_M_int < 10) {$WAIT_TIME_M_int = "0$WAIT_TIME_M_int";}
|
||||
$WAIT_TIME_HMS = "$WAIT_TIME_H_int:$WAIT_TIME_M_int:$WAIT_TIME_S";
|
||||
$pfWAIT_TIME_HMS = sprintf("%8s", $WAIT_TIME_HMS);
|
||||
|
||||
$WRAPUP_TIME_H = ($row[7] / 3600);
|
||||
$WRAPUP_TIME_H = round($WRAPUP_TIME_H, 2);
|
||||
$WRAPUP_TIME_H_int = intval("$WRAPUP_TIME_H");
|
||||
$WRAPUP_TIME_M = ($WRAPUP_TIME_H - $WRAPUP_TIME_H_int);
|
||||
$WRAPUP_TIME_M = ($WRAPUP_TIME_M * 60);
|
||||
$WRAPUP_TIME_M = round($WRAPUP_TIME_M, 2);
|
||||
$WRAPUP_TIME_M_int = intval("$WRAPUP_TIME_M");
|
||||
$WRAPUP_TIME_S = ($WRAPUP_TIME_M - $WRAPUP_TIME_M_int);
|
||||
$WRAPUP_TIME_S = ($WRAPUP_TIME_S * 60);
|
||||
$WRAPUP_TIME_S = round($WRAPUP_TIME_S, 0);
|
||||
if ($WRAPUP_TIME_S < 10) {$WRAPUP_TIME_S = "0$WRAPUP_TIME_S";}
|
||||
if ($WRAPUP_TIME_M_int < 10) {$WRAPUP_TIME_M_int = "0$WRAPUP_TIME_M_int";}
|
||||
$WRAPUP_TIME_HMS = "$WRAPUP_TIME_H_int:$WRAPUP_TIME_M_int:$WRAPUP_TIME_S";
|
||||
$pfWRAPUP_TIME_HMS = sprintf("%8s", $WRAPUP_TIME_HMS);
|
||||
|
||||
$TALK_AVG_M = ($row[2] / 60);
|
||||
$TALK_AVG_M = round($TALK_AVG_M, 2);
|
||||
$TALK_AVG_M_int = intval("$TALK_AVG_M");
|
||||
$TALK_AVG_S = ($TALK_AVG_M - $TALK_AVG_M_int);
|
||||
$TALK_AVG_S = ($TALK_AVG_S * 60);
|
||||
$TALK_AVG_S = round($TALK_AVG_S, 0);
|
||||
if ($TALK_AVG_S < 10) {$TALK_AVG_S = "0$TALK_AVG_S";}
|
||||
$TALK_AVG_MS = "$TALK_AVG_M_int:$TALK_AVG_S";
|
||||
$pfTALK_AVG_MS = sprintf("%6s", $TALK_AVG_MS);
|
||||
|
||||
$PAUSE_AVG_M = ($row[4] / 60);
|
||||
$PAUSE_AVG_M = round($PAUSE_AVG_M, 2);
|
||||
$PAUSE_AVG_M_int = intval("$PAUSE_AVG_M");
|
||||
$PAUSE_AVG_S = ($PAUSE_AVG_M - $PAUSE_AVG_M_int);
|
||||
$PAUSE_AVG_S = ($PAUSE_AVG_S * 60);
|
||||
$PAUSE_AVG_S = round($PAUSE_AVG_S, 0);
|
||||
if ($PAUSE_AVG_S < 10) {$PAUSE_AVG_S = "0$PAUSE_AVG_S";}
|
||||
$PAUSE_AVG_MS = "$PAUSE_AVG_M_int:$PAUSE_AVG_S";
|
||||
$pfPAUSE_AVG_MS = sprintf("%6s", $PAUSE_AVG_MS);
|
||||
|
||||
$WAIT_AVG_M = ($row[6] / 60);
|
||||
$WAIT_AVG_M = round($WAIT_AVG_M, 2);
|
||||
$WAIT_AVG_M_int = intval("$WAIT_AVG_M");
|
||||
$WAIT_AVG_S = ($WAIT_AVG_M - $WAIT_AVG_M_int);
|
||||
$WAIT_AVG_S = ($WAIT_AVG_S * 60);
|
||||
$WAIT_AVG_S = round($WAIT_AVG_S, 0);
|
||||
if ($WAIT_AVG_S < 10) {$WAIT_AVG_S = "0$WAIT_AVG_S";}
|
||||
$WAIT_AVG_MS = "$WAIT_AVG_M_int:$WAIT_AVG_S";
|
||||
$pfWAIT_AVG_MS = sprintf("%6s", $WAIT_AVG_MS);
|
||||
|
||||
$WRAPUP_AVG_M = ($row[8] / 60);
|
||||
$WRAPUP_AVG_M = round($WRAPUP_AVG_M, 2);
|
||||
$WRAPUP_AVG_M_int = intval("$WRAPUP_AVG_M");
|
||||
$WRAPUP_AVG_S = ($WRAPUP_AVG_M - $WRAPUP_AVG_M_int);
|
||||
$WRAPUP_AVG_S = ($WRAPUP_AVG_S * 60);
|
||||
$WRAPUP_AVG_S = round($WRAPUP_AVG_S, 0);
|
||||
if ($WRAPUP_AVG_S < 10) {$WRAPUP_AVG_S = "0$WRAPUP_AVG_S";}
|
||||
$WRAPUP_AVG_MS = "$WRAPUP_AVG_M_int:$WRAPUP_AVG_S";
|
||||
$pfWRAPUP_AVG_MS = sprintf("%6s", $WRAPUP_AVG_MS);
|
||||
|
||||
echo "TOTAL CALLS TAKEN: $row[0]\n";
|
||||
echo "TALK TIME: $pfTALK_TIME_HMS AVERAGE: $pfTALK_AVG_MS\n";
|
||||
echo "PAUSE TIME: $pfPAUSE_TIME_HMS AVERAGE: $pfPAUSE_AVG_MS\n";
|
||||
echo "WAIT TIME: $pfWAIT_TIME_HMS AVERAGE: $pfWAIT_AVG_MS\n";
|
||||
echo "WRAPUP TIME: $pfWRAPUP_TIME_HMS AVERAGE: $pfWRAPUP_AVG_MS\n";
|
||||
echo "----------------------------------------------------------------\n";
|
||||
echo "TOTAL ACTIVE AGENT TIME: $pfTOTAL_TIME_HMS\n";
|
||||
|
||||
echo "\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "<a href=\"$PHP_SELF?calls_summary=1&agent=$agent&query_date=$query_date\">Call Activity Summary</a>\n\n";
|
||||
|
||||
}
|
||||
|
||||
$stmt="select event_time,UNIX_TIMESTAMP(event_time) from vicidial_agent_log where event_time <= '$query_date_END' and event_time >= '$query_date_BEGIN' and user='$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 <= '$query_date_END' and event_time >= '$query_date_BEGIN' and user='$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";
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
?>
|
||||
|
||||
</BODY></HTML>
|
||||
@@ -1,369 +0,0 @@
|
||||
<?
|
||||
require("dbconnect.php");
|
||||
|
||||
##### depricated
|
||||
#require_once("htglobalize.php");
|
||||
|
||||
$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER'];
|
||||
$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW'];
|
||||
$PHP_SELF=$_SERVER['PHP_SELF'];
|
||||
$group=$_GET["group"]; if (!$group) {$group=$_POST["group"];}
|
||||
$query_date=$_GET["query_date"]; if (!$query_date) {$query_date=$_POST["query_date"];}
|
||||
$submit=$_GET["submit"]; if (!$submit) {$submit=$_POST["submit"];}
|
||||
$SUBMIT=$_GET["SUBMIT"]; if (!$SUBMIT) {$SUBMIT=$_POST["SUBMIT"];}
|
||||
|
||||
# AST_parkstats.php
|
||||
|
||||
$NOW_DATE = date("Y-m-d");
|
||||
$NOW_TIME = date("Y-m-d H:i:s");
|
||||
$STARTtime = date("U");
|
||||
if (!$query_date) {$query_date = $NOW_DATE;}
|
||||
|
||||
$stmt="select distinct channel_group from park_log;";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$groups_to_print = mysql_num_rows($rslt);
|
||||
$i=0;
|
||||
while ($i < $groups_to_print)
|
||||
{
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$groups[$i] =$row[0];
|
||||
$i++;
|
||||
}
|
||||
?>
|
||||
|
||||
<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=iso-8859-1\">\n";
|
||||
#echo"<META HTTP-EQUIV=Refresh CONTENT=\"7; URL=$PHP_SELF?server_ip=$server_ip&DB=$DB\">\n";
|
||||
echo "<TITLE>VICIDIAL: Park Stats</TITLE></HEAD><BODY BGCOLOR=WHITE>\n";
|
||||
echo "<FORM ACTION=\"$PHP_SELF\" METHOD=GET>\n";
|
||||
echo "<INPUT TYPE=TEXT NAME=query_date SIZE=10 MAXLENGTH=10 VALUE=\"$query_date\">\n";
|
||||
echo "<SELECT SIZE=1 NAME=group>\n";
|
||||
$o=0;
|
||||
while ($groups_to_print > $o)
|
||||
{
|
||||
if ($groups[$o] == $group) {echo "<option selected value=\"$groups[$o]\">$groups[$o]</option>\n";}
|
||||
else {echo "<option value=\"$groups[$o]\">$groups[$o]</option>\n";}
|
||||
$o++;
|
||||
}
|
||||
echo "</SELECT>\n";
|
||||
echo "<INPUT TYPE=SUBMIT NAME=SUBMIT VALUE=SUBMIT>\n";
|
||||
echo "</FORM>\n\n";
|
||||
|
||||
echo "<PRE><FONT SIZE=2>\n\n";
|
||||
|
||||
|
||||
if (!$group)
|
||||
{
|
||||
echo "\n\n";
|
||||
echo "PLEASE SELECT A GROUP AND DATE ABOVE AND CLICK SUBMIT\n";
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
|
||||
|
||||
echo "VICIDIAL: Park Stats $NOW_TIME\n";
|
||||
|
||||
echo "\n";
|
||||
echo "---------- TOTALS\n";
|
||||
|
||||
$stmt="select count(*),sum(parked_sec) from park_log where parked_time >= '$query_date 00:00:01' and parked_time <= '$query_date 23:59:59' and status ='HUNGUP' and channel_group='$group';";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$row=mysql_fetch_row($rslt);
|
||||
|
||||
$TOTALcalls = sprintf("%10s", $row[0]);
|
||||
$average_hold_seconds = ($row[1] / $row[0]);
|
||||
$average_hold_seconds = round($average_hold_seconds, 0);
|
||||
$average_hold_seconds = sprintf("%10s", $average_hold_seconds);
|
||||
|
||||
echo "Total Calls taken in this Group: $TOTALcalls\n";
|
||||
echo "Average Hold Time(seconds) for all Calls: $average_hold_seconds\n";
|
||||
|
||||
echo "\n";
|
||||
echo "---------- DROPS\n";
|
||||
|
||||
$stmt="select count(*),sum(parked_sec) from park_log where parked_time >= '$query_date 00:00:01' and parked_time <= '$query_date 23:59:59' and status ='HUNGUP' and channel_group='$group' and (talked_sec < 5 or talked_sec is null);";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$row=mysql_fetch_row($rslt);
|
||||
|
||||
$DROPcalls = sprintf("%10s", $row[0]);
|
||||
$DROPpercent = (($DROPcalls / $TOTALcalls) * 100);
|
||||
$DROPpercent = round($DROPpercent, 0);
|
||||
|
||||
$average_hold_seconds = ($row[1] / $row[0]);
|
||||
$average_hold_seconds = round($average_hold_seconds, 0);
|
||||
$average_hold_seconds = sprintf("%10s", $average_hold_seconds);
|
||||
|
||||
echo "Total Dropped Calls: $DROPcalls $DROPpercent%\n";
|
||||
echo "Average Hold Time(seconds) for Dropped Calls: $average_hold_seconds\n";
|
||||
|
||||
|
||||
##############################
|
||||
######### USER STATS
|
||||
|
||||
echo "\n";
|
||||
echo "---------- USER STATS\n";
|
||||
echo "+--------------------------+------------+--------+--------+\n";
|
||||
echo "| USER | CALLS | TIME M | AVRG M |\n";
|
||||
echo "+--------------------------+------------+--------+--------+\n";
|
||||
|
||||
$stmt="select park_log.user,full_name,count(*),sum(talked_sec),avg(talked_sec) from park_log,vicidial_users where parked_time >= '$query_date 00:00:01' and parked_time <= '$query_date 23:59:59' and status ='HUNGUP' and channel_group='$group' and park_log.user is not null and talked_sec is not null and talked_sec > 4 and park_log.user=vicidial_users.user group by park_log.user;";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$users_to_print = mysql_num_rows($rslt);
|
||||
$i=0;
|
||||
while ($i < $users_to_print)
|
||||
{
|
||||
$row=mysql_fetch_row($rslt);
|
||||
|
||||
$user = sprintf("%-6s", $row[0]);
|
||||
$full_name = sprintf("%-15s", $row[1]); while(strlen($full_name)>15) {$full_name = substr("$full_name", 0, -1);}
|
||||
$USERcalls = sprintf("%10s", $row[2]);
|
||||
$USERtotTALK = $row[3];
|
||||
$USERavgTALK = $row[4];
|
||||
|
||||
$USERtotTALK_M = ($USERtotTALK / 60);
|
||||
$USERtotTALK_M = round($USERtotTALK_M, 2);
|
||||
$USERtotTALK_M_int = intval("$USERtotTALK_M");
|
||||
$USERtotTALK_S = ($USERtotTALK_M - $USERtotTALK_M_int);
|
||||
$USERtotTALK_S = ($USERtotTALK_S * 60);
|
||||
$USERtotTALK_S = round($USERtotTALK_S, 0);
|
||||
if ($USERtotTALK_S < 10) {$USERtotTALK_S = "0$USERtotTALK_S";}
|
||||
$USERtotTALK_MS = "$USERtotTALK_M_int:$USERtotTALK_S";
|
||||
$USERtotTALK_MS = sprintf("%6s", $USERtotTALK_MS);
|
||||
|
||||
$USERavgTALK_M = ($USERavgTALK / 60);
|
||||
$USERavgTALK_M = round($USERavgTALK_M, 2);
|
||||
$USERavgTALK_M_int = intval("$USERavgTALK_M");
|
||||
$USERavgTALK_S = ($USERavgTALK_M - $USERavgTALK_M_int);
|
||||
$USERavgTALK_S = ($USERavgTALK_S * 60);
|
||||
$USERavgTALK_S = round($USERavgTALK_S, 0);
|
||||
if ($USERavgTALK_S < 10) {$USERavgTALK_S = "0$USERavgTALK_S";}
|
||||
$USERavgTALK_MS = "$USERavgTALK_M_int:$USERavgTALK_S";
|
||||
$USERavgTALK_MS = sprintf("%6s", $USERavgTALK_MS);
|
||||
|
||||
echo "| $user - $full_name | $USERcalls | $USERtotTALK_MS | $USERavgTALK_MS |\n";
|
||||
|
||||
$i++;
|
||||
}
|
||||
|
||||
echo "+--------------------------+------------+--------+--------+\n";
|
||||
|
||||
##############################
|
||||
######### TIME STATS
|
||||
|
||||
echo "\n";
|
||||
echo "---------- TIME STATS\n";
|
||||
|
||||
echo "<FONT SIZE=0>\n";
|
||||
|
||||
$hi_hour_count=0;
|
||||
$last_full_record=0;
|
||||
$i=0;
|
||||
$h=0;
|
||||
while ($i <= 96)
|
||||
{
|
||||
$stmt="select count(*) from park_log where parked_time >= '$query_date $h:00:00' and parked_time <= '$query_date $h:14:59' and status ='HUNGUP' and channel_group='$group';";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$hour_count[$i] = $row[0];
|
||||
if ($hour_count[$i] > $hi_hour_count) {$hi_hour_count = $hour_count[$i];}
|
||||
if ($hour_count[$i] > 0) {$last_full_record = $i;}
|
||||
$stmt="select count(*) from park_log where parked_time >= '$query_date $h:00:00' and parked_time <= '$query_date $h:14:59' and status ='HUNGUP' and channel_group='$group' and (talked_sec < 5 or talked_sec is null);";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$drop_count[$i] = $row[0];
|
||||
$i++;
|
||||
|
||||
|
||||
$stmt="select count(*) from park_log where parked_time >= '$query_date $h:15:00' and parked_time <= '$query_date $h:29:59' and status ='HUNGUP' and channel_group='$group';";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$hour_count[$i] = $row[0];
|
||||
if ($hour_count[$i] > $hi_hour_count) {$hi_hour_count = $hour_count[$i];}
|
||||
if ($hour_count[$i] > 0) {$last_full_record = $i;}
|
||||
$stmt="select count(*) from park_log where parked_time >= '$query_date $h:15:00' and parked_time <= '$query_date $h:29:59' and status ='HUNGUP' and channel_group='$group' and (talked_sec < 5 or talked_sec is null);";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$drop_count[$i] = $row[0];
|
||||
$i++;
|
||||
|
||||
$stmt="select count(*) from park_log where parked_time >= '$query_date $h:30:00' and parked_time <= '$query_date $h:44:59' and status ='HUNGUP' and channel_group='$group';";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$hour_count[$i] = $row[0];
|
||||
if ($hour_count[$i] > $hi_hour_count) {$hi_hour_count = $hour_count[$i];}
|
||||
if ($hour_count[$i] > 0) {$last_full_record = $i;}
|
||||
$stmt="select count(*) from park_log where parked_time >= '$query_date $h:30:00' and parked_time <= '$query_date $h:44:59' and status ='HUNGUP' and channel_group='$group' and (talked_sec < 5 or talked_sec is null);";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$drop_count[$i] = $row[0];
|
||||
$i++;
|
||||
|
||||
$stmt="select count(*) from park_log where parked_time >= '$query_date $h:45:00' and parked_time <= '$query_date $h:59:59' and status ='HUNGUP' and channel_group='$group';";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$hour_count[$i] = $row[0];
|
||||
if ($hour_count[$i] > $hi_hour_count) {$hi_hour_count = $hour_count[$i];}
|
||||
if ($hour_count[$i] > 0) {$last_full_record = $i;}
|
||||
$stmt="select count(*) from park_log where parked_time >= '$query_date $h:45:00' and parked_time <= '$query_date $h:59:59' and status ='HUNGUP' and channel_group='$group' and (talked_sec < 5 or talked_sec is null);";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$drop_count[$i] = $row[0];
|
||||
$i++;
|
||||
$h++;
|
||||
}
|
||||
|
||||
$hour_multiplier = (100 / $hi_hour_count);
|
||||
#$hour_multiplier = round($hour_multiplier, 0);
|
||||
|
||||
echo "<!-- HICOUNT: $hi_hour_count|$hour_multiplier -->\n";
|
||||
echo "GRAPH IN 15 MINUTE INCREMENTS OF TOTAL INCOMING CALLS FOR THIS GROUP\n";
|
||||
|
||||
$k=1;
|
||||
$Mk=0;
|
||||
$call_scale = '0';
|
||||
while ($k <= 102)
|
||||
{
|
||||
if ($Mk >= 5)
|
||||
{
|
||||
$Mk=0;
|
||||
$scale_num=($k / $hour_multiplier);
|
||||
$scale_num = round($scale_num, 0);
|
||||
$LENscale_num = (strlen($scale_num));
|
||||
$k = ($k + $LENscale_num);
|
||||
$call_scale .= "$scale_num";
|
||||
}
|
||||
else
|
||||
{
|
||||
$call_scale .= " ";
|
||||
$k++; $Mk++;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
echo "+------+-------------------------------------------------------------------------------------------------------+-------+-------+\n";
|
||||
#echo "| HOUR | GRAPH IN 15 MINUTE INCREMENTS OF TOTAL INCOMING CALLS FOR THIS GROUP | DROPS | TOTAL |\n";
|
||||
echo "| HOUR |$call_scale| DROPS | TOTAL |\n";
|
||||
echo "+------+-------------------------------------------------------------------------------------------------------+-------+-------+\n";
|
||||
|
||||
$ZZ = '00';
|
||||
$i=0;
|
||||
$h=4;
|
||||
$hour= -1;
|
||||
$no_lines_yet=1;
|
||||
|
||||
while ($i <= 96)
|
||||
{
|
||||
$char_counter=0;
|
||||
$time = ' ';
|
||||
if ($h >= 4)
|
||||
{
|
||||
$hour++;
|
||||
$h=0;
|
||||
if ($hour < 10) {$hour = "0$hour";}
|
||||
$time = "+$hour$ZZ+";
|
||||
}
|
||||
if ($h == 1) {$time = " 15 ";}
|
||||
if ($h == 2) {$time = " 30 ";}
|
||||
if ($h == 3) {$time = " 45 ";}
|
||||
$Ghour_count = $hour_count[$i];
|
||||
if ($Ghour_count < 1)
|
||||
{
|
||||
if ( ($no_lines_yet) or ($i > $last_full_record) )
|
||||
{
|
||||
$do_nothing=1;
|
||||
}
|
||||
else
|
||||
{
|
||||
$hour_count[$i] = sprintf("%-5s", $hour_count[$i]);
|
||||
echo "|$time|";
|
||||
$k=0; while ($k <= 102) {echo " "; $k++;}
|
||||
echo "| $hour_count[$i] |\n";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$no_lines_yet=0;
|
||||
$Xhour_count = ($Ghour_count * $hour_multiplier);
|
||||
$Yhour_count = (99 - $Xhour_count);
|
||||
|
||||
$Gdrop_count = $drop_count[$i];
|
||||
if ($Gdrop_count < 1)
|
||||
{
|
||||
$hour_count[$i] = sprintf("%-5s", $hour_count[$i]);
|
||||
|
||||
echo "|$time|<SPAN class=\"green\">";
|
||||
$k=0; while ($k <= $Xhour_count) {echo "*"; $k++; $char_counter++;}
|
||||
echo "*X</SPAN>"; $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|<SPAN class=\"red\">";
|
||||
$k=0; while ($k <= $Xdrop_count) {echo ">"; $k++; $char_counter++;}
|
||||
echo "D</SPAN><SPAN class=\"green\">"; $char_counter++;
|
||||
$k=0; while ($k <= $XXhour_count) {echo "*"; $k++; $char_counter++;}
|
||||
echo "X</SPAN>"; $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";
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
?>
|
||||
</PRE>
|
||||
|
||||
</BODY></HTML>
|
||||
@@ -1,283 +0,0 @@
|
||||
<?
|
||||
require("dbconnect.php");
|
||||
|
||||
##### depricated
|
||||
#require_once("htglobalize.php");
|
||||
|
||||
$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER'];
|
||||
$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW'];
|
||||
$PHP_SELF=$_SERVER['PHP_SELF'];
|
||||
$query_date=$_GET["query_date"]; if (!$query_date) {$query_date=$_POST["query_date"];}
|
||||
$group=$_GET["group"]; if (!$group) {$group=$_POST["group"];}
|
||||
$shift=$_GET["shift"]; if (!$shift) {$shift=$_POST["shift"];}
|
||||
$submit=$_GET["submit"]; if (!$submit) {$submit=$_POST["submit"];}
|
||||
$SUBMIT=$_GET["SUBMIT"]; if (!$SUBMIT) {$SUBMIT=$_POST["SUBMIT"];}
|
||||
|
||||
# path from root to where ploticus files will be stored
|
||||
$DOCroot = "$WeBServeRRooT/vicidial/ploticus/";
|
||||
|
||||
# AST_server_performance.php
|
||||
|
||||
$NOW_DATE = date("Y-m-d");
|
||||
$NOW_TIME = date("Y-m-d H:i:s");
|
||||
$STARTtime = date("U");
|
||||
|
||||
if (!$query_date) {$query_date = $NOW_DATE;}
|
||||
|
||||
$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++;
|
||||
}
|
||||
?>
|
||||
|
||||
<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=iso-8859-1\">\n";
|
||||
#echo"<META HTTP-EQUIV=Refresh CONTENT=\"7; URL=$PHP_SELF?server_ip=$server_ip&DB=$DB\">\n";
|
||||
# query_date - 2005-05-10
|
||||
echo "<TITLE>VICIDIAL: Server Performance</TITLE></HEAD><BODY BGCOLOR=WHITE>\n";
|
||||
echo "<FORM ACTION=\"$PHP_SELF\" METHOD=GET>\n";
|
||||
echo "<INPUT TYPE=TEXT NAME=query_date SIZE=19 MAXLENGTH=19 VALUE=\"$query_date\">\n";
|
||||
echo "<SELECT SIZE=1 NAME=group>\n";
|
||||
$o=0;
|
||||
while ($servers_to_print > $o)
|
||||
{
|
||||
if ($groups[$o] == $group) {echo "<option selected value=\"$groups[$o]\">$groups[$o]</option>\n";}
|
||||
else {echo "<option value=\"$groups[$o]\">$groups[$o]</option>\n";}
|
||||
$o++;
|
||||
}
|
||||
echo "</SELECT>\n";
|
||||
echo "<SELECT SIZE=1 NAME=shift>\n";
|
||||
echo "<option selected value=\"AM\">AM</option>\n";
|
||||
echo "<option value=\"PM\">PM</option>\n";
|
||||
echo "</SELECT>\n";
|
||||
echo "<INPUT TYPE=SUBMIT NAME=SUBMIT VALUE=SUBMIT>\n";
|
||||
echo "</FORM>\n\n";
|
||||
|
||||
echo "<PRE><FONT SIZE=2>\n";
|
||||
|
||||
|
||||
if (!$group)
|
||||
{
|
||||
echo "\n";
|
||||
echo "PLEASE SELECT A SERVER AND DATE-TIME ABOVE AND CLICK SUBMIT\n";
|
||||
echo " NOTE: stats taken from 6 hour shift specified\n";
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
if ($shift == 'AM')
|
||||
{
|
||||
$query_date_BEGIN = "$query_date 08:45:00";
|
||||
$query_date_END = "$query_date 15:32:00";
|
||||
$time_BEGIN = "08:45:00";
|
||||
$time_END = "15:15:00";
|
||||
}
|
||||
if ($shift == 'PM')
|
||||
{
|
||||
$query_date_BEGIN = "$query_date 15:32:00";
|
||||
$query_date_END = "$query_date 23:15:00";
|
||||
$time_BEGIN = "15:15:00";
|
||||
$time_END = "23:15:00";
|
||||
}
|
||||
|
||||
echo "VICIDIAL: Server Performance $NOW_TIME\n";
|
||||
|
||||
echo "Time range: $query_date_BEGIN to $query_date_END\n\n";
|
||||
echo "---------- TOTALS, PEAKS and AVERAGES\n";
|
||||
|
||||
$stmt="select sysload from server_performance where start_time <= '$query_date_END' and start_time >= '$query_date_BEGIN' and server_ip='$group' order by sysload desc limit 1;";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$HIGHload = sprintf("%10s", $row[0]);
|
||||
$HIGHmulti = intval($HIGHload / 100);
|
||||
#$HIGHmulti = ($HIGHload / 100);
|
||||
|
||||
$stmt="select AVG(sysload),AVG(channels_total) from server_performance where start_time <= '$query_date_END' and start_time >= '$query_date_BEGIN' and server_ip='$group';";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$AVGload = sprintf("%10s", $row[0]);
|
||||
$AVGchannels = sprintf("%10s", $row[1]);
|
||||
|
||||
$stmt="select AVG(cpu_user_percent),AVG(cpu_system_percent),AVG(cpu_idle_percent) from server_performance where start_time <= '$query_date_END' and start_time >= '$query_date_BEGIN' and server_ip='$group';";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$AVGcpuUSER = sprintf("%10s", $row[0]);
|
||||
$AVGcpuSYSTEM = sprintf("%10s", $row[1]);
|
||||
$AVGcpuIDLE = sprintf("%10s", $row[2]);
|
||||
|
||||
$stmt="select usedram from server_performance where start_time <= '$query_date_END' and start_time >= '$query_date_BEGIN' and server_ip='$group' order by usedram desc limit 1;";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$USEDram = sprintf("%10s", $row[0]);
|
||||
|
||||
$stmt="select count(*),SUM(length_in_min) from call_log where extension NOT IN('8365') and start_time <= '$query_date_END' and start_time >= '$query_date_BEGIN' and server_ip='$group';";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$TOTALcalls = sprintf("%10s", $row[0]);
|
||||
$OFFHOOKtime = sprintf("%10s", $row[1]);
|
||||
|
||||
|
||||
echo "Total Calls in/out on this server: $TOTALcalls\n";
|
||||
echo "Total Off-Hook time on this server (min): $OFFHOOKtime\n";
|
||||
echo "Average channels in use for server: $AVGchannels\n";
|
||||
echo "Average load for server: $AVGload\n";
|
||||
echo "Peak load for server: $HIGHload\n";
|
||||
#echo "Peak used memory for server (in MB): $USEDram\n";
|
||||
echo "Average USER process cpu percentage: $AVGcpuUSER %\n";
|
||||
echo "Average SYSTEM process cpu percentage: $AVGcpuSYSTEM %\n";
|
||||
echo "Average IDLE process cpu percentage: $AVGcpuIDLE %\n";
|
||||
|
||||
echo "\n";
|
||||
echo "---------- LINE GRAPH:\n";
|
||||
|
||||
|
||||
|
||||
##############################
|
||||
######### Graph stats
|
||||
|
||||
$DAT = '.dat';
|
||||
$HTM = '.htm';
|
||||
$PNG = '.png';
|
||||
$filedate = date("Y-m-d_His");
|
||||
$DATfile = "$group$query_date$shift$filedate$DAT";
|
||||
$HTMfile = "$group$query_date$shift$filedate$HTM";
|
||||
$PNGfile = "$group$query_date$shift$filedate$PNG";
|
||||
|
||||
$HTMfp = fopen ("$DOCroot/$HTMfile", "a");
|
||||
$DATfp = fopen ("$DOCroot/$DATfile", "a");
|
||||
|
||||
$stmt="select DATE_FORMAT(start_time,'%H:%i:%s') as timex,sysload,processes,channels_total,live_recordings,cpu_user_percent,cpu_system_percent from server_performance where server_ip='$group' and start_time <= '$query_date_END' and start_time >= '$query_date_BEGIN' order by timex;";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$rows_to_print = mysql_num_rows($rslt);
|
||||
$i=0;
|
||||
while ($i < $rows_to_print)
|
||||
{
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$row[5] = intval(($row[5] + $row[6]) * $HIGHmulti);
|
||||
$row[6] = intval($row[6] * $HIGHmulti);
|
||||
fwrite ($DATfp, "$row[5]\t$row[6]\t$row[0]\t$row[1]\t$row[2]\t$row[3]\n");
|
||||
$i++;
|
||||
}
|
||||
fclose($DATfp);
|
||||
|
||||
$rows_to_max = ($rows_to_print + 100);
|
||||
|
||||
|
||||
|
||||
$HTMcontent = '';
|
||||
$HTMcontent .= "#proc page\n";
|
||||
$HTMcontent .= "#if @DEVICE in png,gif\n";
|
||||
$HTMcontent .= " scale: 0.6\n";
|
||||
$HTMcontent .= "\n";
|
||||
$HTMcontent .= "#endif\n";
|
||||
$HTMcontent .= "#proc getdata\n";
|
||||
$HTMcontent .= "file: $DOCroot/$DATfile\n";
|
||||
$HTMcontent .= "fieldnames: userproc sysproc time load processes channels\n";
|
||||
$HTMcontent .= "\n";
|
||||
$HTMcontent .= "#proc areadef\n";
|
||||
$HTMcontent .= "title: Server $group $query_date_BEGIN to $query_date_END\n";
|
||||
$HTMcontent .= "titledetails: size=14 align=C\n";
|
||||
$HTMcontent .= "rectangle: 1 1 14 7\n";
|
||||
$HTMcontent .= "xscaletype: time hh:mm:ss\n";
|
||||
$HTMcontent .= "xrange: $time_BEGIN $time_END\n";
|
||||
$HTMcontent .= "yrange: 0 $HIGHload\n";
|
||||
$HTMcontent .= "\n";
|
||||
$HTMcontent .= "#proc xaxis\n";
|
||||
$HTMcontent .= "stubs: inc 30 minutes\n";
|
||||
$HTMcontent .= "minorticinc: 5 minutes\n";
|
||||
$HTMcontent .= "stubformat: hh:mm:ssa\n";
|
||||
$HTMcontent .= "\n";
|
||||
$HTMcontent .= "#proc yaxis\n";
|
||||
$HTMcontent .= "stubs: inc 50\n";
|
||||
$HTMcontent .= "grid: color=yellow\n";
|
||||
$HTMcontent .= "gridskip: min\n";
|
||||
$HTMcontent .= "ticincrement: 100 1000\n";
|
||||
$HTMcontent .= "\n";
|
||||
$HTMcontent .= "#proc lineplot\n";
|
||||
$HTMcontent .= "xfield: time\n";
|
||||
$HTMcontent .= "yfield: userproc\n";
|
||||
$HTMcontent .= "linedetails: color=purple width=.5\n";
|
||||
$HTMcontent .= "fill: lavender\n";
|
||||
$HTMcontent .= "legendlabel: user proc%\n";
|
||||
$HTMcontent .= "maxinpoints: $rows_to_max\n";
|
||||
$HTMcontent .= "\n";
|
||||
$HTMcontent .= "#proc lineplot\n";
|
||||
$HTMcontent .= "xfield: time\n";
|
||||
$HTMcontent .= "yfield: sysproc\n";
|
||||
$HTMcontent .= "linedetails: color=yelloworange width=.5\n";
|
||||
$HTMcontent .= "fill: dullyellow\n";
|
||||
$HTMcontent .= "legendlabel: system proc%\n";
|
||||
$HTMcontent .= "maxinpoints: $rows_to_max\n";
|
||||
$HTMcontent .= "\n";
|
||||
$HTMcontent .= "#proc curvefit\n";
|
||||
$HTMcontent .= "xfield: time\n";
|
||||
$HTMcontent .= "yfield: load\n";
|
||||
$HTMcontent .= "linedetails: color=blue width=.5\n";
|
||||
$HTMcontent .= "legendlabel: load\n";
|
||||
$HTMcontent .= "maxinpoints: $rows_to_max\n";
|
||||
$HTMcontent .= "\n";
|
||||
$HTMcontent .= "#proc curvefit\n";
|
||||
$HTMcontent .= "xfield: time\n";
|
||||
$HTMcontent .= "yfield: processes\n";
|
||||
$HTMcontent .= "linedetails: color=red width=.5\n";
|
||||
$HTMcontent .= "legendlabel: processes\n";
|
||||
$HTMcontent .= "maxinpoints: $rows_to_max\n";
|
||||
$HTMcontent .= "\n";
|
||||
$HTMcontent .= "#proc curvefit\n";
|
||||
$HTMcontent .= "xfield: time\n";
|
||||
$HTMcontent .= "yfield: channels\n";
|
||||
$HTMcontent .= "linedetails: color=green width=.5\n";
|
||||
$HTMcontent .= "legendlabel: channels\n";
|
||||
$HTMcontent .= "maxinpoints: $rows_to_max\n";
|
||||
$HTMcontent .= "\n";
|
||||
$HTMcontent .= "#proc legend\n";
|
||||
$HTMcontent .= "location: max-2 max\n";
|
||||
$HTMcontent .= "seglen: 0.2\n";
|
||||
$HTMcontent .= "\n";
|
||||
|
||||
fwrite ($HTMfp, "$HTMcontent");
|
||||
fclose($HTMfp);
|
||||
|
||||
|
||||
passthru("/usr/local/bin/pl -png $DOCroot/$HTMfile -o $DOCroot/$PNGfile");
|
||||
|
||||
sleep(1);
|
||||
|
||||
echo "</PRE>\n";
|
||||
echo "\n";
|
||||
echo "<IMG SRC=\"./ploticus/$PNGfile\">\n";
|
||||
|
||||
|
||||
echo "<!-- /usr/local/bin/pl -png $DOCroot/$HTMfile -o $DOCroot/$PNGfile -->";
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
?>
|
||||
|
||||
</BODY></HTML>
|
||||
@@ -1,231 +0,0 @@
|
||||
<?
|
||||
header ("Content-type: text/html; charset=utf-8");
|
||||
|
||||
require("dbconnect.php");
|
||||
|
||||
##### depricated
|
||||
#require_once("htglobalize.php");
|
||||
|
||||
$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER'];
|
||||
$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW'];
|
||||
$PHP_SELF=$_SERVER['PHP_SELF'];
|
||||
$server_ip=$_GET["server_ip"]; if (!$server_ip) {$server_ip=$_POST["server_ip"];}
|
||||
$reset_counter=$_GET["reset_counter"]; if (!$reset_counter) {$reset_counter=$_POST["reset_counter"];}
|
||||
$submit=$_GET["submit"]; if (!$submit) {$submit=$_POST["submit"];}
|
||||
$SUBMIT=$_GET["SUBMIT"]; if (!$SUBMIT) {$SUBMIT=$_POST["SUBMIT"];}
|
||||
|
||||
# AST_timeonVDAD.php
|
||||
# live real-time stats for the VICIDIAL Auto-Dialer
|
||||
#
|
||||
# changes:
|
||||
# 50406-0920 Added Paused agents < 1 min (Chris Doyle)
|
||||
|
||||
$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";
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<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}
|
||||
.yellow {color: black; background-color: yellow}
|
||||
-->
|
||||
</STYLE>
|
||||
|
||||
<?
|
||||
echo"<META HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html; charset=iso-8859-1\">\n";
|
||||
echo"<META HTTP-EQUIV=Refresh CONTENT=\"4; URL=$PHP_SELF?server_ip=$server_ip&DB=$DB&reset_counter=$reset_counter\">\n";
|
||||
echo "<TITLE>VICIDIAL: Time On VDAD</TITLE></HEAD><BODY BGCOLOR=WHITE>\n";
|
||||
echo "<PRE><FONT SIZE=3>\n\n";
|
||||
|
||||
###################################################################################
|
||||
###### TIME ON SYSTEM
|
||||
###################################################################################
|
||||
|
||||
echo "VICIDIAL: Agents Time On Calls $NOW_TIME\n\n";
|
||||
echo "+------------|--------+-----------+------------+--------+---------------------+---------+\n";
|
||||
echo "| STATION | USER | SESSIONID | CHANNEL | STATUS | START TIME | MINUTES |\n";
|
||||
echo "+------------|--------+-----------+------------+--------+---------------------+---------+\n";
|
||||
|
||||
|
||||
$stmt="select extension,user,conf_exten,channel,status,last_call_time,UNIX_TIMESTAMP(last_call_time),UNIX_TIMESTAMP(last_call_finish) from vicidial_live_agents where server_ip='$server_ip' order by extension;";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$talking_to_print = mysql_num_rows($rslt);
|
||||
if ($talking_to_print > 0)
|
||||
{
|
||||
$i=0;
|
||||
$agentcount=0;
|
||||
while ($i < $talking_to_print)
|
||||
{
|
||||
$row=mysql_fetch_row($rslt);
|
||||
if (eregi("READY|PAUSED",$row[4]))
|
||||
{
|
||||
$row[3]='';
|
||||
$row[5]=' - WAITING - ';
|
||||
$row[6]=$row[7];
|
||||
}
|
||||
$extension = sprintf("%-10s", $row[0]);
|
||||
$user = sprintf("%-6s", $row[1]);
|
||||
$sessionid = sprintf("%-9s", $row[2]);
|
||||
$channel = sprintf("%-10s", $row[3]);
|
||||
$cc=0;
|
||||
while ( (strlen($channel) > 10) and ($cc < 100) )
|
||||
{
|
||||
$channel = eregi_replace(".$","",$channel);
|
||||
$cc++;
|
||||
if (strlen($channel) <= 10) {$cc=101;}
|
||||
}
|
||||
$status = sprintf("%-6s", $row[4]);
|
||||
$start_time = sprintf("%-19s", $row[5]);
|
||||
$call_time_S = ($STARTtime - $row[6]);
|
||||
|
||||
$call_time_M = ($call_time_S / 60);
|
||||
$call_time_M = round($call_time_M, 2);
|
||||
$call_time_M_int = intval("$call_time_M");
|
||||
$call_time_SEC = ($call_time_M - $call_time_M_int);
|
||||
$call_time_SEC = ($call_time_SEC * 60);
|
||||
$call_time_SEC = round($call_time_SEC, 0);
|
||||
if ($call_time_SEC < 10) {$call_time_SEC = "0$call_time_SEC";}
|
||||
$call_time_MS = "$call_time_M_int:$call_time_SEC";
|
||||
$call_time_MS = sprintf("%7s", $call_time_MS);
|
||||
$G = ''; $EG = '';
|
||||
if ($call_time_M_int >= 5) {$G='<SPAN class="blue"><B>'; $EG='</B></SPAN>';}
|
||||
if ($call_time_M_int >= 10) {$G='<SPAN class="purple"><B>'; $EG='</B></SPAN>';}
|
||||
if (eregi("PAUSED",$row[4]))
|
||||
{
|
||||
if ($call_time_M_int >= 1)
|
||||
{$i++; continue;}
|
||||
else
|
||||
{$G='<SPAN class="yellow"><B>'; $EG='</B></SPAN>';}
|
||||
}
|
||||
|
||||
$agentcount++;
|
||||
echo "| $G$extension$EG | $G$user$EG | $G$sessionid$EG | $G$channel$EG | $G$status$EG | $G$start_time$EG | $G$call_time_MS$EG |\n";
|
||||
|
||||
$i++;
|
||||
}
|
||||
|
||||
echo "+------------|--------+-----------+------------+--------+---------------------+---------+\n";
|
||||
echo " $agentcount agents logged in on server $server_ip\n\n";
|
||||
|
||||
echo " <SPAN class=\"yellow\"><B> </SPAN> - Paused agents</B>\n";
|
||||
echo " <SPAN class=\"blue\"><B> </SPAN> - 5 minutes or more on call</B>\n";
|
||||
echo " <SPAN class=\"purple\"><B> </SPAN> - Over 10 minutes on call</B>\n";
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "**************************************************************************************\n";
|
||||
echo "**************************************************************************************\n";
|
||||
echo "********************************* NO AGENTS ON CALLS *********************************\n";
|
||||
echo "**************************************************************************************\n";
|
||||
echo "**************************************************************************************\n";
|
||||
}
|
||||
|
||||
|
||||
###################################################################################
|
||||
###### OUTBOUND CALLS
|
||||
###################################################################################
|
||||
echo "\n\n";
|
||||
echo "----------------------------------------------------------------------------------------";
|
||||
echo "\n\n";
|
||||
echo "VICIDIAL: Time On VDAD $NOW_TIME\n\n";
|
||||
echo "+------------+--------+----------+--------------------+---------------------+---------+\n";
|
||||
echo "| CHANNEL | STATUS | CAMPAIGN | PHONE NUMBER | START TIME | MINUTES |\n";
|
||||
echo "+------------+--------+----------+--------------------+---------------------+---------+\n";
|
||||
|
||||
#$link=mysql_connect("localhost", "cron", "1234");
|
||||
# $linkX=mysql_connect("localhost", "cron", "1234");
|
||||
#mysql_select_db("asterisk");
|
||||
|
||||
$stmt="select channel,status,campaign_id,phone_code,phone_number,call_time,UNIX_TIMESTAMP(call_time) from vicidial_auto_calls where status NOT IN('XFER') and server_ip='$server_ip' order by auto_call_id;";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$parked_to_print = mysql_num_rows($rslt);
|
||||
if ($parked_to_print > 0)
|
||||
{
|
||||
$i=0;
|
||||
while ($i < $parked_to_print)
|
||||
{
|
||||
$row=mysql_fetch_row($rslt);
|
||||
|
||||
$channel = sprintf("%-10s", $row[0]);
|
||||
$cc=0;
|
||||
while ( (strlen($channel) > 10) and ($cc < 100) )
|
||||
{
|
||||
$channel = eregi_replace(".$","",$channel);
|
||||
$cc++;
|
||||
if (strlen($channel) <= 10) {$cc=101;}
|
||||
}
|
||||
$status = sprintf("%-6s", $row[1]);
|
||||
$campaign = sprintf("%-8s", $row[2]);
|
||||
$all_phone = "$row[3]$row[4]";
|
||||
$number_dialed = sprintf("%-18s", $all_phone);
|
||||
$start_time = sprintf("%-19s", $row[5]);
|
||||
$call_time_S = ($STARTtime - $row[6]);
|
||||
|
||||
$call_time_M = ($call_time_S / 60);
|
||||
$call_time_M = round($call_time_M, 2);
|
||||
$call_time_M_int = intval("$call_time_M");
|
||||
$call_time_SEC = ($call_time_M - $call_time_M_int);
|
||||
$call_time_SEC = ($call_time_SEC * 60);
|
||||
$call_time_SEC = round($call_time_SEC, 0);
|
||||
if ($call_time_SEC < 10) {$call_time_SEC = "0$call_time_SEC";}
|
||||
$call_time_MS = "$call_time_M_int:$call_time_SEC";
|
||||
$call_time_MS = sprintf("%7s", $call_time_MS);
|
||||
$G = ''; $EG = '';
|
||||
if (eregi("LIVE",$status)) {$G='<SPAN class="green"><B>'; $EG='</B></SPAN>';}
|
||||
# if ($call_time_M_int >= 6) {$G='<SPAN class="red"><B>'; $EG='</B></SPAN>';}
|
||||
|
||||
echo "| $G$channel$EG | $G$status$EG | $G$campaign$EG | $G$number_dialed$EG | $G$start_time$EG | $G$call_time_MS$EG |\n";
|
||||
|
||||
$i++;
|
||||
}
|
||||
|
||||
echo "+------------+--------+----------+--------------------+---------------------+---------+\n";
|
||||
echo " $i calls being placed on server $server_ip\n\n";
|
||||
|
||||
echo " <SPAN class=\"green\"><B> </SPAN> - LIVE CALL WAITING</B>\n";
|
||||
# echo " <SPAN class=\"red\"><B> </SPAN> - Over 5 minutes on hold</B>\n";
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "***************************************************************************************\n";
|
||||
echo "***************************************************************************************\n";
|
||||
echo "******************************* NO LIVE CALLS WAITING *********************************\n";
|
||||
echo "***************************************************************************************\n";
|
||||
echo "***************************************************************************************\n";
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
</PRE>
|
||||
|
||||
</BODY></HTML>
|
||||
@@ -1,289 +0,0 @@
|
||||
<?
|
||||
header ("Content-type: text/html; charset=utf-8");
|
||||
|
||||
require("dbconnect.php");
|
||||
|
||||
##### depricated
|
||||
#require_once("htglobalize.php");
|
||||
|
||||
$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER'];
|
||||
$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW'];
|
||||
$PHP_SELF=$_SERVER['PHP_SELF'];
|
||||
$server_ip=$_GET["server_ip"]; if (!$server_ip) {$server_ip=$_POST["server_ip"];}
|
||||
$reset_counter=$_GET["reset_counter"]; if (!$reset_counter) {$reset_counter=$_POST["reset_counter"];}
|
||||
$submit=$_GET["submit"]; if (!$submit) {$submit=$_POST["submit"];}
|
||||
$SUBMIT=$_GET["SUBMIT"]; if (!$SUBMIT) {$SUBMIT=$_POST["SUBMIT"];}
|
||||
|
||||
# AST_timeonVDAD_closer.php
|
||||
# live real-time stats for the VICIDIAL Auto-Dialer
|
||||
|
||||
$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";
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<?
|
||||
echo "<STYLE type=\"text/css\">\n";
|
||||
echo "<!--\n";
|
||||
$stmt="select group_id,group_color from vicidial_inbound_groups;";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$groups_to_print = mysql_num_rows($rslt);
|
||||
if ($groups_to_print > 0)
|
||||
{
|
||||
$g=0;
|
||||
while ($g < $groups_to_print)
|
||||
{
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$group_id[$g] = $row[0];
|
||||
$group_color[$g] = $row[1];
|
||||
echo " .$group_id[$g] {color: black; background-color: $group_color[$g]}\n";
|
||||
$g++;
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
.DEAD {color: white; background-color: black}
|
||||
.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=iso-8859-1\">\n";
|
||||
echo"<META HTTP-EQUIV=Refresh CONTENT=\"4; URL=$PHP_SELF?server_ip=$server_ip&DB=$DB&reset_counter=$reset_counter\">\n";
|
||||
echo "<TITLE>VICIDIAL: Time On VDAD</TITLE></HEAD><BODY BGCOLOR=WHITE>\n";
|
||||
echo "<PRE><FONT SIZE=3>\n\n";
|
||||
|
||||
###################################################################################
|
||||
###### TIME ON SYSTEM
|
||||
###################################################################################
|
||||
|
||||
echo "VICIDIAL: Agents Time On Calls $NOW_TIME\n\n";
|
||||
echo "+------------|--------+-----------+---------------------+--------+----------+---------+--------------+--------+\n";
|
||||
echo "| STATION | USER | SESSIONID | CHANNEL | STATUS | CALLTIME | MINUTES | CAMPAIGN | FRONT |\n";
|
||||
echo "+------------|--------+-----------+---------------------+--------+----------+---------+--------------+--------+\n";
|
||||
|
||||
|
||||
$stmt="select extension,user,conf_exten,channel,status,last_call_time,UNIX_TIMESTAMP(last_call_time),UNIX_TIMESTAMP(last_call_finish),uniqueid,lead_id from vicidial_live_agents where status NOT IN('PAUSED') and server_ip='$server_ip' order by extension;";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$talking_to_print = mysql_num_rows($rslt);
|
||||
if ($talking_to_print > 0)
|
||||
{
|
||||
$i=0;
|
||||
while ($i < $talking_to_print)
|
||||
{
|
||||
$row=mysql_fetch_row($rslt);
|
||||
if (eregi("READY|PAUSED|CLOSER",$row[4]))
|
||||
{
|
||||
$row[3]='';
|
||||
$row[5]='- WAIT -';
|
||||
$row[6]=$row[7];
|
||||
}
|
||||
$extension[$i] = sprintf("%-10s", $row[0]);
|
||||
$user[$i] = sprintf("%-6s", $row[1]);
|
||||
$sessionid[$i] = sprintf("%-9s", $row[2]);
|
||||
$channel[$i] = sprintf("%-19s", $row[3]);
|
||||
$cc[$i]=0;
|
||||
while ( (strlen($channel[$i]) > 19) and ($cc[$i] < 100) )
|
||||
{
|
||||
$channel[$i] = eregi_replace(".$","",$channel[$i]);
|
||||
$cc[$i]++;
|
||||
if (strlen($channel[$i]) <= 19) {$cc[$i]=101;}
|
||||
}
|
||||
$status[$i] = sprintf("%-6s", $row[4]);
|
||||
$start_time[$i] = sprintf("%-8s", $row[5]);
|
||||
$cd[$i]=0;
|
||||
while ( (strlen($start_time[$i]) > 8) and ($cd[$i] < 100) )
|
||||
{
|
||||
$start_time[$i] = eregi_replace("^.","",$start_time[$i]);
|
||||
$cd[$i]++;
|
||||
if (strlen($start_time[$i]) <= 8) {$cd[$i]=101;}
|
||||
}
|
||||
$uniqueid[$i] = $row[8];
|
||||
$lead_id[$i] = $row[9];
|
||||
$closer[$i] = $row[1];
|
||||
$call_time_S[$i] = ($STARTtime - $row[6]);
|
||||
|
||||
$call_time_M[$i] = ($call_time_S[$i] / 60);
|
||||
$call_time_M[$i] = round($call_time_M[$i], 2);
|
||||
$call_time_M_int[$i] = intval("$call_time_M[$i]");
|
||||
$call_time_SEC[$i] = ($call_time_M[$i] - $call_time_M_int[$i]);
|
||||
$call_time_SEC[$i] = ($call_time_SEC[$i] * 60);
|
||||
$call_time_SEC[$i] = round($call_time_SEC[$i], 0);
|
||||
if ($call_time_SEC[$i] < 10) {$call_time_SEC[$i] = "0$call_time_SEC[$i]";}
|
||||
$call_time_MS[$i] = "$call_time_M_int[$i]:$call_time_SEC[$i]";
|
||||
$call_time_MS[$i] = sprintf("%7s", $call_time_MS[$i]);
|
||||
$i++;
|
||||
}
|
||||
$ext_count = $i;
|
||||
$i=0;
|
||||
while ($i < $ext_count)
|
||||
{
|
||||
|
||||
$stmt="select campaign_id from vicidial_auto_calls where uniqueid='$uniqueid[$i]' and server_ip='$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="<SPAN class=\"$camp_color\"><B>"; $EG='</B></SPAN>';
|
||||
# if ($call_time_M_int[$i] >= 5) {$G='<SPAN class="blue"><B>'; $EG='</B></SPAN>';}
|
||||
# if ($call_time_M_int[$i] >= 10) {$G='<SPAN class="purple"><B>'; $EG='</B></SPAN>';}
|
||||
|
||||
echo "| $G$extension[$i]$EG | $G$user[$i]$EG | $G$sessionid[$i]$EG | $G$channel[$i]$EG | $G$status[$i]$EG | $G$start_time[$i]$EG | $G$call_time_MS[$i]$EG | $G$campaign$EG | $G$fronter$EG |\n";
|
||||
|
||||
$i++;
|
||||
}
|
||||
|
||||
echo "+------------|--------+-----------+---------------------+--------+----------+---------+--------------+--------+\n";
|
||||
echo " $i agents logged in on server $server_ip\n\n";
|
||||
|
||||
# echo " <SPAN class=\"blue\"><B> </SPAN> - 5 minutes or more on call</B>\n";
|
||||
# echo " <SPAN class=\"purple\"><B> </SPAN> - Over 10 minutes on call</B>\n";
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "**************************************************************************************\n";
|
||||
echo "**************************************************************************************\n";
|
||||
echo "********************************* NO AGENTS ON CALLS *********************************\n";
|
||||
echo "**************************************************************************************\n";
|
||||
echo "**************************************************************************************\n";
|
||||
}
|
||||
|
||||
|
||||
###################################################################################
|
||||
###### OUTBOUND CALLS
|
||||
###################################################################################
|
||||
#echo "\n\n";
|
||||
echo "----------------------------------------------------------------------------------------";
|
||||
echo "\n\n";
|
||||
echo "VICIDIAL: Time On VDAD $NOW_TIME\n\n";
|
||||
echo "+---------------------+--------+--------------+--------------------+----------+---------+\n";
|
||||
echo "| CHANNEL | STATUS | CAMPAIGN | PHONE NUMBER | CALLTIME | MINUTES |\n";
|
||||
echo "+---------------------+--------+--------------+--------------------+----------+---------+\n";
|
||||
|
||||
#$link=mysql_connect("localhost", "cron", "1234");
|
||||
# $linkX=mysql_connect("localhost", "cron", "1234");
|
||||
#mysql_select_db("asterisk");
|
||||
|
||||
$stmt="select channel,status,campaign_id,phone_code,phone_number,call_time,UNIX_TIMESTAMP(call_time) from vicidial_auto_calls where status NOT IN('XFER') and server_ip='$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='<SPAN class="green"><B>'; $EG='</B></SPAN>';}
|
||||
# if ($call_time_M_int >= 6) {$G='<SPAN class="red"><B>'; $EG='</B></SPAN>';}
|
||||
|
||||
echo "| $G$channel$EG | $G$status$EG | $G$campaign$EG | $G$number_dialed$EG | $G$start_time$EG | $G$call_time_MS$EG |\n";
|
||||
|
||||
$i++;
|
||||
}
|
||||
|
||||
echo "+---------------------+--------+--------------+--------------------+----------+---------+\n";
|
||||
echo " $i calls being placed on server $server_ip\n\n";
|
||||
|
||||
echo " <SPAN class=\"green\"><B> </SPAN> - LIVE CALL WAITING</B>\n";
|
||||
# echo " <SPAN class=\"red\"><B> </SPAN> - Over 5 minutes on hold</B>\n";
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "***************************************************************************************\n";
|
||||
echo "***************************************************************************************\n";
|
||||
echo "******************************* NO LIVE CALLS WAITING *********************************\n";
|
||||
echo "***************************************************************************************\n";
|
||||
echo "***************************************************************************************\n";
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
</PRE>
|
||||
|
||||
</BODY></HTML>
|
||||
@@ -1,272 +0,0 @@
|
||||
<?
|
||||
### AST_timeonVDADall.php
|
||||
###
|
||||
### Copyright (C) 2006 Matt Florell <vicidial@gmail.com> LICENSE: GPLv2
|
||||
###
|
||||
# live real-time stats for the VICIDIAL Auto-Dialer all servers
|
||||
#
|
||||
# changes:
|
||||
# 50406-0920 Added Paused agents < 1 min (Chris Doyle)
|
||||
# 51130-1218 Modified layout and info to show all servers in a vicidial system
|
||||
|
||||
header ("Content-type: text/html; charset=utf-8");
|
||||
|
||||
require("dbconnect.php");
|
||||
|
||||
$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER'];
|
||||
$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW'];
|
||||
$PHP_SELF=$_SERVER['PHP_SELF'];
|
||||
$server_ip=$_GET["server_ip"]; if (!$server_ip) {$server_ip=$_POST["server_ip"];}
|
||||
$reset_counter=$_GET["reset_counter"]; if (!$reset_counter) {$reset_counter=$_POST["reset_counter"];}
|
||||
$RR=$_GET["RR"]; if (!$RR) {$RR=$_POST["RR"];}
|
||||
$group=$_GET["group"]; if (!$group) {$group=$_POST["group"];}
|
||||
$DB=$_GET["DB"]; if (!$DB) {$DB=$_POST["DB"];}
|
||||
$submit=$_GET["submit"]; if (!$submit) {$submit=$_POST["submit"];}
|
||||
$SUBMIT=$_GET["SUBMIT"]; if (!$SUBMIT) {$SUBMIT=$_POST["SUBMIT"];}
|
||||
|
||||
|
||||
$NOW_TIME = date("Y-m-d H:i:s");
|
||||
$STARTtime = date("U");
|
||||
$epochSIXhoursAGO = ($STARTtime - 21600);
|
||||
$timeSIXhoursAGO = date("Y-m-d H:i:s",$epochSIXhoursAGO);
|
||||
|
||||
$stmt="select campaign_id from vicidial_campaigns;";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$groups_to_print = mysql_num_rows($rslt);
|
||||
$i=0;
|
||||
while ($i < $groups_to_print)
|
||||
{
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$groups[$i] =$row[0];
|
||||
$i++;
|
||||
}
|
||||
|
||||
if (!$RR) {$RR=40;}
|
||||
|
||||
$NFB = '<b><font size=6 face="courier">';
|
||||
$NFE = '</font></b>';
|
||||
$F=''; $FG=''; $B=''; $BG='';
|
||||
$reset_counter++;
|
||||
|
||||
if ($reset_counter > 7)
|
||||
{
|
||||
$reset_counter=0;
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<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}
|
||||
.yellow {color: black; background-color: yellow}
|
||||
.orange {color: black; background-color: orange}
|
||||
|
||||
.r1 {color: black; background-color: #FFCCCC}
|
||||
.r2 {color: black; background-color: #FF9999}
|
||||
.r3 {color: black; background-color: #FF6666}
|
||||
.r4 {color: white; background-color: #FF0000}
|
||||
.b1 {color: black; background-color: #CCCCFF}
|
||||
.b2 {color: black; background-color: #9999FF}
|
||||
.b3 {color: black; background-color: #6666FF}
|
||||
.b4 {color: white; background-color: #0000FF}
|
||||
-->
|
||||
</STYLE>
|
||||
|
||||
<?
|
||||
echo"<META HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html; charset=iso-8859-1\">\n";
|
||||
echo"<META HTTP-EQUIV=Refresh CONTENT=\"$RR; URL=$PHP_SELF?RR=$RR&DB=$DB&group=$group\">\n";
|
||||
echo "<TITLE>VICIDIAL: Time On VDAD Campaign: $group</TITLE></HEAD><BODY BGCOLOR=WHITE>\n";
|
||||
echo "<FORM ACTION=\"$PHP_SELF\" METHOD=GET>\n";
|
||||
echo "VICIDIAL: Realtime Campaign: \n";
|
||||
echo "<INPUT TYPE=HIDDEN NAME=RR VALUE=4>\n";
|
||||
echo "<INPUT TYPE=HIDDEN NAME=DB VALUE=\"$DB\">\n";
|
||||
echo "<SELECT SIZE=1 NAME=group>\n";
|
||||
$o=0;
|
||||
while ($groups_to_print > $o)
|
||||
{
|
||||
if ($groups[$o] == $group) {echo "<option selected value=\"$groups[$o]\">$groups[$o]</option>\n";}
|
||||
else {echo "<option value=\"$groups[$o]\">$groups[$o]</option>\n";}
|
||||
$o++;
|
||||
}
|
||||
echo "</SELECT>\n";
|
||||
echo "<INPUT type=submit NAME=SUBMIT VALUE=SUBMIT> \n";
|
||||
echo "<a href=\"$PHP_SELF?group=$group&RR=40&DB=$DB\">STOP</a> | <a href=\"$PHP_SELF?group=$group&RR=4&DB=$DB\">GO</a> \n";
|
||||
echo "\n\n";
|
||||
|
||||
if (!$group) {echo "<BR><BR>please select a campaign from the pulldown above</FORM>\n"; exit;}
|
||||
else
|
||||
{
|
||||
$stmt="select auto_dial_level,dial_status_a,dial_status_b,dial_status_c,dial_status_d,dial_status_e,lead_order from vicidial_campaigns where campaign_id='$group';";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
$row=mysql_fetch_row($rslt);
|
||||
|
||||
echo "<BR><font size=2>";
|
||||
echo "<B>DIAL LEVEL:</B> $row[0] ";
|
||||
echo "<B>STATUSES:</B> $row[1], $row[2], $row[3], $row[4], $row[5] ";
|
||||
echo "<B>ORDER:</B> $row[6]</font>";
|
||||
echo "</FORM>\n\n";
|
||||
}
|
||||
###################################################################################
|
||||
###### OUTBOUND CALLS
|
||||
###################################################################################
|
||||
if (eregi("CLOSER",$group))
|
||||
{$stmt="select status from vicidial_auto_calls where status NOT IN('XFER') and (campaign_id='$group' or campaign_id LIKE \"CL_%\");";}
|
||||
else
|
||||
{$stmt="select status from vicidial_auto_calls where status NOT IN('XFER') and campaign_id='$group';";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$parked_to_print = mysql_num_rows($rslt);
|
||||
if ($parked_to_print > 0)
|
||||
{
|
||||
$i=0;
|
||||
$out_total=0;
|
||||
$out_ring=0;
|
||||
$out_live=0;
|
||||
while ($i < $parked_to_print)
|
||||
{
|
||||
$row=mysql_fetch_row($rslt);
|
||||
|
||||
if (eregi("LIVE",$row[0]))
|
||||
{$out_live++;}
|
||||
else
|
||||
{
|
||||
if (eregi("CLOSER",$row[0]))
|
||||
{$nothing=1;}
|
||||
else
|
||||
{$out_ring++;}
|
||||
}
|
||||
$out_total++;
|
||||
$i++;
|
||||
}
|
||||
|
||||
if ($out_live > 0) {$F='<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 (eregi("CLOSER",$group))
|
||||
{echo "$NFB$out_total$NFE current active calls \n";}
|
||||
else
|
||||
{echo "$NFB$out_total$NFE calls being placed \n";}
|
||||
|
||||
echo "$NFB$out_ring$NFE calls ringing \n";
|
||||
echo "$NFB$F $out_live $FG$NFE calls waiting for agents \n";
|
||||
}
|
||||
else
|
||||
{
|
||||
echo " NO LIVE CALLS WAITING \n";
|
||||
}
|
||||
|
||||
|
||||
###################################################################################
|
||||
###### TIME ON SYSTEM
|
||||
###################################################################################
|
||||
|
||||
$agent_incall=0;
|
||||
$agent_ready=0;
|
||||
$agent_paused=0;
|
||||
$agent_total=0;
|
||||
|
||||
$Aecho = '';
|
||||
$Aecho .= "VICIDIAL: Agents Time On Calls Campaign: $group $NOW_TIME\n\n";
|
||||
$Aecho .= "+------------|--------+-----------+--------+-----------------+-----------------+---------+------------+\n";
|
||||
$Aecho .= "| STATION | USER | SESSIONID | STATUS | SERVER IP | CALL SERVER IP | MM:SS | CAMPAIGN |\n";
|
||||
$Aecho .= "+------------|--------+-----------+--------+-----------------+-----------------+---------+------------+\n";
|
||||
|
||||
|
||||
$stmt="select extension,user,conf_exten,status,server_ip,UNIX_TIMESTAMP(last_call_time),UNIX_TIMESTAMP(last_call_finish),call_server_ip,campaign_id from vicidial_live_agents where campaign_id='$group' order by status,last_call_time;";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$talking_to_print = mysql_num_rows($rslt);
|
||||
if ($talking_to_print > 0)
|
||||
{
|
||||
$i=0;
|
||||
$agentcount=0;
|
||||
while ($i < $talking_to_print)
|
||||
{
|
||||
$row=mysql_fetch_row($rslt);
|
||||
if (eregi("READY|PAUSED",$row[4]))
|
||||
{
|
||||
$row[5]=$row[6];
|
||||
}
|
||||
$extension = sprintf("%-10s", $row[0]);
|
||||
$user = sprintf("%-6s", $row[1]);
|
||||
$sessionid = sprintf("%-9s", $row[2]);
|
||||
$status = sprintf("%-6s", $row[3]);
|
||||
$server_ip = sprintf("%-15s", $row[4]);
|
||||
$call_server_ip = sprintf("%-15s", $row[7]);
|
||||
$campaign_id = sprintf("%-10s", $row[8]);
|
||||
$call_time_S = ($STARTtime - $row[5]);
|
||||
|
||||
$call_time_M = ($call_time_S / 60);
|
||||
$call_time_M = round($call_time_M, 2);
|
||||
$call_time_M_int = intval("$call_time_M");
|
||||
$call_time_SEC = ($call_time_M - $call_time_M_int);
|
||||
$call_time_SEC = ($call_time_SEC * 60);
|
||||
$call_time_SEC = round($call_time_SEC, 0);
|
||||
if ($call_time_SEC < 10) {$call_time_SEC = "0$call_time_SEC";}
|
||||
$call_time_MS = "$call_time_M_int:$call_time_SEC";
|
||||
$call_time_MS = sprintf("%7s", $call_time_MS);
|
||||
$G = ''; $EG = '';
|
||||
if ($call_time_M_int >= 5) {$G='<SPAN class="purple"><B>'; $EG='</B></SPAN>';}
|
||||
# if ($call_time_M_int >= 10) {$G='<SPAN class="purple"><B>'; $EG='</B></SPAN>';}
|
||||
if (eregi("PAUSED",$row[3]))
|
||||
{
|
||||
if ($call_time_M_int >= 1)
|
||||
{$i++; continue;}
|
||||
else
|
||||
{$G='<SPAN class="yellow"><B>'; $EG='</B></SPAN>'; $agent_paused++; $agent_total++;}
|
||||
}
|
||||
# if ( (strlen($row[7])> 4) and ($row[7] != "$row[4]") )
|
||||
# {$G='<SPAN class="orange"><B>'; $EG='</B></SPAN>';}
|
||||
|
||||
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='<SPAN class="blue"><B>'; $EG='</B></SPAN>';}
|
||||
|
||||
$agentcount++;
|
||||
$Aecho .= "| $G$extension$EG | <a href=\"./user_status.php?user=$user\" target=\"_blank\">$G$user$EG</a> | $G$sessionid$EG | $G$status$EG | $G$server_ip$EG | $G$call_server_ip$EG | $G$call_time_MS$EG | $G$campaign_id$EG |\n";
|
||||
|
||||
$i++;
|
||||
}
|
||||
|
||||
$Aecho .= "+------------|--------+-----------+--------+-----------------+-----------------+---------+------------+\n";
|
||||
$Aecho .= " $agentcount agents logged in on all servers\n\n";
|
||||
|
||||
$Aecho .= " <SPAN class=\"yellow\"><B> </SPAN> - Paused agents</B>\n";
|
||||
# $Aecho .= " <SPAN class=\"orange\"><B> </SPAN> - Balanced call</B>\n";
|
||||
$Aecho .= " <SPAN class=\"blue\"><B> </SPAN> - Agent waiting for call</B>\n";
|
||||
$Aecho .= " <SPAN class=\"purple\"><B> </SPAN> - Over 5 minutes on call</B>\n";
|
||||
|
||||
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 "";
|
||||
echo "$Aecho";
|
||||
}
|
||||
else
|
||||
{
|
||||
echo " NO AGENTS ON CALLS \n";
|
||||
}
|
||||
|
||||
?>
|
||||
</PRE>
|
||||
|
||||
</BODY></HTML>
|
||||
@@ -1,171 +0,0 @@
|
||||
<?
|
||||
require("dbconnect.php");
|
||||
|
||||
require_once("htglobalize.php");
|
||||
|
||||
# AST_timeoncall.php
|
||||
|
||||
$NOW_TIME = date("Y-m-d H:i:s");
|
||||
$STARTtime = date("U");
|
||||
|
||||
?>
|
||||
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<STYLE type="text/css">
|
||||
<!--
|
||||
.green {color: white; background-color: green}
|
||||
.red {color: white; background-color: red}
|
||||
-->
|
||||
</STYLE>
|
||||
|
||||
<?
|
||||
echo"<META HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html; charset=iso-8859-1\">\n";
|
||||
echo"<META HTTP-EQUIV=Refresh CONTENT=\"15; URL=$PHP_SELF?server_ip=$server_ip&DB=$DB\">\n";
|
||||
echo "<TITLE>VICIDIAL: Time On Call</TITLE></HEAD><BODY BGCOLOR=WHITE>\n";
|
||||
echo "<PRE>\n\n";
|
||||
|
||||
echo "VICIDIAL: Time On Call $NOW_TIME\n\n";
|
||||
echo "+------------+-----------+-----------+------------------+---------------------+---------+\n";
|
||||
echo "| STATION | SESSIONID | CHANNEL | NUMBER DIALED | START TIME | MINUTES |\n";
|
||||
echo "+------------+-----------+-----------+------------------+---------------------+---------+\n";
|
||||
|
||||
#$link=mysql_connect("localhost", "cron", "1234");
|
||||
# $linkX=mysql_connect("localhost", "cron", "1234");
|
||||
#mysql_select_db("asterisk");
|
||||
|
||||
$stmt="SELECT count(*) from live_sip_channels where server_ip='$server_ip';";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$parked_count = $row[0];
|
||||
if ($parked_count > 0)
|
||||
{
|
||||
$stmt="select extension from live_channels where server_ip='$server_ip';";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$ext_to_print = mysql_num_rows($rslt);
|
||||
$i=0;
|
||||
$live_zap_counter=0;
|
||||
$sessions = '';
|
||||
while ($i < $ext_to_print)
|
||||
{
|
||||
$row=mysql_fetch_row($rslt);
|
||||
if (preg_match("/^8600/i",$row[0]))
|
||||
{
|
||||
$sessions .= "$row[0]|";
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
$sessions = preg_replace("/\|$/",'',$sessions);
|
||||
|
||||
if ($DB) {echo "SESSIONS: -$sessions-\n";}
|
||||
|
||||
$stmt="select * from live_sip_channels where server_ip='$server_ip' order by channel;";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$parked_to_print = mysql_num_rows($rslt);
|
||||
$i=0;
|
||||
$live_calls_counter=0;
|
||||
while ($i < $parked_to_print)
|
||||
{
|
||||
$row=mysql_fetch_row($rslt);
|
||||
if ( (preg_match("/Zap\/|internal|ring/i",$row[3])) or (preg_match("/Local\//i",$row[0])) )
|
||||
{
|
||||
if ($DB) {echo "NOT STATION |$row[0]|$row[3]|\n";}
|
||||
$session_id = '';
|
||||
}
|
||||
else
|
||||
{
|
||||
if (preg_match("/$row[3]/i",$sessions))
|
||||
{
|
||||
if ($DB) {echo "LIVE STATION|$row[0]|$row[3]|\n";}
|
||||
$session_id = $row[3];
|
||||
$station = preg_replace("/SIP\//",'',$row[0]);
|
||||
$station = preg_replace("/-.*/",'',$station);
|
||||
|
||||
$LIVE_sessions[$live_calls_counter] = "$session_id";
|
||||
$LIVE_sessions_FORMAT[$live_calls_counter] = sprintf("%-9s", $session_id);
|
||||
$LIVE_stations[$live_calls_counter] = "$station";
|
||||
$LIVE_stations_FORMAT[$live_calls_counter] = sprintf("%-10s", $station);
|
||||
|
||||
# echo "| $station | $session_id | \n";
|
||||
|
||||
$live_calls_counter++;
|
||||
}
|
||||
else
|
||||
{
|
||||
if ($DB) {echo "NOT STATIONZ|$row[0]|$row[3]|\n";}
|
||||
$session_id = '';
|
||||
}
|
||||
}
|
||||
|
||||
$i++;
|
||||
}
|
||||
|
||||
if ($live_calls_counter > 0)
|
||||
{
|
||||
$i=0;
|
||||
$LC_counter = $live_calls_counter;
|
||||
|
||||
while ($i < $live_calls_counter)
|
||||
{
|
||||
$stmt="select channel,extension,number_dialed,start_time,start_epoch from call_log where extension='$LIVE_stations[$i]' and server_ip='$server_ip' order by uniqueid desc LIMIT 1;";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$parked_to_print = mysql_num_rows($rslt);
|
||||
$row=mysql_fetch_row($rslt);
|
||||
|
||||
$channel = sprintf("%-9s", $row[0]);
|
||||
$number_dialed = sprintf("%-16s", $row[2]);
|
||||
$start_time = sprintf("%-19s", $row[3]);
|
||||
$call_time_S = ($STARTtime - $row[4]);
|
||||
|
||||
$call_time_M = ($call_time_S / 60);
|
||||
$call_time_M = round($call_time_M, 2);
|
||||
$call_time_M_int = intval("$call_time_M");
|
||||
$call_time_SEC = ($call_time_M - $call_time_M_int);
|
||||
$call_time_SEC = ($call_time_SEC * 60);
|
||||
$call_time_SEC = round($call_time_SEC, 0);
|
||||
if ($call_time_SEC < 10) {$call_time_SEC = "0$call_time_SEC";}
|
||||
$call_time_MS = "$call_time_M_int:$call_time_SEC";
|
||||
$call_time_MS = sprintf("%7s", $call_time_MS);
|
||||
$G = ''; $EG = '';
|
||||
if ($call_time_M_int >= 12) {$G='<SPAN class="green"><B>'; $EG='</B></SPAN>';}
|
||||
if ($call_time_M_int >= 31) {$G='<SPAN class="red"><B>'; $EG='</B></SPAN>';}
|
||||
|
||||
echo "| $G$LIVE_stations_FORMAT[$i]$EG | $G$LIVE_sessions_FORMAT[$i]$EG | $G$channel$EG | $G$number_dialed$EG | $G$start_time$EG | $G$call_time_MS$EG |\n";
|
||||
|
||||
$i++;
|
||||
}
|
||||
|
||||
echo "+------------+-----------+-----------+------------------+---------------------+---------+\n";
|
||||
echo " $i stations on live calls on server $server_ip\n\n";
|
||||
|
||||
echo " <SPAN class=\"green\"><B> </SPAN> - 12 minutes or more on live call\n";
|
||||
echo " <SPAN class=\"red\"><B> </SPAN> - Over 30 minutes on live call\n";
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "*****************************************************************************************\n";
|
||||
echo "*****************************************************************************************\n";
|
||||
echo "*************************************** NO LIVE STATIONS ********************************\n";
|
||||
echo "*****************************************************************************************\n";
|
||||
echo "*****************************************************************************************\n";
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "*****************************************************************************************\n";
|
||||
echo "*****************************************************************************************\n";
|
||||
echo "*************************************** NO LIVE STATIONS ********************************\n";
|
||||
echo "*****************************************************************************************\n";
|
||||
echo "*****************************************************************************************\n";
|
||||
}
|
||||
|
||||
?>
|
||||
</PRE>
|
||||
|
||||
</BODY></HTML>
|
||||
@@ -1,193 +0,0 @@
|
||||
<?
|
||||
require("dbconnect.php");
|
||||
|
||||
##### depricated
|
||||
#require_once("htglobalize.php");
|
||||
|
||||
$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER'];
|
||||
$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW'];
|
||||
$PHP_SELF=$_SERVER['PHP_SELF'];
|
||||
$server_ip=$_GET["server_ip"]; if (!$server_ip) {$server_ip=$_POST["server_ip"];}
|
||||
$reset_counter=$_GET["reset_counter"]; if (!$reset_counter) {$reset_counter=$_POST["reset_counter"];}
|
||||
$submit=$_GET["submit"]; if (!$submit) {$submit=$_POST["submit"];}
|
||||
$SUBMIT=$_GET["SUBMIT"]; if (!$SUBMIT) {$SUBMIT=$_POST["SUBMIT"];}
|
||||
|
||||
# AST_timeonpark.php
|
||||
|
||||
$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=iso-8859-1\">\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</TITLE></HEAD><BODY BGCOLOR=WHITE>\n";
|
||||
echo "<PRE><FONT SIZE=3>\n\n";
|
||||
|
||||
echo "VICIDIAL: Time On Park $NOW_TIME\n\n";
|
||||
echo "+------------+-----------------+---------------------+---------+\n";
|
||||
echo "| CHANNEL | GROUP | START TIME | MINUTES |\n";
|
||||
echo "+------------+-----------------+---------------------+---------+\n";
|
||||
|
||||
#$link=mysql_connect("localhost", "cron", "1234");
|
||||
# $linkX=mysql_connect("localhost", "cron", "1234");
|
||||
#mysql_select_db("asterisk");
|
||||
|
||||
$stmt="select extension,user,channel,channel_group,parked_time,UNIX_TIMESTAMP(parked_time) from park_log where status ='PARKED' and server_ip='$server_ip' order by uniqueid;";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$parked_to_print = mysql_num_rows($rslt);
|
||||
if ($parked_to_print > 0)
|
||||
{
|
||||
$i=0;
|
||||
while ($i < $parked_to_print)
|
||||
{
|
||||
$row=mysql_fetch_row($rslt);
|
||||
|
||||
$channel = sprintf("%-10s", $row[2]);
|
||||
$number_dialed = sprintf("%-15s", $row[3]);
|
||||
$start_time = sprintf("%-19s", $row[4]);
|
||||
$call_time_S = ($STARTtime - $row[5]);
|
||||
|
||||
$call_time_M = ($call_time_S / 60);
|
||||
$call_time_M = round($call_time_M, 2);
|
||||
$call_time_M_int = intval("$call_time_M");
|
||||
$call_time_SEC = ($call_time_M - $call_time_M_int);
|
||||
$call_time_SEC = ($call_time_SEC * 60);
|
||||
$call_time_SEC = round($call_time_SEC, 0);
|
||||
if ($call_time_SEC < 10) {$call_time_SEC = "0$call_time_SEC";}
|
||||
$call_time_MS = "$call_time_M_int:$call_time_SEC";
|
||||
$call_time_MS = sprintf("%7s", $call_time_MS);
|
||||
$G = ''; $EG = '';
|
||||
if ($call_time_M_int >= 1) {$G='<SPAN class="green"><B>'; $EG='</B></SPAN>';}
|
||||
if ($call_time_M_int >= 6) {$G='<SPAN class="red"><B>'; $EG='</B></SPAN>';}
|
||||
|
||||
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 " <SPAN class=\"green\"><B> </SPAN> - 1 minute or more on hold</B>\n";
|
||||
echo " <SPAN class=\"red\"><B> </SPAN> - Over 5 minutes on hold</B>\n";
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "****************************************************************\n";
|
||||
echo "****************************************************************\n";
|
||||
echo "******************** NO LIVE CALLS WAITING *********************\n";
|
||||
echo "****************************************************************\n";
|
||||
echo "****************************************************************\n";
|
||||
}
|
||||
|
||||
###################################################################################
|
||||
###### TIME ON INBOUND CALLS
|
||||
###################################################################################
|
||||
echo "\n\n";
|
||||
echo "----------------------------------------------------------------------------------------";
|
||||
echo "\n\n";
|
||||
echo "VICIDIAL: Agents Time On Inbound Calls $NOW_TIME\n\n";
|
||||
echo "+------------|--------+------------+-----------------+---------------------+---------+\n";
|
||||
echo "| STATION | USER | CHANNEL | GROUP | START TIME | MINUTES |\n";
|
||||
echo "+------------|--------+------------+-----------------+---------------------+---------+\n";
|
||||
|
||||
|
||||
$stmt="select extension,user,channel,channel_group,grab_time,UNIX_TIMESTAMP(grab_time) from park_log where status ='TALKING' and server_ip='$server_ip' order by uniqueid;";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$talking_to_print = mysql_num_rows($rslt);
|
||||
if ($talking_to_print > 0)
|
||||
{
|
||||
$i=0;
|
||||
while ($i < $talking_to_print)
|
||||
{
|
||||
$row=mysql_fetch_row($rslt);
|
||||
|
||||
$extension = sprintf("%-10s", $row[0]);
|
||||
$user = sprintf("%-6s", $row[1]);
|
||||
$channel = sprintf("%-10s", $row[2]);
|
||||
$number_dialed = sprintf("%-15s", $row[3]);
|
||||
$start_time = sprintf("%-19s", $row[4]);
|
||||
$call_time_S = ($STARTtime - $row[5]);
|
||||
|
||||
$call_time_M = ($call_time_S / 60);
|
||||
$call_time_M = round($call_time_M, 2);
|
||||
$call_time_M_int = intval("$call_time_M");
|
||||
$call_time_SEC = ($call_time_M - $call_time_M_int);
|
||||
$call_time_SEC = ($call_time_SEC * 60);
|
||||
$call_time_SEC = round($call_time_SEC, 0);
|
||||
if ($call_time_SEC < 10) {$call_time_SEC = "0$call_time_SEC";}
|
||||
$call_time_MS = "$call_time_M_int:$call_time_SEC";
|
||||
$call_time_MS = sprintf("%7s", $call_time_MS);
|
||||
$G = ''; $EG = '';
|
||||
if ($call_time_M_int >= 12) {$G='<SPAN class="blue"><B>'; $EG='</B></SPAN>';}
|
||||
if ($call_time_M_int >= 31) {$G='<SPAN class="purple"><B>'; $EG='</B></SPAN>';}
|
||||
|
||||
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 " <SPAN class=\"blue\"><B> </SPAN> - 12 minutes or more on call</B>\n";
|
||||
echo " <SPAN class=\"purple\"><B> </SPAN> - Over 30 minutes on call</B>\n";
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "**************************************************************************************\n";
|
||||
echo "**************************************************************************************\n";
|
||||
echo "********************************* NO AGENTS ON CALLS *********************************\n";
|
||||
echo "**************************************************************************************\n";
|
||||
echo "**************************************************************************************\n";
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
</PRE>
|
||||
|
||||
</BODY></HTML>
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,321 +0,0 @@
|
||||
<?
|
||||
### admin_modify_lead.php
|
||||
###
|
||||
### Copyright (C) 2006 Matt Florell <vicidial@gmail.com> LICENSE: GPLv2
|
||||
###
|
||||
|
||||
require("dbconnect.php");
|
||||
|
||||
$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER'];
|
||||
$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW'];
|
||||
$PHP_SELF=$_SERVER['PHP_SELF'];
|
||||
$vendor_id=$_GET["vendor_id"]; if (!$vendor_id) {$vendor_id=$_POST["vendor_id"];}
|
||||
$phone=$_GET["phone"]; if (!$phone) {$phone=$_POST["phone"];}
|
||||
$lead_id=$_GET["lead_id"]; if (!$lead_id) {$lead_id=$_POST["lead_id"];}
|
||||
$first_name=$_GET["first_name"]; if (!$first_name) {$first_name=$_POST["first_name"];}
|
||||
$last_name=$_GET["last_name"]; if (!$last_name) {$last_name=$_POST["last_name"];}
|
||||
$phone_number=$_GET["phone_number"]; if (!$phone_number) {$phone_number=$_POST["phone_number"];}
|
||||
$end_call=$_GET["end_call"]; if (!$end_call) {$end_call=$_POST["end_call"];}
|
||||
$DB=$_GET["DB"]; if (!$DB) {$DB=$_POST["DB"];}
|
||||
$dispo=$_GET["dispo"]; if (!$dispo) {$dispo=$_POST["dispo"];}
|
||||
$list_id=$_GET["list_id"]; if (!$list_id) {$list_id=$_POST["list_id"];}
|
||||
$campaign_id=$_GET["campaign_id"]; if (!$campaign_id) {$campaign_id=$_POST["campaign_id"];}
|
||||
$phone_code=$_GET["phone_code"]; if (!$phone_code) {$phone_code=$_POST["phone_code"];}
|
||||
$server_ip=$_GET["server_ip"]; if (!$server_ip) {$server_ip=$_POST["server_ip"];}
|
||||
$extension=$_GET["extension"]; if (!$extension) {$extension=$_POST["extension"];}
|
||||
$channel=$_GET["channel"]; if (!$channel) {$channel=$_POST["channel"];}
|
||||
$call_began=$_GET["call_began"]; if (!$call_began) {$call_began=$_POST["call_began"];}
|
||||
$parked_time=$_GET["parked_time"]; if (!$parked_time) {$parked_time=$_POST["parked_time"];}
|
||||
$tsr=$_GET["tsr"]; if (!$tsr) {$tsr=$_POST["tsr"];}
|
||||
$address1=$_GET["address1"]; if (!$address1) {$address1=$_POST["address1"];}
|
||||
$address2=$_GET["address2"]; if (!$address2) {$address2=$_POST["address2"];}
|
||||
$address3=$_GET["address3"]; if (!$address3) {$address3=$_POST["address3"];}
|
||||
$city=$_GET["city"]; if (!$city) {$city=$_POST["city"];}
|
||||
$state=$_GET["state"]; if (!$state) {$state=$_POST["state"];}
|
||||
$postal_code=$_GET["postal_code"]; if (!$postal_code) {$postal_code=$_POST["postal_code"];}
|
||||
$province=$_GET["province"]; if (!$province) {$province=$_POST["province"];}
|
||||
$country_code=$_GET["country_code"]; if (!$country_code) {$country_code=$_POST["country_code"];}
|
||||
$alt_phone=$_GET["alt_phone"]; if (!$alt_phone) {$alt_phone=$_POST["alt_phone"];}
|
||||
$email=$_GET["email"]; if (!$email) {$email=$_POST["email"];}
|
||||
$security=$_GET["security"]; if (!$security) {$security=$_POST["security"];}
|
||||
$comments=$_GET["comments"]; if (!$comments) {$comments=$_POST["comments"];}
|
||||
$status=$_GET["status"]; if (!$status) {$status=$_POST["status"];}
|
||||
$submit=$_GET["submit"]; if (!$submit) {$submit=$_POST["submit"];}
|
||||
$SUBMIT=$_GET["SUBMIT"]; if (!$SUBMIT) {$SUBMIT=$_POST["SUBMIT"];}
|
||||
|
||||
### 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
|
||||
|
||||
|
||||
$STARTtime = date("U");
|
||||
$TODAY = date("Y-m-d");
|
||||
$NOW_TIME = date("Y-m-d H:i:s");
|
||||
|
||||
|
||||
$stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 7;";
|
||||
if ($DB) {echo "|$stmt|\n";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$auth=$row[0];
|
||||
|
||||
if ($WeBRooTWritablE > 0)
|
||||
{$fp = fopen ("./project_auth_entries.txt", "a");}
|
||||
|
||||
$date = date("r");
|
||||
$ip = getenv("REMOTE_ADDR");
|
||||
$browser = getenv("HTTP_USER_AGENT");
|
||||
|
||||
if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or (!$auth))
|
||||
{
|
||||
Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\"");
|
||||
Header("HTTP/1.0 401 Unauthorized");
|
||||
echo "Invalid Username/Password: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n";
|
||||
exit;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
if($auth>0)
|
||||
{
|
||||
$office_no=strtoupper($PHP_AUTH_USER);
|
||||
$password=strtoupper($PHP_AUTH_PW);
|
||||
$stmt="SELECT full_name,modify_leads from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW'";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$LOGfullname =$row[0];
|
||||
$LOGmodify_leads =$row[1];
|
||||
|
||||
if ($WeBRooTWritablE > 0)
|
||||
{
|
||||
fwrite ($fp, "VICIDIAL|GOOD|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|$LOGfullname|\n");
|
||||
fclose($fp);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if ($WeBRooTWritablE > 0)
|
||||
{
|
||||
fwrite ($fp, "VICIDIAL|FAIL|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|\n");
|
||||
fclose($fp);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
<html>
|
||||
<head>
|
||||
<title>VICIDIAL ADMIN: Lead record modification</title>
|
||||
</head>
|
||||
<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0>
|
||||
<CENTER><FONT FACE="Courier" COLOR=BLACK SIZE=3>
|
||||
|
||||
<?
|
||||
|
||||
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('$lead_id','$list_id','$campaign_id','$parked_time','$call_began','$STARTtime','$call_length','$status','$phone_code','$phone_number','$PHP_AUTH_USER','$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='$status',first_name='$first_name',last_name='$last_name',address1='$address1',address2='$address2',address3='$address3',city='$city',state='$state',province='$province',postal_code='$postal_code',country_code='$country_code',alt_phone='$alt_phone',email='$email',security_phrase='$security',comments='$comments' where lead_id='$lead_id'";
|
||||
if ($DB) {echo "|$stmt|\n";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
|
||||
echo "information modified<BR><BR>\n";
|
||||
echo "<form><input type=button value=\"Close This Window\" onClick=\"javascript:window.close();\"></form>\n";
|
||||
|
||||
if ( ($dispo != $status) and ($dispo == 'CBHOLD') )
|
||||
{
|
||||
### inactivate vicidial_callbacks record for this lead
|
||||
$stmt="UPDATE vicidial_callbacks set status='INACTIVE' where lead_id='$lead_id' and status='ACTIVE';";
|
||||
if ($DB) {echo "|$stmt|\n";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
|
||||
echo "<BR>vicidial_callback record inactivated: $lead_id<BR>\n";
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
$stmt="SELECT count(*) from vicidial_list where lead_id='$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='$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 "<br>Call information: $first_name $last_name - $phone_number<br><br><form action=$PHP_SELF method=POST>\n";
|
||||
echo "<input type=hidden name=end_call value=1>\n";
|
||||
echo "<input type=hidden name=DB value=\"$DB\">\n";
|
||||
echo "<input type=hidden name=lead_id value=\"$lead_id\">\n";
|
||||
echo "<input type=hidden name=dispo value=\"$dispo\">\n";
|
||||
echo "<input type=hidden name=list_id value=\"$list_id\">\n";
|
||||
echo "<input type=hidden name=campaign_id value=\"$campaign_id\">\n";
|
||||
echo "<input type=hidden name=phone_code value=\"$phone_code\">\n";
|
||||
echo "<input type=hidden name=phone_number value=\"$phone_number\">\n";
|
||||
echo "<input type=hidden name=server_ip value=\"$server_ip\">\n";
|
||||
echo "<input type=hidden name=extension value=\"$extension\">\n";
|
||||
echo "<input type=hidden name=channel value=\"$channel\">\n";
|
||||
echo "<input type=hidden name=call_began value=\"$call_began\">\n";
|
||||
echo "<input type=hidden name=parked_time value=\"$parked_time\">\n";
|
||||
echo "<table cellpadding=1 cellspacing=0>\n";
|
||||
echo "<tr><td colspan=2>Vendor ID: $vendor_id Lead ID: $lead_id</td></tr>\n";
|
||||
echo "<tr><td colspan=2>Fronter: <A HREF=\"user_stats.php?user=$tsr\">$tsr</A> List ID: $list_id</td></tr>\n";
|
||||
echo "<tr><td align=right>First Name: </td><td align=left><input type=text name=first_name size=15 maxlength=30 value=\"$first_name\"> \n";
|
||||
echo " Last Name: <input type=text name=last_name size=15 maxlength=30 value=\"$last_name\"> </td></tr>\n";
|
||||
echo "<tr><td align=right>Address 1 : </td><td align=left><input type=text name=address1 size=30 maxlength=30 value=\"$address1\"></td></tr>\n";
|
||||
echo "<tr><td align=right>Address 2 : </td><td align=left><input type=text name=address2 size=30 maxlength=30 value=\"$address2\"></td></tr>\n";
|
||||
echo "<tr><td align=right>Address 3 : </td><td align=left><input type=text name=address3 size=30 maxlength=30 value=\"$address3\"></td></tr>\n";
|
||||
echo "<tr><td align=right>City : </td><td align=left><input type=text name=city size=30 maxlength=30 value=\"$city\"></td></tr>\n";
|
||||
echo "<tr><td align=right>State: </td><td align=left><input type=text name=state size=2 maxlength=2 value=\"$state\"> \n";
|
||||
echo " Postal Code: <input type=text name=postal_code size=10 maxlength=10 value=\"$postal_code\"> </td></tr>\n";
|
||||
|
||||
echo "<tr><td align=right>Province : </td><td align=left><input type=text name=province size=30 maxlength=30 value=\"$province\"></td></tr>\n";
|
||||
echo "<tr><td align=right>Country : </td><td align=left><input type=text name=country_code size=3 maxlength=3 value=\"$country_code\"></td></tr>\n";
|
||||
echo "<tr><td align=right>Alt Phone : </td><td align=left><input type=text name=alt_phone size=10 maxlength=10 value=\"$alt_phone\"></td></tr>\n";
|
||||
echo "<tr><td align=right>Email : </td><td align=left><input type=text name=email size=30 maxlength=50 value=\"$email\"></td></tr>\n";
|
||||
echo "<tr><td align=right>Security : </td><td align=left><input type=text name=security size=30 maxlength=100 value=\"$security\"></td></tr>\n";
|
||||
echo "<tr><td align=right>Comments : </td><td align=left><input type=text name=comments size=30 maxlength=255 value=\"$comments\"></td></tr>\n";
|
||||
echo "<tr bgcolor=#B6D3FC><td align=right>Disposition: </td><td align=left><select size=1 name=status>\n";
|
||||
|
||||
$stmt="SELECT * from vicidial_statuses where selectable='Y' order by status";
|
||||
$rsltx=mysql_query($stmt, $link);
|
||||
$statuses_to_print = mysql_num_rows($rsltx);
|
||||
$statuses_list='';
|
||||
|
||||
$o=0;
|
||||
$DS=0;
|
||||
while ($statuses_to_print > $o)
|
||||
{
|
||||
$rowx=mysql_fetch_row($rsltx);
|
||||
if ($dispo == "$rowx[0]")
|
||||
{$statuses_list .= "<option SELECTED value=\"$rowx[0]\">$rowx[0] - $rowx[1]</option>\n"; $DS++;}
|
||||
else
|
||||
{$statuses_list .= "<option value=\"$rowx[0]\">$rowx[0] - $rowx[1]</option>\n";}
|
||||
$o++;
|
||||
}
|
||||
if ($DS < 1) {$statuses_list .= "<option SELECTED value=\"$dispo\">$dispo</option>\n";}
|
||||
echo "$statuses_list";
|
||||
echo "</select></td></tr>\n";
|
||||
|
||||
|
||||
echo "<tr><td colspan=2><input type=submit name=submit value=\"SUBMIT\"></td></tr>\n";
|
||||
echo "</table></form>\n";
|
||||
echo "<BR><BR><BR>\n";
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "lead lookup FAILED for lead_id $lead_id $NOW_TIME\n<BR><BR>\n";
|
||||
# echo "<a href=\"$PHP_SELF\">Close this window</a>\n<BR><BR>\n";
|
||||
}
|
||||
|
||||
|
||||
|
||||
echo "<br><br>\n";
|
||||
|
||||
echo "<center>\n";
|
||||
|
||||
echo "<B>CALLS TO THIS LEAD:</B>\n";
|
||||
echo "<TABLE width=550 cellspacing=0 cellpadding=1>\n";
|
||||
echo "<tr><td><font size=2>DATE/TIME </td><td align=left><font size=2>LENGTH</td><td align=left><font size=2> STATUS</td><td align=left><font size=2> TSR</td><td align=right><font size=2> CAMPAIGN</td><td align=right><font size=2> LIST</td><td align=right><font size=2> LEAD</td></tr>\n";
|
||||
|
||||
$stmt="select * from vicidial_log where lead_id='$lead_id' order by uniqueid desc limit 50;";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
$logs_to_print = mysql_num_rows($rslt);
|
||||
|
||||
$u=0;
|
||||
while ($logs_to_print > $u) {
|
||||
$row=mysql_fetch_row($rslt);
|
||||
if (eregi("1$|3$|5$|7$|9$", $u))
|
||||
{$bgcolor='bgcolor="#B9CBFD"';}
|
||||
else
|
||||
{$bgcolor='bgcolor="#9BB9FB"';}
|
||||
|
||||
echo "<tr $bgcolor><td><font size=2>$row[4]</td>";
|
||||
echo "<td align=left><font size=2> $row[7]</td>\n";
|
||||
echo "<td align=left><font size=2> $row[8]</td>\n";
|
||||
echo "<td align=left><font size=2> <A HREF=\"user_stats.php?user=$row[11]\" target=\"_blank\">$row[11]</A> </td>\n";
|
||||
echo "<td align=right><font size=2> $row[3] </td>\n";
|
||||
echo "<td align=right><font size=2> $row[2] </td>\n";
|
||||
echo "<td align=right><font size=2> $row[1] </td></tr>\n";
|
||||
|
||||
$u++;
|
||||
}
|
||||
|
||||
|
||||
echo "</TABLE></center>\n";
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
$ENDtime = date("U");
|
||||
|
||||
$RUNtime = ($ENDtime - $STARTtime);
|
||||
|
||||
echo "\n\n\n<br><br><br>\n\n";
|
||||
|
||||
|
||||
echo "<font size=0>\n\n\n<br><br><br>\nscript runtime: $RUNtime seconds</font>";
|
||||
|
||||
|
||||
?>
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
<?
|
||||
|
||||
exit;
|
||||
|
||||
|
||||
|
||||
?>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,185 +0,0 @@
|
||||
<?
|
||||
### admin_search_lead.php
|
||||
###
|
||||
### Copyright (C) 2006 Matt Florell <vicidial@gmail.com> LICENSE: GPLv2
|
||||
###
|
||||
|
||||
require("dbconnect.php");
|
||||
|
||||
$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER'];
|
||||
$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW'];
|
||||
$PHP_SELF=$_SERVER['PHP_SELF'];
|
||||
$vendor_id=$_GET["vendor_id"]; if (!$vendor_id) {$vendor_id=$_POST["vendor_id"];}
|
||||
$phone=$_GET["phone"]; if (!$phone) {$phone=$_POST["phone"];}
|
||||
$lead_id=$_GET["lead_id"]; if (!$lead_id) {$lead_id=$_POST["lead_id"];}
|
||||
$submit=$_GET["submit"]; if (!$submit) {$submit=$_POST["submit"];}
|
||||
$SUBMIT=$_GET["SUBMIT"]; if (!$SUBMIT) {$SUBMIT=$_POST["SUBMIT"];}
|
||||
|
||||
### 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
|
||||
|
||||
|
||||
$STARTtime = date("U");
|
||||
$TODAY = date("Y-m-d");
|
||||
$NOW_TIME = date("Y-m-d H:i:s");
|
||||
|
||||
|
||||
$stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 7;";
|
||||
if ($DB) {echo "|$stmt|\n";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$auth=$row[0];
|
||||
|
||||
if ($WeBRooTWritablE > 0)
|
||||
{$fp = fopen ("./project_auth_entries.txt", "a");}
|
||||
|
||||
$date = date("r");
|
||||
$ip = getenv("REMOTE_ADDR");
|
||||
$browser = getenv("HTTP_USER_AGENT");
|
||||
|
||||
if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or (!$auth))
|
||||
{
|
||||
Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\"");
|
||||
Header("HTTP/1.0 401 Unauthorized");
|
||||
echo "Invalid Username/Password: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n";
|
||||
exit;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
if($auth>0)
|
||||
{
|
||||
$office_no=strtoupper($PHP_AUTH_USER);
|
||||
$password=strtoupper($PHP_AUTH_PW);
|
||||
$stmt="SELECT full_name,modify_leads from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW'";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$LOGfullname =$row[0];
|
||||
$LOGmodify_leads =$row[1];
|
||||
|
||||
if ($WeBRooTWritablE > 0)
|
||||
{
|
||||
fwrite ($fp, "VICIDIAL|GOOD|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|$LOGfullname|\n");
|
||||
fclose($fp);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if ($WeBRooTWritablE > 0)
|
||||
{
|
||||
fwrite ($fp, "VICIDIAL|FAIL|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|\n");
|
||||
fclose($fp);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
<html>
|
||||
<head>
|
||||
<title>VICIDIAL ADMIN: Lead Search</title>
|
||||
</head>
|
||||
<title>Lead Lookup</title>
|
||||
</head>
|
||||
<body bgcolor=white>
|
||||
|
||||
<?
|
||||
|
||||
if ( (!$vendor_id) and (!$phone) and (!$lead_id) )
|
||||
{
|
||||
echo date("l F j, Y G:i:s A");
|
||||
echo "\n<br><br><center>\n";
|
||||
echo "<form method=post name=search action=\"$PHP_SELF\">\n";
|
||||
echo "<b>Please enter a:<br> Vendor ID(vendor lead code): <input type=text name=vendor_id size=10 maxlength=10> or \n";
|
||||
echo "<br><b>a Home Phone Number: <input type=text name=phone size=10 maxlength=10> or\n";
|
||||
echo "<br><b>a lead ID: <input type=text name=lead_id size=10 maxlength=10> <br><br>\n";
|
||||
echo "<input type=submit name=submit value=SUBMIT></b>\n";
|
||||
echo "</form>\n</center>\n";
|
||||
echo "</body></html>\n";
|
||||
exit;
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
|
||||
if ($vendor_id)
|
||||
{
|
||||
$stmt="SELECT * from vicidial_list where vendor_lead_code='$vendor_id'";
|
||||
}
|
||||
else
|
||||
{
|
||||
if ($phone)
|
||||
{
|
||||
$stmt="SELECT * from vicidial_list where phone_number='$phone'";
|
||||
}
|
||||
else
|
||||
{
|
||||
if ($lead_id)
|
||||
{
|
||||
$stmt="SELECT * from vicidial_list where lead_id='$lead_id'";
|
||||
}
|
||||
else
|
||||
{
|
||||
print "ERROR: you must search for something! Go back and search for something";
|
||||
exit;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (eregi('10.10.10.2',$ip))
|
||||
{
|
||||
echo "\n\n$stmt\n\n";
|
||||
}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
$row=mysql_fetch_row($rslt);
|
||||
if ( (strlen($row[0]) < 3) && (strlen($row[1]) < 3) )
|
||||
{
|
||||
echo date("l F j, Y G:i:s A");
|
||||
echo "\n<br><br><center>\n";
|
||||
echo "<b>The search variables you entered are not active in the system</b><br><br>\n";
|
||||
echo "<b>Please go back and double check the information you entered and submit again</b>\n";
|
||||
echo "</center>\n";
|
||||
echo "</body></html>\n";
|
||||
exit;
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "\n<PRE>\n\n";
|
||||
echo "lead ID: $row[0]\n";
|
||||
echo "status: $row[3]\n";
|
||||
echo "vendor_id: $row[5]\n";
|
||||
echo "last rep called: $row[4]\n";
|
||||
echo "list_id: $row[7]\n";
|
||||
echo "phone: $row[11]\n";
|
||||
echo "Name: $row[13] $row[15]\n";
|
||||
echo "City: $row[19]\n";
|
||||
echo "Security: $row[28]\n";
|
||||
echo "Comments: $row[29]\n\n";
|
||||
echo "\n";
|
||||
echo "</PRE>\n";
|
||||
|
||||
# https://www.vicimarketing.com/internal/back_end_sys/uk_cust_serv/index.php?person_id=$row[7]&people_packages_id=&secure_lvl=2&display=2&username=$username&passwd=$passwd
|
||||
|
||||
echo "<a href=\"admin_modify_lead.php?lead_id=$row[0]\">Click here to see the Lead Details</a>\n";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
$ENDtime = date("U");
|
||||
|
||||
$RUNtime = ($ENDtime - $STARTtime);
|
||||
|
||||
echo "\n\n\n<br><br><br>\n<a href=\"$PHP_SELF\">NEW SEARCH</a>";
|
||||
|
||||
|
||||
echo "\n\n\n<br><br><br>\nscript runtime: $RUNtime seconds";
|
||||
|
||||
|
||||
?>
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,470 +0,0 @@
|
||||
<?
|
||||
|
||||
require("dbconnect.php");
|
||||
|
||||
##### depricated
|
||||
#require_once("htglobalize.php");
|
||||
|
||||
$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER'];
|
||||
$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW'];
|
||||
$PHP_SELF=$_SERVER['PHP_SELF'];
|
||||
$address1=$_GET["address1"]; if (!$address1) {$address1=$_POST["address1"];}
|
||||
$address2=$_GET["address2"]; if (!$address2) {$address2=$_POST["address2"];}
|
||||
$address3=$_GET["address3"]; if (!$address3) {$address3=$_POST["address3"];}
|
||||
$alt_phone=$_GET["alt_phone"]; if (!$alt_phone) {$alt_phone=$_POST["alt_phone"];}
|
||||
$call_began=$_GET["call_began"]; if (!$call_began) {$call_began=$_POST["call_began"];}
|
||||
$campaign_id=$_GET["campaign_id"]; if (!$campaign_id) {$campaign_id=$_POST["campaign_id"];}
|
||||
$channel=$_GET["channel"]; if (!$channel) {$channel=$_POST["channel"];}
|
||||
$channel_group=$_GET["channel_group"]; if (!$channel_group) {$channel_group=$_POST["channel_group"];}
|
||||
$city=$_GET["city"]; if (!$city) {$city=$_POST["city"];}
|
||||
$comments=$_GET["comments"]; if (!$comments) {$comments=$_POST["comments"];}
|
||||
$country_code=$_GET["country_code"]; if (!$country_code) {$country_code=$_POST["country_code"];}
|
||||
$customer_zap_channel=$_GET["customer_zap_channel"]; if (!$customer_zap_channel) {$customer_zap_channel=$_POST["customer_zap_channel"];}
|
||||
$DB=$_GET["DB"]; if (!$DB) {$DB=$_POST["DB"];}
|
||||
$dispo=$_GET["dispo"]; if (!$dispo) {$dispo=$_POST["dispo"];}
|
||||
$email=$_GET["email"]; if (!$email) {$email=$_POST["email"];}
|
||||
$end_call=$_GET["end_call"]; if (!$end_call) {$end_call=$_POST["end_call"];}
|
||||
$extension=$_GET["extension"]; if (!$extension) {$extension=$_POST["extension"];}
|
||||
$first_name=$_GET["first_name"]; if (!$first_name) {$first_name=$_POST["first_name"];}
|
||||
$group=$_GET["group"]; if (!$group) {$group=$_POST["group"];}
|
||||
$last_name=$_GET["last_name"]; if (!$last_name) {$last_name=$_POST["last_name"];}
|
||||
$lead_id=$_GET["lead_id"]; if (!$lead_id) {$lead_id=$_POST["lead_id"];}
|
||||
$list_id=$_GET["list_id"]; if (!$list_id) {$list_id=$_POST["list_id"];}
|
||||
$parked_time=$_GET["parked_time"]; if (!$parked_time) {$parked_time=$_POST["parked_time"];}
|
||||
$pass=$_GET["pass"]; if (!$pass) {$pass=$_POST["pass"];}
|
||||
$phone_code=$_GET["phone_code"]; if (!$phone_code) {$phone_code=$_POST["phone_code"];}
|
||||
$phone_number=$_GET["phone_number"]; if (!$phone_number) {$phone_number=$_POST["phone_number"];}
|
||||
$phone=$_GET["phone"]; if (!$phone) {$phone=$_POST["phone"];}
|
||||
$postal_code=$_GET["postal_code"]; if (!$postal_code) {$postal_code=$_POST["postal_code"];}
|
||||
$province=$_GET["province"]; if (!$province) {$province=$_POST["province"];}
|
||||
$security=$_GET["security"]; if (!$security) {$security=$_POST["security"];}
|
||||
$server_ip=$_GET["server_ip"]; if (!$server_ip) {$server_ip=$_POST["server_ip"];}
|
||||
$server_ip=$_GET["server_ip"]; if (!$server_ip) {$server_ip=$_POST["server_ip"];}
|
||||
$session_id=$_GET["session_id"]; if (!$session_id) {$session_id=$_POST["session_id"];}
|
||||
$state=$_GET["state"]; if (!$state) {$state=$_POST["state"];}
|
||||
$status=$_GET["status"]; if (!$status) {$status=$_POST["status"];}
|
||||
$tsr=$_GET["tsr"]; if (!$tsr) {$tsr=$_POST["tsr"];}
|
||||
$user=$_GET["user"]; if (!$user) {$user=$_POST["user"];}
|
||||
$vendor_id=$_GET["vendor_id"]; if (!$vendor_id) {$vendor_id=$_POST["vendor_id"];}
|
||||
$submit=$_GET["submit"]; if (!$submit) {$submit=$_POST["submit"];}
|
||||
$SUBMIT=$_GET["SUBMIT"]; if (!$SUBMIT) {$SUBMIT=$_POST["SUBMIT"];}
|
||||
|
||||
### AST GUI database administration
|
||||
### closer-fronter_popup.php
|
||||
|
||||
# this is the closer popup of a specific call that starts recording the call and allows you to go and fetch info on that caller in the local CRM system.
|
||||
|
||||
#$DB = '1'; # DEBUG override
|
||||
$US = '_';
|
||||
$STARTtime = date("U");
|
||||
$TODAY = date("Y-m-d");
|
||||
$NOW_TIME = date("Y-m-d H:i:s");
|
||||
$REC_TIME = date("Ymd-His");
|
||||
$FILE_datetime = $STARTtime;
|
||||
$parked_time = $STARTtime;
|
||||
|
||||
# $ext_context = 'default'; defined in dbconnect file
|
||||
|
||||
$stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;";
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$auth=$row[0];
|
||||
|
||||
$fp = fopen ("./project_auth_entries.txt", "a");
|
||||
$date = date("r");
|
||||
$ip = getenv("REMOTE_ADDR");
|
||||
$browser = getenv("HTTP_USER_AGENT");
|
||||
|
||||
if( (strlen($user)<2) or (strlen($pass)<2) or (!$auth))
|
||||
{
|
||||
Header("WWW-Authenticate: Basic realm=\"VICIDIAL-CLOSER\"");
|
||||
Header("HTTP/1.0 401 Unauthorized");
|
||||
echo "Invalid Username/Password: |$user|$pass|\n";
|
||||
exit;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
if($auth>0)
|
||||
{
|
||||
$office_no=strtoupper($user);
|
||||
$password=strtoupper($pass);
|
||||
$stmt="SELECT full_name from vicidial_users where user='$user' and pass='$pass'";
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$LOGfullname=$row[0];
|
||||
$fullname = $row[0];
|
||||
fwrite ($fp, "VD_CLOSER|GOOD|$date|$user|$pass|$ip|$browser|$LOGfullname|\n");
|
||||
fclose($fp);
|
||||
|
||||
if ( (strlen($customer_zap_channel)>2) and (eregi('zap',$customer_zap_channel)) )
|
||||
{
|
||||
echo "\n<!-- zap channel: $customer_zap_channel -->\n";
|
||||
echo "\n<!-- session_id: $session_id -->\n";
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "Bad channel: $customer_zap_channel\n";
|
||||
echo "Make sure the Zap channel is live and try again\n";
|
||||
exit;
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
fwrite ($fp, "VD_CLOSER|FAIL|$date|$user|$pass|$ip|$browser|\n");
|
||||
fclose($fp);
|
||||
}
|
||||
}
|
||||
|
||||
echo "<html>\n";
|
||||
echo "<head>\n";
|
||||
echo "<title>VICIDIAL FRONTER-CLOSER: Popup</title>\n";
|
||||
|
||||
if (eregi('CL_UNIV',$channel_group))
|
||||
{
|
||||
?>
|
||||
<script language="Javascript1.2">
|
||||
var btn_name="search";
|
||||
if (document.layers) {
|
||||
document.captureEvents(Event.KEYPRESS);
|
||||
document.onkeypress = function (evt) {
|
||||
if (evt.target.constructor == Input) {
|
||||
if (evt.target.name == 'lead_id' || evt.target.name == 'phone' || evt.target.name == 'confirmation_id') {
|
||||
return ((evt.which >= '0'.charCodeAt() && evt.which <= '9'.charCodeAt()));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
function CheckForm() {
|
||||
if (btn_name=="update") {
|
||||
if (document.forms[0].phone.value.length!=10) {
|
||||
alert("The phone number you entered does not have 10 digits.\n\nIt has "+document.forms[0].phone.value.length+" - please correct it and try again.");
|
||||
return false;
|
||||
} else if (document.forms[0].confirmation_id.value.length<=5) {
|
||||
alert("The confirmation ID is either missing or not enough characters in length.\n\nPlease correct it and try again.");
|
||||
return false;
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<?
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "<script language=\"Javascript1.2\">\n";
|
||||
echo "function WaitFirefix() {setTimeout(document.forms[0].search_phone.focus(), 1000)}\n";
|
||||
echo "</script>\n";
|
||||
}
|
||||
?>
|
||||
</head>
|
||||
<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0 onLoad="document.forms[0].search_phone.focus(); setTimeout('document.forms[0].search_phone.focus()', 1000); self.focus()">
|
||||
<CENTER><FONT FACE="Courier" COLOR=BLACK SIZE=3>
|
||||
|
||||
<?
|
||||
|
||||
$stmt="SELECT count(*) from live_channels where server_ip='$server_ip' and channel='$customer_zap_channel'";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$parked_count = $row[0];
|
||||
|
||||
if ($parked_count > 0)
|
||||
{
|
||||
|
||||
# $stmt="DELETE from parked_channels where server_ip='$server_ip' and parked_time='$parked_time' and channel='$channel' LIMIT 1";
|
||||
# if ($DB) {echo "|$stmt|\n";}
|
||||
# $rslt=mysql_query($stmt, $link);
|
||||
|
||||
$DTqueryCID = "RZ$FILE_datetime$user";
|
||||
|
||||
### insert a NEW record to the vicidial_manager table to be processed
|
||||
|
||||
$channel = $customer_zap_channel;
|
||||
$channel = eregi_replace('Zap/', "", $channel);
|
||||
$SIPexten = eregi_replace('SIP/', "", $SIPexten);
|
||||
$filename = "$REC_TIME$US$SIPexten";
|
||||
|
||||
# $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Monitor','$DTqueryCID','Channel: Zap/$channel','File: $filename','Callerid: $DTqueryCID','','','','','','','')";
|
||||
# if ($DB) {echo "|$stmt|\n";}
|
||||
# $rslt=mysql_query($stmt, $link);
|
||||
|
||||
# Local/78600098@demo-6617,2
|
||||
|
||||
$stmt = "INSERT INTO vicidial_manager values('','','$SQLdate','NEW','N','$server_ip','','Originate','$DTqueryCID','Channel: $local_DEF$conf_silent_prefix$session_id$local_AMP$ext_context','Context: $ext_context','Exten: $recording_exten','Priority: 1','Callerid: $filename','','','','','')";
|
||||
if ($DB) {echo "|$stmt|\n";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
|
||||
$stmt = "INSERT INTO recording_log (channel,server_ip,extension,start_time,start_epoch,filename) values('Zap/$channel','$server_ip','SIP/$SIPexten','$NOW_TIME','$STARTtime','$filename')";
|
||||
if ($DB) {echo "|$stmt|\n";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
|
||||
$stmt="SELECT recording_id FROM recording_log where filename='$filename'";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$recording_id = $row[0];
|
||||
|
||||
echo "Recording command sent for channel $channel - $filename - $recording_id $NOW_TIME\n<BR><BR>\n";
|
||||
|
||||
$stmt="SELECT full_name from vicidial_users where user='$user'";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$full_name = $row[0];
|
||||
|
||||
echo "Call Referred by: $user - $full_name\n<BR><BR>\n";
|
||||
|
||||
$url = "http://10.10.99.2/vicidial/closer_dispo.php?lead_id=$lead_id&channel=$channel&server_ip=$server_ip&extension=$SIPexten&call_began=$STARTtime&parked_time=$parked_time&DB=$DB";
|
||||
|
||||
echo "<a href=\"$url\">View Customer Info and Disposition Call</a>\n<BR><BR>\n";
|
||||
|
||||
|
||||
|
||||
# $stmt="UPDATE park_log set grab_time='$NOW_TIME',status='TALKING',extension='$extension',user='$user' where parked_time='$parked_time' and server_ip='$server_ip' and channel='$channel'";
|
||||
# if ($DB) {echo "|$stmt|\n";}
|
||||
# $fp = fopen ("./closer_SQL_updates.txt", "a");
|
||||
# fwrite ($fp, "$date|$user|$stmt|\n");
|
||||
# fclose($fp);
|
||||
# $rslt=mysql_query($stmt, $link);
|
||||
|
||||
###########################################################################################
|
||||
####### HERE IS WHERE YOU DEFINE DIFFERENT CONTENTS DEPENDING UPON THE CHANNEL_GROUP PREFIX
|
||||
###########################################################################################
|
||||
if (eregi('CL_TEST',$channel_group))
|
||||
{
|
||||
echo "GALLERIA TEST CLOSER GROUP: $channel_group\n";
|
||||
|
||||
$stmt="SELECT user,phone_number from vicidial_list where lead_id='$parked_by';";
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$fronter=$row[0];
|
||||
$search_phone=$row[1];
|
||||
|
||||
|
||||
?>
|
||||
<form action="http://10.10.10.196/vicidial/closer_lookup3.php" method="post">
|
||||
<input type=hidden name="fronter" value="<?=$fronter ?>">
|
||||
<input type=hidden name="closer" value="<?=$user ?>">
|
||||
<input type=hidden name="group" value="<?=$channel_group ?>">
|
||||
<input type=hidden name="recording_id" value="<?=$recording_id ?>">
|
||||
<table border=0 cellspacing=5 cellpadding=3 align=center width=90%>
|
||||
<tr>
|
||||
<th colspan=2 bgcolor='#666666'><font class='standard_bold' color='white'>COF MW Customer Search</font></th>
|
||||
</tr>
|
||||
<tr bgcolor='#99FF99'>
|
||||
<td align=right width="50%" nowrap><font class='standard_bold'>Phone number</font></td>
|
||||
<td align=left width="50%" nowrap><input type=text size=10 maxlength=10 name="search_phone" value="<?=$search_phone ?>"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th colspan=2 bgcolor='#666666'><input type=submit name="submit_COF" value="SEARCH"></th>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
<BR><BR>
|
||||
<?
|
||||
}
|
||||
|
||||
if ( (eregi('CL_MWCOF',$channel_group)) or (eregi('MWCOF',$group)) or (eregi('TESTCAMP',$group)))
|
||||
{
|
||||
echo "BUYERS EDGE INTERNAL CLOSER GROUP: $channel_group\n";
|
||||
|
||||
$stmt="SELECT user,phone_number from vicidial_list where lead_id='$parked_by';";
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$fronter=$row[0];
|
||||
$search_phone=$row[1];
|
||||
|
||||
|
||||
?>
|
||||
<form action="http://10.10.99.2/vicidial/closer_lookup4.php" method="post">
|
||||
<input type=hidden name="fronter" value="<?=$fronter ?>">
|
||||
<input type=hidden name="closer" value="<?=$user ?>">
|
||||
<input type=hidden name="group" value="<?=$channel_group ?>">
|
||||
<input type=hidden name="recording_id" value="<?=$recording_id ?>">
|
||||
<table border=0 cellspacing=5 cellpadding=3 align=center width=90%>
|
||||
<tr>
|
||||
<th colspan=2 bgcolor='#666666'><font class='standard_bold' color='white'>COF MW Customer Search</font></th>
|
||||
</tr>
|
||||
<tr bgcolor='#99FF99'>
|
||||
<td align=right width="50%" nowrap><font class='standard_bold'>Phone number</font></td>
|
||||
<td align=left width="50%" nowrap><input type=text size=10 maxlength=10 name="search_phone" value="<?=$search_phone ?>"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th colspan=2 bgcolor='#666666'><input type=submit name="submit_COF" value="SEARCH"></th>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
<BR><BR>
|
||||
<?
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (eregi('CL_GAL',$channel_group))
|
||||
{
|
||||
echo "GALLERIA CLOSER GROUP: $channel_group\n";
|
||||
$group_color='#CCCCCC';
|
||||
|
||||
if (eregi('CL_GALLERIA',$channel_group))
|
||||
{
|
||||
echo "<br><font color=green size=3><b>-- INTERNAL CALL GALLERIA FRONT --</b></font><br>\n";
|
||||
$group_color='#99FF99';
|
||||
}
|
||||
if (eregi('CL_GALLER2',$channel_group))
|
||||
{
|
||||
echo "<br><font color=red size=3><b>-- TouchAsia CALL Simple Escapes FRONT --</b></font><br>\n";
|
||||
$group_color='#FF9999';
|
||||
}
|
||||
if (eregi('CL_GALLER3',$channel_group))
|
||||
{
|
||||
echo "<br><font color=red size=3><b>-- DebitSupplies CALL Simple Escapes FRONT --</b></font><br>\n";
|
||||
$group_color='#FF9999';
|
||||
}
|
||||
if (eregi('CL_GALLER4',$channel_group))
|
||||
{
|
||||
echo "<br><font color=red size=3><b>-- Vishnu CALL Simple Escapes FRONT --</b></font><br>\n";
|
||||
$group_color='#FF9999';
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
<form action="http://10.10.99.2/vicidial/closer_lookup4.php" method="post">
|
||||
<input type=hidden name="fronter" value="<?=$parked_by ?>">
|
||||
<input type=hidden name="closer" value="<?=$user ?>">
|
||||
<input type=hidden name="group" value="<?=$channel_group ?>">
|
||||
<input type=hidden name="recording_id" value="<?=$recording_id ?>">
|
||||
<table border=0 cellspacing=5 cellpadding=3 align=center width=90%>
|
||||
<tr>
|
||||
<th colspan=2 bgcolor='#666666'><font class='standard_bold' color='white'>COF MW Customer Search</font></th>
|
||||
</tr>
|
||||
<tr bgcolor="<?=$group_color ?>">
|
||||
<td align=right width="50%" nowrap><font class='standard_bold'>Phone number</font></td>
|
||||
<td align=left width="50%" nowrap><input type=text size=10 maxlength=10 name="search_phone" value="<?=$phone ?>"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th colspan=2 bgcolor='#666666'><input type=submit name="submit_COF" value="SEARCH"></th>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
<BR><BR>
|
||||
|
||||
<!----
|
||||
<form action="http://10.10.10.196/vicidial/closer_lookup3.php" method="post">
|
||||
<input type=hidden name="fronter" value="<?=$parked_by ?>">
|
||||
<input type=hidden name="closer" value="<?=$user ?>">
|
||||
<table border=0 cellspacing=5 cellpadding=3 align=center width=90%>
|
||||
<tr>
|
||||
<th colspan=2 bgcolor='#666666'><font class='standard_bold' color='white'>NEW COF BlueGreen Customer Search</font></th>
|
||||
</tr>
|
||||
<tr bgcolor='#CCCCCC'>
|
||||
<td align=right width="50%" nowrap><font class='standard_bold'>Phone number</font></td>
|
||||
<td align=left width="50%" nowrap><input type=text size=10 maxlength=10 name="search_phone" value="<?=$phone ?>"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th colspan=2 bgcolor='#666666'><input type=submit name="submit_COF" value="SEARCH"></th>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
<BR><BR>
|
||||
---->
|
||||
|
||||
<?
|
||||
}
|
||||
|
||||
|
||||
if (eregi('CL_UNIV',$channel_group))
|
||||
{
|
||||
echo "UNIVERSAL CLOSER GROUP: $channel_group\n";
|
||||
|
||||
|
||||
?>
|
||||
|
||||
<form action="uk_mail_lookup.php" method="post" onSubmit="return CheckForm()">
|
||||
<input type=hidden name="fronter" value="<?=$parked_by ?>">
|
||||
<input type=hidden name="closer" value="<?=$user ?>">
|
||||
<input type=hidden name="group" value="<?=$channel_group ?>">
|
||||
<input type=hidden name="recording_id" value="<?=$recording_id ?>">
|
||||
<table border=0 width=80% cellpadding=5 cellspacing=0 align=center>
|
||||
<tr>
|
||||
<th colspan=2 bgcolor='#CCCCCC'><font class='standard_bold'>New Search</font></th>
|
||||
</tr>
|
||||
|
||||
<tr bgcolor='#CCCCCC'>
|
||||
<td align=right width="50%" nowrap><font class='standard_bold'>Reservation Number:</font></td>
|
||||
<td align=left width="50%" nowrap><input type=text size=10 maxlength=10
|
||||
name="reservation_no" value="" ONKEYPRESS="var keyCode = event.which ? event.which : event.keyCode; if (keyCode!=8 && keyCode!=9 && keyCode!=37 && keyCode!=39) return ((keyCode >= '0'.charCodeAt() && keyCode <= '9'.charCodeAt()))"></td>
|
||||
</tr>
|
||||
<tr bgcolor='#CCCCCC'><td align=right width='50%' nowrap><font class='standard_bold'>Confirmation #:</font></td>
|
||||
<td align=left width='50%' nowrap><input type=text name='confirmation_no' size=10 maxlength=20 value=''></td></tr>
|
||||
<tr bgcolor='#CCCCCC'>
|
||||
<td align=right width="50%" nowrap><font class='standard_bold'>Phone #:</font></td>
|
||||
<td align=left width="50%" nowrap><input type=text size=10 maxlength=10
|
||||
name="phone" value="" ONKEYPRESS="var keyCode = event.which ? event.which : event.keyCode; if (keyCode!=8 && keyCode!=9 && keyCode!=37 && keyCode!=39) return ((keyCode >= '0'.charCodeAt() && keyCode <= '9'.charCodeAt()))"></td>
|
||||
|
||||
</tr><tr>
|
||||
<th colspan=2 bgcolor='#CCCCCC'><input type=submit name="submit_COF" value="SEARCH" onClick="javascript:btn_name='search'"><br><br></th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th colspan=2 bgcolor='#666666'><font class='standard_bold'><a href='closer_popup.php'>Back</a></font></th>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</form>
|
||||
|
||||
|
||||
<?
|
||||
|
||||
}
|
||||
|
||||
###########################################################################################
|
||||
####### END CUSTOM CONTENTS
|
||||
###########################################################################################
|
||||
|
||||
|
||||
# echo "<a href=\"#\">Close this window</a>\n<BR><BR>\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "Record command FAILED for channel $channel $NOW_TIME\n<BR><BR>\n";
|
||||
echo "Please go back and try again\n<BR><BR>\n";
|
||||
# echo "<form><input type=button value=\"Close This Window\" onClick=\"javascript:window.close();\"></form>\n";
|
||||
}
|
||||
|
||||
|
||||
|
||||
$ENDtime = date("U");
|
||||
|
||||
$RUNtime = ($ENDtime - $STARTtime);
|
||||
|
||||
echo "\n\n\n<br><br><br>\n\n";
|
||||
|
||||
|
||||
echo "<font size=0>\n\n\n<br><br><br>\nscript runtime: $RUNtime seconds</font>";
|
||||
|
||||
|
||||
?>
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
<?
|
||||
|
||||
exit;
|
||||
|
||||
|
||||
|
||||
?>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,385 +0,0 @@
|
||||
<?
|
||||
|
||||
require("dbconnect.php");
|
||||
|
||||
##### depricated
|
||||
#require_once("htglobalize.php");
|
||||
|
||||
$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER'];
|
||||
$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW'];
|
||||
$PHP_SELF=$_SERVER['PHP_SELF'];
|
||||
$address1=$_GET["address1"]; if (!$address1) {$address1=$_POST["address1"];}
|
||||
$address2=$_GET["address2"]; if (!$address2) {$address2=$_POST["address2"];}
|
||||
$address3=$_GET["address3"]; if (!$address3) {$address3=$_POST["address3"];}
|
||||
$alt_phone=$_GET["alt_phone"]; if (!$alt_phone) {$alt_phone=$_POST["alt_phone"];}
|
||||
$call_began=$_GET["call_began"]; if (!$call_began) {$call_began=$_POST["call_began"];}
|
||||
$campaign_id=$_GET["campaign_id"]; if (!$campaign_id) {$campaign_id=$_POST["campaign_id"];}
|
||||
$channel=$_GET["channel"]; if (!$channel) {$channel=$_POST["channel"];}
|
||||
$channel_group=$_GET["channel_group"]; if (!$channel_group) {$channel_group=$_POST["channel_group"];}
|
||||
$city=$_GET["city"]; if (!$city) {$city=$_POST["city"];}
|
||||
$comments=$_GET["comments"]; if (!$comments) {$comments=$_POST["comments"];}
|
||||
$country_code=$_GET["country_code"]; if (!$country_code) {$country_code=$_POST["country_code"];}
|
||||
$customer_zap_channel=$_GET["customer_zap_channel"]; if (!$customer_zap_channel) {$customer_zap_channel=$_POST["customer_zap_channel"];}
|
||||
$DB=$_GET["DB"]; if (!$DB) {$DB=$_POST["DB"];}
|
||||
$dispo=$_GET["dispo"]; if (!$dispo) {$dispo=$_POST["dispo"];}
|
||||
$email=$_GET["email"]; if (!$email) {$email=$_POST["email"];}
|
||||
$end_call=$_GET["end_call"]; if (!$end_call) {$end_call=$_POST["end_call"];}
|
||||
$extension=$_GET["extension"]; if (!$extension) {$extension=$_POST["extension"];}
|
||||
$first_name=$_GET["first_name"]; if (!$first_name) {$first_name=$_POST["first_name"];}
|
||||
$group=$_GET["group"]; if (!$group) {$group=$_POST["group"];}
|
||||
$last_name=$_GET["last_name"]; if (!$last_name) {$last_name=$_POST["last_name"];}
|
||||
$lead_id=$_GET["lead_id"]; if (!$lead_id) {$lead_id=$_POST["lead_id"];}
|
||||
$list_id=$_GET["list_id"]; if (!$list_id) {$list_id=$_POST["list_id"];}
|
||||
$parked_time=$_GET["parked_time"]; if (!$parked_time) {$parked_time=$_POST["parked_time"];}
|
||||
$pass=$_GET["pass"]; if (!$pass) {$pass=$_POST["pass"];}
|
||||
$phone_code=$_GET["phone_code"]; if (!$phone_code) {$phone_code=$_POST["phone_code"];}
|
||||
$phone_number=$_GET["phone_number"]; if (!$phone_number) {$phone_number=$_POST["phone_number"];}
|
||||
$phone=$_GET["phone"]; if (!$phone) {$phone=$_POST["phone"];}
|
||||
$postal_code=$_GET["postal_code"]; if (!$postal_code) {$postal_code=$_POST["postal_code"];}
|
||||
$province=$_GET["province"]; if (!$province) {$province=$_POST["province"];}
|
||||
$security=$_GET["security"]; if (!$security) {$security=$_POST["security"];}
|
||||
$server_ip=$_GET["server_ip"]; if (!$server_ip) {$server_ip=$_POST["server_ip"];}
|
||||
$server_ip=$_GET["server_ip"]; if (!$server_ip) {$server_ip=$_POST["server_ip"];}
|
||||
$session_id=$_GET["session_id"]; if (!$session_id) {$session_id=$_POST["session_id"];}
|
||||
$state=$_GET["state"]; if (!$state) {$state=$_POST["state"];}
|
||||
$status=$_GET["status"]; if (!$status) {$status=$_POST["status"];}
|
||||
$tsr=$_GET["tsr"]; if (!$tsr) {$tsr=$_POST["tsr"];}
|
||||
$user=$_GET["user"]; if (!$user) {$user=$_POST["user"];}
|
||||
$vendor_id=$_GET["vendor_id"]; if (!$vendor_id) {$vendor_id=$_POST["vendor_id"];}
|
||||
$submit=$_GET["submit"]; if (!$submit) {$submit=$_POST["submit"];}
|
||||
$SUBMIT=$_GET["SUBMIT"]; if (!$SUBMIT) {$SUBMIT=$_POST["SUBMIT"];}
|
||||
|
||||
### AST GUI database administration
|
||||
### closer-fronter_popup2.php
|
||||
|
||||
# this is the closer popup of a specific call that starts recording the call and allows you to go and fetch info on that caller in the local CRM system.
|
||||
|
||||
#$DB = '1'; # DEBUG override
|
||||
$US = '_';
|
||||
$STARTtime = date("U");
|
||||
$TODAY = date("Y-m-d");
|
||||
$NOW_TIME = date("Y-m-d H:i:s");
|
||||
$REC_TIME = date("Ymd-His");
|
||||
$FILE_datetime = $STARTtime;
|
||||
$parked_time = $STARTtime;
|
||||
|
||||
# $ext_context = 'default'; defined in dbconnect file
|
||||
if (!$begin_date) {$begin_date = $TODAY;}
|
||||
if (!$end_date) {$end_date = $TODAY;}
|
||||
|
||||
$stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;";
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$auth=$row[0];
|
||||
|
||||
if (!$auth)
|
||||
{
|
||||
if ( (strlen($PHP_AUTH_USER)>1) and ( (eregi("tsr",$PHP_AUTH_PW)) or (eregi("sales",$PHP_AUTH_PW)) ) )
|
||||
{
|
||||
$auth=1;
|
||||
$user = $PHP_AUTH_USER;
|
||||
$pass = $PHP_AUTH_PW;
|
||||
}
|
||||
}
|
||||
|
||||
$fp = fopen ("./project_auth_entries.txt", "a");
|
||||
$date = date("r");
|
||||
$ip = getenv("REMOTE_ADDR");
|
||||
$browser = getenv("HTTP_USER_AGENT");
|
||||
|
||||
if( (strlen($user)<2) or (strlen($pass)<2) or (!$auth))
|
||||
{
|
||||
Header("WWW-Authenticate: Basic realm=\"VICIDIAL-CLOSER - $user - $PHP_AUTH_USER\"");
|
||||
Header("HTTP/1.0 401 Unauthorized");
|
||||
echo "Invalid Username/Password: |$user|$pass|\n";
|
||||
exit;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
if($auth>0)
|
||||
{
|
||||
$office_no=strtoupper($user);
|
||||
$password=strtoupper($pass);
|
||||
$stmt="SELECT full_name from vicidial_users where user='$user' and pass='$pass'";
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$LOGfullname=$row[0];
|
||||
$fullname = $row[0];
|
||||
fwrite ($fp, "VD_CLOSER|GOOD|$date|$user|$pass|$ip|$browser|$LOGfullname|\n");
|
||||
fclose($fp);
|
||||
|
||||
if ( (strlen($customer_zap_channel)>2) and ( (eregi('zap',$customer_zap_channel)) or (eregi('iax',$customer_zap_channel)) ) )
|
||||
{
|
||||
echo "\n<!-- zap channel: $customer_zap_channel -->\n";
|
||||
echo "<!-- session_id: $session_id -->\n";
|
||||
echo "<!-- fronter: $fronter -->\n";
|
||||
echo "<!-- user: $user -->\n";
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "Bad channel: $customer_zap_channel\n";
|
||||
echo "Make sure the Zap channel is live and try again\n";
|
||||
exit;
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
fwrite ($fp, "VD_CLOSER|FAIL|$date|$user|$pass|$ip|$browser|\n");
|
||||
fclose($fp);
|
||||
}
|
||||
}
|
||||
|
||||
echo "<html>\n";
|
||||
echo "<head>\n";
|
||||
echo "<title>VICIDIAL FRONTER-CLOSER: Popup</title>\n";
|
||||
|
||||
if (eregi('CL_UNIV',$channel_group))
|
||||
{
|
||||
?>
|
||||
<script language="Javascript1.2">
|
||||
var btn_name="search";
|
||||
if (document.layers) {
|
||||
document.captureEvents(Event.KEYPRESS);
|
||||
document.onkeypress = function (evt) {
|
||||
if (evt.target.constructor == Input) {
|
||||
if (evt.target.name == 'lead_id' || evt.target.name == 'phone' || evt.target.name == 'confirmation_id') {
|
||||
return ((evt.which >= '0'.charCodeAt() && evt.which <= '9'.charCodeAt()));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
function CheckForm() {
|
||||
if (btn_name=="update") {
|
||||
if (document.forms[0].phone.value.length!=10) {
|
||||
alert("The phone number you entered does not have 10 digits.\n\nIt has "+document.forms[0].phone.value.length+" - please correct it and try again.");
|
||||
return false;
|
||||
} else if (document.forms[0].confirmation_id.value.length<=5) {
|
||||
alert("The confirmation ID is either missing or not enough characters in length.\n\nPlease correct it and try again.");
|
||||
return false;
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<?
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "<script language=\"Javascript1.2\">\n";
|
||||
echo "function WaitFirefix() {setTimeout(document.forms[0].search_phone.focus(), 1000)}\n";
|
||||
echo "</script>\n";
|
||||
}
|
||||
?>
|
||||
</head>
|
||||
<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0 onLoad="document.forms[0].search_phone.focus(); setTimeout('document.forms[0].search_phone.focus()', 1000); self.focus()">
|
||||
<CENTER><FONT FACE="Courier" COLOR=BLACK SIZE=3>
|
||||
|
||||
<?
|
||||
|
||||
$stmt="SELECT count(*) from live_channels where server_ip='$server_ip' and channel='$customer_zap_channel'";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$parked_count = $row[0];
|
||||
|
||||
if ($parked_count > 0)
|
||||
{
|
||||
|
||||
# $stmt="DELETE from parked_channels where server_ip='$server_ip' and parked_time='$parked_time' and channel='$channel' LIMIT 1";
|
||||
# if ($DB) {echo "|$stmt|\n";}
|
||||
# $rslt=mysql_query($stmt, $link);
|
||||
|
||||
$DTqueryCID = "RZ$FILE_datetime$user";
|
||||
|
||||
### insert a NEW record to the vicidial_manager table to be processed
|
||||
|
||||
$channel = $customer_zap_channel;
|
||||
# $channel = eregi_replace('Zap/', "", $channel);
|
||||
$SIPexten = eregi_replace('SIP/', "", $SIPexten);
|
||||
$filename = "$REC_TIME$US$SIPexten";
|
||||
|
||||
# $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Monitor','$DTqueryCID','Channel: Zap/$channel','File: $filename','Callerid: $DTqueryCID','','','','','','','')";
|
||||
# if ($DB) {echo "|$stmt|\n";}
|
||||
# $rslt=mysql_query($stmt, $link);
|
||||
|
||||
# Local/78600098@demo-6617,2
|
||||
|
||||
$stmt = "INSERT INTO vicidial_manager values('','','$SQLdate','NEW','N','$server_ip','','Originate','$DTqueryCID','Channel: $local_DEF$conf_silent_prefix$session_id$local_AMP$ext_context','Context: $ext_context','Exten: $recording_exten','Priority: 1','Callerid: $filename','','','','','')";
|
||||
if ($DB) {echo "|$stmt|\n";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
|
||||
$stmt = "INSERT INTO recording_log (channel,server_ip,extension,start_time,start_epoch,filename) values('$channel','$server_ip','SIP/$SIPexten','$NOW_TIME','$STARTtime','$filename')";
|
||||
if ($DB) {echo "|$stmt|\n";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
|
||||
$stmt="SELECT recording_id FROM recording_log where filename='$filename'";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$recording_id = $row[0];
|
||||
|
||||
echo "Recording command sent for channel $channel - $filename - $recording_id $NOW_TIME\n<BR><BR>\n";
|
||||
|
||||
$stmt="SELECT full_name from vicidial_users where user='$fronter'";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$full_name = $row[0];
|
||||
|
||||
echo "Call Referred by: $fronter - $full_name\n<BR><BR>\n";
|
||||
|
||||
$url = "http://10.10.10.196/vicidial/closer_dispo.php?lead_id=$lead_id&channel=$channel&server_ip=$server_ip&extension=$SIPexten&call_began=$STARTtime&parked_time=$parked_time&DB=$DB";
|
||||
|
||||
echo "<a href=\"$url\">View Customer Info and Disposition Call</a>\n<BR><BR>\n";
|
||||
|
||||
|
||||
$stmt="SELECT group_name,group_color from vicidial_inbound_groups where group_id='$channel_group'";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$group_name = $row[0];
|
||||
$group_color = $row[1];
|
||||
|
||||
echo "<br>\n";
|
||||
echo "<table border=0 cellspacing=5 cellpadding=3 align=center width=90% bgcolor=\"$group_color\"><tr><td><b> $channel_group - $group_name </b></td></tr></table><br>\n\n";
|
||||
|
||||
###########################################################################################
|
||||
####### HERE IS WHERE YOU DEFINE DIFFERENT CONTENTS DEPENDING UPON THE CHANNEL_GROUP PREFIX
|
||||
###########################################################################################
|
||||
|
||||
if (eregi('CL',$channel_group))
|
||||
{
|
||||
if (strlen($phone) > 9) {$search_phone = $phone;}
|
||||
if ( (strlen($search_phone) < 10) or (strlen($fronter) < 1) )
|
||||
{
|
||||
echo "<!-- looking for fronter and search_phone: |$fronter|$search_phone| -->\n";
|
||||
$stmt="SELECT user,phone_number from vicidial_list where lead_id='$parked_by';";
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
$row=mysql_fetch_row($rslt);
|
||||
if (strlen($fronter) < 1) {$fronter=$row[0];}
|
||||
if (strlen($search_phone) < 10) {$search_phone=$row[1];}
|
||||
}
|
||||
|
||||
?>
|
||||
<form action="http://10.10.10.196/vicidial/closer_lookup3.php" method="post">
|
||||
<input type=hidden name="fronter" value="<?=$fronter ?>">
|
||||
<input type=hidden name="closer" value="<?=$closer ?>">
|
||||
<input type=hidden name="group" value="<?=$channel_group ?>">
|
||||
<input type=hidden name="recording_id" value="<?=$recording_id ?>">
|
||||
<table border=0 cellspacing=5 cellpadding=3 align=center width=90%>
|
||||
<tr>
|
||||
<th colspan=2 bgcolor='#666666'><font class='standard_bold' color='white'>COF MW Customer Search</font></th>
|
||||
</tr>
|
||||
<tr bgcolor="<?=$group_color ?>">
|
||||
<td align=right width="50%" nowrap><font class='standard_bold'>Phone number</font></td>
|
||||
<td align=left width="50%" nowrap><input type=text size=10 maxlength=10 name="search_phone" value="<?=$search_phone ?>"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th colspan=2 bgcolor='#666666'><input type=submit name="submit_COF" value="SEARCH"></th>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
<BR><BR>
|
||||
<?
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if (eregi('UNIV',$channel_group))
|
||||
{
|
||||
echo "UNIVERSAL CLOSER GROUP: $channel_group\n";
|
||||
|
||||
|
||||
?>
|
||||
|
||||
<form action="uk_mail_lookup.php" method="post" onSubmit="return CheckForm()">
|
||||
<input type=hidden name="fronter" value="<?=$parked_by ?>">
|
||||
<input type=hidden name="closer" value="<?=$user ?>">
|
||||
<input type=hidden name="group" value="<?=$channel_group ?>">
|
||||
<input type=hidden name="recording_id" value="<?=$recording_id ?>">
|
||||
<table border=0 width=80% cellpadding=5 cellspacing=0 align=center>
|
||||
<tr>
|
||||
<th colspan=2 bgcolor='#CCCCCC'><font class='standard_bold'>New Search</font></th>
|
||||
</tr>
|
||||
|
||||
<tr bgcolor='#CCCCCC'>
|
||||
<td align=right width="50%" nowrap><font class='standard_bold'>Reservation Number:</font></td>
|
||||
<td align=left width="50%" nowrap><input type=text size=10 maxlength=10
|
||||
name="reservation_no" value="" ONKEYPRESS="var keyCode = event.which ? event.which : event.keyCode; if (keyCode!=8 && keyCode!=9 && keyCode!=37 && keyCode!=39) return ((keyCode >= '0'.charCodeAt() && keyCode <= '9'.charCodeAt()))"></td>
|
||||
</tr>
|
||||
<tr bgcolor='#CCCCCC'><td align=right width='50%' nowrap><font class='standard_bold'>Confirmation #:</font></td>
|
||||
<td align=left width='50%' nowrap><input type=text name='confirmation_no' size=10 maxlength=20 value=''></td></tr>
|
||||
<tr bgcolor='#CCCCCC'>
|
||||
<td align=right width="50%" nowrap><font class='standard_bold'>Phone #:</font></td>
|
||||
<td align=left width="50%" nowrap><input type=text size=10 maxlength=10
|
||||
name="phone" value="" ONKEYPRESS="var keyCode = event.which ? event.which : event.keyCode; if (keyCode!=8 && keyCode!=9 && keyCode!=37 && keyCode!=39) return ((keyCode >= '0'.charCodeAt() && keyCode <= '9'.charCodeAt()))"></td>
|
||||
|
||||
</tr><tr>
|
||||
<th colspan=2 bgcolor='#CCCCCC'><input type=submit name="submit_COF" value="SEARCH" onClick="javascript:btn_name='search'"><br><br></th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th colspan=2 bgcolor='#666666'><font class='standard_bold'><a href='closer_popup.php'>Back</a></font></th>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</form>
|
||||
|
||||
|
||||
<?
|
||||
|
||||
}
|
||||
|
||||
###########################################################################################
|
||||
####### END CUSTOM CONTENTS
|
||||
###########################################################################################
|
||||
|
||||
|
||||
# echo "<a href=\"#\">Close this window</a>\n<BR><BR>\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "Record command FAILED for channel $channel $NOW_TIME\n<BR><BR>\n";
|
||||
echo "Please go back and try again\n<BR><BR>\n";
|
||||
# echo "<form><input type=button value=\"Close This Window\" onClick=\"javascript:window.close();\"></form>\n";
|
||||
}
|
||||
|
||||
|
||||
|
||||
$ENDtime = date("U");
|
||||
|
||||
$RUNtime = ($ENDtime - $STARTtime);
|
||||
|
||||
echo "\n\n\n<br><br><br>\n\n";
|
||||
|
||||
|
||||
echo "<font size=0>\n\n\n<br><br><br>\nscript runtime: $RUNtime seconds</font>";
|
||||
|
||||
|
||||
?>
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
<?
|
||||
|
||||
exit;
|
||||
|
||||
|
||||
|
||||
?>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,334 +0,0 @@
|
||||
<?
|
||||
|
||||
require("dbconnect.php");
|
||||
|
||||
|
||||
##### depricated
|
||||
#require_once("htglobalize.php");
|
||||
|
||||
$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER'];
|
||||
$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW'];
|
||||
$PHP_SELF=$_SERVER['PHP_SELF'];
|
||||
$group=$_GET["group"]; if (!$group) {$group=$_POST["group"];}
|
||||
$group_selected=$_GET["group_selected"]; if (!$group_selected) {$group_selected=$_POST["group_selected"];}
|
||||
$dialplan_number=$_GET["dialplan_number"]; if (!$dialplan_number) {$dialplan_number=$_POST["dialplan_number"];}
|
||||
$extension=$_GET["extension"]; if (!$extension) {$extension=$_POST["extension"];}
|
||||
$groupselect=$_GET["groupselect"]; if (!$groupselect) {$groupselect=$_POST["groupselect"];}
|
||||
$PHONE_LOGIN=$_GET["PHONE_LOGIN"]; if (!$PHONE_LOGIN) {$PHONE_LOGIN=$_POST["PHONE_LOGIN"];}
|
||||
$server_ip=$_GET["server_ip"]; if (!$server_ip) {$server_ip=$_POST["server_ip"];}
|
||||
$DB=$_GET["DB"]; if (!$DB) {$DB=$_POST["DB"];}
|
||||
$user=$_GET["user"]; if (!$user) {$user=$_POST["user"];}
|
||||
$channel=$_GET["channel"]; if (!$channel) {$channel=$_POST["channel"];}
|
||||
$parked_time=$_GET["parked_time"]; if (!$parked_time) {$parked_time=$_POST["parked_time"];}
|
||||
$channel_group=$_GET["channel_group"]; if (!$channel_group) {$channel_group=$_POST["channel_group"];}
|
||||
$debugvars=$_GET["debugvars"]; if (!$debugvars) {$debugvars=$_POST["debugvars"];}
|
||||
$parked_by=$_GET["parked_by"]; if (!$parked_by) {$parked_by=$_POST["parked_by"];}
|
||||
$submit=$_GET["submit"]; if (!$submit) {$submit=$_POST["submit"];}
|
||||
$SUBMIT=$_GET["SUBMIT"]; if (!$SUBMIT) {$SUBMIT=$_POST["SUBMIT"];}
|
||||
|
||||
### AST GUI database administration
|
||||
### closer.php
|
||||
|
||||
# the purpose of this script and webpage is to allow for remote or local users of the system to log in and grab phone calls that are coming inbound into the Asterisk server and being put in the parked_channels table while they hear a soundfile for a limited amount of time before being forwarded on to either a set extension or a voicemail box. This gives remote or local agents a way to grab calls without tying up their phone lines all day. The agent sees the refreshing screen of calls on park and when they want to take one they just click on it, and a small window opens that will allow them to grab the call and/or look up more information on the caller through the callerID that is given(if available)
|
||||
|
||||
|
||||
$STARTtime = date("U");
|
||||
$TODAY = date("Y-m-d");
|
||||
$NOW_TIME = date("Y-m-d H:i:s");
|
||||
$popup_page = './closer_popup.php';
|
||||
|
||||
$stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 2;";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$auth=$row[0];
|
||||
|
||||
$fp = fopen ("./project_auth_entries.txt", "a");
|
||||
$date = date("r");
|
||||
$ip = getenv("REMOTE_ADDR");
|
||||
$browser = getenv("HTTP_USER_AGENT");
|
||||
|
||||
if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or (!$auth))
|
||||
{
|
||||
Header("WWW-Authenticate: Basic realm=\"VICIDIAL-CLOSER\"");
|
||||
Header("HTTP/1.0 401 Unauthorized");
|
||||
echo "Invalid Username/Password: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n";
|
||||
exit;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
if($auth>0)
|
||||
{
|
||||
$office_no=strtoupper($PHP_AUTH_USER);
|
||||
$password=strtoupper($PHP_AUTH_PW);
|
||||
$stmt="SELECT full_name from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW'";
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$LOGfullname=$row[0];
|
||||
$fullname = $row[0];
|
||||
fwrite ($fp, "VD_CLOSER|GOOD|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|$LOGfullname|\n");
|
||||
fclose($fp);
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
fwrite ($fp, "VD_CLOSER|FAIL|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|\n");
|
||||
fclose($fp);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$color_class[0] = 'green';
|
||||
$color_class[1] = 'red';
|
||||
$color_class[2] = 'blue';
|
||||
$color_class[3] = 'purple';
|
||||
$color_class[4] = 'orange';
|
||||
$color_class[5] = 'green';
|
||||
$color_class[6] = 'red';
|
||||
$color_class[7] = 'blue';
|
||||
$color_class[8] = 'purple';
|
||||
$color_class[9] = 'orange';
|
||||
?>
|
||||
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<STYLE type="text/css">
|
||||
<!--
|
||||
A:link {color: yellow}
|
||||
.green {color: white; background-color: green}
|
||||
.red {color: white; background-color: red}
|
||||
.blue {color: white; background-color: blue}
|
||||
.purple {color: white; background-color: purple}
|
||||
.orange {color: white; background-color: orange}
|
||||
-->
|
||||
</STYLE>
|
||||
|
||||
<TITLE>VICIDIAL CLOSER: Main</TITLE></HEAD>
|
||||
</HEAD>
|
||||
<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0>
|
||||
<CENTER><FONT FACE="Courier" COLOR=BLACK SIZE=3>
|
||||
|
||||
<?
|
||||
$group_selected = count($groupselect);
|
||||
|
||||
if (!$dialplan_number)
|
||||
{
|
||||
|
||||
if ($extension)
|
||||
{
|
||||
$stmt="SELECT count(*) from phones where extension='$extension';";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$ext_found=$row[0];
|
||||
if ($ext_found > 0)
|
||||
{
|
||||
$stmt="SELECT dialplan_number,server_ip from phones where extension='$extension';";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$dialplan_number=$row[0];
|
||||
$server_ip=$row[1];
|
||||
|
||||
if (!$group_selected)
|
||||
{
|
||||
$stmt="select distinct channel_group from park_log;";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$groups_to_print = mysql_num_rows($rslt);
|
||||
$i=0;
|
||||
while ($i < $groups_to_print)
|
||||
{
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$groups[$i] =$row[0];
|
||||
$i++;
|
||||
}
|
||||
echo "<br>Please select the groups you want to pick calls up from: <form action=$PHP_SELF method=GET>\n";
|
||||
echo "<table border=0><tr><td align=left>\n";
|
||||
echo "<input type=hidden name=PHONE_LOGIN value=1>\n";
|
||||
echo "<input type=hidden name=dialplan_number value=\"$dialplan_number\">\n";
|
||||
echo "<input type=hidden name=extension value=\"$extension\">\n";
|
||||
echo "<input type=hidden name=server_ip value=\"$server_ip\">\n";
|
||||
echo "<input type=hidden name=DB value=\"$DB\">\n";
|
||||
echo "Inbound Call Groups: <br>\n";
|
||||
$o=0;
|
||||
while ($groups_to_print > $o)
|
||||
{
|
||||
$group_form_print = sprintf("%-20s", $groups[$o]);
|
||||
echo "<input name=\"groupselect[]\" type=checkbox value=\"$groups[$o]\">$group_form_print <BR>\n";
|
||||
$o++;
|
||||
}
|
||||
echo "</td></tr></table>\n";
|
||||
echo "<input type=submit name=submit value=submit>\n";
|
||||
echo "<BR><BR><BR>\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
$o=0;
|
||||
while($o < $group_selected)
|
||||
{
|
||||
$form_groups = "$form_groups&groupselect[$o]=$groupselect[$o]";
|
||||
$o++;
|
||||
}
|
||||
|
||||
$stmt="INSERT INTO vicidial_user_log values('','$user','LOGIN','CLOSER','$NOW_TIME','$STARTtime');";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
|
||||
echo"<META HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html; charset=iso-8859-1\">\n";
|
||||
echo"<META HTTP-EQUIV=Refresh CONTENT=\"3; URL=$PHP_SELF?dialplan_number=$dialplan_number&server_ip=$server_ip&extension=$extension&DB=$DB$form_groups\">\n";
|
||||
|
||||
echo "<font=green><b>extension found, forwarding you to closer page, please wait 3 seconds...</b></font>\n";
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "<font=red><b>The extension you entered does not exist, please try again</b></font>\n";
|
||||
echo "<br>Please enter your phone_ID: <form action=$PHP_SELF method=POST>\n";
|
||||
echo "<input type=hidden name=PHONE_LOGIN value=1>\n";
|
||||
echo "phone station ID: <input type=text name=extension size=10 maxlength=10 value=\"$extension\"> \n";
|
||||
echo "<input type=submit name=submit value=submit>\n";
|
||||
echo "<BR><BR><BR>\n";
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "<br>Please enter your phone_ID: <form action=$PHP_SELF method=POST>\n";
|
||||
echo "<input type=hidden name=PHONE_LOGIN value=1>\n";
|
||||
echo "phone station ID: <input type=text name=extension size=10 maxlength=10> \n";
|
||||
echo "<input type=submit name=submit value=submit>\n";
|
||||
echo "<BR><BR><BR>\n";
|
||||
}
|
||||
|
||||
exit;
|
||||
|
||||
}
|
||||
|
||||
$o=0;
|
||||
while($o < $group_selected)
|
||||
{
|
||||
$listen_groups = "$listen_groups $groupselect[$o]";
|
||||
$form_groups = "$form_groups&groupselect[$o]=$groupselect[$o]";
|
||||
$o++;
|
||||
}
|
||||
|
||||
|
||||
echo"<META HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html; charset=iso-8859-1\">\n";
|
||||
echo"<META HTTP-EQUIV=Refresh CONTENT=\"5; URL=$PHP_SELF?dialplan_number=$dialplan_number&server_ip=$server_ip&extension=$extension&DB=$DB$form_groups\">\n";
|
||||
|
||||
#CHANNEL SERVER CHANNEL_GROUP EXTENSION PARKED_BY PARKED_TIME
|
||||
#----------------------------------------------------------------------------------------------
|
||||
#Zap/73-1 10.10.11.11 IN_800_TPP_CS TPPpark 7275338730 2004-04-22 12:41:00
|
||||
|
||||
|
||||
|
||||
echo "$NOW_TIME $PHP_AUTH_USER - $fullname - CALLS SENT TO: $dialplan_number<BR><BR>\n";
|
||||
|
||||
echo "Click on the channel below that you would like to have directed to your phone<BR>\n";
|
||||
|
||||
echo "<PRE>\n";
|
||||
echo "CHANNEL SERVER CHANNEL_GROUP EXTENSION PARKED_BY PARKED_TIME \n";
|
||||
echo "---------------------------------------------------------------------------------------------- \n";
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
$stmt="SELECT count(*) from parked_channels where server_ip='$server_ip'";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$parked_count = $row[0];
|
||||
if ($parked_count > 0)
|
||||
{
|
||||
$stmt="SELECT * from parked_channels where server_ip='$server_ip' and channel_group LIKE \"CL_%\" order by channel_group,parked_time";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$parked_to_print = mysql_num_rows($rslt);
|
||||
$i=0;
|
||||
while ($i < $parked_to_print)
|
||||
{
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$channel = sprintf("%-11s", $row[0]);
|
||||
$server = sprintf("%-14s", $row[1]);
|
||||
$channel_group = sprintf("%-16s", $row[2]);
|
||||
$park_extension = sprintf("%-13s", $row[3]);
|
||||
$parked_by = sprintf("%-21s", $row[4]);
|
||||
$parked_time = sprintf("%-19s", $row[5]);
|
||||
|
||||
$G=''; $EG='';
|
||||
$o=0;
|
||||
$with_color=0;
|
||||
while($o < $group_selected)
|
||||
{
|
||||
if (eregi("$groupselect[$o]",$channel_group))
|
||||
{
|
||||
$G="<SPAN class=\"$color_class[$o]\"><B>"; $EG='</B></SPAN>';
|
||||
$with_color++;
|
||||
}
|
||||
$o++;
|
||||
}
|
||||
if ($with_color)
|
||||
{
|
||||
if (eregi('CL_GAL',$row[2]))
|
||||
{
|
||||
echo "$G<A HREF=\"$popup_page?channel=$row[0]&server_ip=$server_ip&parked_time=$row[5]&dialplan_number=$dialplan_number&extension=$extension&channel_group=$row[2]&DB=$DB&debugvars=asdfuiywer786sdg786sfg7sdsgjhg352j3452hg45f2j3h4g5f2j3h4g5f2jhg4f5j3fg45jh23f5j4h23gf&parked_by=$row[4]&debugvars=asdfuiywer786sdg786sfg7sdsgjhg352j3452hg45f2j3h4g5f2j3h4g5f2jhg4f5j3fg45jh23f5j4h23gf\" target=\"_blank\">$channel</A>$server$channel_group$park_extension $parked_time $EG\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "$G<A HREF=\"$popup_page?channel=$row[0]&server_ip=$server_ip&parked_time=$row[5]&dialplan_number=$dialplan_number&extension=$extension&channel_group=$row[2]&DB=$DB&debugvars=asdfuiywer786sdg786sfg7sdsgjhg352j3452hg45f2j3h4g5f2j3h4g5f2jhg4f5j3fg45jh23f5j4h23gf&parked_by=$row[4]\" target=\"_blank\">$channel</A>$server$channel_group$park_extension$parked_by$parked_time $EG\n";
|
||||
}
|
||||
}
|
||||
#
|
||||
$i++;
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "********************************************************************************************** \n";
|
||||
echo "********************************************************************************************** \n";
|
||||
echo "*************************************** NO PARKED CALLS ************************************** \n";
|
||||
echo "********************************************************************************************** \n";
|
||||
echo "********************************************************************************************** \n";
|
||||
}
|
||||
|
||||
echo " \n\n";
|
||||
echo "looking for calls on these groups:\n";
|
||||
$o=0;
|
||||
while($o < $group_selected)
|
||||
{
|
||||
$group_print = sprintf("%-20s", $groupselect[$o]);
|
||||
echo " <SPAN class=\"$color_class[$o]\"><B> </SPAN> - $group_print</B>\n";
|
||||
$o++;
|
||||
}
|
||||
|
||||
|
||||
$ENDtime = date("U");
|
||||
|
||||
$RUNtime = ($ENDtime - $STARTtime);
|
||||
|
||||
echo "</PRE>\n\n\n<br><br><br>\n\n";
|
||||
|
||||
|
||||
echo "<font size=0>\n\n\n<br><br><br>\nscript runtime: $RUNtime seconds</font>";
|
||||
|
||||
|
||||
?>
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
<?
|
||||
|
||||
exit;
|
||||
|
||||
|
||||
|
||||
?>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,289 +0,0 @@
|
||||
<?
|
||||
|
||||
require("dbconnect.php");
|
||||
|
||||
##### depricated
|
||||
#require_once("htglobalize.php");
|
||||
|
||||
$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER'];
|
||||
$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW'];
|
||||
$PHP_SELF=$_SERVER['PHP_SELF'];
|
||||
$vendor_id=$_GET["vendor_id"]; if (!$vendor_id) {$vendor_id=$_POST["vendor_id"];}
|
||||
$phone=$_GET["phone"]; if (!$phone) {$phone=$_POST["phone"];}
|
||||
$lead_id=$_GET["lead_id"]; if (!$lead_id) {$lead_id=$_POST["lead_id"];}
|
||||
$first_name=$_GET["first_name"]; if (!$first_name) {$first_name=$_POST["first_name"];}
|
||||
$last_name=$_GET["last_name"]; if (!$last_name) {$last_name=$_POST["last_name"];}
|
||||
$phone_number=$_GET["phone_number"]; if (!$phone_number) {$phone_number=$_POST["phone_number"];}
|
||||
$end_call=$_GET["end_call"]; if (!$end_call) {$end_call=$_POST["end_call"];}
|
||||
$DB=$_GET["DB"]; if (!$DB) {$DB=$_POST["DB"];}
|
||||
$dispo=$_GET["dispo"]; if (!$dispo) {$dispo=$_POST["dispo"];}
|
||||
$list_id=$_GET["list_id"]; if (!$list_id) {$list_id=$_POST["list_id"];}
|
||||
$campaign_id=$_GET["campaign_id"]; if (!$campaign_id) {$campaign_id=$_POST["campaign_id"];}
|
||||
$phone_code=$_GET["phone_code"]; if (!$phone_code) {$phone_code=$_POST["phone_code"];}
|
||||
$server_ip=$_GET["server_ip"]; if (!$server_ip) {$server_ip=$_POST["server_ip"];}
|
||||
$extension=$_GET["extension"]; if (!$extension) {$extension=$_POST["extension"];}
|
||||
$channel=$_GET["channel"]; if (!$channel) {$channel=$_POST["channel"];}
|
||||
$call_began=$_GET["call_began"]; if (!$call_began) {$call_began=$_POST["call_began"];}
|
||||
$parked_time=$_GET["parked_time"]; if (!$parked_time) {$parked_time=$_POST["parked_time"];}
|
||||
$tsr=$_GET["tsr"]; if (!$tsr) {$tsr=$_POST["tsr"];}
|
||||
$address1=$_GET["address1"]; if (!$address1) {$address1=$_POST["address1"];}
|
||||
$address2=$_GET["address2"]; if (!$address2) {$address2=$_POST["address2"];}
|
||||
$address3=$_GET["address3"]; if (!$address3) {$address3=$_POST["address3"];}
|
||||
$city=$_GET["city"]; if (!$city) {$city=$_POST["city"];}
|
||||
$state=$_GET["state"]; if (!$state) {$state=$_POST["state"];}
|
||||
$postal_code=$_GET["postal_code"]; if (!$postal_code) {$postal_code=$_POST["postal_code"];}
|
||||
$province=$_GET["province"]; if (!$province) {$province=$_POST["province"];}
|
||||
$country_code=$_GET["country_code"]; if (!$country_code) {$country_code=$_POST["country_code"];}
|
||||
$alt_phone=$_GET["alt_phone"]; if (!$alt_phone) {$alt_phone=$_POST["alt_phone"];}
|
||||
$email=$_GET["email"]; if (!$email) {$email=$_POST["email"];}
|
||||
$security=$_GET["security"]; if (!$security) {$security=$_POST["security"];}
|
||||
$comments=$_GET["comments"]; if (!$comments) {$comments=$_POST["comments"];}
|
||||
$status=$_GET["status"]; if (!$status) {$status=$_POST["status"];}
|
||||
$submit=$_GET["submit"]; if (!$submit) {$submit=$_POST["submit"];}
|
||||
$SUBMIT=$_GET["SUBMIT"]; if (!$SUBMIT) {$SUBMIT=$_POST["SUBMIT"];}
|
||||
|
||||
|
||||
# this is the closer disposition screen of a call that has been grabbed. This allows the closer to modify customer information and disposition the call
|
||||
|
||||
|
||||
$STARTtime = date("U");
|
||||
$TODAY = date("Y-m-d");
|
||||
$NOW_TIME = date("Y-m-d H:i:s");
|
||||
$FILE_datetime = $STARTtime;
|
||||
|
||||
$ext_context = 'demo';
|
||||
if (!$begin_date) {$begin_date = $TODAY;}
|
||||
if (!$end_date) {$end_date = $TODAY;}
|
||||
|
||||
#$link=mysql_connect("localhost", "cron", "1234");
|
||||
#mysql_select_db("asterisk");
|
||||
|
||||
$stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 2;";
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$auth=$row[0];
|
||||
|
||||
$fp = fopen ("./project_auth_entries.txt", "a");
|
||||
$date = date("r");
|
||||
$ip = getenv("REMOTE_ADDR");
|
||||
$browser = getenv("HTTP_USER_AGENT");
|
||||
|
||||
if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or (!$auth))
|
||||
{
|
||||
Header("WWW-Authenticate: Basic realm=\"VICIDIAL-CLOSER\"");
|
||||
Header("HTTP/1.0 401 Unauthorized");
|
||||
echo "Invalid Username/Password: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n";
|
||||
exit;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
if($auth>0)
|
||||
{
|
||||
$office_no=strtoupper($PHP_AUTH_USER);
|
||||
$password=strtoupper($PHP_AUTH_PW);
|
||||
$stmt="SELECT full_name from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW'";
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$LOGfullname=$row[0];
|
||||
$fullname = $row[0];
|
||||
fwrite ($fp, "VD_CLOSER|GOOD|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|$LOGfullname|\n");
|
||||
fclose($fp);
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
fwrite ($fp, "VD_CLOSER|FAIL|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|\n");
|
||||
fclose($fp);
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
<html>
|
||||
<head>
|
||||
<title>VICIDIAL CLOSER: Call Disposition</title>
|
||||
</head>
|
||||
<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0>
|
||||
<CENTER><FONT FACE="Courier" COLOR=BLACK SIZE=3>
|
||||
|
||||
<?
|
||||
|
||||
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('$lead_id','$list_id','$campaign_id','$parked_time','$call_began','$STARTtime','$call_length','$status','$phone_code','$phone_number','$PHP_AUTH_USER','$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='$status',first_name='$first_name',last_name='$last_name',address1='$address1',address2='$address2',address3='$address3',city='$city',state='$state',province='$province',postal_code='$postal_code',country_code='$country_code',alt_phone='$alt_phone',email='$email',security_phrase='$security',comments='$comments' where lead_id='$lead_id'";
|
||||
if ($DB) {echo "|$stmt|\n";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
|
||||
$stmt="SELECT count(*) from live_channels where server_ip='$server_ip' and channel='$channel' and extension like \"%$extension%\"";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$parked_count = $row[0];
|
||||
|
||||
if ($parked_count > 0)
|
||||
{
|
||||
|
||||
$DTqueryCID = "RR$FILE_datetime$PHP_AUTH_USER";
|
||||
|
||||
### insert a NEW record to the vicidial_manager table to be processed
|
||||
$stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Hangup','$DTqueryCID','Channel: $channel','','','','','','','','','')";
|
||||
if ($DB) {echo "|$stmt|\n";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
|
||||
echo "Hangup command sent for channel $channel $NOW_TIME\n<BR><BR>\n";
|
||||
|
||||
echo "<form><input type=button value=\"Close This Window\" onClick=\"javascript:window.close();\"></form>\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "Hangup command FAILED for channel $channel $NOW_TIME\n<BR><BR>\n";
|
||||
echo "<form><input type=button value=\"Close This Window\" onClick=\"javascript:window.close();\"></form>\n";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$stmt="SELECT count(*) from vicidial_list where lead_id='$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='$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 "<br>Call information: $first_name $last_name - $phone_number<br><br><form action=$PHP_SELF method=POST>\n";
|
||||
echo "<input type=hidden name=end_call value=1>\n";
|
||||
echo "<input type=hidden name=DB value=\"$DB\">\n";
|
||||
echo "<input type=hidden name=lead_id value=\"$lead_id\">\n";
|
||||
echo "<input type=hidden name=list_id value=\"$list_id\">\n";
|
||||
echo "<input type=hidden name=campaign_id value=\"$campaign_id\">\n";
|
||||
echo "<input type=hidden name=phone_code value=\"$phone_code\">\n";
|
||||
echo "<input type=hidden name=phone_number value=\"$phone_number\">\n";
|
||||
echo "<input type=hidden name=server_ip value=\"$server_ip\">\n";
|
||||
echo "<input type=hidden name=extension value=\"$extension\">\n";
|
||||
echo "<input type=hidden name=channel value=\"$channel\">\n";
|
||||
echo "<input type=hidden name=call_began value=\"$call_began\">\n";
|
||||
echo "<input type=hidden name=parked_time value=\"$parked_time\">\n";
|
||||
echo "<table cellpadding=1 cellspacing=0>\n";
|
||||
echo "<tr><td colspan=2>Vendor ID: $vendor_id Campaign ID: $campaign_id</td></tr>\n";
|
||||
echo "<tr><td colspan=2>Fronter: $tsr List ID: $list_id</td></tr>\n";
|
||||
echo "<tr><td align=right>First Name: </td><td align=left><input type=text name=first_name size=15 maxlength=30 value=\"$first_name\"> \n";
|
||||
echo " Last Name: <input type=text name=last_name size=15 maxlength=30 value=\"$last_name\"> </td></tr>\n";
|
||||
echo "<tr><td align=right>Address 1 : </td><td align=left><input type=text name=address1 size=30 maxlength=30 value=\"$address1\"></td></tr>\n";
|
||||
echo "<tr><td align=right>Address 2 : </td><td align=left><input type=text name=address2 size=30 maxlength=30 value=\"$address2\"></td></tr>\n";
|
||||
echo "<tr><td align=right>Address 3 : </td><td align=left><input type=text name=address3 size=30 maxlength=30 value=\"$address3\"></td></tr>\n";
|
||||
echo "<tr><td align=right>City : </td><td align=left><input type=text name=city size=30 maxlength=30 value=\"$city\"></td></tr>\n";
|
||||
echo "<tr><td align=right>State: </td><td align=left><input type=text name=state size=2 maxlength=2 value=\"$state\"> \n";
|
||||
echo " Postal Code: <input type=text name=postal_code size=10 maxlength=10 value=\"$postal_code\"> </td></tr>\n";
|
||||
|
||||
echo "<tr><td align=right>Province : </td><td align=left><input type=text name=province size=30 maxlength=30 value=\"$province\"></td></tr>\n";
|
||||
echo "<tr><td align=right>Country : </td><td align=left><input type=text name=country_code size=3 maxlength=3 value=\"$country_code\"></td></tr>\n";
|
||||
echo "<tr><td align=right>Alt Phone : </td><td align=left><input type=text name=alt_phone size=10 maxlength=10 value=\"$alt_phone\"></td></tr>\n";
|
||||
echo "<tr><td align=right>Email : </td><td align=left><input type=text name=email size=30 maxlength=50 value=\"$email\"></td></tr>\n";
|
||||
echo "<tr><td align=right>Security : </td><td align=left><input type=text name=security size=30 maxlength=100 value=\"$security\"></td></tr>\n";
|
||||
echo "<tr><td align=right>Comments : </td><td align=left><input type=text name=comments size=30 maxlength=255 value=\"$comments\"></td></tr>\n";
|
||||
echo "<tr bgcolor=#B6D3FC><td align=right>Disposition: </td><td align=left><select size=1 name=status>\n";
|
||||
|
||||
$stmt="SELECT * from vicidial_statuses where selectable='Y' order by status";
|
||||
$rsltx=mysql_query($stmt, $link);
|
||||
$statuses_to_print = mysql_num_rows($rsltx);
|
||||
$statuses_list='';
|
||||
|
||||
$o=0;
|
||||
while ($statuses_to_print > $o) {
|
||||
$rowx=mysql_fetch_row($rsltx);
|
||||
$statuses_list .= "<option value=\"$rowx[0]\">$rowx[0] - $rowx[1]</option>\n";
|
||||
$o++;
|
||||
}
|
||||
echo "$statuses_list";
|
||||
echo "</select></td></tr>\n";
|
||||
|
||||
|
||||
echo "<tr><td colspan=2><input type=submit name=submit value=\"END CALL\"></td></tr>\n";
|
||||
echo "</table></form>\n";
|
||||
echo "<BR><BR><BR>\n";
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "lead lookup FAILED for lead_id $lead_id $NOW_TIME\n<BR><BR>\n";
|
||||
# echo "<a href=\"$PHP_SELF\">Close this window</a>\n<BR><BR>\n";
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
$ENDtime = date("U");
|
||||
|
||||
$RUNtime = ($ENDtime - $STARTtime);
|
||||
|
||||
echo "\n\n\n<br><br><br>\n\n";
|
||||
|
||||
|
||||
echo "<font size=0>\n\n\n<br><br><br>\nscript runtime: $RUNtime seconds</font>";
|
||||
|
||||
|
||||
?>
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
<?
|
||||
|
||||
exit;
|
||||
|
||||
|
||||
|
||||
?>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,431 +0,0 @@
|
||||
<?
|
||||
|
||||
require("dbconnect.php");
|
||||
|
||||
##### depricated
|
||||
#require_once("htglobalize.php");
|
||||
|
||||
$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER'];
|
||||
$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW'];
|
||||
$PHP_SELF=$_SERVER['PHP_SELF'];
|
||||
$group=$_GET["group"]; if (!$group) {$group=$_POST["group"];}
|
||||
$group_selected=$_GET["group_selected"]; if (!$group_selected) {$group_selected=$_POST["group_selected"];}
|
||||
$dialplan_number=$_GET["dialplan_number"]; if (!$dialplan_number) {$dialplan_number=$_POST["dialplan_number"];}
|
||||
$extension=$_GET["extension"]; if (!$extension) {$extension=$_POST["extension"];}
|
||||
$groupselect=$_GET["groupselect"]; if (!$groupselect) {$groupselect=$_POST["groupselect"];}
|
||||
$PHONE_LOGIN=$_GET["PHONE_LOGIN"]; if (!$PHONE_LOGIN) {$PHONE_LOGIN=$_POST["PHONE_LOGIN"];}
|
||||
$server_ip=$_GET["server_ip"]; if (!$server_ip) {$server_ip=$_POST["server_ip"];}
|
||||
$DB=$_GET["DB"]; if (!$DB) {$DB=$_POST["DB"];}
|
||||
$user=$_GET["user"]; if (!$user) {$user=$_POST["user"];}
|
||||
$channel=$_GET["channel"]; if (!$channel) {$channel=$_POST["channel"];}
|
||||
$parked_time=$_GET["parked_time"]; if (!$parked_time) {$parked_time=$_POST["parked_time"];}
|
||||
$channel_group=$_GET["channel_group"]; if (!$channel_group) {$channel_group=$_POST["channel_group"];}
|
||||
$debugvars=$_GET["debugvars"]; if (!$debugvars) {$debugvars=$_POST["debugvars"];}
|
||||
$parked_by=$_GET["parked_by"]; if (!$parked_by) {$parked_by=$_POST["parked_by"];}
|
||||
$submit=$_GET["submit"]; if (!$submit) {$submit=$_POST["submit"];}
|
||||
$SUBMIT=$_GET["SUBMIT"]; if (!$SUBMIT) {$SUBMIT=$_POST["SUBMIT"];}
|
||||
|
||||
### closer_popup.php
|
||||
|
||||
# this is the closer popup of a specific call that grabs the call and allows you to go and fetch info on that caller in the local CRM system.
|
||||
|
||||
|
||||
#$DB=1;
|
||||
$US = '_';
|
||||
$STARTtime = date("U");
|
||||
$TODAY = date("Y-m-d");
|
||||
$NOW_TIME = date("Y-m-d H:i:s");
|
||||
$REC_TIME = date("Ymd-His");
|
||||
$FILE_datetime = $STARTtime;
|
||||
|
||||
$ext_context = 'demo';
|
||||
|
||||
$stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 2;";
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$auth=$row[0];
|
||||
|
||||
$fp = fopen ("./project_auth_entries.txt", "a");
|
||||
$date = date("r");
|
||||
$ip = getenv("REMOTE_ADDR");
|
||||
$browser = getenv("HTTP_USER_AGENT");
|
||||
|
||||
if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or (!$auth))
|
||||
{
|
||||
Header("WWW-Authenticate: Basic realm=\"VICIDIAL-CLOSER\"");
|
||||
Header("HTTP/1.0 401 Unauthorized");
|
||||
echo "Invalid Username/Password: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n";
|
||||
exit;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
if($auth>0)
|
||||
{
|
||||
$office_no=strtoupper($PHP_AUTH_USER);
|
||||
$password=strtoupper($PHP_AUTH_PW);
|
||||
$stmt="SELECT full_name from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW'";
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$LOGfullname=$row[0];
|
||||
$fullname = $row[0];
|
||||
fwrite ($fp, "VD_CLOSER|GOOD|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|$LOGfullname|\n");
|
||||
fclose($fp);
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
fwrite ($fp, "VD_CLOSER|FAIL|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|\n");
|
||||
fclose($fp);
|
||||
}
|
||||
}
|
||||
|
||||
echo "<html>\n";
|
||||
echo "<head>\n";
|
||||
echo "<title>VICIDIAL CLOSER: Popup</title>\n";
|
||||
|
||||
if (eregi('CL_UNIV',$channel_group))
|
||||
{
|
||||
?>
|
||||
<script language="Javascript1.2">
|
||||
var btn_name="search";
|
||||
if (document.layers) {
|
||||
document.captureEvents(Event.KEYPRESS);
|
||||
document.onkeypress = function (evt) {
|
||||
if (evt.target.constructor == Input) {
|
||||
if (evt.target.name == 'lead_id' || evt.target.name == 'phone' || evt.target.name == 'confirmation_id') {
|
||||
return ((evt.which >= '0'.charCodeAt() && evt.which <= '9'.charCodeAt()));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
function CheckForm() {
|
||||
if (btn_name=="update") {
|
||||
if (document.forms[0].phone.value.length!=10) {
|
||||
alert("The phone number you entered does not have 10 digits.\n\nIt has "+document.forms[0].phone.value.length+" - please correct it and try again.");
|
||||
return false;
|
||||
} else if (document.forms[0].confirmation_id.value.length<=5) {
|
||||
alert("The confirmation ID is either missing or not enough characters in length.\n\nPlease correct it and try again.");
|
||||
return false;
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<?
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "<script language=\"Javascript1.2\">\n";
|
||||
echo "function WaitFirefix() {setTimeout(document.forms[0].search_phone.focus(), 1000)}\n";
|
||||
echo "</script>\n";
|
||||
}
|
||||
?>
|
||||
</head>
|
||||
<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0 onLoad="document.forms[0].search_phone.focus(); setTimeout('document.forms[0].search_phone.focus()', 1000)">
|
||||
<CENTER><FONT FACE="Courier" COLOR=BLACK SIZE=3>
|
||||
|
||||
<?
|
||||
|
||||
$stmt="SELECT count(*) from parked_channels where server_ip='$server_ip' and parked_time='$parked_time' and channel='$channel'";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$parked_count = $row[0];
|
||||
|
||||
if ($parked_count > 0)
|
||||
{
|
||||
$stmt="DELETE from parked_channels where server_ip='$server_ip' and parked_time='$parked_time' and channel='$channel' LIMIT 1";
|
||||
if ($DB) {echo "|$stmt|\n";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
|
||||
|
||||
#$monitor_channel = eregi_replace('Zap/', "", $channel);
|
||||
$monitor_channel = eregi_replace('-1', "", $channel);
|
||||
$SIPexten = $extension;
|
||||
$filename = "$REC_TIME$US$SIPexten";
|
||||
$DTqueryCID = "RR$FILE_datetime$PHP_AUTH_USER";
|
||||
|
||||
# $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Monitor','$DTqueryCID','Channel: $monitor_channel','File: $filename','Callerid: $DTqueryCID','','','','','','','')";
|
||||
# if ($DB) {echo "|$stmt|\n";}
|
||||
# $rslt=mysql_query($stmt, $link);
|
||||
|
||||
# $stmt = "INSERT INTO recording_log (channel,server_ip,extension,start_time,start_epoch,filename) values('$monitor_channel','$server_ip','SIP/$SIPexten','$NOW_TIME','$STARTtime','$filename')";
|
||||
# if ($DB) {echo "|$stmt|\n";}
|
||||
# $rslt=mysql_query($stmt, $link);
|
||||
|
||||
# $stmt="SELECT recording_id FROM recording_log where filename='$filename'";
|
||||
# $rslt=mysql_query($stmt, $link);
|
||||
# if ($DB) {echo "$stmt\n";}
|
||||
# $row=mysql_fetch_row($rslt);
|
||||
# $recording_id = $row[0];
|
||||
|
||||
# echo "Recording command sent for channel $channel - $filename - $recording_id<BR>\n";
|
||||
|
||||
### insert a NEW record to the vicidial_manager table to be processed
|
||||
$stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Redirect','$DTqueryCID','Exten: $dialplan_number','Channel: $channel','Context: $ext_context','Priority: 1','Callerid: $DTqueryCID','','','','','')";
|
||||
if ($DB) {echo "|$stmt|\n";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
|
||||
echo "Redirect command sent for channel $channel $NOW_TIME\n<BR><BR>\n";
|
||||
|
||||
$stmt="SELECT full_name from vicidial_users where user='$parked_by'";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$full_name = $row[0];
|
||||
|
||||
echo "Call Referred by: $parked_by - $full_name\n<BR><BR>\n";
|
||||
|
||||
$url = "http://10.10.10.196/vicidial/closer_dispo.php?lead_id=$parked_by&channel=$channel&server_ip=$server_ip&extension=$extension&call_began=$STARTtime&parked_time=$parked_time&DB=$DB";
|
||||
|
||||
echo "<a href=\"$url\">View Customer Info and Disposition Call</a>\n<BR><BR>\n";
|
||||
|
||||
|
||||
|
||||
$stmt="UPDATE park_log set grab_time='$NOW_TIME',status='TALKING',extension='$extension',user='$PHP_AUTH_USER' where parked_time='$parked_time' and server_ip='$server_ip' and channel='$channel'";
|
||||
if ($DB) {echo "|$stmt|\n";}
|
||||
$fp = fopen ("./closer_SQL_updates.txt", "a");
|
||||
fwrite ($fp, "$date|$PHP_AUTH_USER|$stmt|\n");
|
||||
fclose($fp);
|
||||
|
||||
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
|
||||
###########################################################################################
|
||||
####### HERE IS WHERE YOU DEFINE DIFFERENT CONTENTS DEPENDING UPON THE CHANNEL_GROUP PREFIX
|
||||
###########################################################################################
|
||||
if (eregi('CL_TEST',$channel_group))
|
||||
{
|
||||
echo "GALLERIA TEST CLOSER GROUP: $channel_group\n";
|
||||
|
||||
$stmt="SELECT user,phone_number from vicidial_list where lead_id='$parked_by';";
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$fronter=$row[0];
|
||||
$search_phone=$row[1];
|
||||
|
||||
|
||||
?>
|
||||
<form action="http://10.10.10.196/vicidial/closer_lookup3.php" method="post">
|
||||
<input type=hidden name="fronter" value="<?=$fronter ?>">
|
||||
<input type=hidden name="closer" value="<?=$PHP_AUTH_USER ?>">
|
||||
<input type=hidden name="group" value="<?=$channel_group ?>">
|
||||
<input type=hidden name="recording_id" value="<?=$recording_id ?>">
|
||||
<table border=0 cellspacing=5 cellpadding=3 align=center width=90%>
|
||||
<tr>
|
||||
<th colspan=2 bgcolor='#666666'><font class='standard_bold' color='white'>COF MW Customer Search</font></th>
|
||||
</tr>
|
||||
<tr bgcolor='#99FF99'>
|
||||
<td align=right width="50%" nowrap><font class='standard_bold'>Phone number</font></td>
|
||||
<td align=left width="50%" nowrap><input type=text size=10 maxlength=10 name="search_phone" value="<?=$search_phone ?>"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th colspan=2 bgcolor='#666666'><input type=submit name="submit_COF" value="SEARCH"></th>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
<BR><BR>
|
||||
<?
|
||||
}
|
||||
|
||||
if (eregi('CL_MWCOF',$channel_group))
|
||||
{
|
||||
echo "GALLERIA INTERNAL CLOSER GROUP: $channel_group\n";
|
||||
|
||||
$stmt="SELECT user,phone_number from vicidial_list where lead_id='$parked_by';";
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$fronter=$row[0];
|
||||
$search_phone=$row[1];
|
||||
|
||||
|
||||
?>
|
||||
<form action="http://10.10.10.196/vicidial/closer_lookup3.php" method="post">
|
||||
<input type=hidden name="fronter" value="<?=$fronter ?>">
|
||||
<input type=hidden name="closer" value="<?=$PHP_AUTH_USER ?>">
|
||||
<input type=hidden name="group" value="<?=$channel_group ?>">
|
||||
<input type=hidden name="recording_id" value="<?=$recording_id ?>">
|
||||
<table border=0 cellspacing=5 cellpadding=3 align=center width=90%>
|
||||
<tr>
|
||||
<th colspan=2 bgcolor='#666666'><font class='standard_bold' color='white'>COF MW Customer Search</font></th>
|
||||
</tr>
|
||||
<tr bgcolor='#99FF99'>
|
||||
<td align=right width="50%" nowrap><font class='standard_bold'>Phone number</font></td>
|
||||
<td align=left width="50%" nowrap><input type=text size=10 maxlength=10 name="search_phone" value="<?=$search_phone ?>"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th colspan=2 bgcolor='#666666'><input type=submit name="submit_COF" value="SEARCH"></th>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
<BR><BR>
|
||||
<?
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (eregi('CL_GAL',$channel_group))
|
||||
{
|
||||
echo "GALLERIA CLOSER GROUP: $channel_group\n";
|
||||
$group_color='#CCCCCC';
|
||||
|
||||
if (eregi('CL_GALLERIA',$channel_group))
|
||||
{
|
||||
echo "<br><font color=green size=3><b>-- INTERNAL CALL GALLERIA FRONT --</b></font><br>\n";
|
||||
$group_color='#99FF99';
|
||||
}
|
||||
if (eregi('CL_GALLER2',$channel_group))
|
||||
{
|
||||
echo "<br><font color=red size=3><b>-- TouchAsia CALL Simple Escapes FRONT --</b></font><br>\n";
|
||||
$group_color='#FF9999';
|
||||
}
|
||||
if (eregi('CL_GALLER3',$channel_group))
|
||||
{
|
||||
echo "<br><font color=red size=3><b>-- DebitSupplies CALL Simple Escapes FRONT --</b></font><br>\n";
|
||||
$group_color='#FF9999';
|
||||
}
|
||||
if (eregi('CL_GALLER4',$channel_group))
|
||||
{
|
||||
echo "<br><font color=red size=3><b>-- Vishnu CALL Simple Escapes FRONT --</b></font><br>\n";
|
||||
$group_color='#FF9999';
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
<form action="http://10.10.10.196/vicidial/closer_lookup3.php" method="post">
|
||||
<input type=hidden name="fronter" value="<?=$parked_by ?>">
|
||||
<input type=hidden name="closer" value="<?=$PHP_AUTH_USER ?>">
|
||||
<input type=hidden name="group" value="<?=$channel_group ?>">
|
||||
<input type=hidden name="recording_id" value="<?=$recording_id ?>">
|
||||
<table border=0 cellspacing=5 cellpadding=3 align=center width=90%>
|
||||
<tr>
|
||||
<th colspan=2 bgcolor='#666666'><font class='standard_bold' color='white'>COF MW Customer Search</font></th>
|
||||
</tr>
|
||||
<tr bgcolor="<?=$group_color ?>">
|
||||
<td align=right width="50%" nowrap><font class='standard_bold'>Phone number</font></td>
|
||||
<td align=left width="50%" nowrap><input type=text size=10 maxlength=10 name="search_phone" value="<?=$phone ?>"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th colspan=2 bgcolor='#666666'><input type=submit name="submit_COF" value="SEARCH"></th>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
<BR><BR>
|
||||
|
||||
<!----
|
||||
<form action="http://10.10.10.196/vicidial/closer_lookup3.php" method="post">
|
||||
<input type=hidden name="fronter" value="<?=$parked_by ?>">
|
||||
<input type=hidden name="closer" value="<?=$PHP_AUTH_USER ?>">
|
||||
<table border=0 cellspacing=5 cellpadding=3 align=center width=90%>
|
||||
<tr>
|
||||
<th colspan=2 bgcolor='#666666'><font class='standard_bold' color='white'>NEW COF BlueGreen Customer Search</font></th>
|
||||
</tr>
|
||||
<tr bgcolor='#CCCCCC'>
|
||||
<td align=right width="50%" nowrap><font class='standard_bold'>Phone number</font></td>
|
||||
<td align=left width="50%" nowrap><input type=text size=10 maxlength=10 name="search_phone" value="<?=$phone ?>"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th colspan=2 bgcolor='#666666'><input type=submit name="submit_COF" value="SEARCH"></th>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
<BR><BR>
|
||||
---->
|
||||
|
||||
<?
|
||||
}
|
||||
|
||||
|
||||
if (eregi('CL_UNIV',$channel_group))
|
||||
{
|
||||
echo "UNIVERSAL CLOSER GROUP: $channel_group\n";
|
||||
|
||||
|
||||
?>
|
||||
|
||||
<form action="uk_mail_lookup.php" method="post" onSubmit="return CheckForm()">
|
||||
<input type=hidden name="fronter" value="<?=$parked_by ?>">
|
||||
<input type=hidden name="closer" value="<?=$PHP_AUTH_USER ?>">
|
||||
<input type=hidden name="group" value="<?=$channel_group ?>">
|
||||
<input type=hidden name="recording_id" value="<?=$recording_id ?>">
|
||||
<table border=0 width=80% cellpadding=5 cellspacing=0 align=center>
|
||||
<tr>
|
||||
<th colspan=2 bgcolor='#CCCCCC'><font class='standard_bold'>New Search</font></th>
|
||||
</tr>
|
||||
|
||||
<tr bgcolor='#CCCCCC'>
|
||||
<td align=right width="50%" nowrap><font class='standard_bold'>Reservation Number:</font></td>
|
||||
<td align=left width="50%" nowrap><input type=text size=10 maxlength=10
|
||||
name="reservation_no" value="" ONKEYPRESS="var keyCode = event.which ? event.which : event.keyCode; if (keyCode!=8 && keyCode!=9 && keyCode!=37 && keyCode!=39) return ((keyCode >= '0'.charCodeAt() && keyCode <= '9'.charCodeAt()))"></td>
|
||||
</tr>
|
||||
<tr bgcolor='#CCCCCC'><td align=right width='50%' nowrap><font class='standard_bold'>Confirmation #:</font></td>
|
||||
<td align=left width='50%' nowrap><input type=text name='confirmation_no' size=10 maxlength=20 value=''></td></tr>
|
||||
<tr bgcolor='#CCCCCC'>
|
||||
<td align=right width="50%" nowrap><font class='standard_bold'>Phone #:</font></td>
|
||||
<td align=left width="50%" nowrap><input type=text size=10 maxlength=10
|
||||
name="phone" value="" ONKEYPRESS="var keyCode = event.which ? event.which : event.keyCode; if (keyCode!=8 && keyCode!=9 && keyCode!=37 && keyCode!=39) return ((keyCode >= '0'.charCodeAt() && keyCode <= '9'.charCodeAt()))"></td>
|
||||
|
||||
</tr><tr>
|
||||
<th colspan=2 bgcolor='#CCCCCC'><input type=submit name="submit_COF" value="SEARCH" onClick="javascript:btn_name='search'"><br><br></th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th colspan=2 bgcolor='#666666'><font class='standard_bold'><a href='closer_popup.php'>Back</a></font></th>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</form>
|
||||
|
||||
|
||||
<?
|
||||
|
||||
}
|
||||
|
||||
###########################################################################################
|
||||
####### END CUSTOM CONTENTS
|
||||
###########################################################################################
|
||||
|
||||
|
||||
# echo "<a href=\"#\">Close this window</a>\n<BR><BR>\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "Redirect command FAILED for channel $channel $NOW_TIME\n<BR><BR>\n";
|
||||
echo "<form><input type=button value=\"Close This Window\" onClick=\"javascript:window.close();\"></form>\n";
|
||||
}
|
||||
|
||||
|
||||
|
||||
$ENDtime = date("U");
|
||||
|
||||
$RUNtime = ($ENDtime - $STARTtime);
|
||||
|
||||
echo "\n\n\n<br><br><br>\n\n";
|
||||
|
||||
|
||||
echo "<font size=0>\n\n\n<br><br><br>\nscript runtime: $RUNtime seconds</font>";
|
||||
|
||||
|
||||
?>
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
<?
|
||||
|
||||
exit;
|
||||
|
||||
|
||||
|
||||
?>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
<?
|
||||
|
||||
$link=mysql_connect("localhost", "cron", "1234");
|
||||
mysql_select_db("asterisk");
|
||||
|
||||
$local_DEF = 'Local/';
|
||||
$conf_silent_prefix = '7';
|
||||
$local_AMP = '@';
|
||||
$ext_context = 'demo';
|
||||
$recording_exten = '8309';
|
||||
|
||||
$WeBServeRRooT = '/usr/local/apache2/htdocs';
|
||||
$WeBRooTWritablE = '1';
|
||||
|
||||
?>
|
||||
@@ -1,227 +0,0 @@
|
||||
<?
|
||||
|
||||
require("dbconnect.php");
|
||||
|
||||
##### depricated
|
||||
#require_once("htglobalize.php");
|
||||
|
||||
$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER'];
|
||||
$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW'];
|
||||
$PHP_SELF=$_SERVER['PHP_SELF'];
|
||||
$group=$_GET["group"]; if (!$group) {$group=$_POST["group"];}
|
||||
$status=$_GET["status"]; if (!$status) {$status=$_POST["status"];}
|
||||
$date_with_hour=$_GET["date_with_hour"]; if (!$date_with_hour) {$date_with_hour=$_POST["date_with_hour"];}
|
||||
$submit=$_GET["submit"]; if (!$submit) {$submit=$_POST["submit"];}
|
||||
$SUBMIT=$_GET["SUBMIT"]; if (!$SUBMIT) {$SUBMIT=$_POST["SUBMIT"];}
|
||||
|
||||
### AST GUI database administration
|
||||
### group_hourly_stats.php
|
||||
|
||||
$STARTtime = date("U");
|
||||
$TODAY = date("Y-m-d");
|
||||
$date_with_hour_default = date("Y-m-d H");
|
||||
$date_no_hour_default = $TODAY;
|
||||
|
||||
if (!$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 (!$begin_date) {$begin_date = $TODAY;}
|
||||
if (!$end_date) {$end_date = $TODAY;}
|
||||
|
||||
#$link=mysql_connect("localhost", "cron", "1234");
|
||||
#mysql_select_db("asterisk");
|
||||
|
||||
$stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 7;";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$auth=$row[0];
|
||||
|
||||
$fp = fopen ("./project_auth_entries.txt", "a");
|
||||
$date = date("r");
|
||||
$ip = getenv("REMOTE_ADDR");
|
||||
$browser = getenv("HTTP_USER_AGENT");
|
||||
|
||||
if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or (!$auth))
|
||||
{
|
||||
Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\"");
|
||||
Header("HTTP/1.0 401 Unauthorized");
|
||||
echo "Invalid Username/Password: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n";
|
||||
exit;
|
||||
}
|
||||
else
|
||||
{
|
||||
header ("Content-type: text/html; charset=utf-8");
|
||||
|
||||
if($auth>0)
|
||||
{
|
||||
$office_no=strtoupper($PHP_AUTH_USER);
|
||||
$password=strtoupper($PHP_AUTH_PW);
|
||||
$stmt="SELECT full_name from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW'";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$LOGfullname=$row[0];
|
||||
fwrite ($fp, "VICIDIAL|GOOD|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|$LOGfullname|\n");
|
||||
fclose($fp);
|
||||
}
|
||||
else
|
||||
{
|
||||
fwrite ($fp, "VICIDIAL|FAIL|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|\n");
|
||||
fclose($fp);
|
||||
}
|
||||
|
||||
# $stmt="SELECT full_name from vicidial_users where user='$user';";
|
||||
# $rslt=mysql_query($stmt, $link);
|
||||
# $row=mysql_fetch_row($rslt);
|
||||
# $full_name = $row[0];
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
?>
|
||||
<html>
|
||||
<head>
|
||||
<title>VICIDIAL ADMIN: Group Hourly Stats</title>
|
||||
</head>
|
||||
<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0>
|
||||
<CENTER>
|
||||
<TABLE WIDTH=620 BGCOLOR=#D9E6FE cellpadding=2 cellspacing=0><TR BGCOLOR=#015B91><TD ALIGN=LEFT><FONT FACE="ARIAL,HELVETICA" COLOR=WHITE SIZE=2><B> VICIDIAL ADMIN: Group Hourly Stats <? echo $group ?></TD><TD ALIGN=RIGHT><FONT FACE="ARIAL,HELVETICA" COLOR=WHITE SIZE=2><B><? echo date("l F j, Y G:i:s A") ?> </TD></TR>
|
||||
|
||||
|
||||
|
||||
|
||||
<?
|
||||
|
||||
if ( ($group) and ($status) and ($date_with_hour) )
|
||||
{
|
||||
$stmt="SELECT user,full_name from vicidial_users where user_group = '$group' order by full_name desc;";
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
$tsrs_to_print = mysql_num_rows($rslt);
|
||||
$o=0;
|
||||
while($o < $tsrs_to_print)
|
||||
{
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$VDuser[$o] = "$row[0]";
|
||||
$VDname[$o] = "$row[1]";
|
||||
$o++;
|
||||
}
|
||||
|
||||
$o=0;
|
||||
while($o < $tsrs_to_print)
|
||||
{
|
||||
$stmt="select count(*) from vicidial_log where call_date >= '$date_with_hour:00:00' and call_date <= '$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 >= '$date_no_hour 00:00:00' and call_date <= '$date_no_hour 23:59:59' and user='$VDuser[$o]' and status='$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 >= '$date_with_hour:00:00' and call_date <= '$date_with_hour:59:59' and user='$VDuser[$o]' and status='$status';";
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$VDcount[$o] = "$row[0]";
|
||||
$o++;
|
||||
}
|
||||
|
||||
echo "<TR><TD ALIGN=LEFT COLSPAN=2>\n";
|
||||
|
||||
echo "<br><center>\n";
|
||||
|
||||
echo "<B>TSR HOUR COUNTS: $group | $status | $date_with_hour | $date_no_hour</B>\n";
|
||||
|
||||
echo "<center><TABLE width=600 cellspacing=0 cellpadding=1>\n";
|
||||
echo "<tr><td><font size=2>TSR </td><td align=left><font size=2>ID </td><td align=right><font size=2> $status</td><td align=right><font size=2> TOTAL CALLS</td><td align=right><font size=2> $status DAY</td><td align=right><font size=2> </td></tr>\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 "<tr $bgcolor><td><font size=2>$VDuser[$o]</td>";
|
||||
echo "<td align=left><font size=2> $VDname[$o]</td>\n";
|
||||
echo "<td align=right><font size=2> $VDcount[$o]</td>\n";
|
||||
echo "<td align=right><font size=2> $VDtotal[$o]</td>\n";
|
||||
echo "<td align=right><font size=2> $VDday[$o]</td>\n";
|
||||
echo "<td align=right><font size=1><a href=\"./admin.php?ADD=3&user=$VDuser[$o]\">MODIFY</a> | <a href=\"./user_stats.php?user=$VDuser[$o]\">STATS</a></td></tr>\n";
|
||||
$total_calls = ($total_calls + $VDtotal[$o]);
|
||||
$hour_calls = ($hour_calls + $VDcount[$o]);
|
||||
$day_calls = ($day_calls + $VDday[$o]);
|
||||
|
||||
$o++;
|
||||
}
|
||||
|
||||
echo "<tr><td><font size=2>TOTAL </td><td align=right><font size=2> $status </td><td align=right><font size=2> $hour_calls</td><td align=right><font size=2> $total_calls</td><td align=right><font size=2> $day_calls</td></tr>\n";
|
||||
|
||||
|
||||
}
|
||||
|
||||
echo "</TABLE></center>\n";
|
||||
echo "<br><br>\n";
|
||||
|
||||
|
||||
echo "<br>Please enter the group you want to get hourly stats for: <form action=$PHP_SELF method=POST>\n";
|
||||
echo "<input type=hidden name=DB value=$DB>\n";
|
||||
echo "group: <select size=1 name=group>\n";
|
||||
|
||||
$stmt="SELECT * from vicidial_user_groups order by user_group";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
$groups_to_print = mysql_num_rows($rslt);
|
||||
$o=0;
|
||||
$groups_list='';
|
||||
while ($groups_to_print > $o) {
|
||||
$rowx=mysql_fetch_row($rslt);
|
||||
if ($group == $group)
|
||||
{$groups_list .= "<option selected value=\"$rowx[0]\">$rowx[0] - $rowx[1]</option>\n";}
|
||||
else
|
||||
{$groups_list .= "<option value=\"$rowx[0]\">$rowx[0] - $rowx[1]</option>\n";}
|
||||
$o++;
|
||||
}
|
||||
echo "$groups_list</select><br>\n";
|
||||
echo "status: <input type=text name=status size=10 maxlength=10 value=\"$status\"> (example: XFER)<br>\n";
|
||||
echo "date with hour: <input type=text name=date_with_hour size=14 maxlength=13 value=\"$date_with_hour\"> (example: 2004-06-25 14)<br>\n";
|
||||
echo "<input type=submit name=submit value=SUBMIT>\n";
|
||||
echo "<BR><BR><BR>\n";
|
||||
|
||||
|
||||
$ENDtime = date("U");
|
||||
|
||||
$RUNtime = ($ENDtime - $STARTtime);
|
||||
|
||||
echo "\n\n\n<br><br><br>\n\n";
|
||||
|
||||
|
||||
echo "<font size=0>\n\n\n<br><br><br>\nscript runtime: $RUNtime seconds</font>";
|
||||
|
||||
|
||||
?>
|
||||
|
||||
|
||||
</TD></TR><TABLE>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
<?
|
||||
|
||||
exit;
|
||||
|
||||
|
||||
|
||||
?>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 492 B |
@@ -1,23 +0,0 @@
|
||||
<?php
|
||||
/*
|
||||
author: Paul Concepcion
|
||||
date: April 18, 2004
|
||||
iterate through the $_GET, $_POST, and $_SERVER hashes,
|
||||
creating global variables with the same values.
|
||||
|
||||
security risk: equal to running with register_globals "on"
|
||||
|
||||
*/
|
||||
|
||||
function array_conv($array){
|
||||
foreach ($array as $key -> $value){
|
||||
${$key} = $value;
|
||||
global ${$key};// = $value;
|
||||
}
|
||||
|
||||
}
|
||||
array_conv($_GET);
|
||||
array_conv($_POST);
|
||||
array_conv($_SERVER);
|
||||
|
||||
?>
|
||||
@@ -1,187 +0,0 @@
|
||||
<?
|
||||
header ("Content-type: text/html; charset=utf-8");
|
||||
|
||||
require("dbconnect.php");
|
||||
|
||||
|
||||
##### depricated
|
||||
#require_once("htglobalize.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"];}
|
||||
$submit=$_GET["submit"]; if (!$submit) {$submit=$_POST["submit"];}
|
||||
$SUBMIT=$_GET["SUBMIT"]; if (!$SUBMIT) {$SUBMIT=$_POST["SUBMIT"];}
|
||||
|
||||
### AST Web GUI lead loader from formatted file
|
||||
### listloader.php
|
||||
###
|
||||
### CHANGES
|
||||
### 50602-1640 - First version created by Joe Johnson
|
||||
### 51128-1108 - Removed PHP global vars requirement
|
||||
###
|
||||
|
||||
### make sure vicidial_list exists and that your file follows the formatting correctly. This page does not dedupe or do any other lead filtering actions yet at this time.
|
||||
|
||||
$version = '1.1';
|
||||
$build = '51128-1108';
|
||||
|
||||
$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 = " <a href=\"javascript:openNewWindow('$admDIR$admSCR?ADD=99999";
|
||||
$NWE = "')\"><IMG SRC=\"help.gif\" WIDTH=20 HEIGHT=20 BORDER=0 ALT=\"HELP\" ALIGN=TOP></A>";
|
||||
|
||||
echo "<html>\n";
|
||||
echo "<head>\n";
|
||||
echo "<!-- VERSION: $version BUILD: $build -->\n";
|
||||
|
||||
|
||||
?>
|
||||
|
||||
|
||||
<script language="JavaScript1.2">
|
||||
function openNewWindow(url) {
|
||||
window.open (url,"",'width=500,height=300,scrollbars=yes,menubar=yes,address=yes');
|
||||
}
|
||||
function ShowProgress(good, bad, total) {
|
||||
parent.lead_count.document.open();
|
||||
parent.lead_count.document.write('<html><body><table border=0 width=200 cellpadding=10 cellspacing=0 align=center valign=top><tr bgcolor="#000000"><th colspan=2><font face="arial, helvetica" size=3 color=white>Current file status:</font></th></tr><tr bgcolor="#009900"><td align=right><font face="arial, helvetica" size=2 color=white><B>Good:</B></font></td><td align=left><font face="arial, helvetica" size=2 color=white><B>'+good+'</B></font></td></tr><tr bgcolor="#990000"><td align=right><font face="arial, helvetica" size=2 color=white><B>Bad:</B></font></td><td align=left><font face="arial, helvetica" size=2 color=white><B>'+bad+'</B></font></td></tr><tr bgcolor="#000099"><td align=right><font face="arial, helvetica" size=2 color=white><B>Total:</B></font></td><td align=left><font face="arial, helvetica" size=2 color=white><B>'+total+'</B></font></td></tr></table><body></html>');
|
||||
parent.lead_count.document.close();
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<form action=<?=$PHP_SELF ?> method=post enctype="multipart/form-data">
|
||||
<table align=center width="500" border=0 cellpadding=5 cellspacing=0 bgcolor=#D9E6FE>
|
||||
<tr>
|
||||
<td align=right width="25%"><font face="arial, helvetica" size=2>Load leads from this file:</font></td>
|
||||
<td align=left width="75%"><input type=file name="leadfile" value="<?=$leadfile ?>"> <? echo "$NWB#vicidial_list_loader$NWE"; ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align=center><input type=submit value="SUBMIT" name='submit_file'></td>
|
||||
<td align=center><input type=button onClick="javascript:document.location='listloader.php'" value="START OVER" name='reload_page'></td>
|
||||
</tr>
|
||||
<tr><td colspan=2><font size=1><a href="new_listloader_superL.php" target="_parent">CLICK HERE TO GO TO THE SUPER LEAD LOADER (BETA VERSION)</a> <a href="admin.php" target="_parent">BACK TO ADMIN</a></font></td></tr>
|
||||
</table>
|
||||
</form>
|
||||
<?
|
||||
|
||||
#echo "|$LF_orig|$LF_path|\n";
|
||||
|
||||
if ($leadfile && filesize($LF_path)<=8388608) {
|
||||
print "<script language='JavaScript1.2'>document.forms[0].leadfile.disabled=true; document.forms[0].submit_file.disabled=true; document.forms[0].reload_page.disabled=true;</script>";
|
||||
flush();
|
||||
copy($LF_path, "$WeBServeRRooT/vicidial/vicidial_temp_file.txt");
|
||||
$file=fopen("$WeBServeRRooT/vicidial/vicidial_temp_file.txt", "r");
|
||||
if ($WeBRooTWritablE > 0)
|
||||
{$stmt_file=fopen("$WeBServeRRooT/vicidial/listloader_stmts.txt", "w");}
|
||||
$pulldate=date("Y-m-d H:i:s");
|
||||
|
||||
$buffer=fgets($file, 4096);
|
||||
$tab_count=substr_count($buffer, "\t");
|
||||
$pipe_count=substr_count($buffer, "|");
|
||||
|
||||
if ($tab_count>$pipe_count) {$delimiter="\t"; $delim_name="tab";} else {$delimiter="|"; $delim_name="pipe";}
|
||||
$field_check=explode($delimiter, $buffer);
|
||||
|
||||
if (count($field_check)>=5) {
|
||||
flush();
|
||||
$file=fopen("./vicidial_temp_file.txt", "r");
|
||||
$total=0; $good=0; $bad=0;
|
||||
print "<center><font face='arial, helvetica' size=3 color='#009900'><B>Processing $delim_name-delimited file... ($tab_count|$pipe_count)\n";
|
||||
while (!feof($file)) {
|
||||
$record++;
|
||||
$buffer=rtrim(fgets($file, 4096));
|
||||
$buffer=stripslashes($buffer);
|
||||
|
||||
if (strlen($buffer)>0) {
|
||||
$row=explode($delimiter, eregi_replace("[\'\"]", "", $buffer));
|
||||
$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];
|
||||
$campaign_id = '';
|
||||
$called_since_last_reset='N';
|
||||
$phone_code = eregi_replace("[^0-9]", "", $row[3]);
|
||||
$phone_number = eregi_replace("[^0-9]", "", $row[4]);
|
||||
$title = $row[5];
|
||||
$first_name = $row[6];
|
||||
$middle_initial = $row[7];
|
||||
$last_name = $row[8];
|
||||
$address1 = $row[9];
|
||||
$address2 = $row[10];
|
||||
$address3 = $row[11];
|
||||
$city = $row[12];
|
||||
$state = $row[13];
|
||||
$province = $row[14];
|
||||
$postal_code = $row[15];
|
||||
$country = $row[16];
|
||||
$gender = $row[17];
|
||||
$date_of_birth = $row[18];
|
||||
$alt_phone = $row[19];
|
||||
$email = $row[20];
|
||||
$security_phrase = $row[21];
|
||||
$comments = trim($row[22]);
|
||||
|
||||
if (strlen($phone_number)>8) {
|
||||
|
||||
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','$campaign_id','$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','$campaign_id','$called_since_last_reset','$phone_code','$phone_number','$title','$first_name','$middle_initial','$last_name','$address1','$address2','$address3','$city','$state','$province','$postal_code','$country_code','$gender','$date_of_birth','$alt_phone','$email','$security_phrase','$comments',0),";
|
||||
$multi_insert_counter++;
|
||||
}
|
||||
|
||||
$good++;
|
||||
} else {
|
||||
if ($bad < 10) {print "<BR></b><font size=1 color=red>record $total BAD- PHONE: $phone_number ROW: |$row[0]|</font><b>\n";}
|
||||
$bad++;
|
||||
}
|
||||
$total++;
|
||||
if ($total%100==0) {
|
||||
print "<script language='JavaScript1.2'>ShowProgress($good, $bad, $total)</script>";
|
||||
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 "<BR><BR>Done</B> GOOD: $good BAD: $bad TOTAL: $total</font></center>";
|
||||
|
||||
} else {
|
||||
print "<center><font face='arial, helvetica' size=3 color='#990000'><B>ERROR: The file does not have the required number of fields to process it.</B></font></center>";
|
||||
}
|
||||
print "<script language='JavaScript1.2'>document.forms[0].leadfile.disabled=false; document.forms[0].submit_file.disabled=false; document.forms[0].reload_page.disabled=false;</script>";
|
||||
} else if (filesize($leadfile)>8388608) {
|
||||
print "<center><font face='arial, helvetica' size=3 color='#990000'><B>ERROR: File exceeds the 8MB limit.</B></font></center>";
|
||||
}
|
||||
?>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,126 +0,0 @@
|
||||
#!/usr/bin/perl
|
||||
use Spreadsheet::ParseExcel;
|
||||
use Time::Local;
|
||||
use Net::MySQL;
|
||||
|
||||
### Make sure this file is in a libs path or put the absolute path to it
|
||||
require("/home/cron/AST_SERVER_conf.pl"); # local configuration file
|
||||
|
||||
if (!$DB_port) {$DB_port='3306';}
|
||||
|
||||
$dbhA = Net::MySQL->new(hostname => "$DB_server", database => "$DB_database", user => "$DB_user", password => "$DB_pass", port => "$DB_port")
|
||||
or die "Couldn't connect to database: $DB_server - $DB_database\n";
|
||||
|
||||
|
||||
$|=0;
|
||||
($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time);
|
||||
$year = ($year + 1900);
|
||||
$mon++;
|
||||
if ($mon < 10) {$mon = "0$mon";}
|
||||
if ($mday < 10) {$mday = "0$mday";}
|
||||
$pulldate="$year-$mon-$mday $hour:$min:$sec";
|
||||
|
||||
$total=0; $good=0; $bad=0;
|
||||
print "<center><font face='arial, helvetica' size=3 color='#009900'><B>Processing Excel file...\n";
|
||||
open(STMT_FILE, "> listloader_stmts.txt");
|
||||
|
||||
$oBook = Spreadsheet::ParseExcel::Workbook->Parse("./vicidial_temp_file.xls");
|
||||
my($iR, $iC, $oWkS, $oWkC);
|
||||
|
||||
foreach $oWkS (@{$oBook->{Worksheet}}) {
|
||||
for($iR = 0 ; defined $oWkS->{MaxRow} && $iR <= $oWkS->{MaxRow} ; $iR++) {
|
||||
|
||||
$entry_date = "$pulldate";
|
||||
$modify_date = "";
|
||||
$status = "NEW";
|
||||
$user = "";
|
||||
$oWkC = $oWkS->{Cells}[$iR][0];
|
||||
if ($oWkC) {$vendor_lead_code=$oWkC->Value; }
|
||||
$oWkC = $oWkS->{Cells}[$iR][1];
|
||||
if ($oWkC) {$source_code=$oWkC->Value; }
|
||||
$source_id=$source_code;
|
||||
$oWkC = $oWkS->{Cells}[$iR][2];
|
||||
if ($oWkC) {$list_id=$oWkC->Value; }
|
||||
$campaign_id = '';
|
||||
$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;
|
||||
$oWkC = $oWkS->{Cells}[$iR][5];
|
||||
if ($oWkC) {$title=$oWkC->Value; }
|
||||
$oWkC = $oWkS->{Cells}[$iR][6];
|
||||
if ($oWkC) {$first_name=$oWkC->Value; }
|
||||
$oWkC = $oWkS->{Cells}[$iR][7];
|
||||
if ($oWkC) {$middle_initial=$oWkC->Value; }
|
||||
$oWkC = $oWkS->{Cells}[$iR][8];
|
||||
if ($oWkC) {$last_name=$oWkC->Value; }
|
||||
$oWkC = $oWkS->{Cells}[$iR][9];
|
||||
if ($oWkC) {$address1=$oWkC->Value; }
|
||||
$oWkC = $oWkS->{Cells}[$iR][10];
|
||||
if ($oWkC) {$address2=$oWkC->Value; }
|
||||
$oWkC = $oWkS->{Cells}[$iR][11];
|
||||
if ($oWkC) {$address3=$oWkC->Value; }
|
||||
$oWkC = $oWkS->{Cells}[$iR][12];
|
||||
if ($oWkC) {$city=$oWkC->Value; }
|
||||
$oWkC = $oWkS->{Cells}[$iR][13];
|
||||
if ($oWkC) {$state=$oWkC->Value; }
|
||||
$oWkC = $oWkS->{Cells}[$iR][14];
|
||||
if ($oWkC) {$province=$oWkC->Value; }
|
||||
$oWkC = $oWkS->{Cells}[$iR][15];
|
||||
if ($oWkC) {$postal_code=$oWkC->Value; }
|
||||
$oWkC = $oWkS->{Cells}[$iR][16];
|
||||
if ($oWkC) {$country=$oWkC->Value; }
|
||||
$oWkC = $oWkS->{Cells}[$iR][17];
|
||||
if ($oWkC) {$gender=$oWkC->Value; }
|
||||
$oWkC = $oWkS->{Cells}[$iR][18];
|
||||
if ($oWkC) {$date_of_birth=$oWkC->Value; }
|
||||
$oWkC = $oWkS->{Cells}[$iR][19];
|
||||
if ($oWkC) {$alt_phone=$oWkC->Value; }
|
||||
$oWkC = $oWkS->{Cells}[$iR][20];
|
||||
if ($oWkC) {$email=$oWkC->Value; }
|
||||
$oWkC = $oWkS->{Cells}[$iR][21];
|
||||
if ($oWkC) {$security_phrase=$oWkC->Value; }
|
||||
$oWkC = $oWkS->{Cells}[$iR][22];
|
||||
if ($oWkC) {$comments=$oWkC->Value; }
|
||||
$comments=~s/^\s*(.*?)\s*$/$1/;
|
||||
|
||||
if (length($phone_number)>8) {
|
||||
|
||||
if ($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','$campaign_id','$called_since_last_reset','$phone_code','$phone_number','$title','$first_name','$middle_initial','$last_name','$address1','$address2','$address3','$city','$state','$province','$postal_code','$country','$gender','$date_of_birth','$alt_phone','$email','$security_phrase','$comments',0);";
|
||||
$dbhA->query("$stmtZ");
|
||||
print STMT_FILE $stmtZ."\r\n";
|
||||
$multistmt='';
|
||||
$multi_insert_counter=0;
|
||||
|
||||
} else {
|
||||
$multistmt .= "('','$entry_date','$modify_date','$status','$user','$vendor_lead_code','$source_id','$list_id','$campaign_id','$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 "<BR></b><font size=1 color=red>record $total BAD- PHONE: $phone_number ROW: |$row[0]|</font><b>\n";}
|
||||
$bad++;
|
||||
}
|
||||
$total++;
|
||||
if ($total%100==0) {
|
||||
print "<script language='JavaScript1.2'>ShowProgress($good, $bad, $total)</script>";
|
||||
sleep(1);
|
||||
# flush();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($multi_insert_counter > 0) {
|
||||
$stmtZ = "INSERT INTO vicidial_list values ".substr($multistmt, 0, -1).";";
|
||||
$dbhA->query("$stmtZ");
|
||||
print STMT_FILE $stmtZ."\r\n";
|
||||
}
|
||||
|
||||
print "<BR><BR>Done</B> GOOD: $good BAD: $bad TOTAL: $total</font></center>";
|
||||
|
||||
@@ -1,69 +0,0 @@
|
||||
<?
|
||||
|
||||
# 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
|
||||
|
||||
require("dbconnect.php");
|
||||
|
||||
$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER'];
|
||||
$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW'];
|
||||
$PHP_SELF=$_SERVER['PHP_SELF'];
|
||||
|
||||
$STARTtime = date("U");
|
||||
$TODAY = date("Y-m-d");
|
||||
$NOW_TIME = date("Y-m-d H:i:s");
|
||||
$FILE_datetime = $STARTtime;
|
||||
|
||||
$stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 7;";
|
||||
if ($DB) {echo "|$stmt|\n";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$auth=$row[0];
|
||||
|
||||
$fp = fopen ("./project_auth_entries.txt", "a");
|
||||
$date = date("r");
|
||||
$ip = getenv("REMOTE_ADDR");
|
||||
$browser = getenv("HTTP_USER_AGENT");
|
||||
|
||||
if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or (!$auth))
|
||||
{
|
||||
Header("WWW-Authenticate: Basic realm=\"VICIDIAL-LEAD-LOADER\"");
|
||||
Header("HTTP/1.0 401 Unauthorized");
|
||||
echo "Invalid Username/Password: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n";
|
||||
exit;
|
||||
}
|
||||
else
|
||||
{
|
||||
header ("Content-type: text/html; charset=utf-8");
|
||||
if($auth>0)
|
||||
{
|
||||
$office_no=strtoupper($PHP_AUTH_USER);
|
||||
$password=strtoupper($PHP_AUTH_PW);
|
||||
$stmt="SELECT load_leads from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW'";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$LOGload_leads =$row[0];
|
||||
|
||||
if ($LOGload_leads < 1)
|
||||
{
|
||||
echo "You do not have permissions to load leads\n";
|
||||
exit;
|
||||
}
|
||||
fwrite ($fp, "LIST_LOAD|GOOD|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|$LOGfullname|\n");
|
||||
fclose($fp);
|
||||
}
|
||||
else
|
||||
{
|
||||
fwrite ($fp, "LIST_LOAD|FAIL|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|\n");
|
||||
fclose($fp);
|
||||
}
|
||||
}
|
||||
|
||||
?><HTML>
|
||||
<HEAD>
|
||||
<TITLE>VICIDIAL: Lead Loader Module</TITLE>
|
||||
</HEAD>
|
||||
<FRAMESET ROWS="300,*" border=0>
|
||||
<FRAME SRC="listloader.php" NAME="main">
|
||||
<FRAME SRC="count.htm" NAME="lead_count">
|
||||
</HTML>
|
||||
@@ -1,56 +0,0 @@
|
||||
#!/usr/bin/perl
|
||||
use Spreadsheet::ParseExcel;
|
||||
use Time::Local;
|
||||
use Net::MySQL;
|
||||
|
||||
### Make sure this file is in a libs path or put the absolute path to it
|
||||
require("/home/cron/AST_SERVER_conf.pl"); # local configuration file
|
||||
|
||||
if (!$DB_port) {$DB_port='3306';}
|
||||
|
||||
$dbhA = Net::MySQL->new(hostname => "$DB_server", database => "$DB_database", user => "$DB_user", password => "$DB_pass", port => "$DB_port")
|
||||
or die "Couldn't connect to database: $DB_server - $DB_database\n";
|
||||
|
||||
|
||||
$oBook = Spreadsheet::ParseExcel::Workbook->Parse("./vicidial_temp_file.xls");
|
||||
my($iR, $iC, $oWkS, $oWkC);
|
||||
$var_str="";
|
||||
|
||||
foreach $oWkS (@{$oBook->{Worksheet}}) {
|
||||
for(my $iC = $oWkS->{MinCol} ; defined $oWkS->{MaxCol} && $iC <= $oWkS->{MaxCol} ; $iC++) {
|
||||
$oWkC = $oWkS->{Cells}[0][$iC];
|
||||
if ($oWkC) {
|
||||
$var_str.=$oWkC->Value."|";
|
||||
} else {
|
||||
$var_str.="|";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@xls_row=split(/\|/, $var_str);
|
||||
|
||||
|
||||
$dbhA->query("select vendor_lead_code, source_id, list_id, phone_code, phone_number, title, first_name, middle_initial, last_name, address1, address2, address3, city, state, province, postal_code, country_code, gender, date_of_birth, alt_phone, email, security_phrase, comments from vicidial_list limit 1");
|
||||
|
||||
if ($dbhA->has_selected_record) {
|
||||
$rslt = $dbhA->create_record_iterator();
|
||||
my @row = $rslt->get_field_names();
|
||||
for ($i=0; $i<scalar(@row); $i++) {
|
||||
# print "$i: $row[$i]\n";
|
||||
$field_name=uc($row[$i]);
|
||||
$field_name=~s/\_/ /g;
|
||||
print " <tr bgcolor=#D9E6FE>\r\n";
|
||||
print " <th><font class=standard>".$field_name.": </font></td>\r\n";
|
||||
print " <th><select name='".$row[$i]."_field'>\r\n";
|
||||
print " <option value=''>---------------------</option>\r\n";
|
||||
|
||||
for ($j=0; $j<scalar(@xls_row); $j++) {
|
||||
$xls_row[$j]=~s/\"//g;
|
||||
print " <option value='$j'>\"$xls_row[$j]\"</option>\r\n";
|
||||
}
|
||||
|
||||
print " </select></td>\r\n";
|
||||
print " </tr>\r\n";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,128 +0,0 @@
|
||||
#!/usr/bin/perl
|
||||
use Spreadsheet::ParseExcel;
|
||||
use Time::Local;
|
||||
use Net::MySQL;
|
||||
|
||||
### Make sure this file is in a libs path or put the absolute path to it
|
||||
require("/home/cron/AST_SERVER_conf.pl"); # local configuration file
|
||||
|
||||
if (!$DB_port) {$DB_port='3306';}
|
||||
|
||||
$dbhA = Net::MySQL->new(hostname => "$DB_server", database => "$DB_database", user => "$DB_user", password => "$DB_pass", port => "$DB_port")
|
||||
or die "Couldn't connect to database: $DB_server - $DB_database\n";
|
||||
|
||||
|
||||
$vars=$ARGV[0];
|
||||
@xls_fields=split(/\,/, $vars);
|
||||
|
||||
$|=0;
|
||||
($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time);
|
||||
$year = ($year + 1900);
|
||||
$mon++;
|
||||
if ($mon < 10) {$mon = "0$mon";}
|
||||
if ($mday < 10) {$mday = "0$mday";}
|
||||
$pulldate="$year-$mon-$mday $hour:$min:$sec";
|
||||
|
||||
$total=0; $good=0; $bad=0;
|
||||
open(STMT_FILE, "> listloader_stmts.txt");
|
||||
|
||||
$oBook = Spreadsheet::ParseExcel::Workbook->Parse("./vicidial_temp_file.xls");
|
||||
my($iR, $iC, $oWkS, $oWkC);
|
||||
|
||||
foreach $oWkS (@{$oBook->{Worksheet}}) {
|
||||
for($iR = 0 ; defined $oWkS->{MaxRow} && $iR <= $oWkS->{MaxRow} ; $iR++) {
|
||||
|
||||
$entry_date = "$pulldate";
|
||||
$modify_date = "";
|
||||
$status = "NEW";
|
||||
$user = "";
|
||||
$oWkC = $oWkS->{Cells}[$iR][$xls_fields[0]];
|
||||
if ($oWkC) {$vendor_lead_code=$oWkC->Value; }
|
||||
$oWkC = $oWkS->{Cells}[$iR][$xls_fields[1]];
|
||||
if ($oWkC) {$source_code=$oWkC->Value; }
|
||||
$source_id=$source_code;
|
||||
$oWkC = $oWkS->{Cells}[$iR][$xls_fields[2]];
|
||||
if ($oWkC) {$list_id=$oWkC->Value; }
|
||||
$campaign_id = '';
|
||||
$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;
|
||||
$oWkC = $oWkS->{Cells}[$iR][$xls_fields[5]];
|
||||
if ($oWkC) {$title=$oWkC->Value; }
|
||||
$oWkC = $oWkS->{Cells}[$iR][$xls_fields[6]];
|
||||
if ($oWkC) {$first_name=$oWkC->Value; }
|
||||
$oWkC = $oWkS->{Cells}[$iR][$xls_fields[7]];
|
||||
if ($oWkC) {$middle_initial=$oWkC->Value; }
|
||||
$oWkC = $oWkS->{Cells}[$iR][$xls_fields[8]];
|
||||
if ($oWkC) {$last_name=$oWkC->Value; }
|
||||
$oWkC = $oWkS->{Cells}[$iR][$xls_fields[9]];
|
||||
if ($oWkC) {$address1=$oWkC->Value; }
|
||||
$oWkC = $oWkS->{Cells}[$iR][$xls_fields[10]];
|
||||
if ($oWkC) {$address2=$oWkC->Value; }
|
||||
$oWkC = $oWkS->{Cells}[$iR][$xls_fields[11]];
|
||||
if ($oWkC) {$address3=$oWkC->Value; }
|
||||
$oWkC = $oWkS->{Cells}[$iR][$xls_fields[12]];
|
||||
if ($oWkC) {$city=$oWkC->Value; }
|
||||
$oWkC = $oWkS->{Cells}[$iR][$xls_fields[13]];
|
||||
if ($oWkC) {$state=$oWkC->Value; }
|
||||
$oWkC = $oWkS->{Cells}[$iR][$xls_fields[14]];
|
||||
if ($oWkC) {$province=$oWkC->Value; }
|
||||
$oWkC = $oWkS->{Cells}[$iR][$xls_fields[15]];
|
||||
if ($oWkC) {$postal_code=$oWkC->Value; }
|
||||
$oWkC = $oWkS->{Cells}[$iR][$xls_fields[16]];
|
||||
if ($oWkC) {$country_code=$oWkC->Value; }
|
||||
$oWkC = $oWkS->{Cells}[$iR][$xls_fields[17]];
|
||||
if ($oWkC) {$gender=$oWkC->Value; }
|
||||
$oWkC = $oWkS->{Cells}[$iR][$xls_fields[18]];
|
||||
if ($oWkC) {$date_of_birth=$oWkC->Value; }
|
||||
$oWkC = $oWkS->{Cells}[$iR][$xls_fields[19]];
|
||||
if ($oWkC) {$alt_phone=$oWkC->Value; }
|
||||
$oWkC = $oWkS->{Cells}[$iR][$xls_fields[20]];
|
||||
if ($oWkC) {$email=$oWkC->Value; }
|
||||
$oWkC = $oWkS->{Cells}[$iR][$xls_fields[21]];
|
||||
if ($oWkC) {$security_phrase=$oWkC->Value; }
|
||||
$oWkC = $oWkS->{Cells}[$iR][$xls_fields[22]];
|
||||
if ($oWkC) {$comments=$oWkC->Value; }
|
||||
$comments=~s/^\s*(.*?)\s*$/$1/;
|
||||
|
||||
if (length($phone_number)>8) {
|
||||
|
||||
if ($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','$campaign_id','$called_since_last_reset','$phone_code','$phone_number','$title','$first_name','$middle_initial','$last_name','$address1','$address2','$address3','$city','$state','$province','$postal_code','$country_code','$gender','$date_of_birth','$alt_phone','$email','$security_phrase','$comments',0);";
|
||||
$dbhA->query("$stmtZ");
|
||||
print STMT_FILE $stmtZ."\r\n";
|
||||
$multistmt='';
|
||||
$multi_insert_counter=0;
|
||||
|
||||
} else {
|
||||
$multistmt .= "('','$entry_date','$modify_date','$status','$user','$vendor_lead_code','$source_id','$list_id','$campaign_id','$called_since_last_reset','$phone_code','$phone_number','$title','$first_name','$middle_initial','$last_name','$address1','$address2','$address3','$city','$state','$province','$postal_code','$country_code','$gender','$date_of_birth','$alt_phone','$email','$security_phrase','$comments',0),";
|
||||
$multi_insert_counter++;
|
||||
}
|
||||
|
||||
$good++;
|
||||
} else {
|
||||
if ($bad < 10) {print "<BR></b><font size=1 color=red>record $total BAD- PHONE: $phone_number ROW: |$row[0]|</font><b>\n";}
|
||||
$bad++;
|
||||
}
|
||||
$total++;
|
||||
if ($total%100==0) {
|
||||
print "<script language='JavaScript1.2'>ShowProgress($good, $bad, $total)</script>";
|
||||
sleep(1);
|
||||
# flush();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($multi_insert_counter > 0) {
|
||||
$stmtZ = "INSERT INTO vicidial_list values ".substr($multistmt, 0, -1).";";
|
||||
$dbhA->query("$stmtZ");
|
||||
print STMT_FILE $stmtZ."\r\n";
|
||||
}
|
||||
|
||||
print "<BR><BR>Done</B> GOOD: $good BAD: $bad TOTAL: $total</font></center>";
|
||||
|
||||
@@ -1,33 +0,0 @@
|
||||
<?
|
||||
|
||||
|
||||
$STARTtime = date("U");
|
||||
$TODAY = date("Y-m-d");
|
||||
$NOW_TIME = date("Y-m-d H:i:s");
|
||||
$FILE_datetime = $STARTtime;
|
||||
|
||||
$ext_context = 'demo';
|
||||
if (!$begin_date) {$begin_date = $TODAY;}
|
||||
if (!$end_date) {$end_date = $TODAY;}
|
||||
|
||||
|
||||
$fp = fopen ("./closer_SQL_updates.txt", "a");
|
||||
$date = date("r");
|
||||
$ip = getenv("REMOTE_ADDR");
|
||||
$browser = getenv("HTTP_USER_AGENT");
|
||||
|
||||
fwrite ($fp, "CLOSER SQL UPDATE|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|$LOGfullname|\n");
|
||||
fclose($fp);
|
||||
|
||||
|
||||
|
||||
exit;
|
||||
|
||||
|
||||
|
||||
?>
|
||||
|
||||
|
||||
Hello
|
||||
|
||||
|
||||
@@ -1,747 +0,0 @@
|
||||
<?
|
||||
require("dbconnect.php");
|
||||
|
||||
### links used for testing
|
||||
#$link=mysql_connect("10.10.10.15", "cron", "1234");
|
||||
#mysql_select_db("asterisk");
|
||||
#$WeBServeRRooT = '/home/www/htdocs';
|
||||
|
||||
##### depricated
|
||||
#require_once("htglobalize.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"];}
|
||||
$submit=$_GET["submit"]; if (!$submit) {$submit=$_POST["submit"];}
|
||||
$SUBMIT=$_GET["SUBMIT"]; if (!$SUBMIT) {$SUBMIT=$_POST["SUBMIT"];}
|
||||
$leadfile_name=$_GET["leadfile_name"]; if (!$leadfile_name) {$leadfile_name=$_POST["leadfile_name"];}
|
||||
# $leadfile=$_GET["leadfile"]; if (!$leadfile) {$leadfile=$_POST["leadfile"];}
|
||||
$file_layout=$_GET["file_layout"]; if (!$file_layout) {$file_layout=$_POST["file_layout"];}
|
||||
$OK_to_process=$_GET["OK_to_process"]; if (!$OK_to_process) {$OK_to_process=$_POST["OK_to_process"];}
|
||||
$vendor_lead_code_field=$_GET["vendor_lead_code_field"]; if (!$vendor_lead_code_field) {$vendor_lead_code_field=$_POST["vendor_lead_code_field"];}
|
||||
$source_id_field=$_GET["source_id_field"]; if (!$source_id_field) {$source_id_field=$_POST["source_id_field"];}
|
||||
$list_id_field=$_GET["list_id_field"]; if (!$list_id_field) {$list_id_field=$_POST["list_id_field"];}
|
||||
$phone_code_field=$_GET["phone_code_field"]; if (!$phone_code_field) {$phone_code_field=$_POST["phone_code_field"];}
|
||||
$phone_number_field=$_GET["phone_number_field"]; if (!$phone_number_field) {$phone_number_field=$_POST["phone_number_field"];}
|
||||
$title_field=$_GET["title_field"]; if (!$title_field) {$title_field=$_POST["title_field"];}
|
||||
$first_name_field=$_GET["first_name_field"]; if (!$first_name_field) {$first_name_field=$_POST["first_name_field"];}
|
||||
$middle_initial_field=$_GET["middle_initial_field"]; if (!$middle_initial_field) {$middle_initial_field=$_POST["middle_initial_field"];}
|
||||
$last_name_field=$_GET["last_name_field"]; if (!$last_name_field) {$last_name_field=$_POST["last_name_field"];}
|
||||
$address1_field=$_GET["address1_field"]; if (!$address1_field) {$address1_field=$_POST["address1_field"];}
|
||||
$address2_field=$_GET["address2_field"]; if (!$address2_field) {$address2_field=$_POST["address2_field"];}
|
||||
$address3_field=$_GET["address3_field"]; if (!$address3_field) {$address3_field=$_POST["address3_field"];}
|
||||
$city_field=$_GET["city_field"]; if (!$city_field) {$city_field=$_POST["city_field"];}
|
||||
$state_field=$_GET["state_field"]; if (!$state_field) {$state_field=$_POST["state_field"];}
|
||||
$province_field=$_GET["province_field"]; if (!$province_field) {$province_field=$_POST["province_field"];}
|
||||
$postal_code_field=$_GET["postal_code_field"]; if (!$postal_code_field) {$postal_code_field=$_POST["postal_code_field"];}
|
||||
# $country_field=$_GET["country_field"]; if (!$country_field) {$country_field=$_POST["country_field"];}
|
||||
$country_code_field=$_GET["country_code_field"]; if (!$country_code_field) {$country_code_field=$_POST["country_code_field"];}
|
||||
$gender_field=$_GET["gender_field"]; if (!$gender_field) {$gender_field=$_POST["gender_field"];}
|
||||
$date_of_birth_field=$_GET["date_of_birth_field"]; if (!$date_of_birth_field) {$date_of_birth_field=$_POST["date_of_birth_field"];}
|
||||
$alt_phone_field=$_GET["alt_phone_field"]; if (!$alt_phone_field) {$alt_phone_field=$_POST["alt_phone_field"];}
|
||||
$email_field=$_GET["email_field"]; if (!$email_field) {$email_field=$_POST["email_field"];}
|
||||
$security_phrase_field=$_GET["security_phrase_field"]; if (!$security_phrase_field) {$security_phrase_field=$_POST["security_phrase_field"];}
|
||||
$comments_field=$_GET["comments_field"]; if (!$comments_field) {$comments_field=$_POST["comments_field"];}
|
||||
|
||||
### AST GUI lead loader from formatted file
|
||||
### listloader.php
|
||||
###
|
||||
### 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
|
||||
###
|
||||
|
||||
### make sure vicidial_list exists and that your file follows the formatting correctly. This page does not dedupe or do any other lead filtering actions yet at this time.
|
||||
|
||||
$version = '1.1.9';
|
||||
$build = '60113-1603';
|
||||
|
||||
|
||||
$STARTtime = date("U");
|
||||
$TODAY = date("Y-m-d");
|
||||
$NOW_TIME = date("Y-m-d H:i:s");
|
||||
$FILE_datetime = $STARTtime;
|
||||
|
||||
$stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 7;";
|
||||
if ($DB) {echo "|$stmt|\n";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$auth=$row[0];
|
||||
|
||||
$fp = fopen ("./project_auth_entries.txt", "a");
|
||||
$date = date("r");
|
||||
$ip = getenv("REMOTE_ADDR");
|
||||
$browser = getenv("HTTP_USER_AGENT");
|
||||
|
||||
if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or (!$auth))
|
||||
{
|
||||
Header("WWW-Authenticate: Basic realm=\"VICIDIAL-LEAD-LOADER\"");
|
||||
Header("HTTP/1.0 401 Unauthorized");
|
||||
echo "Invalid Username/Password: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n";
|
||||
exit;
|
||||
}
|
||||
else
|
||||
{
|
||||
header ("Content-type: text/html; charset=utf-8");
|
||||
if($auth>0)
|
||||
{
|
||||
$office_no=strtoupper($PHP_AUTH_USER);
|
||||
$password=strtoupper($PHP_AUTH_PW);
|
||||
$stmt="SELECT load_leads from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW'";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$LOGload_leads =$row[0];
|
||||
|
||||
if ($LOGload_leads < 1)
|
||||
{
|
||||
echo "You do not have permissions to load leads\n";
|
||||
exit;
|
||||
}
|
||||
fwrite ($fp, "LIST_LOAD|GOOD|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|$LOGfullname|\n");
|
||||
fclose($fp);
|
||||
}
|
||||
else
|
||||
{
|
||||
fwrite ($fp, "LIST_LOAD|FAIL|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|\n");
|
||||
fclose($fp);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$script_name = getenv("SCRIPT_NAME");
|
||||
$server_name = getenv("SERVER_NAME");
|
||||
$server_port = getenv("SERVER_PORT");
|
||||
if (eregi("443",$server_port)) {$HTTPprotocol = 'https://';}
|
||||
else {$HTTPprotocol = 'http://';}
|
||||
$admDIR = "$HTTPprotocol$server_name$script_name";
|
||||
$admDIR = eregi_replace('new_listloader_superL.php','',$admDIR);
|
||||
$admSCR = 'admin.php';
|
||||
$NWB = " <a href=\"javascript:openNewWindow('$admDIR$admSCR?ADD=99999";
|
||||
$NWE = "')\"><IMG SRC=\"help.gif\" WIDTH=20 HEIGHT=20 BORDER=0 ALT=\"HELP\" ALIGN=TOP></A>";
|
||||
|
||||
echo "<html>\n";
|
||||
echo "<head>\n";
|
||||
echo "<!-- VERSION: $version BUILD: $build -->\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 "<style type=\"text/css\">\n
|
||||
<!--\n
|
||||
.title { font-family: Arial, Helvetica, sans-serif; font-size: ".macfontfix(18)."pt}\n
|
||||
.standard { font-family: Arial, Helvetica, sans-serif; font-size: ".macfontfix(10)."pt}\n
|
||||
.small_standard { font-family: Arial, Helvetica, sans-serif; font-size: ".macfontfix(8)."pt}\n
|
||||
.tiny_standard { font-family: Arial, Helvetica, sans-serif; font-size: ".macfontfix(6)."pt}\n
|
||||
.standard_bold { font-family: Arial, Helvetica, sans-serif; font-size: ".macfontfix(10)."pt; font-weight: bold}\n
|
||||
.standard_header { font-family: Arial, Helvetica, sans-serif; font-size: ".macfontfix(14)."pt; font-weight: bold}\n
|
||||
.standard_bold_highlight { font-family: Arial, Helvetica, sans-serif; font-size: ".macfontfix(10)."pt; font-weight: bold; color: white; BACKGROUND-COLOR: black}\n
|
||||
.standard_bold_blue_highlight { font-family: Arial, Helvetica, sans-serif; font-size: 10pt; font-weight: bold; BACKGROUND-COLOR: blue}\n
|
||||
A.employee_standard { font-family: garamond, sans-serif; font-size: ".macfontfix(10)."pt; font-style: normal; font-variant: normal; font-weight: bold; text-decoration: none}\n
|
||||
.employee_standard { font-family: garamond, sans-serif; font-size: ".macfontfix(10)."pt; font-weight: bold}\n
|
||||
.employee_title { font-family: Garamond, sans-serif; font-size: ".macfontfix(14)."pt; font-weight: bold}\n
|
||||
\\\\-->\n
|
||||
</style>\n";
|
||||
|
||||
?>
|
||||
|
||||
|
||||
<script language="JavaScript1.2">
|
||||
function openNewWindow(url) {
|
||||
window.open (url,"",'width=500,height=300,scrollbars=yes,menubar=yes,address=yes');
|
||||
}
|
||||
function ShowProgress(good, bad, total) {
|
||||
parent.lead_count.document.open();
|
||||
parent.lead_count.document.write('<html><body><table border=0 width=200 cellpadding=10 cellspacing=0 align=center valign=top><tr bgcolor="#000000"><th colspan=2><font face="arial, helvetica" size=3 color=white>Current file status:</font></th></tr><tr bgcolor="#009900"><td align=right><font face="arial, helvetica" size=2 color=white><B>Good:</B></font></td><td align=left><font face="arial, helvetica" size=2 color=white><B>'+good+'</B></font></td></tr><tr bgcolor="#990000"><td align=right><font face="arial, helvetica" size=2 color=white><B>Bad:</B></font></td><td align=left><font face="arial, helvetica" size=2 color=white><B>'+bad+'</B></font></td></tr><tr bgcolor="#000099"><td align=right><font face="arial, helvetica" size=2 color=white><B>Total:</B></font></td><td align=left><font face="arial, helvetica" size=2 color=white><B>'+total+'</B></font></td></tr></table><body></html>');
|
||||
parent.lead_count.document.close();
|
||||
}
|
||||
function ParseFileName() {
|
||||
if (!document.forms[0].OK_to_process) {
|
||||
var endstr=document.forms[0].leadfile.value.lastIndexOf('\\');
|
||||
if (endstr>-1) {
|
||||
endstr++;
|
||||
var filename=document.forms[0].leadfile.value.substring(endstr);
|
||||
document.forms[0].leadfile_name.value=filename;
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<title>VICIDIAL ADMIN: Super Lead Loader</title>
|
||||
</head>
|
||||
<body>
|
||||
<form action=<?=$PHP_SELF ?> method=post onSubmit="ParseFileName()" enctype="multipart/form-data">
|
||||
<input type=hidden name='leadfile_name' value="<?=$leadfile_name ?>">
|
||||
<? if ($file_layout!="custom") { ?>
|
||||
<table align=center width="500" border=0 cellpadding=5 cellspacing=0 bgcolor=#D9E6FE>
|
||||
<tr>
|
||||
<td align=right width="35%"><B><font face="arial, helvetica" size=2>Load leads from this file:</font></B></td>
|
||||
<td align=left width="65%"><input type=file name="leadfile" value="<?=$leadfile ?>"> <? echo "$NWB#vicidial_list_loader$NWE"; ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align=right><B><font face="arial, helvetica" size=2>File layout to use:</font></B></td>
|
||||
<td align=left><font face="arial, helvetica" size=2><input type=radio name="file_layout" value="standard" checked>Standard VICIDIAL <input type=radio name="file_layout" value="custom">Custom layout</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align=center colspan=2><input type=submit value="SUBMIT" name='submit_file'> <input type=button onClick="javascript:document.location='new_listloader_superL.php'" value="START OVER" name='reload_page'></td>
|
||||
</tr>
|
||||
<tr><td colspan=2><font size=1><a href="listloaderMAIN.php" target="_parent">CLICK HERE TO GO TO THE BASIC LEAD LOADER </a> <a href="admin.php" target="_parent">BACK TO ADMIN</a></font></td></tr>
|
||||
<tr><td colspan=2><font size=1>SUPER LIST LOADER- VERSION: <?=$version ?> BUILD: <?=$build ?></td></tr>
|
||||
</table>
|
||||
<? } ?>
|
||||
|
||||
<?
|
||||
|
||||
if ($OK_to_process) {
|
||||
print "<script language='JavaScript1.2'>document.forms[0].leadfile.disabled=true; document.forms[0].submit_file.disabled=true; document.forms[0].reload_page.disabled=true;</script>";
|
||||
flush();
|
||||
$total=0; $good=0; $bad=0;
|
||||
|
||||
if (!eregi(".csv", $leadfile_name) && !eregi(".xls", $leadfile_name)) {
|
||||
# copy($leadfile, "./vicidial_temp_file.txt");
|
||||
$file=fopen("$WeBServeRRooT/vicidial/vicidial_temp_file.txt", "r");
|
||||
$stmt_file=fopen("listloader_stmts.txt", "w");
|
||||
|
||||
$buffer=fgets($file, 4096);
|
||||
$tab_count=substr_count($buffer, "\t");
|
||||
$pipe_count=substr_count($buffer, "|");
|
||||
|
||||
if ($tab_count>$pipe_count) {$delimiter="\t"; $delim_name="tab";} else {$delimiter="|"; $delim_name="pipe";}
|
||||
$field_check=explode($delimiter, $buffer);
|
||||
|
||||
if (count($field_check)>=5) {
|
||||
flush();
|
||||
$file=fopen("$WeBServeRRooT/vicidial/vicidial_temp_file.txt", "r");
|
||||
print "<center><font face='arial, helvetica' size=3 color='#009900'><B>Processing $delim_name-delimited file...\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[$vendor_lead_code_field];
|
||||
$source_code = $row[$source_id_field];
|
||||
$source_id=$source_code;
|
||||
$list_id = $row[$list_id_field];
|
||||
$campaign_id = '';
|
||||
$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]);
|
||||
$title = $row[$title_field];
|
||||
$first_name = $row[$first_name_field];
|
||||
$middle_initial = $row[$middle_initial_field];
|
||||
$last_name = $row[$last_name_field];
|
||||
$address1 = $row[$address1_field];
|
||||
$address2 = $row[$address2_field];
|
||||
$address3 = $row[$address3_field];
|
||||
$city =$row[$city_field];
|
||||
$state = $row[$state_field];
|
||||
$province = $row[$province_field];
|
||||
$postal_code = $row[$postal_code_field];
|
||||
$country_code = $row[$country_code_field];
|
||||
$gender = $row[$gender_field];
|
||||
$date_of_birth = $row[$date_of_birth_field];
|
||||
$alt_phone = $row[$alt_phone_field];
|
||||
$email = $row[$email_field];
|
||||
$security_phrase = $row[$security_phrase_field];
|
||||
$comments = trim($row[$comments_field]);
|
||||
|
||||
if (strlen($phone_number)>8) {
|
||||
|
||||
if ($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','$campaign_id','$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','$campaign_id','$called_since_last_reset','$phone_code','$phone_number','$title','$first_name','$middle_initial','$last_name','$address1','$address2','$address3','$city','$state','$province','$postal_code','$country_code','$gender','$date_of_birth','$alt_phone','$email','$security_phrase','$comments',0),";
|
||||
$multi_insert_counter++;
|
||||
}
|
||||
|
||||
$good++;
|
||||
} else {
|
||||
if ($bad < 10) {print "<BR></b><font size=1 color=red>record $total BAD- PHONE: $phone_number ROW: |$row[0]|</font><b>\n";}
|
||||
$bad++;
|
||||
}
|
||||
$total++;
|
||||
if ($total%100==0) {
|
||||
print "<script language='JavaScript1.2'>ShowProgress($good, $bad, $total)</script>";
|
||||
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 "<BR><BR>Done</B> GOOD: $good BAD: $bad TOTAL: $total</font></center>";
|
||||
|
||||
} else {
|
||||
print "<center><font face='arial, helvetica' size=3 color='#990000'><B>ERROR: The file does not have the required number of fields to process it.</B></font></center>";
|
||||
}
|
||||
} else if (!eregi(".csv", $leadfile_name)) {
|
||||
# copy($leadfile, "./vicidial_temp_file.xls");
|
||||
$file=fopen("$WeBServeRRooT/vicidial/vicidial_temp_file.xls", "r");
|
||||
|
||||
print "<center><font face='arial, helvetica' size=3 color='#009900'><B>Processing Excel file... \n";
|
||||
# print "$WeBServeRRooT/vicidial/listloader_super.pl $vendor_lead_code_field,$source_id_field,$list_id_field,$phone_code_field,$phone_number_field,$title_field,$first_name_field,$middle_initial_field,$last_name_field,$address1_field,$address2_field,$address3_field,$city_field,$state_field,$province_field,$postal_code_field,$country_code_field,$gender_field,$date_of_birth_field,$alt_phone_field,$email_field,$security_phrase_field,$comments_field";
|
||||
passthru("$WeBServeRRooT/vicidial/listloader_super.pl $vendor_lead_code_field,$source_id_field,$list_id_field,$phone_code_field,$phone_number_field,$title_field,$first_name_field,$middle_initial_field,$last_name_field,$address1_field,$address2_field,$address3_field,$city_field,$state_field,$province_field,$postal_code_field,$country_code_field,$gender_field,$date_of_birth_field,$alt_phone_field,$email_field,$security_phrase_field,$comments_field");
|
||||
} else {
|
||||
# copy($leadfile, "./vicidial_temp_file.csv");
|
||||
$file=fopen("$WeBServeRRooT/vicidial/vicidial_temp_file.csv", "r");
|
||||
$stmt_file=fopen("listloader_stmts.txt", "w");
|
||||
|
||||
print "<center><font face='arial, helvetica' size=3 color='#009900'><B>Processing CSV file... \n";
|
||||
|
||||
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];
|
||||
$campaign_id = '';
|
||||
$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]);
|
||||
$title = $row[$title_field];
|
||||
$first_name = $row[$first_name_field];
|
||||
$middle_initial = $row[$middle_initial_field];
|
||||
$last_name = $row[$last_name_field];
|
||||
$address1 = $row[$address1_field];
|
||||
$address2 = $row[$address2_field];
|
||||
$address3 = $row[$address3_field];
|
||||
$city =$row[$city_field];
|
||||
$state = $row[$state_field];
|
||||
$province = $row[$province_field];
|
||||
$postal_code = $row[$postal_code_field];
|
||||
$country_code = $row[$country_code_field];
|
||||
$gender = $row[$gender_field];
|
||||
$date_of_birth = $row[$date_of_birth_field];
|
||||
$alt_phone = $row[$alt_phone_field];
|
||||
$email = $row[$email_field];
|
||||
$security_phrase = $row[$security_phrase_field];
|
||||
$comments = trim($row[$comments_field]);
|
||||
|
||||
if (strlen($phone_number)>8) {
|
||||
if ($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','$campaign_id','$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','$campaign_id','$called_since_last_reset','$phone_code','$phone_number','$title','$first_name','$middle_initial','$last_name','$address1','$address2','$address3','$city','$state','$province','$postal_code','$country_code','$gender','$date_of_birth','$alt_phone','$email','$security_phrase','$comments',0),";
|
||||
$multi_insert_counter++;
|
||||
}
|
||||
|
||||
$good++;
|
||||
} else {
|
||||
if ($bad < 10) {print "<BR></b><font size=1 color=red>record $total BAD- PHONE: $phone_number ROW: |$row[0]|</font><b>\n";}
|
||||
$bad++;
|
||||
}
|
||||
$total++;
|
||||
if ($total%100==0) {
|
||||
print "<script language='JavaScript1.2'>ShowProgress($good, $bad, $total)</script>";
|
||||
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 "<BR><BR>Done</B> GOOD: $good BAD: $bad TOTAL: $total</font></center>";
|
||||
}
|
||||
print "<script language='JavaScript1.2'>document.forms[0].leadfile.disabled=false; document.forms[0].submit_file.disabled=false; document.forms[0].reload_page.disabled=false;</script>";
|
||||
}
|
||||
|
||||
if ($leadfile && filesize($LF_path)<=8388608) {
|
||||
$total=0; $good=0; $bad=0;
|
||||
if ($file_layout=="standard") {
|
||||
|
||||
print "<script language='JavaScript1.2'>document.forms[0].leadfile.disabled=true; document.forms[0].submit_file.disabled=true; document.forms[0].reload_page.disabled=true;</script>";
|
||||
flush();
|
||||
|
||||
if (!eregi(".csv", $leadfile_name) && !eregi(".xls", $leadfile_name)) {
|
||||
|
||||
copy($LF_path, "$WeBServeRRooT/vicidial/vicidial_temp_file.txt");
|
||||
$file=fopen("$WeBServeRRooT/vicidial/vicidial_temp_file.txt", "r");
|
||||
if ($WeBRooTWritablE > 0)
|
||||
{$stmt_file=fopen("$WeBServeRRooT/vicidial/listloader_stmts.txt", "w");}
|
||||
|
||||
$buffer=fgets($file, 4096);
|
||||
$tab_count=substr_count($buffer, "\t");
|
||||
$pipe_count=substr_count($buffer, "|");
|
||||
|
||||
if ($tab_count>$pipe_count) {$delimiter="\t"; $delim_name="tab";} else {$delimiter="|"; $delim_name="pipe";}
|
||||
$field_check=explode($delimiter, $buffer);
|
||||
|
||||
if (count($field_check)>=5) {
|
||||
flush();
|
||||
$file=fopen("$WeBServeRRooT/vicidial/vicidial_temp_file.txt", "r");
|
||||
$total=0; $good=0; $bad=0;
|
||||
print "<center><font face='arial, helvetica' size=3 color='#009900'><B>Processing $delim_name-delimited file... ($tab_count|$pipe_count)\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];
|
||||
$campaign_id = '';
|
||||
$called_since_last_reset='N';
|
||||
$phone_code = eregi_replace("[^0-9]", "", $row[3]);
|
||||
$phone_number = eregi_replace("[^0-9]", "", $row[4]);
|
||||
$title = $row[5];
|
||||
$first_name = $row[6];
|
||||
$middle_initial = $row[7];
|
||||
$last_name = $row[8];
|
||||
$address1 = $row[9];
|
||||
$address2 = $row[10];
|
||||
$address3 = $row[11];
|
||||
$city =$row[12];
|
||||
$state = $row[13];
|
||||
$province = $row[14];
|
||||
$postal_code = $row[15];
|
||||
$country_code = $row[16];
|
||||
$gender = $row[17];
|
||||
$date_of_birth = $row[18];
|
||||
$alt_phone = $row[19];
|
||||
$email = $row[20];
|
||||
$security_phrase = $row[21];
|
||||
$comments = trim($row[22]);
|
||||
|
||||
if (strlen($phone_number)>8) {
|
||||
|
||||
if ($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','$campaign_id','$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','$campaign_id','$called_since_last_reset','$phone_code','$phone_number','$title','$first_name','$middle_initial','$last_name','$address1','$address2','$address3','$city','$state','$province','$postal_code','$country_code','$gender','$date_of_birth','$alt_phone','$email','$security_phrase','$comments',0),";
|
||||
$multi_insert_counter++;
|
||||
}
|
||||
|
||||
$good++;
|
||||
} else {
|
||||
if ($bad < 10) {print "<BR></b><font size=1 color=red>record $total BAD- PHONE: $phone_number ROW: |$row[0]|</font><b>\n";}
|
||||
$bad++;
|
||||
}
|
||||
$total++;
|
||||
if ($total%100==0) {
|
||||
print "<script language='JavaScript1.2'>ShowProgress($good, $bad, $total)</script>";
|
||||
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 "<BR><BR>Done</B> GOOD: $good BAD: $bad TOTAL: $total</font></center>";
|
||||
|
||||
} else {
|
||||
print "<center><font face='arial, helvetica' size=3 color='#990000'><B>ERROR: The file does not have the required number of fields to process it.</B></font></center>";
|
||||
}
|
||||
} else if (!eregi(".csv", $leadfile_name)) {
|
||||
copy($LF_path, "$WeBServeRRooT/vicidial/vicidial_temp_file.xls");
|
||||
$file=fopen("$WeBServeRRooT/vicidial/vicidial_temp_file.xls", "r");
|
||||
|
||||
passthru("$WeBServeRRooT/vicidial/listloader.pl");
|
||||
} else {
|
||||
copy($LF_path, "$WeBServeRRooT/vicidial/vicidial_temp_file.csv");
|
||||
$file=fopen("$WeBServeRRooT/vicidial/vicidial_temp_file.csv", "r");
|
||||
$stmt_file=fopen("listloader_stmts.txt", "w");
|
||||
|
||||
print "<center><font face='arial, helvetica' size=3 color='#009900'><B>Processing CSV file... \n";
|
||||
|
||||
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];
|
||||
$campaign_id = '';
|
||||
$called_since_last_reset='N';
|
||||
$phone_code = eregi_replace("[^0-9]", "", $row[3]);
|
||||
$phone_number = eregi_replace("[^0-9]", "", $row[4]);
|
||||
$title = $row[5];
|
||||
$first_name = $row[6];
|
||||
$middle_initial = $row[7];
|
||||
$last_name = $row[8];
|
||||
$address1 = $row[9];
|
||||
$address2 = $row[10];
|
||||
$address3 = $row[11];
|
||||
$city =$row[12];
|
||||
$state = $row[13];
|
||||
$province = $row[14];
|
||||
$postal_code = $row[15];
|
||||
$country_code = $row[16];
|
||||
$gender = $row[17];
|
||||
$date_of_birth = $row[18];
|
||||
$alt_phone = $row[19];
|
||||
$email = $row[20];
|
||||
$security_phrase = $row[21];
|
||||
$comments = trim($row[22]);
|
||||
|
||||
if (strlen($phone_number)>8) {
|
||||
if ($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','$campaign_id','$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','$campaign_id','$called_since_last_reset','$phone_code','$phone_number','$title','$first_name','$middle_initial','$last_name','$address1','$address2','$address3','$city','$state','$province','$postal_code','$country_code','$gender','$date_of_birth','$alt_phone','$email','$security_phrase','$comments',0),";
|
||||
$multi_insert_counter++;
|
||||
}
|
||||
|
||||
$good++;
|
||||
} else {
|
||||
if ($bad < 10) {print "<BR></b><font size=1 color=red>record $total BAD- PHONE: $phone_number ROW: |$row[0]|</font><b>\n";}
|
||||
$bad++;
|
||||
}
|
||||
$total++;
|
||||
if ($total%100==0) {
|
||||
print "<script language='JavaScript1.2'>ShowProgress($good, $bad, $total)</script>";
|
||||
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 "<BR><BR>Done</B> GOOD: $good BAD: $bad TOTAL: $total</font></center>";
|
||||
|
||||
}
|
||||
print "<script language='JavaScript1.2'>document.forms[0].leadfile.disabled=false; document.forms[0].submit_file.disabled=false; document.forms[0].reload_page.disabled=false;</script>";
|
||||
|
||||
} else {
|
||||
print "<script language='JavaScript1.2'>document.forms[0].leadfile.disabled=true; document.forms[0].submit_file.disabled=true; document.forms[0].reload_page.disabled=true;</script><HR>";
|
||||
flush();
|
||||
print "<table border=0 cellpadding=3 cellspacing=0 width=500 align=center>\r\n";
|
||||
print " <tr bgcolor='#330099'>\r\n";
|
||||
print " <th align=right><font class='standard' color='white'>VICIDIAL Column</font></th>\r\n";
|
||||
print " <th><font class='standard' color='white'>File data</font></th>\r\n";
|
||||
print " </tr>\r\n";
|
||||
|
||||
$tbl_rslt=mysql_query("select vendor_lead_code, source_id, list_id, phone_code, phone_number, title, first_name, middle_initial, last_name, address1, address2, address3, city, state, province, postal_code, country_code, gender, date_of_birth, alt_phone, email, security_phrase, comments from vicidial_list limit 1", $link);
|
||||
|
||||
|
||||
if (!eregi(".csv", $leadfile_name) && !eregi(".xls", $leadfile_name)) {
|
||||
copy($LF_path, "$WeBServeRRooT/vicidial/vicidial_temp_file.txt");
|
||||
$file=fopen("$WeBServeRRooT/vicidial/vicidial_temp_file.txt", "r");
|
||||
$stmt_file=fopen("listloader_stmts.txt", "w");
|
||||
|
||||
$buffer=fgets($file, 4096);
|
||||
$tab_count=substr_count($buffer, "\t");
|
||||
$pipe_count=substr_count($buffer, "|");
|
||||
|
||||
if ($tab_count>$pipe_count) {$delimiter="\t"; $delim_name="tab";} else {$delimiter="|"; $delim_name="pipe";}
|
||||
$field_check=explode($delimiter, $buffer);
|
||||
flush();
|
||||
$file=fopen("$WeBServeRRooT/vicidial/vicidial_temp_file.txt", "r");
|
||||
print "<center><font face='arial, helvetica' size=3 color='#009900'><B>Processing $delim_name-delimited file...\n";
|
||||
|
||||
$buffer=rtrim(fgets($file, 4096));
|
||||
$buffer=stripslashes($buffer);
|
||||
$row=explode($delimiter, eregi_replace("[\'\"]", "", $buffer));
|
||||
|
||||
for ($i=0; $i<mysql_num_fields($tbl_rslt); $i++) {
|
||||
|
||||
print " <tr bgcolor=#D9E6FE>\r\n";
|
||||
print " <td align=right><font class=standard>".strtoupper(eregi_replace("_", " ", mysql_field_name($tbl_rslt, $i))).": </font></td>\r\n";
|
||||
print " <td align=center><select name='".mysql_field_name($tbl_rslt, $i)."_field'>\r\n";
|
||||
print " <option value='-1'>(none)</option>\r\n";
|
||||
|
||||
for ($j=0; $j<count($row); $j++) {
|
||||
eregi_replace("\"", "", $row[$j]);
|
||||
print " <option value='$j'>\"$row[$j]\"</option>\r\n";
|
||||
}
|
||||
|
||||
print " </select></td>\r\n";
|
||||
print " </tr>\r\n";
|
||||
|
||||
#print " <tr bgcolor=#D9E6FE>\r\n";
|
||||
#print " <td align=center><font class=standard>$row[$i]</font></td>\r\n";
|
||||
#print " <td align=center><select name=datafield$i>\r\n";
|
||||
#print " <option value=''>---------------------</option>\r\n";
|
||||
#print " <option value='entry_date'>Entry date</option>\r\n";
|
||||
#print " <option value='modify_date'>Modify date</option>\r\n";
|
||||
#print " <option value='status'>Status</option>\r\n";
|
||||
#print " <option value='user'>User</option>\r\n";
|
||||
#print " <option value='vendor_lead_code'>Vendor lead code</option>\r\n";
|
||||
#print " <option value='source_id'>Source ID</option>\r\n";
|
||||
#print " <option value='list_id'>List ID</option>\r\n";
|
||||
#print " <option value='campaign_id'>Campaign ID</option>\r\n";
|
||||
#print " <option value='called_since_last_reset'>Called since last reset</option>\r\n";
|
||||
#print " <option value='phone_code'>Phone code</option>\r\n";
|
||||
#print " <option value='phone_number'>Phone number</option>\r\n";
|
||||
#print " <option value='title'>Title</option>\r\n";
|
||||
#print " <option value='first_name'>First name</option>\r\n";
|
||||
#print " <option value='middle_initial'>Middle initial</option>\r\n";
|
||||
#print " <option value='last_name'>Last name</option>\r\n";
|
||||
#print " <option value='address1'>Address 1</option>\r\n";
|
||||
#print " <option value='address2'>Address 2</option>\r\n";
|
||||
#print " <option value='address3'>Address 3</option>\r\n";
|
||||
#print " <option value='city'>City</option>\r\n";
|
||||
#print " <option value='state'>State</option>\r\n";
|
||||
#print " <option value='province'>Province</option>\r\n";
|
||||
#print " <option value='postal_code'>Postal code</option>\r\n";
|
||||
#print " <option value='country_code'>Country code</option>\r\n";
|
||||
#print " <option value='gender'>Gender</option>\r\n";
|
||||
#print " <option value='date_of_birth'>Date of birth</option>\r\n";
|
||||
#print " <option value='alt_phone'>Alt. phone</option>\r\n";
|
||||
#print " <option value='email'>E-mail</option>\r\n";
|
||||
#print " <option value='security_phrase'>Security phrase</option>\r\n";
|
||||
#print " <option value='comments'>Comments</option>\r\n";
|
||||
#print " </td>\r\n";
|
||||
#print " </tr>\r\n";
|
||||
}
|
||||
} else if (!eregi(".csv", $leadfile_name)) {
|
||||
copy($LF_path, "$WeBServeRRooT/vicidial/vicidial_temp_file.xls");
|
||||
passthru("$WeBServeRRooT/vicidial/listloader_rowdisplay.pl");
|
||||
} else {
|
||||
copy($LF_path, "$WeBServeRRooT/vicidial/vicidial_temp_file.csv");
|
||||
$file=fopen("$WeBServeRRooT/vicidial/vicidial_temp_file.csv", "r");
|
||||
$stmt_file=fopen("listloader_stmts.txt", "w");
|
||||
|
||||
print "<center><font face='arial, helvetica' size=3 color='#009900'><B>Processing CSV file... \n";
|
||||
|
||||
$total=0; $good=0; $bad=0;
|
||||
$row=fgetcsv($file, 1000, ",");
|
||||
for ($i=0; $i<mysql_num_fields($tbl_rslt); $i++) {
|
||||
print " <tr bgcolor=#D9E6FE>\r\n";
|
||||
print " <td align=right><font class=standard>".strtoupper(eregi_replace("_", " ", mysql_field_name($tbl_rslt, $i))).": </font></td>\r\n";
|
||||
print " <td align=center><select name='".mysql_field_name($tbl_rslt, $i)."_field'>\r\n";
|
||||
print " <option value='-1'>(none)</option>\r\n";
|
||||
|
||||
for ($j=0; $j<count($row); $j++) {
|
||||
eregi_replace("\"", "", $row[$j]);
|
||||
print " <option value='$j'>\"$row[$j]\"</option>\r\n";
|
||||
}
|
||||
|
||||
print " </select></td>\r\n";
|
||||
print " </tr>\r\n";
|
||||
|
||||
#print " <tr bgcolor=#D9E6FE>\r\n";
|
||||
#print " <td align=center><font class=standard>$row[$i]</font></td>\r\n";
|
||||
#print " <td align=center><select name=datafield$i>\r\n";
|
||||
#print " <option value=''>---------------------</option>\r\n";
|
||||
#print " <option value='entry_date'>Entry date</option>\r\n";
|
||||
#print " <option value='modify_date'>Modify date</option>\r\n";
|
||||
#print " <option value='status'>Status</option>\r\n";
|
||||
#print " <option value='user'>User</option>\r\n";
|
||||
#print " <option value='vendor_lead_code'>Vendor lead code</option>\r\n";
|
||||
#print " <option value='source_id'>Source ID</option>\r\n";
|
||||
#print " <option value='list_id'>List ID</option>\r\n";
|
||||
#print " <option value='campaign_id'>Campaign ID</option>\r\n";
|
||||
#print " <option value='called_since_last_reset'>Called since last reset</option>\r\n";
|
||||
#print " <option value='phone_code'>Phone code</option>\r\n";
|
||||
#print " <option value='phone_number'>Phone number</option>\r\n";
|
||||
#print " <option value='title'>Title</option>\r\n";
|
||||
#print " <option value='first_name'>First name</option>\r\n";
|
||||
#print " <option value='middle_initial'>Middle initial</option>\r\n";
|
||||
#print " <option value='last_name'>Last name</option>\r\n";
|
||||
#print " <option value='address1'>Address 1</option>\r\n";
|
||||
#print " <option value='address2'>Address 2</option>\r\n";
|
||||
#print " <option value='address3'>Address 3</option>\r\n";
|
||||
#print " <option value='city'>City</option>\r\n";
|
||||
#print " <option value='state'>State</option>\r\n";
|
||||
#print " <option value='province'>Province</option>\r\n";
|
||||
#print " <option value='postal_code'>Postal code</option>\r\n";
|
||||
#print " <option value='country_code'>Country code</option>\r\n";
|
||||
#print " <option value='gender'>Gender</option>\r\n";
|
||||
#print " <option value='date_of_birth'>Date of birth</option>\r\n";
|
||||
#print " <option value='alt_phone'>Alt. phone</option>\r\n";
|
||||
#print " <option value='email'>E-mail</option>\r\n";
|
||||
#print " <option value='security_phrase'>Security phrase</option>\r\n";
|
||||
#print " <option value='comments'>Comments</option>\r\n";
|
||||
#print " </td>\r\n";
|
||||
#print " </tr>\r\n";
|
||||
}
|
||||
}
|
||||
print " <tr bgcolor='#330099'>\r\n";
|
||||
print " <th colspan=2><input type=submit name='OK_to_process' value='OK TO PROCESS'> <input type=button onClick=\"javascript:document.location='new_listloader_superL.php'\" value=\"START OVER\" name='reload_page'></th>\r\n";
|
||||
print " </tr>\r\n";
|
||||
print "</table>\r\n";
|
||||
# }
|
||||
print "<script language='JavaScript1.2'>document.forms[0].leadfile.disabled=false; document.forms[0].submit_file.disabled=false; document.forms[0].reload_page.disabled=false;</script>";
|
||||
}
|
||||
} else if (filesize($leadfile)>8388608) {
|
||||
print "<center><font face='arial, helvetica' size=3 color='#990000'><B>ERROR: File exceeds the 8MB limit.</B></font></center>";
|
||||
}
|
||||
?>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,124 +0,0 @@
|
||||
<?
|
||||
|
||||
require("dbconnect.php");
|
||||
|
||||
# grab: $server_ip $station $session_id
|
||||
|
||||
##### depricated
|
||||
#require_once("htglobalize.php");
|
||||
|
||||
$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER'];
|
||||
$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW'];
|
||||
$PHP_SELF=$_SERVER['PHP_SELF'];
|
||||
$server_ip=$_GET["server_ip"]; if (!$server_ip) {$server_ip=$_POST["server_ip"];}
|
||||
$station=$_GET["station"]; if (!$station) {$station=$_POST["station"];}
|
||||
$session_id=$_GET["session_id"]; if (!$session_id) {$session_id=$_POST["session_id"];}
|
||||
$NEW_RECORDING=$_GET["NEW_RECORDING"]; if (!$NEW_RECORDING) {$NEW_RECORDING=$_POST["NEW_RECORDING"];}
|
||||
$submit=$_GET["submit"]; if (!$submit) {$submit=$_POST["submit"];}
|
||||
$SUBMIT=$_GET["SUBMIT"]; if (!$SUBMIT) {$SUBMIT=$_POST["SUBMIT"];}
|
||||
|
||||
$STARTtime = date("U");
|
||||
$TODAY = date("Y-m-d");
|
||||
$MYSQL_datetime = date("Y-m-d H:i:s");
|
||||
$FILE_datetime = date("Ymd-His_");
|
||||
$secX = $STARTtime;
|
||||
|
||||
$stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 7;";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$auth=$row[0];
|
||||
|
||||
$fp = fopen ("./project_auth_entries.txt", "a");
|
||||
$date = date("r");
|
||||
$ip = getenv("REMOTE_ADDR");
|
||||
$browser = getenv("HTTP_USER_AGENT");
|
||||
|
||||
if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or (!$auth))
|
||||
{
|
||||
Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\"");
|
||||
Header("HTTP/1.0 401 Unauthorized");
|
||||
echo "Invalid Username/Password: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n";
|
||||
exit;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
if($auth>0)
|
||||
{
|
||||
$office_no=strtoupper($PHP_AUTH_USER);
|
||||
$password=strtoupper($PHP_AUTH_PW);
|
||||
$stmt="SELECT full_name from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW'";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$LOGfullname=$row[0];
|
||||
fwrite ($fp, "VICIDIAL|GOOD|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|$LOGfullname|\n");
|
||||
fclose($fp);
|
||||
}
|
||||
else
|
||||
{
|
||||
fwrite ($fp, "VICIDIAL|FAIL|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|\n");
|
||||
fclose($fp);
|
||||
}
|
||||
|
||||
$stmt="SELECT full_name from vicidial_users where user='$user';";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$full_name = $row[0];
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
?>
|
||||
<html>
|
||||
<head>
|
||||
<title>VICIDIAL RECORD CONFERENCE: 1 hour</title>
|
||||
</head>
|
||||
<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0>
|
||||
<CENTER>
|
||||
|
||||
<?
|
||||
if ($NEW_RECORDING)
|
||||
{
|
||||
if ( (strlen($server_ip) > 8) && (strlen($session_id) > 3) && (strlen($station) > 3) )
|
||||
{
|
||||
$local_DEF = 'Local/';
|
||||
$local_AMP = '@';
|
||||
$conf_silent_prefix = '7';
|
||||
$ext_context = 'demo';
|
||||
|
||||
$stmt="INSERT INTO vicidial_manager values('','','$MYSQL_datetime','NEW','N','$server_ip','','Originate','RB$FILE_datetime$station','Channel: $local_DEF$conf_silent_prefix$session_id$local_AMP$ext_context','Context: $ext_context','Exten: 8309','Priority: 1','Callerid: $FILE_datetime$station','','','','','')";
|
||||
echo "|$stmt|\n<BR><BR>\n";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
|
||||
$stmt="INSERT INTO recording_log (channel,server_ip,extension,start_time,start_epoch,filename) values('$session_id','$server_ip','$station','$MYSQL_datetime','$secX','$FILE_datetime$station')";
|
||||
echo "|$stmt|\n<BR><BR>\n";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
|
||||
echo "Recording started\n<BR><BR>\n";
|
||||
echo "<a href=\"$PHP_SELF\">Back to main recording screen</a>\n<BR><BR>\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "ERROR!!!! Not all info entered properly\n<BR><BR>\n";
|
||||
echo "|$server_ip| |$session_id| |$station|\n<BR><BR>\n";
|
||||
echo "<a href=\"$PHP_SELF\">Back to main recording screen</a>\n<BR><BR>\n";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "<br>Start recording a conference for 1 hour: <form action=$PHP_SELF method=POST>\n";
|
||||
echo "<input type=hidden name=NEW_RECORDING value=1>\n";
|
||||
echo "server_ip: <input type=text name=server_ip size=15 maxlength=15> | \n";
|
||||
echo "session_id: <input type=text name=session_id size=7 maxlength=7> | \n";
|
||||
echo "station: <input type=text name=station size=5 maxlength=5> | \n";
|
||||
echo "<input type=submit name=submit value=submit>\n";
|
||||
echo "<BR><BR><BR>\n";
|
||||
|
||||
|
||||
|
||||
}
|
||||
?>
|
||||
|
||||
</BODY></HTML>
|
||||
@@ -1,279 +0,0 @@
|
||||
<?
|
||||
|
||||
require("dbconnect.php");
|
||||
|
||||
##### depricated
|
||||
#require_once("htglobalize.php");
|
||||
|
||||
$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER'];
|
||||
$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW'];
|
||||
$PHP_SELF=$_SERVER['PHP_SELF'];
|
||||
$address1=$_GET["address1"]; if (!$address1) {$address1=$_POST["address1"];}
|
||||
$address2=$_GET["address2"]; if (!$address2) {$address2=$_POST["address2"];}
|
||||
$address3=$_GET["address3"]; if (!$address3) {$address3=$_POST["address3"];}
|
||||
$alt_phone=$_GET["alt_phone"]; if (!$alt_phone) {$alt_phone=$_POST["alt_phone"];}
|
||||
$call_began=$_GET["call_began"]; if (!$call_began) {$call_began=$_POST["call_began"];}
|
||||
$campaign_id=$_GET["campaign_id"]; if (!$campaign_id) {$campaign_id=$_POST["campaign_id"];}
|
||||
$channel=$_GET["channel"]; if (!$channel) {$channel=$_POST["channel"];}
|
||||
$channel_group=$_GET["channel_group"]; if (!$channel_group) {$channel_group=$_POST["channel_group"];}
|
||||
$city=$_GET["city"]; if (!$city) {$city=$_POST["city"];}
|
||||
$comments=$_GET["comments"]; if (!$comments) {$comments=$_POST["comments"];}
|
||||
$country_code=$_GET["country_code"]; if (!$country_code) {$country_code=$_POST["country_code"];}
|
||||
$customer_zap_channel=$_GET["customer_zap_channel"]; if (!$customer_zap_channel) {$customer_zap_channel=$_POST["customer_zap_channel"];}
|
||||
$DB=$_GET["DB"]; if (!$DB) {$DB=$_POST["DB"];}
|
||||
$dispo=$_GET["dispo"]; if (!$dispo) {$dispo=$_POST["dispo"];}
|
||||
$email=$_GET["email"]; if (!$email) {$email=$_POST["email"];}
|
||||
$end_call=$_GET["end_call"]; if (!$end_call) {$end_call=$_POST["end_call"];}
|
||||
$extension=$_GET["extension"]; if (!$extension) {$extension=$_POST["extension"];}
|
||||
$first_name=$_GET["first_name"]; if (!$first_name) {$first_name=$_POST["first_name"];}
|
||||
$group=$_GET["group"]; if (!$group) {$group=$_POST["group"];}
|
||||
$last_name=$_GET["last_name"]; if (!$last_name) {$last_name=$_POST["last_name"];}
|
||||
$lead_id=$_GET["lead_id"]; if (!$lead_id) {$lead_id=$_POST["lead_id"];}
|
||||
$list_id=$_GET["list_id"]; if (!$list_id) {$list_id=$_POST["list_id"];}
|
||||
$parked_time=$_GET["parked_time"]; if (!$parked_time) {$parked_time=$_POST["parked_time"];}
|
||||
$pass=$_GET["pass"]; if (!$pass) {$pass=$_POST["pass"];}
|
||||
$phone_code=$_GET["phone_code"]; if (!$phone_code) {$phone_code=$_POST["phone_code"];}
|
||||
$phone_number=$_GET["phone_number"]; if (!$phone_number) {$phone_number=$_POST["phone_number"];}
|
||||
$phone=$_GET["phone"]; if (!$phone) {$phone=$_POST["phone"];}
|
||||
$postal_code=$_GET["postal_code"]; if (!$postal_code) {$postal_code=$_POST["postal_code"];}
|
||||
$province=$_GET["province"]; if (!$province) {$province=$_POST["province"];}
|
||||
$security=$_GET["security"]; if (!$security) {$security=$_POST["security"];}
|
||||
$server_ip=$_GET["server_ip"]; if (!$server_ip) {$server_ip=$_POST["server_ip"];}
|
||||
$server_ip=$_GET["server_ip"]; if (!$server_ip) {$server_ip=$_POST["server_ip"];}
|
||||
$session_id=$_GET["session_id"]; if (!$session_id) {$session_id=$_POST["session_id"];}
|
||||
$state=$_GET["state"]; if (!$state) {$state=$_POST["state"];}
|
||||
$status=$_GET["status"]; if (!$status) {$status=$_POST["status"];}
|
||||
$tsr=$_GET["tsr"]; if (!$tsr) {$tsr=$_POST["tsr"];}
|
||||
$user=$_GET["user"]; if (!$user) {$user=$_POST["user"];}
|
||||
$vendor_id=$_GET["vendor_id"]; if (!$vendor_id) {$vendor_id=$_POST["vendor_id"];}
|
||||
$submit=$_GET["submit"]; if (!$submit) {$submit=$_POST["submit"];}
|
||||
$SUBMIT=$_GET["SUBMIT"]; if (!$SUBMIT) {$SUBMIT=$_POST["SUBMIT"];}
|
||||
|
||||
### AST GUI database administration
|
||||
### remote_dispo.php
|
||||
|
||||
# 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
|
||||
|
||||
|
||||
$STARTtime = date("U");
|
||||
$TODAY = date("Y-m-d");
|
||||
$NOW_TIME = date("Y-m-d H:i:s");
|
||||
$FILE_datetime = $STARTtime;
|
||||
|
||||
$ext_context = 'demo';
|
||||
if (!$begin_date) {$begin_date = $TODAY;}
|
||||
if (!$end_date) {$end_date = $TODAY;}
|
||||
|
||||
#$link=mysql_connect("localhost", "cron", "1234");
|
||||
#mysql_select_db("asterisk");
|
||||
|
||||
$stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 2;";
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$auth=$row[0];
|
||||
|
||||
$fp = fopen ("./project_auth_entries.txt", "a");
|
||||
$date = date("r");
|
||||
$ip = getenv("REMOTE_ADDR");
|
||||
$browser = getenv("HTTP_USER_AGENT");
|
||||
|
||||
if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or (!$auth))
|
||||
{
|
||||
Header("WWW-Authenticate: Basic realm=\"VICIDIAL-CLOSER\"");
|
||||
Header("HTTP/1.0 401 Unauthorized");
|
||||
echo "Invalid Username/Password: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n";
|
||||
exit;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
if($auth>0)
|
||||
{
|
||||
$office_no=strtoupper($PHP_AUTH_USER);
|
||||
$password=strtoupper($PHP_AUTH_PW);
|
||||
$stmt="SELECT full_name from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW'";
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$LOGfullname=$row[0];
|
||||
$fullname = $row[0];
|
||||
fwrite ($fp, "VD_CLOSER|GOOD|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|$LOGfullname|\n");
|
||||
fclose($fp);
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
fwrite ($fp, "VD_CLOSER|FAIL|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|\n");
|
||||
fclose($fp);
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
<html>
|
||||
<head>
|
||||
<title>VICIDIAL REMOTE: Call Disposition</title>
|
||||
</head>
|
||||
<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0>
|
||||
<CENTER><FONT FACE="Courier" COLOR=BLACK SIZE=3>
|
||||
|
||||
<?
|
||||
|
||||
echo "<!-- $call_began $lead_id -->";
|
||||
|
||||
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='$call_length', status='$status', user='$PHP_AUTH_USER' where lead_id='$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='$status',first_name='$first_name',last_name='$last_name',address1='$address1',address2='$address2',address3='$address3',city='$city',state='$state',province='$province',postal_code='$postal_code',country_code='$country_code',alt_phone='$alt_phone',email='$email',security_phrase='$security',comments='$comments',user='$PHP_AUTH_USER' where lead_id='$lead_id'";
|
||||
if ($DB) {echo "|$stmt|\n";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
|
||||
echo "Call has been dispositioned $NOW_TIME\n<BR><BR>\n";
|
||||
|
||||
echo "<form><input type=button value=\"Close This Window\" onClick=\"javascript:window.close();\"></form>\n";
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
$stmt="SELECT count(*) from vicidial_list where lead_id='$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='$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 "<br>Call information: $first_name $last_name - $phone_number<br><br><form action=$PHP_SELF method=POST>\n";
|
||||
echo "<input type=hidden name=end_call value=1>\n";
|
||||
echo "<input type=hidden name=DB value=\"$DB\">\n";
|
||||
echo "<input type=hidden name=lead_id value=\"$lead_id\">\n";
|
||||
echo "<input type=hidden name=list_id value=\"$list_id\">\n";
|
||||
echo "<input type=hidden name=campaign_id value=\"$campaign_id\">\n";
|
||||
echo "<input type=hidden name=phone_code value=\"$phone_code\">\n";
|
||||
echo "<input type=hidden name=phone_number value=\"$phone_number\">\n";
|
||||
echo "<input type=hidden name=server_ip value=\"$server_ip\">\n";
|
||||
echo "<input type=hidden name=extension value=\"$extension\">\n";
|
||||
echo "<input type=hidden name=channel value=\"$channel\">\n";
|
||||
echo "<input type=hidden name=call_began value=\"$call_began\">\n";
|
||||
echo "<input type=hidden name=parked_time value=\"$parked_time\">\n";
|
||||
echo "<table cellpadding=1 cellspacing=0>\n";
|
||||
echo "<tr><td colspan=2>Vendor ID: $vendor_id Campaign ID: $campaign_id</td></tr>\n";
|
||||
echo "<tr><td colspan=2>Fronter: $tsr List ID: $list_id</td></tr>\n";
|
||||
echo "<tr><td align=right>First Name: </td><td align=left><input type=text name=first_name size=15 maxlength=30 value=\"$first_name\"> \n";
|
||||
echo " Last Name: <input type=text name=last_name size=15 maxlength=30 value=\"$last_name\"> </td></tr>\n";
|
||||
echo "<tr><td align=right>Address 1 : </td><td align=left><input type=text name=address1 size=30 maxlength=30 value=\"$address1\"></td></tr>\n";
|
||||
echo "<tr><td align=right>Address 2 : </td><td align=left><input type=text name=address2 size=30 maxlength=30 value=\"$address2\"></td></tr>\n";
|
||||
echo "<tr><td align=right>Address 3 : </td><td align=left><input type=text name=address3 size=30 maxlength=30 value=\"$address3\"></td></tr>\n";
|
||||
echo "<tr><td align=right>City : </td><td align=left><input type=text name=city size=30 maxlength=30 value=\"$city\"></td></tr>\n";
|
||||
echo "<tr><td align=right>State: </td><td align=left><input type=text name=state size=2 maxlength=2 value=\"$state\"> \n";
|
||||
echo " Postal Code: <input type=text name=postal_code size=10 maxlength=10 value=\"$postal_code\"> </td></tr>\n";
|
||||
|
||||
echo "<tr><td align=right>Province : </td><td align=left><input type=text name=province size=30 maxlength=30 value=\"$province\"></td></tr>\n";
|
||||
echo "<tr><td align=right>Country : </td><td align=left><input type=text name=country_code size=3 maxlength=3 value=\"$country_code\"></td></tr>\n";
|
||||
echo "<tr><td align=right>Alt Phone : </td><td align=left><input type=text name=alt_phone size=10 maxlength=10 value=\"$alt_phone\"></td></tr>\n";
|
||||
echo "<tr><td align=right>Email : </td><td align=left><input type=text name=email size=30 maxlength=50 value=\"$email\"></td></tr>\n";
|
||||
echo "<tr><td align=right>Security : </td><td align=left><input type=text name=security size=30 maxlength=100 value=\"$security\"></td></tr>\n";
|
||||
echo "<tr><td align=right>Comments : </td><td align=left><input type=text name=comments size=30 maxlength=255 value=\"$comments\"></td></tr>\n";
|
||||
echo "<tr bgcolor=#B6D3FC><td align=right>Disposition: </td><td align=left><select size=1 name=status>\n";
|
||||
|
||||
$stmt="SELECT * from vicidial_statuses where selectable='Y' order by status";
|
||||
$rsltx=mysql_query($stmt, $link);
|
||||
$statuses_to_print = mysql_num_rows($rsltx);
|
||||
$statuses_list='';
|
||||
|
||||
$o=0;
|
||||
while ($statuses_to_print > $o) {
|
||||
$rowx=mysql_fetch_row($rsltx);
|
||||
$statuses_list .= "<option value=\"$rowx[0]\">$rowx[0] - $rowx[1]</option>\n";
|
||||
$o++;
|
||||
}
|
||||
echo "$statuses_list";
|
||||
echo "</select></td></tr>\n";
|
||||
|
||||
|
||||
echo "<tr><td colspan=2><input type=submit name=submit value=\"DISPO CALL\"></td></tr>\n";
|
||||
echo "</table></form>\n";
|
||||
echo "<BR><BR><BR>\n";
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "lead lookup FAILED for lead_id $lead_id $NOW_TIME\n<BR><BR>\n";
|
||||
# echo "<a href=\"$PHP_SELF\">Close this window</a>\n<BR><BR>\n";
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
$ENDtime = date("U");
|
||||
|
||||
$RUNtime = ($ENDtime - $STARTtime);
|
||||
|
||||
echo "\n\n\n<br><br><br>\n\n";
|
||||
|
||||
|
||||
echo "<font size=0>\n\n\n<br><br><br>\nscript runtime: $RUNtime seconds</font>";
|
||||
|
||||
|
||||
?>
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
<?
|
||||
|
||||
exit;
|
||||
|
||||
|
||||
|
||||
?>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,70 +0,0 @@
|
||||
<?
|
||||
require("dbconnect.php");
|
||||
|
||||
##### depricated
|
||||
#require_once("htglobalize.php");
|
||||
|
||||
# server_stats.php
|
||||
|
||||
$NOW_DATE = date("Y-m-d");
|
||||
$NOW_TIME = date("Y-m-d H:i:s");
|
||||
$STARTtime = date("U");
|
||||
if (!$query_date) {$query_date = $NOW_DATE;}
|
||||
|
||||
$stmt="select * from servers;";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$servers_to_print = mysql_num_rows($rslt);
|
||||
$i=0;
|
||||
while ($i < $servers_to_print)
|
||||
{
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$server_id[$i] = $row[0];
|
||||
$server_description[$i] = $row[1];
|
||||
$server_ip[$i] = $row[2];
|
||||
$active[$i] = $row[3];
|
||||
$i++;
|
||||
}
|
||||
?>
|
||||
|
||||
<HTML>
|
||||
<HEAD>
|
||||
|
||||
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
|
||||
<TITLE>VICIDIAL: Server Stats and Reports</TITLE></HEAD><BODY BGCOLOR=WHITE>
|
||||
<FONT SIZE=2>
|
||||
<H1>VICIDIAL: Server Stats and Reports</H1>
|
||||
<UL>
|
||||
<LI><a href="AST_timeonVDADall.php"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=2>TIME ON VDAD (per campaign)</a></FONT>
|
||||
<LI><a href="AST_parkstats.php"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=2>PARK REPORT</a></FONT>
|
||||
<LI><a href="AST_VDADstats.php"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=2>VDAD REPORT</a></FONT>
|
||||
<LI><a href="AST_CLOSERstats.php"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=2>CLOSER REPORT</a></FONT>
|
||||
<LI><a href="AST_agent_performance.php"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=2>AGENT PERFORMANCE</a></FONT>
|
||||
<LI><a href="AST_agent_performance_detail.php"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=2>AGENT PERFORMANCE DETAIL</a></FONT>
|
||||
<LI><a href="AST_server_performance.php"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=2>SERVER PERFORMANCE</a></FONT>
|
||||
</UL>
|
||||
|
||||
<PRE><TABLE BORDER=1>
|
||||
<TR><TD>SERVER</TD><TD>DESCRIPTION</TD><TD>IP ADDRESS</TD><TD>ACTIVE</TD><TD>VDAD time</TD><TD>VDcall time</TD><TD>PARK time</TD><TD>CLOSER/INBOUND time</TD></TR>
|
||||
<?
|
||||
|
||||
$o=0;
|
||||
while ($servers_to_print > $o)
|
||||
{
|
||||
echo "<TR>\n";
|
||||
echo "<TD>$server_id[$o]</TD>\n";
|
||||
echo "<TD>$server_description[$o]</TD>\n";
|
||||
echo "<TD>$server_ip[$o]</TD>\n";
|
||||
echo "<TD>$active[$o]</TD>\n";
|
||||
echo "<TD><a href=\"AST_timeonVDAD.php?server_ip=$server_ip[$o]\">LINK</a></TD>\n";
|
||||
echo "<TD><a href=\"AST_timeoncall.php?server_ip=$server_ip[$o]\">LINK</a></TD>\n";
|
||||
echo "<TD><a href=\"AST_timeonpark.php?server_ip=$server_ip[$o]\">LINK</a></TD>\n";
|
||||
echo "<TD><a href=\"AST_timeonVDAD_closer.php?server_ip=$server_ip[$o]\">LINK</a></TD>\n";
|
||||
echo "</TR>\n";
|
||||
$o++;
|
||||
}
|
||||
|
||||
?>
|
||||
</TABLE>
|
||||
|
||||
</BODY></HTML>
|
||||
@@ -1,302 +0,0 @@
|
||||
<?
|
||||
header ("Content-type: text/html; charset=utf-8");
|
||||
|
||||
require("dbconnect.php");
|
||||
|
||||
##### depricated
|
||||
#require_once("htglobalize.php");
|
||||
|
||||
$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER'];
|
||||
$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW'];
|
||||
$PHP_SELF=$_SERVER['PHP_SELF'];
|
||||
$begin_date=$_GET["begin_date"]; if (!$begin_date) {$begin_date=$_POST["begin_date"];}
|
||||
$end_date=$_GET["end_date"]; if (!$end_date) {$end_date=$_POST["end_date"];}
|
||||
$user=$_GET["user"]; if (!$user) {$user=$_POST["user"];}
|
||||
$submit=$_GET["submit"]; if (!$submit) {$submit=$_POST["submit"];}
|
||||
$SUBMIT=$_GET["SUBMIT"]; if (!$SUBMIT) {$SUBMIT=$_POST["SUBMIT"];}
|
||||
|
||||
### AST GUI vicidial user stats
|
||||
### user_stats.php
|
||||
|
||||
$STARTtime = date("U");
|
||||
$TODAY = date("Y-m-d");
|
||||
|
||||
if (!$begin_date) {$begin_date = $TODAY;}
|
||||
if (!$end_date) {$end_date = $TODAY;}
|
||||
|
||||
$stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 7;";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$auth=$row[0];
|
||||
|
||||
$fp = fopen ("./project_auth_entries.txt", "a");
|
||||
$date = date("r");
|
||||
$ip = getenv("REMOTE_ADDR");
|
||||
$browser = getenv("HTTP_USER_AGENT");
|
||||
|
||||
if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or (!$auth))
|
||||
{
|
||||
Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\"");
|
||||
Header("HTTP/1.0 401 Unauthorized");
|
||||
echo "Invalid Username/Password: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n";
|
||||
exit;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
if($auth>0)
|
||||
{
|
||||
$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];
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
?>
|
||||
<html>
|
||||
<head>
|
||||
<title>VICIDIAL ADMIN: User Stats</title>
|
||||
</head>
|
||||
<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0>
|
||||
<CENTER>
|
||||
<TABLE WIDTH=620 BGCOLOR=#D9E6FE cellpadding=2 cellspacing=0><TR BGCOLOR=#015B91><TD ALIGN=LEFT><FONT FACE="ARIAL,HELVETICA" COLOR=WHITE SIZE=2><B> VICIDIAL ADMIN: User Stats for <? echo $user ?></TD><TD ALIGN=RIGHT><FONT FACE="ARIAL,HELVETICA" COLOR=WHITE SIZE=2><B><? echo date("l F j, Y G:i:s A") ?> </TD></TR>
|
||||
|
||||
|
||||
|
||||
|
||||
<?
|
||||
|
||||
echo "<TR BGCOLOR=\"#F0F5FE\"><TD ALIGN=LEFT COLSPAN=2><FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2><B> \n";
|
||||
|
||||
echo "<form action=$PHP_SELF method=POST>\n";
|
||||
echo "<input type=hidden name=user value=\"$user\">\n";
|
||||
echo "<input type=text name=begin_date value=\"$begin_date\" size=10 maxsize=10> to \n";
|
||||
echo "<input type=text name=end_date value=\"$end_date\" size=10 maxsize=10> \n";
|
||||
echo "<input type=submit name=submit value=submit>\n";
|
||||
|
||||
|
||||
echo " $user - $full_name\n";
|
||||
|
||||
echo "</B></TD></TR>\n";
|
||||
echo "<TR><TD ALIGN=LEFT COLSPAN=2>\n";
|
||||
|
||||
|
||||
$stmt="SELECT count(*),status, sum(length_in_sec) from vicidial_log where user='$user' and call_date >= '$begin_date 0:00:01' and call_date <= '$end_date 23:59:59' group by status order by status";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
$statuses_to_print = mysql_num_rows($rslt);
|
||||
|
||||
echo "<br><center>\n";
|
||||
|
||||
echo "<B>TALK TIME AND STATUS:</B>\n";
|
||||
|
||||
echo "<center><TABLE width=300 cellspacing=0 cellpadding=1>\n";
|
||||
echo "<tr><td><font size=2>STATUS</td><td align=right><font size=2>COUNT</td><td align=right><font size=2>HOURS:MINUTES</td></tr>\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 "<tr $bgcolor><td><font size=2>$row[1]</td>";
|
||||
echo "<td align=right><font size=2> $row[0]</td>\n";
|
||||
echo "<td align=right><font size=2> $call_hours_int:$call_minutes_int</td></tr>\n";
|
||||
$total_calls = ($total_calls + $row[0]);
|
||||
|
||||
$call_seconds=0;
|
||||
$o++;
|
||||
}
|
||||
|
||||
$stmt="SELECT sum(length_in_sec) from vicidial_log where user='$user' and call_date >= '$begin_date 0:00:01' and call_date <= '$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 "<tr><td><font size=2>TOTAL CALLS </td><td align=right><font size=2> $total_calls</td><td align=right><font size=2> $call_hours_int:$call_minutes_int</td></tr>\n";
|
||||
echo "</TABLE></center>\n";
|
||||
echo "<br><br>\n";
|
||||
|
||||
echo "<center>\n";
|
||||
|
||||
echo "<B>LOGIN/LOGOUT TIME:</B>\n";
|
||||
echo "<TABLE width=400 cellspacing=0 cellpadding=1>\n";
|
||||
echo "<tr><td><font size=2>EVENT </td><td align=right><font size=2> DATE</td><td align=right><font size=2> CAMPAIGN</td><td align=right><font size=2>HOURS:MINUTES</td></tr>\n";
|
||||
|
||||
$stmt="SELECT event,event_epoch,event_date,campaign_id from vicidial_user_log where user='$user' and event_date >= '$begin_date 0:00:01' and event_date <= '$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 "<tr $bgcolor><td><font size=2>$row[0]</td>";
|
||||
echo "<td align=right><font size=2> $row[2]</td>\n";
|
||||
echo "<td align=right><font size=2> $row[3]</td>\n";
|
||||
echo "<td align=right><font size=2> </td></tr>\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 "<tr $bgcolor><td><font size=2>$row[0]</td>";
|
||||
echo "<td align=right><font size=2> $row[2]</td>\n";
|
||||
echo "<td align=right><font size=2> $row[3]</td>\n";
|
||||
echo "<td align=right><font size=2> $event_hours_int:$event_minutes_int</td></tr>\n";
|
||||
$event_start_seconds='';
|
||||
$event_stop_seconds='';
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "<tr $bgcolor><td><font size=2>$row[0]</td>";
|
||||
echo "<td align=right><font size=2> $row[2]</td>\n";
|
||||
echo "<td align=right><font size=2> $row[3]</td>\n";
|
||||
echo "<td align=right><font size=2> </td></tr>\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 "<tr><td><font size=2>TOTAL</td>";
|
||||
echo "<td align=right><font size=2> </td>\n";
|
||||
echo "<td align=right><font size=2> </td>\n";
|
||||
echo "<td align=right><font size=2> $total_login_hours_int:$total_login_minutes_int</td></tr>\n";
|
||||
|
||||
echo "</TABLE></center>\n";
|
||||
|
||||
|
||||
echo "<br><br>\n";
|
||||
|
||||
echo "<center>\n";
|
||||
|
||||
echo "<B>LAST 50 CALLS:</B>\n";
|
||||
echo "<TABLE width=550 cellspacing=0 cellpadding=1>\n";
|
||||
echo "<tr><td><font size=2>DATE/TIME </td><td align=left><font size=2>LENGTH</td><td align=left><font size=2> STATUS</td><td align=left><font size=2> PHONE</td><td align=right><font size=2> CAMPAIGN</td><td align=right><font size=2> LIST</td><td align=right><font size=2> LEAD</td></tr>\n";
|
||||
|
||||
$stmt="select * from vicidial_log where user='$user' order by uniqueid desc limit 50;";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
$logs_to_print = mysql_num_rows($rslt);
|
||||
|
||||
$u=0;
|
||||
while ($logs_to_print > $u) {
|
||||
$row=mysql_fetch_row($rslt);
|
||||
if (eregi("1$|3$|5$|7$|9$", $u))
|
||||
{$bgcolor='bgcolor="#B9CBFD"';}
|
||||
else
|
||||
{$bgcolor='bgcolor="#9BB9FB"';}
|
||||
|
||||
echo "<tr $bgcolor><td><font size=2>$row[4]</td>";
|
||||
echo "<td align=left><font size=2> $row[7]</td>\n";
|
||||
echo "<td align=left><font size=2> $row[8]</td>\n";
|
||||
echo "<td align=left><font size=2> $row[10] </td>\n";
|
||||
echo "<td align=right><font size=2> $row[3] </td>\n";
|
||||
echo "<td align=right><font size=2> $row[2] </td>\n";
|
||||
echo "<td align=right><font size=2> <A HREF=\"admin_modify_lead.php?lead_id=$row[1]\" target=\"_blank\">$row[1]</A> </td></tr>\n";
|
||||
|
||||
$u++;
|
||||
}
|
||||
|
||||
|
||||
echo "</TABLE></center>\n";
|
||||
|
||||
|
||||
$ENDtime = date("U");
|
||||
|
||||
$RUNtime = ($ENDtime - $STARTtime);
|
||||
|
||||
echo "\n\n\n<br><br><br>\n\n";
|
||||
|
||||
|
||||
echo "<font size=0>\n\n\n<br><br><br>\nscript runtime: $RUNtime seconds</font>";
|
||||
|
||||
|
||||
?>
|
||||
|
||||
|
||||
</TD></TR><TABLE>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
<?
|
||||
|
||||
exit;
|
||||
|
||||
|
||||
|
||||
?>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,223 +0,0 @@
|
||||
<?
|
||||
### user_status.php
|
||||
###
|
||||
### Copyright (C) 2006 Matt Florell <vicidial@gmail.com> LICENSE: GPLv2
|
||||
###
|
||||
|
||||
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'];
|
||||
$begin_date=$_GET["begin_date"]; if (!$begin_date) {$begin_date=$_POST["begin_date"];}
|
||||
$end_date=$_GET["end_date"]; if (!$end_date) {$end_date=$_POST["end_date"];}
|
||||
$user=$_GET["user"]; if (!$user) {$user=$_POST["user"];}
|
||||
$group=$_GET["group"]; if (!$group) {$group=$_POST["group"];}
|
||||
$stage=$_GET["stage"]; if (!$stage) {$stage=$_POST["stage"];}
|
||||
$submit=$_GET["submit"]; if (!$submit) {$submit=$_POST["submit"];}
|
||||
$SUBMIT=$_GET["SUBMIT"]; if (!$SUBMIT) {$SUBMIT=$_POST["SUBMIT"];}
|
||||
|
||||
$STARTtime = date("U");
|
||||
$TODAY = date("Y-m-d");
|
||||
|
||||
if (!$begin_date) {$begin_date = $TODAY;}
|
||||
if (!$end_date) {$end_date = $TODAY;}
|
||||
|
||||
$stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 7;";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$auth=$row[0];
|
||||
|
||||
$fp = fopen ("./project_auth_entries.txt", "a");
|
||||
$date = date("r");
|
||||
$ip = getenv("REMOTE_ADDR");
|
||||
$browser = getenv("HTTP_USER_AGENT");
|
||||
|
||||
if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or (!$auth))
|
||||
{
|
||||
Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\"");
|
||||
Header("HTTP/1.0 401 Unauthorized");
|
||||
echo "Invalid Username/Password: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n";
|
||||
exit;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
if($auth>0)
|
||||
{
|
||||
$office_no=strtoupper($PHP_AUTH_USER);
|
||||
$password=strtoupper($PHP_AUTH_PW);
|
||||
$stmt="SELECT full_name,change_agent_campaign from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW'";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$LOGfullname=$row[0];
|
||||
$change_agent_campaign=$row[1];
|
||||
fwrite ($fp, "VICIDIAL|GOOD|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|$LOGfullname|\n");
|
||||
fclose($fp);
|
||||
}
|
||||
else
|
||||
{
|
||||
fwrite ($fp, "VICIDIAL|FAIL|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|\n");
|
||||
fclose($fp);
|
||||
}
|
||||
|
||||
$stmt="SELECT full_name from vicidial_users where user='$user';";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$full_name = $row[0];
|
||||
|
||||
$stmt="SELECT * from vicidial_live_agents where user='$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++;
|
||||
}
|
||||
|
||||
|
||||
|
||||
?>
|
||||
<html>
|
||||
<head>
|
||||
<title>VICIDIAL ADMIN: User Status</title>
|
||||
</head>
|
||||
<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0>
|
||||
<CENTER>
|
||||
<TABLE WIDTH=620 BGCOLOR=#D9E6FE cellpadding=2 cellspacing=0><TR BGCOLOR=#015B91><TD ALIGN=LEFT><FONT FACE="ARIAL,HELVETICA" COLOR=WHITE SIZE=2><B> VICIDIAL ADMIN: User Status for <? echo $user ?></TD><TD ALIGN=RIGHT><FONT FACE="ARIAL,HELVETICA" COLOR=WHITE SIZE=2><B><? echo date("l F j, Y G:i:s A") ?> </TD></TR>
|
||||
|
||||
|
||||
|
||||
|
||||
<?
|
||||
|
||||
echo "<TR BGCOLOR=\"#F0F5FE\"><TD ALIGN=LEFT COLSPAN=2><FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=3><B> \n";
|
||||
|
||||
if ($stage == "live_campaign_change")
|
||||
{
|
||||
$stmt="UPDATE vicidial_live_agents set campaign_id='$group' where user='$user';";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
|
||||
echo "Agent $user - $full_name changed to $group campaign<BR>\n";
|
||||
|
||||
exit;
|
||||
}
|
||||
|
||||
if ($stage == "log_agent_out")
|
||||
{
|
||||
$stmt="DELETE from vicidial_live_agents where user='$user';";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
|
||||
echo "Agent $user - $full_name has been emergency logged out, make sure they close their web browser<BR>\n";
|
||||
|
||||
exit;
|
||||
}
|
||||
|
||||
if ($agents_to_print > 0)
|
||||
{
|
||||
echo "<PRE>";
|
||||
echo "Agent Logged in at server: $Aserver_ip\n";
|
||||
echo " in session: $Asession_id\n";
|
||||
echo " from phone: $Aextension\n";
|
||||
echo "Agent is in campaign: $Acampaign\n";
|
||||
echo " status: $Astatus\n";
|
||||
echo " hungup last call at: $Alast_call\n";
|
||||
echo " Closer groups: $Acl_campaigns\n\n";
|
||||
|
||||
echo "</PRE>";
|
||||
|
||||
|
||||
if ($change_agent_campaign > 0)
|
||||
{
|
||||
echo "<form action=$PHP_SELF method=POST>\n";
|
||||
echo "<input type=hidden name=user value=\"$user\">\n";
|
||||
echo "<input type=hidden name=stage value=\"live_campaign_change\">\n";
|
||||
echo "Current Campaign: <SELECT SIZE=1 NAME=group>\n";
|
||||
$o=0;
|
||||
while ($groups_to_print > $o)
|
||||
{
|
||||
if ($groups[$o] == "$Acampaign") {echo "<option selected value=\"$groups[$o]\">$groups[$o]</option>\n";}
|
||||
else {echo "<option value=\"$groups[$o]\">$groups[$o]</option>\n";}
|
||||
$o++;
|
||||
}
|
||||
echo "</SELECT>\n";
|
||||
echo "<input type=submit name=submit value=CHANGE><BR></form>\n";
|
||||
|
||||
|
||||
echo "<form action=$PHP_SELF method=POST>\n";
|
||||
echo "<input type=hidden name=user value=\"$user\">\n";
|
||||
echo "<input type=hidden name=stage value=\"log_agent_out\">\n";
|
||||
echo "<input type=submit name=submit value=\"EMERGENCY LOG AGENT OUT\"><BR></form>\n";
|
||||
}
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
echo "Agent is not logged in\n<BR>";
|
||||
|
||||
}
|
||||
|
||||
|
||||
echo " $user - $full_name - \n";
|
||||
|
||||
echo "<a href=\"./AST_agent_time_sheet.php?agent=$user\">VICIDIAL Time Sheet</a>\n";
|
||||
|
||||
echo "</B></TD></TR>\n";
|
||||
echo "<TR><TD ALIGN=LEFT COLSPAN=2>\n";
|
||||
|
||||
|
||||
$ENDtime = date("U");
|
||||
|
||||
$RUNtime = ($ENDtime - $STARTtime);
|
||||
|
||||
echo "\n\n\n<br><br><br>\n\n";
|
||||
|
||||
|
||||
echo "<font size=0>\n\n\n<br><br><br>\nscript runtime: $RUNtime seconds</font>";
|
||||
|
||||
echo "|$stage|$group|";
|
||||
|
||||
?>
|
||||
|
||||
|
||||
</TD></TR><TABLE>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
<?
|
||||
|
||||
exit;
|
||||
|
||||
|
||||
|
||||
?>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,584 +0,0 @@
|
||||
<?
|
||||
|
||||
require("dbconnect.php");
|
||||
|
||||
##### depricated
|
||||
#require_once("htglobalize.php");
|
||||
|
||||
$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER'];
|
||||
$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW'];
|
||||
$PHP_SELF=$_SERVER['PHP_SELF'];
|
||||
$ADD=$_GET["ADD"]; if (!$ADD) {$ADD=$_POST["ADD"];}
|
||||
$DB=$_GET["DB"]; if (!$DB) {$DB=$_POST["DB"];}
|
||||
$user=$_GET["user"]; if (!$user) {$user=$_POST["user"];}
|
||||
$force_logout=$_GET["force_logout"]; if (!$force_logout) {$force_logout=$_POST["force_logout"];}
|
||||
$groups=$_GET["groups"]; if (!$groups) {$groups=$_POST["groups"];}
|
||||
$remote_agent_id=$_GET["remote_agent_id"]; if (!$remote_agent_id) {$remote_agent_id=$_POST["remote_agent_id"];}
|
||||
$user_start=$_GET["user_start"]; if (!$user_start) {$user_start=$_POST["user_start"];}
|
||||
$number_of_lines=$_GET["number_of_lines"]; if (!$number_of_lines) {$number_of_lines=$_POST["number_of_lines"];}
|
||||
$server_ip=$_GET["server_ip"]; if (!$server_ip) {$server_ip=$_POST["server_ip"];}
|
||||
$conf_exten=$_GET["conf_exten"]; if (!$conf_exten) {$conf_exten=$_POST["conf_exten"];}
|
||||
$status=$_GET["status"]; if (!$status) {$status=$_POST["status"];}
|
||||
$campaign_id=$_GET["campaign_id"]; if (!$campaign_id) {$campaign_id=$_POST["campaign_id"];}
|
||||
$groups=$_GET["groups"]; if (!$groups) {$groups=$_POST["groups"];}
|
||||
|
||||
$submit=$_GET["submit"]; if (!$submit) {$submit=$_POST["submit"];}
|
||||
$SUBMIT=$_GET["SUBMIT"]; if (!$SUBMIT) {$SUBMIT=$_POST["SUBMIT"];}
|
||||
|
||||
### AST GUI remote users(not always phone'd in)
|
||||
### vdremote.php
|
||||
|
||||
### 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
|
||||
|
||||
### Changes
|
||||
### 50307-1721 - First version
|
||||
### 51123-1502 - removed requirement of PHP Globals=on
|
||||
###
|
||||
|
||||
if ($force_logout)
|
||||
{
|
||||
if( (strlen($PHP_AUTH_USER)>0) or (strlen($PHP_AUTH_PW)>0) )
|
||||
{
|
||||
Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\"");
|
||||
Header("HTTP/1.0 401 Unauthorized");
|
||||
}
|
||||
echo "You have now logged out. Thank you\n";
|
||||
exit;
|
||||
}
|
||||
|
||||
|
||||
$popup_page = './closer_popup.php';
|
||||
$version = '1.1.9';
|
||||
$build = '51123-1502';
|
||||
$STARTtime = date("U");
|
||||
$NOW_DATE = date("Y-m-d");
|
||||
$NOW_TIME = date("Y-m-d H:i:s");
|
||||
if (!$query_date) {$query_date = $NOW_DATE;}
|
||||
|
||||
$stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 3;";
|
||||
if ($DB) {echo "|$stmt|\n";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$auth=$row[0];
|
||||
|
||||
$fp = fopen ("./project_auth_entries.txt", "a");
|
||||
$date = date("r");
|
||||
$ip = getenv("REMOTE_ADDR");
|
||||
$browser = getenv("HTTP_USER_AGENT");
|
||||
|
||||
if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or (!$auth))
|
||||
{
|
||||
Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\"");
|
||||
Header("HTTP/1.0 401 Unauthorized");
|
||||
echo "Invalid Username/Password: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n";
|
||||
exit;
|
||||
}
|
||||
else
|
||||
{
|
||||
header ("Content-type: text/html; charset=utf-8");
|
||||
|
||||
if($auth>0)
|
||||
{
|
||||
$office_no=strtoupper($PHP_AUTH_USER);
|
||||
$password=strtoupper($PHP_AUTH_PW);
|
||||
$stmt="SELECT full_name from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW'";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$LOGfullname=$row[0];
|
||||
|
||||
$stmt="SELECT count(*) from vicidial_remote_agents where user_start='$PHP_AUTH_USER';";
|
||||
if ($DB) {echo "|$stmt|\n";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$authx=$row[0];
|
||||
|
||||
if($authx>0)
|
||||
{
|
||||
$stmt="SELECT remote_agent_id,server_ip,number_of_lines from vicidial_remote_agents where user_start='$PHP_AUTH_USER';";
|
||||
if ($DB) {echo "|$stmt|\n";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$remote_agent_id=$row[0];
|
||||
$server_ip=$row[1];
|
||||
if (!$number_of_lines) {$number_of_lines=$row[2];}
|
||||
|
||||
fwrite ($fp, "VDremote|GOOD|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|$LOGfullname|\n");
|
||||
fclose($fp);
|
||||
}
|
||||
else
|
||||
{
|
||||
fwrite ($fp, "VDremote|FAIL|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|$LOGfullname|\n");
|
||||
fclose($fp);
|
||||
echo "This remote agent does not exist: |$PHP_AUTH_USER|\n";
|
||||
exit;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
fwrite ($fp, "VDremote|FAIL|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|\n");
|
||||
fclose($fp);
|
||||
}
|
||||
}
|
||||
|
||||
echo "<html>\n";
|
||||
echo "<head>\n";
|
||||
if ($ADD==61111)
|
||||
{
|
||||
echo"<META HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html; charset=iso-8859-1\">\n";
|
||||
echo"<META HTTP-EQUIV=Refresh CONTENT=\"5; URL=$PHP_SELF?ADD=61111&user=$user&DB=$DB\">\n";
|
||||
}
|
||||
echo "<!-- VERSION: $version BUILD: $build -->\n";
|
||||
?>
|
||||
<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}
|
||||
.yellow {color: black; background-color: yellow}
|
||||
.orange {color: black; background-color: orange}
|
||||
-->
|
||||
</STYLE>
|
||||
<?
|
||||
echo "<title>VICIDIAL REMOTE AGENTS: $LOGfullname - $PHP_AUTH_USER ";
|
||||
|
||||
if (!$ADD) {$ADD="31111";}
|
||||
if ($ADD==31111) {echo "Modify Remote Agents";}
|
||||
if ($ADD==41111) {echo "Modify Remote Agents";}
|
||||
if ($ADD==61111) {echo "Remote Agent Status";}
|
||||
if ($ADD==71111) {echo "Remote Agent Closer Stats";}
|
||||
|
||||
|
||||
if (strlen($ADD)>4)
|
||||
{
|
||||
##### get server listing for dynamic pulldown
|
||||
$stmt="SELECT server_ip,server_description from servers order by server_ip";
|
||||
$rsltx=mysql_query($stmt, $link);
|
||||
$servers_to_print = mysql_num_rows($rsltx);
|
||||
$servers_list='';
|
||||
|
||||
$o=0;
|
||||
while ($servers_to_print > $o)
|
||||
{
|
||||
$rowx=mysql_fetch_row($rsltx);
|
||||
$servers_list .= "<option value=\"$rowx[0]\">$rowx[0] - $rowx[1]</option>\n";
|
||||
$o++;
|
||||
}
|
||||
|
||||
##### get campaigns listing for dynamic pulldown
|
||||
$stmt="SELECT campaign_id,campaign_name from vicidial_campaigns order by campaign_id";
|
||||
$rsltx=mysql_query($stmt, $link);
|
||||
$campaigns_to_print = mysql_num_rows($rsltx);
|
||||
$campaigns_list='';
|
||||
|
||||
$o=0;
|
||||
while ($campaigns_to_print > $o)
|
||||
{
|
||||
$rowx=mysql_fetch_row($rsltx);
|
||||
$campaigns_list .= "<option value=\"$rowx[0]\">$rowx[0] - $rowx[1]</option>\n";
|
||||
$o++;
|
||||
}
|
||||
|
||||
##### get inbound groups listing for checkboxes
|
||||
if ( (($ADD==31111) or ($ADD==31111)) and (count($groups)<1) )
|
||||
{
|
||||
$stmt="SELECT closer_campaigns from vicidial_remote_agents where remote_agent_id='$remote_agent_id';";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$closer_campaigns = $row[0];
|
||||
$closer_campaigns = preg_replace("/ -$/","",$closer_campaigns);
|
||||
$groups = explode(" ", $closer_campaigns);
|
||||
}
|
||||
|
||||
$stmt="SELECT group_id,group_name from vicidial_inbound_groups order by group_id";
|
||||
$rsltx=mysql_query($stmt, $link);
|
||||
$groups_to_print = mysql_num_rows($rsltx);
|
||||
$groups_list='';
|
||||
$groups_value='';
|
||||
|
||||
$o=0;
|
||||
while ($groups_to_print > $o)
|
||||
{
|
||||
$rowx=mysql_fetch_row($rsltx);
|
||||
$group_id_value = $rowx[0];
|
||||
$group_name_value = $rowx[1];
|
||||
$groups_list .= "<input type=\"checkbox\" name=\"groups[]\" value=\"$group_id_value\"";
|
||||
$p=0;
|
||||
while ($p<50)
|
||||
{
|
||||
if ($group_id_value == $groups[$p])
|
||||
{
|
||||
$groups_list .= " CHECKED";
|
||||
$groups_value .= " $group_id_value";
|
||||
}
|
||||
$p++;
|
||||
}
|
||||
$groups_list .= "> $group_id_value - $group_name_value<BR>\n";
|
||||
$o++;
|
||||
}
|
||||
if (strlen($groups_value)>2) {$groups_value .= " -";}
|
||||
}
|
||||
|
||||
?>
|
||||
</title>
|
||||
</head>
|
||||
<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0>
|
||||
<CENTER>
|
||||
<TABLE WIDTH=620 BGCOLOR=#D9E6FE cellpadding=2 cellspacing=0><TR BGCOLOR=#015B91><TD ALIGN=LEFT><FONT FACE="ARIAL,HELVETICA" COLOR=WHITE SIZE=2><B> VICIDIAL REMOTE AGENTS: <? echo "$PHP_AUTH_USER " ?> <a href="<? echo $PHP_SELF ?>?force_logout=1"><FONT FACE="ARIAL,HELVETICA" COLOR=WHITE SIZE=1>Logout</a></TD><TD ALIGN=RIGHT><FONT FACE="ARIAL,HELVETICA" COLOR=WHITE SIZE=2><B><? echo date("l F j, Y G:i:s A") ?> </TD></TR>
|
||||
<TR BGCOLOR=#F0F5FE><TD ALIGN=LEFT COLSPAN=2><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=1> <a href="./vdremote.php"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=1>MODIFY</a> | <a href="./vdremote.php?ADD=61111&user=<? echo "$PHP_AUTH_USER" ?>"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=1>STATUS</a> | <a href="./vdremote.php?ADD=71111&user=<? echo "$PHP_AUTH_USER" ?>"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=1>INBOUND STATS</a></TD></TR>
|
||||
|
||||
|
||||
<TR><TD ALIGN=LEFT COLSPAN=2>
|
||||
<?
|
||||
|
||||
|
||||
|
||||
######################
|
||||
# ADD=31111 modify remote agents info in the system
|
||||
######################
|
||||
|
||||
if ($ADD==31111)
|
||||
{
|
||||
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
||||
|
||||
$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 "<br>MODIFY A REMOTE AGENTS ENTRY: $row[0]<form action=$PHP_SELF method=POST>\n";
|
||||
echo "<input type=hidden name=ADD value=41111>\n";
|
||||
echo "<input type=hidden name=remote_agent_id value=\"$row[0]\">\n";
|
||||
echo "<center><TABLE width=600 cellspacing=3>\n";
|
||||
echo "<tr bgcolor=#B6D3FC><td align=right>User ID Start: </td><td align=left>$user_start</td></tr>\n";
|
||||
echo "<tr bgcolor=#B6D3FC><td align=right>Number of Lines: </td><td align=left><input type=text name=number_of_lines size=3 maxlength=3 value=\"$number_of_lines\"> (numbers only)</td></tr>\n";
|
||||
echo "<tr bgcolor=#B6D3FC><td align=right>Server IP: </td><td align=left>$row[3]</td></tr>\n";
|
||||
echo "<tr bgcolor=#B6D3FC><td align=right>External Extension: </td><td align=left><input type=text name=conf_exten size=20 maxlength=20 value=\"$conf_exten\"> (number dialed to reach agents [i.e. 913125551212])</td></tr>\n";
|
||||
echo "<tr bgcolor=#B6D3FC><td align=right>Status: </td><td align=left><select size=1 name=status><option SELECTED>ACTIVE</option><option>INACTIVE</option><option SELECTED>$status</option></select></td></tr>\n";
|
||||
echo "<tr bgcolor=#B6D3FC><td align=right>Campaign: </td><td align=left>$campaign_id</td></tr>\n";
|
||||
echo "<tr bgcolor=#B6D3FC><td align=right>Inbound Groups: </td><td align=left>\n";
|
||||
echo "$groups_list";
|
||||
echo "</td></tr>\n";
|
||||
echo "<tr bgcolor=#B6D3FC><td align=center colspan=2><input type=submit name=submit value=submit></td></tr>\n";
|
||||
echo "</TABLE></center>\n";
|
||||
echo "NOTE: It can take up to 30 seconds for changes submitted on this screen to go live\n";
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
######################
|
||||
# ADD=41111 modify remote agents info in the system
|
||||
######################
|
||||
|
||||
if ($ADD==41111)
|
||||
{
|
||||
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
||||
|
||||
if ( (strlen($number_of_lines) < 1) or (strlen($conf_exten) < 2) )
|
||||
{echo "<br>REMOTE AGENTS NOT MODIFIED - Please go back and look at the data you entered\n";}
|
||||
else
|
||||
{
|
||||
$stmt="UPDATE vicidial_remote_agents set number_of_lines='$number_of_lines', conf_exten='$conf_exten', status='$status', closer_campaigns='$groups_value' where remote_agent_id='$remote_agent_id';";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
|
||||
# echo "$stmt\n";
|
||||
echo "<br>REMOTE AGENTS MODIFIED\n";
|
||||
|
||||
### LOG CHANGES TO LOG FILE ###
|
||||
$fp = fopen ("./admin_changes_log.txt", "a");
|
||||
fwrite ($fp, "$date|MODIFY REMOTE AGENTS ENTRY |$PHP_AUTH_USER|$ip|UPDATE vicidial_remote_agents set number_of_lines='$number_of_lines', conf_exten='$conf_exten', status='$status', closer_campaigns='$groups_value' where remote_agent_id='$remote_agent_id'|\n");
|
||||
fclose($fp);
|
||||
|
||||
}
|
||||
|
||||
$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 "<br>MODIFY A REMOTE AGENTS ENTRY: $row[0]<form action=$PHP_SELF method=POST>\n";
|
||||
echo "<input type=hidden name=ADD value=41111>\n";
|
||||
echo "<input type=hidden name=remote_agent_id value=\"$row[0]\">\n";
|
||||
echo "<center><TABLE width=600 cellspacing=3>\n";
|
||||
echo "<tr bgcolor=#B6D3FC><td align=right>User ID Start: </td><td align=left>$user_start</td></tr>\n";
|
||||
echo "<tr bgcolor=#B6D3FC><td align=right>Number of Lines: </td><td align=left><input type=text name=number_of_lines size=3 maxlength=3 value=\"$number_of_lines\"> (numbers only)</td></tr>\n";
|
||||
echo "<tr bgcolor=#B6D3FC><td align=right>Server IP: </td><td align=left>$row[3]</td></tr>\n";
|
||||
echo "<tr bgcolor=#B6D3FC><td align=right>External Extension: </td><td align=left><input type=text name=conf_exten size=20 maxlength=20 value=\"$conf_exten\"> (number dialed to reach agents [i.e. 913125551212])</td></tr>\n";
|
||||
echo "<tr bgcolor=#B6D3FC><td align=right>Status: </td><td align=left><select size=1 name=status><option SELECTED>ACTIVE</option><option>INACTIVE</option><option SELECTED>$status</option></select></td></tr>\n";
|
||||
echo "<tr bgcolor=#B6D3FC><td align=right>Campaign: </td><td align=left>$campaign_id</td></tr>\n";
|
||||
echo "<tr bgcolor=#B6D3FC><td align=right>Inbound Groups: </td><td align=left>\n";
|
||||
echo "$groups_list";
|
||||
echo "</td></tr>\n";
|
||||
echo "<tr bgcolor=#B6D3FC><td align=center colspan=2><input type=submit name=submit value=submit></td></tr>\n";
|
||||
echo "</TABLE></center>\n";
|
||||
echo "NOTE: It can take up to 30 seconds for changes submitted on this screen to go live\n";
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
######################
|
||||
# ADD=61111 status of remote agent in the system and active calls and queue
|
||||
######################
|
||||
|
||||
if ($ADD==61111)
|
||||
{
|
||||
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2><PRE>";
|
||||
|
||||
if ( (strlen($server_ip) < 2) or (strlen($user) < 2) )
|
||||
{echo "<br>REMOTE AGENTS ERROR - Please go back and look at the data you entered\n";}
|
||||
else
|
||||
{
|
||||
|
||||
$users_list = '';
|
||||
$k=0;
|
||||
while($k < $number_of_lines)
|
||||
{
|
||||
$nextuser=($user + $k);
|
||||
$users_list .= "'$nextuser',";
|
||||
$k++;
|
||||
}
|
||||
$users_list = preg_replace("/.$/","",$users_list);
|
||||
|
||||
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='$server_ip' and user IN($users_list) order by extension;";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$talking_to_print = mysql_num_rows($rslt);
|
||||
if ($talking_to_print > 0)
|
||||
{
|
||||
$i=0;
|
||||
while ($i < $talking_to_print)
|
||||
{
|
||||
$leadlink=0;
|
||||
$row=mysql_fetch_row($rslt);
|
||||
if (eregi("READY|PAUSED",$row[4]))
|
||||
{
|
||||
$row[3]='';
|
||||
$row[5]=' - WAITING - ';
|
||||
$row[6]=$row[7];
|
||||
}
|
||||
$extension = sprintf("%-10s", $row[0]);
|
||||
$user = sprintf("%-6s", $row[1]);
|
||||
$leadid = sprintf("%-12s", $row[2]);
|
||||
if ($row[2] > 0)
|
||||
{
|
||||
$leadidLINK=$row[2];
|
||||
$leadlink++;
|
||||
if ( eregi("QUEUE",$row[4]) ) {$row[6]=$STARTtime;}
|
||||
$leadid = "<a href=\"./remote_dispo.php?lead_id=$row[2]&call_began=$row[6]\" target=\"_blank\">$leadid</a>";
|
||||
}
|
||||
$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='<SPAN class="yellow"><B>'; $EG='</B></SPAN>';}
|
||||
if ($call_time_M_int >= 10) {$G='<SPAN class="orange"><B>'; $EG='</B></SPAN>';}
|
||||
|
||||
echo "| $G$extension$EG | $G$user$EG | $G$leadid$EG | $G$channel$EG | $G$status$EG | $G$start_time$EG | $G$call_time_MS$EG |\n";
|
||||
|
||||
$i++;
|
||||
}
|
||||
|
||||
echo "+------------|--------+--------------+------------+--------+---------------------+---------+\n";
|
||||
echo " $i agents logged in on server $server_ip\n\n";
|
||||
|
||||
echo " <SPAN class=\"yellow\"><B> </SPAN> - 5 minutes or more on call</B>\n";
|
||||
echo " <SPAN class=\"orange\"><B> </SPAN> - Over 10 minutes on call</B>\n";
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "**************************************************************************************\n";
|
||||
echo "********************************* NO AGENTS ON CALLS *********************************\n";
|
||||
echo "**************************************************************************************\n";
|
||||
}
|
||||
}
|
||||
|
||||
echo "</PRE>\n\n";
|
||||
|
||||
}
|
||||
|
||||
|
||||
######################
|
||||
# ADD=71111 stats for remote agents from closer logs(vicidial_closer_log)
|
||||
######################
|
||||
|
||||
if ($ADD==71111)
|
||||
{
|
||||
echo "<FORM ACTION=\"$PHP_SELF\" METHOD=GET>\n";
|
||||
echo "<INPUT TYPE=TEXT NAME=query_date SIZE=10 MAXLENGTH=10 VALUE=\"$query_date\">\n";
|
||||
echo "<INPUT TYPE=HIDDEN NAME=ADD VALUE=\"71111\">\n";
|
||||
echo "<INPUT TYPE=HIDDEN NAME=user VALUE=\"$user\">\n";
|
||||
echo "<INPUT TYPE=SUBMIT NAME=SUBMIT VALUE=SUBMIT>\n";
|
||||
echo "</FORM>\n\n";
|
||||
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2><PRE>";
|
||||
|
||||
if ( (strlen($server_ip) < 2) or (strlen($user) < 2) )
|
||||
{echo "<br>REMOTE AGENTS ERROR - Please go back and look at the data you entered\n";}
|
||||
else
|
||||
{
|
||||
|
||||
$users_list = '';
|
||||
$k=0;
|
||||
while($k < $number_of_lines)
|
||||
{
|
||||
$nextuser=($user + $k);
|
||||
$users_list .= "'$nextuser',";
|
||||
$k++;
|
||||
}
|
||||
$users_list = preg_replace("/.$/","",$users_list);
|
||||
|
||||
$stmt="select count(*),sum(length_in_sec) from vicidial_closer_log where call_date >= '$query_date 00:00:01' and call_date <= '$query_date 23:59:59' and user IN($users_list);";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$in_calls = $row[0];
|
||||
$in_time = $row[1];
|
||||
$in_time_M = ($in_time / 60);
|
||||
$in_time_M = round($in_time_M, 2);
|
||||
$in_time_M_int = intval("$in_time_M");
|
||||
$in_time_SEC = ($in_time_M - $in_time_M_int);
|
||||
$in_time_SEC = ($in_time_SEC * 60);
|
||||
$in_time_SEC = round($in_time_SEC, 0);
|
||||
if ($in_time_SEC < 10) {$in_time_SEC = "0$in_time_SEC";}
|
||||
$in_time_MS = "$in_time_M_int:$in_time_SEC";
|
||||
$in_time_MS = sprintf("%7s", $in_time_MS);
|
||||
|
||||
echo "VICIDIAL: Remote Agent inbound stats $NOW_TIME\n\n";
|
||||
echo "\n";
|
||||
echo "Total calls taken $query_date: $in_calls\n";
|
||||
echo "Total talk time on $query_date: $in_time_MS (minutes:seconds)\n";
|
||||
echo "\n";
|
||||
echo "\n";
|
||||
echo "Call list for $query_date:\n";
|
||||
echo "+----------+------------+----------------+------------+--------+---------------------+---------+\n";
|
||||
echo "| USER | LEADID | GROUP | PHONE NUM | STATUS | CALL TIME | MINUTES |\n";
|
||||
echo "+----------+------------+----------------+------------+--------+---------------------+---------+\n";
|
||||
|
||||
|
||||
$stmt="select user,lead_id,campaign_id,phone_number,status,call_date,length_in_sec from vicidial_closer_log where call_date >= '$query_date 00:00:01' and call_date <= '$query_date 23:59:59' and user IN($users_list) order by call_date;";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$talking_to_print = mysql_num_rows($rslt);
|
||||
if ($talking_to_print > 0)
|
||||
{
|
||||
$i=0;
|
||||
while ($i < $talking_to_print)
|
||||
{
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$user = sprintf("%-8s", $row[0]);
|
||||
$leadid = sprintf("%-10s", $row[1]);
|
||||
$group = sprintf("%-14s", $row[2]);
|
||||
$phone = sprintf("%-10s", $row[3]);
|
||||
$status = sprintf("%-6s", $row[4]);
|
||||
$start_time = sprintf("%-19s", $row[5]);
|
||||
$call_time_S = $row[6];
|
||||
|
||||
$call_time_M = ($call_time_S / 60);
|
||||
$call_time_M = round($call_time_M, 2);
|
||||
$call_time_M_int = intval("$call_time_M");
|
||||
$call_time_SEC = ($call_time_M - $call_time_M_int);
|
||||
$call_time_SEC = ($call_time_SEC * 60);
|
||||
$call_time_SEC = round($call_time_SEC, 0);
|
||||
if ($call_time_SEC < 10) {$call_time_SEC = "0$call_time_SEC";}
|
||||
$call_time_MS = "$call_time_M_int:$call_time_SEC";
|
||||
$call_time_MS = sprintf("%7s", $call_time_MS);
|
||||
$G = ''; $EG = '';
|
||||
# if ($call_time_M_int >= 5) {$G='<SPAN class="yellow"><B>'; $EG='</B></SPAN>';}
|
||||
# if ($call_time_M_int >= 10) {$G='<SPAN class="orange"><B>'; $EG='</B></SPAN>';}
|
||||
|
||||
echo "| $G$user$EG | $G$leadid$EG | $G$group$EG | $G$phone$EG | $G$status$EG | $G$start_time$EG | $G$call_time_MS$EG |\n";
|
||||
|
||||
$i++;
|
||||
}
|
||||
|
||||
echo "+----------+------------+----------------+------------+--------+---------------------+---------+\n";
|
||||
# echo " $i agents logged in on server $server_ip\n\n";
|
||||
|
||||
# echo " <SPAN class=\"yellow\"><B> </SPAN> - 5 minutes or more on call</B>\n";
|
||||
# echo " <SPAN class=\"orange\"><B> </SPAN> - Over 10 minutes on call</B>\n";
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "**************************************************************************************\n";
|
||||
echo "********************************* NO CALLS ON THIS DAY *******************************\n";
|
||||
echo "**************************************************************************************\n";
|
||||
}
|
||||
}
|
||||
|
||||
echo "</PRE>\n\n";
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
$ENDtime = date("U");
|
||||
|
||||
$RUNtime = ($ENDtime - $STARTtime);
|
||||
|
||||
echo "\n\n\n<br><br><br>\n\n";
|
||||
|
||||
|
||||
echo "<font size=0>\n\n\n<br><br><br>\nscript runtime: $RUNtime seconds</font>";
|
||||
|
||||
|
||||
?>
|
||||
|
||||
|
||||
</TD></TR><TABLE>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
<?
|
||||
|
||||
exit;
|
||||
|
||||
|
||||
|
||||
?>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,360 +0,0 @@
|
||||
<?
|
||||
require("dbconnect.php");
|
||||
|
||||
require_once("htglobalize.php");
|
||||
|
||||
# AST_CLOSERstats.php
|
||||
|
||||
$NOW_DATE = date("Y-m-d");
|
||||
$NOW_TIME = date("Y-m-d H:i:s");
|
||||
$STARTtime = date("U");
|
||||
if (!$query_date) {$query_date = $NOW_DATE;}
|
||||
|
||||
$stmt="select group_id from vicidial_inbound_groups;";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$groups_to_print = mysql_num_rows($rslt);
|
||||
$i=0;
|
||||
while ($i < $groups_to_print)
|
||||
{
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$groups[$i] =$row[0];
|
||||
$i++;
|
||||
}
|
||||
?>
|
||||
|
||||
<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=iso-8859-1\">\n";
|
||||
#echo"<META HTTP-EQUIV=Refresh CONTENT=\"7; URL=$PHP_SELF?server_ip=$server_ip&DB=$DB\">\n";
|
||||
echo "<TITLE>VICIDIAL: Στατιστικά VDAD Closer</TITLE></HEAD><BODY BGCOLOR=WHITE>\n";
|
||||
echo "<FORM ACTION=\"$PHP_SELF\" METHOD=GET>\n";
|
||||
echo "<INPUT TYPE=TEXT NAME=query_date SIZE=10 MAXLENGTH=10 VALUE=\"$query_date\">\n";
|
||||
echo "<SELECT SIZE=1 NAME=group>\n";
|
||||
$o=0;
|
||||
while ($groups_to_print > $o)
|
||||
{
|
||||
if ($groups[$o] == $group) {echo "<option selected value=\"$groups[$o]\">$groups[$o]</option>\n";}
|
||||
else {echo "<option value=\"$groups[$o]\">$groups[$o]</option>\n";}
|
||||
$o++;
|
||||
}
|
||||
echo "</SELECT>\n";
|
||||
echo "<INPUT TYPE=submit NAME=ΕΠΙΒΕΒΑΙΩΣΗ ΤΙΜΗ=ΥΠΟΒΑΛΛΩ>\n";
|
||||
echo "</FORM>\n\n";
|
||||
|
||||
echo "<PRE><FONT SIZE=2>\n\n";
|
||||
|
||||
|
||||
if (!$group)
|
||||
{
|
||||
echo "\n\n";
|
||||
echo "ΠΑΡΑΚΑΛΩ ΕΠΙΛΕΞΤΕ ΜΙΑ ΕΚΣΤΡΑΤΕΙΑ ΚΑΙ ΜΙΑ ΗΜΕΡΟΜΗΝΙΑ ΑΝΩΤΕΡΩ, ΚΑΙ ΠΑΤΗΣΤΕ ΕΠΙΒΕΒΑΙΩΣΗ\n";
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
|
||||
|
||||
echo "VICIDIAL: Στατιστικά αυτόματης κλήσης Closer $NOW_TIME\n";
|
||||
|
||||
echo "\n";
|
||||
echo "---------- TOTALS\n";
|
||||
|
||||
$stmt="select count(*),sum(length_in_sec) from vicidial_closer_log where call_date >= '$query_date 00:00:01' and call_date <= '$query_date 23:59:59' and campaign_id='$group';";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$row=mysql_fetch_row($rslt);
|
||||
|
||||
$TOTALcalls = sprintf("%10s", $row[0]);
|
||||
$average_hold_seconds = ($row[1] / $row[0]);
|
||||
$average_hold_seconds = round($average_hold_seconds, 0);
|
||||
$average_hold_seconds = sprintf("%10s", $average_hold_seconds);
|
||||
|
||||
echo "Total Calls placed from this Εκστρατείας: $TOTALcalls\n";
|
||||
echo "Μέσος όρος σε δευτερόλεπτα για όλες τις κλήσεις: $average_hold_seconds\n";
|
||||
|
||||
echo "\n";
|
||||
echo "---------- DROPS\n";
|
||||
|
||||
$stmt="select count(*),sum(length_in_sec) from vicidial_closer_log where call_date >= '$query_date 00:00:01' and call_date <= '$query_date 23:59:59' and campaign_id='$group' and status='DROP' and (length_in_sec <= 999 or length_in_sec is null);";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$row=mysql_fetch_row($rslt);
|
||||
|
||||
$DROPcalls = sprintf("%10s", $row[0]);
|
||||
$DROPpercent = (($DROPcalls / $TOTALcalls) * 100);
|
||||
$DROPpercent = round($DROPpercent, 0);
|
||||
|
||||
$average_hold_seconds = ($row[1] / $row[0]);
|
||||
$average_hold_seconds = round($average_hold_seconds, 0);
|
||||
$average_hold_seconds = sprintf("%10s", $average_hold_seconds);
|
||||
|
||||
echo "Συνολικά DROP κλήσεις: $DROPcalls $DROPpercent%\n";
|
||||
echo "Μέσος όρος σε δευτερόλεπτα για DROP κλήσεις: $average_hold_seconds\n";
|
||||
|
||||
|
||||
##############################
|
||||
######### USER STATS
|
||||
|
||||
echo "\n";
|
||||
echo "---------- ΣΤΑΤΙΣΤΙΚΑ ΧΡΗΣΤΗ\n";
|
||||
echo "+--------------------------+------------+--------+--------+\n";
|
||||
echo "| ΧΡΗΣΤΗΣ | CALLS | TIME M | AVRG M |\n";
|
||||
echo "+--------------------------+------------+--------+--------+\n";
|
||||
|
||||
$stmt="select vicidial_closer_log.user,full_name,count(*),sum(length_in_sec),avg(length_in_sec) from vicidial_closer_log,vicidial_users where call_date >= '$query_date 00:00:01' and call_date <= '$query_date 23:59:59' and campaign_id='$group' and vicidial_closer_log.user is not null and length_in_sec is not null and length_in_sec > 4 and vicidial_closer_log.user=vicidial_users.user group by vicidial_closer_log.user;";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$users_to_print = mysql_num_rows($rslt);
|
||||
$i=0;
|
||||
while ($i < $users_to_print)
|
||||
{
|
||||
$row=mysql_fetch_row($rslt);
|
||||
|
||||
$user = sprintf("%-6s", $row[0]);
|
||||
$full_name = sprintf("%-15s", $row[1]); while(strlen($full_name)>15) {$full_name = substr("$full_name", 0, -1);}
|
||||
$USERcalls = sprintf("%10s", $row[2]);
|
||||
$USERtotTALK = $row[3];
|
||||
$USERavgTALK = $row[4];
|
||||
|
||||
$USERtotTALK_M = ($USERtotTALK / 60);
|
||||
$USERtotTALK_M = round($USERtotTALK_M, 2);
|
||||
$USERtotTALK_M_int = intval("$USERtotTALK_M");
|
||||
$USERtotTALK_S = ($USERtotTALK_M - $USERtotTALK_M_int);
|
||||
$USERtotTALK_S = ($USERtotTALK_S * 60);
|
||||
$USERtotTALK_S = round($USERtotTALK_S, 0);
|
||||
if ($USERtotTALK_S < 10) {$USERtotTALK_S = "0$USERtotTALK_S";}
|
||||
$USERtotTALK_MS = "$USERtotTALK_M_int:$USERtotTALK_S";
|
||||
$USERtotTALK_MS = sprintf("%6s", $USERtotTALK_MS);
|
||||
|
||||
$USERavgTALK_M = ($USERavgTALK / 60);
|
||||
$USERavgTALK_M = round($USERavgTALK_M, 2);
|
||||
$USERavgTALK_M_int = intval("$USERavgTALK_M");
|
||||
$USERavgTALK_S = ($USERavgTALK_M - $USERavgTALK_M_int);
|
||||
$USERavgTALK_S = ($USERavgTALK_S * 60);
|
||||
$USERavgTALK_S = round($USERavgTALK_S, 0);
|
||||
if ($USERavgTALK_S < 10) {$USERavgTALK_S = "0$USERavgTALK_S";}
|
||||
$USERavgTALK_MS = "$USERavgTALK_M_int:$USERavgTALK_S";
|
||||
$USERavgTALK_MS = sprintf("%6s", $USERavgTALK_MS);
|
||||
|
||||
echo "| $user - $full_name | $USERcalls | $USERtotTALK_MS | $USERavgTALK_MS |\n";
|
||||
|
||||
$i++;
|
||||
}
|
||||
|
||||
echo "+--------------------------+------------+--------+--------+\n";
|
||||
|
||||
##############################
|
||||
######### TIME STATS
|
||||
|
||||
echo "\n";
|
||||
echo "---------- ΣΤΑΤΙΣΤΙΚΑ ΧΡΟΝΟΥ\n";
|
||||
|
||||
echo "<FONT SIZE=0>\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='$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='$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='$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='$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='$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='$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='$group' and status='DROP';";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$drop_count[$i] = $row[0];
|
||||
$i++;
|
||||
$h++;
|
||||
}
|
||||
|
||||
$hour_multiplier = (100 / $hi_hour_count);
|
||||
#$hour_multiplier = round($hour_multiplier, 0);
|
||||
|
||||
echo "<!-- HICOUNT: $hi_hour_count|$hour_multiplier -->\n";
|
||||
echo "ΓΡΑΦΙΚΗ ΠΑΡΑΣΤΑΣΗ ΜΕ 15ΛΕΠΤΕΣ ΑΥΞΗΣΕΙΣ ΤΩΝ ΣΥΝΟΛΙΚΩΝ ΚΛΗΣΕΩΝ PLACED FROM THIS CAMPAIGN\n";
|
||||
|
||||
$k=1;
|
||||
$Mk=0;
|
||||
$call_scale = '0';
|
||||
while ($k <= 102)
|
||||
{
|
||||
if ($Mk >= 5)
|
||||
{
|
||||
$Mk=0;
|
||||
$scale_num=($k / $hour_multiplier);
|
||||
$scale_num = round($scale_num, 0);
|
||||
$LENscale_num = (strlen($scale_num));
|
||||
$k = ($k + $LENscale_num);
|
||||
$call_scale .= "$scale_num";
|
||||
}
|
||||
else
|
||||
{
|
||||
$call_scale .= " ";
|
||||
$k++; $Mk++;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
echo "+------+-------------------------------------------------------------------------------------------------------+-------+-------+\n";
|
||||
#echo "| HOUR | GRAPH IN 15 MINUTE INCREMENTS OF TOTAL INCOMING CALLS FOR THIS GROUP | DROPS | TOTAL |\n";
|
||||
echo "| HOUR |$call_scale| DROPS | TOTAL |\n";
|
||||
echo "+------+-------------------------------------------------------------------------------------------------------+-------+-------+\n";
|
||||
|
||||
$ZZ = '00';
|
||||
$i=0;
|
||||
$h=4;
|
||||
$hour= -1;
|
||||
$no_lines_yet=1;
|
||||
|
||||
while ($i <= 96)
|
||||
{
|
||||
$char_counter=0;
|
||||
$time = ' ';
|
||||
if ($h >= 4)
|
||||
{
|
||||
$hour++;
|
||||
$h=0;
|
||||
if ($hour < 10) {$hour = "0$hour";}
|
||||
$time = "+$hour$ZZ+";
|
||||
}
|
||||
if ($h == 1) {$time = " 15 ";}
|
||||
if ($h == 2) {$time = " 30 ";}
|
||||
if ($h == 3) {$time = " 45 ";}
|
||||
$Ghour_count = $hour_count[$i];
|
||||
if ($Ghour_count < 1)
|
||||
{
|
||||
if ( ($no_lines_yet) or ($i > $last_full_record) )
|
||||
{
|
||||
$do_nothing=1;
|
||||
}
|
||||
else
|
||||
{
|
||||
$hour_count[$i] = sprintf("%-5s", $hour_count[$i]);
|
||||
echo "|$time|";
|
||||
$k=0; while ($k <= 102) {echo " "; $k++;}
|
||||
echo "| $hour_count[$i] |\n";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$no_lines_yet=0;
|
||||
$Xhour_count = ($Ghour_count * $hour_multiplier);
|
||||
$Yhour_count = (99 - $Xhour_count);
|
||||
|
||||
$Gdrop_count = $drop_count[$i];
|
||||
if ($Gdrop_count < 1)
|
||||
{
|
||||
$hour_count[$i] = sprintf("%-5s", $hour_count[$i]);
|
||||
|
||||
echo "|$time|<SPAN class=\"green\">";
|
||||
$k=0; while ($k <= $Xhour_count) {echo "*"; $k++; $char_counter++;}
|
||||
echo "*X</SPAN>"; $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|<SPAN class=\"red\">";
|
||||
$k=0; while ($k <= $Xdrop_count) {echo ">"; $k++; $char_counter++;}
|
||||
echo "D</SPAN><SPAN class=\"green\">"; $char_counter++;
|
||||
$k=0; while ($k <= $XXhour_count) {echo "*"; $k++; $char_counter++;}
|
||||
echo "X</SPAN>"; $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";
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
?>
|
||||
</PRE>
|
||||
|
||||
</BODY></HTML>
|
||||
@@ -1,390 +0,0 @@
|
||||
<?
|
||||
header ("Content-type: text/html; charset=utf-8");
|
||||
|
||||
require("dbconnect.php");
|
||||
|
||||
##### depricated
|
||||
#require_once("htglobalize.php");
|
||||
|
||||
$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER'];
|
||||
$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW'];
|
||||
$PHP_SELF=$_SERVER['PHP_SELF'];
|
||||
$group=$_GET["group"]; if (!$group) {$group=$_POST["group"];}
|
||||
$query_date=$_GET["query_date"]; if (!$query_date) {$query_date=$_POST["query_date"];}
|
||||
$submit=$_GET["submit"]; if (!$submit) {$submit=$_POST["submit"];}
|
||||
$ΕΠΙΒΕΒΑΙΩΣΗ=$_GET["ΕΠΙΒΕΒΑΙΩΣΗ"]; if (!$ΕΠΙΒΕΒΑΙΩΣΗ) {$ΕΠΙΒΕΒΑΙΩΣΗ=$_POST["ΕΠΙΒΕΒΑΙΩΣΗ"];}
|
||||
|
||||
# AST_VDADstats.php
|
||||
|
||||
$NOW_DATE = date("Y-m-d");
|
||||
$NOW_TIME = date("Y-m-d H:i:s");
|
||||
$STARTtime = date("U");
|
||||
if (!$query_date) {$query_date = $NOW_DATE;}
|
||||
|
||||
$stmt="select campaign_id from vicidial_campaigns;";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$groups_to_print = mysql_num_rows($rslt);
|
||||
$i=0;
|
||||
while ($i < $groups_to_print)
|
||||
{
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$groups[$i] =$row[0];
|
||||
$i++;
|
||||
}
|
||||
?>
|
||||
|
||||
<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=iso-8859-1\">\n";
|
||||
#echo"<META HTTP-EQUIV=Refresh CONTENT=\"7; URL=$PHP_SELF?server_ip=$server_ip&DB=$DB\">\n";
|
||||
echo "<TITLE>VICIDIAL: VDAD Stats</TITLE></HEAD><BODY BGCOLOR=WHITE>\n";
|
||||
echo "<FORM ACTION=\"$PHP_SELF\" METHOD=GET>\n";
|
||||
echo "<INPUT TYPE=TEXT NAME=query_date SIZE=10 MAXLENGTH=10 VALUE=\"$query_date\">\n";
|
||||
echo "<SELECT SIZE=1 NAME=group>\n";
|
||||
$o=0;
|
||||
while ($groups_to_print > $o)
|
||||
{
|
||||
if ($groups[$o] == $group) {echo "<option selected value=\"$groups[$o]\">$groups[$o]</option>\n";}
|
||||
else {echo "<option value=\"$groups[$o]\">$groups[$o]</option>\n";}
|
||||
$o++;
|
||||
}
|
||||
echo "</SELECT>\n";
|
||||
echo "<INPUT type=submit NAME=ΕΠΙΒΕΒΑΙΩΣΗ ΤΙΜΗ=ΥΠΟΒΑΛΛΩ>\n";
|
||||
echo "</FORM>\n\n";
|
||||
|
||||
echo "<PRE><FONT SIZE=2>\n\n";
|
||||
|
||||
|
||||
if (!$group)
|
||||
{
|
||||
echo "\n\n";
|
||||
echo "ΠΑΡΑΚΑΛΩ ΕΠΙΛΕΞΤΕ ΜΙΑ ΕΚΣΤΡΑΤΕΙΑ ΚΑΙ ΜΙΑ ΗΜΕΡΟΜΗΝΙΑ ΑΝΩΤΕΡΩ, ΚΑΙ ΠΑΤΗΣΤΕ ΕΠΙΒΕΒΑΙΩΣΗ\n";
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
|
||||
|
||||
echo "VICIDIAL: Auto-dial Stats $NOW_TIME\n";
|
||||
|
||||
echo "\n";
|
||||
echo "---------- TOTALS\n";
|
||||
|
||||
$stmt="select count(*),sum(length_in_sec) from vicidial_log where call_date >= '$query_date 00:00:01' and call_date <= '$query_date 23:59:59' and campaign_id='$group';";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$row=mysql_fetch_row($rslt);
|
||||
|
||||
$TOTALcalls = sprintf("%10s", $row[0]);
|
||||
$average_hold_seconds = ($row[1] / $row[0]);
|
||||
$average_hold_seconds = round($average_hold_seconds, 0);
|
||||
$average_hold_seconds = sprintf("%10s", $average_hold_seconds);
|
||||
|
||||
echo "Total Calls placed from this Εκστρατείας: $TOTALcalls\n";
|
||||
echo "Μέσος όρος σε δευτερόλεπτα για όλες τις κλήσεις: $average_hold_seconds\n";
|
||||
|
||||
echo "\n";
|
||||
echo "---------- DROPS\n";
|
||||
|
||||
$stmt="select count(*),sum(length_in_sec) from vicidial_log where call_date >= '$query_date 00:00:01' and call_date <= '$query_date 23:59:59' and campaign_id='$group' and status='DROP' and (length_in_sec <= 60 or length_in_sec is null);";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$row=mysql_fetch_row($rslt);
|
||||
|
||||
$DROPcalls = sprintf("%10s", $row[0]);
|
||||
$DROPpercent = (($DROPcalls / $TOTALcalls) * 100);
|
||||
$DROPpercent = round($DROPpercent, 0);
|
||||
|
||||
$average_hold_seconds = ($row[1] / $row[0]);
|
||||
$average_hold_seconds = round($average_hold_seconds, 0);
|
||||
$average_hold_seconds = sprintf("%10s", $average_hold_seconds);
|
||||
|
||||
echo "Συνολικά DROP κλήσεις: $DROPcalls $DROPpercent%\n";
|
||||
echo "Μέσος όρος σε δευτερόλεπτα για DROP κλήσεις: $average_hold_seconds\n";
|
||||
|
||||
echo "\n";
|
||||
echo "---------- ΜΗ ΑΠΑΝΤΗΜΕΝΕΣ ΑΥΤΟΜΑΤΕΣ ΚΛΗΣΕΙΣ\n";
|
||||
|
||||
$stmt="select count(*),sum(length_in_sec) from vicidial_log where call_date >= '$query_date 00:00:01' and call_date <= '$query_date 23:59:59' and campaign_id='$group' and status='NA' and (length_in_sec <= 60 or length_in_sec is null);";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$row=mysql_fetch_row($rslt);
|
||||
|
||||
$NAcalls = sprintf("%10s", $row[0]);
|
||||
$NApercent = (($NAcalls / $TOTALcalls) * 100);
|
||||
$NApercent = round($NApercent, 0);
|
||||
|
||||
$average_na_seconds = ($row[1] / $row[0]);
|
||||
$average_na_seconds = round($average_na_seconds, 0);
|
||||
$average_na_seconds = sprintf("%10s", $average_na_seconds);
|
||||
|
||||
echo "Συνολικά ΝΑ κλήσεις -Busy,Disconnect,BTvoicemail: $NAcalls $NApercent%\n";
|
||||
echo "Μέσος όρος σε δευτερόλεπτα για ΝΑ κλήσεις: $average_na_seconds\n";
|
||||
|
||||
|
||||
##############################
|
||||
######### USER STATS
|
||||
|
||||
echo "\n";
|
||||
echo "---------- ΣΤΑΤΙΣΤΙΚΑ ΧΡΗΣΤΗ\n";
|
||||
echo "+--------------------------+------------+--------+--------+\n";
|
||||
echo "| ΧΡΗΣΤΗΣ | CALLS | TIME M | AVRG M |\n";
|
||||
echo "+--------------------------+------------+--------+--------+\n";
|
||||
|
||||
$stmt="select vicidial_log.user,full_name,count(*),sum(length_in_sec),avg(length_in_sec) from vicidial_log,vicidial_users where call_date >= '$query_date 00:00:01' and call_date <= '$query_date 23:59:59' and campaign_id='$group' and vicidial_log.user is not null and length_in_sec is not null and length_in_sec > 4 and vicidial_log.user=vicidial_users.user group by vicidial_log.user;";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$users_to_print = mysql_num_rows($rslt);
|
||||
$i=0;
|
||||
while ($i < $users_to_print)
|
||||
{
|
||||
$row=mysql_fetch_row($rslt);
|
||||
|
||||
$user = sprintf("%-6s", $row[0]);
|
||||
$full_name = sprintf("%-15s", $row[1]); while(strlen($full_name)>15) {$full_name = substr("$full_name", 0, -1);}
|
||||
$USERcalls = sprintf("%10s", $row[2]);
|
||||
$USERtotTALK = $row[3];
|
||||
$USERavgTALK = $row[4];
|
||||
|
||||
$USERtotTALK_M = ($USERtotTALK / 60);
|
||||
$USERtotTALK_M = round($USERtotTALK_M, 2);
|
||||
$USERtotTALK_M_int = intval("$USERtotTALK_M");
|
||||
$USERtotTALK_S = ($USERtotTALK_M - $USERtotTALK_M_int);
|
||||
$USERtotTALK_S = ($USERtotTALK_S * 60);
|
||||
$USERtotTALK_S = round($USERtotTALK_S, 0);
|
||||
if ($USERtotTALK_S < 10) {$USERtotTALK_S = "0$USERtotTALK_S";}
|
||||
$USERtotTALK_MS = "$USERtotTALK_M_int:$USERtotTALK_S";
|
||||
$USERtotTALK_MS = sprintf("%6s", $USERtotTALK_MS);
|
||||
|
||||
$USERavgTALK_M = ($USERavgTALK / 60);
|
||||
$USERavgTALK_M = round($USERavgTALK_M, 2);
|
||||
$USERavgTALK_M_int = intval("$USERavgTALK_M");
|
||||
$USERavgTALK_S = ($USERavgTALK_M - $USERavgTALK_M_int);
|
||||
$USERavgTALK_S = ($USERavgTALK_S * 60);
|
||||
$USERavgTALK_S = round($USERavgTALK_S, 0);
|
||||
if ($USERavgTALK_S < 10) {$USERavgTALK_S = "0$USERavgTALK_S";}
|
||||
$USERavgTALK_MS = "$USERavgTALK_M_int:$USERavgTALK_S";
|
||||
$USERavgTALK_MS = sprintf("%6s", $USERavgTALK_MS);
|
||||
|
||||
echo "| $user - $full_name | $USERcalls | $USERtotTALK_MS | $USERavgTALK_MS |\n";
|
||||
|
||||
$i++;
|
||||
}
|
||||
|
||||
echo "+--------------------------+------------+--------+--------+\n";
|
||||
|
||||
##############################
|
||||
######### TIME STATS
|
||||
|
||||
echo "\n";
|
||||
echo "---------- ΣΤΑΤΙΣΤΙΚΑ ΧΡΟΝΟΥ\n";
|
||||
|
||||
echo "<FONT SIZE=0>\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='$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='$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='$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='$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='$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='$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='$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='$group' and status='DROP';";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$drop_count[$i] = $row[0];
|
||||
$i++;
|
||||
$h++;
|
||||
}
|
||||
|
||||
$hour_multiplier = (100 / $hi_hour_count);
|
||||
#$hour_multiplier = round($hour_multiplier, 0);
|
||||
|
||||
echo "<!-- HICOUNT: $hi_hour_count|$hour_multiplier -->\n";
|
||||
echo "ΓΡΑΦΙΚΗ ΠΑΡΑΣΤΑΣΗ ΜΕ 15ΛΕΠΤΕΣ ΑΥΞΗΣΕΙΣ ΤΩΝ ΣΥΝΟΛΙΚΩΝ ΚΛΗΣΕΩΝ PLACED FROM THIS CAMPAIGN\n";
|
||||
|
||||
$k=1;
|
||||
$Mk=0;
|
||||
$call_scale = '0';
|
||||
while ($k <= 102)
|
||||
{
|
||||
if ($Mk >= 5)
|
||||
{
|
||||
$Mk=0;
|
||||
$scale_num=($k / $hour_multiplier);
|
||||
$scale_num = round($scale_num, 0);
|
||||
$LENscale_num = (strlen($scale_num));
|
||||
$k = ($k + $LENscale_num);
|
||||
$call_scale .= "$scale_num";
|
||||
}
|
||||
else
|
||||
{
|
||||
$call_scale .= " ";
|
||||
$k++; $Mk++;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
echo "+------+-------------------------------------------------------------------------------------------------------+-------+-------+\n";
|
||||
#echo "| HOUR | GRAPH IN 15 MINUTE INCREMENTS OF TOTAL INCOMING CALLS FOR THIS GROUP | DROPS | TOTAL |\n";
|
||||
echo "| HOUR |$call_scale| DROPS | TOTAL |\n";
|
||||
echo "+------+-------------------------------------------------------------------------------------------------------+-------+-------+\n";
|
||||
|
||||
$ZZ = '00';
|
||||
$i=0;
|
||||
$h=4;
|
||||
$hour= -1;
|
||||
$no_lines_yet=1;
|
||||
|
||||
while ($i <= 96)
|
||||
{
|
||||
$char_counter=0;
|
||||
$time = ' ';
|
||||
if ($h >= 4)
|
||||
{
|
||||
$hour++;
|
||||
$h=0;
|
||||
if ($hour < 10) {$hour = "0$hour";}
|
||||
$time = "+$hour$ZZ+";
|
||||
}
|
||||
if ($h == 1) {$time = " 15 ";}
|
||||
if ($h == 2) {$time = " 30 ";}
|
||||
if ($h == 3) {$time = " 45 ";}
|
||||
$Ghour_count = $hour_count[$i];
|
||||
if ($Ghour_count < 1)
|
||||
{
|
||||
if ( ($no_lines_yet) or ($i > $last_full_record) )
|
||||
{
|
||||
$do_nothing=1;
|
||||
}
|
||||
else
|
||||
{
|
||||
$hour_count[$i] = sprintf("%-5s", $hour_count[$i]);
|
||||
echo "|$time|";
|
||||
$k=0; while ($k <= 102) {echo " "; $k++;}
|
||||
echo "| $hour_count[$i] |\n";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$no_lines_yet=0;
|
||||
$Xhour_count = ($Ghour_count * $hour_multiplier);
|
||||
$Yhour_count = (99 - $Xhour_count);
|
||||
|
||||
$Gdrop_count = $drop_count[$i];
|
||||
if ($Gdrop_count < 1)
|
||||
{
|
||||
$hour_count[$i] = sprintf("%-5s", $hour_count[$i]);
|
||||
|
||||
echo "|$time|<SPAN class=\"green\">";
|
||||
$k=0; while ($k <= $Xhour_count) {echo "*"; $k++; $char_counter++;}
|
||||
echo "*X</SPAN>"; $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|<SPAN class=\"red\">";
|
||||
$k=0; while ($k <= $Xdrop_count) {echo ">"; $k++; $char_counter++;}
|
||||
echo "D</SPAN><SPAN class=\"green\">"; $char_counter++;
|
||||
$k=0; while ($k <= $XXhour_count) {echo "*"; $k++; $char_counter++;}
|
||||
echo "X</SPAN>"; $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";
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
?>
|
||||
</PRE>
|
||||
|
||||
</BODY></HTML>
|
||||
@@ -1,135 +0,0 @@
|
||||
<?
|
||||
### AST_VICIDIAL_hopperlist.php
|
||||
###
|
||||
### Copyright (C) 2006 Matt Florell <vicidial@gmail.com> LICENSE: GPLv2
|
||||
###
|
||||
|
||||
require("dbconnect.php");
|
||||
|
||||
$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER'];
|
||||
$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW'];
|
||||
$PHP_SELF=$_SERVER['PHP_SELF'];
|
||||
$group=$_GET["group"]; if (!$group) {$group=$_POST["group"];}
|
||||
$submit=$_GET["submit"]; if (!$submit) {$submit=$_POST["submit"];}
|
||||
$ΕΠΙΒΕΒΑΙΩΣΗ=$_GET["ΕΠΙΒΕΒΑΙΩΣΗ"]; if (!$ΕΠΙΒΕΒΑΙΩΣΗ) {$ΕΠΙΒΕΒΑΙΩΣΗ=$_POST["ΕΠΙΒΕΒΑΙΩΣΗ"];}
|
||||
|
||||
$NOW_DATE = date("Y-m-d");
|
||||
$NOW_TIME = date("Y-m-d H:i:s");
|
||||
$STARTtime = date("U");
|
||||
if (!$query_date) {$query_date = $NOW_DATE;}
|
||||
if (!$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++;
|
||||
}
|
||||
?>
|
||||
|
||||
<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=iso-8859-1\">\n";
|
||||
#echo"<META HTTP-EQUIV=Refresh CONTENT=\"7; URL=$PHP_SELF?server_ip=$server_ip&DB=$DB\">\n";
|
||||
echo "<TITLE>VICIDIAL: Λίστα Hopper</TITLE></HEAD><BODY BGCOLOR=WHITE>\n";
|
||||
echo "<FORM ACTION=\"$PHP_SELF\" METHOD=GET>\n";
|
||||
#echo "<INPUT TYPE=HIDDEN NAME=server_ip VALUE=\"$server_ip\">\n";
|
||||
#echo "<INPUT TYPE=TEXT NAME=query_date SIZE=10 MAXLENGTH=10 VALUE=\"$query_date\">\n";
|
||||
echo "<SELECT SIZE=1 NAME=group>\n";
|
||||
$o=0;
|
||||
while ($campaigns_to_print > $o)
|
||||
{
|
||||
if ($campaign_id[$o] == $group) {echo "<option selected value=\"$campaign_id[$o]\">$campaign_id[$o] - $campaign_name[$o]</option>\n";}
|
||||
else {echo "<option value=\"$campaign_id[$o]\">$campaign_id[$o] - $campaign_name[$o]</option>\n";}
|
||||
$o++;
|
||||
}
|
||||
echo "</SELECT>\n";
|
||||
echo "<INPUT TYPE=ΕΠΙΒΕΒΑΙΩΣΗ NAME=ΕΠΙΒΕΒΑΙΩΣΗ ΤΙΜΗ=ΥΠΟΒΑΛΛΩ>\n";
|
||||
echo "</FORM>\n\n";
|
||||
|
||||
echo "<PRE><FONT SIZE=2>\n\n";
|
||||
|
||||
|
||||
if (!$group)
|
||||
{
|
||||
echo "\n\n";
|
||||
echo "ΠΑΡΑΚΑΛΩ ΕΠΙΛΕΞΤΕ ΜΙΑ ΕΚΣΤΡΑΤΕΙΑ ΑΝΩΤΕΡΩ ΚΑΙ ΠΑΤΗΣΤΕ ΕΠΙΒΕΒΑΙΩΣΗ\n";
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
|
||||
|
||||
echo "VICIDIAL: Live Current Λίστα Hopper $NOW_TIME\n";
|
||||
|
||||
echo "\n";
|
||||
echo "---------- TOTALS\n";
|
||||
|
||||
$stmt="select count(*) from vicidial_hopper where campaign_id='$group';";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$row=mysql_fetch_row($rslt);
|
||||
|
||||
$TOTALcalls = sprintf("%10s", $row[0]);
|
||||
|
||||
echo "Συνολικά καθοδηγητές στον hopper τώρα:: $TOTALcalls\n";
|
||||
|
||||
|
||||
##############################
|
||||
######### LEAD STATS
|
||||
|
||||
echo "\n";
|
||||
echo "---------- LEADS IN HOPPER\n";
|
||||
echo "+------+-----------+------------+-------+--------+-------+--------+\n";
|
||||
echo "| | LEAD_ID | PHONE NUM | STATE | STATUS | COUNT | GMT |\n";
|
||||
echo "+------+-----------+------------+-------+--------+-------+--------+\n";
|
||||
|
||||
$stmt="select vicidial_hopper.lead_id,phone_number,state,vicidial_list.status,called_count,vicidial_hopper.gmt_offset_now from vicidial_hopper,vicidial_list where vicidial_hopper.CAMPAIGN_ID='$group' and vicidial_hopper.lead_id=vicidial_list.lead_id order by hopper_id limit 2000;";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$users_to_print = mysql_num_rows($rslt);
|
||||
$i=0;
|
||||
while ($i < $users_to_print)
|
||||
{
|
||||
$row=mysql_fetch_row($rslt);
|
||||
|
||||
$FMT_i = sprintf("%-4s", $i);
|
||||
$lead_id = sprintf("%-9s", $row[0]);
|
||||
$phone_number = sprintf("%-10s", $row[1]);
|
||||
$state = sprintf("%-5s", $row[2]);
|
||||
$status = sprintf("%-6s", $row[3]);
|
||||
$count = sprintf("%-5s", $row[4]);
|
||||
$gmt = sprintf("%-6s", $row[5]);
|
||||
|
||||
echo "| $FMT_i | $lead_id | $phone_number | $state | $status | $count | $gmt |\n";
|
||||
|
||||
$i++;
|
||||
}
|
||||
|
||||
echo "+------+-----------+------------+-------+--------+-------+--------+\n";
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
?>
|
||||
</PRE>
|
||||
|
||||
</BODY></HTML>
|
||||
@@ -1,105 +0,0 @@
|
||||
<?
|
||||
require("dbconnect.php");
|
||||
|
||||
##### depricated
|
||||
#require_once("htglobalize.php");
|
||||
|
||||
$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER'];
|
||||
$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW'];
|
||||
$PHP_SELF=$_SERVER['PHP_SELF'];
|
||||
$query_date=$_GET["query_date"]; if (!$query_date) {$query_date=$_POST["query_date"];}
|
||||
$submit=$_GET["submit"]; if (!$submit) {$submit=$_POST["submit"];}
|
||||
$ΕΠΙΒΕΒΑΙΩΣΗ=$_GET["ΕΠΙΒΕΒΑΙΩΣΗ"]; if (!$ΕΠΙΒΕΒΑΙΩΣΗ) {$ΕΠΙΒΕΒΑΙΩΣΗ=$_POST["ΕΠΙΒΕΒΑΙΩΣΗ"];}
|
||||
|
||||
### AST GUI database administration
|
||||
### AST_admin_log_display.php
|
||||
###
|
||||
### CHANGES
|
||||
### 50325-0932 - First build
|
||||
### 51123-1443 - removed globals=on requirement
|
||||
|
||||
|
||||
$version = '0.0.1';
|
||||
$build = '50325-0932';
|
||||
|
||||
$STARTtime = date("U");
|
||||
|
||||
$stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 7;";
|
||||
if ($DB) {echo "|$stmt|\n";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$auth=$row[0];
|
||||
|
||||
$fp = fopen ("./project_auth_entries.txt", "a");
|
||||
$date = date("r");
|
||||
$ip = getenv("REMOTE_ADDR");
|
||||
$browser = getenv("HTTP_USER_AGENT");
|
||||
|
||||
if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or (!$auth))
|
||||
{
|
||||
Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\"");
|
||||
Header("HTTP/1.0 401 Unauthorized");
|
||||
echo "Ακυρο Ονομα Χρήστη/Κωδικός Πρόσβασης: |$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 "<html>\n";
|
||||
echo "<head>\n";
|
||||
echo "<!-- VERSION: $version BUILD: $build ADD: $ADD-->\n";
|
||||
echo "<title>VICIDIAL ΔΙΑΧ LOG DISPLAY</title>";
|
||||
echo "</head>\n";
|
||||
|
||||
# Fri, 25 Mar 2005
|
||||
|
||||
$DAY_DATE = date("j");
|
||||
if ($DAY_DATE < 10)
|
||||
{$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 "<!-- |$query_date|$Gquery_date| -->\n";
|
||||
|
||||
echo "<FORM ACTION=\"$PHP_SELF\" METHOD=GET>\n";
|
||||
echo "<INPUT TYPE=TEXT NAME=query_date SIZE=20 MAXLENGTH=20 VALUE=\"$query_date\">\n";
|
||||
echo "<INPUT TYPE=ΕΠΙΒΕΒΑΙΩΣΗ NAME=ΕΠΙΒΕΒΑΙΩΣΗ ΤΙΜΗ=ΥΠΟΒΑΛΛΩ>\n";
|
||||
echo "</FORM>\n\n";
|
||||
|
||||
echo "<PRE><FONT SIZE=2>\n\n";
|
||||
|
||||
|
||||
echo "VICIDIAL ΔΙΑΧ 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");
|
||||
|
||||
|
||||
?>
|
||||
</PRE>
|
||||
|
||||
</BODY></HTML>
|
||||
@@ -1,205 +0,0 @@
|
||||
<?
|
||||
require("dbconnect.php");
|
||||
|
||||
##### depricated
|
||||
#require_once("htglobalize.php");
|
||||
|
||||
$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER'];
|
||||
$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW'];
|
||||
$PHP_SELF=$_SERVER['PHP_SELF'];
|
||||
$group=$_GET["group"]; if (!$group) {$group=$_POST["group"];}
|
||||
$query_date=$_GET["query_date"]; if (!$query_date) {$query_date=$_POST["query_date"];}
|
||||
$shift=$_GET["shift"]; if (!$shift) {$shift=$_POST["shift"];}
|
||||
$submit=$_GET["submit"]; if (!$submit) {$submit=$_POST["submit"];}
|
||||
$ΕΠΙΒΕΒΑΙΩΣΗ=$_GET["ΕΠΙΒΕΒΑΙΩΣΗ"]; if (!$ΕΠΙΒΕΒΑΙΩΣΗ) {$ΕΠΙΒΕΒΑΙΩΣΗ=$_POST["ΕΠΙΒΕΒΑΙΩΣΗ"];}
|
||||
|
||||
# AST_agent_performance.php
|
||||
|
||||
$NOW_DATE = date("Y-m-d");
|
||||
$NOW_TIME = date("Y-m-d H:i:s");
|
||||
$STARTtime = date("U");
|
||||
if (!$query_date) {$query_date = $NOW_DATE;}
|
||||
|
||||
$stmt="select campaign_id from vicidial_campaigns;";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$campaigns_to_print = mysql_num_rows($rslt);
|
||||
$i=0;
|
||||
while ($i < $campaigns_to_print)
|
||||
{
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$groups[$i] =$row[0];
|
||||
$i++;
|
||||
}
|
||||
?>
|
||||
|
||||
<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=iso-8859-1\">\n";
|
||||
#echo"<META HTTP-EQUIV=Refresh CONTENT=\"7; URL=$PHP_SELF?server_ip=$server_ip&DB=$DB\">\n";
|
||||
# query_date - 2005-05-10
|
||||
echo "<TITLE>VICIDIAL: Agent Performance</TITLE></HEAD><BODY BGCOLOR=WHITE>\n";
|
||||
echo "<FORM ACTION=\"$PHP_SELF\" METHOD=GET>\n";
|
||||
echo "<INPUT TYPE=TEXT NAME=query_date SIZE=19 MAXLENGTH=19 VALUE=\"$query_date\">\n";
|
||||
echo "<SELECT SIZE=1 NAME=group>\n";
|
||||
$o=0;
|
||||
while ($campaigns_to_print > $o)
|
||||
{
|
||||
if ($groups[$o] == $group) {echo "<option selected value=\"$groups[$o]\">$groups[$o]</option>\n";}
|
||||
else {echo "<option value=\"$groups[$o]\">$groups[$o]</option>\n";}
|
||||
$o++;
|
||||
}
|
||||
echo "</SELECT>\n";
|
||||
echo "<SELECT SIZE=1 NAME=shift>\n";
|
||||
echo "<option selected value=\"AM\">AM</option>\n";
|
||||
echo "<option value=\"PM\">PM</option>\n";
|
||||
echo "</SELECT>\n";
|
||||
echo "<INPUT TYPE=ΕΠΙΒΕΒΑΙΩΣΗ NAME=ΕΠΙΒΕΒΑΙΩΣΗ ΤΙΜΗ=ΥΠΟΒΑΛΛΩ>\n";
|
||||
echo "</FORM>\n\n";
|
||||
|
||||
echo "<PRE><FONT SIZE=2>\n";
|
||||
|
||||
|
||||
if (!$group)
|
||||
{
|
||||
echo "\n";
|
||||
echo "PLEASE SELECT A SERVER AND DATE-TIME ABOVE AND CLICK ΕΠΙΒΕΒΑΙΩΣΗ\n";
|
||||
echo " NOTE: stats taken from 6 hour shift specified\n";
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
if ($shift == 'AM')
|
||||
{
|
||||
$query_date_BEGIN = "$query_date 08:45:00";
|
||||
$query_date_END = "$query_date 15:33:00";
|
||||
$time_BEGIN = "08:45:00";
|
||||
$time_END = "15:33:00";
|
||||
}
|
||||
if ($shift == 'PM')
|
||||
{
|
||||
$query_date_BEGIN = "$query_date 15:33:00";
|
||||
$query_date_END = "$query_date 23:15:00";
|
||||
$time_BEGIN = "15:33:00";
|
||||
$time_END = "23:15:00";
|
||||
}
|
||||
|
||||
echo "VICIDIAL: Agent Performance $NOW_TIME\n";
|
||||
|
||||
echo "Time range: $query_date_BEGIN to $query_date_END\n\n";
|
||||
echo "---------- AGENTS Details -------------\n\n";
|
||||
|
||||
echo "+-----------------+--------+--------+--------+--------+------+------+------+------+------+------+------+\n";
|
||||
echo "| USER NAME | ID | CALLS | TALK | TALKAVG| A | B | DC | DNC | N | NI | SALE |\n";
|
||||
echo "+-----------------+--------+--------+--------+--------+------+------+------+------+------+------+------+\n";
|
||||
|
||||
$stmt="select count(*) as calls,sum(length_in_sec) as talk,full_name,vicidial_users.user,avg(length_in_sec) from vicidial_users,vicidial_log where call_date <= '$query_date_END' and call_date >= '$query_date_BEGIN' and vicidial_users.user=vicidial_log.user and campaign_id='$group' group by full_name order by calls desc limit 1000;";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$rows_to_print = mysql_num_rows($rslt);
|
||||
$i=0;
|
||||
while ($i < $rows_to_print)
|
||||
{
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$TOTcalls=($TOTcalls + $row[0]);
|
||||
$TOTtotTALK=($TOTtotTALK + $row[1]);
|
||||
$calls[$i] = sprintf("%-6s", $row[0]);
|
||||
$full_name[$i]= sprintf("%-15s", $row[2]); while(strlen($full_name[$i])>15) {$full_name[$i] = substr("$full_name[$i]", 0, -1);}
|
||||
$user[$i] = sprintf("%-6s", $row[3]);
|
||||
$USERtotTALK = $row[1];
|
||||
$USERavgTALK = $row[4];
|
||||
|
||||
$USERtotTALK_M = ($USERtotTALK / 60);
|
||||
$USERtotTALK_M = round($USERtotTALK_M, 2);
|
||||
$USERtotTALK_M_int = intval("$USERtotTALK_M");
|
||||
$USERtotTALK_S = ($USERtotTALK_M - $USERtotTALK_M_int);
|
||||
$USERtotTALK_S = ($USERtotTALK_S * 60);
|
||||
$USERtotTALK_S = round($USERtotTALK_S, 0);
|
||||
if ($USERtotTALK_S < 10) {$USERtotTALK_S = "0$USERtotTALK_S";}
|
||||
$USERtotTALK_MS = "$USERtotTALK_M_int:$USERtotTALK_S";
|
||||
$pfUSERtotTALK_MS[$i] = sprintf("%6s", $USERtotTALK_MS);
|
||||
|
||||
$USERavgTALK_M = ($USERavgTALK / 60);
|
||||
$USERavgTALK_M = round($USERavgTALK_M, 2);
|
||||
$USERavgTALK_M_int = intval("$USERavgTALK_M");
|
||||
$USERavgTALK_S = ($USERavgTALK_M - $USERavgTALK_M_int);
|
||||
$USERavgTALK_S = ($USERavgTALK_S * 60);
|
||||
$USERavgTALK_S = round($USERavgTALK_S, 0);
|
||||
if ($USERavgTALK_S < 10) {$USERavgTALK_S = "0$USERavgTALK_S";}
|
||||
$USERavgTALK_MS = "$USERavgTALK_M_int:$USERavgTALK_S";
|
||||
$pfUSERavgTALK_MS[$i] = sprintf("%6s", $USERavgTALK_MS);
|
||||
$i++;
|
||||
}
|
||||
|
||||
$k=0;
|
||||
while($k < $i)
|
||||
{
|
||||
$ctA[$k]="0 "; $ctB[$k]="0 "; $ctDC[$k]="0 "; $ctDNC[$k]="0 "; $ctN[$k]="0 "; $ctNI[$k]="0 "; $ctSALE[$k]="0 ";
|
||||
$stmt="select count(*),status from vicidial_log where call_date <= '$query_date_END' and call_date >= '$query_date_BEGIN' and user='$user[$k]' and campaign_id='$group' group by status;";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$rows_to_print = mysql_num_rows($rslt);
|
||||
$m=0;
|
||||
while ($m < $rows_to_print)
|
||||
{
|
||||
$row=mysql_fetch_row($rslt);
|
||||
if ($row[1] == 'A') {$ctA[$k]=sprintf("%-4s", $row[0]); $TOT_A = ($TOT_A + $row[0]);}
|
||||
if ($row[1] == 'B') {$ctB[$k]=sprintf("%-4s", $row[0]); $TOT_B = ($TOT_B + $row[0]);}
|
||||
if ($row[1] == 'DC') {$ctDC[$k]=sprintf("%-4s", $row[0]); $TOT_DC = ($TOT_DC + $row[0]);}
|
||||
if ($row[1] == 'DNC') {$ctDNC[$k]=sprintf("%-4s", $row[0]); $TOT_DNC = ($TOT_DNC + $row[0]);}
|
||||
if ($row[1] == 'N') {$ctN[$k]=sprintf("%-4s", $row[0]); $TOT_N = ($TOT_N + $row[0]);}
|
||||
if ($row[1] == 'NI') {$ctNI[$k]=sprintf("%-4s", $row[0]); $TOT_NI = ($TOT_NI + $row[0]);}
|
||||
if (($row[1] == 'SALE') || ($row[1] == 'XFER') ) {$ctSALE[$k]=sprintf("%-4s", $row[0]); $TOT_SALE = ($TOT_SALE + $row[0]);}
|
||||
$m++;
|
||||
}
|
||||
echo "| $full_name[$k] | $user[$k] | $calls[$k] | $pfUSERtotTALK_MS[$k] | $pfUSERavgTALK_MS[$k] | $ctA[$k] | $ctB[$k] | $ctDC[$k] | $ctDNC[$k] | $ctN[$k] | $ctNI[$k] | $ctSALE[$k] |\n";
|
||||
|
||||
|
||||
|
||||
$k++;
|
||||
}
|
||||
|
||||
$TOTcalls = sprintf("%-7s", $TOTcalls);
|
||||
|
||||
$TOTtotTALK_M = ($TOTtotTALK / 60);
|
||||
$TOTtotTALK_M = round($TOTtotTALK_M, 2);
|
||||
$TOTtotTALK_M_int = intval("$TOTtotTALK_M");
|
||||
$TOTtotTALK_S = ($TOTtotTALK_M - $TOTtotTALK_M_int);
|
||||
$TOTtotTALK_S = ($TOTtotTALK_S * 60);
|
||||
$TOTtotTALK_S = round($TOTtotTALK_S, 0);
|
||||
if ($TOTtotTALK_S < 10) {$TOTtotTALK_S = "0$TOTtotTALK_S";}
|
||||
$TOTtotTALK_MS = "$TOTtotTALK_M_int:$TOTtotTALK_S";
|
||||
$TOTtotTALK_MS = sprintf("%7s", $TOTtotTALK_MS);
|
||||
while(strlen($TOTtotTALK_MS)>7) {$TOTtotTALK_MS = substr("$TOTtotTALK_MS", 0, -1);}
|
||||
|
||||
$TOT_A = sprintf("%-5s", $TOT_A);
|
||||
$TOT_B = sprintf("%-5s", $TOT_B);
|
||||
$TOT_DC = sprintf("%-5s", $TOT_DC);
|
||||
$TOT_DNC = sprintf("%-5s", $TOT_DNC);
|
||||
$TOT_N = sprintf("%-5s", $TOT_N);
|
||||
$TOT_NI = sprintf("%-5s", $TOT_NI);
|
||||
$TOT_SALE = sprintf("%-5s", $TOT_SALE);
|
||||
|
||||
echo "+-----------------+--------+--------+--------+--------+------+------+------+------+------+------+------+\n";
|
||||
echo "| TOTALS | $TOTcalls| $TOTtotTALK_MS| | $TOT_A| $TOT_B| $TOT_DC| $TOT_DNC| $TOT_N| $TOT_NI| $TOT_SALE|\n";
|
||||
echo "+-----------------+--------+--------+--------+--------+------+------+------+------+------+------+------+\n";
|
||||
|
||||
echo "\n";
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
?>
|
||||
|
||||
</BODY></HTML>
|
||||
@@ -1,379 +0,0 @@
|
||||
<?
|
||||
### AST_agent_performance_detail.php
|
||||
###
|
||||
### Copyright (C) 2006 Matt Florell <vicidial@gmail.com> LICENSE: GPLv2
|
||||
###
|
||||
|
||||
require("dbconnect.php");
|
||||
|
||||
$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER'];
|
||||
$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW'];
|
||||
$PHP_SELF=$_SERVER['PHP_SELF'];
|
||||
$query_date=$_GET["query_date"]; if (!$query_date) {$query_date=$_POST["query_date"];}
|
||||
$group=$_GET["group"]; if (!$group) {$group=$_POST["group"];}
|
||||
$shift=$_GET["shift"]; if (!$shift) {$shift=$_POST["shift"];}
|
||||
$submit=$_GET["submit"]; if (!$submit) {$submit=$_POST["submit"];}
|
||||
$ΕΠΙΒΕΒΑΙΩΣΗ=$_GET["ΕΠΙΒΕΒΑΙΩΣΗ"]; if (!$ΕΠΙΒΕΒΑΙΩΣΗ) {$ΕΠΙΒΕΒΑΙΩΣΗ=$_POST["ΕΠΙΒΕΒΑΙΩΣΗ"];}
|
||||
|
||||
$NOW_DATE = date("Y-m-d");
|
||||
$NOW_TIME = date("Y-m-d H:i:s");
|
||||
$STARTtime = date("U");
|
||||
if (!$query_date) {$query_date = $NOW_DATE;}
|
||||
|
||||
$stmt="select campaign_id from vicidial_campaigns;";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$campaigns_to_print = mysql_num_rows($rslt);
|
||||
$i=0;
|
||||
while ($i < $campaigns_to_print)
|
||||
{
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$groups[$i] =$row[0];
|
||||
$i++;
|
||||
}
|
||||
?>
|
||||
|
||||
<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=iso-8859-1\">\n";
|
||||
#echo"<META HTTP-EQUIV=Refresh CONTENT=\"7; URL=$PHP_SELF?server_ip=$server_ip&DB=$DB\">\n";
|
||||
# query_date - 2005-05-10
|
||||
echo "<TITLE>VICIDIAL: Agent Performance</TITLE></HEAD><BODY BGCOLOR=WHITE>\n";
|
||||
echo "<FORM ACTION=\"$PHP_SELF\" METHOD=GET>\n";
|
||||
echo "<INPUT TYPE=TEXT NAME=query_date SIZE=19 MAXLENGTH=19 VALUE=\"$query_date\">\n";
|
||||
echo "<SELECT SIZE=1 NAME=group>\n";
|
||||
$o=0;
|
||||
while ($campaigns_to_print > $o)
|
||||
{
|
||||
if ($groups[$o] == $group) {echo "<option selected value=\"$groups[$o]\">$groups[$o]</option>\n";}
|
||||
else {echo "<option value=\"$groups[$o]\">$groups[$o]</option>\n";}
|
||||
$o++;
|
||||
}
|
||||
echo "</SELECT>\n";
|
||||
echo "<SELECT SIZE=1 NAME=shift>\n";
|
||||
echo "<option selected value=\"AM\">AM</option>\n";
|
||||
echo "<option value=\"PM\">PM</option>\n";
|
||||
echo "</SELECT>\n";
|
||||
echo "<INPUT TYPE=ΕΠΙΒΕΒΑΙΩΣΗ NAME=ΕΠΙΒΕΒΑΙΩΣΗ ΤΙΜΗ=ΥΠΟΒΑΛΛΩ>\n";
|
||||
echo "</FORM>\n\n";
|
||||
|
||||
echo "<PRE><FONT SIZE=2>\n";
|
||||
|
||||
|
||||
if (!$group)
|
||||
{
|
||||
echo "\n";
|
||||
echo "PLEASE SELECT A CAMPAIGN AND DATE-TIME ABOVE AND CLICK ΕΠΙΒΕΒΑΙΩΣΗ\n";
|
||||
echo " NOTE: stats taken from 6 hour shift specified\n";
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
if ($shift == 'AM')
|
||||
{
|
||||
$query_date_BEGIN = "$query_date 03:45:00";
|
||||
$query_date_END = "$query_date 15:15:00";
|
||||
$time_BEGIN = "03:45:00";
|
||||
$time_END = "15:15:00";
|
||||
}
|
||||
if ($shift == 'PM')
|
||||
{
|
||||
$query_date_BEGIN = "$query_date 15:15:00";
|
||||
$query_date_END = "$query_date 23:15:00";
|
||||
$time_BEGIN = "15:15:00";
|
||||
$time_END = "23:15:00";
|
||||
}
|
||||
|
||||
echo "VICIDIAL: Agent Performance Detail $NOW_TIME\n";
|
||||
|
||||
echo "Time range: $query_date_BEGIN to $query_date_END\n\n";
|
||||
echo "---------- AGENTS Details -------------\n\n";
|
||||
|
||||
echo "+-----------------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+------+------+------+------+------+------+------+------+\n";
|
||||
echo "| USER NAME | ID | CALLS | TIME | PAUSE | PAUSAVG| WAIT | WAITAVG| TALK | TALKAVG| DISPO | DISPAVG| A | B | DC | DNC | N | NI | CB | SALE |\n";
|
||||
echo "+-----------------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+------+------+------+------+------+------+------+------+\n";
|
||||
|
||||
$stmt="select count(*) as calls,sum(talk_sec) as talk,full_name,vicidial_users.user,avg(talk_sec),sum(pause_sec),avg(pause_sec),sum(wait_sec),avg(wait_sec),sum(dispo_sec),avg(dispo_sec) from vicidial_users,vicidial_agent_log where event_time <= '$query_date_END' and event_time >= '$query_date_BEGIN' and vicidial_users.user=vicidial_agent_log.user and campaign_id='$group' and pause_sec<48800 and wait_sec<48800 and talk_sec<48800 and dispo_sec<48800 group by full_name order by calls desc limit 1000;";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$rows_to_print = mysql_num_rows($rslt);
|
||||
$i=0;
|
||||
while ($i < $rows_to_print)
|
||||
{
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$TOTcalls=($TOTcalls + $row[0]);
|
||||
$TOTtime=($TOTtime + $row[1] + $row[5] + $row[7] + $row[9]);
|
||||
$TOTtotTALK=($TOTtotTALK + $row[1]);
|
||||
$TOTtotWAIT=($TOTtotWAIT + $row[7]);
|
||||
$TOTtotPAUSE=($TOTtotPAUSE + $row[5]);
|
||||
$TOTtotDISPO=($TOTtotDISPO + $row[9]);
|
||||
$calls[$i] = sprintf("%-6s", $row[0]);
|
||||
$full_name[$i]= sprintf("%-15s", $row[2]); while(strlen($full_name[$i])>15) {$full_name[$i] = substr("$full_name[$i]", 0, -1);}
|
||||
$user[$i] = sprintf("%-6s", $row[3]);
|
||||
$USERtime = ($row[1] + $row[5] + $row[7] + $row[9]);
|
||||
$USERtotTALK = $row[1];
|
||||
$USERavgTALK = $row[4];
|
||||
$USERtotPAUSE = $row[5];
|
||||
$USERavgPAUSE = $row[6];
|
||||
$USERtotWAIT = $row[7];
|
||||
$USERavgWAIT = $row[8];
|
||||
$USERtotDISPO = $row[9];
|
||||
$USERavgDISPO = $row[10];
|
||||
|
||||
$USERtime_M = ($USERtime / 60);
|
||||
$USERtime_M = round($USERtime_M, 2);
|
||||
$USERtime_M_int = intval("$USERtime_M");
|
||||
$USERtime_S = ($USERtime_M - $USERtime_M_int);
|
||||
$USERtime_S = ($USERtime_S * 60);
|
||||
$USERtime_S = round($USERtime_S, 0);
|
||||
if ($USERtime_S < 10) {$USERtime_S = "0$USERtime_S";}
|
||||
$USERtime_MS = "$USERtime_M_int:$USERtime_S";
|
||||
$pfUSERtime_MS[$i] = sprintf("%7s", $USERtime_MS);
|
||||
|
||||
$USERtotTALK_M = ($USERtotTALK / 60);
|
||||
$USERtotTALK_M = round($USERtotTALK_M, 2);
|
||||
$USERtotTALK_M_int = intval("$USERtotTALK_M");
|
||||
$USERtotTALK_S = ($USERtotTALK_M - $USERtotTALK_M_int);
|
||||
$USERtotTALK_S = ($USERtotTALK_S * 60);
|
||||
$USERtotTALK_S = round($USERtotTALK_S, 0);
|
||||
if ($USERtotTALK_S < 10) {$USERtotTALK_S = "0$USERtotTALK_S";}
|
||||
$USERtotTALK_MS = "$USERtotTALK_M_int:$USERtotTALK_S";
|
||||
$pfUSERtotTALK_MS[$i] = sprintf("%6s", $USERtotTALK_MS);
|
||||
|
||||
$USERavgTALK_M = ($USERavgTALK / 60);
|
||||
$USERavgTALK_M = round($USERavgTALK_M, 2);
|
||||
$USERavgTALK_M_int = intval("$USERavgTALK_M");
|
||||
$USERavgTALK_S = ($USERavgTALK_M - $USERavgTALK_M_int);
|
||||
$USERavgTALK_S = ($USERavgTALK_S * 60);
|
||||
$USERavgTALK_S = round($USERavgTALK_S, 0);
|
||||
if ($USERavgTALK_S < 10) {$USERavgTALK_S = "0$USERavgTALK_S";}
|
||||
$USERavgTALK_MS = "$USERavgTALK_M_int:$USERavgTALK_S";
|
||||
$pfUSERavgTALK_MS[$i] = sprintf("%6s", $USERavgTALK_MS);
|
||||
|
||||
$USERtotPAUSE_M = ($USERtotPAUSE / 60);
|
||||
$USERtotPAUSE_M = round($USERtotPAUSE_M, 2);
|
||||
$USERtotPAUSE_M_int = intval("$USERtotPAUSE_M");
|
||||
$USERtotPAUSE_S = ($USERtotPAUSE_M - $USERtotPAUSE_M_int);
|
||||
$USERtotPAUSE_S = ($USERtotPAUSE_S * 60);
|
||||
$USERtotPAUSE_S = round($USERtotPAUSE_S, 0);
|
||||
if ($USERtotPAUSE_S < 10) {$USERtotPAUSE_S = "0$USERtotPAUSE_S";}
|
||||
$USERtotPAUSE_MS = "$USERtotPAUSE_M_int:$USERtotPAUSE_S";
|
||||
$pfUSERtotPAUSE_MS[$i] = sprintf("%6s", $USERtotPAUSE_MS);
|
||||
|
||||
$USERavgPAUSE_M = ($USERavgPAUSE / 60);
|
||||
$USERavgPAUSE_M = round($USERavgPAUSE_M, 2);
|
||||
$USERavgPAUSE_M_int = intval("$USERavgPAUSE_M");
|
||||
$USERavgPAUSE_S = ($USERavgPAUSE_M - $USERavgPAUSE_M_int);
|
||||
$USERavgPAUSE_S = ($USERavgPAUSE_S * 60);
|
||||
$USERavgPAUSE_S = round($USERavgPAUSE_S, 0);
|
||||
if ($USERavgPAUSE_S < 10) {$USERavgPAUSE_S = "0$USERavgPAUSE_S";}
|
||||
$USERavgPAUSE_MS = "$USERavgPAUSE_M_int:$USERavgPAUSE_S";
|
||||
$pfUSERavgPAUSE_MS[$i] = sprintf("%6s", $USERavgPAUSE_MS);
|
||||
|
||||
$USERtotWAIT_M = ($USERtotWAIT / 60);
|
||||
$USERtotWAIT_M = round($USERtotWAIT_M, 2);
|
||||
$USERtotWAIT_M_int = intval("$USERtotWAIT_M");
|
||||
$USERtotWAIT_S = ($USERtotWAIT_M - $USERtotWAIT_M_int);
|
||||
$USERtotWAIT_S = ($USERtotWAIT_S * 60);
|
||||
$USERtotWAIT_S = round($USERtotWAIT_S, 0);
|
||||
if ($USERtotWAIT_S < 10) {$USERtotWAIT_S = "0$USERtotWAIT_S";}
|
||||
$USERtotWAIT_MS = "$USERtotWAIT_M_int:$USERtotWAIT_S";
|
||||
$pfUSERtotWAIT_MS[$i] = sprintf("%6s", $USERtotWAIT_MS);
|
||||
|
||||
$USERavgWAIT_M = ($USERavgWAIT / 60);
|
||||
$USERavgWAIT_M = round($USERavgWAIT_M, 2);
|
||||
$USERavgWAIT_M_int = intval("$USERavgWAIT_M");
|
||||
$USERavgWAIT_S = ($USERavgWAIT_M - $USERavgWAIT_M_int);
|
||||
$USERavgWAIT_S = ($USERavgWAIT_S * 60);
|
||||
$USERavgWAIT_S = round($USERavgWAIT_S, 0);
|
||||
if ($USERavgWAIT_S < 10) {$USERavgWAIT_S = "0$USERavgWAIT_S";}
|
||||
$USERavgWAIT_MS = "$USERavgWAIT_M_int:$USERavgWAIT_S";
|
||||
$pfUSERavgWAIT_MS[$i] = sprintf("%6s", $USERavgWAIT_MS);
|
||||
|
||||
$USERtotDISPO_M = ($USERtotDISPO / 60);
|
||||
$USERtotDISPO_M = round($USERtotDISPO_M, 2);
|
||||
$USERtotDISPO_M_int = intval("$USERtotDISPO_M");
|
||||
$USERtotDISPO_S = ($USERtotDISPO_M - $USERtotDISPO_M_int);
|
||||
$USERtotDISPO_S = ($USERtotDISPO_S * 60);
|
||||
$USERtotDISPO_S = round($USERtotDISPO_S, 0);
|
||||
if ($USERtotDISPO_S < 10) {$USERtotDISPO_S = "0$USERtotDISPO_S";}
|
||||
$USERtotDISPO_MS = "$USERtotDISPO_M_int:$USERtotDISPO_S";
|
||||
$pfUSERtotDISPO_MS[$i] = sprintf("%6s", $USERtotDISPO_MS);
|
||||
|
||||
$USERavgDISPO_M = ($USERavgDISPO / 60);
|
||||
$USERavgDISPO_M = round($USERavgDISPO_M, 2);
|
||||
$USERavgDISPO_M_int = intval("$USERavgDISPO_M");
|
||||
$USERavgDISPO_S = ($USERavgDISPO_M - $USERavgDISPO_M_int);
|
||||
$USERavgDISPO_S = ($USERavgDISPO_S * 60);
|
||||
$USERavgDISPO_S = round($USERavgDISPO_S, 0);
|
||||
if ($USERavgDISPO_S < 10) {$USERavgDISPO_S = "0$USERavgDISPO_S";}
|
||||
$USERavgDISPO_MS = "$USERavgDISPO_M_int:$USERavgDISPO_S";
|
||||
$pfUSERavgDISPO_MS[$i] = sprintf("%6s", $USERavgDISPO_MS);
|
||||
|
||||
$i++;
|
||||
}
|
||||
|
||||
$k=0;
|
||||
while($k < $i)
|
||||
{
|
||||
$ctA[$k]="0 "; $ctB[$k]="0 "; $ctDC[$k]="0 "; $ctDNC[$k]="0 "; $ctN[$k]="0 "; $ctNI[$k]="0 "; $ctSALE[$k]="0 "; $ctCB[$k]="0 ";
|
||||
$stmt="select count(*),status from vicidial_agent_log where event_time <= '$query_date_END' and event_time >= '$query_date_BEGIN' and user='$user[$k]' and campaign_id='$group' group by status;";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$rows_to_print = mysql_num_rows($rslt);
|
||||
$m=0;
|
||||
while ($m < $rows_to_print)
|
||||
{
|
||||
$row=mysql_fetch_row($rslt);
|
||||
if ($row[1] == 'A') {$ctA[$k]=sprintf("%-4s", $row[0]); $TOT_A = ($TOT_A + $row[0]);}
|
||||
if ($row[1] == 'B') {$ctB[$k]=sprintf("%-4s", $row[0]); $TOT_B = ($TOT_B + $row[0]);}
|
||||
if ($row[1] == 'DC') {$ctDC[$k]=sprintf("%-4s", $row[0]); $TOT_DC = ($TOT_DC + $row[0]);}
|
||||
if ($row[1] == 'DNC') {$ctDNC[$k]=sprintf("%-4s", $row[0]); $TOT_DNC = ($TOT_DNC + $row[0]);}
|
||||
if ($row[1] == 'N') {$ctN[$k]=sprintf("%-4s", $row[0]); $TOT_N = ($TOT_N + $row[0]);}
|
||||
if ($row[1] == 'NI') {$ctNI[$k]=sprintf("%-4s", $row[0]); $TOT_NI = ($TOT_NI + $row[0]);}
|
||||
if (($row[1] == 'SALE') || ($row[1] == 'XFER') ) {$ctSALE[$k]=sprintf("%-4s", $row[0]); $TOT_SALE = ($TOT_SALE + $row[0]);}
|
||||
if (($row[1] == 'CALLBK') || ($row[1] == 'CBHOLD') ) {$ctCB[$k]=sprintf("%-4s", $row[0]); $TOT_CB = ($TOT_CB + $row[0]);}
|
||||
$m++;
|
||||
}
|
||||
echo "| $full_name[$k] | $user[$k] | $calls[$k] | $pfUSERtime_MS[$k]| $pfUSERtotPAUSE_MS[$k] | $pfUSERavgPAUSE_MS[$k] | $pfUSERtotWAIT_MS[$k] | $pfUSERavgWAIT_MS[$k] | $pfUSERtotTALK_MS[$k] | $pfUSERavgTALK_MS[$k] | $pfUSERtotDISPO_MS[$k] | $pfUSERavgDISPO_MS[$k] | $ctA[$k] | $ctB[$k] | $ctDC[$k] | $ctDNC[$k] | $ctN[$k] | $ctNI[$k] | $ctCB[$k] | $ctSALE[$k] |\n";
|
||||
|
||||
|
||||
|
||||
$k++;
|
||||
}
|
||||
|
||||
$TOTcalls = sprintf("%-7s", $TOTcalls);
|
||||
|
||||
$TOTtime_M = ($TOTtime / 60);
|
||||
$TOTtime_M = round($TOTtime_M, 2);
|
||||
$TOTtime_M_int = intval("$TOTtime_M");
|
||||
$TOTtime_S = ($TOTtime_M - $TOTtime_M_int);
|
||||
$TOTtime_S = ($TOTtime_S * 60);
|
||||
$TOTtime_S = round($TOTtime_S, 0);
|
||||
if ($TOTtime_S < 10) {$TOTtime_S = "0$TOTtime_S";}
|
||||
$TOTtime_MS = "$TOTtime_M_int:$TOTtime_S";
|
||||
$TOTtime_MS = sprintf("%7s", $TOTtime_MS);
|
||||
while(strlen($TOTtime_MS)>7) {$TOTtime_MS = substr("$TOTtime_MS", 0, -1);}
|
||||
|
||||
$TOTtotTALK_M = ($TOTtotTALK / 60);
|
||||
$TOTtotTALK_M = round($TOTtotTALK_M, 2);
|
||||
$TOTtotTALK_M_int = intval("$TOTtotTALK_M");
|
||||
$TOTtotTALK_S = ($TOTtotTALK_M - $TOTtotTALK_M_int);
|
||||
$TOTtotTALK_S = ($TOTtotTALK_S * 60);
|
||||
$TOTtotTALK_S = round($TOTtotTALK_S, 0);
|
||||
if ($TOTtotTALK_S < 10) {$TOTtotTALK_S = "0$TOTtotTALK_S";}
|
||||
$TOTtotTALK_MS = "$TOTtotTALK_M_int:$TOTtotTALK_S";
|
||||
$TOTtotTALK_MS = sprintf("%7s", $TOTtotTALK_MS);
|
||||
while(strlen($TOTtotTALK_MS)>7) {$TOTtotTALK_MS = substr("$TOTtotTALK_MS", 0, -1);}
|
||||
|
||||
$TOTtotDISPO_M = ($TOTtotDISPO / 60);
|
||||
$TOTtotDISPO_M = round($TOTtotDISPO_M, 2);
|
||||
$TOTtotDISPO_M_int = intval("$TOTtotDISPO_M");
|
||||
$TOTtotDISPO_S = ($TOTtotDISPO_M - $TOTtotDISPO_M_int);
|
||||
$TOTtotDISPO_S = ($TOTtotDISPO_S * 60);
|
||||
$TOTtotDISPO_S = round($TOTtotDISPO_S, 0);
|
||||
if ($TOTtotDISPO_S < 10) {$TOTtotDISPO_S = "0$TOTtotDISPO_S";}
|
||||
$TOTtotDISPO_MS = "$TOTtotDISPO_M_int:$TOTtotDISPO_S";
|
||||
$TOTtotDISPO_MS = sprintf("%7s", $TOTtotDISPO_MS);
|
||||
while(strlen($TOTtotDISPO_MS)>7) {$TOTtotDISPO_MS = substr("$TOTtotDISPO_MS", 0, -1);}
|
||||
|
||||
$TOTtotPAUSE_M = ($TOTtotPAUSE / 60);
|
||||
$TOTtotPAUSE_M = round($TOTtotPAUSE_M, 2);
|
||||
$TOTtotPAUSE_M_int = intval("$TOTtotPAUSE_M");
|
||||
$TOTtotPAUSE_S = ($TOTtotPAUSE_M - $TOTtotPAUSE_M_int);
|
||||
$TOTtotPAUSE_S = ($TOTtotPAUSE_S * 60);
|
||||
$TOTtotPAUSE_S = round($TOTtotPAUSE_S, 0);
|
||||
if ($TOTtotPAUSE_S < 10) {$TOTtotPAUSE_S = "0$TOTtotPAUSE_S";}
|
||||
$TOTtotPAUSE_MS = "$TOTtotPAUSE_M_int:$TOTtotPAUSE_S";
|
||||
$TOTtotPAUSE_MS = sprintf("%7s", $TOTtotPAUSE_MS);
|
||||
while(strlen($TOTtotPAUSE_MS)>7) {$TOTtotPAUSE_MS = substr("$TOTtotPAUSE_MS", 0, -1);}
|
||||
|
||||
$TOTtotWAIT_M = ($TOTtotWAIT / 60);
|
||||
$TOTtotWAIT_M = round($TOTtotWAIT_M, 2);
|
||||
$TOTtotWAIT_M_int = intval("$TOTtotWAIT_M");
|
||||
$TOTtotWAIT_S = ($TOTtotWAIT_M - $TOTtotWAIT_M_int);
|
||||
$TOTtotWAIT_S = ($TOTtotWAIT_S * 60);
|
||||
$TOTtotWAIT_S = round($TOTtotWAIT_S, 0);
|
||||
if ($TOTtotWAIT_S < 10) {$TOTtotWAIT_S = "0$TOTtotWAIT_S";}
|
||||
$TOTtotWAIT_MS = "$TOTtotWAIT_M_int:$TOTtotWAIT_S";
|
||||
$TOTtotWAIT_MS = sprintf("%7s", $TOTtotWAIT_MS);
|
||||
while(strlen($TOTtotWAIT_MS)>7) {$TOTtotWAIT_MS = substr("$TOTtotWAIT_MS", 0, -1);}
|
||||
|
||||
|
||||
$TOTavgTALK_M = ( ($TOTtotTALK / $TOTcalls) / 60);
|
||||
$TOTavgTALK_M = round($TOTavgTALK_M, 2);
|
||||
$TOTavgTALK_M_int = intval("$TOTavgTALK_M");
|
||||
$TOTavgTALK_S = ($TOTavgTALK_M - $TOTavgTALK_M_int);
|
||||
$TOTavgTALK_S = ($TOTavgTALK_S * 60);
|
||||
$TOTavgTALK_S = round($TOTavgTALK_S, 0);
|
||||
if ($TOTavgTALK_S < 10) {$TOTavgTALK_S = "0$TOTavgTALK_S";}
|
||||
$TOTavgTALK_MS = "$TOTavgTALK_M_int:$TOTavgTALK_S";
|
||||
$TOTavgTALK_MS = sprintf("%6s", $TOTavgTALK_MS);
|
||||
while(strlen($TOTavgTALK_MS)>6) {$TOTavgTALK_MS = substr("$TOTavgTALK_MS", 0, -1);}
|
||||
|
||||
$TOTavgDISPO_M = ( ($TOTtotDISPO / $TOTcalls) / 60);
|
||||
$TOTavgDISPO_M = round($TOTavgDISPO_M, 2);
|
||||
$TOTavgDISPO_M_int = intval("$TOTavgDISPO_M");
|
||||
$TOTavgDISPO_S = ($TOTavgDISPO_M - $TOTavgDISPO_M_int);
|
||||
$TOTavgDISPO_S = ($TOTavgDISPO_S * 60);
|
||||
$TOTavgDISPO_S = round($TOTavgDISPO_S, 0);
|
||||
if ($TOTavgDISPO_S < 10) {$TOTavgDISPO_S = "0$TOTavgDISPO_S";}
|
||||
$TOTavgDISPO_MS = "$TOTavgDISPO_M_int:$TOTavgDISPO_S";
|
||||
$TOTavgDISPO_MS = sprintf("%6s", $TOTavgDISPO_MS);
|
||||
while(strlen($TOTavgDISPO_MS)>6) {$TOTavgDISPO_MS = substr("$TOTavgDISPO_MS", 0, -1);}
|
||||
|
||||
$TOTavgPAUSE_M = ( ($TOTtotPAUSE / $TOTcalls) / 60);
|
||||
$TOTavgPAUSE_M = round($TOTavgPAUSE_M, 2);
|
||||
$TOTavgPAUSE_M_int = intval("$TOTavgPAUSE_M");
|
||||
$TOTavgPAUSE_S = ($TOTavgPAUSE_M - $TOTavgPAUSE_M_int);
|
||||
$TOTavgPAUSE_S = ($TOTavgPAUSE_S * 60);
|
||||
$TOTavgPAUSE_S = round($TOTavgPAUSE_S, 0);
|
||||
if ($TOTavgPAUSE_S < 10) {$TOTavgPAUSE_S = "0$TOTavgPAUSE_S";}
|
||||
$TOTavgPAUSE_MS = "$TOTavgPAUSE_M_int:$TOTavgPAUSE_S";
|
||||
$TOTavgPAUSE_MS = sprintf("%6s", $TOTavgPAUSE_MS);
|
||||
while(strlen($TOTavgPAUSE_MS)>6) {$TOTavgPAUSE_MS = substr("$TOTavgPAUSE_MS", 0, -1);}
|
||||
|
||||
$TOTavgWAIT_M = ( ($TOTtotWAIT / $TOTcalls) / 60);
|
||||
$TOTavgWAIT_M = round($TOTavgWAIT_M, 2);
|
||||
$TOTavgWAIT_M_int = intval("$TOTavgWAIT_M");
|
||||
$TOTavgWAIT_S = ($TOTavgWAIT_M - $TOTavgWAIT_M_int);
|
||||
$TOTavgWAIT_S = ($TOTavgWAIT_S * 60);
|
||||
$TOTavgWAIT_S = round($TOTavgWAIT_S, 0);
|
||||
if ($TOTavgWAIT_S < 10) {$TOTavgWAIT_S = "0$TOTavgWAIT_S";}
|
||||
$TOTavgWAIT_MS = "$TOTavgWAIT_M_int:$TOTavgWAIT_S";
|
||||
$TOTavgWAIT_MS = sprintf("%6s", $TOTavgWAIT_MS);
|
||||
while(strlen($TOTavgWAIT_MS)>6) {$TOTavgWAIT_MS = substr("$TOTavgWAIT_MS", 0, -1);}
|
||||
|
||||
|
||||
$TOT_A = sprintf("%-5s", $TOT_A);
|
||||
$TOT_B = sprintf("%-5s", $TOT_B);
|
||||
$TOT_DC = sprintf("%-5s", $TOT_DC);
|
||||
$TOT_DNC = sprintf("%-5s", $TOT_DNC);
|
||||
$TOT_N = sprintf("%-5s", $TOT_N);
|
||||
$TOT_NI = sprintf("%-5s", $TOT_NI);
|
||||
$TOT_CB = sprintf("%-5s", $TOT_CB);
|
||||
$TOT_SALE = sprintf("%-5s", $TOT_SALE);
|
||||
|
||||
echo "+-----------------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+------+------+------+------+------+------+------+------+\n";
|
||||
echo "| TOTALS | $TOTcalls| $TOTtime_MS| $TOTtotPAUSE_MS| $TOTavgPAUSE_MS | $TOTtotWAIT_MS| $TOTavgWAIT_MS | $TOTtotTALK_MS| $TOTavgTALK_MS | $TOTtotDISPO_MS| $TOTavgDISPO_MS | $TOT_A| $TOT_B| $TOT_DC| $TOT_DNC| $TOT_N| $TOT_NI| $TOT_CB| $TOT_SALE|\n";
|
||||
echo "+--------------------------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+------+------+------+------+------+------+------+------+\n";
|
||||
|
||||
echo "\n";
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
?>
|
||||
|
||||
</BODY></HTML>
|
||||
@@ -1,256 +0,0 @@
|
||||
<?
|
||||
### AST_agent_time_sheet.php
|
||||
###
|
||||
### Copyright (C) 2006 Matt Florell <vicidial@gmail.com> LICENSE: GPLv2
|
||||
###
|
||||
|
||||
require("dbconnect.php");
|
||||
|
||||
$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER'];
|
||||
$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW'];
|
||||
$PHP_SELF=$_SERVER['PHP_SELF'];
|
||||
$agent=$_GET["agent"]; if (!$agent) {$agent=$_POST["agent"];}
|
||||
$query_date=$_GET["query_date"]; if (!$query_date) {$query_date=$_POST["query_date"];}
|
||||
$calls_summary=$_GET["calls_summary"]; if (!$calls_summary) {$calls_summary=$_POST["calls_summary"];}
|
||||
$submit=$_GET["submit"]; if (!$submit) {$submit=$_POST["submit"];}
|
||||
$ΕΠΙΒΕΒΑΙΩΣΗ=$_GET["ΕΠΙΒΕΒΑΙΩΣΗ"]; if (!$ΕΠΙΒΕΒΑΙΩΣΗ) {$ΕΠΙΒΕΒΑΙΩΣΗ=$_POST["ΕΠΙΒΕΒΑΙΩΣΗ"];}
|
||||
|
||||
$NOW_DATE = date("Y-m-d");
|
||||
$NOW_TIME = date("Y-m-d H:i:s");
|
||||
$STARTtime = date("U");
|
||||
if (!$query_date) {$query_date = $NOW_DATE;}
|
||||
|
||||
?>
|
||||
|
||||
<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=iso-8859-1\">\n";
|
||||
#echo"<META HTTP-EQUIV=Refresh CONTENT=\"7; URL=$PHP_SELF?server_ip=$server_ip&DB=$DB\">\n";
|
||||
# query_date - 2005-05-10
|
||||
echo "<TITLE>VICIDIAL: Agent Time Sheet</TITLE></HEAD><BODY BGCOLOR=WHITE>\n";
|
||||
echo "<FORM ACTION=\"$PHP_SELF\" METHOD=GET>\n";
|
||||
echo "<INPUT TYPE=TEXT NAME=query_date SIZE=19 MAXLENGTH=19 VALUE=\"$query_date\">\n";
|
||||
echo "<INPUT TYPE=TEXT NAME=agent SIZE=10 MAXLENGTH=20 VALUE=\"$agent\">\n";
|
||||
echo "<INPUT TYPE=ΕΠΙΒΕΒΑΙΩΣΗ NAME=ΕΠΙΒΕΒΑΙΩΣΗ ΤΙΜΗ=ΥΠΟΒΑΛΛΩ>\n";
|
||||
echo "</FORM>\n\n";
|
||||
|
||||
echo "<PRE><FONT SIZE=3>\n";
|
||||
|
||||
|
||||
if (!$agent)
|
||||
{
|
||||
echo "\n";
|
||||
echo "PLEASE SELECT AN AGENT ID AND DATE-TIME ABOVE AND CLICK ΕΠΙΒΕΒΑΙΩΣΗ\n";
|
||||
echo " NOTE: stats taken from available agent log data\n";
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
$query_date_BEGIN = "$query_date 00:00:00";
|
||||
$query_date_END = "$query_date 23:59:59";
|
||||
$time_BEGIN = "00:00:00";
|
||||
$time_END = "23:59:59";
|
||||
|
||||
$stmt="select full_name from vicidial_users where user='$agent';";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$full_name = $row[0];
|
||||
|
||||
echo "VICIDIAL: Agent Time Sheet $NOW_TIME\n";
|
||||
|
||||
echo "Time range: $query_date_BEGIN to $query_date_END\n\n";
|
||||
echo "---------- 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 <= '$query_date_END' and event_time >= '$query_date_BEGIN' and user='$agent' and pause_sec<48800 and wait_sec<48800 and talk_sec<48800 and dispo_sec<48800 limit 1;";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$row=mysql_fetch_row($rslt);
|
||||
|
||||
$TOTAL_TIME = ($row[1] + $row[3] + $row[5] + $row[7]);
|
||||
|
||||
$TOTAL_TIME_H = ($TOTAL_TIME / 3600);
|
||||
$TOTAL_TIME_H = round($TOTAL_TIME_H, 2);
|
||||
$TOTAL_TIME_H_int = intval("$TOTAL_TIME_H");
|
||||
$TOTAL_TIME_M = ($TOTAL_TIME_H - $TOTAL_TIME_H_int);
|
||||
$TOTAL_TIME_M = ($TOTAL_TIME_M * 60);
|
||||
$TOTAL_TIME_M = round($TOTAL_TIME_M, 2);
|
||||
$TOTAL_TIME_M_int = intval("$TOTAL_TIME_M");
|
||||
$TOTAL_TIME_S = ($TOTAL_TIME_M - $TOTAL_TIME_M_int);
|
||||
$TOTAL_TIME_S = ($TOTAL_TIME_S * 60);
|
||||
$TOTAL_TIME_S = round($TOTAL_TIME_S, 0);
|
||||
if ($TOTAL_TIME_S < 10) {$TOTAL_TIME_S = "0$TOTAL_TIME_S";}
|
||||
if ($TOTAL_TIME_M_int < 10) {$TOTAL_TIME_M_int = "0$TOTAL_TIME_M_int";}
|
||||
$TOTAL_TIME_HMS = "$TOTAL_TIME_H_int:$TOTAL_TIME_M_int:$TOTAL_TIME_S";
|
||||
$pfTOTAL_TIME_HMS = sprintf("%8s", $TOTAL_TIME_HMS);
|
||||
|
||||
$TALK_TIME_H = ($row[1] / 3600);
|
||||
$TALK_TIME_H = round($TALK_TIME_H, 2);
|
||||
$TALK_TIME_H_int = intval("$TALK_TIME_H");
|
||||
$TALK_TIME_M = ($TALK_TIME_H - $TALK_TIME_H_int);
|
||||
$TALK_TIME_M = ($TALK_TIME_M * 60);
|
||||
$TALK_TIME_M = round($TALK_TIME_M, 2);
|
||||
$TALK_TIME_M_int = intval("$TALK_TIME_M");
|
||||
$TALK_TIME_S = ($TALK_TIME_M - $TALK_TIME_M_int);
|
||||
$TALK_TIME_S = ($TALK_TIME_S * 60);
|
||||
$TALK_TIME_S = round($TALK_TIME_S, 0);
|
||||
if ($TALK_TIME_S < 10) {$TALK_TIME_S = "0$TALK_TIME_S";}
|
||||
if ($TALK_TIME_M_int < 10) {$TALK_TIME_M_int = "0$TALK_TIME_M_int";}
|
||||
$TALK_TIME_HMS = "$TALK_TIME_H_int:$TALK_TIME_M_int:$TALK_TIME_S";
|
||||
$pfTALK_TIME_HMS = sprintf("%8s", $TALK_TIME_HMS);
|
||||
|
||||
$PAUSE_TIME_H = ($row[3] / 3600);
|
||||
$PAUSE_TIME_H = round($PAUSE_TIME_H, 2);
|
||||
$PAUSE_TIME_H_int = intval("$PAUSE_TIME_H");
|
||||
$PAUSE_TIME_M = ($PAUSE_TIME_H - $PAUSE_TIME_H_int);
|
||||
$PAUSE_TIME_M = ($PAUSE_TIME_M * 60);
|
||||
$PAUSE_TIME_M = round($PAUSE_TIME_M, 2);
|
||||
$PAUSE_TIME_M_int = intval("$PAUSE_TIME_M");
|
||||
$PAUSE_TIME_S = ($PAUSE_TIME_M - $PAUSE_TIME_M_int);
|
||||
$PAUSE_TIME_S = ($PAUSE_TIME_S * 60);
|
||||
$PAUSE_TIME_S = round($PAUSE_TIME_S, 0);
|
||||
if ($PAUSE_TIME_S < 10) {$PAUSE_TIME_S = "0$PAUSE_TIME_S";}
|
||||
if ($PAUSE_TIME_M_int < 10) {$PAUSE_TIME_M_int = "0$PAUSE_TIME_M_int";}
|
||||
$PAUSE_TIME_HMS = "$PAUSE_TIME_H_int:$PAUSE_TIME_M_int:$PAUSE_TIME_S";
|
||||
$pfPAUSE_TIME_HMS = sprintf("%8s", $PAUSE_TIME_HMS);
|
||||
|
||||
$WAIT_TIME_H = ($row[5] / 3600);
|
||||
$WAIT_TIME_H = round($WAIT_TIME_H, 2);
|
||||
$WAIT_TIME_H_int = intval("$WAIT_TIME_H");
|
||||
$WAIT_TIME_M = ($WAIT_TIME_H - $WAIT_TIME_H_int);
|
||||
$WAIT_TIME_M = ($WAIT_TIME_M * 60);
|
||||
$WAIT_TIME_M = round($WAIT_TIME_M, 2);
|
||||
$WAIT_TIME_M_int = intval("$WAIT_TIME_M");
|
||||
$WAIT_TIME_S = ($WAIT_TIME_M - $WAIT_TIME_M_int);
|
||||
$WAIT_TIME_S = ($WAIT_TIME_S * 60);
|
||||
$WAIT_TIME_S = round($WAIT_TIME_S, 0);
|
||||
if ($WAIT_TIME_S < 10) {$WAIT_TIME_S = "0$WAIT_TIME_S";}
|
||||
if ($WAIT_TIME_M_int < 10) {$WAIT_TIME_M_int = "0$WAIT_TIME_M_int";}
|
||||
$WAIT_TIME_HMS = "$WAIT_TIME_H_int:$WAIT_TIME_M_int:$WAIT_TIME_S";
|
||||
$pfWAIT_TIME_HMS = sprintf("%8s", $WAIT_TIME_HMS);
|
||||
|
||||
$WRAPUP_TIME_H = ($row[7] / 3600);
|
||||
$WRAPUP_TIME_H = round($WRAPUP_TIME_H, 2);
|
||||
$WRAPUP_TIME_H_int = intval("$WRAPUP_TIME_H");
|
||||
$WRAPUP_TIME_M = ($WRAPUP_TIME_H - $WRAPUP_TIME_H_int);
|
||||
$WRAPUP_TIME_M = ($WRAPUP_TIME_M * 60);
|
||||
$WRAPUP_TIME_M = round($WRAPUP_TIME_M, 2);
|
||||
$WRAPUP_TIME_M_int = intval("$WRAPUP_TIME_M");
|
||||
$WRAPUP_TIME_S = ($WRAPUP_TIME_M - $WRAPUP_TIME_M_int);
|
||||
$WRAPUP_TIME_S = ($WRAPUP_TIME_S * 60);
|
||||
$WRAPUP_TIME_S = round($WRAPUP_TIME_S, 0);
|
||||
if ($WRAPUP_TIME_S < 10) {$WRAPUP_TIME_S = "0$WRAPUP_TIME_S";}
|
||||
if ($WRAPUP_TIME_M_int < 10) {$WRAPUP_TIME_M_int = "0$WRAPUP_TIME_M_int";}
|
||||
$WRAPUP_TIME_HMS = "$WRAPUP_TIME_H_int:$WRAPUP_TIME_M_int:$WRAPUP_TIME_S";
|
||||
$pfWRAPUP_TIME_HMS = sprintf("%8s", $WRAPUP_TIME_HMS);
|
||||
|
||||
$TALK_AVG_M = ($row[2] / 60);
|
||||
$TALK_AVG_M = round($TALK_AVG_M, 2);
|
||||
$TALK_AVG_M_int = intval("$TALK_AVG_M");
|
||||
$TALK_AVG_S = ($TALK_AVG_M - $TALK_AVG_M_int);
|
||||
$TALK_AVG_S = ($TALK_AVG_S * 60);
|
||||
$TALK_AVG_S = round($TALK_AVG_S, 0);
|
||||
if ($TALK_AVG_S < 10) {$TALK_AVG_S = "0$TALK_AVG_S";}
|
||||
$TALK_AVG_MS = "$TALK_AVG_M_int:$TALK_AVG_S";
|
||||
$pfTALK_AVG_MS = sprintf("%6s", $TALK_AVG_MS);
|
||||
|
||||
$PAUSE_AVG_M = ($row[4] / 60);
|
||||
$PAUSE_AVG_M = round($PAUSE_AVG_M, 2);
|
||||
$PAUSE_AVG_M_int = intval("$PAUSE_AVG_M");
|
||||
$PAUSE_AVG_S = ($PAUSE_AVG_M - $PAUSE_AVG_M_int);
|
||||
$PAUSE_AVG_S = ($PAUSE_AVG_S * 60);
|
||||
$PAUSE_AVG_S = round($PAUSE_AVG_S, 0);
|
||||
if ($PAUSE_AVG_S < 10) {$PAUSE_AVG_S = "0$PAUSE_AVG_S";}
|
||||
$PAUSE_AVG_MS = "$PAUSE_AVG_M_int:$PAUSE_AVG_S";
|
||||
$pfPAUSE_AVG_MS = sprintf("%6s", $PAUSE_AVG_MS);
|
||||
|
||||
$WAIT_AVG_M = ($row[6] / 60);
|
||||
$WAIT_AVG_M = round($WAIT_AVG_M, 2);
|
||||
$WAIT_AVG_M_int = intval("$WAIT_AVG_M");
|
||||
$WAIT_AVG_S = ($WAIT_AVG_M - $WAIT_AVG_M_int);
|
||||
$WAIT_AVG_S = ($WAIT_AVG_S * 60);
|
||||
$WAIT_AVG_S = round($WAIT_AVG_S, 0);
|
||||
if ($WAIT_AVG_S < 10) {$WAIT_AVG_S = "0$WAIT_AVG_S";}
|
||||
$WAIT_AVG_MS = "$WAIT_AVG_M_int:$WAIT_AVG_S";
|
||||
$pfWAIT_AVG_MS = sprintf("%6s", $WAIT_AVG_MS);
|
||||
|
||||
$WRAPUP_AVG_M = ($row[8] / 60);
|
||||
$WRAPUP_AVG_M = round($WRAPUP_AVG_M, 2);
|
||||
$WRAPUP_AVG_M_int = intval("$WRAPUP_AVG_M");
|
||||
$WRAPUP_AVG_S = ($WRAPUP_AVG_M - $WRAPUP_AVG_M_int);
|
||||
$WRAPUP_AVG_S = ($WRAPUP_AVG_S * 60);
|
||||
$WRAPUP_AVG_S = round($WRAPUP_AVG_S, 0);
|
||||
if ($WRAPUP_AVG_S < 10) {$WRAPUP_AVG_S = "0$WRAPUP_AVG_S";}
|
||||
$WRAPUP_AVG_MS = "$WRAPUP_AVG_M_int:$WRAPUP_AVG_S";
|
||||
$pfWRAPUP_AVG_MS = sprintf("%6s", $WRAPUP_AVG_MS);
|
||||
|
||||
echo "ΣΥΝΟΛΙΚΕΣ ΚΛΗΣΕΙΣ TAKEN: $row[0]\n";
|
||||
echo "TALK TIME: $pfTALK_TIME_HMS AVERAGE: $pfTALK_AVG_MS\n";
|
||||
echo "PAUSE TIME: $pfPAUSE_TIME_HMS AVERAGE: $pfPAUSE_AVG_MS\n";
|
||||
echo "WAIT TIME: $pfWAIT_TIME_HMS AVERAGE: $pfWAIT_AVG_MS\n";
|
||||
echo "WRAPUP TIME: $pfWRAPUP_TIME_HMS AVERAGE: $pfWRAPUP_AVG_MS\n";
|
||||
echo "----------------------------------------------------------------\n";
|
||||
echo "TOTAL ACTIVE AGENT TIME: $pfTOTAL_TIME_HMS\n";
|
||||
|
||||
echo "\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "<a href=\"$PHP_SELF?calls_summary=1&agent=$agent&query_date=$query_date\">Call Activity Summary</a>\n\n";
|
||||
|
||||
}
|
||||
|
||||
$stmt="select event_time,UNIX_TIMESTAMP(event_time) from vicidial_agent_log where event_time <= '$query_date_END' and event_time >= '$query_date_BEGIN' and user='$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 <= '$query_date_END' and event_time >= '$query_date_BEGIN' and user='$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";
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
?>
|
||||
|
||||
</BODY></HTML>
|
||||
@@ -1,283 +0,0 @@
|
||||
<?
|
||||
require("dbconnect.php");
|
||||
|
||||
##### depricated
|
||||
#require_once("htglobalize.php");
|
||||
|
||||
$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER'];
|
||||
$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW'];
|
||||
$PHP_SELF=$_SERVER['PHP_SELF'];
|
||||
$query_date=$_GET["query_date"]; if (!$query_date) {$query_date=$_POST["query_date"];}
|
||||
$group=$_GET["group"]; if (!$group) {$group=$_POST["group"];}
|
||||
$shift=$_GET["shift"]; if (!$shift) {$shift=$_POST["shift"];}
|
||||
$submit=$_GET["submit"]; if (!$submit) {$submit=$_POST["submit"];}
|
||||
$ΕΠΙΒΕΒΑΙΩΣΗ=$_GET["ΕΠΙΒΕΒΑΙΩΣΗ"]; if (!$ΕΠΙΒΕΒΑΙΩΣΗ) {$ΕΠΙΒΕΒΑΙΩΣΗ=$_POST["ΕΠΙΒΕΒΑΙΩΣΗ"];}
|
||||
|
||||
# path from root to where ploticus files will be stored
|
||||
$DOCroot = "$WeBServeRRooT/vicidial/ploticus/";
|
||||
|
||||
# AST_server_performance.php
|
||||
|
||||
$NOW_DATE = date("Y-m-d");
|
||||
$NOW_TIME = date("Y-m-d H:i:s");
|
||||
$STARTtime = date("U");
|
||||
|
||||
if (!$query_date) {$query_date = $NOW_DATE;}
|
||||
|
||||
$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++;
|
||||
}
|
||||
?>
|
||||
|
||||
<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=iso-8859-1\">\n";
|
||||
#echo"<META HTTP-EQUIV=Refresh CONTENT=\"7; URL=$PHP_SELF?server_ip=$server_ip&DB=$DB\">\n";
|
||||
# query_date - 2005-05-10
|
||||
echo "<TITLE>VICIDIAL: Server Performance</TITLE></HEAD><BODY BGCOLOR=WHITE>\n";
|
||||
echo "<FORM ACTION=\"$PHP_SELF\" METHOD=GET>\n";
|
||||
echo "<INPUT TYPE=TEXT NAME=query_date SIZE=19 MAXLENGTH=19 VALUE=\"$query_date\">\n";
|
||||
echo "<SELECT SIZE=1 NAME=group>\n";
|
||||
$o=0;
|
||||
while ($servers_to_print > $o)
|
||||
{
|
||||
if ($groups[$o] == $group) {echo "<option selected value=\"$groups[$o]\">$groups[$o]</option>\n";}
|
||||
else {echo "<option value=\"$groups[$o]\">$groups[$o]</option>\n";}
|
||||
$o++;
|
||||
}
|
||||
echo "</SELECT>\n";
|
||||
echo "<SELECT SIZE=1 NAME=shift>\n";
|
||||
echo "<option selected value=\"AM\">AM</option>\n";
|
||||
echo "<option value=\"PM\">PM</option>\n";
|
||||
echo "</SELECT>\n";
|
||||
echo "<INPUT TYPE=ΕΠΙΒΕΒΑΙΩΣΗ NAME=ΕΠΙΒΕΒΑΙΩΣΗ ΤΙΜΗ=ΥΠΟΒΑΛΛΩ>\n";
|
||||
echo "</FORM>\n\n";
|
||||
|
||||
echo "<PRE><FONT SIZE=2>\n";
|
||||
|
||||
|
||||
if (!$group)
|
||||
{
|
||||
echo "\n";
|
||||
echo "PLEASE SELECT A SERVER AND DATE-TIME ABOVE AND CLICK ΕΠΙΒΕΒΑΙΩΣΗ\n";
|
||||
echo " NOTE: stats taken from 6 hour shift specified\n";
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
if ($shift == 'AM')
|
||||
{
|
||||
$query_date_BEGIN = "$query_date 08:45:00";
|
||||
$query_date_END = "$query_date 15:32:00";
|
||||
$time_BEGIN = "08:45:00";
|
||||
$time_END = "15:15:00";
|
||||
}
|
||||
if ($shift == 'PM')
|
||||
{
|
||||
$query_date_BEGIN = "$query_date 15:32:00";
|
||||
$query_date_END = "$query_date 23:15:00";
|
||||
$time_BEGIN = "15:15:00";
|
||||
$time_END = "23:15:00";
|
||||
}
|
||||
|
||||
echo "VICIDIAL: Server Performance $NOW_TIME\n";
|
||||
|
||||
echo "Time range: $query_date_BEGIN to $query_date_END\n\n";
|
||||
echo "---------- TOTALS, PEAKS and AVERAGES\n";
|
||||
|
||||
$stmt="select sysload from server_performance where start_time <= '$query_date_END' and start_time >= '$query_date_BEGIN' and server_ip='$group' order by sysload desc limit 1;";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$HIGHload = sprintf("%10s", $row[0]);
|
||||
$HIGHmulti = intval($HIGHload / 100);
|
||||
#$HIGHmulti = ($HIGHload / 100);
|
||||
|
||||
$stmt="select AVG(sysload),AVG(channels_total) from server_performance where start_time <= '$query_date_END' and start_time >= '$query_date_BEGIN' and server_ip='$group';";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$AVGload = sprintf("%10s", $row[0]);
|
||||
$AVGchannels = sprintf("%10s", $row[1]);
|
||||
|
||||
$stmt="select AVG(cpu_user_percent),AVG(cpu_system_percent),AVG(cpu_idle_percent) from server_performance where start_time <= '$query_date_END' and start_time >= '$query_date_BEGIN' and server_ip='$group';";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$AVGcpuUSER = sprintf("%10s", $row[0]);
|
||||
$AVGcpuSYSTEM = sprintf("%10s", $row[1]);
|
||||
$AVGcpuIDLE = sprintf("%10s", $row[2]);
|
||||
|
||||
$stmt="select usedram from server_performance where start_time <= '$query_date_END' and start_time >= '$query_date_BEGIN' and server_ip='$group' order by usedram desc limit 1;";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$USEDram = sprintf("%10s", $row[0]);
|
||||
|
||||
$stmt="select count(*),SUM(length_in_min) from call_log where extension NOT IN('8365') and start_time <= '$query_date_END' and start_time >= '$query_date_BEGIN' and server_ip='$group';";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$TOTALcalls = sprintf("%10s", $row[0]);
|
||||
$OFFHOOKtime = sprintf("%10s", $row[1]);
|
||||
|
||||
|
||||
echo "Total Calls in/out on this server: $TOTALcalls\n";
|
||||
echo "Total Off-Hook time on this server (min): $OFFHOOKtime\n";
|
||||
echo "Average channels in use for server: $AVGchannels\n";
|
||||
echo "Average load for server: $AVGload\n";
|
||||
echo "Peak load for server: $HIGHload\n";
|
||||
#echo "Peak used memory for server (in MB): $USEDram\n";
|
||||
echo "Average USER process cpu percentage: $AVGcpuUSER %\n";
|
||||
echo "Average SYSTEM process cpu percentage: $AVGcpuSYSTEM %\n";
|
||||
echo "Average IDLE process cpu percentage: $AVGcpuIDLE %\n";
|
||||
|
||||
echo "\n";
|
||||
echo "---------- LINE GRAPH:\n";
|
||||
|
||||
|
||||
|
||||
##############################
|
||||
######### Graph stats
|
||||
|
||||
$DAT = '.dat';
|
||||
$HTM = '.htm';
|
||||
$PNG = '.png';
|
||||
$filedate = date("Y-m-d_His");
|
||||
$DATfile = "$group$query_date$shift$filedate$DAT";
|
||||
$HTMfile = "$group$query_date$shift$filedate$HTM";
|
||||
$PNGfile = "$group$query_date$shift$filedate$PNG";
|
||||
|
||||
$HTMfp = fopen ("$DOCroot/$HTMfile", "a");
|
||||
$DATfp = fopen ("$DOCroot/$DATfile", "a");
|
||||
|
||||
$stmt="select DATE_FORMAT(start_time,'%H:%i:%s') as timex,sysload,processes,channels_total,live_recordings,cpu_user_percent,cpu_system_percent from server_performance where server_ip='$group' and start_time <= '$query_date_END' and start_time >= '$query_date_BEGIN' order by timex;";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$rows_to_print = mysql_num_rows($rslt);
|
||||
$i=0;
|
||||
while ($i < $rows_to_print)
|
||||
{
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$row[5] = intval(($row[5] + $row[6]) * $HIGHmulti);
|
||||
$row[6] = intval($row[6] * $HIGHmulti);
|
||||
fwrite ($DATfp, "$row[5]\t$row[6]\t$row[0]\t$row[1]\t$row[2]\t$row[3]\n");
|
||||
$i++;
|
||||
}
|
||||
fclose($DATfp);
|
||||
|
||||
$rows_to_max = ($rows_to_print + 100);
|
||||
|
||||
|
||||
|
||||
$HTMcontent = '';
|
||||
$HTMcontent .= "#proc page\n";
|
||||
$HTMcontent .= "#if @DEVICE in png,gif\n";
|
||||
$HTMcontent .= " scale: 0.6\n";
|
||||
$HTMcontent .= "\n";
|
||||
$HTMcontent .= "#endif\n";
|
||||
$HTMcontent .= "#proc getdata\n";
|
||||
$HTMcontent .= "file: $DOCroot/$DATfile\n";
|
||||
$HTMcontent .= "fieldnames: userproc sysproc time load processes channels\n";
|
||||
$HTMcontent .= "\n";
|
||||
$HTMcontent .= "#proc areadef\n";
|
||||
$HTMcontent .= "title: Server $group $query_date_BEGIN to $query_date_END\n";
|
||||
$HTMcontent .= "titledetails: size=14 align=C\n";
|
||||
$HTMcontent .= "rectangle: 1 1 14 7\n";
|
||||
$HTMcontent .= "xscaletype: time hh:mm:ss\n";
|
||||
$HTMcontent .= "xrange: $time_BEGIN $time_END\n";
|
||||
$HTMcontent .= "yrange: 0 $HIGHload\n";
|
||||
$HTMcontent .= "\n";
|
||||
$HTMcontent .= "#proc xaxis\n";
|
||||
$HTMcontent .= "stubs: inc 30 minutes\n";
|
||||
$HTMcontent .= "minorticinc: 5 minutes\n";
|
||||
$HTMcontent .= "stubformat: hh:mm:ssa\n";
|
||||
$HTMcontent .= "\n";
|
||||
$HTMcontent .= "#proc yaxis\n";
|
||||
$HTMcontent .= "stubs: inc 50\n";
|
||||
$HTMcontent .= "grid: color=yellow\n";
|
||||
$HTMcontent .= "gridskip: min\n";
|
||||
$HTMcontent .= "ticincrement: 100 1000\n";
|
||||
$HTMcontent .= "\n";
|
||||
$HTMcontent .= "#proc lineplot\n";
|
||||
$HTMcontent .= "xfield: time\n";
|
||||
$HTMcontent .= "yfield: userproc\n";
|
||||
$HTMcontent .= "linedetails: color=purple width=.5\n";
|
||||
$HTMcontent .= "fill: lavender\n";
|
||||
$HTMcontent .= "legendlabel: user proc%\n";
|
||||
$HTMcontent .= "maxinpoints: $rows_to_max\n";
|
||||
$HTMcontent .= "\n";
|
||||
$HTMcontent .= "#proc lineplot\n";
|
||||
$HTMcontent .= "xfield: time\n";
|
||||
$HTMcontent .= "yfield: sysproc\n";
|
||||
$HTMcontent .= "linedetails: color=yelloworange width=.5\n";
|
||||
$HTMcontent .= "fill: dullyellow\n";
|
||||
$HTMcontent .= "legendlabel: system proc%\n";
|
||||
$HTMcontent .= "maxinpoints: $rows_to_max\n";
|
||||
$HTMcontent .= "\n";
|
||||
$HTMcontent .= "#proc curvefit\n";
|
||||
$HTMcontent .= "xfield: time\n";
|
||||
$HTMcontent .= "yfield: load\n";
|
||||
$HTMcontent .= "linedetails: color=blue width=.5\n";
|
||||
$HTMcontent .= "legendlabel: load\n";
|
||||
$HTMcontent .= "maxinpoints: $rows_to_max\n";
|
||||
$HTMcontent .= "\n";
|
||||
$HTMcontent .= "#proc curvefit\n";
|
||||
$HTMcontent .= "xfield: time\n";
|
||||
$HTMcontent .= "yfield: processes\n";
|
||||
$HTMcontent .= "linedetails: color=red width=.5\n";
|
||||
$HTMcontent .= "legendlabel: processes\n";
|
||||
$HTMcontent .= "maxinpoints: $rows_to_max\n";
|
||||
$HTMcontent .= "\n";
|
||||
$HTMcontent .= "#proc curvefit\n";
|
||||
$HTMcontent .= "xfield: time\n";
|
||||
$HTMcontent .= "yfield: channels\n";
|
||||
$HTMcontent .= "linedetails: color=green width=.5\n";
|
||||
$HTMcontent .= "legendlabel: channels\n";
|
||||
$HTMcontent .= "maxinpoints: $rows_to_max\n";
|
||||
$HTMcontent .= "\n";
|
||||
$HTMcontent .= "#proc legend\n";
|
||||
$HTMcontent .= "location: max-2 max\n";
|
||||
$HTMcontent .= "seglen: 0.2\n";
|
||||
$HTMcontent .= "\n";
|
||||
|
||||
fwrite ($HTMfp, "$HTMcontent");
|
||||
fclose($HTMfp);
|
||||
|
||||
|
||||
passthru("/usr/local/bin/pl -png $DOCroot/$HTMfile -o $DOCroot/$PNGfile");
|
||||
|
||||
sleep(1);
|
||||
|
||||
echo "</PRE>\n";
|
||||
echo "\n";
|
||||
echo "<IMG SRC=\"./ploticus/$PNGfile\">\n";
|
||||
|
||||
|
||||
echo "<!-- /usr/local/bin/pl -png $DOCroot/$HTMfile -o $DOCroot/$PNGfile -->";
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
?>
|
||||
|
||||
</BODY></HTML>
|
||||
@@ -1,231 +0,0 @@
|
||||
<?
|
||||
header ("Content-type: text/html; charset=utf-8");
|
||||
|
||||
require("dbconnect.php");
|
||||
|
||||
##### depricated
|
||||
#require_once("htglobalize.php");
|
||||
|
||||
$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER'];
|
||||
$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW'];
|
||||
$PHP_SELF=$_SERVER['PHP_SELF'];
|
||||
$server_ip=$_GET["server_ip"]; if (!$server_ip) {$server_ip=$_POST["server_ip"];}
|
||||
$reset_counter=$_GET["reset_counter"]; if (!$reset_counter) {$reset_counter=$_POST["reset_counter"];}
|
||||
$submit=$_GET["submit"]; if (!$submit) {$submit=$_POST["submit"];}
|
||||
$ΕΠΙΒΕΒΑΙΩΣΗ=$_GET["ΕΠΙΒΕΒΑΙΩΣΗ"]; if (!$ΕΠΙΒΕΒΑΙΩΣΗ) {$ΕΠΙΒΕΒΑΙΩΣΗ=$_POST["ΕΠΙΒΕΒΑΙΩΣΗ"];}
|
||||
|
||||
# AST_timeonVDAD.php
|
||||
# live real-time stats for the VICIDIAL Auto-Dialer
|
||||
#
|
||||
# changes:
|
||||
# 50406-0920 Added Paused agents < 1 min (Chris Doyle)
|
||||
|
||||
$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";
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<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}
|
||||
.yellow {color: black; background-color: yellow}
|
||||
-->
|
||||
</STYLE>
|
||||
|
||||
<?
|
||||
echo"<META HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html; charset=iso-8859-1\">\n";
|
||||
echo"<META HTTP-EQUIV=Refresh CONTENT=\"4; URL=$PHP_SELF?server_ip=$server_ip&DB=$DB&reset_counter=$reset_counter\">\n";
|
||||
echo "<TITLE>VICIDIAL: Time On VDAD</TITLE></HEAD><BODY BGCOLOR=WHITE>\n";
|
||||
echo "<PRE><FONT SIZE=3>\n\n";
|
||||
|
||||
###################################################################################
|
||||
###### TIME ON SYSTEM
|
||||
###################################################################################
|
||||
|
||||
echo "VICIDIAL: Χρόνος χρηστών σε κλήσεις $NOW_TIME\n\n";
|
||||
echo "+------------|--------+-----------+------------+--------+---------------------+---------+\n";
|
||||
echo "| STATION | USER | SESSIONID | CHANNEL | STATUS | START TIME | MINUTES |\n";
|
||||
echo "+------------|--------+-----------+------------+--------+---------------------+---------+\n";
|
||||
|
||||
|
||||
$stmt="select extension,user,conf_exten,channel,status,last_call_time,UNIX_TIMESTAMP(last_call_time),UNIX_TIMESTAMP(last_call_finish) from vicidial_live_agents where server_ip='$server_ip' order by extension;";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$talking_to_print = mysql_num_rows($rslt);
|
||||
if ($talking_to_print > 0)
|
||||
{
|
||||
$i=0;
|
||||
$agentcount=0;
|
||||
while ($i < $talking_to_print)
|
||||
{
|
||||
$row=mysql_fetch_row($rslt);
|
||||
if (eregi("READY|PAUSED",$row[4]))
|
||||
{
|
||||
$row[3]='';
|
||||
$row[5]='- ΑΝΑΜΟΝΗ -';
|
||||
$row[6]=$row[7];
|
||||
}
|
||||
$extension = sprintf("%-10s", $row[0]);
|
||||
$user = sprintf("%-6s", $row[1]);
|
||||
$sessionid = sprintf("%-9s", $row[2]);
|
||||
$channel = sprintf("%-10s", $row[3]);
|
||||
$cc=0;
|
||||
while ( (strlen($channel) > 10) and ($cc < 100) )
|
||||
{
|
||||
$channel = eregi_replace(".$","",$channel);
|
||||
$cc++;
|
||||
if (strlen($channel) <= 10) {$cc=101;}
|
||||
}
|
||||
$status = sprintf("%-6s", $row[4]);
|
||||
$start_time = sprintf("%-19s", $row[5]);
|
||||
$call_time_S = ($STARTtime - $row[6]);
|
||||
|
||||
$call_time_M = ($call_time_S / 60);
|
||||
$call_time_M = round($call_time_M, 2);
|
||||
$call_time_M_int = intval("$call_time_M");
|
||||
$call_time_SEC = ($call_time_M - $call_time_M_int);
|
||||
$call_time_SEC = ($call_time_SEC * 60);
|
||||
$call_time_SEC = round($call_time_SEC, 0);
|
||||
if ($call_time_SEC < 10) {$call_time_SEC = "0$call_time_SEC";}
|
||||
$call_time_MS = "$call_time_M_int:$call_time_SEC";
|
||||
$call_time_MS = sprintf("%7s", $call_time_MS);
|
||||
$G = ''; $EG = '';
|
||||
if ($call_time_M_int >= 5) {$G='<SPAN class="blue"><B>'; $EG='</B></SPAN>';}
|
||||
if ($call_time_M_int >= 10) {$G='<SPAN class="purple"><B>'; $EG='</B></SPAN>';}
|
||||
if (eregi("PAUSED",$row[4]))
|
||||
{
|
||||
if ($call_time_M_int >= 1)
|
||||
{$i++; continue;}
|
||||
else
|
||||
{$G='<SPAN class="yellow"><B>'; $EG='</B></SPAN>';}
|
||||
}
|
||||
|
||||
$agentcount++;
|
||||
echo "| $G$extension$EG | $G$user$EG | $G$sessionid$EG | $G$channel$EG | $G$status$EG | $G$start_time$EG | $G$call_time_MS$EG |\n";
|
||||
|
||||
$i++;
|
||||
}
|
||||
|
||||
echo "+------------|--------+-----------+------------+--------+---------------------+---------+\n";
|
||||
echo " $agentcount Χρήστες συνδεμένοι στον διακομιστή $server_ip\n\n";
|
||||
|
||||
echo " <SPAN class=\"yellow\"><B> </SPAN> - Χρήστες σε παύση</B>\n";
|
||||
echo " <SPAN class=\"blue\"><B> </SPAN> - 5 λεπτά ή παραπάνω σε κλήση</B>\n";
|
||||
echo " <SPAN class=\"purple\"><B> </SPAN> - Πάνω από 10 λεπτά σε κλήση</B>\n";
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "**************************************************************************************\n";
|
||||
echo "**************************************************************************************\n";
|
||||
echo "********************************* ΚΑΝΕΝΑΣ ΧΡΗΣΤΗΣ ΣΕ ΚΛΗΣΕΙΣ*********************************\n";
|
||||
echo "**************************************************************************************\n";
|
||||
echo "**************************************************************************************\n";
|
||||
}
|
||||
|
||||
|
||||
###################################################################################
|
||||
###### OUTBOUND CALLS
|
||||
###################################################################################
|
||||
echo "\n\n";
|
||||
echo "----------------------------------------------------------------------------------------";
|
||||
echo "\n\n";
|
||||
echo "VICIDIAL: Time On VDAD $NOW_TIME\n\n";
|
||||
echo "+------------+--------+----------+--------------------+---------------------+---------+\n";
|
||||
echo "| CHANNEL | STATUS | CAMPAIGN | PHONE NUMBER | START TIME | MINUTES |\n";
|
||||
echo "+------------+--------+----------+--------------------+---------------------+---------+\n";
|
||||
|
||||
#$link=mysql_connect("localhost", "cron", "1234");
|
||||
# $linkX=mysql_connect("localhost", "cron", "1234");
|
||||
#mysql_select_db("asterisk");
|
||||
|
||||
$stmt="select channel,status,campaign_id,phone_code,phone_number,call_time,UNIX_TIMESTAMP(call_time) from vicidial_auto_calls where status NOT IN('XFER') and server_ip='$server_ip' order by auto_call_id;";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$parked_to_print = mysql_num_rows($rslt);
|
||||
if ($parked_to_print > 0)
|
||||
{
|
||||
$i=0;
|
||||
while ($i < $parked_to_print)
|
||||
{
|
||||
$row=mysql_fetch_row($rslt);
|
||||
|
||||
$channel = sprintf("%-10s", $row[0]);
|
||||
$cc=0;
|
||||
while ( (strlen($channel) > 10) and ($cc < 100) )
|
||||
{
|
||||
$channel = eregi_replace(".$","",$channel);
|
||||
$cc++;
|
||||
if (strlen($channel) <= 10) {$cc=101;}
|
||||
}
|
||||
$status = sprintf("%-6s", $row[1]);
|
||||
$campaign = sprintf("%-8s", $row[2]);
|
||||
$all_phone = "$row[3]$row[4]";
|
||||
$number_dialed = sprintf("%-18s", $all_phone);
|
||||
$start_time = sprintf("%-19s", $row[5]);
|
||||
$call_time_S = ($STARTtime - $row[6]);
|
||||
|
||||
$call_time_M = ($call_time_S / 60);
|
||||
$call_time_M = round($call_time_M, 2);
|
||||
$call_time_M_int = intval("$call_time_M");
|
||||
$call_time_SEC = ($call_time_M - $call_time_M_int);
|
||||
$call_time_SEC = ($call_time_SEC * 60);
|
||||
$call_time_SEC = round($call_time_SEC, 0);
|
||||
if ($call_time_SEC < 10) {$call_time_SEC = "0$call_time_SEC";}
|
||||
$call_time_MS = "$call_time_M_int:$call_time_SEC";
|
||||
$call_time_MS = sprintf("%7s", $call_time_MS);
|
||||
$G = ''; $EG = '';
|
||||
if (eregi("LIVE",$status)) {$G='<SPAN class="green"><B>'; $EG='</B></SPAN>';}
|
||||
# if ($call_time_M_int >= 6) {$G='<SPAN class="red"><B>'; $EG='</B></SPAN>';}
|
||||
|
||||
echo "| $G$channel$EG | $G$status$EG | $G$campaign$EG | $G$number_dialed$EG | $G$start_time$EG | $G$call_time_MS$EG |\n";
|
||||
|
||||
$i++;
|
||||
}
|
||||
|
||||
echo "+------------+--------+----------+--------------------+---------------------+---------+\n";
|
||||
echo " $i κλήσεις που τοποθετήθηκαν στον διακομιστή $server_ip\n\n";
|
||||
|
||||
echo " <SPAN class=\"green\"><B> </SPAN> - ΑΝΑΜΟΝΗ ΕΝΕΡΓΗΣ ΚΛΗΣΗΣ</B>\n";
|
||||
# echo " <SPAN class=\"red\"><B> </SPAN> - Over 5 minutes on hold</B>\n";
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "***************************************************************************************\n";
|
||||
echo "***************************************************************************************\n";
|
||||
echo "*******************************ΔΕΝ ΥΠΑΡΧΟΥΝ ΕΝΕΡΓΕΣ ΚΛΗΣΕΙΣ ΣΕ ΑΝΑΜΟΝΗ*********************************\n";
|
||||
echo "***************************************************************************************\n";
|
||||
echo "***************************************************************************************\n";
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
</PRE>
|
||||
|
||||
</BODY></HTML>
|
||||
@@ -1,289 +0,0 @@
|
||||
<?
|
||||
header ("Content-type: text/html; charset=utf-8");
|
||||
|
||||
require("dbconnect.php");
|
||||
|
||||
##### depricated
|
||||
#require_once("htglobalize.php");
|
||||
|
||||
$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER'];
|
||||
$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW'];
|
||||
$PHP_SELF=$_SERVER['PHP_SELF'];
|
||||
$server_ip=$_GET["server_ip"]; if (!$server_ip) {$server_ip=$_POST["server_ip"];}
|
||||
$reset_counter=$_GET["reset_counter"]; if (!$reset_counter) {$reset_counter=$_POST["reset_counter"];}
|
||||
$submit=$_GET["submit"]; if (!$submit) {$submit=$_POST["submit"];}
|
||||
$ΕΠΙΒΕΒΑΙΩΣΗ=$_GET["ΕΠΙΒΕΒΑΙΩΣΗ"]; if (!$ΕΠΙΒΕΒΑΙΩΣΗ) {$ΕΠΙΒΕΒΑΙΩΣΗ=$_POST["ΕΠΙΒΕΒΑΙΩΣΗ"];}
|
||||
|
||||
# AST_timeonVDAD_closer.php
|
||||
# live real-time stats for the VICIDIAL Auto-Dialer
|
||||
|
||||
$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";
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<?
|
||||
echo "<STYLE type=\"text/css\">\n";
|
||||
echo "<!--\n";
|
||||
$stmt="select group_id,group_color from vicidial_inbound_groups;";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$groups_to_print = mysql_num_rows($rslt);
|
||||
if ($groups_to_print > 0)
|
||||
{
|
||||
$g=0;
|
||||
while ($g < $groups_to_print)
|
||||
{
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$group_id[$g] = $row[0];
|
||||
$group_color[$g] = $row[1];
|
||||
echo " .$group_id[$g] {color: black; background-color: $group_color[$g]}\n";
|
||||
$g++;
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
.DEAD {color: white; background-color: black}
|
||||
.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=iso-8859-1\">\n";
|
||||
echo"<META HTTP-EQUIV=Refresh CONTENT=\"4; URL=$PHP_SELF?server_ip=$server_ip&DB=$DB&reset_counter=$reset_counter\">\n";
|
||||
echo "<TITLE>VICIDIAL: Time On VDAD</TITLE></HEAD><BODY BGCOLOR=WHITE>\n";
|
||||
echo "<PRE><FONT SIZE=3>\n\n";
|
||||
|
||||
###################################################################################
|
||||
###### TIME ON SYSTEM
|
||||
###################################################################################
|
||||
|
||||
echo "VICIDIAL: Χρόνος χρηστών σε κλήσεις $NOW_TIME\n\n";
|
||||
echo "+------------|--------+-----------+---------------------+--------+----------+---------+--------------+--------+\n";
|
||||
echo "| STATION | USER | SESSIONID | CHANNEL | STATUS | CALLTIME | MINUTES | CAMPAIGN | FRONT |\n";
|
||||
echo "+------------|--------+-----------+---------------------+--------+----------+---------+--------------+--------+\n";
|
||||
|
||||
|
||||
$stmt="select extension,user,conf_exten,channel,status,last_call_time,UNIX_TIMESTAMP(last_call_time),UNIX_TIMESTAMP(last_call_finish),uniqueid,lead_id from vicidial_live_agents where status NOT IN('PAUSED') and server_ip='$server_ip' order by extension;";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$talking_to_print = mysql_num_rows($rslt);
|
||||
if ($talking_to_print > 0)
|
||||
{
|
||||
$i=0;
|
||||
while ($i < $talking_to_print)
|
||||
{
|
||||
$row=mysql_fetch_row($rslt);
|
||||
if (eregi("READY|PAUSED|CLOSER",$row[4]))
|
||||
{
|
||||
$row[3]='';
|
||||
$row[5]='- WAIT -';
|
||||
$row[6]=$row[7];
|
||||
}
|
||||
$extension[$i] = sprintf("%-10s", $row[0]);
|
||||
$user[$i] = sprintf("%-6s", $row[1]);
|
||||
$sessionid[$i] = sprintf("%-9s", $row[2]);
|
||||
$channel[$i] = sprintf("%-19s", $row[3]);
|
||||
$cc[$i]=0;
|
||||
while ( (strlen($channel[$i]) > 19) and ($cc[$i] < 100) )
|
||||
{
|
||||
$channel[$i] = eregi_replace(".$","",$channel[$i]);
|
||||
$cc[$i]++;
|
||||
if (strlen($channel[$i]) <= 19) {$cc[$i]=101;}
|
||||
}
|
||||
$status[$i] = sprintf("%-6s", $row[4]);
|
||||
$start_time[$i] = sprintf("%-8s", $row[5]);
|
||||
$cd[$i]=0;
|
||||
while ( (strlen($start_time[$i]) > 8) and ($cd[$i] < 100) )
|
||||
{
|
||||
$start_time[$i] = eregi_replace("^.","",$start_time[$i]);
|
||||
$cd[$i]++;
|
||||
if (strlen($start_time[$i]) <= 8) {$cd[$i]=101;}
|
||||
}
|
||||
$uniqueid[$i] = $row[8];
|
||||
$lead_id[$i] = $row[9];
|
||||
$closer[$i] = $row[1];
|
||||
$call_time_S[$i] = ($STARTtime - $row[6]);
|
||||
|
||||
$call_time_M[$i] = ($call_time_S[$i] / 60);
|
||||
$call_time_M[$i] = round($call_time_M[$i], 2);
|
||||
$call_time_M_int[$i] = intval("$call_time_M[$i]");
|
||||
$call_time_SEC[$i] = ($call_time_M[$i] - $call_time_M_int[$i]);
|
||||
$call_time_SEC[$i] = ($call_time_SEC[$i] * 60);
|
||||
$call_time_SEC[$i] = round($call_time_SEC[$i], 0);
|
||||
if ($call_time_SEC[$i] < 10) {$call_time_SEC[$i] = "0$call_time_SEC[$i]";}
|
||||
$call_time_MS[$i] = "$call_time_M_int[$i]:$call_time_SEC[$i]";
|
||||
$call_time_MS[$i] = sprintf("%7s", $call_time_MS[$i]);
|
||||
$i++;
|
||||
}
|
||||
$ext_count = $i;
|
||||
$i=0;
|
||||
while ($i < $ext_count)
|
||||
{
|
||||
|
||||
$stmt="select campaign_id from vicidial_auto_calls where uniqueid='$uniqueid[$i]' and server_ip='$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="<SPAN class=\"$camp_color\"><B>"; $EG='</B></SPAN>';
|
||||
# if ($call_time_M_int[$i] >= 5) {$G='<SPAN class="blue"><B>'; $EG='</B></SPAN>';}
|
||||
# if ($call_time_M_int[$i] >= 10) {$G='<SPAN class="purple"><B>'; $EG='</B></SPAN>';}
|
||||
|
||||
echo "| $G$extension[$i]$EG | $G$user[$i]$EG | $G$sessionid[$i]$EG | $G$channel[$i]$EG | $G$status[$i]$EG | $G$start_time[$i]$EG | $G$call_time_MS[$i]$EG | $G$campaign$EG | $G$fronter$EG |\n";
|
||||
|
||||
$i++;
|
||||
}
|
||||
|
||||
echo "+------------|--------+-----------+---------------------+--------+----------+---------+--------------+--------+\n";
|
||||
echo " $i Χρήστες συνδεμένοι στον διακομιστή $server_ip\n\n";
|
||||
|
||||
# echo " <SPAN class=\"blue\"><B> </SPAN> - 5 λεπτά ή παραπάνω σε κλήση</B>\n";
|
||||
# echo " <SPAN class=\"purple\"><B> </SPAN> - Πάνω από 10 λεπτά σε κλήση</B>\n";
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "**************************************************************************************\n";
|
||||
echo "**************************************************************************************\n";
|
||||
echo "********************************* ΚΑΝΕΝΑΣ ΧΡΗΣΤΗΣ ΣΕ ΚΛΗΣΕΙΣ*********************************\n";
|
||||
echo "**************************************************************************************\n";
|
||||
echo "**************************************************************************************\n";
|
||||
}
|
||||
|
||||
|
||||
###################################################################################
|
||||
###### OUTBOUND CALLS
|
||||
###################################################################################
|
||||
#echo "\n\n";
|
||||
echo "----------------------------------------------------------------------------------------";
|
||||
echo "\n\n";
|
||||
echo "VICIDIAL: Time On VDAD $NOW_TIME\n\n";
|
||||
echo "+---------------------+--------+--------------+--------------------+----------+---------+\n";
|
||||
echo "| CHANNEL | STATUS | CAMPAIGN | PHONE NUMBER | CALLTIME | MINUTES |\n";
|
||||
echo "+---------------------+--------+--------------+--------------------+----------+---------+\n";
|
||||
|
||||
#$link=mysql_connect("localhost", "cron", "1234");
|
||||
# $linkX=mysql_connect("localhost", "cron", "1234");
|
||||
#mysql_select_db("asterisk");
|
||||
|
||||
$stmt="select channel,status,campaign_id,phone_code,phone_number,call_time,UNIX_TIMESTAMP(call_time) from vicidial_auto_calls where status NOT IN('XFER') and server_ip='$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='<SPAN class="green"><B>'; $EG='</B></SPAN>';}
|
||||
# if ($call_time_M_int >= 6) {$G='<SPAN class="red"><B>'; $EG='</B></SPAN>';}
|
||||
|
||||
echo "| $G$channel$EG | $G$status$EG | $G$campaign$EG | $G$number_dialed$EG | $G$start_time$EG | $G$call_time_MS$EG |\n";
|
||||
|
||||
$i++;
|
||||
}
|
||||
|
||||
echo "+---------------------+--------+--------------+--------------------+----------+---------+\n";
|
||||
echo " $i κλήσεις που τοποθετήθηκαν στον διακομιστή $server_ip\n\n";
|
||||
|
||||
echo " <SPAN class=\"green\"><B> </SPAN> - ΑΝΑΜΟΝΗ ΕΝΕΡΓΗΣ ΚΛΗΣΗΣ</B>\n";
|
||||
# echo " <SPAN class=\"red\"><B> </SPAN> - Over 5 minutes on hold</B>\n";
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "***************************************************************************************\n";
|
||||
echo "***************************************************************************************\n";
|
||||
echo "*******************************ΔΕΝ ΥΠΑΡΧΟΥΝ ΕΝΕΡΓΕΣ ΚΛΗΣΕΙΣ ΣΕ ΑΝΑΜΟΝΗ*********************************\n";
|
||||
echo "***************************************************************************************\n";
|
||||
echo "***************************************************************************************\n";
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
</PRE>
|
||||
|
||||
</BODY></HTML>
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,321 +0,0 @@
|
||||
<?
|
||||
### admin_modify_lead.php
|
||||
###
|
||||
### Copyright (C) 2006 Matt Florell <vicidial@gmail.com> LICENSE: GPLv2
|
||||
###
|
||||
|
||||
require("dbconnect.php");
|
||||
|
||||
$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER'];
|
||||
$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW'];
|
||||
$PHP_SELF=$_SERVER['PHP_SELF'];
|
||||
$vendor_id=$_GET["vendor_id"]; if (!$vendor_id) {$vendor_id=$_POST["vendor_id"];}
|
||||
$phone=$_GET["phone"]; if (!$phone) {$phone=$_POST["phone"];}
|
||||
$lead_id=$_GET["lead_id"]; if (!$lead_id) {$lead_id=$_POST["lead_id"];}
|
||||
$first_name=$_GET["first_name"]; if (!$first_name) {$first_name=$_POST["first_name"];}
|
||||
$last_name=$_GET["last_name"]; if (!$last_name) {$last_name=$_POST["last_name"];}
|
||||
$phone_number=$_GET["phone_number"]; if (!$phone_number) {$phone_number=$_POST["phone_number"];}
|
||||
$end_call=$_GET["end_call"]; if (!$end_call) {$end_call=$_POST["end_call"];}
|
||||
$DB=$_GET["DB"]; if (!$DB) {$DB=$_POST["DB"];}
|
||||
$dispo=$_GET["dispo"]; if (!$dispo) {$dispo=$_POST["dispo"];}
|
||||
$list_id=$_GET["list_id"]; if (!$list_id) {$list_id=$_POST["list_id"];}
|
||||
$campaign_id=$_GET["campaign_id"]; if (!$campaign_id) {$campaign_id=$_POST["campaign_id"];}
|
||||
$phone_code=$_GET["phone_code"]; if (!$phone_code) {$phone_code=$_POST["phone_code"];}
|
||||
$server_ip=$_GET["server_ip"]; if (!$server_ip) {$server_ip=$_POST["server_ip"];}
|
||||
$extension=$_GET["extension"]; if (!$extension) {$extension=$_POST["extension"];}
|
||||
$channel=$_GET["channel"]; if (!$channel) {$channel=$_POST["channel"];}
|
||||
$call_began=$_GET["call_began"]; if (!$call_began) {$call_began=$_POST["call_began"];}
|
||||
$parked_time=$_GET["parked_time"]; if (!$parked_time) {$parked_time=$_POST["parked_time"];}
|
||||
$tsr=$_GET["tsr"]; if (!$tsr) {$tsr=$_POST["tsr"];}
|
||||
$address1=$_GET["address1"]; if (!$address1) {$address1=$_POST["address1"];}
|
||||
$address2=$_GET["address2"]; if (!$address2) {$address2=$_POST["address2"];}
|
||||
$address3=$_GET["address3"]; if (!$address3) {$address3=$_POST["address3"];}
|
||||
$city=$_GET["city"]; if (!$city) {$city=$_POST["city"];}
|
||||
$state=$_GET["state"]; if (!$state) {$state=$_POST["state"];}
|
||||
$postal_code=$_GET["postal_code"]; if (!$postal_code) {$postal_code=$_POST["postal_code"];}
|
||||
$province=$_GET["province"]; if (!$province) {$province=$_POST["province"];}
|
||||
$country_code=$_GET["country_code"]; if (!$country_code) {$country_code=$_POST["country_code"];}
|
||||
$alt_phone=$_GET["alt_phone"]; if (!$alt_phone) {$alt_phone=$_POST["alt_phone"];}
|
||||
$email=$_GET["email"]; if (!$email) {$email=$_POST["email"];}
|
||||
$security=$_GET["security"]; if (!$security) {$security=$_POST["security"];}
|
||||
$comments=$_GET["comments"]; if (!$comments) {$comments=$_POST["comments"];}
|
||||
$status=$_GET["status"]; if (!$status) {$status=$_POST["status"];}
|
||||
$submit=$_GET["submit"]; if (!$submit) {$submit=$_POST["submit"];}
|
||||
$ΕΠΙΒΕΒΑΙΩΣΗ=$_GET["ΕΠΙΒΕΒΑΙΩΣΗ"]; if (!$ΕΠΙΒΕΒΑΙΩΣΗ) {$ΕΠΙΒΕΒΑΙΩΣΗ=$_POST["ΕΠΙΒΕΒΑΙΩΣΗ"];}
|
||||
|
||||
### 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
|
||||
|
||||
|
||||
$STARTtime = date("U");
|
||||
$TODAY = date("Y-m-d");
|
||||
$NOW_TIME = date("Y-m-d H:i:s");
|
||||
|
||||
|
||||
$stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 7;";
|
||||
if ($DB) {echo "|$stmt|\n";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$auth=$row[0];
|
||||
|
||||
if ($WeBRooTWritablE > 0)
|
||||
{$fp = fopen ("./project_auth_entries.txt", "a");}
|
||||
|
||||
$date = date("r");
|
||||
$ip = getenv("REMOTE_ADDR");
|
||||
$browser = getenv("HTTP_USER_AGENT");
|
||||
|
||||
if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or (!$auth))
|
||||
{
|
||||
Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\"");
|
||||
Header("HTTP/1.0 401 Unauthorized");
|
||||
echo "Ακυρο Ονομα Χρήστη/Κωδικός Πρόσβασης: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n";
|
||||
exit;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
if($auth>0)
|
||||
{
|
||||
$office_no=strtoupper($PHP_AUTH_USER);
|
||||
$password=strtoupper($PHP_AUTH_PW);
|
||||
$stmt="SELECT full_name,modify_leads from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW'";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$LOGfullname =$row[0];
|
||||
$LOGmodify_leads =$row[1];
|
||||
|
||||
if ($WeBRooTWritablE > 0)
|
||||
{
|
||||
fwrite ($fp, "VICIDIAL|GOOD|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|$LOGfullname|\n");
|
||||
fclose($fp);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if ($WeBRooTWritablE > 0)
|
||||
{
|
||||
fwrite ($fp, "VICIDIAL|FAIL|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|\n");
|
||||
fclose($fp);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
<html>
|
||||
<head>
|
||||
<title>VICIDIAL ΔΙΑΧ: Τροποποίηση καθοδήγησης</title>
|
||||
</head>
|
||||
<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0>
|
||||
<CENTER><FONT FACE="Courier" COLOR=BLACK SIZE=3>
|
||||
|
||||
<?
|
||||
|
||||
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('$lead_id','$list_id','$campaign_id','$parked_time','$call_began','$STARTtime','$call_length','$status','$phone_code','$phone_number','$PHP_AUTH_USER','$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='$status',first_name='$first_name',last_name='$last_name',address1='$address1',address2='$address2',address3='$address3',city='$city',state='$state',province='$province',postal_code='$postal_code',country_code='$country_code',alt_phone='$alt_phone',email='$email',security_phrase='$security',comments='$comments' where lead_id='$lead_id'";
|
||||
if ($DB) {echo "|$stmt|\n";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
|
||||
echo "Οι πληροφορίες τροποποιήθηκαν<BR><BR>\n";
|
||||
echo "<form><input type=button value=\"Κλείστε αυτό το Παράθυρο\" onClick=\"javascript:window.close();\"></form>\n";
|
||||
|
||||
if ( ($dispo != $status) and ($dispo == 'CBHOLD') )
|
||||
{
|
||||
### inactivate vicidial_callbacks record for this lead
|
||||
$stmt="UPDATE vicidial_callbacks set status='INACTIVE' where lead_id='$lead_id' and status='ACTIVE';";
|
||||
if ($DB) {echo "|$stmt|\n";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
|
||||
echo "<BR>vicidial_callback record inactivated: $lead_id<BR>\n";
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
$stmt="SELECT count(*) from vicidial_list where lead_id='$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='$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 "<br>Πληροφορίες Κλήσης: $first_name $last_name - $phone_number<br><br><form action=$PHP_SELF method=POST>\n";
|
||||
echo "<input type=hidden name=end_call value=1>\n";
|
||||
echo "<input type=hidden name=DB value=\"$DB\">\n";
|
||||
echo "<input type=hidden name=lead_id value=\"$lead_id\">\n";
|
||||
echo "<input type=hidden name=dispo value=\"$dispo\">\n";
|
||||
echo "<input type=hidden name=list_id value=\"$list_id\">\n";
|
||||
echo "<input type=hidden name=campaign_id value=\"$campaign_id\">\n";
|
||||
echo "<input type=hidden name=phone_code value=\"$phone_code\">\n";
|
||||
echo "<input type=hidden name=phone_number value=\"$phone_number\">\n";
|
||||
echo "<input type=hidden name=server_ip value=\"$server_ip\">\n";
|
||||
echo "<input type=hidden name=extension value=\"$extension\">\n";
|
||||
echo "<input type=hidden name=channel value=\"$channel\">\n";
|
||||
echo "<input type=hidden name=call_began value=\"$call_began\">\n";
|
||||
echo "<input type=hidden name=parked_time value=\"$parked_time\">\n";
|
||||
echo "<table cellpadding=1 cellspacing=0>\n";
|
||||
echo "<tr><td colspan=2>Vendor ID: $vendor_id Lead ID: $lead_id</td></tr>\n";
|
||||
echo "<tr><td colspan=2>Fronter: <A HREF=\"user_stats.php?user=$tsr\">$tsr</A> ID Λίστας: $list_id</td></tr>\n";
|
||||
echo "<tr><td align=right>Ονομα: </td><td align=left><input type=text name=first_name size=15 maxlength=30 value=\"$first_name\"> \n";
|
||||
echo " Επίθετο: <input type=text name=last_name size=15 maxlength=30 value=\"$last_name\"> </td></tr>\n";
|
||||
echo "<tr><td align=rightΔιεύθυνση1 : </td><td align=left><input type=text name=address1 size=30 maxlength=30 value=\"$address1\"></td></tr>\n";
|
||||
echo "<tr><td align=rightΔιεύθυνση2 : </td><td align=left><input type=text name=address2 size=30 maxlength=30 value=\"$address2\"></td></tr>\n";
|
||||
echo "<tr><td align=rightΔιεύθυνση3 : </td><td align=left><input type=text name=address3 size=30 maxlength=30 value=\"$address3\"></td></tr>\n";
|
||||
echo "<tr><td align=right>Πόλη : </td><td align=left><input type=text name=city size=30 maxlength=30 value=\"$city\"></td></tr>\n";
|
||||
echo "<tr><td align=rightΚράτος </td><td align=left><input type=text name=state size=2 maxlength=2 value=\"$state\"> \n";
|
||||
echo " Ταχ.Κωδ.: <input type=text name=postal_code size=10 maxlength=10 value=\"$postal_code\"> </td></tr>\n";
|
||||
|
||||
echo "<tr><td align=right>Επαρχία : </td><td align=left><input type=text name=province size=30 maxlength=30 value=\"$province\"></td></tr>\n";
|
||||
echo "<tr><td align=right>Χώρα : </td><td align=left><input type=text name=country_code size=3 maxlength=3 value=\"$country_code\"></td></tr>\n";
|
||||
echo "<tr><td align=rightΕναλ/κό Τηλέφωνο: </td><td align=left><input type=text name=alt_phone size=10 maxlength=10 value=\"$alt_phone\"></td></tr>\n";
|
||||
echo "<tr><td align=rightΗλεκτρονικό ταχυδρομείο: </td><td align=left><input type=text name=email size=30 maxlength=50 value=\"$email\"></td></tr>\n";
|
||||
echo "<tr><td align=rightΑσφάλεια: </td><td align=left><input type=text name=security size=30 maxlength=100 value=\"$security\"></td></tr>\n";
|
||||
echo "<tr><td align=right>Σχόλια : </td><td align=left><input type=text name=comments size=30 maxlength=255 value=\"$comments\"></td></tr>\n";
|
||||
echo "<tr bgcolor=#B6D3FC><td align=right>Τερματισμός </td><td align=left><select size=1 name=status>\n";
|
||||
|
||||
$stmt="SELECT * from vicidial_statuses where selectable='Y' order by status";
|
||||
$rsltx=mysql_query($stmt, $link);
|
||||
$statuses_to_print = mysql_num_rows($rsltx);
|
||||
$statuses_list='';
|
||||
|
||||
$o=0;
|
||||
$DS=0;
|
||||
while ($statuses_to_print > $o)
|
||||
{
|
||||
$rowx=mysql_fetch_row($rsltx);
|
||||
if ($dispo == "$rowx[0]")
|
||||
{$statuses_list .= "<option SELECTED value=\"$rowx[0]\">$rowx[0] - $rowx[1]</option>\n"; $DS++;}
|
||||
else
|
||||
{$statuses_list .= "<option value=\"$rowx[0]\">$rowx[0] - $rowx[1]</option>\n";}
|
||||
$o++;
|
||||
}
|
||||
if ($DS < 1) {$statuses_list .= "<option SELECTED value=\"$dispo\">$dispo</option>\n";}
|
||||
echo "$statuses_list";
|
||||
echo "</select></td></tr>\n";
|
||||
|
||||
|
||||
echo "<tr><td colspan=2><input type=submit name=submit value=\"ΕΠΙΒΕΒΑΙΩΣΗ\"></td></tr>\n";
|
||||
echo "</table></form>\n";
|
||||
echo "<BR><BR><BR>\n";
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "ΑΠΟΤΥΧΙΑ ψαξίματος καθοδήγησης για lead_id $lead_id $NOW_TIME\n<BR><BR>\n";
|
||||
# echo "<a href=\"$PHP_SELF\">Close this window</a>\n<BR><BR>\n";
|
||||
}
|
||||
|
||||
|
||||
|
||||
echo "<br><br>\n";
|
||||
|
||||
echo "<center>\n";
|
||||
|
||||
echo "<B>Κλήσεις για αυτή την καθοδήγηση:</B>\n";
|
||||
echo "<TABLE width=550 cellspacing=0 cellpadding=1>\n";
|
||||
echo "<tr><td><font size=2>DATE/TIME </td><td align=left><font size=2>LENGTH</td><td align=left><font size=2> STATUS</td><td align=left><font size=2> TSR</td><td align=right><font size=2>ΕΚΣΤΡΑΤΕΙΑ</td><td align=right><font size=2> LIST</td><td align=right><font size=2> LEAD</td></tr>\n";
|
||||
|
||||
$stmt="select * from vicidial_log where lead_id='$lead_id' order by uniqueid desc limit 50;";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
$logs_to_print = mysql_num_rows($rslt);
|
||||
|
||||
$u=0;
|
||||
while ($logs_to_print > $u) {
|
||||
$row=mysql_fetch_row($rslt);
|
||||
if (eregi("1$|3$|5$|7$|9$", $u))
|
||||
{$bgcolor='bgcolor="#B9CBFD"';}
|
||||
else
|
||||
{$bgcolor='bgcolor="#9BB9FB"';}
|
||||
|
||||
echo "<tr $bgcolor><td><font size=2>$row[4]</td>";
|
||||
echo "<td align=left><font size=2> $row[7]</td>\n";
|
||||
echo "<td align=left><font size=2> $row[8]</td>\n";
|
||||
echo "<td align=left><font size=2> <A HREF=\"user_stats.php?user=$row[11]\" target=\"_blank\">$row[11]</A> </td>\n";
|
||||
echo "<td align=right><font size=2> $row[3] </td>\n";
|
||||
echo "<td align=right><font size=2> $row[2] </td>\n";
|
||||
echo "<td align=right><font size=2> $row[1] </td></tr>\n";
|
||||
|
||||
$u++;
|
||||
}
|
||||
|
||||
|
||||
echo "</TABLE></center>\n";
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
$ENDtime = date("U");
|
||||
|
||||
$RUNtime = ($ENDtime - $STARTtime);
|
||||
|
||||
echo "\n\n\n<br><br><br>\n\n";
|
||||
|
||||
|
||||
echo "<font size=0>\n\n\n<br><br><br>\nδιαδικασία που τρέχει: $RUNtime seconds</font>";
|
||||
|
||||
|
||||
?>
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
<?
|
||||
|
||||
exit;
|
||||
|
||||
|
||||
|
||||
?>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,185 +0,0 @@
|
||||
<?
|
||||
### admin_search_lead.php
|
||||
###
|
||||
### Copyright (C) 2006 Matt Florell <vicidial@gmail.com> LICENSE: GPLv2
|
||||
###
|
||||
|
||||
require("dbconnect.php");
|
||||
|
||||
$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER'];
|
||||
$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW'];
|
||||
$PHP_SELF=$_SERVER['PHP_SELF'];
|
||||
$vendor_id=$_GET["vendor_id"]; if (!$vendor_id) {$vendor_id=$_POST["vendor_id"];}
|
||||
$phone=$_GET["phone"]; if (!$phone) {$phone=$_POST["phone"];}
|
||||
$lead_id=$_GET["lead_id"]; if (!$lead_id) {$lead_id=$_POST["lead_id"];}
|
||||
$submit=$_GET["submit"]; if (!$submit) {$submit=$_POST["submit"];}
|
||||
$ΕΠΙΒΕΒΑΙΩΣΗ=$_GET["ΕΠΙΒΕΒΑΙΩΣΗ"]; if (!$ΕΠΙΒΕΒΑΙΩΣΗ) {$ΕΠΙΒΕΒΑΙΩΣΗ=$_POST["ΕΠΙΒΕΒΑΙΩΣΗ"];}
|
||||
|
||||
### 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
|
||||
|
||||
|
||||
$STARTtime = date("U");
|
||||
$TODAY = date("Y-m-d");
|
||||
$NOW_TIME = date("Y-m-d H:i:s");
|
||||
|
||||
|
||||
$stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 7;";
|
||||
if ($DB) {echo "|$stmt|\n";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$auth=$row[0];
|
||||
|
||||
if ($WeBRooTWritablE > 0)
|
||||
{$fp = fopen ("./project_auth_entries.txt", "a");}
|
||||
|
||||
$date = date("r");
|
||||
$ip = getenv("REMOTE_ADDR");
|
||||
$browser = getenv("HTTP_USER_AGENT");
|
||||
|
||||
if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or (!$auth))
|
||||
{
|
||||
Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\"");
|
||||
Header("HTTP/1.0 401 Unauthorized");
|
||||
echo "Ακυρο Ονομα Χρήστη/Κωδικός Πρόσβασης: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n";
|
||||
exit;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
if($auth>0)
|
||||
{
|
||||
$office_no=strtoupper($PHP_AUTH_USER);
|
||||
$password=strtoupper($PHP_AUTH_PW);
|
||||
$stmt="SELECT full_name,modify_leads from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW'";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$LOGfullname =$row[0];
|
||||
$LOGmodify_leads =$row[1];
|
||||
|
||||
if ($WeBRooTWritablE > 0)
|
||||
{
|
||||
fwrite ($fp, "VICIDIAL|GOOD|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|$LOGfullname|\n");
|
||||
fclose($fp);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if ($WeBRooTWritablE > 0)
|
||||
{
|
||||
fwrite ($fp, "VICIDIAL|FAIL|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|\n");
|
||||
fclose($fp);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
<html>
|
||||
<head>
|
||||
<title>VICIDIAL ΔΙΑΧ: Αναζήτηση Καθοδήγησης</title>
|
||||
</head>
|
||||
<title>Ψάξιμο Καθοδήγησης</title>
|
||||
</head>
|
||||
<body bgcolor=white>
|
||||
|
||||
<?
|
||||
|
||||
if ( (!$vendor_id) and (!$phone) and (!$lead_id) )
|
||||
{
|
||||
echo date("l F j, Y G:i:s A");
|
||||
echo "\n<br><br><center>\n";
|
||||
echo "<form method=post name=search action=\"$PHP_SELF\">\n";
|
||||
echo "<b>Παρακαλώ καταχωρήστε:<br> Vendor ID(αυτόματος κωδικός καθοδήγησης): <input type=text name=vendor_id size=10 maxlength=10> or \n";
|
||||
echo "<br><b>ένας αριθμός τηλεφώνου σπιτιού <input type=text name=phone size=10 maxlength=10> or\n";
|
||||
echo "<br><b>ID καθοδήγησης <input type=text name=lead_id size=10 maxlength=10> <br><br>\n";
|
||||
echo "<input type=submit name=submit value=ΕΠΙΒΕΒΑΙΩΣΗ></b>\n";
|
||||
echo "</form>\n</center>\n";
|
||||
echo "</body></html>\n";
|
||||
exit;
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
|
||||
if ($vendor_id)
|
||||
{
|
||||
$stmt="SELECT * from vicidial_list where vendor_lead_code='$vendor_id'";
|
||||
}
|
||||
else
|
||||
{
|
||||
if ($phone)
|
||||
{
|
||||
$stmt="SELECT * from vicidial_list where phone_number='$phone'";
|
||||
}
|
||||
else
|
||||
{
|
||||
if ($lead_id)
|
||||
{
|
||||
$stmt="SELECT * from vicidial_list where lead_id='$lead_id'";
|
||||
}
|
||||
else
|
||||
{
|
||||
print "ERROR: you must search for something! Go back and search for something";
|
||||
exit;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (eregi('10.10.10.2',$ip))
|
||||
{
|
||||
echo "\n\n$stmt\n\n";
|
||||
}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
$row=mysql_fetch_row($rslt);
|
||||
if ( (strlen($row[0]) < 3) && (strlen($row[1]) < 3) )
|
||||
{
|
||||
echo date("l F j, Y G:i:s A");
|
||||
echo "\n<br><br><center>\n";
|
||||
echo "<b>Οι μεταβλητές αναζήτησης που καταχωρήσατε δεν είναι ενεργές στο σύστημα</b><br><br>\n";
|
||||
echo "<b>Παρακαλώ, επιστρέψτε πίσω και ελέγξτε τις πληροφορίες που καταχωρήσατε και προσπαθήστε πάλι</b>\n";
|
||||
echo "</center>\n";
|
||||
echo "</body></html>\n";
|
||||
exit;
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "\n<PRE>\n\n";
|
||||
echo "lead ID: $row[0]\n";
|
||||
echo "status: $row[3]\n";
|
||||
echo "vendor_id: $row[5]\n";
|
||||
echo "last rep called: $row[4]\n";
|
||||
echo "list_id: $row[7]\n";
|
||||
echo "phone: $row[11]\n";
|
||||
echo "Name: $row[13] $row[15]\n";
|
||||
echo "Πόλη: $row[19]\n";
|
||||
echo "Security: $row[28]\n";
|
||||
echo "Σχόλια: $row[29]\n\n";
|
||||
echo "\n";
|
||||
echo "</PRE>\n";
|
||||
|
||||
# https://www.vicimarketing.com/internal/back_end_sys/uk_cust_serv/index.php?person_id=$row[7]&people_packages_id=&secure_lvl=2&display=2&username=$username&passwd=$passwd
|
||||
|
||||
echo "<a href=\"admin_modify_lead.php?lead_id=$row[0]\">Πατήστε εδώ για να δείτε τις λεπτομέρειες του καθοδηγητή</a>\n";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
$ENDtime = date("U");
|
||||
|
||||
$RUNtime = ($ENDtime - $STARTtime);
|
||||
|
||||
echo "\n\n\n<br><br><br>\n<a href=\"$PHP_SELF\">ΝΕΑ ΑΝΑΖΗΤΗΣΗ</a>";
|
||||
|
||||
|
||||
echo "\n\n\n<br><br><br>\nδιαδικασία που τρέχει: $RUNtime seconds";
|
||||
|
||||
|
||||
?>
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -1 +0,0 @@
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
<?
|
||||
|
||||
$link=mysql_connect("localhost", "cron", "1234");
|
||||
mysql_select_db("asterisk");
|
||||
|
||||
$local_DEF = 'Local/';
|
||||
$conf_silent_prefix = '7';
|
||||
$local_AMP = '@';
|
||||
$ext_context = 'demo';
|
||||
$recording_exten = '8309';
|
||||
|
||||
$WeBServeRRooT = '/usr/local/apache2/htdocs';
|
||||
$WeBRooTWritablE = '1';
|
||||
|
||||
?>
|
||||
@@ -1,227 +0,0 @@
|
||||
<?
|
||||
|
||||
require("dbconnect.php");
|
||||
|
||||
##### depricated
|
||||
#require_once("htglobalize.php");
|
||||
|
||||
$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER'];
|
||||
$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW'];
|
||||
$PHP_SELF=$_SERVER['PHP_SELF'];
|
||||
$group=$_GET["group"]; if (!$group) {$group=$_POST["group"];}
|
||||
$status=$_GET["status"]; if (!$status) {$status=$_POST["status"];}
|
||||
$date_with_hour=$_GET["date_with_hour"]; if (!$date_with_hour) {$date_with_hour=$_POST["date_with_hour"];}
|
||||
$submit=$_GET["submit"]; if (!$submit) {$submit=$_POST["submit"];}
|
||||
$ΕΠΙΒΕΒΑΙΩΣΗ=$_GET["ΕΠΙΒΕΒΑΙΩΣΗ"]; if (!$ΕΠΙΒΕΒΑΙΩΣΗ) {$ΕΠΙΒΕΒΑΙΩΣΗ=$_POST["ΕΠΙΒΕΒΑΙΩΣΗ"];}
|
||||
|
||||
### AST GUI database administration
|
||||
### group_hourly_stats.php
|
||||
|
||||
$STARTtime = date("U");
|
||||
$TODAY = date("Y-m-d");
|
||||
$date_with_hour_default = date("Y-m-d H");
|
||||
$date_no_hour_default = $TODAY;
|
||||
|
||||
if (!$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 (!$begin_date) {$begin_date = $TODAY;}
|
||||
if (!$end_date) {$end_date = $TODAY;}
|
||||
|
||||
#$link=mysql_connect("localhost", "cron", "1234");
|
||||
#mysql_select_db("asterisk");
|
||||
|
||||
$stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 7;";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$auth=$row[0];
|
||||
|
||||
$fp = fopen ("./project_auth_entries.txt", "a");
|
||||
$date = date("r");
|
||||
$ip = getenv("REMOTE_ADDR");
|
||||
$browser = getenv("HTTP_USER_AGENT");
|
||||
|
||||
if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or (!$auth))
|
||||
{
|
||||
Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\"");
|
||||
Header("HTTP/1.0 401 Unauthorized");
|
||||
echo "Ακυρο Ονομα Χρήστη/Κωδικός Πρόσβασης: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n";
|
||||
exit;
|
||||
}
|
||||
else
|
||||
{
|
||||
header ("Content-type: text/html; charset=utf-8");
|
||||
|
||||
if($auth>0)
|
||||
{
|
||||
$office_no=strtoupper($PHP_AUTH_USER);
|
||||
$password=strtoupper($PHP_AUTH_PW);
|
||||
$stmt="SELECT full_name from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW'";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$LOGfullname=$row[0];
|
||||
fwrite ($fp, "VICIDIAL|GOOD|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|$LOGfullname|\n");
|
||||
fclose($fp);
|
||||
}
|
||||
else
|
||||
{
|
||||
fwrite ($fp, "VICIDIAL|FAIL|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|\n");
|
||||
fclose($fp);
|
||||
}
|
||||
|
||||
# $stmt="SELECT full_name from vicidial_users where user='$user';";
|
||||
# $rslt=mysql_query($stmt, $link);
|
||||
# $row=mysql_fetch_row($rslt);
|
||||
# $full_name = $row[0];
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
?>
|
||||
<html>
|
||||
<head>
|
||||
<title>VICIDIAL ΔΙΑΧ: </title>
|
||||
</head>
|
||||
<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0>
|
||||
<CENTER>
|
||||
<TABLE WIDTH=620 BGCOLOR=#D9E6FE cellpadding=2 cellspacing=0><TR BGCOLOR=#015B91><TD ALIGN=LEFT><FONT FACE="ARIAL,HELVETICA" COLOR=WHITE SIZE=2><B> VICIDIAL ΔΙΑΧ: <? echo $group ?></TD><TD ALIGN=RIGHT><FONT FACE="ARIAL,HELVETICA" COLOR=WHITE SIZE=2><B><? echo date("l F j, Y G:i:s A") ?> </TD></TR>
|
||||
|
||||
|
||||
|
||||
|
||||
<?
|
||||
|
||||
if ( ($group) and ($status) and ($date_with_hour) )
|
||||
{
|
||||
$stmt="SELECT user,full_name from vicidial_users where user_group = '$group' order by full_name desc;";
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
$tsrs_to_print = mysql_num_rows($rslt);
|
||||
$o=0;
|
||||
while($o < $tsrs_to_print)
|
||||
{
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$VDuser[$o] = "$row[0]";
|
||||
$VDname[$o] = "$row[1]";
|
||||
$o++;
|
||||
}
|
||||
|
||||
$o=0;
|
||||
while($o < $tsrs_to_print)
|
||||
{
|
||||
$stmt="select count(*) from vicidial_log where call_date >= '$date_with_hour:00:00' and call_date <= '$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 >= '$date_no_hour 00:00:00' and call_date <= '$date_no_hour 23:59:59' and user='$VDuser[$o]' and status='$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 >= '$date_with_hour:00:00' and call_date <= '$date_with_hour:59:59' and user='$VDuser[$o]' and status='$status';";
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$VDcount[$o] = "$row[0]";
|
||||
$o++;
|
||||
}
|
||||
|
||||
echo "<TR><TD ALIGN=LEFT COLSPAN=2>\n";
|
||||
|
||||
echo "<br><center>\n";
|
||||
|
||||
echo "<B>ΜΕΤΡΗΣΗ ΩΡΩΝ TSR: $group | $status | $date_with_hour | $date_no_hour</B>\n";
|
||||
|
||||
echo "<center><TABLE width=600 cellspacing=0 cellpadding=1>\n";
|
||||
echo "<tr><td><font size=2>TSR </td><td align=left><font size=2>ID </td><td align=right><font size=2> $status</td><td align=right><font size=2> ΣΥΝΟΛΙΚΕΣ ΚΛΗΣΕΙΣ</td><td align=right><font size=2> $status DAY</td><td align=right><font size=2> </td></tr>\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 "<tr $bgcolor><td><font size=2>$VDuser[$o]</td>";
|
||||
echo "<td align=left><font size=2> $VDname[$o]</td>\n";
|
||||
echo "<td align=right><font size=2> $VDcount[$o]</td>\n";
|
||||
echo "<td align=right><font size=2> $VDtotal[$o]</td>\n";
|
||||
echo "<td align=right><font size=2> $VDday[$o]</td>\n";
|
||||
echo "<td align=right><font size=1><a href=\"./admin.php?ADD=3&user=$VDuser[$o]\">ΤΡΟΠΟΠΟΙΗΣΗ</a> | <a href=\"./user_stats.php?user=$VDuser[$o]\">ΣΤΑΤΙΣΤΙΚΑ</a></td></tr>\n";
|
||||
$total_calls = ($total_calls + $VDtotal[$o]);
|
||||
$hour_calls = ($hour_calls + $VDcount[$o]);
|
||||
$day_calls = ($day_calls + $VDday[$o]);
|
||||
|
||||
$o++;
|
||||
}
|
||||
|
||||
echo "<tr><td><font size=2>TOTAL </td><td align=right><font size=2> $status </td><td align=right><font size=2> $hour_calls</td><td align=right><font size=2> $total_calls</td><td align=right><font size=2> $day_calls</td></tr>\n";
|
||||
|
||||
|
||||
}
|
||||
|
||||
echo "</TABLE></center>\n";
|
||||
echo "<br><br>\n";
|
||||
|
||||
|
||||
echo "<br>Παρακαλώ, καταχωρήστε την ομάδα για την οποία θέλετε στατιστικά ανά ώρα: <form action=$PHP_SELF method=POST>\n";
|
||||
echo "<input type=hidden name=DB value=$DB>\n";
|
||||
echo "group: <select size=1 name=group>\n";
|
||||
|
||||
$stmt="SELECT * from vicidial_user_groups order by user_group";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
$groups_to_print = mysql_num_rows($rslt);
|
||||
$o=0;
|
||||
$groups_list='';
|
||||
while ($groups_to_print > $o) {
|
||||
$rowx=mysql_fetch_row($rslt);
|
||||
if ($group == $group)
|
||||
{$groups_list .= "<option selected value=\"$rowx[0]\">$rowx[0] - $rowx[1]</option>\n";}
|
||||
else
|
||||
{$groups_list .= "<option value=\"$rowx[0]\">$rowx[0] - $rowx[1]</option>\n";}
|
||||
$o++;
|
||||
}
|
||||
echo "$groups_list</select><br>\n";
|
||||
echo "status: <input type=text name=status size=10 maxlength=10 value=\"$status\"> (example: XFER)<br>\n";
|
||||
echo "date with hour: <input type=text name=date_with_hour size=14 maxlength=13 value=\"$date_with_hour\"> (example: 2004-06-25 14)<br>\n";
|
||||
echo "<input type=submit name=submit value=ΕΠΙΒΕΒΑΙΩΣΗ>\n";
|
||||
echo "<BR><BR><BR>\n";
|
||||
|
||||
|
||||
$ENDtime = date("U");
|
||||
|
||||
$RUNtime = ($ENDtime - $STARTtime);
|
||||
|
||||
echo "\n\n\n<br><br><br>\n\n";
|
||||
|
||||
|
||||
echo "<font size=0>\n\n\n<br><br><br>\nδιαδικασία που τρέχει: $RUNtime seconds</font>";
|
||||
|
||||
|
||||
?>
|
||||
|
||||
|
||||
</TD></TR><TABLE>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
<?
|
||||
|
||||
exit;
|
||||
|
||||
|
||||
|
||||
?>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 492 B |
@@ -1,23 +0,0 @@
|
||||
<?php
|
||||
/*
|
||||
author: Paul Concepcion
|
||||
date: April 18, 2004
|
||||
iterate through the $_GET, $_POST, and $_SERVER hashes,
|
||||
creating global variables with the same values.
|
||||
|
||||
security risk: equal to running with register_globals "on"
|
||||
|
||||
*/
|
||||
|
||||
function array_conv($array){
|
||||
foreach ($array as $key -> $value){
|
||||
${$key} = $value;
|
||||
global ${$key};// = $value;
|
||||
}
|
||||
|
||||
}
|
||||
array_conv($_GET);
|
||||
array_conv($_POST);
|
||||
array_conv($_SERVER);
|
||||
|
||||
?>
|
||||
@@ -1,187 +0,0 @@
|
||||
<?
|
||||
header ("Content-type: text/html; charset=utf-8");
|
||||
|
||||
require("dbconnect.php");
|
||||
|
||||
|
||||
##### depricated
|
||||
#require_once("htglobalize.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"];}
|
||||
$submit=$_GET["submit"]; if (!$submit) {$submit=$_POST["submit"];}
|
||||
$ΕΠΙΒΕΒΑΙΩΣΗ=$_GET["ΕΠΙΒΕΒΑΙΩΣΗ"]; if (!$ΕΠΙΒΕΒΑΙΩΣΗ) {$ΕΠΙΒΕΒΑΙΩΣΗ=$_POST["ΕΠΙΒΕΒΑΙΩΣΗ"];}
|
||||
|
||||
### AST Web GUI lead loader from formatted file
|
||||
### listloader.php
|
||||
###
|
||||
### CHANGES
|
||||
### 50602-1640 - First version created by Joe Johnson
|
||||
### 51128-1108 - Removed PHP global vars requirement
|
||||
###
|
||||
|
||||
### make sure vicidial_list exists and that your file follows the formatting correctly. This page does not dedupe or do any other lead filtering actions yet at this time.
|
||||
|
||||
$version = '1.1';
|
||||
$build = '51128-1108';
|
||||
|
||||
$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 = " <a href=\"javascript:openNewWindow('$admDIR$admSCR?ADD=99999";
|
||||
$NWE = "')\"><IMG SRC=\"help.gif\" WIDTH=20 HEIGHT=20 BORDER=0 ALT=\"ΒΟΗΘΕΙΑ\" ALIGN=TOP></A>";
|
||||
|
||||
echo "<html>\n";
|
||||
echo "<head>\n";
|
||||
echo "<!-- VERSION: $version BUILD: $build -->\n";
|
||||
|
||||
|
||||
?>
|
||||
|
||||
|
||||
<script language="JavaScript1.2">
|
||||
function openNewWindow(url) {
|
||||
window.open (url,"",'width=500,height=300,scrollbars=yes,menubar=yes,address=yes');
|
||||
}
|
||||
function ShowProgress(good, bad, total) {
|
||||
parent.lead_count.document.open();
|
||||
parent.lead_count.document.write('<html><body><table border=0 width=200 cellpadding=10 cellspacing=0 align=center valign=top><tr bgcolor="#000000"><th colspan=2><font face="arial, helvetica" size=3 color=white>Κατάσταση αρχείου:</font></th></tr><tr bgcolor="#009900"><td align=right><font face="arial, helvetica" size=2 color=white><B>Good:</B></font></td><td align=left><font face="arial, helvetica" size=2 color=white><B>'+good+'</B></font></td></tr><tr bgcolor="#990000"><td align=right><font face="arial, helvetica" size=2 color=white><B>Bad:</B></font></td><td align=left><font face="arial, helvetica" size=2 color=white><B>'+bad+'</B></font></td></tr><tr bgcolor="#000099"><td align=right><font face="arial, helvetica" size=2 color=white><B>Total:</B></font></td><td align=left><font face="arial, helvetica" size=2 color=white><B>'+total+'</B></font></td></tr></table><body></html>');
|
||||
parent.lead_count.document.close();
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<form action=<?=$PHP_SELF ?> method=post enctype="multipart/form-data">
|
||||
<table align=center width="500" border=0 cellpadding=5 cellspacing=0 bgcolor=#D9E6FE>
|
||||
<tr>
|
||||
<td align=right width="25%"><font face="arial, helvetica" size=2>Φόρτιση καθοδηγητών από αυτό το αρχείο:</font></td>
|
||||
<td align=left width="75%"><input type=file name="leadfile" value="<?=$leadfile ?>"> <? echo "$NWB#vicidial_list_loader$NWE"; ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align=center><input type=submit value="ΕΠΙΒΕΒΑΙΩΣΗ" name='submit_file'></td>
|
||||
<td align=center><input type=button onClick="javascript:document.location='listloader.php'" value="ΞΕΚΙΝΑ" name='reload_page'></td>
|
||||
</tr>
|
||||
<tr><td colspan=2><font size=1><a href="new_listloader_superL.php" target="_parent">CLICK HERE TO GO TO THE SUPER LEAD LOADER (BETA VERSION)</a> <a href="admin.php" target="_parent">BACK TO ADMIN</a></font></td></tr>
|
||||
</table>
|
||||
</form>
|
||||
<?
|
||||
|
||||
#echo "|$LF_orig|$LF_path|\n";
|
||||
|
||||
if ($leadfile && filesize($LF_path)<=8388608) {
|
||||
print "<script language='JavaScript1.2'>document.forms[0].leadfile.disabled=true; document.forms[0].submit_file.disabled=true; document.forms[0].reload_page.disabled=true;</script>";
|
||||
flush();
|
||||
copy($LF_path, "$WeBServeRRooT/vicidial/vicidial_temp_file.txt");
|
||||
$file=fopen("$WeBServeRRooT/vicidial/vicidial_temp_file.txt", "r");
|
||||
if ($WeBRooTWritablE > 0)
|
||||
{$stmt_file=fopen("$WeBServeRRooT/vicidial/listloader_stmts.txt", "w");}
|
||||
$pulldate=date("Y-m-d H:i:s");
|
||||
|
||||
$buffer=fgets($file, 4096);
|
||||
$tab_count=substr_count($buffer, "\t");
|
||||
$pipe_count=substr_count($buffer, "|");
|
||||
|
||||
if ($tab_count>$pipe_count) {$delimiter="\t"; $delim_name="tab";} else {$delimiter="|"; $delim_name="pipe";}
|
||||
$field_check=explode($delimiter, $buffer);
|
||||
|
||||
if (count($field_check)>=5) {
|
||||
flush();
|
||||
$file=fopen("./vicidial_temp_file.txt", "r");
|
||||
$total=0; $good=0; $bad=0;
|
||||
print "<center><font face='arial, helvetica' size=3 color='#009900'><B>Επεξεργασία$delim_name-delimited file... ($tab_count|$pipe_count)\n";
|
||||
while (!feof($file)) {
|
||||
$record++;
|
||||
$buffer=rtrim(fgets($file, 4096));
|
||||
$buffer=stripslashes($buffer);
|
||||
|
||||
if (strlen($buffer)>0) {
|
||||
$row=explode($delimiter, eregi_replace("[\'\"]", "", $buffer));
|
||||
$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];
|
||||
$campaign_id = '';
|
||||
$called_since_last_reset='N';
|
||||
$phone_code = eregi_replace("[^0-9]", "", $row[3]);
|
||||
$phone_number = eregi_replace("[^0-9]", "", $row[4]);
|
||||
$title = $row[5];
|
||||
$first_name = $row[6];
|
||||
$middle_initial = $row[7];
|
||||
$last_name = $row[8];
|
||||
$address1 = $row[9];
|
||||
$address2 = $row[10];
|
||||
$address3 = $row[11];
|
||||
$city = $row[12];
|
||||
$state = $row[13];
|
||||
$province = $row[14];
|
||||
$postal_code = $row[15];
|
||||
$country = $row[16];
|
||||
$gender = $row[17];
|
||||
$date_of_birth = $row[18];
|
||||
$alt_phone = $row[19];
|
||||
$email = $row[20];
|
||||
$security_phrase = $row[21];
|
||||
$comments = trim($row[22]);
|
||||
|
||||
if (strlen($phone_number)>8) {
|
||||
|
||||
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','$campaign_id','$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','$campaign_id','$called_since_last_reset','$phone_code','$phone_number','$title','$first_name','$middle_initial','$last_name','$address1','$address2','$address3','$city','$state','$province','$postal_code','$country_code','$gender','$date_of_birth','$alt_phone','$email','$security_phrase','$comments',0),";
|
||||
$multi_insert_counter++;
|
||||
}
|
||||
|
||||
$good++;
|
||||
} else {
|
||||
if ($bad < 10) {print "<BR></b><font size=1 color=red>record $total BAD- PHONE: $phone_number ROW: |$row[0]|</font><b>\n";}
|
||||
$bad++;
|
||||
}
|
||||
$total++;
|
||||
if ($total%100==0) {
|
||||
print "<script language='JavaScript1.2'>ShowProgress($good, $bad, $total)</script>";
|
||||
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 "<BR><BR>Done</B> GOOD: $good BAD: $bad TOTAL: $total</font></center>";
|
||||
|
||||
} else {
|
||||
print "<center><font face='arial, helvetica' size=3 color='#990000'><B>Λάθος: Το αρχείο δεν έχει τον απαιτούμενο αριθμό πεδίων.</B></font></center>";
|
||||
}
|
||||
print "<script language='JavaScript1.2'>document.forms[0].leadfile.disabled=false; document.forms[0].submit_file.disabled=false; document.forms[0].reload_page.disabled=false;</script>";
|
||||
} else if (filesize($leadfile)>8388608) {
|
||||
print "<center><font face='arial, helvetica' size=3 color='#990000'><B>Λάθος: Το αρχείο ξεπέρασε το όριο των 8ΜΒ.</B></font></center>";
|
||||
}
|
||||
?>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,69 +0,0 @@
|
||||
<?
|
||||
|
||||
# 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
|
||||
|
||||
require("dbconnect.php");
|
||||
|
||||
$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER'];
|
||||
$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW'];
|
||||
$PHP_SELF=$_SERVER['PHP_SELF'];
|
||||
|
||||
$STARTtime = date("U");
|
||||
$TODAY = date("Y-m-d");
|
||||
$NOW_TIME = date("Y-m-d H:i:s");
|
||||
$FILE_datetime = $STARTtime;
|
||||
|
||||
$stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 7;";
|
||||
if ($DB) {echo "|$stmt|\n";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$auth=$row[0];
|
||||
|
||||
$fp = fopen ("./project_auth_entries.txt", "a");
|
||||
$date = date("r");
|
||||
$ip = getenv("REMOTE_ADDR");
|
||||
$browser = getenv("HTTP_USER_AGENT");
|
||||
|
||||
if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or (!$auth))
|
||||
{
|
||||
Header("WWW-Authenticate: Basic realm=\"VICIDIAL-LEAD-LOADER\"");
|
||||
Header("HTTP/1.0 401 Unauthorized");
|
||||
echo "Ακυρο Ονομα Χρήστη/Κωδικός Πρόσβασης: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n";
|
||||
exit;
|
||||
}
|
||||
else
|
||||
{
|
||||
header ("Content-type: text/html; charset=utf-8");
|
||||
if($auth>0)
|
||||
{
|
||||
$office_no=strtoupper($PHP_AUTH_USER);
|
||||
$password=strtoupper($PHP_AUTH_PW);
|
||||
$stmt="SELECT load_leads from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW'";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$LOGload_leads =$row[0];
|
||||
|
||||
if ($LOGload_leads < 1)
|
||||
{
|
||||
echo "You do not have permissions to load leads\n";
|
||||
exit;
|
||||
}
|
||||
fwrite ($fp, "LIST_LOAD|GOOD|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|$LOGfullname|\n");
|
||||
fclose($fp);
|
||||
}
|
||||
else
|
||||
{
|
||||
fwrite ($fp, "LIST_LOAD|FAIL|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|\n");
|
||||
fclose($fp);
|
||||
}
|
||||
}
|
||||
|
||||
?><HTML>
|
||||
<HEAD>
|
||||
<TITLE>VICIDIAL: Υπομονάδα φόρτισης καθοδηγητών</TITLE>
|
||||
</HEAD>
|
||||
<FRAMESET ROWS="300,*" border=0>
|
||||
<FRAME SRC="listloader.php" NAME="main">
|
||||
<FRAME SRC="count.htm" NAME="lead_count">
|
||||
</HTML>
|
||||
@@ -1,747 +0,0 @@
|
||||
<?
|
||||
require("dbconnect.php");
|
||||
|
||||
### links used for testing
|
||||
#$link=mysql_connect("10.10.10.15", "cron", "1234");
|
||||
#mysql_select_db("asterisk");
|
||||
#$WeBServeRRooT = '/home/www/htdocs';
|
||||
|
||||
##### depricated
|
||||
#require_once("htglobalize.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"];}
|
||||
$submit=$_GET["submit"]; if (!$submit) {$submit=$_POST["submit"];}
|
||||
$ΕΠΙΒΕΒΑΙΩΣΗ=$_GET["ΕΠΙΒΕΒΑΙΩΣΗ"]; if (!$ΕΠΙΒΕΒΑΙΩΣΗ) {$ΕΠΙΒΕΒΑΙΩΣΗ=$_POST["ΕΠΙΒΕΒΑΙΩΣΗ"];}
|
||||
$leadfile_name=$_GET["leadfile_name"]; if (!$leadfile_name) {$leadfile_name=$_POST["leadfile_name"];}
|
||||
# $leadfile=$_GET["leadfile"]; if (!$leadfile) {$leadfile=$_POST["leadfile"];}
|
||||
$file_layout=$_GET["file_layout"]; if (!$file_layout) {$file_layout=$_POST["file_layout"];}
|
||||
$OK_to_process=$_GET["OK_to_process"]; if (!$OK_to_process) {$OK_to_process=$_POST["OK_to_process"];}
|
||||
$vendor_lead_code_field=$_GET["vendor_lead_code_field"]; if (!$vendor_lead_code_field) {$vendor_lead_code_field=$_POST["vendor_lead_code_field"];}
|
||||
$source_id_field=$_GET["source_id_field"]; if (!$source_id_field) {$source_id_field=$_POST["source_id_field"];}
|
||||
$list_id_field=$_GET["list_id_field"]; if (!$list_id_field) {$list_id_field=$_POST["list_id_field"];}
|
||||
$phone_code_field=$_GET["phone_code_field"]; if (!$phone_code_field) {$phone_code_field=$_POST["phone_code_field"];}
|
||||
$phone_number_field=$_GET["phone_number_field"]; if (!$phone_number_field) {$phone_number_field=$_POST["phone_number_field"];}
|
||||
$title_field=$_GET["title_field"]; if (!$title_field) {$title_field=$_POST["title_field"];}
|
||||
$first_name_field=$_GET["first_name_field"]; if (!$first_name_field) {$first_name_field=$_POST["first_name_field"];}
|
||||
$middle_initial_field=$_GET["middle_initial_field"]; if (!$middle_initial_field) {$middle_initial_field=$_POST["middle_initial_field"];}
|
||||
$last_name_field=$_GET["last_name_field"]; if (!$last_name_field) {$last_name_field=$_POST["last_name_field"];}
|
||||
$address1_field=$_GET["address1_field"]; if (!$address1_field) {$address1_field=$_POST["address1_field"];}
|
||||
$address2_field=$_GET["address2_field"]; if (!$address2_field) {$address2_field=$_POST["address2_field"];}
|
||||
$address3_field=$_GET["address3_field"]; if (!$address3_field) {$address3_field=$_POST["address3_field"];}
|
||||
$city_field=$_GET["city_field"]; if (!$city_field) {$city_field=$_POST["city_field"];}
|
||||
$state_field=$_GET["state_field"]; if (!$state_field) {$state_field=$_POST["state_field"];}
|
||||
$province_field=$_GET["province_field"]; if (!$province_field) {$province_field=$_POST["province_field"];}
|
||||
$postal_code_field=$_GET["postal_code_field"]; if (!$postal_code_field) {$postal_code_field=$_POST["postal_code_field"];}
|
||||
# $country_field=$_GET["country_field"]; if (!$country_field) {$country_field=$_POST["country_field"];}
|
||||
$country_code_field=$_GET["country_code_field"]; if (!$country_code_field) {$country_code_field=$_POST["country_code_field"];}
|
||||
$gender_field=$_GET["gender_field"]; if (!$gender_field) {$gender_field=$_POST["gender_field"];}
|
||||
$date_of_birth_field=$_GET["date_of_birth_field"]; if (!$date_of_birth_field) {$date_of_birth_field=$_POST["date_of_birth_field"];}
|
||||
$alt_phone_field=$_GET["alt_phone_field"]; if (!$alt_phone_field) {$alt_phone_field=$_POST["alt_phone_field"];}
|
||||
$email_field=$_GET["email_field"]; if (!$email_field) {$email_field=$_POST["email_field"];}
|
||||
$security_phrase_field=$_GET["security_phrase_field"]; if (!$security_phrase_field) {$security_phrase_field=$_POST["security_phrase_field"];}
|
||||
$comments_field=$_GET["comments_field"]; if (!$comments_field) {$comments_field=$_POST["comments_field"];}
|
||||
|
||||
### AST GUI lead loader from formatted file
|
||||
### listloader.php
|
||||
###
|
||||
### 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
|
||||
###
|
||||
|
||||
### make sure vicidial_list exists and that your file follows the formatting correctly. This page does not dedupe or do any other lead filtering actions yet at this time.
|
||||
|
||||
$version = '1.1.9';
|
||||
$build = '60113-1603';
|
||||
|
||||
|
||||
$STARTtime = date("U");
|
||||
$TODAY = date("Y-m-d");
|
||||
$NOW_TIME = date("Y-m-d H:i:s");
|
||||
$FILE_datetime = $STARTtime;
|
||||
|
||||
$stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 7;";
|
||||
if ($DB) {echo "|$stmt|\n";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$auth=$row[0];
|
||||
|
||||
$fp = fopen ("./project_auth_entries.txt", "a");
|
||||
$date = date("r");
|
||||
$ip = getenv("REMOTE_ADDR");
|
||||
$browser = getenv("HTTP_USER_AGENT");
|
||||
|
||||
if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or (!$auth))
|
||||
{
|
||||
Header("WWW-Authenticate: Basic realm=\"VICIDIAL-LEAD-LOADER\"");
|
||||
Header("HTTP/1.0 401 Unauthorized");
|
||||
echo "Ακυρο Ονομα Χρήστη/Κωδικός Πρόσβασης: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n";
|
||||
exit;
|
||||
}
|
||||
else
|
||||
{
|
||||
header ("Content-type: text/html; charset=utf-8");
|
||||
if($auth>0)
|
||||
{
|
||||
$office_no=strtoupper($PHP_AUTH_USER);
|
||||
$password=strtoupper($PHP_AUTH_PW);
|
||||
$stmt="SELECT load_leads from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW'";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$LOGload_leads =$row[0];
|
||||
|
||||
if ($LOGload_leads < 1)
|
||||
{
|
||||
echo "You do not have permissions to load leads\n";
|
||||
exit;
|
||||
}
|
||||
fwrite ($fp, "LIST_LOAD|GOOD|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|$LOGfullname|\n");
|
||||
fclose($fp);
|
||||
}
|
||||
else
|
||||
{
|
||||
fwrite ($fp, "LIST_LOAD|FAIL|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|\n");
|
||||
fclose($fp);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$script_name = getenv("SCRIPT_NAME");
|
||||
$server_name = getenv("SERVER_NAME");
|
||||
$server_port = getenv("SERVER_PORT");
|
||||
if (eregi("443",$server_port)) {$HTTPprotocol = 'https://';}
|
||||
else {$HTTPprotocol = 'http://';}
|
||||
$admDIR = "$HTTPprotocol$server_name$script_name";
|
||||
$admDIR = eregi_replace('new_listloader_superL.php','',$admDIR);
|
||||
$admSCR = 'admin.php';
|
||||
$NWB = " <a href=\"javascript:openNewWindow('$admDIR$admSCR?ADD=99999";
|
||||
$NWE = "')\"><IMG SRC=\"help.gif\" WIDTH=20 HEIGHT=20 BORDER=0 ALT=\"ΒΟΗΘΕΙΑ\" ALIGN=TOP></A>";
|
||||
|
||||
echo "<html>\n";
|
||||
echo "<head>\n";
|
||||
echo "<!-- VERSION: $version BUILD: $build -->\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 "<style type=\"text/css\">\n
|
||||
<!--\n
|
||||
.title { font-family: Arial, Helvetica, sans-serif; font-size: ".macfontfix(18)."pt}\n
|
||||
.standard { font-family: Arial, Helvetica, sans-serif; font-size: ".macfontfix(10)."pt}\n
|
||||
.small_standard { font-family: Arial, Helvetica, sans-serif; font-size: ".macfontfix(8)."pt}\n
|
||||
.tiny_standard { font-family: Arial, Helvetica, sans-serif; font-size: ".macfontfix(6)."pt}\n
|
||||
.standard_bold { font-family: Arial, Helvetica, sans-serif; font-size: ".macfontfix(10)."pt; font-weight: bold}\n
|
||||
.standard_header { font-family: Arial, Helvetica, sans-serif; font-size: ".macfontfix(14)."pt; font-weight: bold}\n
|
||||
.standard_bold_highlight { font-family: Arial, Helvetica, sans-serif; font-size: ".macfontfix(10)."pt; font-weight: bold; color: white; BACKGROUND-COLOR: black}\n
|
||||
.standard_bold_blue_highlight { font-family: Arial, Helvetica, sans-serif; font-size: 10pt; font-weight: bold; BACKGROUND-COLOR: blue}\n
|
||||
A.employee_standard { font-family: garamond, sans-serif; font-size: ".macfontfix(10)."pt; font-style: normal; font-variant: normal; font-weight: bold; text-decoration: none}\n
|
||||
.employee_standard { font-family: garamond, sans-serif; font-size: ".macfontfix(10)."pt; font-weight: bold}\n
|
||||
.employee_title { font-family: Garamond, sans-serif; font-size: ".macfontfix(14)."pt; font-weight: bold}\n
|
||||
\\\\-->\n
|
||||
</style>\n";
|
||||
|
||||
?>
|
||||
|
||||
|
||||
<script language="JavaScript1.2">
|
||||
function openNewWindow(url) {
|
||||
window.open (url,"",'width=500,height=300,scrollbars=yes,menubar=yes,address=yes');
|
||||
}
|
||||
function ShowProgress(good, bad, total) {
|
||||
parent.lead_count.document.open();
|
||||
parent.lead_count.document.write('<html><body><table border=0 width=200 cellpadding=10 cellspacing=0 align=center valign=top><tr bgcolor="#000000"><th colspan=2><font face="arial, helvetica" size=3 color=white>Κατάσταση αρχείου:</font></th></tr><tr bgcolor="#009900"><td align=right><font face="arial, helvetica" size=2 color=white><B>Good:</B></font></td><td align=left><font face="arial, helvetica" size=2 color=white><B>'+good+'</B></font></td></tr><tr bgcolor="#990000"><td align=right><font face="arial, helvetica" size=2 color=white><B>Bad:</B></font></td><td align=left><font face="arial, helvetica" size=2 color=white><B>'+bad+'</B></font></td></tr><tr bgcolor="#000099"><td align=right><font face="arial, helvetica" size=2 color=white><B>Total:</B></font></td><td align=left><font face="arial, helvetica" size=2 color=white><B>'+total+'</B></font></td></tr></table><body></html>');
|
||||
parent.lead_count.document.close();
|
||||
}
|
||||
function ParseFileName() {
|
||||
if (!document.forms[0].OK_to_process) {
|
||||
var endstr=document.forms[0].leadfile.value.lastIndexOf('\\');
|
||||
if (endstr>-1) {
|
||||
endstr++;
|
||||
var filename=document.forms[0].leadfile.value.substring(endstr);
|
||||
document.forms[0].leadfile_name.value=filename;
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<title>VICIDIAL ΔΙΑΧ: Super Lead Loader</title>
|
||||
</head>
|
||||
<body>
|
||||
<form action=<?=$PHP_SELF ?> method=post onSubmit="ParseFileName()" enctype="multipart/form-data">
|
||||
<input type=hidden name='leadfile_name' value="<?=$leadfile_name ?>">
|
||||
<? if ($file_layout!="custom") { ?>
|
||||
<table align=center width="500" border=0 cellpadding=5 cellspacing=0 bgcolor=#D9E6FE>
|
||||
<tr>
|
||||
<td align=right width="35%"><B><font face="arial, helvetica" size=2>Φόρτιση καθοδηγητών από αυτό το αρχείο:</font></B></td>
|
||||
<td align=left width="65%"><input type=file name="leadfile" value="<?=$leadfile ?>"> <? echo "$NWB#vicidial_list_loader$NWE"; ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align=right><B><font face="arial, helvetica" size=2>File layout to use:</font></B></td>
|
||||
<td align=left><font face="arial, helvetica" size=2><input type=radio name="file_layout" value="standard" checked>Standard VICIDIAL <input type=radio name="file_layout" value="custom">Custom layout</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align=center colspan=2><input type=submit value="ΕΠΙΒΕΒΑΙΩΣΗ" name='submit_file'> <input type=button onClick="javascript:document.location='new_listloader_superL.php'" value="ΞΕΚΙΝΑ" name='reload_page'></td>
|
||||
</tr>
|
||||
<tr><td colspan=2><font size=1><a href="listloaderMAIN.php" target="_parent">CLICK HERE TO GO TO THE BASIC LEAD LOADER </a> <a href="admin.php" target="_parent">BACK TO ADMIN</a></font></td></tr>
|
||||
<tr><td colspan=2><font size=1>SUPER LIST LOADER- VERSION: <?=$version ?> BUILD: <?=$build ?></td></tr>
|
||||
</table>
|
||||
<? } ?>
|
||||
|
||||
<?
|
||||
|
||||
if ($OK_to_process) {
|
||||
print "<script language='JavaScript1.2'>document.forms[0].leadfile.disabled=true; document.forms[0].submit_file.disabled=true; document.forms[0].reload_page.disabled=true;</script>";
|
||||
flush();
|
||||
$total=0; $good=0; $bad=0;
|
||||
|
||||
if (!eregi(".csv", $leadfile_name) && !eregi(".xls", $leadfile_name)) {
|
||||
# copy($leadfile, "./vicidial_temp_file.txt");
|
||||
$file=fopen("$WeBServeRRooT/vicidial/vicidial_temp_file.txt", "r");
|
||||
$stmt_file=fopen("listloader_stmts.txt", "w");
|
||||
|
||||
$buffer=fgets($file, 4096);
|
||||
$tab_count=substr_count($buffer, "\t");
|
||||
$pipe_count=substr_count($buffer, "|");
|
||||
|
||||
if ($tab_count>$pipe_count) {$delimiter="\t"; $delim_name="tab";} else {$delimiter="|"; $delim_name="pipe";}
|
||||
$field_check=explode($delimiter, $buffer);
|
||||
|
||||
if (count($field_check)>=5) {
|
||||
flush();
|
||||
$file=fopen("$WeBServeRRooT/vicidial/vicidial_temp_file.txt", "r");
|
||||
print "<center><font face='arial, helvetica' size=3 color='#009900'><B>Επεξεργασία$delim_name-delimited file...\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[$vendor_lead_code_field];
|
||||
$source_code = $row[$source_id_field];
|
||||
$source_id=$source_code;
|
||||
$list_id = $row[$list_id_field];
|
||||
$campaign_id = '';
|
||||
$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]);
|
||||
$title = $row[$title_field];
|
||||
$first_name = $row[$first_name_field];
|
||||
$middle_initial = $row[$middle_initial_field];
|
||||
$last_name = $row[$last_name_field];
|
||||
$address1 = $row[$address1_field];
|
||||
$address2 = $row[$address2_field];
|
||||
$address3 = $row[$address3_field];
|
||||
$city =$row[$city_field];
|
||||
$state = $row[$state_field];
|
||||
$province = $row[$province_field];
|
||||
$postal_code = $row[$postal_code_field];
|
||||
$country_code = $row[$country_code_field];
|
||||
$gender = $row[$gender_field];
|
||||
$date_of_birth = $row[$date_of_birth_field];
|
||||
$alt_phone = $row[$alt_phone_field];
|
||||
$email = $row[$email_field];
|
||||
$security_phrase = $row[$security_phrase_field];
|
||||
$comments = trim($row[$comments_field]);
|
||||
|
||||
if (strlen($phone_number)>8) {
|
||||
|
||||
if ($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','$campaign_id','$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','$campaign_id','$called_since_last_reset','$phone_code','$phone_number','$title','$first_name','$middle_initial','$last_name','$address1','$address2','$address3','$city','$state','$province','$postal_code','$country_code','$gender','$date_of_birth','$alt_phone','$email','$security_phrase','$comments',0),";
|
||||
$multi_insert_counter++;
|
||||
}
|
||||
|
||||
$good++;
|
||||
} else {
|
||||
if ($bad < 10) {print "<BR></b><font size=1 color=red>record $total BAD- PHONE: $phone_number ROW: |$row[0]|</font><b>\n";}
|
||||
$bad++;
|
||||
}
|
||||
$total++;
|
||||
if ($total%100==0) {
|
||||
print "<script language='JavaScript1.2'>ShowProgress($good, $bad, $total)</script>";
|
||||
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 "<BR><BR>Done</B> GOOD: $good BAD: $bad TOTAL: $total</font></center>";
|
||||
|
||||
} else {
|
||||
print "<center><font face='arial, helvetica' size=3 color='#990000'><B>Λάθος: Το αρχείο δεν έχει τον απαιτούμενο αριθμό πεδίων.</B></font></center>";
|
||||
}
|
||||
} else if (!eregi(".csv", $leadfile_name)) {
|
||||
# copy($leadfile, "./vicidial_temp_file.xls");
|
||||
$file=fopen("$WeBServeRRooT/vicidial/vicidial_temp_file.xls", "r");
|
||||
|
||||
print "<center><font face='arial, helvetica' size=3 color='#009900'><B>ΕπεξεργασίαExcel file... \n";
|
||||
# print "$WeBServeRRooT/vicidial/listloader_super.pl $vendor_lead_code_field,$source_id_field,$list_id_field,$phone_code_field,$phone_number_field,$title_field,$first_name_field,$middle_initial_field,$last_name_field,$address1_field,$address2_field,$address3_field,$city_field,$state_field,$province_field,$postal_code_field,$country_code_field,$gender_field,$date_of_birth_field,$alt_phone_field,$email_field,$security_phrase_field,$comments_field";
|
||||
passthru("$WeBServeRRooT/vicidial/listloader_super.pl $vendor_lead_code_field,$source_id_field,$list_id_field,$phone_code_field,$phone_number_field,$title_field,$first_name_field,$middle_initial_field,$last_name_field,$address1_field,$address2_field,$address3_field,$city_field,$state_field,$province_field,$postal_code_field,$country_code_field,$gender_field,$date_of_birth_field,$alt_phone_field,$email_field,$security_phrase_field,$comments_field");
|
||||
} else {
|
||||
# copy($leadfile, "./vicidial_temp_file.csv");
|
||||
$file=fopen("$WeBServeRRooT/vicidial/vicidial_temp_file.csv", "r");
|
||||
$stmt_file=fopen("listloader_stmts.txt", "w");
|
||||
|
||||
print "<center><font face='arial, helvetica' size=3 color='#009900'><B>ΕπεξεργασίαCSV file... \n";
|
||||
|
||||
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];
|
||||
$campaign_id = '';
|
||||
$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]);
|
||||
$title = $row[$title_field];
|
||||
$first_name = $row[$first_name_field];
|
||||
$middle_initial = $row[$middle_initial_field];
|
||||
$last_name = $row[$last_name_field];
|
||||
$address1 = $row[$address1_field];
|
||||
$address2 = $row[$address2_field];
|
||||
$address3 = $row[$address3_field];
|
||||
$city =$row[$city_field];
|
||||
$state = $row[$state_field];
|
||||
$province = $row[$province_field];
|
||||
$postal_code = $row[$postal_code_field];
|
||||
$country_code = $row[$country_code_field];
|
||||
$gender = $row[$gender_field];
|
||||
$date_of_birth = $row[$date_of_birth_field];
|
||||
$alt_phone = $row[$alt_phone_field];
|
||||
$email = $row[$email_field];
|
||||
$security_phrase = $row[$security_phrase_field];
|
||||
$comments = trim($row[$comments_field]);
|
||||
|
||||
if (strlen($phone_number)>8) {
|
||||
if ($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','$campaign_id','$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','$campaign_id','$called_since_last_reset','$phone_code','$phone_number','$title','$first_name','$middle_initial','$last_name','$address1','$address2','$address3','$city','$state','$province','$postal_code','$country_code','$gender','$date_of_birth','$alt_phone','$email','$security_phrase','$comments',0),";
|
||||
$multi_insert_counter++;
|
||||
}
|
||||
|
||||
$good++;
|
||||
} else {
|
||||
if ($bad < 10) {print "<BR></b><font size=1 color=red>record $total BAD- PHONE: $phone_number ROW: |$row[0]|</font><b>\n";}
|
||||
$bad++;
|
||||
}
|
||||
$total++;
|
||||
if ($total%100==0) {
|
||||
print "<script language='JavaScript1.2'>ShowProgress($good, $bad, $total)</script>";
|
||||
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 "<BR><BR>Done</B> GOOD: $good BAD: $bad TOTAL: $total</font></center>";
|
||||
}
|
||||
print "<script language='JavaScript1.2'>document.forms[0].leadfile.disabled=false; document.forms[0].submit_file.disabled=false; document.forms[0].reload_page.disabled=false;</script>";
|
||||
}
|
||||
|
||||
if ($leadfile && filesize($LF_path)<=8388608) {
|
||||
$total=0; $good=0; $bad=0;
|
||||
if ($file_layout=="standard") {
|
||||
|
||||
print "<script language='JavaScript1.2'>document.forms[0].leadfile.disabled=true; document.forms[0].submit_file.disabled=true; document.forms[0].reload_page.disabled=true;</script>";
|
||||
flush();
|
||||
|
||||
if (!eregi(".csv", $leadfile_name) && !eregi(".xls", $leadfile_name)) {
|
||||
|
||||
copy($LF_path, "$WeBServeRRooT/vicidial/vicidial_temp_file.txt");
|
||||
$file=fopen("$WeBServeRRooT/vicidial/vicidial_temp_file.txt", "r");
|
||||
if ($WeBRooTWritablE > 0)
|
||||
{$stmt_file=fopen("$WeBServeRRooT/vicidial/listloader_stmts.txt", "w");}
|
||||
|
||||
$buffer=fgets($file, 4096);
|
||||
$tab_count=substr_count($buffer, "\t");
|
||||
$pipe_count=substr_count($buffer, "|");
|
||||
|
||||
if ($tab_count>$pipe_count) {$delimiter="\t"; $delim_name="tab";} else {$delimiter="|"; $delim_name="pipe";}
|
||||
$field_check=explode($delimiter, $buffer);
|
||||
|
||||
if (count($field_check)>=5) {
|
||||
flush();
|
||||
$file=fopen("$WeBServeRRooT/vicidial/vicidial_temp_file.txt", "r");
|
||||
$total=0; $good=0; $bad=0;
|
||||
print "<center><font face='arial, helvetica' size=3 color='#009900'><B>Επεξεργασία$delim_name-delimited file... ($tab_count|$pipe_count)\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];
|
||||
$campaign_id = '';
|
||||
$called_since_last_reset='N';
|
||||
$phone_code = eregi_replace("[^0-9]", "", $row[3]);
|
||||
$phone_number = eregi_replace("[^0-9]", "", $row[4]);
|
||||
$title = $row[5];
|
||||
$first_name = $row[6];
|
||||
$middle_initial = $row[7];
|
||||
$last_name = $row[8];
|
||||
$address1 = $row[9];
|
||||
$address2 = $row[10];
|
||||
$address3 = $row[11];
|
||||
$city =$row[12];
|
||||
$state = $row[13];
|
||||
$province = $row[14];
|
||||
$postal_code = $row[15];
|
||||
$country_code = $row[16];
|
||||
$gender = $row[17];
|
||||
$date_of_birth = $row[18];
|
||||
$alt_phone = $row[19];
|
||||
$email = $row[20];
|
||||
$security_phrase = $row[21];
|
||||
$comments = trim($row[22]);
|
||||
|
||||
if (strlen($phone_number)>8) {
|
||||
|
||||
if ($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','$campaign_id','$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','$campaign_id','$called_since_last_reset','$phone_code','$phone_number','$title','$first_name','$middle_initial','$last_name','$address1','$address2','$address3','$city','$state','$province','$postal_code','$country_code','$gender','$date_of_birth','$alt_phone','$email','$security_phrase','$comments',0),";
|
||||
$multi_insert_counter++;
|
||||
}
|
||||
|
||||
$good++;
|
||||
} else {
|
||||
if ($bad < 10) {print "<BR></b><font size=1 color=red>record $total BAD- PHONE: $phone_number ROW: |$row[0]|</font><b>\n";}
|
||||
$bad++;
|
||||
}
|
||||
$total++;
|
||||
if ($total%100==0) {
|
||||
print "<script language='JavaScript1.2'>ShowProgress($good, $bad, $total)</script>";
|
||||
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 "<BR><BR>Done</B> GOOD: $good BAD: $bad TOTAL: $total</font></center>";
|
||||
|
||||
} else {
|
||||
print "<center><font face='arial, helvetica' size=3 color='#990000'><B>Λάθος: Το αρχείο δεν έχει τον απαιτούμενο αριθμό πεδίων.</B></font></center>";
|
||||
}
|
||||
} else if (!eregi(".csv", $leadfile_name)) {
|
||||
copy($LF_path, "$WeBServeRRooT/vicidial/vicidial_temp_file.xls");
|
||||
$file=fopen("$WeBServeRRooT/vicidial/vicidial_temp_file.xls", "r");
|
||||
|
||||
passthru("$WeBServeRRooT/vicidial/listloader.pl");
|
||||
} else {
|
||||
copy($LF_path, "$WeBServeRRooT/vicidial/vicidial_temp_file.csv");
|
||||
$file=fopen("$WeBServeRRooT/vicidial/vicidial_temp_file.csv", "r");
|
||||
$stmt_file=fopen("listloader_stmts.txt", "w");
|
||||
|
||||
print "<center><font face='arial, helvetica' size=3 color='#009900'><B>ΕπεξεργασίαCSV file... \n";
|
||||
|
||||
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];
|
||||
$campaign_id = '';
|
||||
$called_since_last_reset='N';
|
||||
$phone_code = eregi_replace("[^0-9]", "", $row[3]);
|
||||
$phone_number = eregi_replace("[^0-9]", "", $row[4]);
|
||||
$title = $row[5];
|
||||
$first_name = $row[6];
|
||||
$middle_initial = $row[7];
|
||||
$last_name = $row[8];
|
||||
$address1 = $row[9];
|
||||
$address2 = $row[10];
|
||||
$address3 = $row[11];
|
||||
$city =$row[12];
|
||||
$state = $row[13];
|
||||
$province = $row[14];
|
||||
$postal_code = $row[15];
|
||||
$country_code = $row[16];
|
||||
$gender = $row[17];
|
||||
$date_of_birth = $row[18];
|
||||
$alt_phone = $row[19];
|
||||
$email = $row[20];
|
||||
$security_phrase = $row[21];
|
||||
$comments = trim($row[22]);
|
||||
|
||||
if (strlen($phone_number)>8) {
|
||||
if ($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','$campaign_id','$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','$campaign_id','$called_since_last_reset','$phone_code','$phone_number','$title','$first_name','$middle_initial','$last_name','$address1','$address2','$address3','$city','$state','$province','$postal_code','$country_code','$gender','$date_of_birth','$alt_phone','$email','$security_phrase','$comments',0),";
|
||||
$multi_insert_counter++;
|
||||
}
|
||||
|
||||
$good++;
|
||||
} else {
|
||||
if ($bad < 10) {print "<BR></b><font size=1 color=red>record $total BAD- PHONE: $phone_number ROW: |$row[0]|</font><b>\n";}
|
||||
$bad++;
|
||||
}
|
||||
$total++;
|
||||
if ($total%100==0) {
|
||||
print "<script language='JavaScript1.2'>ShowProgress($good, $bad, $total)</script>";
|
||||
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 "<BR><BR>Done</B> GOOD: $good BAD: $bad TOTAL: $total</font></center>";
|
||||
|
||||
}
|
||||
print "<script language='JavaScript1.2'>document.forms[0].leadfile.disabled=false; document.forms[0].submit_file.disabled=false; document.forms[0].reload_page.disabled=false;</script>";
|
||||
|
||||
} else {
|
||||
print "<script language='JavaScript1.2'>document.forms[0].leadfile.disabled=true; document.forms[0].submit_file.disabled=true; document.forms[0].reload_page.disabled=true;</script><HR>";
|
||||
flush();
|
||||
print "<table border=0 cellpadding=3 cellspacing=0 width=500 align=center>\r\n";
|
||||
print " <tr bgcolor='#330099'>\r\n";
|
||||
print " <th align=right><font class='standard' color='white'>VICIDIAL Column</font></th>\r\n";
|
||||
print " <th><font class='standard' color='white'>File data</font></th>\r\n";
|
||||
print " </tr>\r\n";
|
||||
|
||||
$tbl_rslt=mysql_query("select vendor_lead_code, source_id, list_id, phone_code, phone_number, title, first_name, middle_initial, last_name, address1, address2, address3, city, state, province, postal_code, country_code, gender, date_of_birth, alt_phone, email, security_phrase, comments from vicidial_list limit 1", $link);
|
||||
|
||||
|
||||
if (!eregi(".csv", $leadfile_name) && !eregi(".xls", $leadfile_name)) {
|
||||
copy($LF_path, "$WeBServeRRooT/vicidial/vicidial_temp_file.txt");
|
||||
$file=fopen("$WeBServeRRooT/vicidial/vicidial_temp_file.txt", "r");
|
||||
$stmt_file=fopen("listloader_stmts.txt", "w");
|
||||
|
||||
$buffer=fgets($file, 4096);
|
||||
$tab_count=substr_count($buffer, "\t");
|
||||
$pipe_count=substr_count($buffer, "|");
|
||||
|
||||
if ($tab_count>$pipe_count) {$delimiter="\t"; $delim_name="tab";} else {$delimiter="|"; $delim_name="pipe";}
|
||||
$field_check=explode($delimiter, $buffer);
|
||||
flush();
|
||||
$file=fopen("$WeBServeRRooT/vicidial/vicidial_temp_file.txt", "r");
|
||||
print "<center><font face='arial, helvetica' size=3 color='#009900'><B>Επεξεργασία$delim_name-delimited file...\n";
|
||||
|
||||
$buffer=rtrim(fgets($file, 4096));
|
||||
$buffer=stripslashes($buffer);
|
||||
$row=explode($delimiter, eregi_replace("[\'\"]", "", $buffer));
|
||||
|
||||
for ($i=0; $i<mysql_num_fields($tbl_rslt); $i++) {
|
||||
|
||||
print " <tr bgcolor=#D9E6FE>\r\n";
|
||||
print " <td align=right><font class=standard>".strtoupper(eregi_replace("_", " ", mysql_field_name($tbl_rslt, $i))).": </font></td>\r\n";
|
||||
print " <td align=center><select name='".mysql_field_name($tbl_rslt, $i)."_field'>\r\n";
|
||||
print " <option value='-1'>(none)</option>\r\n";
|
||||
|
||||
for ($j=0; $j<count($row); $j++) {
|
||||
eregi_replace("\"", "", $row[$j]);
|
||||
print " <option value='$j'>\"$row[$j]\"</option>\r\n";
|
||||
}
|
||||
|
||||
print " </select></td>\r\n";
|
||||
print " </tr>\r\n";
|
||||
|
||||
#print " <tr bgcolor=#D9E6FE>\r\n";
|
||||
#print " <td align=center><font class=standard>$row[$i]</font></td>\r\n";
|
||||
#print " <td align=center><select name=datafield$i>\r\n";
|
||||
#print " <option value=''>---------------------</option>\r\n";
|
||||
#print " <option value='entry_date'>Entry date</option>\r\n";
|
||||
#print " <option value='modify_date'>Modify date</option>\r\n";
|
||||
#print " <option value='status'>Status</option>\r\n";
|
||||
#print " <option value='user'>User</option>\r\n";
|
||||
#print " <option value='vendor_lead_code'>Vendor lead code</option>\r\n";
|
||||
#print " <option value='source_id'>Source ID</option>\r\n";
|
||||
#print " <option value='list_id'>ID Λίστας</option>\r\n";
|
||||
#print " <option value='campaign_id'>ID Εκστρατείας</option>\r\n";
|
||||
#print " <option value='called_since_last_reset'>Called since last reset</option>\r\n";
|
||||
#print " <option value='phone_code'>Phone code</option>\r\n";
|
||||
#print " <option value='phone_number'>Phone number</option>\r\n";
|
||||
#print " <option value='title'>Title</option>\r\n";
|
||||
#print " <option value='first_name'>First name</option>\r\n";
|
||||
#print " <option value='middle_initial'>Middle initial</option>\r\n";
|
||||
#print " <option value='last_name'>Last name</option>\r\n";
|
||||
#print " <option value='address1'Διεύθυνση1</option>\r\n";
|
||||
#print " <option value='address2'Διεύθυνση2</option>\r\n";
|
||||
#print " <option value='address3'Διεύθυνση3</option>\r\n";
|
||||
#print " <option value='city'>Πόλη</option>\r\n";
|
||||
#print " <option value='state'>State</option>\r\n";
|
||||
#print " <option value='province'>Επαρχία</option>\r\n";
|
||||
#print " <option value='postal_code'>Postal code</option>\r\n";
|
||||
#print " <option value='country_code'>Χώρα code</option>\r\n";
|
||||
#print " <option value='gender'>Φύλον</option>\r\n";
|
||||
#print " <option value='date_of_birth'>Date of birth</option>\r\n";
|
||||
#print " <option value='alt_phone'>Alt. phone</option>\r\n";
|
||||
#print " <option value='email'>E-mail</option>\r\n";
|
||||
#print " <option value='security_phrase'Ασφάλειαphrase</option>\r\n";
|
||||
#print " <option value='comments'>Σχόλια</option>\r\n";
|
||||
#print " </td>\r\n";
|
||||
#print " </tr>\r\n";
|
||||
}
|
||||
} else if (!eregi(".csv", $leadfile_name)) {
|
||||
copy($LF_path, "$WeBServeRRooT/vicidial/vicidial_temp_file.xls");
|
||||
passthru("$WeBServeRRooT/vicidial/listloader_rowdisplay.pl");
|
||||
} else {
|
||||
copy($LF_path, "$WeBServeRRooT/vicidial/vicidial_temp_file.csv");
|
||||
$file=fopen("$WeBServeRRooT/vicidial/vicidial_temp_file.csv", "r");
|
||||
$stmt_file=fopen("listloader_stmts.txt", "w");
|
||||
|
||||
print "<center><font face='arial, helvetica' size=3 color='#009900'><B>ΕπεξεργασίαCSV file... \n";
|
||||
|
||||
$total=0; $good=0; $bad=0;
|
||||
$row=fgetcsv($file, 1000, ",");
|
||||
for ($i=0; $i<mysql_num_fields($tbl_rslt); $i++) {
|
||||
print " <tr bgcolor=#D9E6FE>\r\n";
|
||||
print " <td align=right><font class=standard>".strtoupper(eregi_replace("_", " ", mysql_field_name($tbl_rslt, $i))).": </font></td>\r\n";
|
||||
print " <td align=center><select name='".mysql_field_name($tbl_rslt, $i)."_field'>\r\n";
|
||||
print " <option value='-1'>(none)</option>\r\n";
|
||||
|
||||
for ($j=0; $j<count($row); $j++) {
|
||||
eregi_replace("\"", "", $row[$j]);
|
||||
print " <option value='$j'>\"$row[$j]\"</option>\r\n";
|
||||
}
|
||||
|
||||
print " </select></td>\r\n";
|
||||
print " </tr>\r\n";
|
||||
|
||||
#print " <tr bgcolor=#D9E6FE>\r\n";
|
||||
#print " <td align=center><font class=standard>$row[$i]</font></td>\r\n";
|
||||
#print " <td align=center><select name=datafield$i>\r\n";
|
||||
#print " <option value=''>---------------------</option>\r\n";
|
||||
#print " <option value='entry_date'>Entry date</option>\r\n";
|
||||
#print " <option value='modify_date'>Modify date</option>\r\n";
|
||||
#print " <option value='status'>Status</option>\r\n";
|
||||
#print " <option value='user'>User</option>\r\n";
|
||||
#print " <option value='vendor_lead_code'>Vendor lead code</option>\r\n";
|
||||
#print " <option value='source_id'>Source ID</option>\r\n";
|
||||
#print " <option value='list_id'>ID Λίστας</option>\r\n";
|
||||
#print " <option value='campaign_id'>ID Εκστρατείας</option>\r\n";
|
||||
#print " <option value='called_since_last_reset'>Called since last reset</option>\r\n";
|
||||
#print " <option value='phone_code'>Phone code</option>\r\n";
|
||||
#print " <option value='phone_number'>Phone number</option>\r\n";
|
||||
#print " <option value='title'>Title</option>\r\n";
|
||||
#print " <option value='first_name'>First name</option>\r\n";
|
||||
#print " <option value='middle_initial'>Middle initial</option>\r\n";
|
||||
#print " <option value='last_name'>Last name</option>\r\n";
|
||||
#print " <option value='address1'Διεύθυνση1</option>\r\n";
|
||||
#print " <option value='address2'Διεύθυνση2</option>\r\n";
|
||||
#print " <option value='address3'Διεύθυνση3</option>\r\n";
|
||||
#print " <option value='city'>Πόλη</option>\r\n";
|
||||
#print " <option value='state'>State</option>\r\n";
|
||||
#print " <option value='province'>Επαρχία</option>\r\n";
|
||||
#print " <option value='postal_code'>Postal code</option>\r\n";
|
||||
#print " <option value='country_code'>Χώρα code</option>\r\n";
|
||||
#print " <option value='gender'>Φύλον</option>\r\n";
|
||||
#print " <option value='date_of_birth'>Date of birth</option>\r\n";
|
||||
#print " <option value='alt_phone'>Alt. phone</option>\r\n";
|
||||
#print " <option value='email'>E-mail</option>\r\n";
|
||||
#print " <option value='security_phrase'Ασφάλειαphrase</option>\r\n";
|
||||
#print " <option value='comments'>Σχόλια</option>\r\n";
|
||||
#print " </td>\r\n";
|
||||
#print " </tr>\r\n";
|
||||
}
|
||||
}
|
||||
print " <tr bgcolor='#330099'>\r\n";
|
||||
print " <th colspan=2><input type=submit name='OK_to_process' value='OK TO PROCESS'> <input type=button onClick=\"javascript:document.location='new_listloader_superL.php'\" value=\"ΞΕΚΙΝΑ\" name='reload_page'></th>\r\n";
|
||||
print " </tr>\r\n";
|
||||
print "</table>\r\n";
|
||||
# }
|
||||
print "<script language='JavaScript1.2'>document.forms[0].leadfile.disabled=false; document.forms[0].submit_file.disabled=false; document.forms[0].reload_page.disabled=false;</script>";
|
||||
}
|
||||
} else if (filesize($leadfile)>8388608) {
|
||||
print "<center><font face='arial, helvetica' size=3 color='#990000'><B>Λάθος: Το αρχείο ξεπέρασε το όριο των 8ΜΒ.</B></font></center>";
|
||||
}
|
||||
?>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,279 +0,0 @@
|
||||
<?
|
||||
|
||||
require("dbconnect.php");
|
||||
|
||||
##### depricated
|
||||
#require_once("htglobalize.php");
|
||||
|
||||
$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER'];
|
||||
$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW'];
|
||||
$PHP_SELF=$_SERVER['PHP_SELF'];
|
||||
$address1=$_GET["address1"]; if (!$address1) {$address1=$_POST["address1"];}
|
||||
$address2=$_GET["address2"]; if (!$address2) {$address2=$_POST["address2"];}
|
||||
$address3=$_GET["address3"]; if (!$address3) {$address3=$_POST["address3"];}
|
||||
$alt_phone=$_GET["alt_phone"]; if (!$alt_phone) {$alt_phone=$_POST["alt_phone"];}
|
||||
$call_began=$_GET["call_began"]; if (!$call_began) {$call_began=$_POST["call_began"];}
|
||||
$campaign_id=$_GET["campaign_id"]; if (!$campaign_id) {$campaign_id=$_POST["campaign_id"];}
|
||||
$channel=$_GET["channel"]; if (!$channel) {$channel=$_POST["channel"];}
|
||||
$channel_group=$_GET["channel_group"]; if (!$channel_group) {$channel_group=$_POST["channel_group"];}
|
||||
$city=$_GET["city"]; if (!$city) {$city=$_POST["city"];}
|
||||
$comments=$_GET["comments"]; if (!$comments) {$comments=$_POST["comments"];}
|
||||
$country_code=$_GET["country_code"]; if (!$country_code) {$country_code=$_POST["country_code"];}
|
||||
$customer_zap_channel=$_GET["customer_zap_channel"]; if (!$customer_zap_channel) {$customer_zap_channel=$_POST["customer_zap_channel"];}
|
||||
$DB=$_GET["DB"]; if (!$DB) {$DB=$_POST["DB"];}
|
||||
$dispo=$_GET["dispo"]; if (!$dispo) {$dispo=$_POST["dispo"];}
|
||||
$email=$_GET["email"]; if (!$email) {$email=$_POST["email"];}
|
||||
$end_call=$_GET["end_call"]; if (!$end_call) {$end_call=$_POST["end_call"];}
|
||||
$extension=$_GET["extension"]; if (!$extension) {$extension=$_POST["extension"];}
|
||||
$first_name=$_GET["first_name"]; if (!$first_name) {$first_name=$_POST["first_name"];}
|
||||
$group=$_GET["group"]; if (!$group) {$group=$_POST["group"];}
|
||||
$last_name=$_GET["last_name"]; if (!$last_name) {$last_name=$_POST["last_name"];}
|
||||
$lead_id=$_GET["lead_id"]; if (!$lead_id) {$lead_id=$_POST["lead_id"];}
|
||||
$list_id=$_GET["list_id"]; if (!$list_id) {$list_id=$_POST["list_id"];}
|
||||
$parked_time=$_GET["parked_time"]; if (!$parked_time) {$parked_time=$_POST["parked_time"];}
|
||||
$pass=$_GET["pass"]; if (!$pass) {$pass=$_POST["pass"];}
|
||||
$phone_code=$_GET["phone_code"]; if (!$phone_code) {$phone_code=$_POST["phone_code"];}
|
||||
$phone_number=$_GET["phone_number"]; if (!$phone_number) {$phone_number=$_POST["phone_number"];}
|
||||
$phone=$_GET["phone"]; if (!$phone) {$phone=$_POST["phone"];}
|
||||
$postal_code=$_GET["postal_code"]; if (!$postal_code) {$postal_code=$_POST["postal_code"];}
|
||||
$province=$_GET["province"]; if (!$province) {$province=$_POST["province"];}
|
||||
$security=$_GET["security"]; if (!$security) {$security=$_POST["security"];}
|
||||
$server_ip=$_GET["server_ip"]; if (!$server_ip) {$server_ip=$_POST["server_ip"];}
|
||||
$server_ip=$_GET["server_ip"]; if (!$server_ip) {$server_ip=$_POST["server_ip"];}
|
||||
$session_id=$_GET["session_id"]; if (!$session_id) {$session_id=$_POST["session_id"];}
|
||||
$state=$_GET["state"]; if (!$state) {$state=$_POST["state"];}
|
||||
$status=$_GET["status"]; if (!$status) {$status=$_POST["status"];}
|
||||
$tsr=$_GET["tsr"]; if (!$tsr) {$tsr=$_POST["tsr"];}
|
||||
$user=$_GET["user"]; if (!$user) {$user=$_POST["user"];}
|
||||
$vendor_id=$_GET["vendor_id"]; if (!$vendor_id) {$vendor_id=$_POST["vendor_id"];}
|
||||
$submit=$_GET["submit"]; if (!$submit) {$submit=$_POST["submit"];}
|
||||
$ΕΠΙΒΕΒΑΙΩΣΗ=$_GET["ΕΠΙΒΕΒΑΙΩΣΗ"]; if (!$ΕΠΙΒΕΒΑΙΩΣΗ) {$ΕΠΙΒΕΒΑΙΩΣΗ=$_POST["ΕΠΙΒΕΒΑΙΩΣΗ"];}
|
||||
|
||||
### AST GUI database administration
|
||||
### remote_dispo.php
|
||||
|
||||
# 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
|
||||
|
||||
|
||||
$STARTtime = date("U");
|
||||
$TODAY = date("Y-m-d");
|
||||
$NOW_TIME = date("Y-m-d H:i:s");
|
||||
$FILE_datetime = $STARTtime;
|
||||
|
||||
$ext_context = 'demo';
|
||||
if (!$begin_date) {$begin_date = $TODAY;}
|
||||
if (!$end_date) {$end_date = $TODAY;}
|
||||
|
||||
#$link=mysql_connect("localhost", "cron", "1234");
|
||||
#mysql_select_db("asterisk");
|
||||
|
||||
$stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 2;";
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$auth=$row[0];
|
||||
|
||||
$fp = fopen ("./project_auth_entries.txt", "a");
|
||||
$date = date("r");
|
||||
$ip = getenv("REMOTE_ADDR");
|
||||
$browser = getenv("HTTP_USER_AGENT");
|
||||
|
||||
if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or (!$auth))
|
||||
{
|
||||
Header("WWW-Authenticate: Basic realm=\"VICIDIAL-CLOSER\"");
|
||||
Header("HTTP/1.0 401 Unauthorized");
|
||||
echo "Ακυρο Ονομα Χρήστη/Κωδικός Πρόσβασης: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n";
|
||||
exit;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
if($auth>0)
|
||||
{
|
||||
$office_no=strtoupper($PHP_AUTH_USER);
|
||||
$password=strtoupper($PHP_AUTH_PW);
|
||||
$stmt="SELECT full_name from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW'";
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$LOGfullname=$row[0];
|
||||
$fullname = $row[0];
|
||||
fwrite ($fp, "VD_CLOSER|GOOD|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|$LOGfullname|\n");
|
||||
fclose($fp);
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
fwrite ($fp, "VD_CLOSER|FAIL|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|\n");
|
||||
fclose($fp);
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
<html>
|
||||
<head>
|
||||
<title>Απομακρυσμένο VICIDIAL: Τερματισμός Κλήσης</title>
|
||||
</head>
|
||||
<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0>
|
||||
<CENTER><FONT FACE="Courier" COLOR=BLACK SIZE=3>
|
||||
|
||||
<?
|
||||
|
||||
echo "<!-- $call_began $lead_id -->";
|
||||
|
||||
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='$call_length', status='$status', user='$PHP_AUTH_USER' where lead_id='$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='$status',first_name='$first_name',last_name='$last_name',address1='$address1',address2='$address2',address3='$address3',city='$city',state='$state',province='$province',postal_code='$postal_code',country_code='$country_code',alt_phone='$alt_phone',email='$email',security_phrase='$security',comments='$comments',user='$PHP_AUTH_USER' where lead_id='$lead_id'";
|
||||
if ($DB) {echo "|$stmt|\n";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
|
||||
echo "Η κλήση έχει τερματίσει $NOW_TIME\n<BR><BR>\n";
|
||||
|
||||
echo "<form><input type=button value=\"Κλείστε αυτό το Παράθυρο\" onClick=\"javascript:window.close();\"></form>\n";
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
$stmt="SELECT count(*) from vicidial_list where lead_id='$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='$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 "<br>Πληροφορίες Κλήσης: $first_name $last_name - $phone_number<br><br><form action=$PHP_SELF method=POST>\n";
|
||||
echo "<input type=hidden name=end_call value=1>\n";
|
||||
echo "<input type=hidden name=DB value=\"$DB\">\n";
|
||||
echo "<input type=hidden name=lead_id value=\"$lead_id\">\n";
|
||||
echo "<input type=hidden name=list_id value=\"$list_id\">\n";
|
||||
echo "<input type=hidden name=campaign_id value=\"$campaign_id\">\n";
|
||||
echo "<input type=hidden name=phone_code value=\"$phone_code\">\n";
|
||||
echo "<input type=hidden name=phone_number value=\"$phone_number\">\n";
|
||||
echo "<input type=hidden name=server_ip value=\"$server_ip\">\n";
|
||||
echo "<input type=hidden name=extension value=\"$extension\">\n";
|
||||
echo "<input type=hidden name=channel value=\"$channel\">\n";
|
||||
echo "<input type=hidden name=call_began value=\"$call_began\">\n";
|
||||
echo "<input type=hidden name=parked_time value=\"$parked_time\">\n";
|
||||
echo "<table cellpadding=1 cellspacing=0>\n";
|
||||
echo "<tr><td colspan=2>Vendor ID: $vendor_id ID Εκστρατείας: $campaign_id</td></tr>\n";
|
||||
echo "<tr><td colspan=2>Fronter: $tsr ID Λίστας: $list_id</td></tr>\n";
|
||||
echo "<tr><td align=right>Ονομα: </td><td align=left><input type=text name=first_name size=15 maxlength=30 value=\"$first_name\"> \n";
|
||||
echo " Επίθετο: <input type=text name=last_name size=15 maxlength=30 value=\"$last_name\"> </td></tr>\n";
|
||||
echo "<tr><td align=rightΔιεύθυνση1 : </td><td align=left><input type=text name=address1 size=30 maxlength=30 value=\"$address1\"></td></tr>\n";
|
||||
echo "<tr><td align=rightΔιεύθυνση2 : </td><td align=left><input type=text name=address2 size=30 maxlength=30 value=\"$address2\"></td></tr>\n";
|
||||
echo "<tr><td align=rightΔιεύθυνση3 : </td><td align=left><input type=text name=address3 size=30 maxlength=30 value=\"$address3\"></td></tr>\n";
|
||||
echo "<tr><td align=right>Πόλη : </td><td align=left><input type=text name=city size=30 maxlength=30 value=\"$city\"></td></tr>\n";
|
||||
echo "<tr><td align=rightΚράτος </td><td align=left><input type=text name=state size=2 maxlength=2 value=\"$state\"> \n";
|
||||
echo " Ταχ.Κωδ.: <input type=text name=postal_code size=10 maxlength=10 value=\"$postal_code\"> </td></tr>\n";
|
||||
|
||||
echo "<tr><td align=right>Επαρχία : </td><td align=left><input type=text name=province size=30 maxlength=30 value=\"$province\"></td></tr>\n";
|
||||
echo "<tr><td align=right>Χώρα : </td><td align=left><input type=text name=country_code size=3 maxlength=3 value=\"$country_code\"></td></tr>\n";
|
||||
echo "<tr><td align=rightΕναλ/κό Τηλέφωνο: </td><td align=left><input type=text name=alt_phone size=10 maxlength=10 value=\"$alt_phone\"></td></tr>\n";
|
||||
echo "<tr><td align=rightΗλεκτρονικό ταχυδρομείο: </td><td align=left><input type=text name=email size=30 maxlength=50 value=\"$email\"></td></tr>\n";
|
||||
echo "<tr><td align=rightΑσφάλεια: </td><td align=left><input type=text name=security size=30 maxlength=100 value=\"$security\"></td></tr>\n";
|
||||
echo "<tr><td align=right>Σχόλια : </td><td align=left><input type=text name=comments size=30 maxlength=255 value=\"$comments\"></td></tr>\n";
|
||||
echo "<tr bgcolor=#B6D3FC><td align=right>Τερματισμός </td><td align=left><select size=1 name=status>\n";
|
||||
|
||||
$stmt="SELECT * from vicidial_statuses where selectable='Y' order by status";
|
||||
$rsltx=mysql_query($stmt, $link);
|
||||
$statuses_to_print = mysql_num_rows($rsltx);
|
||||
$statuses_list='';
|
||||
|
||||
$o=0;
|
||||
while ($statuses_to_print > $o) {
|
||||
$rowx=mysql_fetch_row($rsltx);
|
||||
$statuses_list .= "<option value=\"$rowx[0]\">$rowx[0] - $rowx[1]</option>\n";
|
||||
$o++;
|
||||
}
|
||||
echo "$statuses_list";
|
||||
echo "</select></td></tr>\n";
|
||||
|
||||
|
||||
echo "<tr><td colspan=2><input type=submit name=submit value=\"Τερματισμό Κλήσης\"></td></tr>\n";
|
||||
echo "</table></form>\n";
|
||||
echo "<BR><BR><BR>\n";
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "ΑΠΟΤΥΧΙΑ ψαξίματος καθοδήγησης για lead_id $lead_id $NOW_TIME\n<BR><BR>\n";
|
||||
# echo "<a href=\"$PHP_SELF\">Close this window</a>\n<BR><BR>\n";
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
$ENDtime = date("U");
|
||||
|
||||
$RUNtime = ($ENDtime - $STARTtime);
|
||||
|
||||
echo "\n\n\n<br><br><br>\n\n";
|
||||
|
||||
|
||||
echo "<font size=0>\n\n\n<br><br><br>\nδιαδικασία που τρέχει: $RUNtime seconds</font>";
|
||||
|
||||
|
||||
?>
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
<?
|
||||
|
||||
exit;
|
||||
|
||||
|
||||
|
||||
?>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,70 +0,0 @@
|
||||
<?
|
||||
require("dbconnect.php");
|
||||
|
||||
##### depricated
|
||||
#require_once("htglobalize.php");
|
||||
|
||||
# server_stats.php
|
||||
|
||||
$NOW_DATE = date("Y-m-d");
|
||||
$NOW_TIME = date("Y-m-d H:i:s");
|
||||
$STARTtime = date("U");
|
||||
if (!$query_date) {$query_date = $NOW_DATE;}
|
||||
|
||||
$stmt="select * from servers;";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$servers_to_print = mysql_num_rows($rslt);
|
||||
$i=0;
|
||||
while ($i < $servers_to_print)
|
||||
{
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$server_id[$i] = $row[0];
|
||||
$server_description[$i] = $row[1];
|
||||
$server_ip[$i] = $row[2];
|
||||
$active[$i] = $row[3];
|
||||
$i++;
|
||||
}
|
||||
?>
|
||||
|
||||
<HTML>
|
||||
<HEAD>
|
||||
|
||||
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
|
||||
<TITLE>VICIDIAL: Στατιστικά Διακομιστή and Reports</TITLE></HEAD><BODY BGCOLOR=WHITE>
|
||||
<FONT SIZE=2>
|
||||
<H1>VICIDIAL: Στατιστικά Διακομιστή and Reports</H1>
|
||||
<UL>
|
||||
<LI><a href="AST_timeonVDADall.php"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=2>TIME ON VDAD (per campaign)</a></FONT>
|
||||
<LI><a href="AST_parkstats.php"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=2>ΑΝΑΦΟΡΑ ΣΤΑΘΜΕΥΣΗΣ</a></FONT>
|
||||
<LI><a href="AST_VDADstats.php"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=2>ΑΝΑΦΟΡΑ VDAD</a></FONT>
|
||||
<LI><a href="AST_CLOSERstats.php"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=2>ΑΝΑΦΟΡΑ CLOSER</a></FONT>
|
||||
<LI><a href="AST_agent_performance.php"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=2>AGENT PERFORMANCE</a></FONT>
|
||||
<LI><a href="AST_agent_performance_detail.php"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=2>AGENT PERFORMANCE DETAIL</a></FONT>
|
||||
<LI><a href="AST_server_performance.php"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=2>SERVER PERFORMANCE</a></FONT>
|
||||
</UL>
|
||||
|
||||
<PRE><TABLE BORDER=1>
|
||||
<TR><TD>SERVER</TD><TD>ΠΕΡΙΓΡΑΦΗ</TD><TD>IP ADDRESS</TD><TD>ΕΝΕΡΓΑ</TD><TD>VDAD time</TD><TD>VDcall time</TD><TD>PARK time</TD><TD>CLOSER/INBOUND time</TD></TR>
|
||||
<?
|
||||
|
||||
$o=0;
|
||||
while ($servers_to_print > $o)
|
||||
{
|
||||
echo "<TR>\n";
|
||||
echo "<TD>$server_id[$o]</TD>\n";
|
||||
echo "<TD>$server_description[$o]</TD>\n";
|
||||
echo "<TD>$server_ip[$o]</TD>\n";
|
||||
echo "<TD>$active[$o]</TD>\n";
|
||||
echo "<TD><a href=\"AST_timeonVDAD.php?server_ip=$server_ip[$o]\">LINK</a></TD>\n";
|
||||
echo "<TD><a href=\"AST_timeoncall.php?server_ip=$server_ip[$o]\">LINK</a></TD>\n";
|
||||
echo "<TD><a href=\"AST_timeonpark.php?server_ip=$server_ip[$o]\">LINK</a></TD>\n";
|
||||
echo "<TD><a href=\"AST_timeonVDAD_closer.php?server_ip=$server_ip[$o]\">LINK</a></TD>\n";
|
||||
echo "</TR>\n";
|
||||
$o++;
|
||||
}
|
||||
|
||||
?>
|
||||
</TABLE>
|
||||
|
||||
</BODY></HTML>
|
||||
@@ -1,302 +0,0 @@
|
||||
<?
|
||||
header ("Content-type: text/html; charset=utf-8");
|
||||
|
||||
require("dbconnect.php");
|
||||
|
||||
##### depricated
|
||||
#require_once("htglobalize.php");
|
||||
|
||||
$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER'];
|
||||
$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW'];
|
||||
$PHP_SELF=$_SERVER['PHP_SELF'];
|
||||
$begin_date=$_GET["begin_date"]; if (!$begin_date) {$begin_date=$_POST["begin_date"];}
|
||||
$end_date=$_GET["end_date"]; if (!$end_date) {$end_date=$_POST["end_date"];}
|
||||
$user=$_GET["user"]; if (!$user) {$user=$_POST["user"];}
|
||||
$submit=$_GET["submit"]; if (!$submit) {$submit=$_POST["submit"];}
|
||||
$ΕΠΙΒΕΒΑΙΩΣΗ=$_GET["ΕΠΙΒΕΒΑΙΩΣΗ"]; if (!$ΕΠΙΒΕΒΑΙΩΣΗ) {$ΕΠΙΒΕΒΑΙΩΣΗ=$_POST["ΕΠΙΒΕΒΑΙΩΣΗ"];}
|
||||
|
||||
### AST GUI vicidial user stats
|
||||
### user_stats.php
|
||||
|
||||
$STARTtime = date("U");
|
||||
$TODAY = date("Y-m-d");
|
||||
|
||||
if (!$begin_date) {$begin_date = $TODAY;}
|
||||
if (!$end_date) {$end_date = $TODAY;}
|
||||
|
||||
$stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 7;";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$auth=$row[0];
|
||||
|
||||
$fp = fopen ("./project_auth_entries.txt", "a");
|
||||
$date = date("r");
|
||||
$ip = getenv("REMOTE_ADDR");
|
||||
$browser = getenv("HTTP_USER_AGENT");
|
||||
|
||||
if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or (!$auth))
|
||||
{
|
||||
Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\"");
|
||||
Header("HTTP/1.0 401 Unauthorized");
|
||||
echo "Ακυρο Ονομα Χρήστη/Κωδικός Πρόσβασης: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n";
|
||||
exit;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
if($auth>0)
|
||||
{
|
||||
$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];
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
?>
|
||||
<html>
|
||||
<head>
|
||||
<title>VICIDIAL ΔΙΑΧ: User Stats</title>
|
||||
</head>
|
||||
<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0>
|
||||
<CENTER>
|
||||
<TABLE WIDTH=620 BGCOLOR=#D9E6FE cellpadding=2 cellspacing=0><TR BGCOLOR=#015B91><TD ALIGN=LEFT><FONT FACE="ARIAL,HELVETICA" COLOR=WHITE SIZE=2><B> VICIDIAL ΔΙΑΧ: User Stats for <? echo $user ?></TD><TD ALIGN=RIGHT><FONT FACE="ARIAL,HELVETICA" COLOR=WHITE SIZE=2><B><? echo date("l F j, Y G:i:s A") ?> </TD></TR>
|
||||
|
||||
|
||||
|
||||
|
||||
<?
|
||||
|
||||
echo "<TR BGCOLOR=\"#F0F5FE\"><TD ALIGN=LEFT COLSPAN=2><FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2><B> \n";
|
||||
|
||||
echo "<form action=$PHP_SELF method=POST>\n";
|
||||
echo "<input type=hidden name=user value=\"$user\">\n";
|
||||
echo "<input type=text name=begin_date value=\"$begin_date\" size=10 maxsize=10> to \n";
|
||||
echo "<input type=text name=end_date value=\"$end_date\" size=10 maxsize=10> \n";
|
||||
echo "<input type=submit name=submit value=submit>\n";
|
||||
|
||||
|
||||
echo " $user - $full_name\n";
|
||||
|
||||
echo "</B></TD></TR>\n";
|
||||
echo "<TR><TD ALIGN=LEFT COLSPAN=2>\n";
|
||||
|
||||
|
||||
$stmt="SELECT count(*),status, sum(length_in_sec) from vicidial_log where user='$user' and call_date >= '$begin_date 0:00:01' and call_date <= '$end_date 23:59:59' group by status order by status";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
$statuses_to_print = mysql_num_rows($rslt);
|
||||
|
||||
echo "<br><center>\n";
|
||||
|
||||
echo "<B>ΧΡΟΝΟΣ ΟΜΙΛΙΑΣ ΚΑΙ ΚΑΤΑΣΤΑΣΗ:</B>\n";
|
||||
|
||||
echo "<center><TABLE width=300 cellspacing=0 cellpadding=1>\n";
|
||||
echo "<tr><td><font size=2>ΚΑΤΑΣΤΑΣΗ</td><td align=right><font size=2>ΚΑΤΑΜΕΤΡΗΣΗ</td><td align=right><font size=2>ΩΡΕΣ:ΛΕΠΤΑ</td></tr>\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 "<tr $bgcolor><td><font size=2>$row[1]</td>";
|
||||
echo "<td align=right><font size=2> $row[0]</td>\n";
|
||||
echo "<td align=right><font size=2> $call_hours_int:$call_minutes_int</td></tr>\n";
|
||||
$total_calls = ($total_calls + $row[0]);
|
||||
|
||||
$call_seconds=0;
|
||||
$o++;
|
||||
}
|
||||
|
||||
$stmt="SELECT sum(length_in_sec) from vicidial_log where user='$user' and call_date >= '$begin_date 0:00:01' and call_date <= '$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 "<tr><td><font size=2>ΣΥΝΟΛΙΚΕΣ ΚΛΗΣΕΙΣ </td><td align=right><font size=2> $total_calls</td><td align=right><font size=2> $call_hours_int:$call_minutes_int</td></tr>\n";
|
||||
echo "</TABLE></center>\n";
|
||||
echo "<br><br>\n";
|
||||
|
||||
echo "<center>\n";
|
||||
|
||||
echo "<B> ΧΡΟΝΟΣ ΣYΝΔΕΣΗΣ/ΑΠΟΣΥΝΔΕΣΗΣ:</B>\n";
|
||||
echo "<TABLE width=400 cellspacing=0 cellpadding=1>\n";
|
||||
echo "<tr><td><font size=2 >ΣΥΜΒΑΝ</td><td align=right><font size=2> ΗΜΕΡΑ</td><td align=right><font size=2>ΕΚΣΤΡΑΤΕΙΑ</td><td align=right><font size=2>ΩΡΕΣ:ΛΕΠΤΑ</td></tr>\n";
|
||||
|
||||
$stmt="SELECT event,event_epoch,event_date,campaign_id from vicidial_user_log where user='$user' and event_date >= '$begin_date 0:00:01' and event_date <= '$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 "<tr $bgcolor><td><font size=2>$row[0]</td>";
|
||||
echo "<td align=right><font size=2> $row[2]</td>\n";
|
||||
echo "<td align=right><font size=2> $row[3]</td>\n";
|
||||
echo "<td align=right><font size=2> </td></tr>\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 "<tr $bgcolor><td><font size=2>$row[0]</td>";
|
||||
echo "<td align=right><font size=2> $row[2]</td>\n";
|
||||
echo "<td align=right><font size=2> $row[3]</td>\n";
|
||||
echo "<td align=right><font size=2> $event_hours_int:$event_minutes_int</td></tr>\n";
|
||||
$event_start_seconds='';
|
||||
$event_stop_seconds='';
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "<tr $bgcolor><td><font size=2>$row[0]</td>";
|
||||
echo "<td align=right><font size=2> $row[2]</td>\n";
|
||||
echo "<td align=right><font size=2> $row[3]</td>\n";
|
||||
echo "<td align=right><font size=2> </td></tr>\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 "<tr><td><font size=2>ΣΥΝΟΛΙΚΑ</td>";
|
||||
echo "<td align=right><font size=2> </td>\n";
|
||||
echo "<td align=right><font size=2> </td>\n";
|
||||
echo "<td align=right><font size=2> $total_login_hours_int:$total_login_minutes_int</td></tr>\n";
|
||||
|
||||
echo "</TABLE></center>\n";
|
||||
|
||||
|
||||
echo "<br><br>\n";
|
||||
|
||||
echo "<center>\n";
|
||||
|
||||
echo "<B>Τελευταίες 50 Κλήσεις:</B>\n";
|
||||
echo "<TABLE width=550 cellspacing=0 cellpadding=1>\n";
|
||||
echo "<tr><td><font size=2>DATE/TIME </td><td align=left><font size=2>LENGTH</td><td align=left><font size=2> STATUS</td><td align=left><font size=2> PHONE</td><td align=right><font size=2>ΕΚΣΤΡΑΤΕΙΑ</td><td align=right><font size=2> LIST</td><td align=right><font size=2> LEAD</td></tr>\n";
|
||||
|
||||
$stmt="select * from vicidial_log where user='$user' order by uniqueid desc limit 50;";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
$logs_to_print = mysql_num_rows($rslt);
|
||||
|
||||
$u=0;
|
||||
while ($logs_to_print > $u) {
|
||||
$row=mysql_fetch_row($rslt);
|
||||
if (eregi("1$|3$|5$|7$|9$", $u))
|
||||
{$bgcolor='bgcolor="#B9CBFD"';}
|
||||
else
|
||||
{$bgcolor='bgcolor="#9BB9FB"';}
|
||||
|
||||
echo "<tr $bgcolor><td><font size=2>$row[4]</td>";
|
||||
echo "<td align=left><font size=2> $row[7]</td>\n";
|
||||
echo "<td align=left><font size=2> $row[8]</td>\n";
|
||||
echo "<td align=left><font size=2> $row[10] </td>\n";
|
||||
echo "<td align=right><font size=2> $row[3] </td>\n";
|
||||
echo "<td align=right><font size=2> $row[2] </td>\n";
|
||||
echo "<td align=right><font size=2> <A HREF=\"admin_modify_lead.php?lead_id=$row[1]\" target=\"_blank\">$row[1]</A> </td></tr>\n";
|
||||
|
||||
$u++;
|
||||
}
|
||||
|
||||
|
||||
echo "</TABLE></center>\n";
|
||||
|
||||
|
||||
$ENDtime = date("U");
|
||||
|
||||
$RUNtime = ($ENDtime - $STARTtime);
|
||||
|
||||
echo "\n\n\n<br><br><br>\n\n";
|
||||
|
||||
|
||||
echo "<font size=0>\n\n\n<br><br><br>\nδιαδικασία που τρέχει: $RUNtime seconds</font>";
|
||||
|
||||
|
||||
?>
|
||||
|
||||
|
||||
</TD></TR><TABLE>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
<?
|
||||
|
||||
exit;
|
||||
|
||||
|
||||
|
||||
?>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user