release 1.1.12
git-svn-id: svn://192.168.202.10@10 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
@@ -11,6 +11,8 @@
|
||||
# 60421-1043 - check GET/POST vars lines with isset to not trigger PHP NOTICES
|
||||
# 60511-1343 - Added leads and drop info at the top of the screen
|
||||
# 60608-1539 - Fixed CLOSER tallies for active calls
|
||||
# 60619-1658 - Added variable filtering to eliminate SQL injection attack threat
|
||||
# - Added required user/pass to gain access to this page
|
||||
#
|
||||
|
||||
header ("Content-type: text/html; charset=utf-8");
|
||||
@@ -37,6 +39,23 @@ if (isset($_GET["SUBMIT"])) {$SUBMIT=$_GET["SUBMIT"];}
|
||||
|
||||
if (!isset($group)) {$group='';}
|
||||
|
||||
$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");
|
||||
$NOW_DAY = date("Y-m-d");
|
||||
$NOW_HOUR = date("H:i:s");
|
||||
@@ -111,16 +130,16 @@ echo "<SELECT SIZE=1 NAME=group>\n";
|
||||
$o++;
|
||||
}
|
||||
echo "</SELECT>\n";
|
||||
echo "<INPUT type=submit NAME=SUBMIT VALUE=SUBMIT> \n";
|
||||
echo "<INPUT type=submit NAME=SUBMIT VALUE=SUBMIT><FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2> \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>";
|
||||
echo " <a href=\"./admin.php?ADD=34&campaign_id=$group\">MODIFY</a> \n";
|
||||
echo " <a href=\"./admin.php?ADD=34&campaign_id=$group\">MODIFY</a> | <a href=\"./server_stats.php\">REPORTS</a> </FONT>\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,lead_filter_id,hopper_level from vicidial_campaigns where campaign_id='$group';";
|
||||
$stmt="select auto_dial_level,dial_status_a,dial_status_b,dial_status_c,dial_status_d,dial_status_e,lead_order,lead_filter_id,hopper_level from vicidial_campaigns where campaign_id='" . mysql_real_escape_string($group) . "';";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$HOPlev = $row[8];
|
||||
@@ -132,12 +151,12 @@ echo "<TD ALIGN=RIGHT><font size=2><B>ORDER:</B></TD><TD ALIGN=LEFT><font size=2
|
||||
echo "<TD ALIGN=RIGHT><font size=2><B>FILTER:</B></TD><TD ALIGN=LEFT><font size=2> $row[7] </TD>";
|
||||
echo "</TR>";
|
||||
|
||||
$stmt="select count(*) from vicidial_hopper where campaign_id='$group';";
|
||||
$stmt="select count(*) from vicidial_hopper where campaign_id='" . mysql_real_escape_string($group) . "';";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$VDhop = $row[0];
|
||||
|
||||
$stmt="select dialable_leads,calls_today,drops_today,drops_today_pct from vicidial_campaign_stats where campaign_id='$group';";
|
||||
$stmt="select dialable_leads,calls_today,drops_today,drops_today_pct from vicidial_campaign_stats where campaign_id='" . mysql_real_escape_string($group) . "';";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$DAleads = $row[0];
|
||||
@@ -166,17 +185,17 @@ echo "</FORM>\n\n";
|
||||
###################################################################################
|
||||
if (eregi("CLOSER",$group))
|
||||
{
|
||||
$stmt="select closer_campaigns from vicidial_campaigns where campaign_id='$group';";
|
||||
$stmt="select closer_campaigns from vicidial_campaigns where campaign_id='" . mysql_real_escape_string($group) . "';";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$closer_campaigns = preg_replace("/^ | -$/","",$row[0]);
|
||||
$closer_campaigns = preg_replace("/ /","','",$closer_campaigns);
|
||||
$closer_campaigns = "'$closer_campaigns'";
|
||||
|
||||
$stmt="select status from vicidial_auto_calls where status NOT IN('XFER') and ( (call_type='IN' and campaign_id IN($closer_campaigns)) or (campaign_id='$group' and call_type='OUT') );";
|
||||
$stmt="select status from vicidial_auto_calls where status NOT IN('XFER') and ( (call_type='IN' and campaign_id IN($closer_campaigns)) or (campaign_id='" . mysql_real_escape_string($group) . "' and call_type='OUT') );";
|
||||
}
|
||||
else
|
||||
{$stmt="select status from vicidial_auto_calls where status NOT IN('XFER') and campaign_id='$group';";}
|
||||
{$stmt="select status from vicidial_auto_calls where status NOT IN('XFER') and campaign_id='" . mysql_real_escape_string($group) . "';";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$parked_to_print = mysql_num_rows($rslt);
|
||||
@@ -238,7 +257,7 @@ $Aecho .= "| STATION | USER | SESSIONID | STATUS | SERVER IP | CALL S
|
||||
$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;";
|
||||
$stmt="select extension,user,conf_exten,status,server_ip,UNIX_TIMESTAMP(last_call_time),UNIX_TIMESTAMP(last_call_finish),call_server_ip,campaign_id from vicidial_live_agents where campaign_id='" . mysql_real_escape_string($group) . "' order by status,last_call_time;";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$talking_to_print = mysql_num_rows($rslt);
|
||||
|
||||
Reference in New Issue
Block a user