release 1.1.12
git-svn-id: svn://192.168.202.10@10 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
@@ -6,8 +6,10 @@
|
||||
# live real-time stats for the VICIDIAL Auto-Dialer
|
||||
#
|
||||
# changes:
|
||||
# 50406-0920 Added Paused agents < 1 min (Chris Doyle)
|
||||
|
||||
# 50406-0920 - Added Paused agents < 1 min (Chris Doyle)
|
||||
# 60620-1040 - Added variable filtering to eliminate SQL injection attack threat
|
||||
# - Added required user/pass to gain access to this page
|
||||
#
|
||||
|
||||
header ("Content-type: text/html; charset=utf-8");
|
||||
|
||||
@@ -25,6 +27,23 @@ if (isset($_GET["submit"])) {$submit=$_GET["submit"];}
|
||||
if (isset($_GET["SUBMIT"])) {$SUBMIT=$_GET["SUBMIT"];}
|
||||
elseif (isset($_POST["SUBMIT"])) {$SUBMIT=$_POST["SUBMIT"];}
|
||||
|
||||
$PHP_AUTH_USER = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_USER);
|
||||
$PHP_AUTH_PW = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_PW);
|
||||
|
||||
$stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 6;";
|
||||
if ($DB) {echo "|$stmt|\n";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$auth=$row[0];
|
||||
|
||||
if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or (!$auth))
|
||||
{
|
||||
Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\"");
|
||||
Header("HTTP/1.0 401 Unauthorized");
|
||||
echo "Invalid Username/Password: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n";
|
||||
exit;
|
||||
}
|
||||
|
||||
$NOW_TIME = date("Y-m-d H:i:s");
|
||||
$STARTtime = date("U");
|
||||
$epochSIXhoursAGO = ($STARTtime - 21600);
|
||||
@@ -66,19 +85,19 @@ if ($reset_counter > 7)
|
||||
echo "<META HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html; charset=utf-8\">\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";
|
||||
echo "<PRE><FONT SIZE=3>";
|
||||
|
||||
###################################################################################
|
||||
###### TIME ON SYSTEM
|
||||
###################################################################################
|
||||
|
||||
echo "VICIDIAL: Agents Time On Calls $NOW_TIME\n\n";
|
||||
echo "VICIDIAL: Agents Time On Calls $NOW_TIME <a href=\"./server_stats.php\">REPORTS</a>\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;";
|
||||
$stmt="select extension,user,conf_exten,channel,status,last_call_time,UNIX_TIMESTAMP(last_call_time),UNIX_TIMESTAMP(last_call_finish) from vicidial_live_agents where server_ip='" . mysql_real_escape_string($server_ip) . "' order by extension;";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$talking_to_print = mysql_num_rows($rslt);
|
||||
@@ -169,7 +188,7 @@ echo "+------------+--------+----------+--------------------+-------------------
|
||||
# $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;";
|
||||
$stmt="select channel,status,campaign_id,phone_code,phone_number,call_time,UNIX_TIMESTAMP(call_time) from vicidial_auto_calls where status NOT IN('XFER') and server_ip='" . mysql_real_escape_string($server_ip) . "' order by auto_call_id;";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$parked_to_print = mysql_num_rows($rslt);
|
||||
|
||||
Reference in New Issue
Block a user