2006-04-21_snapshot

git-svn-id: svn://192.168.202.10@5 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
mattf
2006-07-07 15:17:45 +00:00
parent 4862328b6e
commit dcbe8f2faa
54 changed files with 2283 additions and 1461 deletions
+1
View File
@@ -42,6 +42,7 @@ Vicidial Transfers -</B> This option can prevent an agent from opening the trans
Delete Filters -</B> This option allows the user to be able to delete vicidial lead filters from the system
Scheduled Callbacks:
Agent-Only Callbacks:
Users List
############################################################ CLIENT
+10 -5
View File
@@ -9,15 +9,20 @@ 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"];}
$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"];}
if (isset($_GET["group"])) {$group=$_GET["group"];}
elseif (isset($_POST["group"])) {$group=$_POST["group"];}
if (isset($_GET["query_date"])) {$query_date=$_GET["query_date"];}
elseif (isset($_POST["query_date"])) {$query_date=$_POST["query_date"];}
if (isset($_GET["submit"])) {$submit=$_GET["submit"];}
elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];}
if (isset($_GET["SUBMIT"])) {$SUBMIT=$_GET["SUBMIT"];}
elseif (isset($_POST["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 (!isset($group)) {$group = '';}
if (!isset($query_date)) {$query_date = $NOW_DATE;}
$stmt="select group_id from vicidial_inbound_groups;";
$rslt=mysql_query($stmt, $link);
+10 -5
View File
@@ -11,15 +11,20 @@ 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"];}
$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"];}
if (isset($_GET["group"])) {$group=$_GET["group"];}
elseif (isset($_POST["group"])) {$group=$_POST["group"];}
if (isset($_GET["query_date"])) {$query_date=$_GET["query_date"];}
elseif (isset($_POST["query_date"])) {$query_date=$_POST["query_date"];}
if (isset($_GET["submit"])) {$submit=$_GET["submit"];}
elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];}
if (isset($_GET["SUBMIT"])) {$SUBMIT=$_GET["SUBMIT"];}
elseif (isset($_POST["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 (!isset($group)) {$group = '';}
if (!isset($query_date)) {$query_date = $NOW_DATE;}
$stmt="select campaign_id from vicidial_campaigns;";
$rslt=mysql_query($stmt, $link);
@@ -9,15 +9,19 @@ 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"];}
if (isset($_GET["group"])) {$group=$_GET["group"];}
elseif (isset($_POST["group"])) {$group=$_POST["group"];}
if (isset($_GET["submit"])) {$submit=$_GET["submit"];}
elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];}
if (isset($_GET["SUBMIT"])) {$SUBMIT=$_GET["SUBMIT"];}
elseif (isset($_POST["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';}
if (!isset($group)) {$group = '';}
if (!isset($query_date)) {$query_date = $NOW_DATE;}
if (!isset($server_ip)) {$server_ip = '10.10.10.15';}
$stmt="select campaign_id,campaign_name from vicidial_campaigns order by campaign_id;";
$rslt=mysql_query($stmt, $link);
@@ -9,20 +9,24 @@ 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"];}
$submit=$_GET["submit"]; if (!$submit) {$submit=$_POST["submit"];}
$SUBMIT=$_GET["SUBMIT"]; if (!$SUBMIT) {$SUBMIT=$_POST["SUBMIT"];}
if (isset($_GET["query_date"])) {$query_date=$_GET["query_date"];}
elseif (isset($_POST["query_date"])) {$query_date=$_POST["query_date"];}
if (isset($_GET["submit"])) {$submit=$_GET["submit"];}
elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];}
if (isset($_GET["SUBMIT"])) {$SUBMIT=$_GET["SUBMIT"];}
elseif (isset($_POST["SUBMIT"])) {$SUBMIT=$_POST["SUBMIT"];}
### AST GUI database administration
### AST_admin_log_display.php
###
### CHANGES
### 50325-0932 - First build
### 51123-1443 - removed globals=on requirement
# AST GUI database administration
# AST_admin_log_display.php
#
# CHANGES
# 50325-0932 - First build
# 51123-1443 - removed globals=on requirement
# 60421-1229 - check GET/POST vars lines with isset to not trigger PHP NOTICES
$version = '0.0.1';
$build = '50325-0932';
$version = '0.0.3';
$build = '60421-1229';
$STARTtime = date("U");
@@ -9,16 +9,22 @@ 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"];}
$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"];}
if (isset($_GET["group"])) {$group=$_GET["group"];}
elseif (isset($_POST["group"])) {$group=$_POST["group"];}
if (isset($_GET["query_date"])) {$query_date=$_GET["query_date"];}
elseif (isset($_POST["query_date"])) {$query_date=$_POST["query_date"];}
if (isset($_GET["shift"])) {$shift=$_GET["shift"];}
elseif (isset($_POST["shift"])) {$shift=$_POST["shift"];}
if (isset($_GET["submit"])) {$submit=$_GET["submit"];}
elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];}
if (isset($_GET["SUBMIT"])) {$SUBMIT=$_GET["SUBMIT"];}
elseif (isset($_POST["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 (!isset($group)) {$group = '';}
if (!isset($query_date)) {$query_date = $NOW_DATE;}
$stmt="select campaign_id from vicidial_campaigns;";
$rslt=mysql_query($stmt, $link);
@@ -9,16 +9,22 @@ 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"];}
if (isset($_GET["query_date"])) {$query_date=$_GET["query_date"];}
elseif (isset($_POST["query_date"])) {$query_date=$_POST["query_date"];}
if (isset($_GET["group"])) {$group=$_GET["group"];}
elseif (isset($_POST["group"])) {$group=$_POST["group"];}
if (isset($_GET["shift"])) {$shift=$_GET["shift"];}
elseif (isset($_POST["shift"])) {$shift=$_POST["shift"];}
if (isset($_GET["submit"])) {$submit=$_GET["submit"];}
elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];}
if (isset($_GET["SUBMIT"])) {$SUBMIT=$_GET["SUBMIT"];}
elseif (isset($_POST["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 (!isset($group)) {$group = '';}
if (!isset($query_date)) {$query_date = $NOW_DATE;}
$stmt="select campaign_id from vicidial_campaigns;";
$rslt=mysql_query($stmt, $link);
@@ -9,16 +9,21 @@ 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"];}
if (isset($_GET["agent"])) {$agent=$_GET["agent"];}
elseif (isset($_POST["agent"])) {$agent=$_POST["agent"];}
if (isset($_GET["query_date"])) {$query_date=$_GET["query_date"];}
elseif (isset($_POST["query_date"])) {$query_date=$_POST["query_date"];}
if (isset($_GET["calls_summary"])) {$calls_summary=$_GET["calls_summary"];}
elseif (isset($_POST["calls_summary"])) {$calls_summary=$_POST["calls_summary"];}
if (isset($_GET["submit"])) {$submit=$_GET["submit"];}
elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];}
if (isset($_GET["SUBMIT"])) {$SUBMIT=$_GET["SUBMIT"];}
elseif (isset($_POST["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 (!isset($query_date)) {$query_date = $NOW_DATE;}
?>
+10 -5
View File
@@ -9,15 +9,20 @@ 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"];}
$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"];}
if (isset($_GET["group"])) {$group=$_GET["group"];}
elseif (isset($_POST["group"])) {$group=$_POST["group"];}
if (isset($_GET["query_date"])) {$query_date=$_GET["query_date"];}
elseif (isset($_POST["query_date"])) {$query_date=$_POST["query_date"];}
if (isset($_GET["submit"])) {$submit=$_GET["submit"];}
elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];}
if (isset($_GET["SUBMIT"])) {$SUBMIT=$_GET["SUBMIT"];}
elseif (isset($_POST["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 (!isset($group)) {$group = '';}
if (!isset($query_date)) {$query_date = $NOW_DATE;}
$stmt="select distinct channel_group from park_log;";
$rslt=mysql_query($stmt, $link);
@@ -1,19 +1,24 @@
<?
### AST_server_performance.php
###
### Copyright (C) 2006 Matt Florell <vicidial@gmail.com> LICENSE: GPLv2
###
# AST_server_performance.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"];}
if (isset($_GET["query_date"])) {$query_date=$_GET["query_date"];}
elseif (isset($_POST["query_date"])) {$query_date=$_POST["query_date"];}
if (isset($_GET["group"])) {$group=$_GET["group"];}
elseif (isset($_POST["group"])) {$group=$_POST["group"];}
if (isset($_GET["shift"])) {$shift=$_GET["shift"];}
elseif (isset($_POST["shift"])) {$shift=$_POST["shift"];}
if (isset($_GET["submit"])) {$submit=$_GET["submit"];}
elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];}
if (isset($_GET["SUBMIT"])) {$SUBMIT=$_GET["SUBMIT"];}
elseif (isset($_POST["SUBMIT"])) {$SUBMIT=$_POST["SUBMIT"];}
# path from root to where ploticus files will be stored
$DOCroot = "$WeBServeRRooT/vicidial/ploticus/";
@@ -22,7 +27,8 @@ $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 (!isset($query_date)) {$query_date = $NOW_DATE;}
if (!isset($group)) {$group = '';}
$stmt="select server_ip from servers;";
$rslt=mysql_query($stmt, $link);
@@ -16,10 +16,14 @@ 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"];}
$submit=$_GET["submit"]; if (!$submit) {$submit=$_POST["submit"];}
$SUBMIT=$_GET["SUBMIT"]; if (!$SUBMIT) {$SUBMIT=$_POST["SUBMIT"];}
if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];}
elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];}
if (isset($_GET["reset_counter"])) {$reset_counter=$_GET["reset_counter"];}
elseif (isset($_POST["reset_counter"])) {$reset_counter=$_POST["reset_counter"];}
if (isset($_GET["submit"])) {$submit=$_GET["submit"];}
elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];}
if (isset($_GET["SUBMIT"])) {$SUBMIT=$_GET["SUBMIT"];}
elseif (isset($_POST["SUBMIT"])) {$SUBMIT=$_POST["SUBMIT"];}
$NOW_TIME = date("Y-m-d H:i:s");
$STARTtime = date("U");
@@ -12,10 +12,14 @@ 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"];}
$submit=$_GET["submit"]; if (!$submit) {$submit=$_POST["submit"];}
$SUBMIT=$_GET["SUBMIT"]; if (!$SUBMIT) {$SUBMIT=$_POST["SUBMIT"];}
if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];}
elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];}
if (isset($_GET["reset_counter"])) {$reset_counter=$_GET["reset_counter"];}
elseif (isset($_POST["reset_counter"])) {$reset_counter=$_POST["reset_counter"];}
if (isset($_GET["submit"])) {$submit=$_GET["submit"];}
elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];}
if (isset($_GET["SUBMIT"])) {$SUBMIT=$_GET["SUBMIT"];}
elseif (isset($_POST["SUBMIT"])) {$SUBMIT=$_POST["SUBMIT"];}
$NOW_TIME = date("Y-m-d H:i:s");
$STARTtime = date("U");
@@ -1,13 +1,15 @@
<?
### AST_timeonVDADall.php
###
### Copyright (C) 2006 Matt Florell <vicidial@gmail.com> LICENSE: GPLv2
###
# 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
# 50406-0920 - Added Paused agents < 1 min (Chris Doyle)
# 51130-1218 - Modified layout and info to show all servers in a vicidial system
# 60421-1043 - check GET/POST vars lines with isset to not trigger PHP NOTICES
#
header ("Content-type: text/html; charset=utf-8");
@@ -16,14 +18,22 @@ 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"];}
if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];}
elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];}
if (isset($_GET["reset_counter"])) {$reset_counter=$_GET["reset_counter"];}
elseif (isset($_POST["reset_counter"])) {$reset_counter=$_POST["reset_counter"];}
if (isset($_GET["RR"])) {$RR=$_GET["RR"];}
elseif (isset($_POST["RR"])) {$RR=$_POST["RR"];}
if (isset($_GET["group"])) {$group=$_GET["group"];}
elseif (isset($_POST["group"])) {$group=$_POST["group"];}
if (isset($_GET["DB"])) {$DB=$_GET["DB"];}
elseif (isset($_POST["DB"])) {$DB=$_POST["DB"];}
if (isset($_GET["submit"])) {$submit=$_GET["submit"];}
elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];}
if (isset($_GET["SUBMIT"])) {$SUBMIT=$_GET["SUBMIT"];}
elseif (isset($_POST["SUBMIT"])) {$SUBMIT=$_POST["SUBMIT"];}
if (!isset($group)) {$group='';}
$NOW_TIME = date("Y-m-d H:i:s");
$STARTtime = date("U");
@@ -32,6 +42,7 @@ $timeSIXhoursAGO = date("Y-m-d H:i:s",$epochSIXhoursAGO);
$stmt="select campaign_id from vicidial_campaigns where active='Y';";
$rslt=mysql_query($stmt, $link);
if (!isset($DB)) {$DB=0;}
if ($DB) {echo "$stmt\n";}
$groups_to_print = mysql_num_rows($rslt);
$i=0;
@@ -42,13 +53,14 @@ while ($i < $groups_to_print)
$i++;
}
if (!$RR) {$RR=40;}
if (!isset($RR)) {$RR=40;}
$NFB = '<b><font size=6 face="courier">';
$NFE = '</font></b>';
$F=''; $FG=''; $B=''; $BG='';
$reset_counter++;
if (!isset($reset_counter)) {$reset_counter=0;}
if ($reset_counter > 7)
{
$reset_counter=0;
@@ -102,14 +114,15 @@ 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';";
$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 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] &nbsp; &nbsp; &nbsp; &nbsp; ";
echo "<B>STATUSES:</B> $row[1], $row[2], $row[3], $row[4], $row[5] &nbsp; &nbsp; &nbsp; &nbsp; ";
echo "<B>ORDER:</B> $row[6]</font>";
echo "<B>ORDER:</B> $row[6] &nbsp; &nbsp; &nbsp; &nbsp; ";
echo "<B>FILTER:</B> $row[7]</font>";
echo "</FORM>\n\n";
}
###################################################################################
@@ -9,10 +9,14 @@ 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"];}
$submit=$_GET["submit"]; if (!$submit) {$submit=$_POST["submit"];}
$SUBMIT=$_GET["SUBMIT"]; if (!$SUBMIT) {$SUBMIT=$_POST["SUBMIT"];}
if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];}
elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];}
if (isset($_GET["reset_counter"])) {$reset_counter=$_GET["reset_counter"];}
elseif (isset($_POST["reset_counter"])) {$reset_counter=$_POST["reset_counter"];}
if (isset($_GET["submit"])) {$submit=$_GET["submit"];}
elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];}
if (isset($_GET["SUBMIT"])) {$SUBMIT=$_GET["SUBMIT"];}
elseif (isset($_POST["SUBMIT"])) {$SUBMIT=$_POST["SUBMIT"];}
$NOW_TIME = date("Y-m-d H:i:s");
$STARTtime = date("U");
@@ -9,10 +9,14 @@ 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"];}
$submit=$_GET["submit"]; if (!$submit) {$submit=$_POST["submit"];}
$SUBMIT=$_GET["SUBMIT"]; if (!$SUBMIT) {$SUBMIT=$_POST["SUBMIT"];}
if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];}
elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];}
if (isset($_GET["reset_counter"])) {$reset_counter=$_GET["reset_counter"];}
elseif (isset($_POST["reset_counter"])) {$reset_counter=$_POST["reset_counter"];}
if (isset($_GET["submit"])) {$submit=$_GET["submit"];}
elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];}
if (isset($_GET["SUBMIT"])) {$SUBMIT=$_GET["SUBMIT"];}
elseif (isset($_POST["SUBMIT"])) {$SUBMIT=$_POST["SUBMIT"];}
$NOW_TIME = date("Y-m-d H:i:s");
$STARTtime = date("U");
+249 -150
View File
@@ -1,159 +1,256 @@
<?
### admin.php - VICIDIAL administration page
###
###
### Copyright (C) 2006 Matt Florell <vicidial@gmail.com> LICENSE: GPLv2
###
# admin.php - VICIDIAL administration page
#
#
# 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'];
$ADD=$_GET["ADD"]; if (!$ADD) {$ADD=$_POST["ADD"];}
$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=$_GET["user"]; if (!$user) {$user=$_POST["user"];}
$pass=$_GET["pass"]; if (!$pass) {$pass=$_POST["pass"];}
$full_name=$_GET["full_name"]; if (!$full_name) {$full_name=$_POST["full_name"];}
$user_level=$_GET["user_level"]; if (!$user_level) {$user_level=$_POST["user_level"];}
$user_group=$_GET["user_group"]; if (!$user_group) {$user_group=$_POST["user_group"];}
$campaign_id=$_GET["campaign_id"]; if (!$campaign_id) {$campaign_id=$_POST["campaign_id"];}
$campaign_name=$_GET["campaign_name"]; if (!$campaign_name) {$campaign_name=$_POST["campaign_name"];}
$active=$_GET["active"]; if (!$active) {$active=$_POST["active"];}
$park_ext=$_GET["park_ext"]; if (!$park_ext) {$park_ext=$_POST["park_ext"];}
$park_file_name=$_GET["park_file_name"]; if (!$park_file_name) {$park_file_name=$_POST["park_file_name"];}
$web_form_address=$_GET["web_form_address"]; if (!$web_form_address) {$web_form_address=$_POST["web_form_address"];}
$allow_closers=$_GET["allow_closers"]; if (!$allow_closers) {$allow_closers=$_POST["allow_closers"];}
$hopper_level=$_GET["hopper_level"]; if (!$hopper_level) {$hopper_level=$_POST["hopper_level"];}
$auto_dial_level=$_GET["auto_dial_level"]; if (!$auto_dial_level) {$auto_dial_level=$_POST["auto_dial_level"];}
$next_agent_call=$_GET["next_agent_call"]; if (!$next_agent_call) {$next_agent_call=$_POST["next_agent_call"];}
$local_call_time=$_GET["local_call_time"]; if (!$local_call_time) {$local_call_time=$_POST["local_call_time"];}
$voicemail_ext=$_GET["voicemail_ext"]; if (!$voicemail_ext) {$voicemail_ext=$_POST["voicemail_ext"];}
$submit=$_GET["submit"]; if (!$submit) {$submit=$_POST["submit"];}
$list_id=$_GET["list_id"]; if (!$list_id) {$list_id=$_POST["list_id"];}
$list_name=$_GET["list_name"]; if (!$list_name) {$list_name=$_POST["list_name"];}
$group_id=$_GET["group_id"]; if (!$group_id) {$group_id=$_POST["group_id"];}
$group_name=$_GET["group_name"]; if (!$group_name) {$group_name=$_POST["group_name"];}
$group_color=$_GET["group_color"]; if (!$group_color) {$group_color=$_POST["group_color"];}
$fronter_display=$_GET["fronter_display"]; if (!$fronter_display) {$fronter_display=$_POST["fronter_display"];}
$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"];}
$group_name=$_GET["group_name"]; if (!$group_name) {$group_name=$_POST["group_name"];}
$dial_status_a=$_GET["dial_status_a"]; if (!$dial_status_a) {$dial_status_a=$_POST["dial_status_a"];}
$dial_status_b=$_GET["dial_status_b"]; if (!$dial_status_b) {$dial_status_b=$_POST["dial_status_b"];}
$dial_status_c=$_GET["dial_status_c"]; if (!$dial_status_c) {$dial_status_c=$_POST["dial_status_c"];}
$dial_status_d=$_GET["dial_status_d"]; if (!$dial_status_d) {$dial_status_d=$_POST["dial_status_d"];}
$dial_status_e=$_GET["dial_status_e"]; if (!$dial_status_e) {$dial_status_e=$_POST["dial_status_e"];}
$lead_order=$_GET["lead_order"]; if (!$lead_order) {$lead_order=$_POST["lead_order"];}
$dial_timeout=$_GET["dial_timeout"]; if (!$dial_timeout) {$dial_timeout=$_POST["dial_timeout"];}
$dial_prefix=$_GET["dial_prefix"]; if (!$dial_prefix) {$dial_prefix=$_POST["dial_prefix"];}
$campaign_cid=$_GET["campaign_cid"]; if (!$campaign_cid) {$campaign_cid=$_POST["campaign_cid"];}
$campaign_vdad_exten=$_GET["campaign_vdad_exten"]; if (!$campaign_vdad_exten) {$campaign_vdad_exten=$_POST["campaign_vdad_exten"];}
$campaign_rec_exten=$_GET["campaign_rec_exten"]; if (!$campaign_rec_exten) {$campaign_rec_exten=$_POST["campaign_rec_exten"];}
$campaign_recording=$_GET["campaign_recording"]; if (!$campaign_recording) {$campaign_recording=$_POST["campaign_recording"];}
$campaign_rec_filename=$_GET["campaign_rec_filename"]; if (!$campaign_rec_filename) {$campaign_rec_filename=$_POST["campaign_rec_filename"];}
$hotkey=$_GET["hotkey"]; if (!$hotkey) {$hotkey=$_POST["hotkey"];}
$reset_list=$_GET["reset_list"]; if (!$reset_list) {$reset_list=$_POST["reset_list"];}
$old_campaign_id=$_GET["old_campaign_id"]; if (!$old_campaign_id) {$old_campaign_id=$_POST["old_campaign_id"];}
$OLDuser_group=$_GET["OLDuser_group"]; if (!$OLDuser_group) {$OLDuser_group=$_POST["OLDuser_group"];}
$status_name=$_GET["status_name"]; if (!$status_name) {$status_name=$_POST["status_name"];}
$selectable=$_GET["selectable"]; if (!$selectable) {$selectable=$_POST["selectable"];}
$HKstatus=$_GET["HKstatus"]; if (!$HKstatus) {$HKstatus=$_POST["HKstatus"];}
$force_logout=$_GET["force_logout"]; if (!$force_logout) {$force_logout=$_POST["force_logout"];}
$phone_login=$_GET["phone_login"]; if (!$phone_login) {$phone_login=$_POST["phone_login"];}
$phone_pass=$_GET["phone_pass"]; if (!$phone_pass) {$phone_pass=$_POST["phone_pass"];}
$delete_users=$_GET["delete_users"]; if (!$delete_users) {$delete_users=$_POST["delete_users"];}
$delete_user_groups=$_GET["delete_user_groups"]; if (!$delete_user_groups) {$delete_user_groups=$_POST["delete_user_groups"];}
$delete_lists=$_GET["delete_lists"]; if (!$delete_lists) {$delete_lists=$_POST["delete_lists"];}
$delete_campaigns=$_GET["delete_campaigns"]; if (!$delete_campaigns) {$delete_campaigns=$_POST["delete_campaigns"];}
$delete_ingroups=$_GET["delete_ingroups"]; if (!$delete_ingroups) {$delete_ingroups=$_POST["delete_ingroups"];}
$delete_remote_agents=$_GET["delete_remote_agents"]; if (!$delete_remote_agents) {$delete_remote_agents=$_POST["delete_remote_agents"];}
$load_leads=$_GET["load_leads"]; if (!$load_leads) {$load_leads=$_POST["load_leads"];}
$campaign_detail=$_GET["campaign_detail"]; if (!$campaign_detail) {$campaign_detail=$_POST["campaign_detail"];}
$ast_admin_access=$_GET["ast_admin_access"]; if (!$ast_admin_access) {$ast_admin_access=$_POST["ast_admin_access"];}
$ast_delete_phones=$_GET["ast_delete_phones"]; if (!$ast_delete_phones) {$ast_delete_phones=$_POST["ast_delete_phones"];}
$CoNfIrM=$_GET["CoNfIrM"]; if (!$CoNfIrM) {$CoNfIrM=$_POST["CoNfIrM"];}
$delete_scripts=$_GET["delete_scripts"]; if (!$delete_scripts) {$delete_scripts=$_POST["delete_scripts"];}
$script_id=$_GET["script_id"]; if (!$script_id) {$script_id=$_POST["script_id"];}
$script_id = strtoupper($script_id);
$script_name=$_GET["script_name"]; if (!$script_name) {$script_name=$_POST["script_name"];}
$script_comments=$_GET["script_comments"]; if (!$script_comments) {$script_comments=$_POST["script_comments"];}
$script_text=$_GET["script_text"]; if (!$script_text) {$script_text=$_POST["script_text"];}
$reset_hopper=$_GET["reset_hopper"]; if (!$reset_hopper) {$reset_hopper=$_POST["reset_hopper"];}
$get_call_launch=$_GET["get_call_launch"]; if (!$get_call_launch) {$get_call_launch=$_POST["get_call_launch"];}
$am_message_exten=$_GET["am_message_exten"]; if (!$am_message_exten) {$am_message_exten=$_POST["am_message_exten"];}
$amd_send_to_vmx=$_GET["amd_send_to_vmx"]; if (!$amd_send_to_vmx) {$amd_send_to_vmx=$_POST["amd_send_to_vmx"];}
$xferconf_a_dtmf=$_GET["xferconf_a_dtmf"]; if (!$xferconf_a_dtmf) {$xferconf_a_dtmf=$_POST["xferconf_a_dtmf"];}
$xferconf_a_number=$_GET["xferconf_a_number"]; if (!$xferconf_a_number) {$xferconf_a_number=$_POST["xferconf_a_number"];}
$xferconf_b_dtmf=$_GET["xferconf_b_dtmf"]; if (!$xferconf_b_dtmf) {$xferconf_b_dtmf=$_POST["xferconf_b_dtmf"];}
$xferconf_b_number=$_GET["xferconf_b_number"]; if (!$xferconf_b_number) {$xferconf_b_number=$_POST["xferconf_b_number"];}
$modify_leads=$_GET["modify_leads"]; if (!$modify_leads) {$modify_leads=$_POST["modify_leads"];}
$hotkeys_active=$_GET["hotkeys_active"]; if (!$hotkeys_active) {$hotkeys_active=$_POST["hotkeys_active"];}
$change_agent_campaign=$_GET["change_agent_campaign"]; if (!$change_agent_campaign) {$change_agent_campaign=$_POST["change_agent_campaign"];}
$agent_choose_ingroups=$_GET["agent_choose_ingroups"]; if (!$agent_choose_ingroups) {$agent_choose_ingroups=$_POST["agent_choose_ingroups"];}
$alt_number_dialing=$_GET["alt_number_dialing"]; if (!$alt_number_dialing) {$alt_number_dialing=$_POST["alt_number_dialing"];}
$scheduled_callbacks=$_GET["scheduled_callbacks"]; if (!$scheduled_callbacks) {$scheduled_callbacks=$_POST["scheduled_callbacks"];}
$lead_filter_id=$_GET["lead_filter_id"]; if (!$lead_filter_id) {$lead_filter_id=$_POST["lead_filter_id"];}
$lead_filter_name=$_GET["lead_filter_name"]; if (!$lead_filter_name) {$lead_filter_name=$_POST["lead_filter_name"];}
$lead_filter_comments=$_GET["lead_filter_comments"]; if (!$lead_filter_comments) {$lead_filter_comments=$_POST["lead_filter_comments"];}
$lead_filter_sql=$_GET["lead_filter_sql"]; if (!$lead_filter_sql) {$lead_filter_sql=$_POST["lead_filter_sql"];}
$agentonly_callbacks=$_GET["agentonly_callbacks"]; if (!$agentonly_callbacks) {$agentonly_callbacks=$_POST["agentonly_callbacks"];}
$agentcall_manual=$_GET["agentcall_manual"]; if (!$agentcall_manual) {$agentcall_manual=$_POST["agentcall_manual"];}
$vicidial_recording=$_GET["vicidial_recording"]; if (!$vicidial_recording) {$vicidial_recording=$_POST["vicidial_recording"];}
$vicidial_transfers=$_GET["vicidial_transfers"]; if (!$vicidial_transfers) {$vicidial_transfers=$_POST["vicidial_transfers"];}
$delete_filters=$_GET["delete_filters"]; if (!$delete_filters) {$delete_filters=$_POST["delete_filters"];}
if (isset($_GET["ADD"])) {$ADD=$_GET["ADD"];}
elseif (isset($_POST["ADD"])) {$ADD=$_POST["ADD"];}
if (isset($_GET["groups"])) {$groups=$_GET["groups"];}
elseif (isset($_POST["groups"])) {$groups=$_POST["groups"];}
if (isset($_GET["remote_agent_id"])) {$remote_agent_id=$_GET["remote_agent_id"];}
elseif (isset($_POST["remote_agent_id"])) {$remote_agent_id=$_POST["remote_agent_id"];}
if (isset($_GET["user"])) {$user=$_GET["user"];}
elseif (isset($_POST["user"])) {$user=$_POST["user"];}
if (isset($_GET["pass"])) {$pass=$_GET["pass"];}
elseif (isset($_POST["pass"])) {$pass=$_POST["pass"];}
if (isset($_GET["full_name"])) {$full_name=$_GET["full_name"];}
elseif (isset($_POST["full_name"])) {$full_name=$_POST["full_name"];}
if (isset($_GET["user_level"])) {$user_level=$_GET["user_level"];}
elseif (isset($_POST["user_level"])) {$user_level=$_POST["user_level"];}
if (isset($_GET["user_group"])) {$user_group=$_GET["user_group"];}
elseif (isset($_POST["user_group"])) {$user_group=$_POST["user_group"];}
if (isset($_GET["campaign_id"])) {$campaign_id=$_GET["campaign_id"];}
elseif (isset($_POST["campaign_id"])) {$campaign_id=$_POST["campaign_id"];}
if (isset($_GET["campaign_name"])) {$campaign_name=$_GET["campaign_name"];}
elseif (isset($_POST["campaign_name"])) {$campaign_name=$_POST["campaign_name"];}
if (isset($_GET["active"])) {$active=$_GET["active"];}
elseif (isset($_POST["active"])) {$active=$_POST["active"];}
if (isset($_GET["park_ext"])) {$park_ext=$_GET["park_ext"];}
elseif (isset($_POST["park_ext"])) {$park_ext=$_POST["park_ext"];}
if (isset($_GET["park_file_name"])) {$park_file_name=$_GET["park_file_name"];}
elseif (isset($_POST["park_file_name"])) {$park_file_name=$_POST["park_file_name"];}
if (isset($_GET["web_form_address"])) {$web_form_address=$_GET["web_form_address"];}
elseif (isset($_POST["web_form_address"])) {$web_form_address=$_POST["web_form_address"];}
if (isset($_GET["allow_closers"])) {$allow_closers=$_GET["allow_closers"];}
elseif (isset($_POST["allow_closers"])) {$allow_closers=$_POST["allow_closers"];}
if (isset($_GET["hopper_level"])) {$hopper_level=$_GET["hopper_level"];}
elseif (isset($_POST["hopper_level"])) {$hopper_level=$_POST["hopper_level"];}
if (isset($_GET["auto_dial_level"])) {$auto_dial_level=$_GET["auto_dial_level"];}
elseif (isset($_POST["auto_dial_level"])) {$auto_dial_level=$_POST["auto_dial_level"];}
if (isset($_GET["next_agent_call"])) {$next_agent_call=$_GET["next_agent_call"];}
elseif (isset($_POST["next_agent_call"])) {$next_agent_call=$_POST["next_agent_call"];}
if (isset($_GET["local_call_time"])) {$local_call_time=$_GET["local_call_time"];}
elseif (isset($_POST["local_call_time"])) {$local_call_time=$_POST["local_call_time"];}
if (isset($_GET["voicemail_ext"])) {$voicemail_ext=$_GET["voicemail_ext"];}
elseif (isset($_POST["voicemail_ext"])) {$voicemail_ext=$_POST["voicemail_ext"];}
if (isset($_GET["submit"])) {$submit=$_GET["submit"];}
elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];}
if (isset($_GET["list_id"])) {$list_id=$_GET["list_id"];}
elseif (isset($_POST["list_id"])) {$list_id=$_POST["list_id"];}
if (isset($_GET["list_name"])) {$list_name=$_GET["list_name"];}
elseif (isset($_POST["list_name"])) {$list_name=$_POST["list_name"];}
if (isset($_GET["group_id"])) {$group_id=$_GET["group_id"];}
elseif (isset($_POST["group_id"])) {$group_id=$_POST["group_id"];}
if (isset($_GET["group_name"])) {$group_name=$_GET["group_name"];}
elseif (isset($_POST["group_name"])) {$group_name=$_POST["group_name"];}
if (isset($_GET["group_color"])) {$group_color=$_GET["group_color"];}
elseif (isset($_POST["group_color"])) {$group_color=$_POST["group_color"];}
if (isset($_GET["fronter_display"])) {$fronter_display=$_GET["fronter_display"];}
elseif (isset($_POST["fronter_display"])) {$fronter_display=$_POST["fronter_display"];}
if (isset($_GET["user_start"])) {$user_start=$_GET["user_start"];}
elseif (isset($_POST["user_start"])) {$user_start=$_POST["user_start"];}
if (isset($_GET["number_of_lines"])) {$number_of_lines=$_GET["number_of_lines"];}
elseif (isset($_POST["number_of_lines"])) {$number_of_lines=$_POST["number_of_lines"];}
if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];}
elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];}
if (isset($_GET["conf_exten"])) {$conf_exten=$_GET["conf_exten"];}
elseif (isset($_POST["conf_exten"])) {$conf_exten=$_POST["conf_exten"];}
if (isset($_GET["status"])) {$status=$_GET["status"];}
elseif (isset($_POST["status"])) {$status=$_POST["status"];}
if (isset($_GET["group_name"])) {$group_name=$_GET["group_name"];}
elseif (isset($_POST["group_name"])) {$group_name=$_POST["group_name"];}
if (isset($_GET["dial_status_a"])) {$dial_status_a=$_GET["dial_status_a"];}
elseif (isset($_POST["dial_status_a"])) {$dial_status_a=$_POST["dial_status_a"];}
if (isset($_GET["dial_status_b"])) {$dial_status_b=$_GET["dial_status_b"];}
elseif (isset($_POST["dial_status_b"])) {$dial_status_b=$_POST["dial_status_b"];}
if (isset($_GET["dial_status_c"])) {$dial_status_c=$_GET["dial_status_c"];}
elseif (isset($_POST["dial_status_c"])) {$dial_status_c=$_POST["dial_status_c"];}
if (isset($_GET["dial_status_d"])) {$dial_status_d=$_GET["dial_status_d"];}
elseif (isset($_POST["dial_status_d"])) {$dial_status_d=$_POST["dial_status_d"];}
if (isset($_GET["dial_status_e"])) {$dial_status_e=$_GET["dial_status_e"];}
elseif (isset($_POST["dial_status_e"])) {$dial_status_e=$_POST["dial_status_e"];}
if (isset($_GET["lead_order"])) {$lead_order=$_GET["lead_order"];}
elseif (isset($_POST["lead_order"])) {$lead_order=$_POST["lead_order"];}
if (isset($_GET["dial_timeout"])) {$dial_timeout=$_GET["dial_timeout"];}
elseif (isset($_POST["dial_timeout"])) {$dial_timeout=$_POST["dial_timeout"];}
if (isset($_GET["dial_prefix"])) {$dial_prefix=$_GET["dial_prefix"];}
elseif (isset($_POST["dial_prefix"])) {$dial_prefix=$_POST["dial_prefix"];}
if (isset($_GET["campaign_cid"])) {$campaign_cid=$_GET["campaign_cid"];}
elseif (isset($_POST["campaign_cid"])) {$campaign_cid=$_POST["campaign_cid"];}
if (isset($_GET["campaign_vdad_exten"])) {$campaign_vdad_exten=$_GET["campaign_vdad_exten"];}
elseif (isset($_POST["campaign_vdad_exten"])) {$campaign_vdad_exten=$_POST["campaign_vdad_exten"];}
if (isset($_GET["campaign_rec_exten"])) {$campaign_rec_exten=$_GET["campaign_rec_exten"];}
elseif (isset($_POST["campaign_rec_exten"])) {$campaign_rec_exten=$_POST["campaign_rec_exten"];}
if (isset($_GET["campaign_recording"])) {$campaign_recording=$_GET["campaign_recording"];}
elseif (isset($_POST["campaign_recording"])) {$campaign_recording=$_POST["campaign_recording"];}
if (isset($_GET["campaign_rec_filename"])) {$campaign_rec_filename=$_GET["campaign_rec_filename"];}
elseif (isset($_POST["campaign_rec_filename"])) {$campaign_rec_filename=$_POST["campaign_rec_filename"];}
if (isset($_GET["hotkey"])) {$hotkey=$_GET["hotkey"];}
elseif (isset($_POST["hotkey"])) {$hotkey=$_POST["hotkey"];}
if (isset($_GET["reset_list"])) {$reset_list=$_GET["reset_list"];}
elseif (isset($_POST["reset_list"])) {$reset_list=$_POST["reset_list"];}
if (isset($_GET["old_campaign_id"])) {$old_campaign_id=$_GET["old_campaign_id"];}
elseif (isset($_POST["old_campaign_id"])) {$old_campaign_id=$_POST["old_campaign_id"];}
if (isset($_GET["OLDuser_group"])) {$OLDuser_group=$_GET["OLDuser_group"];}
elseif (isset($_POST["OLDuser_group"])) {$OLDuser_group=$_POST["OLDuser_group"];}
if (isset($_GET["status_name"])) {$status_name=$_GET["status_name"];}
elseif (isset($_POST["status_name"])) {$status_name=$_POST["status_name"];}
if (isset($_GET["selectable"])) {$selectable=$_GET["selectable"];}
elseif (isset($_POST["selectable"])) {$selectable=$_POST["selectable"];}
if (isset($_GET["HKstatus"])) {$HKstatus=$_GET["HKstatus"];}
elseif (isset($_POST["HKstatus"])) {$HKstatus=$_POST["HKstatus"];}
if (isset($_GET["force_logout"])) {$force_logout=$_GET["force_logout"];}
elseif (isset($_POST["force_logout"])) {$force_logout=$_POST["force_logout"];}
if (isset($_GET["phone_login"])) {$phone_login=$_GET["phone_login"];}
elseif (isset($_POST["phone_login"])) {$phone_login=$_POST["phone_login"];}
if (isset($_GET["phone_pass"])) {$phone_pass=$_GET["phone_pass"];}
elseif (isset($_POST["phone_pass"])) {$phone_pass=$_POST["phone_pass"];}
if (isset($_GET["delete_users"])) {$delete_users=$_GET["delete_users"];}
elseif (isset($_POST["delete_users"])) {$delete_users=$_POST["delete_users"];}
if (isset($_GET["delete_user_groups"])) {$delete_user_groups=$_GET["delete_user_groups"];}
elseif (isset($_POST["delete_user_groups"])) {$delete_user_groups=$_POST["delete_user_groups"];}
if (isset($_GET["delete_lists"])) {$delete_lists=$_GET["delete_lists"];}
elseif (isset($_POST["delete_lists"])) {$delete_lists=$_POST["delete_lists"];}
if (isset($_GET["delete_campaigns"])) {$delete_campaigns=$_GET["delete_campaigns"];}
elseif (isset($_POST["delete_campaigns"])) {$delete_campaigns=$_POST["delete_campaigns"];}
if (isset($_GET["delete_ingroups"])) {$delete_ingroups=$_GET["delete_ingroups"];}
elseif (isset($_POST["delete_ingroups"])) {$delete_ingroups=$_POST["delete_ingroups"];}
if (isset($_GET["delete_remote_agents"])) {$delete_remote_agents=$_GET["delete_remote_agents"];}
elseif (isset($_POST["delete_remote_agents"])) {$delete_remote_agents=$_POST["delete_remote_agents"];}
if (isset($_GET["load_leads"])) {$load_leads=$_GET["load_leads"];}
elseif (isset($_POST["load_leads"])) {$load_leads=$_POST["load_leads"];}
if (isset($_GET["campaign_detail"])) {$campaign_detail=$_GET["campaign_detail"];}
elseif (isset($_POST["campaign_detail"])) {$campaign_detail=$_POST["campaign_detail"];}
if (isset($_GET["ast_admin_access"])) {$ast_admin_access=$_GET["ast_admin_access"];}
elseif (isset($_POST["ast_admin_access"])) {$ast_admin_access=$_POST["ast_admin_access"];}
if (isset($_GET["ast_delete_phones"])) {$ast_delete_phones=$_GET["ast_delete_phones"];}
elseif (isset($_POST["ast_delete_phones"])) {$ast_delete_phones=$_POST["ast_delete_phones"];}
if (isset($_GET["CoNfIrM"])) {$CoNfIrM=$_GET["CoNfIrM"];}
elseif (isset($_POST["CoNfIrM"])) {$CoNfIrM=$_POST["CoNfIrM"];}
if (isset($_GET["delete_scripts"])) {$delete_scripts=$_GET["delete_scripts"];}
elseif (isset($_POST["delete_scripts"])) {$delete_scripts=$_POST["delete_scripts"];}
if (isset($_GET["script_id"])) {$script_id=$_GET["script_id"];}
elseif (isset($_POST["script_id"])) {$script_id=$_POST["script_id"];}
if (isset($_GET["script_name"])) {$script_name=$_GET["script_name"];}
elseif (isset($_POST["script_name"])) {$script_name=$_POST["script_name"];}
if (isset($_GET["script_comments"])) {$script_comments=$_GET["script_comments"];}
elseif (isset($_POST["script_comments"])) {$script_comments=$_POST["script_comments"];}
if (isset($_GET["script_text"])) {$script_text=$_GET["script_text"];}
elseif (isset($_POST["script_text"])) {$script_text=$_POST["script_text"];}
if (isset($_GET["reset_hopper"])) {$reset_hopper=$_GET["reset_hopper"];}
elseif (isset($_POST["reset_hopper"])) {$reset_hopper=$_POST["reset_hopper"];}
if (isset($_GET["get_call_launch"])) {$get_call_launch=$_GET["get_call_launch"];}
elseif (isset($_POST["get_call_launch"])) {$get_call_launch=$_POST["get_call_launch"];}
if (isset($_GET["am_message_exten"])) {$am_message_exten=$_GET["am_message_exten"];}
elseif (isset($_POST["am_message_exten"])) {$am_message_exten=$_POST["am_message_exten"];}
if (isset($_GET["amd_send_to_vmx"])) {$amd_send_to_vmx=$_GET["amd_send_to_vmx"];}
elseif (isset($_POST["amd_send_to_vmx"])) {$amd_send_to_vmx=$_POST["amd_send_to_vmx"];}
if (isset($_GET["xferconf_a_dtmf"])) {$xferconf_a_dtmf=$_GET["xferconf_a_dtmf"];}
elseif (isset($_POST["xferconf_a_dtmf"])) {$xferconf_a_dtmf=$_POST["xferconf_a_dtmf"];}
if (isset($_GET["xferconf_a_number"])) {$xferconf_a_number=$_GET["xferconf_a_number"];}
elseif (isset($_POST["xferconf_a_number"])) {$xferconf_a_number=$_POST["xferconf_a_number"];}
if (isset($_GET["xferconf_b_dtmf"])) {$xferconf_b_dtmf=$_GET["xferconf_b_dtmf"];}
elseif (isset($_POST["xferconf_b_dtmf"])) {$xferconf_b_dtmf=$_POST["xferconf_b_dtmf"];}
if (isset($_GET["xferconf_b_number"])) {$xferconf_b_number=$_GET["xferconf_b_number"];}
elseif (isset($_POST["xferconf_b_number"])) {$xferconf_b_number=$_POST["xferconf_b_number"];}
if (isset($_GET["modify_leads"])) {$modify_leads=$_GET["modify_leads"];}
elseif (isset($_POST["modify_leads"])) {$modify_leads=$_POST["modify_leads"];}
if (isset($_GET["hotkeys_active"])) {$hotkeys_active=$_GET["hotkeys_active"];}
elseif (isset($_POST["hotkeys_active"])) {$hotkeys_active=$_POST["hotkeys_active"];}
if (isset($_GET["change_agent_campaign"])) {$change_agent_campaign=$_GET["change_agent_campaign"];}
elseif (isset($_POST["change_agent_campaign"])) {$change_agent_campaign=$_POST["change_agent_campaign"];}
if (isset($_GET["agent_choose_ingroups"])) {$agent_choose_ingroups=$_GET["agent_choose_ingroups"];}
elseif (isset($_POST["agent_choose_ingroups"])) {$agent_choose_ingroups=$_POST["agent_choose_ingroups"];}
if (isset($_GET["alt_number_dialing"])) {$alt_number_dialing=$_GET["alt_number_dialing"];}
elseif (isset($_POST["alt_number_dialing"])) {$alt_number_dialing=$_POST["alt_number_dialing"];}
if (isset($_GET["scheduled_callbacks"])) {$scheduled_callbacks=$_GET["scheduled_callbacks"];}
elseif (isset($_POST["scheduled_callbacks"])) {$scheduled_callbacks=$_POST["scheduled_callbacks"];}
if (isset($_GET["lead_filter_id"])) {$lead_filter_id=$_GET["lead_filter_id"];}
elseif (isset($_POST["lead_filter_id"])) {$lead_filter_id=$_POST["lead_filter_id"];}
if (isset($_GET["lead_filter_name"])) {$lead_filter_name=$_GET["lead_filter_name"];}
elseif (isset($_POST["lead_filter_name"])) {$lead_filter_name=$_POST["lead_filter_name"];}
if (isset($_GET["lead_filter_comments"])) {$lead_filter_comments=$_GET["lead_filter_comments"];}
elseif (isset($_POST["lead_filter_comments"])) {$lead_filter_comments=$_POST["lead_filter_comments"];}
if (isset($_GET["lead_filter_sql"])) {$lead_filter_sql=$_GET["lead_filter_sql"];}
elseif (isset($_POST["lead_filter_sql"])) {$lead_filter_sql=$_POST["lead_filter_sql"];}
if (isset($_GET["agentonly_callbacks"])) {$agentonly_callbacks=$_GET["agentonly_callbacks"];}
elseif (isset($_POST["agentonly_callbacks"])) {$agentonly_callbacks=$_POST["agentonly_callbacks"];}
if (isset($_GET["agentcall_manual"])) {$agentcall_manual=$_GET["agentcall_manual"];}
elseif (isset($_POST["agentcall_manual"])) {$agentcall_manual=$_POST["agentcall_manual"];}
if (isset($_GET["vicidial_recording"])) {$vicidial_recording=$_GET["vicidial_recording"];}
elseif (isset($_POST["vicidial_recording"])) {$vicidial_recording=$_POST["vicidial_recording"];}
if (isset($_GET["vicidial_transfers"])) {$vicidial_transfers=$_GET["vicidial_transfers"];}
elseif (isset($_POST["vicidial_transfers"])) {$vicidial_transfers=$_POST["vicidial_transfers"];}
if (isset($_GET["delete_filters"])) {$delete_filters=$_GET["delete_filters"];}
elseif (isset($_POST["delete_filters"])) {$delete_filters=$_POST["delete_filters"];}
if (isset($script_id)) {$script_id= strtoupper($script_id);}
if (isset($lead_filter_id)) {$lead_filter_id = strtoupper($lead_filter_id);}
### AST GUI database administration
### admin.php
###
### CHANGES
### 50315-1110 - Added Custom Campaign Statuses
### 50317-1438 - Added Fronter Display var to inbound groups
### 50322-1355 - Added custom callerID per campaign
### 50517-1356 - Added user_groups sections and user_group to vicidial_users
### 50517-1440 - Added ability to logout (must click OK with empty user/pass)
### 50602-1622 - Added lead loader pages to load new files into vicidial_list
### 50620-1351 - Added custom vdad transfer AGI extension per campaign
### 50810-1414 - modified in groups to kick out spaces and dashes
### 50908-2136 - Added Custom Campaign HotKeys
### 50914-0950 - Fixed user search by user_group
### 50926-1358 - Modified to allow for language translation
### 50926-1615 - Added WeBRooTWritablE write controls
### 51020-1008 - Added editable web address and park ext - NEW dial campaigns
### 51020-1056 - Added fields and help for campaign recording control
### 51123-1335 - Altered code to function in php globals=off
### 51208-1038 - Added user_level changes, function controls and default user phones
### 51208-1556 - Added deletion of users/lists/campaigns/in groups/remote agents
### 51213-1706 - Added add/delete/modify vicidial scripts
### 51214-1737 - Added preview of vicidial script in popup window
### 51219-1225 - Added campaign and ingroups script selector and get_call_launch field
### 51222-1055 - Added am_message_exten to campaigns to allow for AM Message button
### 51222-1125 - Fixed new vicidial_campaigns default values not being assigned bug
### 51222-1156 - Added LOG OUT ALL AGENTS ON THIS CAMPAIGN button to campaign screen
### 60204-0659 - Fixed hopper reset bug
### 60207-1413 - Added AMD send to voicemail extension and xfer-conf dtmf presets
### 60213-1100 - Added several vicidial_users permissions fields
### 60215-1319 - Added On-hold CallBacks display and links
### 60227-1226 - Fixed vicidial_inbound_groups insert bug
### 60413-1308 - Fixed list display to have 1 row/status: count and time zone tables
### - Added status name in selected dial statuses in campaign screen
### 60417-1416 - Added vicidial_lead_filters sections
### - Changed the header links to color-coded sectional with sublinks below
### - Added filter name and script name to campaign and in-group modify sections
### - Added callback and alt dial options to campaigns section
### - Added callback, alt dial and other options to users section
### 60419-1628 - Alter Callbacks display to include status and LIVE listings, reordered
###
# AST GUI database administration
# admin.php
#
# CHANGES
# 50315-1110 - Added Custom Campaign Statuses
# 50317-1438 - Added Fronter Display var to inbound groups
# 50322-1355 - Added custom callerID per campaign
# 50517-1356 - Added user_groups sections and user_group to vicidial_users
# 50517-1440 - Added ability to logout (must click OK with empty user/pass)
# 50602-1622 - Added lead loader pages to load new files into vicidial_list
# 50620-1351 - Added custom vdad transfer AGI extension per campaign
# 50810-1414 - modified in groups to kick out spaces and dashes
# 50908-2136 - Added Custom Campaign HotKeys
# 50914-0950 - Fixed user search by user_group
# 50926-1358 - Modified to allow for language translation
# 50926-1615 - Added WeBRooTWritablE write controls
# 51020-1008 - Added editable web address and park ext - NEW dial campaigns
# 51020-1056 - Added fields and help for campaign recording control
# 51123-1335 - Altered code to function in php globals=off
# 51208-1038 - Added user_level changes, function controls and default user phones
# 51208-1556 - Added deletion of users/lists/campaigns/in groups/remote agents
# 51213-1706 - Added add/delete/modify vicidial scripts
# 51214-1737 - Added preview of vicidial script in popup window
# 51219-1225 - Added campaign and ingroups script selector and get_call_launch field
# 51222-1055 - Added am_message_exten to campaigns to allow for AM Message button
# 51222-1125 - Fixed new vicidial_campaigns default values not being assigned bug
# 51222-1156 - Added LOG OUT ALL AGENTS ON THIS CAMPAIGN button to campaign screen
# 60204-0659 - Fixed hopper reset bug
# 60207-1413 - Added AMD send to voicemail extension and xfer-conf dtmf presets
# 60213-1100 - Added several vicidial_users permissions fields
# 60215-1319 - Added On-hold CallBacks display and links
# 60227-1226 - Fixed vicidial_inbound_groups insert bug
# 60413-1308 - Fixed list display to have 1 row/status: count and time zone tables
# - Added status name in selected dial statuses in campaign screen
# 60417-1416 - Added vicidial_lead_filters sections
# - Changed the header links to color-coded sectional with sublinks below
# - Added filter name and script name to campaign and in-group modify sections
# - Added callback and alt dial options to campaigns section
# - Added callback, alt dial and other options to users section
# 60419-1628 - Alter Callbacks display to include status and LIVE listings, reordered
# 60421-1441 - check GET/POST vars lines with isset to not trigger PHP NOTICES
#
### make sure you have added a user to the vicidial_users MySQL table with at least user_level 8 to access this page the first time
# make sure you have added a user to the vicidial_users MySQL table with at least user_level 8 to access this page the first time
$version = '1.1.10-8';
$build = '60419-1628';
$version = '1.1.10-9';
$build = '60421-1441';
$STARTtime = date("U");
@@ -181,7 +278,7 @@ $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))
if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or ($auth<1))
{
Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\"");
Header("HTTP/1.0 401 Unauthorized");
@@ -233,6 +330,8 @@ echo "<head>\n";
echo "<!-- VERSION: $version BUILD: $build ADD: $ADD PHP_SELF: $PHP_SELF-->\n";
echo "<title>VICIDIAL ADMIN: ";
if (!isset($ADD)) {$ADD=0;}
if ($ADD==1) {$hh='users'; echo "Add New User";}
if ($ADD==11) {$hh='campaigns'; echo "Add New Campaign";}
if ($ADD==111) {$hh='lists'; echo "Add New List";}
@@ -291,7 +390,7 @@ if ($ADD==611111) {$hh='usergroups'; echo "Delete Users Group";}
if ($ADD==6111111) {$hh='scripts'; echo "Delete Script";}
if ($ADD==61111111) {$hh='filters'; echo "Delete Filter";}
if ($ADD==7111111) {$hh='scripts'; echo "Preview Script";}
if ($ADD==0) {$hh='users'; echo "Welcome";}
if ($ADD==0) {$hh='users'; echo "Users List";}
if ($ADD==8) {$hh='users'; echo "CallBacks Within Agent";}
if ($ADD==81) {$hh='campaigns'; echo "CallBacks Within Campaign";}
if ($ADD==811) {$hh='campaigns'; echo "CallBacks Within List";}
@@ -4307,7 +4406,7 @@ if ($ADD==8)
{
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
$stmt="SELECT * from vicidial_callbacks where status IN('ACTIVE','LIVE') and user='$user' order by recipient,status desc,callback_time desc";
$stmt="SELECT * from vicidial_callbacks where status IN('ACTIVE','LIVE') and user='$user' order by recipient,status desc,callback_time";
$rslt=mysql_query($stmt, $link);
$cb_to_print = mysql_num_rows($rslt);
@@ -4322,7 +4421,7 @@ if ($ADD==81)
{
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
$stmt="SELECT * from vicidial_callbacks where status IN('ACTIVE','LIVE') and campaign_id='$campaign_id' order by recipient,status desc,callback_time desc";
$stmt="SELECT * from vicidial_callbacks where status IN('ACTIVE','LIVE') and campaign_id='$campaign_id' order by recipient,status desc,callback_time";
$rslt=mysql_query($stmt, $link);
$cb_to_print = mysql_num_rows($rslt);
@@ -4337,7 +4436,7 @@ if ($ADD==811)
{
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
$stmt="SELECT * from vicidial_callbacks where status IN('ACTIVE','LIVE') and list_id='$list_id' order by recipient,status desc,callback_time desc";
$stmt="SELECT * from vicidial_callbacks where status IN('ACTIVE','LIVE') and list_id='$list_id' order by recipient,status desc,callback_time";
$rslt=mysql_query($stmt, $link);
$cb_to_print = mysql_num_rows($rslt);
@@ -1,52 +1,90 @@
<?
### admin_modify_lead.php
###
### Copyright (C) 2006 Matt Florell <vicidial@gmail.com> LICENSE: GPLv2
###
# 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"];}
$CBchangeUSERtoANY=$_GET["CBchangeUSERtoANY"]; if (!$CBchangeUSERtoANY) {$CBchangeUSERtoANY=$_POST["CBchangeUSERtoANY"];}
$CBchangeUSERtoUSER=$_GET["CBchangeUSERtoUSER"]; if (!$CBchangeUSERtoUSER) {$CBchangeUSERtoUSER=$_POST["CBchangeUSERtoUSER"];}
$CBchangeANYtoUSER=$_GET["CBchangeANYtoUSER"]; if (!$CBchangeANYtoUSER) {$CBchangeANYtoUSER=$_POST["CBchangeANYtoUSER"];}
$callback_id=$_GET["callback_id"]; if (!$callback_id) {$callback_id=$_POST["callback_id"];}
$CBuser=$_GET["CBuser"]; if (!$CBuser) {$CBuser=$_POST["CBuser"];}
if (isset($_GET["vendor_id"])) {$vendor_id=$_GET["vendor_id"];}
elseif (isset($_POST["vendor_id"])) {$vendor_id=$_POST["vendor_id"];}
if (isset($_GET["phone"])) {$phone=$_GET["phone"];}
elseif (isset($_POST["phone"])) {$phone=$_POST["phone"];}
if (isset($_GET["lead_id"])) {$lead_id=$_GET["lead_id"];}
elseif (isset($_POST["lead_id"])) {$lead_id=$_POST["lead_id"];}
if (isset($_GET["first_name"])) {$first_name=$_GET["first_name"];}
elseif (isset($_POST["first_name"])) {$first_name=$_POST["first_name"];}
if (isset($_GET["last_name"])) {$last_name=$_GET["last_name"];}
elseif (isset($_POST["last_name"])) {$last_name=$_POST["last_name"];}
if (isset($_GET["phone_number"])) {$phone_number=$_GET["phone_number"];}
elseif (isset($_POST["phone_number"])) {$phone_number=$_POST["phone_number"];}
if (isset($_GET["end_call"])) {$end_call=$_GET["end_call"];}
elseif (isset($_POST["end_call"])) {$end_call=$_POST["end_call"];}
if (isset($_GET["DB"])) {$DB=$_GET["DB"];}
elseif (isset($_POST["DB"])) {$DB=$_POST["DB"];}
if (isset($_GET["dispo"])) {$dispo=$_GET["dispo"];}
elseif (isset($_POST["dispo"])) {$dispo=$_POST["dispo"];}
if (isset($_GET["list_id"])) {$list_id=$_GET["list_id"];}
elseif (isset($_POST["list_id"])) {$list_id=$_POST["list_id"];}
if (isset($_GET["campaign_id"])) {$campaign_id=$_GET["campaign_id"];}
elseif (isset($_POST["campaign_id"])) {$campaign_id=$_POST["campaign_id"];}
if (isset($_GET["phone_code"])) {$phone_code=$_GET["phone_code"];}
elseif (isset($_POST["phone_code"])) {$phone_code=$_POST["phone_code"];}
if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];}
elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];}
if (isset($_GET["extension"])) {$extension=$_GET["extension"];}
elseif (isset($_POST["extension"])) {$extension=$_POST["extension"];}
if (isset($_GET["channel"])) {$channel=$_GET["channel"];}
elseif (isset($_POST["channel"])) {$channel=$_POST["channel"];}
if (isset($_GET["call_began"])) {$call_began=$_GET["call_began"];}
elseif (isset($_POST["call_began"])) {$call_began=$_POST["call_began"];}
if (isset($_GET["parked_time"])) {$parked_time=$_GET["parked_time"];}
elseif (isset($_POST["parked_time"])) {$parked_time=$_POST["parked_time"];}
if (isset($_GET["tsr"])) {$tsr=$_GET["tsr"];}
elseif (isset($_POST["tsr"])) {$tsr=$_POST["tsr"];}
if (isset($_GET["address1"])) {$address1=$_GET["address1"];}
elseif (isset($_POST["address1"])) {$address1=$_POST["address1"];}
if (isset($_GET["address2"])) {$address2=$_GET["address2"];}
elseif (isset($_POST["address2"])) {$address2=$_POST["address2"];}
if (isset($_GET["address3"])) {$address3=$_GET["address3"];}
elseif (isset($_POST["address3"])) {$address3=$_POST["address3"];}
if (isset($_GET["city"])) {$city=$_GET["city"];}
elseif (isset($_POST["city"])) {$city=$_POST["city"];}
if (isset($_GET["state"])) {$state=$_GET["state"];}
elseif (isset($_POST["state"])) {$state=$_POST["state"];}
if (isset($_GET["postal_code"])) {$postal_code=$_GET["postal_code"];}
elseif (isset($_POST["postal_code"])) {$postal_code=$_POST["postal_code"];}
if (isset($_GET["province"])) {$province=$_GET["province"];}
elseif (isset($_POST["province"])) {$province=$_POST["province"];}
if (isset($_GET["country_code"])) {$country_code=$_GET["country_code"];}
elseif (isset($_POST["country_code"])) {$country_code=$_POST["country_code"];}
if (isset($_GET["alt_phone"])) {$alt_phone=$_GET["alt_phone"];}
elseif (isset($_POST["alt_phone"])) {$alt_phone=$_POST["alt_phone"];}
if (isset($_GET["email"])) {$email=$_GET["email"];}
elseif (isset($_POST["email"])) {$email=$_POST["email"];}
if (isset($_GET["security"])) {$security=$_GET["security"];}
elseif (isset($_POST["security"])) {$security=$_POST["security"];}
if (isset($_GET["comments"])) {$comments=$_GET["comments"];}
elseif (isset($_POST["comments"])) {$comments=$_POST["comments"];}
if (isset($_GET["status"])) {$status=$_GET["status"];}
elseif (isset($_POST["status"])) {$status=$_POST["status"];}
if (isset($_GET["submit"])) {$submit=$_GET["submit"];}
elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];}
if (isset($_GET["SUBMIT"])) {$SUBMIT=$_GET["SUBMIT"];}
elseif (isset($_POST["SUBMIT"])) {$SUBMIT=$_POST["SUBMIT"];}
if (isset($_GET["CBchangeUSERtoANY"])) {$CBchangeUSERtoANY=$_GET["CBchangeUSERtoANY"];}
elseif (isset($_POST["CBchangeUSERtoANY"])) {$CBchangeUSERtoANY=$_POST["CBchangeUSERtoANY"];}
if (isset($_GET["CBchangeUSERtoUSER"])) {$CBchangeUSERtoUSER=$_GET["CBchangeUSERtoUSER"];}
elseif (isset($_POST["CBchangeUSERtoUSER"])) {$CBchangeUSERtoUSER=$_POST["CBchangeUSERtoUSER"];}
if (isset($_GET["CBchangeANYtoUSER"])) {$CBchangeANYtoUSER=$_GET["CBchangeANYtoUSER"];}
elseif (isset($_POST["CBchangeANYtoUSER"])) {$CBchangeANYtoUSER=$_POST["CBchangeANYtoUSER"];}
if (isset($_GET["callback_id"])) {$callback_id=$_GET["callback_id"];}
elseif (isset($_POST["callback_id"])) {$callback_id=$_POST["callback_id"];}
if (isset($_GET["CBuser"])) {$CBuser=$_GET["CBuser"];}
elseif (isset($_POST["CBuser"])) {$CBuser=$_POST["CBuser"];}
### AST GUI database administration modify lead in vicidial_list
@@ -56,7 +94,8 @@ $CBuser=$_GET["CBuser"]; if (!$CBuser) {$CBuser=$_POST["CBuser"];}
# CHANGES
#
# 60419-1705 Added ability to change lead callback record from USERONLY to ANYONE or USERONLY-user
# 60419-1705 - Added ability to change lead callback record from USERONLY to ANYONE or USERONLY-user
# 60421-1459 - check GET/POST vars lines with isset to not trigger PHP NOTICES
#
$STARTtime = date("U");
@@ -150,6 +189,15 @@ $call_length = ($STARTtime - $call_began);
echo "<BR>vicidial_callback record inactivated: $lead_id<BR>\n";
}
if ( ($dispo != $status) and ($dispo == 'CALLBK') )
{
### inactivate vicidial_callbacks record for this lead
$stmt="UPDATE vicidial_callbacks set status='INACTIVE' where lead_id='$lead_id' and status IN('ACTIVE','LIVE');";
if ($DB) {echo "|$stmt|\n";}
$rslt=mysql_query($stmt, $link);
echo "<BR>vicidial_callback record inactivated: $lead_id<BR>\n";
}
}
else
@@ -9,11 +9,16 @@ 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"];}
if (isset($_GET["vendor_id"])) {$vendor_id=$_GET["vendor_id"];}
elseif (isset($_POST["vendor_id"])) {$vendor_id=$_POST["vendor_id"];}
if (isset($_GET["phone"])) {$phone=$_GET["phone"];}
elseif (isset($_POST["phone"])) {$phone=$_POST["phone"];}
if (isset($_GET["lead_id"])) {$lead_id=$_GET["lead_id"];}
elseif (isset($_POST["lead_id"])) {$lead_id=$_POST["lead_id"];}
if (isset($_GET["submit"])) {$submit=$_GET["submit"];}
elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];}
if (isset($_GET["SUBMIT"])) {$SUBMIT=$_GET["SUBMIT"];}
elseif (isset($_POST["SUBMIT"])) {$SUBMIT=$_POST["SUBMIT"];}
### AST GUI database administration search for lead info
### admin_modify_lead.php
@@ -10,46 +10,86 @@ require("dbconnect.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"];}
if (isset($_GET["address1"])) {$address1=$_GET["address1"];}
elseif (isset($_POST["address1"])) {$address1=$_POST["address1"];}
if (isset($_GET["address2"])) {$address2=$_GET["address2"];}
elseif (isset($_POST["address2"])) {$address2=$_POST["address2"];}
if (isset($_GET["address3"])) {$address3=$_GET["address3"];}
elseif (isset($_POST["address3"])) {$address3=$_POST["address3"];}
if (isset($_GET["alt_phone"])) {$alt_phone=$_GET["alt_phone"];}
elseif (isset($_POST["alt_phone"])) {$alt_phone=$_POST["alt_phone"];}
if (isset($_GET["call_began"])) {$call_began=$_GET["call_began"];}
elseif (isset($_POST["call_began"])) {$call_began=$_POST["call_began"];}
if (isset($_GET["campaign_id"])) {$campaign_id=$_GET["campaign_id"];}
elseif (isset($_POST["campaign_id"])) {$campaign_id=$_POST["campaign_id"];}
if (isset($_GET["channel"])) {$channel=$_GET["channel"];}
elseif (isset($_POST["channel"])) {$channel=$_POST["channel"];}
if (isset($_GET["channel_group"])) {$channel_group=$_GET["channel_group"];}
elseif (isset($_POST["channel_group"])) {$channel_group=$_POST["channel_group"];}
if (isset($_GET["city"])) {$city=$_GET["city"];}
elseif (isset($_POST["city"])) {$city=$_POST["city"];}
if (isset($_GET["comments"])) {$comments=$_GET["comments"];}
elseif (isset($_POST["comments"])) {$comments=$_POST["comments"];}
if (isset($_GET["country_code"])) {$country_code=$_GET["country_code"];}
elseif (isset($_POST["country_code"])) {$country_code=$_POST["country_code"];}
if (isset($_GET["customer_zap_channel"])) {$customer_zap_channel=$_GET["customer_zap_channel"];}
elseif (isset($_POST["customer_zap_channel"])) {$customer_zap_channel=$_POST["customer_zap_channel"];}
if (isset($_GET["DB"])) {$DB=$_GET["DB"];}
elseif (isset($_POST["DB"])) {$DB=$_POST["DB"];}
if (isset($_GET["dispo"])) {$dispo=$_GET["dispo"];}
elseif (isset($_POST["dispo"])) {$dispo=$_POST["dispo"];}
if (isset($_GET["email"])) {$email=$_GET["email"];}
elseif (isset($_POST["email"])) {$email=$_POST["email"];}
if (isset($_GET["end_call"])) {$end_call=$_GET["end_call"];}
elseif (isset($_POST["end_call"])) {$end_call=$_POST["end_call"];}
if (isset($_GET["extension"])) {$extension=$_GET["extension"];}
elseif (isset($_POST["extension"])) {$extension=$_POST["extension"];}
if (isset($_GET["first_name"])) {$first_name=$_GET["first_name"];}
elseif (isset($_POST["first_name"])) {$first_name=$_POST["first_name"];}
if (isset($_GET["group"])) {$group=$_GET["group"];}
elseif (isset($_POST["group"])) {$group=$_POST["group"];}
if (isset($_GET["last_name"])) {$last_name=$_GET["last_name"];}
elseif (isset($_POST["last_name"])) {$last_name=$_POST["last_name"];}
if (isset($_GET["lead_id"])) {$lead_id=$_GET["lead_id"];}
elseif (isset($_POST["lead_id"])) {$lead_id=$_POST["lead_id"];}
if (isset($_GET["list_id"])) {$list_id=$_GET["list_id"];}
elseif (isset($_POST["list_id"])) {$list_id=$_POST["list_id"];}
if (isset($_GET["parked_time"])) {$parked_time=$_GET["parked_time"];}
elseif (isset($_POST["parked_time"])) {$parked_time=$_POST["parked_time"];}
if (isset($_GET["pass"])) {$pass=$_GET["pass"];}
elseif (isset($_POST["pass"])) {$pass=$_POST["pass"];}
if (isset($_GET["phone_code"])) {$phone_code=$_GET["phone_code"];}
elseif (isset($_POST["phone_code"])) {$phone_code=$_POST["phone_code"];}
if (isset($_GET["phone_number"])) {$phone_number=$_GET["phone_number"];}
elseif (isset($_POST["phone_number"])) {$phone_number=$_POST["phone_number"];}
if (isset($_GET["phone"])) {$phone=$_GET["phone"];}
elseif (isset($_POST["phone"])) {$phone=$_POST["phone"];}
if (isset($_GET["postal_code"])) {$postal_code=$_GET["postal_code"];}
elseif (isset($_POST["postal_code"])) {$postal_code=$_POST["postal_code"];}
if (isset($_GET["province"])) {$province=$_GET["province"];}
elseif (isset($_POST["province"])) {$province=$_POST["province"];}
if (isset($_GET["security"])) {$security=$_GET["security"];}
elseif (isset($_POST["security"])) {$security=$_POST["security"];}
if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];}
elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];}
if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];}
elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];}
if (isset($_GET["session_id"])) {$session_id=$_GET["session_id"];}
elseif (isset($_POST["session_id"])) {$session_id=$_POST["session_id"];}
if (isset($_GET["state"])) {$state=$_GET["state"];}
elseif (isset($_POST["state"])) {$state=$_POST["state"];}
if (isset($_GET["status"])) {$status=$_GET["status"];}
elseif (isset($_POST["status"])) {$status=$_POST["status"];}
if (isset($_GET["tsr"])) {$tsr=$_GET["tsr"];}
elseif (isset($_POST["tsr"])) {$tsr=$_POST["tsr"];}
if (isset($_GET["user"])) {$user=$_GET["user"];}
elseif (isset($_POST["user"])) {$user=$_POST["user"];}
if (isset($_GET["vendor_id"])) {$vendor_id=$_GET["vendor_id"];}
elseif (isset($_POST["vendor_id"])) {$vendor_id=$_POST["vendor_id"];}
if (isset($_GET["submit"])) {$submit=$_GET["submit"];}
elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];}
if (isset($_GET["SUBMIT"])) {$SUBMIT=$_GET["SUBMIT"];}
elseif (isset($_POST["SUBMIT"])) {$SUBMIT=$_POST["SUBMIT"];}
#$DB = '1'; # DEBUG override
@@ -10,46 +10,86 @@ require("dbconnect.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"];}
if (isset($_GET["address1"])) {$address1=$_GET["address1"];}
elseif (isset($_POST["address1"])) {$address1=$_POST["address1"];}
if (isset($_GET["address2"])) {$address2=$_GET["address2"];}
elseif (isset($_POST["address2"])) {$address2=$_POST["address2"];}
if (isset($_GET["address3"])) {$address3=$_GET["address3"];}
elseif (isset($_POST["address3"])) {$address3=$_POST["address3"];}
if (isset($_GET["alt_phone"])) {$alt_phone=$_GET["alt_phone"];}
elseif (isset($_POST["alt_phone"])) {$alt_phone=$_POST["alt_phone"];}
if (isset($_GET["call_began"])) {$call_began=$_GET["call_began"];}
elseif (isset($_POST["call_began"])) {$call_began=$_POST["call_began"];}
if (isset($_GET["campaign_id"])) {$campaign_id=$_GET["campaign_id"];}
elseif (isset($_POST["campaign_id"])) {$campaign_id=$_POST["campaign_id"];}
if (isset($_GET["channel"])) {$channel=$_GET["channel"];}
elseif (isset($_POST["channel"])) {$channel=$_POST["channel"];}
if (isset($_GET["channel_group"])) {$channel_group=$_GET["channel_group"];}
elseif (isset($_POST["channel_group"])) {$channel_group=$_POST["channel_group"];}
if (isset($_GET["city"])) {$city=$_GET["city"];}
elseif (isset($_POST["city"])) {$city=$_POST["city"];}
if (isset($_GET["comments"])) {$comments=$_GET["comments"];}
elseif (isset($_POST["comments"])) {$comments=$_POST["comments"];}
if (isset($_GET["country_code"])) {$country_code=$_GET["country_code"];}
elseif (isset($_POST["country_code"])) {$country_code=$_POST["country_code"];}
if (isset($_GET["customer_zap_channel"])) {$customer_zap_channel=$_GET["customer_zap_channel"];}
elseif (isset($_POST["customer_zap_channel"])) {$customer_zap_channel=$_POST["customer_zap_channel"];}
if (isset($_GET["DB"])) {$DB=$_GET["DB"];}
elseif (isset($_POST["DB"])) {$DB=$_POST["DB"];}
if (isset($_GET["dispo"])) {$dispo=$_GET["dispo"];}
elseif (isset($_POST["dispo"])) {$dispo=$_POST["dispo"];}
if (isset($_GET["email"])) {$email=$_GET["email"];}
elseif (isset($_POST["email"])) {$email=$_POST["email"];}
if (isset($_GET["end_call"])) {$end_call=$_GET["end_call"];}
elseif (isset($_POST["end_call"])) {$end_call=$_POST["end_call"];}
if (isset($_GET["extension"])) {$extension=$_GET["extension"];}
elseif (isset($_POST["extension"])) {$extension=$_POST["extension"];}
if (isset($_GET["first_name"])) {$first_name=$_GET["first_name"];}
elseif (isset($_POST["first_name"])) {$first_name=$_POST["first_name"];}
if (isset($_GET["group"])) {$group=$_GET["group"];}
elseif (isset($_POST["group"])) {$group=$_POST["group"];}
if (isset($_GET["last_name"])) {$last_name=$_GET["last_name"];}
elseif (isset($_POST["last_name"])) {$last_name=$_POST["last_name"];}
if (isset($_GET["lead_id"])) {$lead_id=$_GET["lead_id"];}
elseif (isset($_POST["lead_id"])) {$lead_id=$_POST["lead_id"];}
if (isset($_GET["list_id"])) {$list_id=$_GET["list_id"];}
elseif (isset($_POST["list_id"])) {$list_id=$_POST["list_id"];}
if (isset($_GET["parked_time"])) {$parked_time=$_GET["parked_time"];}
elseif (isset($_POST["parked_time"])) {$parked_time=$_POST["parked_time"];}
if (isset($_GET["pass"])) {$pass=$_GET["pass"];}
elseif (isset($_POST["pass"])) {$pass=$_POST["pass"];}
if (isset($_GET["phone_code"])) {$phone_code=$_GET["phone_code"];}
elseif (isset($_POST["phone_code"])) {$phone_code=$_POST["phone_code"];}
if (isset($_GET["phone_number"])) {$phone_number=$_GET["phone_number"];}
elseif (isset($_POST["phone_number"])) {$phone_number=$_POST["phone_number"];}
if (isset($_GET["phone"])) {$phone=$_GET["phone"];}
elseif (isset($_POST["phone"])) {$phone=$_POST["phone"];}
if (isset($_GET["postal_code"])) {$postal_code=$_GET["postal_code"];}
elseif (isset($_POST["postal_code"])) {$postal_code=$_POST["postal_code"];}
if (isset($_GET["province"])) {$province=$_GET["province"];}
elseif (isset($_POST["province"])) {$province=$_POST["province"];}
if (isset($_GET["security"])) {$security=$_GET["security"];}
elseif (isset($_POST["security"])) {$security=$_POST["security"];}
if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];}
elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];}
if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];}
elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];}
if (isset($_GET["session_id"])) {$session_id=$_GET["session_id"];}
elseif (isset($_POST["session_id"])) {$session_id=$_POST["session_id"];}
if (isset($_GET["state"])) {$state=$_GET["state"];}
elseif (isset($_POST["state"])) {$state=$_POST["state"];}
if (isset($_GET["status"])) {$status=$_GET["status"];}
elseif (isset($_POST["status"])) {$status=$_POST["status"];}
if (isset($_GET["tsr"])) {$tsr=$_GET["tsr"];}
elseif (isset($_POST["tsr"])) {$tsr=$_POST["tsr"];}
if (isset($_GET["user"])) {$user=$_GET["user"];}
elseif (isset($_POST["user"])) {$user=$_POST["user"];}
if (isset($_GET["vendor_id"])) {$vendor_id=$_GET["vendor_id"];}
elseif (isset($_POST["vendor_id"])) {$vendor_id=$_POST["vendor_id"];}
if (isset($_GET["submit"])) {$submit=$_GET["submit"];}
elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];}
if (isset($_GET["SUBMIT"])) {$SUBMIT=$_GET["SUBMIT"];}
elseif (isset($_POST["SUBMIT"])) {$SUBMIT=$_POST["SUBMIT"];}
#$DB = '1'; # DEBUG override
@@ -62,8 +102,8 @@ $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;}
if (!isset($begin_date)) {$begin_date = $TODAY;}
if (!isset($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";}
+32 -16
View File
@@ -10,22 +10,38 @@ 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"];}
$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"];}
if (isset($_GET["group"])) {$group=$_GET["group"];}
elseif (isset($_POST["group"])) {$group=$_POST["group"];}
if (isset($_GET["group_selected"])) {$group_selected=$_GET["group_selected"];}
elseif (isset($_POST["group_selected"])) {$group_selected=$_POST["group_selected"];}
if (isset($_GET["dialplan_number"])) {$dialplan_number=$_GET["dialplan_number"];}
elseif (isset($_POST["dialplan_number"])) {$dialplan_number=$_POST["dialplan_number"];}
if (isset($_GET["extension"])) {$extension=$_GET["extension"];}
elseif (isset($_POST["extension"])) {$extension=$_POST["extension"];}
if (isset($_GET["groupselect"])) {$groupselect=$_GET["groupselect"];}
elseif (isset($_POST["groupselect"])) {$groupselect=$_POST["groupselect"];}
if (isset($_GET["PHONE_LOGIN"])) {$PHONE_LOGIN=$_GET["PHONE_LOGIN"];}
elseif (isset($_POST["PHONE_LOGIN"])) {$PHONE_LOGIN=$_POST["PHONE_LOGIN"];}
if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];}
elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];}
if (isset($_GET["DB"])) {$DB=$_GET["DB"];}
elseif (isset($_POST["DB"])) {$DB=$_POST["DB"];}
if (isset($_GET["user"])) {$user=$_GET["user"];}
elseif (isset($_POST["user"])) {$user=$_POST["user"];}
if (isset($_GET["channel"])) {$channel=$_GET["channel"];}
elseif (isset($_POST["channel"])) {$channel=$_POST["channel"];}
if (isset($_GET["parked_time"])) {$parked_time=$_GET["parked_time"];}
elseif (isset($_POST["parked_time"])) {$parked_time=$_POST["parked_time"];}
if (isset($_GET["channel_group"])) {$channel_group=$_GET["channel_group"];}
elseif (isset($_POST["channel_group"])) {$channel_group=$_POST["channel_group"];}
if (isset($_GET["debugvars"])) {$debugvars=$_GET["debugvars"];}
elseif (isset($_POST["debugvars"])) {$debugvars=$_POST["debugvars"];}
if (isset($_GET["parked_by"])) {$parked_by=$_GET["parked_by"];}
elseif (isset($_POST["parked_by"])) {$parked_by=$_POST["parked_by"];}
if (isset($_GET["submit"])) {$submit=$_GET["submit"];}
elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];}
if (isset($_GET["SUBMIT"])) {$SUBMIT=$_GET["SUBMIT"];}
elseif (isset($_POST["SUBMIT"])) {$SUBMIT=$_POST["SUBMIT"];}
$STARTtime = date("U");
$TODAY = date("Y-m-d");
+68 -35
View File
@@ -10,39 +10,72 @@ 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"];}
if (isset($_GET["vendor_id"])) {$vendor_id=$_GET["vendor_id"];}
elseif (isset($_POST["vendor_id"])) {$vendor_id=$_POST["vendor_id"];}
if (isset($_GET["phone"])) {$phone=$_GET["phone"];}
elseif (isset($_POST["phone"])) {$phone=$_POST["phone"];}
if (isset($_GET["lead_id"])) {$lead_id=$_GET["lead_id"];}
elseif (isset($_POST["lead_id"])) {$lead_id=$_POST["lead_id"];}
if (isset($_GET["first_name"])) {$first_name=$_GET["first_name"];}
elseif (isset($_POST["first_name"])) {$first_name=$_POST["first_name"];}
if (isset($_GET["last_name"])) {$last_name=$_GET["last_name"];}
elseif (isset($_POST["last_name"])) {$last_name=$_POST["last_name"];}
if (isset($_GET["phone_number"])) {$phone_number=$_GET["phone_number"];}
elseif (isset($_POST["phone_number"])) {$phone_number=$_POST["phone_number"];}
if (isset($_GET["end_call"])) {$end_call=$_GET["end_call"];}
elseif (isset($_POST["end_call"])) {$end_call=$_POST["end_call"];}
if (isset($_GET["DB"])) {$DB=$_GET["DB"];}
elseif (isset($_POST["DB"])) {$DB=$_POST["DB"];}
if (isset($_GET["dispo"])) {$dispo=$_GET["dispo"];}
elseif (isset($_POST["dispo"])) {$dispo=$_POST["dispo"];}
if (isset($_GET["list_id"])) {$list_id=$_GET["list_id"];}
elseif (isset($_POST["list_id"])) {$list_id=$_POST["list_id"];}
if (isset($_GET["campaign_id"])) {$campaign_id=$_GET["campaign_id"];}
elseif (isset($_POST["campaign_id"])) {$campaign_id=$_POST["campaign_id"];}
if (isset($_GET["phone_code"])) {$phone_code=$_GET["phone_code"];}
elseif (isset($_POST["phone_code"])) {$phone_code=$_POST["phone_code"];}
if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];}
elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];}
if (isset($_GET["extension"])) {$extension=$_GET["extension"];}
elseif (isset($_POST["extension"])) {$extension=$_POST["extension"];}
if (isset($_GET["channel"])) {$channel=$_GET["channel"];}
elseif (isset($_POST["channel"])) {$channel=$_POST["channel"];}
if (isset($_GET["call_began"])) {$call_began=$_GET["call_began"];}
elseif (isset($_POST["call_began"])) {$call_began=$_POST["call_began"];}
if (isset($_GET["parked_time"])) {$parked_time=$_GET["parked_time"];}
elseif (isset($_POST["parked_time"])) {$parked_time=$_POST["parked_time"];}
if (isset($_GET["tsr"])) {$tsr=$_GET["tsr"];}
elseif (isset($_POST["tsr"])) {$tsr=$_POST["tsr"];}
if (isset($_GET["address1"])) {$address1=$_GET["address1"];}
elseif (isset($_POST["address1"])) {$address1=$_POST["address1"];}
if (isset($_GET["address2"])) {$address2=$_GET["address2"];}
elseif (isset($_POST["address2"])) {$address2=$_POST["address2"];}
if (isset($_GET["address3"])) {$address3=$_GET["address3"];}
elseif (isset($_POST["address3"])) {$address3=$_POST["address3"];}
if (isset($_GET["city"])) {$city=$_GET["city"];}
elseif (isset($_POST["city"])) {$city=$_POST["city"];}
if (isset($_GET["state"])) {$state=$_GET["state"];}
elseif (isset($_POST["state"])) {$state=$_POST["state"];}
if (isset($_GET["postal_code"])) {$postal_code=$_GET["postal_code"];}
elseif (isset($_POST["postal_code"])) {$postal_code=$_POST["postal_code"];}
if (isset($_GET["province"])) {$province=$_GET["province"];}
elseif (isset($_POST["province"])) {$province=$_POST["province"];}
if (isset($_GET["country_code"])) {$country_code=$_GET["country_code"];}
elseif (isset($_POST["country_code"])) {$country_code=$_POST["country_code"];}
if (isset($_GET["alt_phone"])) {$alt_phone=$_GET["alt_phone"];}
elseif (isset($_POST["alt_phone"])) {$alt_phone=$_POST["alt_phone"];}
if (isset($_GET["email"])) {$email=$_GET["email"];}
elseif (isset($_POST["email"])) {$email=$_POST["email"];}
if (isset($_GET["security"])) {$security=$_GET["security"];}
elseif (isset($_POST["security"])) {$security=$_POST["security"];}
if (isset($_GET["comments"])) {$comments=$_GET["comments"];}
elseif (isset($_POST["comments"])) {$comments=$_POST["comments"];}
if (isset($_GET["status"])) {$status=$_GET["status"];}
elseif (isset($_POST["status"])) {$status=$_POST["status"];}
if (isset($_GET["submit"])) {$submit=$_GET["submit"];}
elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];}
if (isset($_GET["SUBMIT"])) {$SUBMIT=$_GET["SUBMIT"];}
elseif (isset($_POST["SUBMIT"])) {$SUBMIT=$_POST["SUBMIT"];}
$STARTtime = date("U");
$TODAY = date("Y-m-d");
@@ -50,8 +83,8 @@ $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;}
if (!isset($begin_date)) {$begin_date = $TODAY;}
if (!isset($end_date)) {$end_date = $TODAY;}
$stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 2;";
if ($DB) {echo "$stmt\n";}
+32 -16
View File
@@ -10,22 +10,38 @@ 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"];}
$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"];}
if (isset($_GET["group"])) {$group=$_GET["group"];}
elseif (isset($_POST["group"])) {$group=$_POST["group"];}
if (isset($_GET["group_selected"])) {$group_selected=$_GET["group_selected"];}
elseif (isset($_POST["group_selected"])) {$group_selected=$_POST["group_selected"];}
if (isset($_GET["dialplan_number"])) {$dialplan_number=$_GET["dialplan_number"];}
elseif (isset($_POST["dialplan_number"])) {$dialplan_number=$_POST["dialplan_number"];}
if (isset($_GET["extension"])) {$extension=$_GET["extension"];}
elseif (isset($_POST["extension"])) {$extension=$_POST["extension"];}
if (isset($_GET["groupselect"])) {$groupselect=$_GET["groupselect"];}
elseif (isset($_POST["groupselect"])) {$groupselect=$_POST["groupselect"];}
if (isset($_GET["PHONE_LOGIN"])) {$PHONE_LOGIN=$_GET["PHONE_LOGIN"];}
elseif (isset($_POST["PHONE_LOGIN"])) {$PHONE_LOGIN=$_POST["PHONE_LOGIN"];}
if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];}
elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];}
if (isset($_GET["DB"])) {$DB=$_GET["DB"];}
elseif (isset($_POST["DB"])) {$DB=$_POST["DB"];}
if (isset($_GET["user"])) {$user=$_GET["user"];}
elseif (isset($_POST["user"])) {$user=$_POST["user"];}
if (isset($_GET["channel"])) {$channel=$_GET["channel"];}
elseif (isset($_POST["channel"])) {$channel=$_POST["channel"];}
if (isset($_GET["parked_time"])) {$parked_time=$_GET["parked_time"];}
elseif (isset($_POST["parked_time"])) {$parked_time=$_POST["parked_time"];}
if (isset($_GET["channel_group"])) {$channel_group=$_GET["channel_group"];}
elseif (isset($_POST["channel_group"])) {$channel_group=$_POST["channel_group"];}
if (isset($_GET["debugvars"])) {$debugvars=$_GET["debugvars"];}
elseif (isset($_POST["debugvars"])) {$debugvars=$_POST["debugvars"];}
if (isset($_GET["parked_by"])) {$parked_by=$_GET["parked_by"];}
elseif (isset($_POST["parked_by"])) {$parked_by=$_POST["parked_by"];}
if (isset($_GET["submit"])) {$submit=$_GET["submit"];}
elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];}
if (isset($_GET["SUBMIT"])) {$SUBMIT=$_GET["SUBMIT"];}
elseif (isset($_POST["SUBMIT"])) {$SUBMIT=$_POST["SUBMIT"];}
#$DB=1;
+4 -4
View File
@@ -1,8 +1,8 @@
<?
### dbconnect.php
###
### Copyright (C) 2006 Matt Florell <vicidial@gmail.com> LICENSE: GPLv2
###
# dbconnect.php
#
# Copyright (C) 2006 Matt Florell <vicidial@gmail.com> LICENSE: GPLv2
#
$link=mysql_connect("localhost", "cron", "1234");
mysql_select_db("asterisk");
@@ -9,22 +9,27 @@ 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"];}
$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"];}
if (isset($_GET["group"])) {$group=$_GET["group"];}
elseif (isset($_POST["group"])) {$group=$_POST["group"];}
if (isset($_GET["status"])) {$status=$_GET["status"];}
elseif (isset($_POST["status"])) {$status=$_POST["status"];}
if (isset($_GET["date_with_hour"])) {$date_with_hour=$_GET["date_with_hour"];}
elseif (isset($_POST["date_with_hour"])) {$date_with_hour=$_POST["date_with_hour"];}
if (isset($_GET["submit"])) {$submit=$_GET["submit"];}
elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];}
if (isset($_GET["SUBMIT"])) {$SUBMIT=$_GET["SUBMIT"];}
elseif (isset($_POST["SUBMIT"])) {$SUBMIT=$_POST["SUBMIT"];}
$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;}
if (!isset($date_with_hour)) {$date_with_hour = $date_with_hour_default;}
$date_no_hour = $date_with_hour;
$date_no_hour = eregi_replace(" ([0-9]{2})",'',$date_no_hour);
if (!$begin_date) {$begin_date = $TODAY;}
if (!$end_date) {$end_date = $TODAY;}
if (!isset($begin_date)) {$begin_date = $TODAY;}
if (!isset($end_date)) {$end_date = $TODAY;}
$stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 7;";
$rslt=mysql_query($stmt, $link);
+14 -13
View File
@@ -1,15 +1,16 @@
<?
### listloader.php
###
### Copyright (C) 2006 Matt Florell,Joe Johnson <vicidial@gmail.com> LICENSE: GPLv2
###
### AST Web GUI lead loader from formatted file
###
### CHANGES
### 50602-1640 - First version created by Joe Johnson
### 51128-1108 - Removed PHP global vars requirement
###
### 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.
# listloader.php
#
# Copyright (C) 2006 Matt Florell,Joe Johnson <vicidial@gmail.com> LICENSE: GPLv2
#
# AST Web GUI lead loader from formatted file
#
# CHANGES
# 50602-1640 - First version created by Joe Johnson
# 51128-1108 - Removed PHP global vars requirement
# 60421-1043 - check GET/POST vars lines with isset to not trigger PHP NOTICES
#
# 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.
header ("Content-type: text/html; charset=utf-8");
@@ -27,8 +28,8 @@ $submit=$_GET["submit"]; if (!$submit) {$submit=$_POST["submit"];}
$SUBMIT=$_GET["SUBMIT"]; if (!$SUBMIT) {$SUBMIT=$_POST["SUBMIT"];}
$version = '1.1';
$build = '51128-1108';
$version = '1.1.11';
$build = '60421-1043';
$script_name = getenv("SCRIPT_NAME");
$server_name = getenv("SERVER_NAME");
@@ -1,8 +1,8 @@
<?
### listloaderMAIN.php
###
### Copyright (C) 2006 Matt Florell,Joe Johnson <vicidial@gmail.com> LICENSE: GPLv2
###
# listloaderMAIN.php
#
# Copyright (C) 2006 Matt Florell,Joe Johnson <vicidial@gmail.com> LICENSE: GPLv2
#
# this is the main frame page for the lead loading section. This is where you
# would upload a file and have it inserted into vicidial_list
+6 -6
View File
@@ -1,8 +1,8 @@
<?
### log_test.php
###
### Copyright (C) 2006 Matt Florell <vicidial@gmail.com> LICENSE: GPLv2
###
# log_test.php
#
# Copyright (C) 2006 Matt Florell <vicidial@gmail.com> LICENSE: GPLv2
#
$STARTtime = date("U");
@@ -11,8 +11,8 @@ $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;}
if (!isset($begin_date)) {$begin_date = $TODAY;}
if (!isset($end_date)) {$end_date = $TODAY;}
$fp = fopen ("./closer_SQL_updates.txt", "a");
@@ -1,16 +1,17 @@
<?
### new_listloader_superL.php
###
### Copyright (C) 2006 Matt Florell,Joe Johnson <vicidial@gmail.com> LICENSE: GPLv2
###
### AST GUI lead loader from formatted file
###
### CHANGES
### 50602-1640 - First version created by Joe Johnson
### 51128-1108 - Removed PHP global vars requirement
### 60113-1603 - Fixed a few bugs in Excel import
###
### 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.
# new_listloader_superL.php
#
# Copyright (C) 2006 Matt Florell,Joe Johnson <vicidial@gmail.com> LICENSE: GPLv2
#
# AST GUI lead loader from formatted file
#
# CHANGES
# 50602-1640 - First version created by Joe Johnson
# 51128-1108 - Removed PHP global vars requirement
# 60113-1603 - Fixed a few bugs in Excel import
# 60421-1624 - check GET/POST vars lines with isset to not trigger PHP NOTICES
#
# 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.
require("dbconnect.php");
@@ -26,40 +27,68 @@ $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"];}
if (isset($_GET["submit_file"])) {$submit_file=$_GET["submit_file"];}
elseif (isset($_POST["submit_file"])) {$submit_file=$_POST["submit_file"];}
if (isset($_GET["submit"])) {$submit=$_GET["submit"];}
elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];}
if (isset($_GET["SUBMIT"])) {$SUBMIT=$_GET["SUBMIT"];}
elseif (isset($_POST["SUBMIT"])) {$SUBMIT=$_POST["SUBMIT"];}
if (isset($_GET["leadfile_name"])) {$leadfile_name=$_GET["leadfile_name"];}
elseif (isset($_POST["leadfile_name"])) {$leadfile_name=$_POST["leadfile_name"];}
if (isset($_GET["file_layout"])) {$file_layout=$_GET["file_layout"];}
elseif (isset($_POST["file_layout"])) {$file_layout=$_POST["file_layout"];}
if (isset($_GET["OK_to_process"])) {$OK_to_process=$_GET["OK_to_process"];}
elseif (isset($_POST["OK_to_process"])) {$OK_to_process=$_POST["OK_to_process"];}
if (isset($_GET["vendor_lead_code_field"])) {$vendor_lead_code_field=$_GET["vendor_lead_code_field"];}
elseif (isset($_POST["vendor_lead_code_field"])) {$vendor_lead_code_field=$_POST["vendor_lead_code_field"];}
if (isset($_GET["source_id_field"])) {$source_id_field=$_GET["source_id_field"];}
elseif (isset($_POST["source_id_field"])) {$source_id_field=$_POST["source_id_field"];}
if (isset($_GET["list_id_field"])) {$list_id_field=$_GET["list_id_field"];}
elseif (isset($_POST["list_id_field"])) {$list_id_field=$_POST["list_id_field"];}
if (isset($_GET["phone_code_field"])) {$phone_code_field=$_GET["phone_code_field"];}
elseif (isset($_POST["phone_code_field"])) {$phone_code_field=$_POST["phone_code_field"];}
if (isset($_GET["phone_number_field"])) {$phone_number_field=$_GET["phone_number_field"];}
elseif (isset($_POST["phone_number_field"])) {$phone_number_field=$_POST["phone_number_field"];}
if (isset($_GET["title_field"])) {$title_field=$_GET["title_field"];}
elseif (isset($_POST["title_field"])) {$title_field=$_POST["title_field"];}
if (isset($_GET["first_name_field"])) {$first_name_field=$_GET["first_name_field"];}
elseif (isset($_POST["first_name_field"])) {$first_name_field=$_POST["first_name_field"];}
if (isset($_GET["middle_initial_field"])) {$middle_initial_field=$_GET["middle_initial_field"];}
elseif (isset($_POST["middle_initial_field"])) {$middle_initial_field=$_POST["middle_initial_field"];}
if (isset($_GET["last_name_field"])) {$last_name_field=$_GET["last_name_field"];}
elseif (isset($_POST["last_name_field"])) {$last_name_field=$_POST["last_name_field"];}
if (isset($_GET["address1_field"])) {$address1_field=$_GET["address1_field"];}
elseif (isset($_POST["address1_field"])) {$address1_field=$_POST["address1_field"];}
if (isset($_GET["address2_field"])) {$address2_field=$_GET["address2_field"];}
elseif (isset($_POST["address2_field"])) {$address2_field=$_POST["address2_field"];}
if (isset($_GET["address3_field"])) {$address3_field=$_GET["address3_field"];}
elseif (isset($_POST["address3_field"])) {$address3_field=$_POST["address3_field"];}
if (isset($_GET["city_field"])) {$city_field=$_GET["city_field"];}
elseif (isset($_POST["city_field"])) {$city_field=$_POST["city_field"];}
if (isset($_GET["state_field"])) {$state_field=$_GET["state_field"];}
elseif (isset($_POST["state_field"])) {$state_field=$_POST["state_field"];}
if (isset($_GET["province_field"])) {$province_field=$_GET["province_field"];}
elseif (isset($_POST["province_field"])) {$province_field=$_POST["province_field"];}
if (isset($_GET["postal_code_field"])) {$postal_code_field=$_GET["postal_code_field"];}
elseif (isset($_POST["postal_code_field"])) {$postal_code_field=$_POST["postal_code_field"];}
if (isset($_GET["country_code_field"])) {$country_code_field=$_GET["country_code_field"];}
elseif (isset($_POST["country_code_field"])) {$country_code_field=$_POST["country_code_field"];}
if (isset($_GET["gender_field"])) {$gender_field=$_GET["gender_field"];}
elseif (isset($_POST["gender_field"])) {$gender_field=$_POST["gender_field"];}
if (isset($_GET["date_of_birth_field"])) {$date_of_birth_field=$_GET["date_of_birth_field"];}
elseif (isset($_POST["date_of_birth_field"])) {$date_of_birth_field=$_POST["date_of_birth_field"];}
if (isset($_GET["alt_phone_field"])) {$alt_phone_field=$_GET["alt_phone_field"];}
elseif (isset($_POST["alt_phone_field"])) {$alt_phone_field=$_POST["alt_phone_field"];}
if (isset($_GET["email_field"])) {$email_field=$_GET["email_field"];}
elseif (isset($_POST["email_field"])) {$email_field=$_POST["email_field"];}
if (isset($_GET["security_phrase_field"])) {$security_phrase_field=$_GET["security_phrase_field"];}
elseif (isset($_POST["security_phrase_field"])) {$security_phrase_field=$_POST["security_phrase_field"];}
if (isset($_GET["comments_field"])) {$comments_field=$_GET["comments_field"];}
elseif (isset($_POST["comments_field"])) {$comments_field=$_POST["comments_field"];}
$version = '1.1.9';
$build = '60113-1603';
# $country_field=$_GET["country_field"]; if (!$country_field) {$country_field=$_POST["country_field"];}
$version = '1.1.11';
$build = '60421-1624';
$STARTtime = date("U");
@@ -10,12 +10,18 @@ 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"];}
$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"];}
if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];}
elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];}
if (isset($_GET["station"])) {$station=$_GET["station"];}
elseif (isset($_POST["station"])) {$station=$_POST["station"];}
if (isset($_GET["session_id"])) {$session_id=$_GET["session_id"];}
elseif (isset($_POST["session_id"])) {$session_id=$_POST["session_id"];}
if (isset($_GET["NEW_RECORDING"])) {$NEW_RECORDING=$_GET["NEW_RECORDING"];}
elseif (isset($_POST["NEW_RECORDING"])) {$NEW_RECORDING=$_POST["NEW_RECORDING"];}
if (isset($_GET["submit"])) {$submit=$_GET["submit"];}
elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];}
if (isset($_GET["SUBMIT"])) {$SUBMIT=$_GET["SUBMIT"];}
elseif (isset($_POST["SUBMIT"])) {$SUBMIT=$_POST["SUBMIT"];}
$STARTtime = date("U");
$TODAY = date("Y-m-d");
+82 -43
View File
@@ -11,47 +11,86 @@ require("dbconnect.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"];}
if (isset($_GET["address1"])) {$address1=$_GET["address1"];}
elseif (isset($_POST["address1"])) {$address1=$_POST["address1"];}
if (isset($_GET["address2"])) {$address2=$_GET["address2"];}
elseif (isset($_POST["address2"])) {$address2=$_POST["address2"];}
if (isset($_GET["address3"])) {$address3=$_GET["address3"];}
elseif (isset($_POST["address3"])) {$address3=$_POST["address3"];}
if (isset($_GET["alt_phone"])) {$alt_phone=$_GET["alt_phone"];}
elseif (isset($_POST["alt_phone"])) {$alt_phone=$_POST["alt_phone"];}
if (isset($_GET["call_began"])) {$call_began=$_GET["call_began"];}
elseif (isset($_POST["call_began"])) {$call_began=$_POST["call_began"];}
if (isset($_GET["campaign_id"])) {$campaign_id=$_GET["campaign_id"];}
elseif (isset($_POST["campaign_id"])) {$campaign_id=$_POST["campaign_id"];}
if (isset($_GET["channel"])) {$channel=$_GET["channel"];}
elseif (isset($_POST["channel"])) {$channel=$_POST["channel"];}
if (isset($_GET["channel_group"])) {$channel_group=$_GET["channel_group"];}
elseif (isset($_POST["channel_group"])) {$channel_group=$_POST["channel_group"];}
if (isset($_GET["city"])) {$city=$_GET["city"];}
elseif (isset($_POST["city"])) {$city=$_POST["city"];}
if (isset($_GET["comments"])) {$comments=$_GET["comments"];}
elseif (isset($_POST["comments"])) {$comments=$_POST["comments"];}
if (isset($_GET["country_code"])) {$country_code=$_GET["country_code"];}
elseif (isset($_POST["country_code"])) {$country_code=$_POST["country_code"];}
if (isset($_GET["customer_zap_channel"])) {$customer_zap_channel=$_GET["customer_zap_channel"];}
elseif (isset($_POST["customer_zap_channel"])) {$customer_zap_channel=$_POST["customer_zap_channel"];}
if (isset($_GET["DB"])) {$DB=$_GET["DB"];}
elseif (isset($_POST["DB"])) {$DB=$_POST["DB"];}
if (isset($_GET["dispo"])) {$dispo=$_GET["dispo"];}
elseif (isset($_POST["dispo"])) {$dispo=$_POST["dispo"];}
if (isset($_GET["email"])) {$email=$_GET["email"];}
elseif (isset($_POST["email"])) {$email=$_POST["email"];}
if (isset($_GET["end_call"])) {$end_call=$_GET["end_call"];}
elseif (isset($_POST["end_call"])) {$end_call=$_POST["end_call"];}
if (isset($_GET["extension"])) {$extension=$_GET["extension"];}
elseif (isset($_POST["extension"])) {$extension=$_POST["extension"];}
if (isset($_GET["first_name"])) {$first_name=$_GET["first_name"];}
elseif (isset($_POST["first_name"])) {$first_name=$_POST["first_name"];}
if (isset($_GET["group"])) {$group=$_GET["group"];}
elseif (isset($_POST["group"])) {$group=$_POST["group"];}
if (isset($_GET["last_name"])) {$last_name=$_GET["last_name"];}
elseif (isset($_POST["last_name"])) {$last_name=$_POST["last_name"];}
if (isset($_GET["lead_id"])) {$lead_id=$_GET["lead_id"];}
elseif (isset($_POST["lead_id"])) {$lead_id=$_POST["lead_id"];}
if (isset($_GET["list_id"])) {$list_id=$_GET["list_id"];}
elseif (isset($_POST["list_id"])) {$list_id=$_POST["list_id"];}
if (isset($_GET["parked_time"])) {$parked_time=$_GET["parked_time"];}
elseif (isset($_POST["parked_time"])) {$parked_time=$_POST["parked_time"];}
if (isset($_GET["pass"])) {$pass=$_GET["pass"];}
elseif (isset($_POST["pass"])) {$pass=$_POST["pass"];}
if (isset($_GET["phone_code"])) {$phone_code=$_GET["phone_code"];}
elseif (isset($_POST["phone_code"])) {$phone_code=$_POST["phone_code"];}
if (isset($_GET["phone_number"])) {$phone_number=$_GET["phone_number"];}
elseif (isset($_POST["phone_number"])) {$phone_number=$_POST["phone_number"];}
if (isset($_GET["phone"])) {$phone=$_GET["phone"];}
elseif (isset($_POST["phone"])) {$phone=$_POST["phone"];}
if (isset($_GET["postal_code"])) {$postal_code=$_GET["postal_code"];}
elseif (isset($_POST["postal_code"])) {$postal_code=$_POST["postal_code"];}
if (isset($_GET["province"])) {$province=$_GET["province"];}
elseif (isset($_POST["province"])) {$province=$_POST["province"];}
if (isset($_GET["security"])) {$security=$_GET["security"];}
elseif (isset($_POST["security"])) {$security=$_POST["security"];}
if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];}
elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];}
if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];}
elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];}
if (isset($_GET["session_id"])) {$session_id=$_GET["session_id"];}
elseif (isset($_POST["session_id"])) {$session_id=$_POST["session_id"];}
if (isset($_GET["state"])) {$state=$_GET["state"];}
elseif (isset($_POST["state"])) {$state=$_POST["state"];}
if (isset($_GET["status"])) {$status=$_GET["status"];}
elseif (isset($_POST["status"])) {$status=$_POST["status"];}
if (isset($_GET["tsr"])) {$tsr=$_GET["tsr"];}
elseif (isset($_POST["tsr"])) {$tsr=$_POST["tsr"];}
if (isset($_GET["user"])) {$user=$_GET["user"];}
elseif (isset($_POST["user"])) {$user=$_POST["user"];}
if (isset($_GET["vendor_id"])) {$vendor_id=$_GET["vendor_id"];}
elseif (isset($_POST["vendor_id"])) {$vendor_id=$_POST["vendor_id"];}
if (isset($_GET["submit"])) {$submit=$_GET["submit"];}
elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];}
if (isset($_GET["SUBMIT"])) {$SUBMIT=$_GET["SUBMIT"];}
elseif (isset($_POST["SUBMIT"])) {$SUBMIT=$_POST["SUBMIT"];}
$STARTtime = date("U");
$TODAY = date("Y-m-d");
@@ -59,8 +98,8 @@ $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;}
if (!isset($begin_date)) {$begin_date = $TODAY;}
if (!isset($end_date)) {$end_date = $TODAY;}
#$link=mysql_connect("localhost", "cron", "1234");
#mysql_select_db("asterisk");
+1 -1
View File
@@ -8,7 +8,7 @@ require("dbconnect.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 (!isset($query_date)) {$query_date = $NOW_DATE;}
$stmt="select * from servers;";
$rslt=mysql_query($stmt, $link);
+14 -8
View File
@@ -11,18 +11,24 @@ 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"];}
$campaign=$_GET["campaign"]; if (!$campaign) {$campaign=$_POST["campaign"];}
$submit=$_GET["submit"]; if (!$submit) {$submit=$_POST["submit"];}
$SUBMIT=$_GET["SUBMIT"]; if (!$SUBMIT) {$SUBMIT=$_POST["SUBMIT"];}
if (isset($_GET["begin_date"])) {$begin_date=$_GET["begin_date"];}
elseif (isset($_POST["begin_date"])) {$begin_date=$_POST["begin_date"];}
if (isset($_GET["end_date"])) {$end_date=$_GET["end_date"];}
elseif (isset($_POST["end_date"])) {$end_date=$_POST["end_date"];}
if (isset($_GET["user"])) {$user=$_GET["user"];}
elseif (isset($_POST["user"])) {$user=$_POST["user"];}
if (isset($_GET["campaign"])) {$campaign=$_GET["campaign"];}
elseif (isset($_POST["campaign"])) {$campaign=$_POST["campaign"];}
if (isset($_GET["submit"])) {$submit=$_GET["submit"];}
elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];}
if (isset($_GET["SUBMIT"])) {$SUBMIT=$_GET["SUBMIT"];}
elseif (isset($_POST["SUBMIT"])) {$SUBMIT=$_POST["SUBMIT"];}
$STARTtime = date("U");
$TODAY = date("Y-m-d");
if (!$begin_date) {$begin_date = $TODAY;}
if (!$end_date) {$end_date = $TODAY;}
if (!isset($begin_date)) {$begin_date = $TODAY;}
if (!isset($end_date)) {$end_date = $TODAY;}
$stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 7;";
$rslt=mysql_query($stmt, $link);
+16 -9
View File
@@ -11,19 +11,26 @@ 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"];}
if (isset($_GET["begin_date"])) {$begin_date=$_GET["begin_date"];}
elseif (isset($_POST["begin_date"])) {$begin_date=$_POST["begin_date"];}
if (isset($_GET["end_date"])) {$end_date=$_GET["end_date"];}
elseif (isset($_POST["end_date"])) {$end_date=$_POST["end_date"];}
if (isset($_GET["user"])) {$user=$_GET["user"];}
elseif (isset($_POST["user"])) {$user=$_POST["user"];}
if (isset($_GET["group"])) {$group=$_GET["group"];}
elseif (isset($_POST["group"])) {$group=$_POST["group"];}
if (isset($_GET["stage"])) {$stage=$_GET["stage"];}
elseif (isset($_POST["stage"])) {$stage=$_POST["stage"];}
if (isset($_GET["submit"])) {$submit=$_GET["submit"];}
elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];}
if (isset($_GET["SUBMIT"])) {$SUBMIT=$_GET["SUBMIT"];}
elseif (isset($_POST["SUBMIT"])) {$SUBMIT=$_POST["SUBMIT"];}
$STARTtime = date("U");
$TODAY = date("Y-m-d");
if (!$begin_date) {$begin_date = $TODAY;}
if (!$end_date) {$end_date = $TODAY;}
if (!isset($begin_date)) {$begin_date = $TODAY;}
if (!isset($end_date)) {$end_date = $TODAY;}
$stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 7;";
$rslt=mysql_query($stmt, $link);
+44 -28
View File
@@ -1,36 +1,52 @@
<?
### vdremote.php
###
### Copyright (C) 2006 Matt Florell <vicidial@gmail.com> LICENSE: GPLv2
###
### Changes
### 50307-1721 - First version
### 51123-1502 - removed requirement of PHP Globals=on
###
### 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
# vdremote.php
#
# Copyright (C) 2006 Matt Florell <vicidial@gmail.com> LICENSE: GPLv2
#
# Changes
# 50307-1721 - First version
# 51123-1502 - removed requirement of PHP Globals=on
# 60421-1229 - check GET/POST vars lines with isset to not trigger PHP NOTICES
#
# 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
require("dbconnect.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"];}
if (isset($_GET["ADD"])) {$ADD=$_GET["ADD"];}
elseif (isset($_POST["ADD"])) {$ADD=$_POST["ADD"];}
if (isset($_GET["DB"])) {$DB=$_GET["DB"];}
elseif (isset($_POST["DB"])) {$DB=$_POST["DB"];}
if (isset($_GET["user"])) {$user=$_GET["user"];}
elseif (isset($_POST["user"])) {$user=$_POST["user"];}
if (isset($_GET["force_logout"])) {$force_logout=$_GET["force_logout"];}
elseif (isset($_POST["force_logout"])) {$force_logout=$_POST["force_logout"];}
if (isset($_GET["groups"])) {$groups=$_GET["groups"];}
elseif (isset($_POST["groups"])) {$groups=$_POST["groups"];}
if (isset($_GET["remote_agent_id"])) {$remote_agent_id=$_GET["remote_agent_id"];}
elseif (isset($_POST["remote_agent_id"])) {$remote_agent_id=$_POST["remote_agent_id"];}
if (isset($_GET["user_start"])) {$user_start=$_GET["user_start"];}
elseif (isset($_POST["user_start"])) {$user_start=$_POST["user_start"];}
if (isset($_GET["number_of_lines"])) {$number_of_lines=$_GET["number_of_lines"];}
elseif (isset($_POST["number_of_lines"])) {$number_of_lines=$_POST["number_of_lines"];}
if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];}
elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];}
if (isset($_GET["conf_exten"])) {$conf_exten=$_GET["conf_exten"];}
elseif (isset($_POST["conf_exten"])) {$conf_exten=$_POST["conf_exten"];}
if (isset($_GET["status"])) {$status=$_GET["status"];}
elseif (isset($_POST["status"])) {$status=$_POST["status"];}
if (isset($_GET["campaign_id"])) {$campaign_id=$_GET["campaign_id"];}
elseif (isset($_POST["campaign_id"])) {$campaign_id=$_POST["campaign_id"];}
if (isset($_GET["groups"])) {$groups=$_GET["groups"];}
elseif (isset($_POST["groups"])) {$groups=$_POST["groups"];}
if (isset($_GET["submit"])) {$submit=$_GET["submit"];}
elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];}
if (isset($_GET["SUBMIT"])) {$SUBMIT=$_GET["SUBMIT"];}
elseif (isset($_POST["SUBMIT"])) {$SUBMIT=$_POST["SUBMIT"];}
if (!isset($force_logout)) {$force_logout = 0;}
if ($force_logout)
{
@@ -45,12 +61,12 @@ if ($force_logout)
$popup_page = './closer_popup.php';
$version = '1.1.9';
$build = '51123-1502';
$version = '1.1.11';
$build = '60421-1229';
$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;}
if (!isset($query_date)) {$query_date = $NOW_DATE;}
$stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 3;";
if ($DB) {echo "|$stmt|\n";}
+60 -45
View File
@@ -29,59 +29,74 @@
###
# changes
# 50323-1147 First build of script
# 50401-1132 small formatting changes
# 50502-1402 added field_name as modifiable variable
# 50503-1213 added session_name checking for extra security
# 50503-1311 added conferences list
# 50610-1155 Added NULL check on MySQL results to reduced errors
# 50711-1209 removed HTTP authentication in favor of user/pass vars
# 50323-1147 - First build of script
# 50401-1132 - small formatting changes
# 50502-1402 - added field_name as modifiable variable
# 50503-1213 - added session_name checking for extra security
# 50503-1311 - added conferences list
# 50610-1155 - Added NULL check on MySQL results to reduced errors
# 50711-1209 - removed HTTP authentication in favor of user/pass vars
# 60421-1155 - check GET/POST vars lines with isset to not trigger PHP NOTICES
#
require("dbconnect.php");
#require_once("htglobalize.php");
### If you have globals turned off uncomment these lines
$user=$_GET["user"]; if (!$user) {$user=$_POST["user"];}
$pass=$_GET["pass"]; if (!$pass) {$pass=$_POST["pass"];}
$server_ip=$_GET["server_ip"]; if (!$server_ip) {$server_ip=$_POST["server_ip"];}
$session_name=$_GET["session_name"]; if (!$session_name) {$session_name=$_POST["session_name"];}
$ADD=$_GET["ADD"]; if (!$ADD) {$ADD=$_POST["ADD"];}
$order=$_GET["order"]; if (!$order) {$order=$_POST["order"];}
$format=$_GET["format"]; if (!$format) {$format=$_POST["format"];}
$bgcolor=$_GET["bgcolor"]; if (!$bgcolor) {$bgcolor=$_POST["bgcolor"];}
$txtcolor=$_GET["txtcolor"]; if (!$txtcolor) {$txtcolor=$_POST["txtcolor"];}
$txtsize=$_GET["txtsize"]; if (!$txtsize) {$txtsize=$_POST["txtsize"];}
$selectsize=$_GET["selectsize"]; if (!$selectsize) {$selectsize=$_POST["selectsize"];}
$selectfontsize=$_GET["selectfontsize"]; if (!$selectfontsize) {$selectfontsize=$_POST["selectfontsize"];}
$selectedext=$_GET["selectedext"]; if (!$selectedext) {$selectedext=$_POST["selectedext"];}
$selectedtrunk=$_GET["selectedtrunk"]; if (!$selectedtrunk) {$selectedtrunk=$_POST["selectedtrunk"];}
$selectedlocal=$_GET["selectedlocal"]; if (!$selectedlocal) {$selectedlocal=$_POST["selectedlocal"];}
$textareaheight=$_GET["textareaheight"]; if (!$textareaheight) {$textareaheight=$_POST["textareaheight"];}
$textareawidth=$_GET["textareawidth"]; if (!$textareawidth) {$textareawidth=$_POST["textareawidth"];}
$field_name=$_GET["field_name"]; if (!$field_name) {$field_name=$_POST["field_name"];}
if (isset($_GET["user"])) {$user=$_GET["user"];}
elseif (isset($_POST["user"])) {$user=$_POST["user"];}
if (isset($_GET["pass"])) {$pass=$_GET["pass"];}
elseif (isset($_POST["pass"])) {$pass=$_POST["pass"];}
if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];}
elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];}
if (isset($_GET["session_name"])) {$session_name=$_GET["session_name"];}
elseif (isset($_POST["session_name"])) {$session_name=$_POST["session_name"];}
if (isset($_GET["format"])) {$format=$_GET["format"];}
elseif (isset($_POST["format"])) {$format=$_POST["format"];}
if (isset($_GET["ADD"])) {$ADD=$_GET["ADD"];}
elseif (isset($_POST["ADD"])) {$ADD=$_POST["ADD"];}
if (isset($_GET["order"])) {$order=$_GET["order"];}
elseif (isset($_POST["order"])) {$order=$_POST["order"];}
if (isset($_GET["bgcolor"])) {$bgcolor=$_GET["bgcolor"];}
elseif (isset($_POST["bgcolor"])) {$bgcolor=$_POST["bgcolor"];}
if (isset($_GET["txtcolor"])) {$txtcolor=$_GET["txtcolor"];}
elseif (isset($_POST["txtcolor"])) {$txtcolor=$_POST["txtcolor"];}
if (isset($_GET["txtsize"])) {$txtsize=$_GET["txtsize"];}
elseif (isset($_POST["txtsize"])) {$txtsize=$_POST["txtsize"];}
if (isset($_GET["selectsize"])) {$selectsize=$_GET["selectsize"];}
elseif (isset($_POST["selectsize"])) {$selectsize=$_POST["selectsize"];}
if (isset($_GET["selectfontsize"])) {$selectfontsize=$_GET["selectfontsize"];}
elseif (isset($_POST["selectfontsize"])) {$selectfontsize=$_POST["selectfontsize"];}
if (isset($_GET["selectedext"])) {$selectedext=$_GET["selectedext"];}
elseif (isset($_POST["selectedext"])) {$selectedext=$_POST["selectedext"];}
if (isset($_GET["selectedtrunk"])) {$selectedtrunk=$_GET["selectedtrunk"];}
elseif (isset($_POST["selectedtrunk"])) {$selectedtrunk=$_POST["selectedtrunk"];}
if (isset($_GET["selectedlocal"])) {$selectedlocal=$_GET["selectedlocal"];}
elseif (isset($_POST["selectedlocal"])) {$selectedlocal=$_POST["selectedlocal"];}
if (isset($_GET["textareaheight"])) {$textareaheight=$_GET["textareaheight"];}
elseif (isset($_POST["textareaheight"])) {$textareaheight=$_POST["textareaheight"];}
if (isset($_GET["textareawidth"])) {$textareawidth=$_GET["textareawidth"];}
elseif (isset($_POST["textareawidth"])) {$textareawidth=$_POST["textareawidth"];}
if (isset($_GET["field_name"])) {$field_name=$_GET["field_name"];}
elseif (isset($_POST["field_name"])) {$field_name=$_POST["field_name"];}
# default optional vars if not set
if (!$ADD) {$ADD="1";}
if (!$order) {$order='desc';}
if (!$format) {$format='table';}
if (!$bgcolor) {$bgcolor='white';}
if (!$txtcolor) {$txtcolor='black';}
if (!$txtsize) {$txtsize='2';}
if (!$selectsize) {$selectsize='4';}
if (!$selectfontsize) {$selectfontsize='10';}
if (!$textareaheight) {$textareaheight='10';}
if (!$textareawidth) {$textareawidth='20';}
if (!isset($ADD)) {$ADD="1";}
if (!isset($order)) {$order='desc';}
if (!isset($format)) {$format="text";}
if (!isset($bgcolor)) {$bgcolor='white';}
if (!isset($txtcolor)) {$txtcolor='black';}
if (!isset($txtsize)) {$txtsize='2';}
if (!isset($selectsize)) {$selectsize='4';}
if (!isset($selectfontsize)) {$selectfontsize='10';}
if (!isset($textareaheight)) {$textareaheight='10';}
if (!isset($textareawidth)) {$textareawidth='20';}
$version = '0.0.6';
$build = '50711-1209';
$version = '0.0.7';
$build = '60421-1155';
$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;}
if (!isset($query_date)) {$query_date = $NOW_DATE;}
$stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;";
if ($DB) {echo "|$stmt|\n";}
@@ -89,7 +104,7 @@ if (!$query_date) {$query_date = $NOW_DATE;}
$row=mysql_fetch_row($rslt);
$auth=$row[0];
if( (strlen($user)<2) or (strlen($pass)<2) or (!$auth))
if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0))
{
echo "Invalid Username/Password: |$user|$pass|\n";
exit;
@@ -97,7 +112,7 @@ if (!$query_date) {$query_date = $NOW_DATE;}
else
{
if( ( (strlen($server_ip)<6) or (!$server_ip) ) or ( (strlen($session_name)<12) or (!$session_name) ) )
if( (strlen($server_ip)<6) or (!isset($server_ip)) or ( (strlen($session_name)<12) or (!isset($session_name)) ) )
{
echo "Invalid server_ip: |$server_ip| or Invalid session_name: |$session_name|\n";
exit;
@@ -109,7 +124,7 @@ if (!$query_date) {$query_date = $NOW_DATE;}
$rslt=mysql_query($stmt, $link);
$row=mysql_fetch_row($rslt);
$SNauth=$row[0];
if(!$SNauth)
if($SNauth==0)
{
echo "Invalid session_name: |$session_name|$server_ip|\n";
exit;
+78 -64
View File
@@ -1,80 +1,94 @@
<?
### astguiclient.php - the web-based version of the astGUIclient client application
###
### Copyright (C) 2006 Matt Florell <vicidial@gmail.com> LICENSE: GPLv2
###
### make sure you have added a user to the vicidial_users MySQL table with at least
### user_level 1 or greater to access this page. Also you need to have the login
### and pass of a phone listed in the asterisk.phones table. The page grabs the
### server info and other details from this login and pass
###
### Other scripts that this application depends on:
### - active_list_refresh.php: displays active/live channels and phones
### - manager_send.php: sends Actions to be executed on Asterisk servers
### - live_exten_check.php: checks to see if user's phone is on a live call
### - call_log_display.php: retrieves log of inbound and outbound calls
### - voicemail_check.php: retrieves counts of new and old messages
### - inbound_popup.php: opens upon live_inbound call coming in
### - conf_exten_check.php: checks to see if and calls are in a specific conf
### - park_calls_display.php: retrieves list of parked calls
### - vdc_db_query.php: Changes values in the DB for non-calling records
###
### CHANGES
### 50215-1356 - Proof-of-concept test of XMLHttpRequest for astGUIclient web
### 50323-1411 - First build version display-only
### 50331-1040 - Second-build, added phone login and hangup/hijack display
### 50401-1006 - Trunk/Local Hangup functions enabled
### 50404-1056 - Trunk/Local Hijack functions enabled
### 50404-1459 - Simple live calls display and grabs updated time from server
### 50405-1221 - Reorganized the display and layers, added some images
### 50406-1005 - Added In/Out call log display to MAIN panel
### 50407-1254 - Start/Stop Recording on live calls enabled
### 50422-1101 - Activated Check Voicemail button and new/old messages count
### 50428-1449 - Added dial from log and basic live_inbound call popup
### 50429-1455 - Modified inbound popup code for IE and to add more functions
### 50502-1442 - Added basic method to transfer live calls somewhere else
### 50503-1205 - Added web_client_sessions entry for more security of subscripts
### 50503-1537 - Added basic conferences display
### 50509-1132 - Added conference connected list and hangup/xfer for them
### 50511-1129 - Added registration of conference rooms and added manual dial
### 50523-1342 - Added Conference recording and send DTMF
### 50523-1622 - Added Local Dial window frame for calling local extensions
### 50524-1456 - Added ability to park call and display number of parked calls
### 50524-1600 - Added ability to display and pickup/hangup/xfer parked calls
### 50525-1224 - Added ability to place outbound call from within conferene
### 50531-1225 - Added ability to do dual transfers to meetme rooms from Main
### 50711-1229 - removed HTTP authentication in favor of user/pass vars
### 50711-1610 - Added Zap monitoring to Trunk/Local Action screens
### 50804-1604 - Minor bug fix in inbound_popup functions
### 50818-1715 - Added pretty login section
### 50913-1137 - Added custom outbound_cid from phones table
### 51110-1430 - Fixed non-standard http port issue
### 60103-1421 - Added code for favorite extensions chooser
### 60104-1347 - Added basic layout for favorites editing frame
### 60105-1124 - Finished Favorites frame and added DB submission
### 60112-1622 - Several formatting changes
###
# astguiclient.php - the web-based version of the astGUIclient client application
#
# Copyright (C) 2006 Matt Florell <vicidial@gmail.com> LICENSE: GPLv2
#
# make sure you have added a user to the vicidial_users MySQL table with at least
# user_level 1 or greater to access this page. Also you need to have the login
# and pass of a phone listed in the asterisk.phones table. The page grabs the
# server info and other details from this login and pass
#
# Other scripts that this application depends on:
# - active_list_refresh.php: displays active/live channels and phones
# - manager_send.php: sends Actions to be executed on Asterisk servers
# - live_exten_check.php: checks to see if user's phone is on a live call
# - call_log_display.php: retrieves log of inbound and outbound calls
# - voicemail_check.php: retrieves counts of new and old messages
# - inbound_popup.php: opens upon live_inbound call coming in
# - conf_exten_check.php: checks to see if and calls are in a specific conf
# - park_calls_display.php: retrieves list of parked calls
# - vdc_db_query.php: Changes values in the DB for non-calling records
#
# CHANGES
# 50215-1356 - Proof-of-concept test of XMLHttpRequest for astGUIclient web
# 50323-1411 - First build version display-only
# 50331-1040 - Second-build, added phone login and hangup/hijack display
# 50401-1006 - Trunk/Local Hangup functions enabled
# 50404-1056 - Trunk/Local Hijack functions enabled
# 50404-1459 - Simple live calls display and grabs updated time from server
# 50405-1221 - Reorganized the display and layers, added some images
# 50406-1005 - Added In/Out call log display to MAIN panel
# 50407-1254 - Start/Stop Recording on live calls enabled
# 50422-1101 - Activated Check Voicemail button and new/old messages count
# 50428-1449 - Added dial from log and basic live_inbound call popup
# 50429-1455 - Modified inbound popup code for IE and to add more functions
# 50502-1442 - Added basic method to transfer live calls somewhere else
# 50503-1205 - Added web_client_sessions entry for more security of subscripts
# 50503-1537 - Added basic conferences display
# 50509-1132 - Added conference connected list and hangup/xfer for them
# 50511-1129 - Added registration of conference rooms and added manual dial
# 50523-1342 - Added Conference recording and send DTMF
# 50523-1622 - Added Local Dial window frame for calling local extensions
# 50524-1456 - Added ability to park call and display number of parked calls
# 50524-1600 - Added ability to display and pickup/hangup/xfer parked calls
# 50525-1224 - Added ability to place outbound call from within conferene
# 50531-1225 - Added ability to do dual transfers to meetme rooms from Main
# 50711-1229 - removed HTTP authentication in favor of user/pass vars
# 50711-1610 - Added Zap monitoring to Trunk/Local Action screens
# 50804-1604 - Minor bug fix in inbound_popup functions
# 50818-1715 - Added pretty login section
# 50913-1137 - Added custom outbound_cid from phones table
# 51110-1430 - Fixed non-standard http port issue
# 60103-1421 - Added code for favorite extensions chooser
# 60104-1347 - Added basic layout for favorites editing frame
# 60105-1124 - Finished Favorites frame and added DB submission
# 60112-1622 - Several formatting changes
# 60421-1357 - check GET/POST vars lines with isset to not trigger PHP NOTICES
#
require("dbconnect.php");
#require_once("htglobalize.php");
### If you have globals turned off uncomment these lines
$user=$_GET["user"]; if (!$user) {$user=$_POST["user"];}
$pass=$_GET["pass"]; if (!$pass) {$pass=$_POST["pass"];}
$phone_login=$_GET["phone_login"]; if (!$phone_login) {$phone_login=$_POST["phone_login"];}
if (!$phone_login) {$phone_login=$_GET["pl"];}
$phone_pass=$_GET["phone_pass"]; if (!$phone_pass) {$phone_pass=$_POST["phone_pass"];}
if (!$phone_pass) {$phone_pass=$_GET["pp"];}
$relogin=$_GET["relogin"]; if (!$relogin) {$relogin=$_POST["relogin"];}
if (isset($_GET["user"])) {$user=$_GET["user"];}
elseif (isset($_POST["user"])) {$user=$_POST["user"];}
if (isset($_GET["pass"])) {$pass=$_GET["pass"];}
elseif (isset($_POST["pass"])) {$pass=$_POST["pass"];}
if (isset($_GET["phone_login"])) {$phone_login=$_GET["phone_login"];}
elseif (isset($_POST["phone_login"])) {$phone_login=$_POST["phone_login"];}
if (isset($_GET["phone_pass"])) {$phone_pass=$_GET["phone_pass"];}
elseif (isset($_POST["phone_pass"])) {$phone_pass=$_POST["phone_pass"];}
if (isset($_GET["relogin"])) {$relogin=$_GET["relogin"];}
elseif (isset($_POST["relogin"])) {$relogin=$_POST["relogin"];}
if (!isset($phone_login))
{
if (isset($_GET["pl"])) {$phone_login=$_GET["pl"];}
elseif (isset($_POST["pl"])) {$phone_login=$_POST["pl"];}
}
if (!isset($phone_pass))
{
if (isset($_GET["pp"])) {$phone_pass=$_GET["pp"];}
elseif (isset($_POST["pp"])) {$phone_pass=$_POST["pp"];}
}
$forever_stop=0;
$user_abb = "$user$user$user$user";
while ( (strlen($user_abb) > 4) and ($forever_stop < 200) )
{$user_abb = eregi_replace("^.","",$user_abb); $forever_stop++;}
$version = '1.1.9';
$build = '60112-1622';
$version = '1.1.11';
$build = '60421-1357';
if ($force_logout)
{
+30 -25
View File
@@ -20,41 +20,46 @@
###
# changes
# 50406-1013 First build of script
# 50407-1452 Added definable limits
# 50503-1236 added session_name checking for extra security
# 50610-1158 Added NULL check on MySQL results to reduced errors
# 50711-1202 removed HTTP authentication in favor of user/pass vars
# 60323-1550 added option for showing different number dialed in log
# 50406-1013 - First build of script
# 50407-1452 - Added definable limits
# 50503-1236 - added session_name checking for extra security
# 50610-1158 - Added NULL check on MySQL results to reduced errors
# 50711-1202 - removed HTTP authentication in favor of user/pass vars
# 60323-1550 - added option for showing different number dialed in log
# 60421-1401 - check GET/POST vars lines with isset to not trigger PHP NOTICES
#
require("dbconnect.php");
#require_once("htglobalize.php");
### If you have globals turned off uncomment these lines
$user=$_GET["user"]; if (!$user) {$user=$_POST["user"];}
$pass=$_GET["pass"]; if (!$pass) {$pass=$_POST["pass"];}
$server_ip=$_GET["server_ip"]; if (!$server_ip) {$server_ip=$_POST["server_ip"];}
$session_name=$_GET["session_name"]; if (!$session_name) {$session_name=$_POST["session_name"];}
$format=$_GET["format"]; if (!$format) {$format=$_POST["format"];}
$exten=$_GET["exten"]; if (!$exten) {$exten=$_POST["exten"];}
$protocol=$_GET["protocol"]; if (!$protocol) {$protocol=$_POST["protocol"];}
if (isset($_GET["user"])) {$user=$_GET["user"];}
elseif (isset($_POST["user"])) {$user=$_POST["user"];}
if (isset($_GET["pass"])) {$pass=$_GET["pass"];}
elseif (isset($_POST["pass"])) {$pass=$_POST["pass"];}
if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];}
elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];}
if (isset($_GET["session_name"])) {$session_name=$_GET["session_name"];}
elseif (isset($_POST["session_name"])) {$session_name=$_POST["session_name"];}
if (isset($_GET["format"])) {$format=$_GET["format"];}
elseif (isset($_POST["format"])) {$format=$_POST["format"];}
if (isset($_GET["exten"])) {$exten=$_GET["exten"];}
elseif (isset($_POST["exten"])) {$exten=$_POST["exten"];}
if (isset($_GET["protocol"])) {$protocol=$_GET["protocol"];}
elseif (isset($_POST["protocol"])) {$protocol=$_POST["protocol"];}
# default optional vars if not set
if (!$format) {$format="text";}
if (!$in_limit) {$in_limit="100";}
if (!$out_limit) {$out_limit="100";}
if (!isset($format)) {$format="text";}
if (!isset($in_limit)) {$in_limit="100";}
if (!isset($out_limit)) {$out_limit="100";}
$number_dialed = 'number_dialed';
#$number_dialed = 'extension';
$version = '0.0.6';
$build = '60323-1550';
$version = '0.0.7';
$build = '60421-1401';
$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;}
if (!isset($query_date)) {$query_date = $NOW_DATE;}
$stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;";
if ($DB) {echo "|$stmt|\n";}
@@ -62,7 +67,7 @@ if (!$query_date) {$query_date = $NOW_DATE;}
$row=mysql_fetch_row($rslt);
$auth=$row[0];
if( (strlen($user)<2) or (strlen($pass)<2) or (!$auth))
if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0))
{
echo "Invalid Username/Password: |$user|$pass|\n";
exit;
@@ -70,7 +75,7 @@ if (!$query_date) {$query_date = $NOW_DATE;}
else
{
if( ( (strlen($server_ip)<6) or (!$server_ip) ) or ( (strlen($session_name)<12) or (!$session_name) ) )
if( (strlen($server_ip)<6) or (!isset($server_ip)) or ( (strlen($session_name)<12) or (!isset($session_name)) ) )
{
echo "Invalid server_ip: |$server_ip| or Invalid session_name: |$session_name|\n";
exit;
@@ -82,7 +87,7 @@ if (!$query_date) {$query_date = $NOW_DATE;}
$rslt=mysql_query($stmt, $link);
$row=mysql_fetch_row($rslt);
$SNauth=$row[0];
if(!$SNauth)
if($SNauth==0)
{
echo "Invalid session_name: |$session_name|$server_ip|\n";
exit;
+61 -50
View File
@@ -1,65 +1,76 @@
<?
### conf_exten_check.php
###
### Copyright (C) 2006 Matt Florell <vicidial@gmail.com> LICENSE: GPLv2
###
### This script is designed purely to send whether the meetme conference has live channels connected and which they are
### This script depends on the server_ip being sent and also needs to have a valid user/pass from the vicidial_users table
###
### required variables:
### - $server_ip
### - $session_name
### - $user
### - $pass
### optional variables:
### - $format - ('text','debug')
### - $ACTION - ('refresh','register')
### - $client - ('agc','vdc')
### - $conf_exten - ('8600011',...)
### - $exten - ('123test',...)
### - $auto_dial_level - ('0','1','1.2',...)
###
# conf_exten_check.php
#
# Copyright (C) 2006 Matt Florell <vicidial@gmail.com> LICENSE: GPLv2
#
# This script is designed purely to send whether the meetme conference has live channels connected and which they are
# This script depends on the server_ip being sent and also needs to have a valid user/pass from the vicidial_users table
#
# required variables:
# - $server_ip
# - $session_name
# - $user
# - $pass
# optional variables:
# - $format - ('text','debug')
# - $ACTION - ('refresh','register')
# - $client - ('agc','vdc')
# - $conf_exten - ('8600011',...)
# - $exten - ('123test',...)
# - $auto_dial_level - ('0','1','1.2',...)
# - $campagentstdisp - ('YES',...)
#
# changes
# 50509-1054 First build of script
# 50511-1112 Added ability to register a conference room
# 50610-1159 Added NULL check on MySQL results to reduced errors
# 50706-1429 script changed to not use HTTP login vars, user/pass instead
# 50706-1525 Added date-time display for vicidial client display
# 50816-1500 Added random update to vicidial_live_agents table for vdc users
# 51121-1353 Altered echo statements for several small PHP speed optimizations
# 60410-1424 Added ability to grab calls-being-placed and agent status
# 50509-1054 - First build of script
# 50511-1112 - Added ability to register a conference room
# 50610-1159 - Added NULL check on MySQL results to reduced errors
# 50706-1429 - script changed to not use HTTP login vars, user/pass instead
# 50706-1525 - Added date-time display for vicidial client display
# 50816-1500 - Added random update to vicidial_live_agents table for vdc users
# 51121-1353 - Altered echo statements for several small PHP speed optimizations
# 60410-1424 - Added ability to grab calls-being-placed and agent status
# 60421-1405 - check GET/POST vars lines with isset to not trigger PHP NOTICES
#
require("dbconnect.php");
#require_once("htglobalize.php");
### If you have globals turned off uncomment these lines
$user=$_GET["user"]; if (!$user) {$user=$_POST["user"];}
$pass=$_GET["pass"]; if (!$pass) {$pass=$_POST["pass"];}
$server_ip=$_GET["server_ip"]; if (!$server_ip) {$server_ip=$_POST["server_ip"];}
$session_name=$_GET["session_name"]; if (!$session_name) {$session_name=$_POST["session_name"];}
$format=$_GET["format"]; if (!$format) {$format=$_POST["format"];}
$ACTION=$_GET["ACTION"]; if (!$ACTION) {$ACTION=$_POST["ACTION"];}
$client=$_GET["client"]; if (!$client) {$client=$_POST["client"];}
$conf_exten=$_GET["conf_exten"]; if (!$conf_exten) {$conf_exten=$_POST["conf_exten"];}
$exten=$_GET["exten"]; if (!$exten) {$exten=$_POST["exten"];}
$auto_dial_level=$_GET["auto_dial_level"]; if (!$auto_dial_level) {$auto_dial_level=$_POST["auto_dial_level"];}
$campagentstdisp=$_GET["campagentstdisp"]; if (!$campagentstdisp) {$campagentstdisp=$_POST["campagentstdisp"];}
if (isset($_GET["user"])) {$user=$_GET["user"];}
elseif (isset($_POST["user"])) {$user=$_POST["user"];}
if (isset($_GET["pass"])) {$pass=$_GET["pass"];}
elseif (isset($_POST["pass"])) {$pass=$_POST["pass"];}
if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];}
elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];}
if (isset($_GET["session_name"])) {$session_name=$_GET["session_name"];}
elseif (isset($_POST["session_name"])) {$session_name=$_POST["session_name"];}
if (isset($_GET["format"])) {$format=$_GET["format"];}
elseif (isset($_POST["format"])) {$format=$_POST["format"];}
if (isset($_GET["ACTION"])) {$ACTION=$_GET["ACTION"];}
elseif (isset($_POST["ACTION"])) {$ACTION=$_POST["ACTION"];}
if (isset($_GET["client"])) {$client=$_GET["client"];}
elseif (isset($_POST["client"])) {$client=$_POST["client"];}
if (isset($_GET["conf_exten"])) {$conf_exten=$_GET["conf_exten"];}
elseif (isset($_POST["conf_exten"])) {$conf_exten=$_POST["conf_exten"];}
if (isset($_GET["exten"])) {$exten=$_GET["exten"];}
elseif (isset($_POST["exten"])) {$exten=$_POST["exten"];}
if (isset($_GET["auto_dial_level"])) {$auto_dial_level=$_GET["auto_dial_level"];}
elseif (isset($_POST["auto_dial_level"])) {$auto_dial_level=$_POST["auto_dial_level"];}
if (isset($_GET["campagentstdisp"])) {$campagentstdisp=$_GET["campagentstdisp"];}
elseif (isset($_POST["campagentstdisp"])) {$campagentstdisp=$_POST["campagentstdisp"];}
# default optional vars if not set
if (!$format) {$format="text";}
if (!$ACTION) {$ACTION="refresh";}
if (!$client) {$client="agc";}
if (!isset($format)) {$format="text";}
if (!isset($ACTION)) {$ACTION="refresh";}
if (!isset($client)) {$client="agc";}
$version = '0.0.7';
$build = '51121-1353';
$version = '0.0.8';
$build = '60421-1405';
$StarTtime = date("U");
$NOW_DATE = date("Y-m-d");
$NOW_TIME = date("Y-m-d H:i:s");
$FILE_TIME = date("Ymd_His");
if (!$query_date) {$query_date = $NOW_DATE;}
if (!isset($query_date)) {$query_date = $NOW_DATE;}
$random = (rand(1000000, 9999999) + 10000000);
@@ -69,7 +80,7 @@ $random = (rand(1000000, 9999999) + 10000000);
$row=mysql_fetch_row($rslt);
$auth=$row[0];
if( (strlen($user)<2) or (strlen($pass)<2) or (!$auth))
if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0))
{
echo "Invalid Username/Password: |$user|$pass|\n";
exit;
@@ -77,7 +88,7 @@ $random = (rand(1000000, 9999999) + 10000000);
else
{
if( ( (strlen($server_ip)<6) or (!$server_ip) ) or ( (strlen($session_name)<12) or (!$session_name) ) )
if( (strlen($server_ip)<6) or (!isset($server_ip)) or ( (strlen($session_name)<12) or (!isset($session_name)) ) )
{
echo "Invalid server_ip: |$server_ip| or Invalid session_name: |$session_name|\n";
exit;
@@ -89,7 +100,7 @@ $random = (rand(1000000, 9999999) + 10000000);
$rslt=mysql_query($stmt, $link);
$row=mysql_fetch_row($rslt);
$SNauth=$row[0];
if(!$SNauth)
if($SNauth==0)
{
echo "Invalid session_name: |$session_name|$server_ip|\n";
exit;
+3 -3
View File
@@ -1,7 +1,7 @@
<?
###
### Copyright (C) 2006 Matt Florell <vicidial@gmail.com> LICENSE: GPLv2
###
#
# Copyright (C) 2006 Matt Florell <vicidial@gmail.com> LICENSE: GPLv2
#
$link=mysql_connect("localhost", "cron", "1234");
mysql_select_db("asterisk");
+39 -28
View File
@@ -24,42 +24,53 @@
###
# changes
# 50428-1500 First build of script display only
# 50429-1241 some formatting, hangup and Vmail redirect, 30s timeout on actions, and CID web lookup links
# 50503-1244 added session_name checking for extra security
# 50711-1203 removed HTTP authentication in favor of user/pass vars
# 50428-1500 - First build of script display only
# 50429-1241 - some formatting, hangup and Vmail redirect, 30s timeout on actions, and CID web lookup links
# 50503-1244 - added session_name checking for extra security
# 50711-1203 - removed HTTP authentication in favor of user/pass vars
# 60421-1043 - check GET/POST vars lines with isset to not trigger PHP NOTICES
#
require("dbconnect.php");
#require_once("htglobalize.php");
### If you have globals turned off uncomment these lines
$user=$_GET["user"]; if (!$user) {$user=$_POST["user"];}
$pass=$_GET["pass"]; if (!$pass) {$pass=$_POST["pass"];}
$server_ip=$_GET["server_ip"]; if (!$server_ip) {$server_ip=$_POST["server_ip"];}
$session_name=$_GET["session_name"]; if (!$session_name) {$session_name=$_POST["session_name"];}
$uniqueid=$_GET["uniqueid"]; if (!$uniqueid) {$uniqueid=$_POST["uniqueid"];}
$format=$_GET["format"]; if (!$format) {$format=$_POST["format"];}
$exten=$_GET["exten"]; if (!$exten) {$exten=$_POST["exten"];}
$vmail_box=$_GET["vmail_box"]; if (!$vmail_box) {$vmail_box=$_POST["vmail_box"];}
$ext_context=$_GET["ext_context"]; if (!$ext_context) {$ext_context=$_POST["ext_context"];}
$ext_priority=$_GET["ext_priority"]; if (!$ext_priority) {$ext_priority=$_POST["ext_priority"];}
$voicemail_dump_exten=$_GET["voicemail_dump_exten"]; if (!$voicemail_dump_exten)
{$voicemail_dump_exten=$_POST["voicemail_dump_exten"];}
$local_web_callerID_URL_enc=$_GET["local_web_callerID_URL_enc"]; if (!$local_web_callerID_URL_enc)
{$local_web_callerID_URL_enc=$_POST["local_web_callerID_URL_enc"];}
$local_web_callerID_URL = rawurldecode($local_web_callerID_URL_enc);
if (isset($_GET["user"])) {$user=$_GET["user"];}
elseif (isset($_POST["user"])) {$user=$_POST["user"];}
if (isset($_GET["pass"])) {$pass=$_GET["pass"];}
elseif (isset($_POST["pass"])) {$pass=$_POST["pass"];}
if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];}
elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];}
if (isset($_GET["session_name"])) {$session_name=$_GET["session_name"];}
elseif (isset($_POST["session_name"])) {$session_name=$_POST["session_name"];}
if (isset($_GET["uniqueid"])) {$uniqueid=$_GET["uniqueid"];}
elseif (isset($_POST["uniqueid"])) {$uniqueid=$_POST["uniqueid"];}
if (isset($_GET["format"])) {$format=$_GET["format"];}
elseif (isset($_POST["format"])) {$format=$_POST["format"];}
if (isset($_GET["exten"])) {$exten=$_GET["exten"];}
elseif (isset($_POST["exten"])) {$exten=$_POST["exten"];}
if (isset($_GET["vmail_box"])) {$vmail_box=$_GET["vmail_box"];}
elseif (isset($_POST["vmail_box"])) {$vmail_box=$_POST["vmail_box"];}
if (isset($_GET["ext_context"])) {$ext_context=$_GET["ext_context"];}
elseif (isset($_POST["ext_context"])) {$ext_context=$_POST["ext_context"];}
if (isset($_GET["ext_priority"])) {$ext_priority=$_GET["ext_priority"];}
elseif (isset($_POST["ext_priority"])) {$ext_priority=$_POST["ext_priority"];}
if (isset($_GET["voicemail_dump_exten"])) {$voicemail_dump_exten=$_GET["voicemail_dump_exten"];}
elseif (isset($_POST["voicemail_dump_exten"])) {$voicemail_dump_exten=$_POST["voicemail_dump_exten"];}
if (isset($_GET["local_web_callerID_URL_enc"])) {$local_web_callerID_URL_enc=$_GET["local_web_callerID_URL_enc"];}
elseif (isset($_POST["local_web_callerID_URL_enc"])) {$local_web_callerID_URL_enc=$_POST["local_web_callerID_URL_enc"];}
if (isset($_GET["local_web_callerID_URL_enc"])) {$local_web_callerID_URL = rawurldecode($local_web_callerID_URL_enc);}
else {$local_web_callerID_URL = '';}
# default optional vars if not set
if (!$format) {$format="text";}
if (!isset($format)) {$format="text";}
$version = '0.0.4';
$build = '50711-1203';
$version = '0.0.5';
$build = '60421-1043';
$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;}
if (!isset($query_date)) {$query_date = $NOW_DATE;}
$DO = '-1';
if ( (eregi("^Zap",$channel)) and (!eregi("-",$channel)) ) {$channel = "$channel$DO";}
@@ -69,7 +80,7 @@ if ( (eregi("^Zap",$channel)) and (!eregi("-",$channel)) ) {$channel = "$channel
$row=mysql_fetch_row($rslt);
$auth=$row[0];
if( (strlen($user)<2) or (strlen($pass)<2) or (!$auth))
if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0))
{
echo "Invalid Username/Password: |$user|$pass|\n";
exit;
@@ -77,7 +88,7 @@ if ( (eregi("^Zap",$channel)) and (!eregi("-",$channel)) ) {$channel = "$channel
else
{
if( ( (strlen($server_ip)<6) or (!$server_ip) ) or ( (strlen($session_name)<12) or (!$session_name) ) )
if( (strlen($server_ip)<6) or (!isset($server_ip)) or ( (strlen($session_name)<12) or (!isset($session_name)) ) )
{
echo "Invalid server_ip: |$server_ip| or Invalid session_name: |$session_name|\n";
exit;
@@ -89,7 +100,7 @@ if ( (eregi("^Zap",$channel)) and (!eregi("-",$channel)) ) {$channel = "$channel
$rslt=mysql_query($stmt, $link);
$row=mysql_fetch_row($rslt);
$SNauth=$row[0];
if(!$SNauth)
if($SNauth==0)
{
echo "Invalid session_name: |$session_name|$server_ip|\n";
exit;
+34 -26
View File
@@ -18,40 +18,48 @@
###
# changes
# 50404-1249 First build of script
# 50406-1402 added connected trunk lookup
# 50428-1452 added live_inbound check for exten on 2nd line of output
# 50503-1233 added session_name checking for extra security
# 50524-1429 added parked calls count
# 50610-1204 Added NULL check on MySQL results to reduced errors
# 50711-1204 removed HTTP authentication in favor of user/pass vars
# 60103-1541 added favorite extens status display
# 50404-1249 - First build of script
# 50406-1402 - added connected trunk lookup
# 50428-1452 - added live_inbound check for exten on 2nd line of output
# 50503-1233 - added session_name checking for extra security
# 50524-1429 - added parked calls count
# 50610-1204 - Added NULL check on MySQL results to reduced errors
# 50711-1204 - removed HTTP authentication in favor of user/pass vars
# 60103-1541 - added favorite extens status display
# 60421-1359 - check GET/POST vars lines with isset to not trigger PHP NOTICES
#
require("dbconnect.php");
#require_once("htglobalize.php");
### If you have globals turned off uncomment these lines
$user=$_GET["user"]; if (!$user) {$user=$_POST["user"];}
$pass=$_GET["pass"]; if (!$pass) {$pass=$_POST["pass"];}
$server_ip=$_GET["server_ip"]; if (!$server_ip) {$server_ip=$_POST["server_ip"];}
$session_name=$_GET["session_name"]; if (!$session_name) {$session_name=$_POST["session_name"];}
$format=$_GET["format"]; if (!$format) {$format=$_POST["format"];}
$exten=$_GET["exten"]; if (!$exten) {$exten=$_POST["exten"];}
$protocol=$_GET["protocol"]; if (!$protocol) {$protocol=$_POST["protocol"];}
$favorites_count=$_GET["favorites_count"]; if (!$favorites_count) {$favorites_count=$_POST["favorites_count"];}
$favorites_list=$_GET["favorites_list"]; if (!$favorites_list) {$favorites_list=$_POST["favorites_list"];}
if (isset($_GET["user"])) {$user=$_GET["user"];}
elseif (isset($_POST["user"])) {$user=$_POST["user"];}
if (isset($_GET["pass"])) {$pass=$_GET["pass"];}
elseif (isset($_POST["pass"])) {$pass=$_POST["pass"];}
if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];}
elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];}
if (isset($_GET["session_name"])) {$session_name=$_GET["session_name"];}
elseif (isset($_POST["session_name"])) {$session_name=$_POST["session_name"];}
if (isset($_GET["format"])) {$format=$_GET["format"];}
elseif (isset($_POST["format"])) {$format=$_POST["format"];}
if (isset($_GET["exten"])) {$exten=$_GET["exten"];}
elseif (isset($_POST["exten"])) {$exten=$_POST["exten"];}
if (isset($_GET["protocol"])) {$protocol=$_GET["protocol"];}
elseif (isset($_POST["protocol"])) {$protocol=$_POST["protocol"];}
if (isset($_GET["favorites_count"])) {$favorites_count=$_GET["favorites_count"];}
elseif (isset($_POST["favorites_count"])) {$favorites_count=$_POST["favorites_count"];}
if (isset($_GET["favorites_list"])) {$favorites_list=$_GET["favorites_list"];}
elseif (isset($_POST["favorites_list"])) {$favorites_list=$_POST["favorites_list"];}
# default optional vars if not set
if (!$format) {$format="text";}
if (!isset($format)) {$format="text";}
$version = '1.1.9';
$build = '60103-1541';
$version = '1.1.11';
$build = '60421-1359';
$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;}
if (!isset($query_date)) {$query_date = $NOW_DATE;}
$stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;";
if ($DB) {echo "|$stmt|\n";}
@@ -59,7 +67,7 @@ if (!$query_date) {$query_date = $NOW_DATE;}
$row=mysql_fetch_row($rslt);
$auth=$row[0];
if( (strlen($user)<2) or (strlen($pass)<2) or (!$auth))
if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0))
{
echo "Invalid Username/Password: |$user|$pass|\n";
exit;
@@ -67,7 +75,7 @@ if (!$query_date) {$query_date = $NOW_DATE;}
else
{
if( ( (strlen($server_ip)<6) or (!$server_ip) ) or ( (strlen($session_name)<12) or (!$session_name) ) )
if( (strlen($server_ip)<6) or (!isset($server_ip)) or ( (strlen($session_name)<12) or (!isset($session_name)) ) )
{
echo "Invalid server_ip: |$server_ip| or Invalid session_name: |$session_name|\n";
exit;
@@ -79,7 +87,7 @@ if (!$query_date) {$query_date = $NOW_DATE;}
$rslt=mysql_query($stmt, $link);
$row=mysql_fetch_row($rslt);
$SNauth=$row[0];
if(!$SNauth)
if($SNauth==0)
{
echo "Invalid session_name: |$session_name|$server_ip|\n";
exit;
+115 -94
View File
@@ -1,107 +1,128 @@
<?
### manager_send.php
###
### Copyright (C) 2006 Matt Florell <vicidial@gmail.com> LICENSE: GPLv2
###
### This script is designed purely to insert records into the vicidial_manager table to signal Actions to an asterisk server
### This script depends on the server_ip being sent and also needs to have a valid user/pass from the vicidial_users table
###
### required variables:
### - $server_ip
### - $session_name
### - $user
### - $pass
### optional variables:
### - $ACTION - ('Originate','Redirect','Hangup','Command','Monitor','StopMonitor','SysCIDOriginate','RedirectName','RedirectNameVmail','MonitorConf','StopMonitorConf','RedirectXtra','RedirectVD','HangupConfDial')
### - $queryCID - ('CN012345678901234567',...)
### - $format - ('text','debug')
### - $channel - ('Zap/41-1','SIP/test101-1jut','IAX2/iaxy@iaxy',...)
### - $exten - ('1234','913125551212',...)
### - $ext_context - ('default','demo',...)
### - $ext_priority - ('1','2',...)
### - $filename - ('20050406-125623_44444',...)
### - $extenName - ('phone100',...)
### - $parkedby - ('phone100',...)
### - $extrachannel - ('Zap/41-1','SIP/test101-1jut','IAX2/iaxy@iaxy',...)
### - $auto_dial_level - ('0','1','1.1',...)
### - $campaign - ('CLOSER','TESTCAMP',...)
### - $uniqueid - ('1120232758.2406800',...)
### - $lead_id - ('1234',...)
### - $seconds - ('32',...)
### - $outbound_cid - ('3125551212','0000000000',...)
### - $agent_log_id - ('123456',...)
### - $call_server_ip - ('10.10.10.15',...)
### - $CalLCID - ('VD01234567890123456',...)
###
# changes
# 50401-1002 First build of script, Hangup function only
# 50404-1045 Redirect basic function enabled
# 50406-1522 Monitor basic function enabled
# 50407-1647 Monitor and StopMonitor full functions enabled
# 50422-1120 basic Originate function enabled
# 50428-1451 basic SysCIDOriginate function enabled for checking voicemail
# 50502-1539 basic RedirectName and RedirectNameVmail added
# 50503-1227 added session_name checking for extra security
# 50523-1341 added Conference call start/stop recording
# 50523-1421 added OriginateName and OriginateNameVmail for local calls
# 50524-1602 added RedirectToPark and RedirectFromPark
# 50531-1203 added RedirecXtra for dual channel redirection
# 50630-1100 script changed to not use HTTP login vars, user/pass instead
# 50804-1148 Added RedirectVD for VICIDIAL blind redirection with logging
# 50815-1204 Added NEXTAVAILABLE to RedirectXtra function
# 50903-2343 Added HangupConfDial function to hangup in-dial channels in conf
# 50913-1057 Added outbound_cid set if present to originate call
# 51020-1556 Added agent_log_id framework for detailed agent activity logging
# 51118-1204 Fixed Blind transfer bug from VICIDIAL when in manual dial mode
# 51129-1014 Added ability to accept calls from other VICIDIAL servers
# 51129-1253 Fixed Hangups of other agents channels in VICIDIAL AD
# 60310-2022 Fixed NEXTAVAILABLE bug in leave-3way-call redirect function
# manager_send.php
#
# Copyright (C) 2006 Matt Florell <vicidial@gmail.com> LICENSE: GPLv2
#
# This script is designed purely to insert records into the vicidial_manager table to signal Actions to an asterisk server
# This script depends on the server_ip being sent and also needs to have a valid user/pass from the vicidial_users table
#
# required variables:
# - $server_ip
# - $session_name
# - $user
# - $pass
# optional variables:
# - $ACTION - ('Originate','Redirect','Hangup','Command','Monitor','StopMonitor','SysCIDOriginate','RedirectName','RedirectNameVmail','MonitorConf','StopMonitorConf','RedirectXtra','RedirectVD','HangupConfDial')
# - $queryCID - ('CN012345678901234567',...)
# - $format - ('text','debug')
# - $channel - ('Zap/41-1','SIP/test101-1jut','IAX2/iaxy@iaxy',...)
# - $exten - ('1234','913125551212',...)
# - $ext_context - ('default','demo',...)
# - $ext_priority - ('1','2',...)
# - $filename - ('20050406-125623_44444',...)
# - $extenName - ('phone100',...)
# - $parkedby - ('phone100',...)
# - $extrachannel - ('Zap/41-1','SIP/test101-1jut','IAX2/iaxy@iaxy',...)
# - $auto_dial_level - ('0','1','1.1',...)
# - $campaign - ('CLOSER','TESTCAMP',...)
# - $uniqueid - ('1120232758.2406800',...)
# - $lead_id - ('1234',...)
# - $seconds - ('32',...)
# - $outbound_cid - ('3125551212','0000000000',...)
# - $agent_log_id - ('123456',...)
# - $call_server_ip - ('10.10.10.15',...)
# - $CalLCID - ('VD01234567890123456',...)
#
# changes
# 50401-1002 - First build of script, Hangup function only
# 50404-1045 - Redirect basic function enabled
# 50406-1522 - Monitor basic function enabled
# 50407-1647 - Monitor and StopMonitor full functions enabled
# 50422-1120 - basic Originate function enabled
# 50428-1451 - basic SysCIDOriginate function enabled for checking voicemail
# 50502-1539 - basic RedirectName and RedirectNameVmail added
# 50503-1227 - added session_name checking for extra security
# 50523-1341 - added Conference call start/stop recording
# 50523-1421 - added OriginateName and OriginateNameVmail for local calls
# 50524-1602 - added RedirectToPark and RedirectFromPark
# 50531-1203 - added RedirecXtra for dual channel redirection
# 50630-1100 - script changed to not use HTTP login vars, user/pass instead
# 50804-1148 - Added RedirectVD for VICIDIAL blind redirection with logging
# 50815-1204 - Added NEXTAVAILABLE to RedirectXtra function
# 50903-2343 - Added HangupConfDial function to hangup in-dial channels in conf
# 50913-1057 - Added outbound_cid set if present to originate call
# 51020-1556 - Added agent_log_id framework for detailed agent activity logging
# 51118-1204 - Fixed Blind transfer bug from VICIDIAL when in manual dial mode
# 51129-1014 - Added ability to accept calls from other VICIDIAL servers
# 51129-1253 - Fixed Hangups of other agents channels in VICIDIAL AD
# 60310-2022 - Fixed NEXTAVAILABLE bug in leave-3way-call redirect function
# 60421-1413 - check GET/POST vars lines with isset to not trigger PHP NOTICES
#
require("dbconnect.php");
#require_once("htglobalize.php");
### These are variable assignments for PHP globals off
$user=$_GET["user"]; if (!$user) {$user=$_POST["user"];}
$pass=$_GET["pass"]; if (!$pass) {$pass=$_POST["pass"];}
$server_ip=$_GET["server_ip"]; if (!$server_ip) {$server_ip=$_POST["server_ip"];}
$session_name=$_GET["session_name"]; if (!$session_name) {$session_name=$_POST["session_name"];}
$ACTION=$_GET["ACTION"]; if (!$ACTION) {$ACTION=$_POST["ACTION"];}
$queryCID=$_GET["queryCID"]; if (!$queryCID) {$queryCID=$_POST["queryCID"];}
$format=$_GET["format"]; if (!$format) {$format=$_POST["format"];}
$channel=$_GET["channel"]; if (!$channel) {$channel=$_POST["channel"];}
$exten=$_GET["exten"]; if (!$exten) {$exten=$_POST["exten"];}
$ext_context=$_GET["ext_context"]; if (!$ext_context) {$ext_context=$_POST["ext_context"];}
$ext_priority=$_GET["ext_priority"]; if (!$ext_priority) {$ext_priority=$_POST["ext_priority"];}
$filename=$_GET["filename"]; if (!$filename) {$filename=$_POST["filename"];}
$extenName=$_GET["extenName"]; if (!$extenName) {$extenName=$_POST["extenName"];}
$parkedby=$_GET["parkedby"]; if (!$parkedby) {$parkedby=$_POST["parkedby"];}
$extrachannel=$_GET["extrachannel"]; if (!$extrachannel) {$extrachannel=$_POST["extrachannel"];}
$auto_dial_level=$_GET["auto_dial_level"]; if (!$auto_dial_level) {$auto_dial_level=$_POST["auto_dial_level"];}
$campaign=$_GET["campaign"]; if (!$campaign) {$campaign=$_POST["campaign"];}
$uniqueid=$_GET["uniqueid"]; if (!$uniqueid) {$uniqueid=$_POST["uniqueid"];}
$lead_id=$_GET["lead_id"]; if (!$lead_id) {$lead_id=$_POST["lead_id"];}
$secondS=$_GET["secondS"]; if (!$secondS) {$secondS=$_POST["secondS"];}
$outbound_cid=$_GET["outbound_cid"]; if (!$outbound_cid) {$outbound_cid=$_POST["outbound_cid"];}
$agent_log_id=$_GET["agent_log_id"]; if (!$agent_log_id) {$agent_log_id=$_POST["agent_log_id"];}
$call_server_ip=$_GET["call_server_ip"]; if (!$call_server_ip) {$call_server_ip=$_POST["call_server_ip"];}
$CalLCID=$_GET["CalLCID"]; if (!$CalLCID) {$CalLCID=$_POST["CalLCID"];}
if (isset($_GET["user"])) {$user=$_GET["user"];}
elseif (isset($_POST["user"])) {$user=$_POST["user"];}
if (isset($_GET["pass"])) {$pass=$_GET["pass"];}
elseif (isset($_POST["pass"])) {$pass=$_POST["pass"];}
if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];}
elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];}
if (isset($_GET["session_name"])) {$session_name=$_GET["session_name"];}
elseif (isset($_POST["session_name"])) {$session_name=$_POST["session_name"];}
if (isset($_GET["ACTION"])) {$ACTION=$_GET["ACTION"];}
elseif (isset($_POST["ACTION"])) {$ACTION=$_POST["ACTION"];}
if (isset($_GET["queryCID"])) {$queryCID=$_GET["queryCID"];}
elseif (isset($_POST["queryCID"])) {$queryCID=$_POST["queryCID"];}
if (isset($_GET["format"])) {$format=$_GET["format"];}
elseif (isset($_POST["format"])) {$format=$_POST["format"];}
if (isset($_GET["channel"])) {$channel=$_GET["channel"];}
elseif (isset($_POST["channel"])) {$channel=$_POST["channel"];}
if (isset($_GET["exten"])) {$exten=$_GET["exten"];}
elseif (isset($_POST["exten"])) {$exten=$_POST["exten"];}
if (isset($_GET["ext_context"])) {$ext_context=$_GET["ext_context"];}
elseif (isset($_POST["ext_context"])) {$ext_context=$_POST["ext_context"];}
if (isset($_GET["ext_priority"])) {$ext_priority=$_GET["ext_priority"];}
elseif (isset($_POST["ext_priority"])) {$ext_priority=$_POST["ext_priority"];}
if (isset($_GET["filename"])) {$filename=$_GET["filename"];}
elseif (isset($_POST["filename"])) {$filename=$_POST["filename"];}
if (isset($_GET["extenName"])) {$extenName=$_GET["extenName"];}
elseif (isset($_POST["extenName"])) {$extenName=$_POST["extenName"];}
if (isset($_GET["parkedby"])) {$parkedby=$_GET["parkedby"];}
elseif (isset($_POST["parkedby"])) {$parkedby=$_POST["parkedby"];}
if (isset($_GET["extrachannel"])) {$extrachannel=$_GET["extrachannel"];}
elseif (isset($_POST["extrachannel"])) {$extrachannel=$_POST["extrachannel"];}
if (isset($_GET["auto_dial_level"])) {$auto_dial_level=$_GET["auto_dial_level"];}
elseif (isset($_POST["auto_dial_level"])) {$auto_dial_level=$_POST["auto_dial_level"];}
if (isset($_GET["campaign"])) {$campaign=$_GET["campaign"];}
elseif (isset($_POST["campaign"])) {$campaign=$_POST["campaign"];}
if (isset($_GET["uniqueid"])) {$uniqueid=$_GET["uniqueid"];}
elseif (isset($_POST["uniqueid"])) {$uniqueid=$_POST["uniqueid"];}
if (isset($_GET["lead_id"])) {$lead_id=$_GET["lead_id"];}
elseif (isset($_POST["lead_id"])) {$lead_id=$_POST["lead_id"];}
if (isset($_GET["secondS"])) {$secondS=$_GET["secondS"];}
elseif (isset($_POST["secondS"])) {$secondS=$_POST["secondS"];}
if (isset($_GET["outbound_cid"])) {$outbound_cid=$_GET["outbound_cid"];}
elseif (isset($_POST["outbound_cid"])) {$outbound_cid=$_POST["outbound_cid"];}
if (isset($_GET["agent_log_id"])) {$agent_log_id=$_GET["agent_log_id"];}
elseif (isset($_POST["agent_log_id"])) {$agent_log_id=$_POST["agent_log_id"];}
if (isset($_GET["call_server_ip"])) {$call_server_ip=$_GET["call_server_ip"];}
elseif (isset($_POST["call_server_ip"])) {$call_server_ip=$_POST["call_server_ip"];}
if (isset($_GET["CalLCID"])) {$CalLCID=$_GET["CalLCID"];}
elseif (isset($_POST["CalLCID"])) {$CalLCID=$_POST["CalLCID"];}
# default optional vars if not set
if (!$ACTION) {$ACTION="Originate";}
if (!$format) {$format="alert";}
if (!$ext_priority) {$ext_priority="1";}
if (!isset($ACTION)) {$ACTION="Originate";}
if (!isset($format)) {$format="alert";}
if (!isset($ext_priority)) {$ext_priority="1";}
$version = '0.0.22';
$build = '60310-2022';
$version = '0.0.23';
$build = '60421-1413';
$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;}
if (!isset($query_date)) {$query_date = $NOW_DATE;}
$stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;";
if ($DB) {echo "|$stmt|\n";}
@@ -109,7 +130,7 @@ if (!$query_date) {$query_date = $NOW_DATE;}
$row=mysql_fetch_row($rslt);
$auth=$row[0];
if( (strlen($user)<2) or (strlen($pass)<2) or (!$auth))
if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0))
{
echo "Invalid Username/Password: |$user|$pass|\n";
exit;
@@ -117,7 +138,7 @@ if (!$query_date) {$query_date = $NOW_DATE;}
else
{
if( ( (strlen($server_ip)<6) or (!$server_ip) ) or ( (strlen($session_name)<12) or (!$session_name) ) )
if( (strlen($server_ip)<6) or (!isset($server_ip)) or ( (strlen($session_name)<12) or (!isset($session_name)) ) )
{
echo "Invalid server_ip: |$server_ip| or Invalid session_name: |$session_name|\n";
exit;
@@ -129,7 +150,7 @@ if (!$query_date) {$query_date = $NOW_DATE;}
$rslt=mysql_query($stmt, $link);
$row=mysql_fetch_row($rslt);
$SNauth=$row[0];
if(!$SNauth)
if($SNauth==0)
{
echo "Invalid session_name: |$session_name|$server_ip|\n";
exit;
+25 -21
View File
@@ -18,34 +18,39 @@
###
# changes
# 50524-1515 First build of script
# 50711-1208 removed HTTP authentication in favor of user/pass vars
# 50524-1515 - First build of script
# 50711-1208 - removed HTTP authentication in favor of user/pass vars
# 60421-1111 - check GET/POST vars lines with isset to not trigger PHP NOTICES
#
require("dbconnect.php");
#require_once("htglobalize.php");
### If you have globals turned off uncomment these lines
$user=$_GET["user"]; if (!$user) {$user=$_POST["user"];}
$pass=$_GET["pass"]; if (!$pass) {$pass=$_POST["pass"];}
$server_ip=$_GET["server_ip"]; if (!$server_ip) {$server_ip=$_POST["server_ip"];}
$session_name=$_GET["session_name"]; if (!$session_name) {$session_name=$_POST["session_name"];}
$format=$_GET["format"]; if (!$format) {$format=$_POST["format"];}
$exten=$_GET["exten"]; if (!$exten) {$exten=$_POST["exten"];}
$protocol=$_GET["protocol"]; if (!$protocol) {$protocol=$_POST["protocol"];}
if (isset($_GET["user"])) {$user=$_GET["user"];}
elseif (isset($_POST["user"])) {$user=$_POST["user"];}
if (isset($_GET["pass"])) {$pass=$_GET["pass"];}
elseif (isset($_POST["pass"])) {$pass=$_POST["pass"];}
if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];}
elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];}
if (isset($_GET["session_name"])) {$session_name=$_GET["session_name"];}
elseif (isset($_POST["session_name"])) {$session_name=$_POST["session_name"];}
if (isset($_GET["format"])) {$format=$_GET["format"];}
elseif (isset($_POST["format"])) {$format=$_POST["format"];}
if (isset($_GET["exten"])) {$exten=$_GET["exten"];}
elseif (isset($_POST["exten"])) {$exten=$_POST["exten"];}
if (isset($_GET["protocol"])) {$protocol=$_GET["protocol"];}
elseif (isset($_POST["protocol"])) {$protocol=$_POST["protocol"];}
# default optional vars if not set
if (!$format) {$format="text";}
if (!$park_limit) {$park_limit="1000";}
if (!isset($format)) {$format="text";}
if (!isset($park_limit)) {$park_limit="1000";}
$version = '0.0.2';
$build = '50711-1208';
$version = '0.0.3';
$build = '60421-1111';
$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;}
if (!isset($query_date)) {$query_date = $NOW_DATE;}
$stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;";
if ($DB) {echo "|$stmt|\n";}
@@ -53,7 +58,7 @@ if (!$query_date) {$query_date = $NOW_DATE;}
$row=mysql_fetch_row($rslt);
$auth=$row[0];
if( (strlen($user)<2) or (strlen($pass)<2) or (!$auth))
if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0) )
{
echo "Invalid Username/Password: |$user|$pass|\n";
exit;
@@ -61,8 +66,7 @@ if (!$query_date) {$query_date = $NOW_DATE;}
else
{
if( ( (strlen($server_ip)<6) or (!$server_ip) ) or ( (strlen($session_name)<12) or (!$session_name) ) )
{
if( (strlen($server_ip)<6) or (!isset($server_ip)) or ( (strlen($session_name)<12) or (!isset($session_name)) ) ) {
echo "Invalid server_ip: |$server_ip| or Invalid session_name: |$session_name|\n";
exit;
}
@@ -73,7 +77,7 @@ if (!$query_date) {$query_date = $NOW_DATE;}
$rslt=mysql_query($stmt, $link);
$row=mysql_fetch_row($rslt);
$SNauth=$row[0];
if(!$SNauth)
if($SNauth==0)
{
echo "Invalid session_name: |$session_name|$server_ip|\n";
exit;
+226 -166
View File
@@ -1,184 +1,244 @@
<?
### vdc_db_query.php
###
### Copyright (C) 2006 Matt Florell <vicidial@gmail.com> LICENSE: GPLv2
###
### This script is designed purely to send whether the meetme conference has live channels connected and which they are
### This script depends on the server_ip being sent and also needs to have a valid user/pass from the vicidial_users table
###
### required variables:
### - $server_ip
### - $session_name
### - $user
### - $pass
### optional variables:
### - $format - ('text','debug')
### - $ACTION - ('regCLOSER','manDiaLnextCALL','manDiaLskip','manDiaLonly','manDiaLlookCALL','manDiaLlogCALL','userLOGout','updateDISPO','VDADpause','VDADready','VDADcheckINCOMING','UpdatEFavoritEs','CalLBacKLisT','CalLBacKCounT')
### - $stage - ('start','finish')
### - $closer_choice - ('CL_TESTCAMP_L CL_OUT123_L -')
### - $conf_exten - ('8600011',...)
### - $exten - ('123test',...)
### - $ext_context - ('default','demo',...)
### - $ext_priority - ('1','2',...)
### - $campaign - ('testcamp',...)
### - $dial_timeout - ('60','26',...)
### - $dial_prefix - ('9','8',...)
### - $campaign_cid - ('3125551212','0000000000',...)
### - $MDnextCID - ('M06301413000000002',...)
### - $uniqueid - ('1120232758.2406800',...)
### - $lead_id - ('36524',...)
### - $list_id - ('101','123456',...)
### - $length_in_sec - ('12',...)
### - $phone_code - ('1',...)
### - $phone_number - ('3125551212',...)
### - $channel - ('Zap/12-1',...)
### - $start_epoch - ('1120236911',...)
### - $vendor_lead_code - ('1234test',...)
### - $title - ('Mr.',...)
### - $first_name - ('Bob',...)
### - $middle_initial - ('L',...)
### - $last_name - ('Wilson',...)
### - $address1 - ('1324 Main St.',...)
### - $address2 - ('Apt. 12',...)
### - $address3 - ('co Robert Wilson',...)
### - $city - ('Chicago',...)
### - $state - ('IL',...)
### - $province - ('NA',...)
### - $postal_code - ('60054',...)
### - $country_code - ('USA',...)
### - $gender - ('M',...)
### - $date_of_birth - ('1970-01-01',...)
### - $alt_phone - ('3125551213',...)
### - $email - ('bob@bob.com',...)
### - $security_phrase - ('Hello',...)
### - $comments - ('Good Customer',...)
### - $auto_dial_level - ('0','1','1.2',...)
### - $VDstop_rec_after_each_call - ('0','1')
### - $conf_silent_prefix - ('7','8','',...)
### - $extension - ('123','user123','25-1',...)
### - $protocol - ('Zap','SIP','IAX2',...)
### - $user_abb - ('1234','6666',...)
### - $preview - ('YES','NO',...)
### - $called_count - ('0','1','2',...)
### - $agent_log_id - ('123456',...)
### - $agent_log - ('NO',...)
### - $favorites_list - (",'cc160','cc100'",...)
###
# changes
# 50629-1044 First build of script
# 50630-1422 Added manual dial action and MD channel lookup
# 50701-1451 Added dial log for start and end of vicidial calls
# 50705-1239 Added call disposition update
# 50804-1627 Fixed updateDispo to update vicidial_log entry
# 50816-1605 Added VDADpause/ready for auto dialing
# 50816-1811 Added basic autodial call pickup functions
# 50817-1005 Altered logging functions to accomodate auto_dialing
# 50818-1305 Added stop-all-recordings-after-each-vicidial-call option
# 50818-1411 Added hangup of agent phone after Logout
# 50901-1315 Fixed CLOSER IN-GROUP Web Form bug
# 50902-1507 Fixed CLOSER log length_in_sec bug
# 50902-1730 Added functions for manual preview dialing and revert
# 50913-1214 Added agent random update to leadupdate
# 51020-1421 Added agent_log_id framework for detailed agent activity logging
# 51021-1717 Allows for multi-line comments (changes \n to !N in database)
# 51111-1046 Added vicidial_agent_log lead_id earlier for manual dial
# 51121-1445 Altered echo statements for several small PHP speed optimizations
# 51122-1328 Fixed UserLogout issue not removing conference reservation
# 51129-1012 Added ability to accept calls from other VICIDIAL servers
# 51129-1729 Changed manual dial to use the '/n' flag for calls
# 51221-1154 Added SCRIPT id lookup and sending to vicidial.php for display
# 60105-1059 Added Updating of astguiclient favorites in the DB
# 60208-1617 Added dtmf buttons output per call
# 60213-1521 Added closer_campaigns update to vicidial_users
# 60215-1036 Added Callback date-time entry into vicidial_callbacks table
# 60413-1541 Added USERONLY Callback listings output - CalLBacKLisT
# Added USERONLY Callback count output - CalLBacKCounT
# 60414-1140 Added Callback lead lookup for manual dialing
# 60419-1517 After CALLBK is sent to agent, update callback record to INACTIVE
# vdc_db_query.php
#
# Copyright (C) 2006 Matt Florell <vicidial@gmail.com> LICENSE: GPLv2
#
# This script is designed purely to send whether the meetme conference has live channels connected and which they are
# This script depends on the server_ip being sent and also needs to have a valid user/pass from the vicidial_users table
#
# required variables:
# - $server_ip
# - $session_name
# - $user
# - $pass
# optional variables:
# - $format - ('text','debug')
# - $ACTION - ('regCLOSER','manDiaLnextCALL','manDiaLskip','manDiaLonly','manDiaLlookCALL','manDiaLlogCALL','userLOGout','updateDISPO','VDADpause','VDADready','VDADcheckINCOMING','UpdatEFavoritEs','CalLBacKLisT','CalLBacKCounT')
# - $stage - ('start','finish')
# - $closer_choice - ('CL_TESTCAMP_L CL_OUT123_L -')
# - $conf_exten - ('8600011',...)
# - $exten - ('123test',...)
# - $ext_context - ('default','demo',...)
# - $ext_priority - ('1','2',...)
# - $campaign - ('testcamp',...)
# - $dial_timeout - ('60','26',...)
# - $dial_prefix - ('9','8',...)
# - $campaign_cid - ('3125551212','0000000000',...)
# - $MDnextCID - ('M06301413000000002',...)
# - $uniqueid - ('1120232758.2406800',...)
# - $lead_id - ('36524',...)
# - $list_id - ('101','123456',...)
# - $length_in_sec - ('12',...)
# - $phone_code - ('1',...)
# - $phone_number - ('3125551212',...)
# - $channel - ('Zap/12-1',...)
# - $start_epoch - ('1120236911',...)
# - $vendor_lead_code - ('1234test',...)
# - $title - ('Mr.',...)
# - $first_name - ('Bob',...)
# - $middle_initial - ('L',...)
# - $last_name - ('Wilson',...)
# - $address1 - ('1324 Main St.',...)
# - $address2 - ('Apt. 12',...)
# - $address3 - ('co Robert Wilson',...)
# - $city - ('Chicago',...)
# - $state - ('IL',...)
# - $province - ('NA',...)
# - $postal_code - ('60054',...)
# - $country_code - ('USA',...)
# - $gender - ('M',...)
# - $date_of_birth - ('1970-01-01',...)
# - $alt_phone - ('3125551213',...)
# - $email - ('bob@bob.com',...)
# - $security_phrase - ('Hello',...)
# - $comments - ('Good Customer',...)
# - $auto_dial_level - ('0','1','1.2',...)
# - $VDstop_rec_after_each_call - ('0','1')
# - $conf_silent_prefix - ('7','8','',...)
# - $extension - ('123','user123','25-1',...)
# - $protocol - ('Zap','SIP','IAX2',...)
# - $user_abb - ('1234','6666',...)
# - $preview - ('YES','NO',...)
# - $called_count - ('0','1','2',...)
# - $agent_log_id - ('123456',...)
# - $agent_log - ('NO',...)
# - $favorites_list - (",'cc160','cc100'",...)
# - $CallBackDatETimE - ('2006-04-21 14:30:00',...)
# - $recipient - ('ANYONE,'USERONLY')
# - $callback_id - ('12345','12346',...)
#
$version = '0.0.29';
$build = '60419-1517';
# changes
# 50629-1044 - First build of script
# 50630-1422 - Added manual dial action and MD channel lookup
# 50701-1451 - Added dial log for start and end of vicidial calls
# 50705-1239 - Added call disposition update
# 50804-1627 - Fixed updateDispo to update vicidial_log entry
# 50816-1605 - Added VDADpause/ready for auto dialing
# 50816-1811 - Added basic autodial call pickup functions
# 50817-1005 - Altered logging functions to accomodate auto_dialing
# 50818-1305 - Added stop-all-recordings-after-each-vicidial-call option
# 50818-1411 - Added hangup of agent phone after Logout
# 50901-1315 - Fixed CLOSER IN-GROUP Web Form bug
# 50902-1507 - Fixed CLOSER log length_in_sec bug
# 50902-1730 - Added functions for manual preview dialing and revert
# 50913-1214 - Added agent random update to leadupdate
# 51020-1421 - Added agent_log_id framework for detailed agent activity logging
# 51021-1717 - Allows for multi-line comments (changes \n to !N in database)
# 51111-1046 - Added vicidial_agent_log lead_id earlier for manual dial
# 51121-1445 - Altered echo statements for several small PHP speed optimizations
# 51122-1328 - Fixed UserLogout issue not removing conference reservation
# 51129-1012 - Added ability to accept calls from other VICIDIAL servers
# 51129-1729 - Changed manual dial to use the '/n' flag for calls
# 51221-1154 - Added SCRIPT id lookup and sending to vicidial.php for display
# 60105-1059 - Added Updating of astguiclient favorites in the DB
# 60208-1617 - Added dtmf buttons output per call
# 60213-1521 - Added closer_campaigns update to vicidial_users
# 60215-1036 - Added Callback date-time entry into vicidial_callbacks table
# 60413-1541 - Added USERONLY Callback listings output - CalLBacKLisT
# - Added USERONLY Callback count output - CalLBacKCounT
# 60414-1140 - Added Callback lead lookup for manual dialing
# 60419-1517 - After CALLBK is sent to agent, update callback record to INACTIVE
# 60421-1419 - check GET/POST vars lines with isset to not trigger PHP NOTICES
#
$version = '0.0.30';
$build = '60421-1419';
require("dbconnect.php");
#require_once("htglobalize.php");
### If you have globals turned off uncomment these lines
$user=$_GET["user"]; if (!$user) {$user=$_POST["user"];}
$pass=$_GET["pass"]; if (!$pass) {$pass=$_POST["pass"];}
$server_ip=$_GET["server_ip"]; if (!$server_ip) {$server_ip=$_POST["server_ip"];}
$session_name=$_GET["session_name"]; if (!$session_name) {$session_name=$_POST["session_name"];}
$format=$_GET["format"]; if (!$format) {$format=$_POST["format"];}
$ACTION=$_GET["ACTION"]; if (!$ACTION) {$ACTION=$_POST["ACTION"];}
$stage=$_GET["stage"]; if (!$stage) {$stage=$_POST["stage"];}
$closer_choice=$_GET["closer_choice"]; if (!$closer_choice) {$closer_choice=$_POST["closer_choice"];}
$conf_exten=$_GET["conf_exten"]; if (!$conf_exten) {$conf_exten=$_POST["conf_exten"];}
$exten=$_GET["exten"]; if (!$exten) {$exten=$_POST["exten"];}
$ext_context=$_GET["ext_context"]; if (!$ext_context) {$ext_context=$_POST["ext_context"];}
$ext_priority=$_GET["ext_priority"]; if (!$ext_priority) {$ext_priority=$_POST["ext_priority"];}
$campaign=$_GET["campaign"]; if (!$campaign) {$campaign=$_POST["campaign"];}
$dial_timeout=$_GET["dial_timeout"]; if (!$dial_timeout) {$dial_timeout=$_POST["dial_timeout"];}
$dial_prefix=$_GET["dial_prefix"]; if (!$dial_prefix) {$dial_prefix=$_POST["dial_prefix"];}
$campaign_cid=$_GET["campaign_cid"]; if (!$campaign_cid) {$campaign_cid=$_POST["campaign_cid"];}
$MDnextCID=$_GET["MDnextCID"]; if (!$MDnextCID) {$MDnextCID=$_POST["MDnextCID"];}
$uniqueid=$_GET["uniqueid"]; if (!$uniqueid) {$uniqueid=$_POST["uniqueid"];}
$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"];}
$length_in_sec=$_GET["length_in_sec"]; if (!$length_in_sec) {$length_in_sec=$_POST["length_in_sec"];}
$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"];}
$channel=$_GET["channel"]; if (!$channel) {$channel=$_POST["channel"];}
$start_epoch=$_GET["start_epoch"]; if (!$start_epoch) {$start_epoch=$_POST["start_epoch"];}
$dispo_choice=$_GET["dispo_choice"]; if (!$dispo_choice) {$dispo_choice=$_POST["dispo_choice"];}
$vendor_lead_code=$_GET["vendor_lead_code"]; if (!$vendor_lead_code) {$vendor_lead_code=$_POST["vendor_lead_code"];}
$title=$_GET["title"]; if (!$title) {$title=$_POST["title"];}
$first_name=$_GET["first_name"]; if (!$first_name) {$first_name=$_POST["first_name"];}
$middle_initial=$_GET["middle_initial"]; if (!$middle_initial) {$middle_initial=$_POST["middle_initial"];}
$last_name=$_GET["last_name"]; if (!$last_name) {$last_name=$_POST["last_name"];}
$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"];}
$province=$_GET["province"]; if (!$province) {$province=$_POST["province"];}
$postal_code=$_GET["postal_code"]; if (!$postal_code) {$postal_code=$_POST["postal_code"];}
$country_code=$_GET["country_code"]; if (!$country_code) {$country_code=$_POST["country_code"];}
$gender=$_GET["gender"]; if (!$gender) {$gender=$_POST["gender"];}
$date_of_birth=$_GET["date_of_birth"]; if (!$date_of_birth) {$date_of_birth=$_POST["date_of_birth"];}
$alt_phone=$_GET["alt_phone"]; if (!$alt_phone) {$alt_phone=$_POST["alt_phone"];}
$email=$_GET["email"]; if (!$email) {$email=$_POST["email"];}
$security_phrase=$_GET["security_phrase"]; if (!$security_phrase) {$security_phrase=$_POST["security_phrase"];}
$comments=$_GET["comments"]; if (!$comments) {$comments=$_POST["comments"];}
$auto_dial_level=$_GET["auto_dial_level"]; if (!$auto_dial_level) {$auto_dial_level=$_POST["auto_dial_level"];}
$VDstop_rec_after_each_call=$_GET["VDstop_rec_after_each_call"]; if (!$VDstop_rec_after_each_call) {$VDstop_rec_after_each_call=$_POST["VDstop_rec_after_each_call"];}
$conf_silent_prefix=$_GET["conf_silent_prefix"]; if (!$conf_silent_prefix) {$conf_silent_prefix=$_POST["conf_silent_prefix"];}
$extension=$_GET["extension"]; if (!$extension) {$extension=$_POST["extension"];}
$protocol=$_GET["protocol"]; if (!$protocol) {$protocol=$_POST["protocol"];}
$user_abb=$_GET["user_abb"]; if (!$user_abb) {$user_abb=$_POST["user_abb"];}
$preview=$_GET["preview"]; if (!$preview) {$preview=$_POST["preview"];}
$called_count=$_GET["called_count"]; if (!$called_count) {$called_count=$_POST["called_count"];}
$agent_log_id=$_GET["agent_log_id"]; if (!$agent_log_id) {$agent_log_id=$_POST["agent_log_id"];}
$agent_log=$_GET["agent_log"]; if (!$agent_log) {$agent_log=$_POST["agent_log"];}
$favorites_list=$_GET["favorites_list"]; if (!$favorites_list) {$favorites_list=$_POST["favorites_list"];}
$CallBackDatETimE=$_GET["CallBackDatETimE"]; if (!$CallBackDatETimE) {$CallBackDatETimE=$_POST["CallBackDatETimE"];}
$recipient=$_GET["recipient"]; if (!$recipient) {$recipient=$_POST["recipient"];}
$callback_id=$_GET["callback_id"]; if (!$callback_id) {$callback_id=$_POST["callback_id"];}
if (isset($_GET["user"])) {$user=$_GET["user"];}
elseif (isset($_POST["user"])) {$user=$_POST["user"];}
if (isset($_GET["pass"])) {$pass=$_GET["pass"];}
elseif (isset($_POST["pass"])) {$pass=$_POST["pass"];}
if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];}
elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];}
if (isset($_GET["session_name"])) {$session_name=$_GET["session_name"];}
elseif (isset($_POST["session_name"])) {$session_name=$_POST["session_name"];}
if (isset($_GET["format"])) {$format=$_GET["format"];}
elseif (isset($_POST["format"])) {$format=$_POST["format"];}
if (isset($_GET["ACTION"])) {$ACTION=$_GET["ACTION"];}
elseif (isset($_POST["ACTION"])) {$ACTION=$_POST["ACTION"];}
if (isset($_GET["stage"])) {$stage=$_GET["stage"];}
elseif (isset($_POST["stage"])) {$stage=$_POST["stage"];}
if (isset($_GET["closer_choice"])) {$closer_choice=$_GET["closer_choice"];}
elseif (isset($_POST["closer_choice"])) {$closer_choice=$_POST["closer_choice"];}
if (isset($_GET["conf_exten"])) {$conf_exten=$_GET["conf_exten"];}
elseif (isset($_POST["conf_exten"])) {$conf_exten=$_POST["conf_exten"];}
if (isset($_GET["exten"])) {$exten=$_GET["exten"];}
elseif (isset($_POST["exten"])) {$exten=$_POST["exten"];}
if (isset($_GET["ext_context"])) {$ext_context=$_GET["ext_context"];}
elseif (isset($_POST["ext_context"])) {$ext_context=$_POST["ext_context"];}
if (isset($_GET["ext_priority"])) {$ext_priority=$_GET["ext_priority"];}
elseif (isset($_POST["ext_priority"])) {$ext_priority=$_POST["ext_priority"];}
if (isset($_GET["campaign"])) {$campaign=$_GET["campaign"];}
elseif (isset($_POST["campaign"])) {$campaign=$_POST["campaign"];}
if (isset($_GET["dial_timeout"])) {$dial_timeout=$_GET["dial_timeout"];}
elseif (isset($_POST["dial_timeout"])) {$dial_timeout=$_POST["dial_timeout"];}
if (isset($_GET["dial_prefix"])) {$dial_prefix=$_GET["dial_prefix"];}
elseif (isset($_POST["dial_prefix"])) {$dial_prefix=$_POST["dial_prefix"];}
if (isset($_GET["campaign_cid"])) {$campaign_cid=$_GET["campaign_cid"];}
elseif (isset($_POST["campaign_cid"])) {$campaign_cid=$_POST["campaign_cid"];}
if (isset($_GET["MDnextCID"])) {$MDnextCID=$_GET["MDnextCID"];}
elseif (isset($_POST["MDnextCID"])) {$MDnextCID=$_POST["MDnextCID"];}
if (isset($_GET["uniqueid"])) {$uniqueid=$_GET["uniqueid"];}
elseif (isset($_POST["uniqueid"])) {$uniqueid=$_POST["uniqueid"];}
if (isset($_GET["lead_id"])) {$lead_id=$_GET["lead_id"];}
elseif (isset($_POST["lead_id"])) {$lead_id=$_POST["lead_id"];}
if (isset($_GET["list_id"])) {$list_id=$_GET["list_id"];}
elseif (isset($_POST["list_id"])) {$list_id=$_POST["list_id"];}
if (isset($_GET["length_in_sec"])) {$length_in_sec=$_GET["length_in_sec"];}
elseif (isset($_POST["length_in_sec"])) {$length_in_sec=$_POST["length_in_sec"];}
if (isset($_GET["phone_code"])) {$phone_code=$_GET["phone_code"];}
elseif (isset($_POST["phone_code"])) {$phone_code=$_POST["phone_code"];}
if (isset($_GET["phone_number"])) {$phone_number=$_GET["phone_number"];}
elseif (isset($_POST["phone_number"])) {$phone_number=$_POST["phone_number"];}
if (isset($_GET["channel"])) {$channel=$_GET["channel"];}
elseif (isset($_POST["channel"])) {$channel=$_POST["channel"];}
if (isset($_GET["start_epoch"])) {$start_epoch=$_GET["start_epoch"];}
elseif (isset($_POST["start_epoch"])) {$start_epoch=$_POST["start_epoch"];}
if (isset($_GET["dispo_choice"])) {$dispo_choice=$_GET["dispo_choice"];}
elseif (isset($_POST["dispo_choice"])) {$dispo_choice=$_POST["dispo_choice"];}
if (isset($_GET["vendor_lead_code"])) {$vendor_lead_code=$_GET["vendor_lead_code"];}
elseif (isset($_POST["vendor_lead_code"])) {$vendor_lead_code=$_POST["vendor_lead_code"];}
if (isset($_GET["title"])) {$title=$_GET["title"];}
elseif (isset($_POST["title"])) {$title=$_POST["title"];}
if (isset($_GET["first_name"])) {$first_name=$_GET["first_name"];}
elseif (isset($_POST["first_name"])) {$first_name=$_POST["first_name"];}
if (isset($_GET["middle_initial"])) {$middle_initial=$_GET["middle_initial"];}
elseif (isset($_POST["middle_initial"])) {$middle_initial=$_POST["middle_initial"];}
if (isset($_GET["last_name"])) {$last_name=$_GET["last_name"];}
elseif (isset($_POST["last_name"])) {$last_name=$_POST["last_name"];}
if (isset($_GET["address1"])) {$address1=$_GET["address1"];}
elseif (isset($_POST["address1"])) {$address1=$_POST["address1"];}
if (isset($_GET["address2"])) {$address2=$_GET["address2"];}
elseif (isset($_POST["address2"])) {$address2=$_POST["address2"];}
if (isset($_GET["address3"])) {$address3=$_GET["address3"];}
elseif (isset($_POST["address3"])) {$address3=$_POST["address3"];}
if (isset($_GET["city"])) {$city=$_GET["city"];}
elseif (isset($_POST["city"])) {$city=$_POST["city"];}
if (isset($_GET["state"])) {$state=$_GET["state"];}
elseif (isset($_POST["state"])) {$state=$_POST["state"];}
if (isset($_GET["province"])) {$province=$_GET["province"];}
elseif (isset($_POST["province"])) {$province=$_POST["province"];}
if (isset($_GET["postal_code"])) {$postal_code=$_GET["postal_code"];}
elseif (isset($_POST["postal_code"])) {$postal_code=$_POST["postal_code"];}
if (isset($_GET["country_code"])) {$country_code=$_GET["country_code"];}
elseif (isset($_POST["country_code"])) {$country_code=$_POST["country_code"];}
if (isset($_GET["gender"])) {$gender=$_GET["gender"];}
elseif (isset($_POST["gender"])) {$gender=$_POST["gender"];}
if (isset($_GET["date_of_birth"])) {$date_of_birth=$_GET["date_of_birth"];}
elseif (isset($_POST["date_of_birth"])) {$date_of_birth=$_POST["date_of_birth"];}
if (isset($_GET["alt_phone"])) {$alt_phone=$_GET["alt_phone"];}
elseif (isset($_POST["alt_phone"])) {$alt_phone=$_POST["alt_phone"];}
if (isset($_GET["email"])) {$email=$_GET["email"];}
elseif (isset($_POST["email"])) {$email=$_POST["email"];}
if (isset($_GET["security_phrase"])) {$security_phrase=$_GET["security_phrase"];}
elseif (isset($_POST["security_phrase"])) {$security_phrase=$_POST["security_phrase"];}
if (isset($_GET["comments"])) {$comments=$_GET["comments"];}
elseif (isset($_POST["comments"])) {$comments=$_POST["comments"];}
if (isset($_GET["auto_dial_level"])) {$auto_dial_level=$_GET["auto_dial_level"];}
elseif (isset($_POST["auto_dial_level"])) {$auto_dial_level=$_POST["auto_dial_level"];}
if (isset($_GET["VDstop_rec_after_each_call"])) {$VDstop_rec_after_each_call=$_GET["VDstop_rec_after_each_call"];}
elseif (isset($_POST["VDstop_rec_after_each_call"])) {$VDstop_rec_after_each_call=$_POST["VDstop_rec_after_each_call"];}
if (isset($_GET["conf_silent_prefix"])) {$conf_silent_prefix=$_GET["conf_silent_prefix"];}
elseif (isset($_POST["conf_silent_prefix"])) {$conf_silent_prefix=$_POST["conf_silent_prefix"];}
if (isset($_GET["extension"])) {$extension=$_GET["extension"];}
elseif (isset($_POST["extension"])) {$extension=$_POST["extension"];}
if (isset($_GET["protocol"])) {$protocol=$_GET["protocol"];}
elseif (isset($_POST["protocol"])) {$protocol=$_POST["protocol"];}
if (isset($_GET["user_abb"])) {$user_abb=$_GET["user_abb"];}
elseif (isset($_POST["user_abb"])) {$user_abb=$_POST["user_abb"];}
if (isset($_GET["preview"])) {$preview=$_GET["preview"];}
elseif (isset($_POST["preview"])) {$preview=$_POST["preview"];}
if (isset($_GET["called_count"])) {$called_count=$_GET["called_count"];}
elseif (isset($_POST["called_count"])) {$called_count=$_POST["called_count"];}
if (isset($_GET["agent_log_id"])) {$agent_log_id=$_GET["agent_log_id"];}
elseif (isset($_POST["agent_log_id"])) {$agent_log_id=$_POST["agent_log_id"];}
if (isset($_GET["agent_log"])) {$agent_log=$_GET["agent_log"];}
elseif (isset($_POST["agent_log"])) {$agent_log=$_POST["agent_log"];}
if (isset($_GET["favorites_list"])) {$favorites_list=$_GET["favorites_list"];}
elseif (isset($_POST["favorites_list"])) {$favorites_list=$_POST["favorites_list"];}
if (isset($_GET["CallBackDatETimE"])) {$CallBackDatETimE=$_GET["CallBackDatETimE"];}
elseif (isset($_POST["CallBackDatETimE"])) {$CallBackDatETimE=$_POST["CallBackDatETimE"];}
if (isset($_GET["recipient"])) {$recipient=$_GET["recipient"];}
elseif (isset($_POST["recipient"])) {$recipient=$_POST["recipient"];}
if (isset($_GET["callback_id"])) {$callback_id=$_GET["callback_id"];}
elseif (isset($_POST["callback_id"])) {$callback_id=$_POST["callback_id"];}
# default optional vars if not set
if (!$format) {$format="text";}
if (!isset($format)) {$format="text";}
if ($format == 'debug') {$DB=1;}
if (!$ACTION) {$ACTION="refresh";}
if (!isset($ACTION)) {$ACTION="refresh";}
$StarTtime = date("U");
$NOW_DATE = date("Y-m-d");
$NOW_TIME = date("Y-m-d H:i:s");
$CIDdate = date("mdHis");
$ENTRYdate = date("YmdHis");
if (!$query_date) {$query_date = $NOW_DATE;}
if (!isset($query_date)) {$query_date = $NOW_DATE;}
$MT[0]='';
$stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;";
@@ -187,7 +247,7 @@ $rslt=mysql_query($stmt, $link);
$row=mysql_fetch_row($rslt);
$auth=$row[0];
if( (strlen($user)<2) or (strlen($pass)<2) or (!$auth))
if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0))
{
echo "Invalid Username/Password: |$user|$pass|\n";
exit;
@@ -195,7 +255,7 @@ exit;
else
{
if( ( (strlen($server_ip)<6) or (!$server_ip) ) or ( (strlen($session_name)<12) or (!$session_name) ) )
if( (strlen($server_ip)<6) or (!isset($server_ip)) or ( (strlen($session_name)<12) or (!isset($session_name)) ) )
{
echo "Invalid server_ip: |$server_ip| or Invalid session_name: |$session_name|\n";
exit;
@@ -207,7 +267,7 @@ else
$rslt=mysql_query($stmt, $link);
$row=mysql_fetch_row($rslt);
$SNauth=$row[0];
if(!$SNauth)
if($SNauth==0)
{
echo "Invalid session_name: |$session_name|$server_ip|\n";
exit;
+149 -112
View File
@@ -1,124 +1,144 @@
<?
### vicidial.php - the web-based version of the astVICIDIAL client application
###
### Copyright (C) 2006 Matt Florell <vicidial@gmail.com> LICENSE: GPLv2
###
### make sure you have added a user to the vicidial_users MySQL table with at least
### user_level 1 or greater to access this page. Also, you need to have the login
### and pass of a phone listed in the asterisk.phones table. The page grabs the
### server info and other details from this login and pass.
###
### This script works best with Firefox or Mozilla, but will run for a couple
### hours on Internet Explorer before the memory leaks cause a crash.
###
### Other scripts that this application depends on:
### - vdc_db_query.php: Updates information in the database
### - manager_send.php: Sends manager actions to the DB for execution
###
### CHANGES
### 50607-1426 - First Build of VICIDIAL web client basic login process finished
### 50628-1620 - Added some basic formatting and worked on process flow
### 50628-1715 - Startup variables mapped to javascript variables
### 50629-1303 - Added Login Closer in-groups selection box and vla update
### 50629-1530 - Rough layout for customer info form section and button links
### 50630-1453 - Rough Manual Dial/Hangup with customer info displayed
### 50701-1450 - Added vicidial_log entries on dial and hangup
### 50701-1634 - Added Logout function
### 50705-1259 - Added call disposition functionality
### 50705-1432 - Added lead info DB update function
### 50705-1658 - Added web form functionality
### 50706-1043 - Added call park and pickup functions
### 50706-1234 - Added Start/Stop Recording functionality
### 50706-1614 - Added conference channels display option
### 50711-1333 - Removed call check redundancy and fixed a span bug
### 50727-1424 - Added customer channel and participant present sensing/alerts
### 50804-1057 - Added SendDTMF function and reconfigured the transfer span
### 50804-1224 - Added Local and Internal Closer transfer functions
### 50804-1628 - Added Blind transfer, activated LIVE CALL image and fixed bugs
### 50804-1808 - Added button images for left buttons
### 50815-1151 - Added 3Way calling functions to Transfer-conf frame
### 50815-1602 - Added images and buttons for xfer functions
### 50816-1813 - Added basic autodial outbound call pickup functions
### 50817-1113 - Fixes to auto_dialing call receipt
### 50817-1234 - Added inbound call receipt capability
### 50817-1541 - Added customer time display
### 50817-1541 - Added customer time display
### 50818-1327 - Added stop-all-recordings-after-each-vicidial-call option
### 50818-1703 - Added pretty login section
### 50825-1200 - Modified form field lengths, added double-click dispositions
### 50831-1603 - Fixed customer time bug and fronter display bug for CLOSER
### 50901-1314 - Fixed CLOSER IN-GROUP Web Form bug
### 50903-0904 - Added preview-lead code for manual dialing
### 50904-0016 - Added ability to hangup manual dials before pickup
### 50906-1319 - Added override for filters on xfer calls, fixed login display bug
### 50909-1243 - Added hotkeys functionality for quick dispoing in auto-dial mode
### 50912-0958 - Modified hotkeys function, agent must have user_level >= 5 to use
### 50913-1212 - Added campaign_cid to 3rd party calls
### 50923-1546 - Modified to work with language translation
### 50926-1656 - Added campaign pull-down at login of active campaigns
### 50928-1633 - Added manual dial alternate number dial option
### 50930-1538 - Added session_id empty login failure and fixed 2 minor bugs
### 51004-1656 - Fixed recording filename bug and new Spanish translation
### 51020-1103 - Added campaign-specific recording control abilities
### 51020-1352 - Added Basic vicidial_agent_log framework
### 51021-1050 - Fixed custtime display and disable Enter/Return keypresses
### 51021-1718 - Allows for multi-line comments (changes \n to !N in database)
### 51110-1432 - Fixed non-standard http port issue
### 51111-1047 - Added vicidial_agent_log lead_id earlier for manual dial
### 51118-1305 - Activate multi-line comments from $multi_line_comments var
### 51118-1313 - Move Transfer DIV to a floating span to preserve 800x600 view
### 51121-1506 - Small PHP optimizations in many scripts and disabled globalize
### 51129-1010 - Added ability to accept calls from other VICIDIAL servers
### 51129-1254 - Fixed Hangups of other agents channels when customer hangs up
### 51208-1732 - Created user-first login that looks for default phone info
### 51219-1526 - Added variable framework for campaign and in-group scripts
### 51221-1200 - Added SCRIPT tab, layout and functionality
### 51221-1714 - Added auto-switch-to-SCRIPT-tab and auto-webform-popup
### 51222-1605 - Added VMail message blind transfer button to xfer-conf frame
### 51229-1028 - Added checks on web_form_address to allow for var in the DB value
### 60117-1312 - Added Transfer-conf frame toggle on button press
### 60208-1152 - Added DTMF-xfernumber preset links to xfer-conf frame
### 60213-1129 - Added vicidial_users.hotkeys_active for any user hotkeys
### 60213-1210 - Added ability to sort routing of calls by user_level
### 60214-0932 - Initial Callback calendar display framework
### 60214-1407 - Added ability to minimize the dispo screen to see info below
### 60215-1104 - Added ANYONE scheduled callbacks functionality
### 60410-1116 - Added persistant pause after dispo option and change dispo text
### - Added web form submit that opens new window with dispo on submit
### - Added PREVIOUS CALLBACK in customer info to flag callbacks
### - Added link to try to hangup the call again in the dispo screen
### - Added link noone-in-session screen to call agent phone again
### - Added link customer-hungup screen to go straight to dispo screen
### 60410-1532 - Added agent status and campaign calls dialing display option
### 60411-1547 - Add ability to set callback as USERONLY and some basic formatting
### 60413-1752 - Add basic USERONLY callback frame and listings
### 60414-1039 - Changed manual dial preview and alt dial checkboxes to spans
### - Added beta-level USERONLY callback functionality
### - Added beta-level manual dialing with lead insertion functionality
### 60415-1534 - Fixed manual dial lead preview and fixed manuald dial override bug
### 60417-1108 - Added capability to do alt-number-dialing in auto-dial mode
### - Changed several permissions to database-defined
### 60419-1529 - Prevent manual dial or callbacks when alt-dial lead not finished
###
# vicidial.php - the web-based version of the astVICIDIAL client application
#
# Copyright (C) 2006 Matt Florell <vicidial@gmail.com> LICENSE: GPLv2
#
# make sure you have added a user to the vicidial_users MySQL table with at least
# user_level 1 or greater to access this page. Also, you need to have the login
# and pass of a phone listed in the asterisk.phones table. The page grabs the
# server info and other details from this login and pass.
#
# This script works best with Firefox or Mozilla, but will run for a couple
# hours on Internet Explorer before the memory leaks cause a crash.
#
# Other scripts that this application depends on:
# - vdc_db_query.php: Updates information in the database
# - manager_send.php: Sends manager actions to the DB for execution
#
# CHANGES
# 50607-1426 - First Build of VICIDIAL web client basic login process finished
# 50628-1620 - Added some basic formatting and worked on process flow
# 50628-1715 - Startup variables mapped to javascript variables
# 50629-1303 - Added Login Closer in-groups selection box and vla update
# 50629-1530 - Rough layout for customer info form section and button links
# 50630-1453 - Rough Manual Dial/Hangup with customer info displayed
# 50701-1450 - Added vicidial_log entries on dial and hangup
# 50701-1634 - Added Logout function
# 50705-1259 - Added call disposition functionality
# 50705-1432 - Added lead info DB update function
# 50705-1658 - Added web form functionality
# 50706-1043 - Added call park and pickup functions
# 50706-1234 - Added Start/Stop Recording functionality
# 50706-1614 - Added conference channels display option
# 50711-1333 - Removed call check redundancy and fixed a span bug
# 50727-1424 - Added customer channel and participant present sensing/alerts
# 50804-1057 - Added SendDTMF function and reconfigured the transfer span
# 50804-1224 - Added Local and Internal Closer transfer functions
# 50804-1628 - Added Blind transfer, activated LIVE CALL image and fixed bugs
# 50804-1808 - Added button images for left buttons
# 50815-1151 - Added 3Way calling functions to Transfer-conf frame
# 50815-1602 - Added images and buttons for xfer functions
# 50816-1813 - Added basic autodial outbound call pickup functions
# 50817-1113 - Fixes to auto_dialing call receipt
# 50817-1234 - Added inbound call receipt capability
# 50817-1541 - Added customer time display
# 50817-1541 - Added customer time display
# 50818-1327 - Added stop-all-recordings-after-each-vicidial-call option
# 50818-1703 - Added pretty login section
# 50825-1200 - Modified form field lengths, added double-click dispositions
# 50831-1603 - Fixed customer time bug and fronter display bug for CLOSER
# 50901-1314 - Fixed CLOSER IN-GROUP Web Form bug
# 50903-0904 - Added preview-lead code for manual dialing
# 50904-0016 - Added ability to hangup manual dials before pickup
# 50906-1319 - Added override for filters on xfer calls, fixed login display bug
# 50909-1243 - Added hotkeys functionality for quick dispoing in auto-dial mode
# 50912-0958 - Modified hotkeys function, agent must have user_level >= 5 to use
# 50913-1212 - Added campaign_cid to 3rd party calls
# 50923-1546 - Modified to work with language translation
# 50926-1656 - Added campaign pull-down at login of active campaigns
# 50928-1633 - Added manual dial alternate number dial option
# 50930-1538 - Added session_id empty login failure and fixed 2 minor bugs
# 51004-1656 - Fixed recording filename bug and new Spanish translation
# 51020-1103 - Added campaign-specific recording control abilities
# 51020-1352 - Added Basic vicidial_agent_log framework
# 51021-1050 - Fixed custtime display and disable Enter/Return keypresses
# 51021-1718 - Allows for multi-line comments (changes \n to !N in database)
# 51110-1432 - Fixed non-standard http port issue
# 51111-1047 - Added vicidial_agent_log lead_id earlier for manual dial
# 51118-1305 - Activate multi-line comments from $multi_line_comments var
# 51118-1313 - Move Transfer DIV to a floating span to preserve 800x600 view
# 51121-1506 - Small PHP optimizations in many scripts and disabled globalize
# 51129-1010 - Added ability to accept calls from other VICIDIAL servers
# 51129-1254 - Fixed Hangups of other agents channels when customer hangs up
# 51208-1732 - Created user-first login that looks for default phone info
# 51219-1526 - Added variable framework for campaign and in-group scripts
# 51221-1200 - Added SCRIPT tab, layout and functionality
# 51221-1714 - Added auto-switch-to-SCRIPT-tab and auto-webform-popup
# 51222-1605 - Added VMail message blind transfer button to xfer-conf frame
# 51229-1028 - Added checks on web_form_address to allow for var in the DB value
# 60117-1312 - Added Transfer-conf frame toggle on button press
# 60208-1152 - Added DTMF-xfernumber preset links to xfer-conf frame
# 60213-1129 - Added vicidial_users.hotkeys_active for any user hotkeys
# 60213-1210 - Added ability to sort routing of calls by user_level
# 60214-0932 - Initial Callback calendar display framework
# 60214-1407 - Added ability to minimize the dispo screen to see info below
# 60215-1104 - Added ANYONE scheduled callbacks functionality
# 60410-1116 - Added persistant pause after dispo option and change dispo text
# - Added web form submit that opens new window with dispo on submit
# - Added PREVIOUS CALLBACK in customer info to flag callbacks
# - Added link to try to hangup the call again in the dispo screen
# - Added link noone-in-session screen to call agent phone again
# - Added link customer-hungup screen to go straight to dispo screen
# 60410-1532 - Added agent status and campaign calls dialing display option
# 60411-1547 - Add ability to set callback as USERONLY and some basic formatting
# 60413-1752 - Add basic USERONLY callback frame and listings
# 60414-1039 - Changed manual dial preview and alt dial checkboxes to spans
# - Added beta-level USERONLY callback functionality
# - Added beta-level manual dialing with lead insertion functionality
# 60415-1534 - Fixed manual dial lead preview and fixed manuald dial override bug
# 60417-1108 - Added capability to do alt-number-dialing in auto-dial mode
# - Changed several permissions to database-defined
# 60419-1529 - Prevent manual dial or callbacks when alt-dial lead not finished
# 60420-1647 - Fixed DiaLDiaLAltPhonE error, Call Agent Again DialControl error
# 60421-1229 - check GET/POST vars lines with isset to not trigger PHP NOTICES
#
require("dbconnect.php");
$DB=$_GET['DB']; if (!$DB) {$DB=$_POST["DB"];}
$phone_login=$_GET['phone_login']; if (!$phone_login) {$phone_login=$_POST["phone_login"];}
if (!$phone_login) {$phone_login=$_GET["pl"];}
$phone_pass=$_GET['phone_pass']; if (!$phone_pass) {$phone_pass=$_POST["phone_pass"];}
if (!$phone_pass) {$phone_pass=$_GET["pp"];}
$VD_login=$_GET['VD_login']; if (!$VD_login) {$VD_login=$_POST["VD_login"];}
$VD_pass=$_GET['VD_pass']; if (!$VD_pass) {$VD_pass=$_POST["VD_pass"];}
$VD_campaign=$_GET['VD_campaign']; if (!$VD_campaign) {$VD_campaign=$_POST["VD_campaign"];}
if (isset($_GET["DB"])) {$DB=$_GET["DB"];}
elseif (isset($_POST["DB"])) {$DB=$_POST["DB"];}
if (isset($_GET["phone_login"])) {$phone_login=$_GET["phone_login"];}
elseif (isset($_POST["phone_login"])) {$phone_login=$_POST["phone_login"];}
if (isset($_GET["phone_pass"])) {$phone_pass=$_GET["phone_pass"];}
elseif (isset($_POST["phone_pass"])) {$phone_pass=$_POST["phone_pass"];}
if (isset($_GET["VD_login"])) {$VD_login=$_GET["VD_login"];}
elseif (isset($_POST["VD_login"])) {$VD_login=$_POST["VD_login"];}
if (isset($_GET["VD_pass"])) {$VD_pass=$_GET["VD_pass"];}
elseif (isset($_POST["VD_pass"])) {$VD_pass=$_POST["VD_pass"];}
if (isset($_GET["VD_campaign"])) {$VD_campaign=$_GET["VD_campaign"];}
elseif (isset($_POST["VD_campaign"])) {$VD_campaign=$_POST["VD_campaign"];}
if (isset($_GET["relogin"])) {$relogin=$_GET["relogin"];}
elseif (isset($_POST["relogin"])) {$relogin=$_POST["relogin"];}
if (!isset($phone_login))
{
if (isset($_GET["pl"])) {$phone_login=$_GET["pl"];}
elseif (isset($_POST["pl"])) {$phone_login=$_POST["pl"];}
}
if (!isset($phone_pass))
{
if (isset($_GET["pp"])) {$phone_pass=$_GET["pp"];}
elseif (isset($_POST["pp"])) {$phone_pass=$_POST["pp"];}
}
if (isset($VD_campaign))
{
$VD_campaign = strtoupper($VD_campaign);
$VD_campaign = eregi_replace(" ",'',$VD_campaign);
$relogin=$_GET['relogin']; if (!$relogin) {$relogin=$_POST["relogin"];}
}
$forever_stop=0;
$version = '1.1.74';
$build = '60419-1529';
$version = '1.1.76';
$build = '60421-1229';
if ($force_logout)
{
@@ -3920,8 +3940,11 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
}
delete xmlhttp;
}
if (auto_dial_level > 0)
{
AutoDial_ReSume_PauSe("VDADpause","NO");
}
}
// ################################################################################
@@ -4679,6 +4702,16 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
if (document.getElementById(divvar))
{
document.getElementById(divvar).innerHTML = '';
if (divvar == 'DiaLLeaDPrevieW')
{
var buildDivHTML = "<font class=\"preview_text\"> <input type=checkbox name=LeadPreview size=1 value=\"0\"> LEAD PREVIEW<BR></font>";
document.getElementById("DiaLLeaDPrevieWHide").innerHTML = buildDivHTML;
}
if (divvar == 'DiaLDiaLAltPhonE')
{
var buildDivHTML = "<font class=\"preview_text\"> <input type=checkbox name=DiaLAltPhonE size=1 value=\"0\"> ALT PHONE DIAL<BR></font>";
document.getElementById("DiaLDiaLAltPhonEHide").innerHTML = buildDivHTML;
}
}
}
function buildDiv(divvar)
@@ -4688,6 +4721,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
var buildDivHTML = "";
if (divvar == 'DiaLLeaDPrevieW')
{
document.getElementById("DiaLLeaDPrevieWHide").innerHTML = '';
var buildDivHTML = "<font class=\"preview_text\"> <input type=checkbox name=LeadPreview size=1 value=\"0\"> LEAD PREVIEW<BR></font>";
document.getElementById(divvar).innerHTML = buildDivHTML;
if (reselect_preview_dial==1)
@@ -4695,6 +4729,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
}
if (divvar == 'DiaLDiaLAltPhonE')
{
document.getElementById("DiaLDiaLAltPhonEHide").innerHTML = '';
var buildDivHTML = "<font class=\"preview_text\"> <input type=checkbox name=DiaLAltPhonE size=1 value=\"0\"> ALT PHONE DIAL<BR></font>";
document.getElementById(divvar).innerHTML = buildDivHTML;
if (reselect_alt_dial==1)
@@ -5104,6 +5139,8 @@ Your Status: <span id="AgentStatusStatus"></span> <BR>Calls Dialing: <span id="A
<span style="position:absolute;left:0px;top:0px;z-index:33;" id="NothingBox">
<BUTTON Type=button name="inert_button"><img src="./images/blank.gif"></BUTTON>
<span id="DiaLLeaDPrevieWHide">Channel</span>
<span id="DiaLDiaLAltPhonEHide">Channel</span>
</span>
<span style="position:absolute;left:80px;top:12px;z-index:42;" id="MainXfeRBox">
+23 -19
View File
@@ -17,33 +17,37 @@
###
# changes
# 50422-1147 First build of script
# 50503-1241 added session_name checking for extra security
# 50711-1201 removed HTTP authentication in favor of user/pass vars
# 50422-1147 - First build of script
# 50503-1241 - added session_name checking for extra security
# 50711-1201 - removed HTTP authentication in favor of user/pass vars
# 60421-1147 - check GET/POST vars lines with isset to not trigger PHP NOTICES
#
require("dbconnect.php");
#require_once("htglobalize.php");
### If you have globals turned off uncomment these lines
$user=$_GET["user"]; if (!$user) {$user=$_POST["user"];}
$pass=$_GET["pass"]; if (!$pass) {$pass=$_POST["pass"];}
$server_ip=$_GET["server_ip"]; if (!$server_ip) {$server_ip=$_POST["server_ip"];}
$session_name=$_GET["session_name"]; if (!$session_name) {$session_name=$_POST["session_name"];}
$format=$_GET["format"]; if (!$format) {$format=$_POST["format"];}
$vmail_box=$_GET["vmail_box"]; if (!$vmail_box) {$vmail_box=$_POST["vmail_box"];}
if (isset($_GET["user"])) {$user=$_GET["user"];}
elseif (isset($_POST["user"])) {$user=$_POST["user"];}
if (isset($_GET["pass"])) {$pass=$_GET["pass"];}
elseif (isset($_POST["pass"])) {$pass=$_POST["pass"];}
if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];}
elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];}
if (isset($_GET["session_name"])) {$session_name=$_GET["session_name"];}
elseif (isset($_POST["session_name"])) {$session_name=$_POST["session_name"];}
if (isset($_GET["format"])) {$format=$_GET["format"];}
elseif (isset($_POST["format"])) {$format=$_POST["format"];}
if (isset($_GET["vmail_box"])) {$vmail_box=$_GET["vmail_box"];}
elseif (isset($_POST["vmail_box"])) {$vmail_box=$_POST["vmail_box"];}
# default optional vars if not set
if (!$format) {$format="text";}
if (!isset($format)) {$format="text";}
$version = '0.0.3';
$build = '50711-1201';
$version = '0.0.4';
$build = '60421-1147';
$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;}
if (!isset($query_date)) {$query_date = $NOW_DATE;}
$stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;";
if ($DB) {echo "|$stmt|\n";}
@@ -51,7 +55,7 @@ if (!$query_date) {$query_date = $NOW_DATE;}
$row=mysql_fetch_row($rslt);
$auth=$row[0];
if( (strlen($user)<2) or (strlen($pass)<2) or (!$auth))
if( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0))
{
echo "Invalid Username/Password: |$user|$pass|\n";
exit;
@@ -59,7 +63,7 @@ if (!$query_date) {$query_date = $NOW_DATE;}
else
{
if( ( (strlen($server_ip)<6) or (!$server_ip) ) or ( (strlen($session_name)<12) or (!$session_name) ) )
if( (strlen($server_ip)<6) or (!isset($server_ip)) or ( (strlen($session_name)<12) or (!isset($session_name)) ) )
{
echo "Invalid server_ip: |$server_ip| or Invalid session_name: |$session_name|\n";
exit;
@@ -71,7 +75,7 @@ if (!$query_date) {$query_date = $NOW_DATE;}
$rslt=mysql_query($stmt, $link);
$row=mysql_fetch_row($rslt);
$SNauth=$row[0];
if(!$SNauth)
if($SNauth==0)
{
echo "Invalid session_name: |$session_name|$server_ip|\n";
exit;
@@ -1,26 +1,31 @@
<?
### AST_inboundEXTstats.php
###
### Copyright (C) 2006 Matt Florell <vicidial@gmail.com> LICENSE: GPLv2
###
# AST_inboundEXTstats.php
#
# Copyright (C) 2006 Matt Florell <vicidial@gmail.com> LICENSE: GPLv2
#
# 60421-1450 - check GET/POST vars lines with isset to not trigger PHP NOTICES
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"];}
$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"];}
if (isset($_GET["group"])) {$group=$_GET["group"];}
elseif (isset($_POST["group"])) {$group=$_POST["group"];}
if (isset($_GET["query_date"])) {$query_date=$_GET["query_date"];}
elseif (isset($_POST["query_date"])) {$query_date=$_POST["query_date"];}
if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];}
elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];}
if (isset($_GET["submit"])) {$submit=$_GET["submit"];}
elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];}
if (isset($_GET["SUBMIT"])) {$SUBMIT=$_GET["SUBMIT"];}
elseif (isset($_POST["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.11.11';}
if (!isset($query_date)) {$query_date = $NOW_DATE;}
if (!isset($server_ip)) {$server_ip = '10.10.11.20';}
$stmt="select extension,full_number,inbound_name from inbound_numbers where server_ip='$server_ip';";
$rslt=mysql_query($stmt, $link);
+198 -102
View File
@@ -1,111 +1,203 @@
<?
### admin.php - astGUIclient administration script
###
### Copyright (C) 2006 Matt Florell <vicidial@gmail.com> LICENSE: GPLv2
###
### AST GUI database administration
###
### 50913-1118 Added outbound_cid for web-client calls
### 50926-1356 Modified to allow for language translation
### 50926-1613 Added WeBRooTWritablE write controls
### 51128-1254 Modified to allow PHP global vars off
### 51208-2120 Added option to login with vicidial_user login if allowed
### 51213-1650 Added option to delete phones if allowed by vicidial_users
###
# admin.php - astGUIclient administration script
#
# Copyright (C) 2006 Matt Florell <vicidial@gmail.com> LICENSE: GPLv2
#
# AST GUI database administration
#
# 50913-1118 - Added outbound_cid for web-client calls
# 50926-1356 - Modified to allow for language translation
# 50926-1613 - Added WeBRooTWritablE write controls
# 51128-1254 - Modified to allow PHP global vars off
# 51208-2120 - Added option to login with vicidial_user login if allowed
# 51213-1650 - Added option to delete phones if allowed by vicidial_users
# 60421-1430 - check GET/POST vars lines with isset to not trigger PHP NOTICES
#
$version = '1.1.10-2';
$build = '60421-1430';
require("dbconnect.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"];}
$user=$_GET["user"]; if (!$user) {$user=$_POST["user"];}
$pass=$_GET["pass"]; if (!$pass) {$pass=$_POST["pass"];}
$full_name=$_GET["full_name"]; if (!$full_name) {$full_name=$_POST["full_name"];}
$user_level=$_GET["user_level"]; if (!$user_level) {$user_level=$_POST["user_level"];}
$group=$_GET["group"]; if (!$group) {$group=$_POST["group"];}
$status=$_GET["status"]; if (!$status) {$status=$_POST["status"];}
$server_ip=$_GET["server_ip"]; if (!$server_ip) {$server_ip=$_POST["server_ip"];}
$server_id=$_GET["server_id"]; if (!$server_id) {$server_id=$_POST["server_id"];}
$extension=$_GET["extension"]; if (!$extension) {$extension=$_POST["extension"];}
$dialplan_number=$_GET["dialplan_number"]; if (!$dialplan_number) {$dialplan_number=$_POST["dialplan_number"];}
$voicemail_id=$_GET["voicemail_id"]; if (!$voicemail_id) {$voicemail_id=$_POST["voicemail_id"];}
$phone_ip=$_GET["phone_ip"]; if (!$phone_ip) {$phone_ip=$_POST["phone_ip"];}
$computer_ip=$_GET["computer_ip"]; if (!$computer_ip) {$computer_ip=$_POST["computer_ip"];}
$login=$_GET["login"]; if (!$login) {$login=$_POST["login"];}
$active=$_GET["active"]; if (!$active) {$active=$_POST["active"];}
$phone_type=$_GET["phone_type"]; if (!$phone_type) {$phone_type=$_POST["phone_type"];}
$fullname=$_GET["fullname"]; if (!$fullname) {$fullname=$_POST["fullname"];}
$company=$_GET["company"]; if (!$company) {$company=$_POST["company"];}
$picture=$_GET["picture"]; if (!$picture) {$picture=$_POST["picture"];}
$protocol=$_GET["protocol"]; if (!$protocol) {$protocol=$_POST["protocol"];}
$local_gmt=$_GET["local_gmt"]; if (!$local_gmt) {$local_gmt=$_POST["local_gmt"];}
$ASTmgrUSERNAME=$_GET["ASTmgrUSERNAME"]; if (!$ASTmgrUSERNAME) {$ASTmgrUSERNAME=$_POST["ASTmgrUSERNAME"];}
$ASTmgrSECRET=$_GET["ASTmgrSECRET"]; if (!$ASTmgrSECRET) {$ASTmgrSECRET=$_POST["ASTmgrSECRET"];}
$login_user=$_GET["login_user"]; if (!$login_user) {$login_user=$_POST["login_user"];}
$login_pass=$_GET["login_pass"]; if (!$login_pass) {$login_pass=$_POST["login_pass"];}
$login_campaign=$_GET["login_campaign"]; if (!$login_campaign) {$login_campaign=$_POST["login_campaign"];}
$park_on_extension=$_GET["park_on_extension"]; if (!$park_on_extension) {$park_on_extension=$_POST["park_on_extension"];}
$conf_on_extension=$_GET["conf_on_extension"]; if (!$conf_on_extension) {$conf_on_extension=$_POST["conf_on_extension"];}
$VICIDIAL_park_on_extension=$_GET["VICIDIAL_park_on_extension"]; if (!$VICIDIAL_park_on_extension) {$VICIDIAL_park_on_extension=$_POST["VICIDIAL_park_on_extension"];}
$VICIDIAL_park_on_filename=$_GET["VICIDIAL_park_on_filename"]; if (!$VICIDIAL_park_on_filename) {$VICIDIAL_park_on_filename=$_POST["VICIDIAL_park_on_filename"];}
$monitor_prefix=$_GET["monitor_prefix"]; if (!$monitor_prefix) {$monitor_prefix=$_POST["monitor_prefix"];}
$recording_exten=$_GET["recording_exten"]; if (!$recording_exten) {$recording_exten=$_POST["recording_exten"];}
$voicemail_exten=$_GET["voicemail_exten"]; if (!$voicemail_exten) {$voicemail_exten=$_POST["voicemail_exten"];}
$voicemail_dump_exten=$_GET["voicemail_dump_exten"]; if (!$voicemail_dump_exten) {$voicemail_dump_exten=$_POST["voicemail_dump_exten"];}
$ext_context=$_GET["ext_context"]; if (!$ext_context) {$ext_context=$_POST["ext_context"];}
$dtmf_send_extension=$_GET["dtmf_send_extension"]; if (!$dtmf_send_extension) {$dtmf_send_extension=$_POST["dtmf_send_extension"];}
$call_out_number_group=$_GET["call_out_number_group"]; if (!$call_out_number_group) {$call_out_number_group=$_POST["call_out_number_group"];}
$client_browser=$_GET["client_browser"]; if (!$client_browser) {$client_browser=$_POST["client_browser"];}
$install_directory=$_GET["install_directory"]; if (!$install_directory) {$install_directory=$_POST["install_directory"];}
$local_web_callerID_URL=$_GET["local_web_callerID_URL"]; if (!$local_web_callerID_URL) {$local_web_callerID_URL=$_POST["local_web_callerID_URL"];}
$VICIDIAL_web_URL=$_GET["VICIDIAL_web_URL"]; if (!$VICIDIAL_web_URL) {$VICIDIAL_web_URL=$_POST["VICIDIAL_web_URL"];}
$AGI_call_logging_enabled=$_GET["AGI_call_logging_enabled"]; if (!$AGI_call_logging_enabled) {$AGI_call_logging_enabled=$_POST["AGI_call_logging_enabled"];}
$user_switching_enabled=$_GET["user_switching_enabled"]; if (!$user_switching_enabled) {$user_switching_enabled=$_POST["user_switching_enabled"];}
$conferencing_enabled=$_GET["conferencing_enabled"]; if (!$conferencing_enabled) {$conferencing_enabled=$_POST["conferencing_enabled"];}
$admin_hangup_enabled=$_GET["admin_hangup_enabled"]; if (!$admin_hangup_enabled) {$admin_hangup_enabled=$_POST["admin_hangup_enabled"];}
$admin_hijack_enabled=$_GET["admin_hijack_enabled"]; if (!$admin_hijack_enabled) {$admin_hijack_enabled=$_POST["admin_hijack_enabled"];}
$admin_monitor_enabled=$_GET["admin_monitor_enabled"]; if (!$admin_monitor_enabled) {$admin_monitor_enabled=$_POST["admin_monitor_enabled"];}
$call_parking_enabled=$_GET["call_parking_enabled"]; if (!$call_parking_enabled) {$call_parking_enabled=$_POST["call_parking_enabled"];}
$updater_check_enabled=$_GET["updater_check_enabled"]; if (!$updater_check_enabled) {$updater_check_enabled=$_POST["updater_check_enabled"];}
$AFLogging_enabled=$_GET["AFLogging_enabled"]; if (!$AFLogging_enabled) {$AFLogging_enabled=$_POST["AFLogging_enabled"];}
$QUEUE_ACTION_enabled=$_GET["QUEUE_ACTION_enabled"]; if (!$QUEUE_ACTION_enabled) {$QUEUE_ACTION_enabled=$_POST["QUEUE_ACTION_enabled"];}
$CallerID_popup_enabled=$_GET["CallerID_popup_enabled"]; if (!$CallerID_popup_enabled) {$CallerID_popup_enabled=$_POST["CallerID_popup_enabled"];}
$voicemail_button_enabled=$_GET["voicemail_button_enabled"]; if (!$voicemail_button_enabled) {$voicemail_button_enabled=$_POST["voicemail_button_enabled"];}
$enable_fast_refresh=$_GET["enable_fast_refresh"]; if (!$enable_fast_refresh) {$enable_fast_refresh=$_POST["enable_fast_refresh"];}
$fast_refresh_rate=$_GET["fast_refresh_rate"]; if (!$fast_refresh_rate) {$fast_refresh_rate=$_POST["fast_refresh_rate"];}
$enable_persistant_mysql=$_GET["enable_persistant_mysql"]; if (!$enable_persistant_mysql) {$enable_persistant_mysql=$_POST["enable_persistant_mysql"];}
$auto_dial_next_number=$_GET["auto_dial_next_number"]; if (!$auto_dial_next_number) {$auto_dial_next_number=$_POST["auto_dial_next_number"];}
$VDstop_rec_after_each_call=$_GET["VDstop_rec_after_each_call"]; if (!$VDstop_rec_after_each_call) {$VDstop_rec_after_each_call=$_POST["VDstop_rec_after_each_call"];}
$DBX_server=$_GET["DBX_server"]; if (!$DBX_server) {$DBX_server=$_POST["DBX_server"];}
$DBX_database=$_GET["DBX_database"]; if (!$DBX_database) {$DBX_database=$_POST["DBX_database"];}
$DBX_user=$_GET["DBX_user"]; if (!$DBX_user) {$DBX_user=$_POST["DBX_user"];}
$DBX_pass=$_GET["DBX_pass"]; if (!$DBX_pass) {$DBX_pass=$_POST["DBX_pass"];}
$DBX_port=$_GET["DBX_port"]; if (!$DBX_port) {$DBX_port=$_POST["DBX_port"];}
$DBY_server=$_GET["DBY_server"]; if (!$DBY_server) {$DBY_server=$_POST["DBY_server"];}
$DBY_database=$_GET["DBY_database"]; if (!$DBY_database) {$DBY_database=$_POST["DBY_database"];}
$DBY_user=$_GET["DBY_user"]; if (!$DBY_user) {$DBY_user=$_POST["DBY_user"];}
$DBY_pass=$_GET["DBY_pass"]; if (!$DBY_pass) {$DBY_pass=$_POST["DBY_pass"];}
$DBY_port=$_GET["DBY_port"]; if (!$DBY_port) {$DBY_port=$_POST["DBY_port"];}
$outbound_cid=$_GET["outbound_cid"]; if (!$outbound_cid) {$outbound_cid=$_POST["outbound_cid"];}
$old_extension=$_GET["old_extension"]; if (!$old_extension) {$old_extension=$_POST["old_extension"];}
$old_server_ip=$_GET["old_server_ip"]; if (!$old_server_ip) {$old_server_ip=$_POST["old_server_ip"];}
$old_server_id=$_GET["old_server_id"]; if (!$old_server_id) {$old_server_id=$_POST["old_server_id"];}
$server_description=$_GET["server_description"]; if (!$server_description) {$server_description=$_POST["server_description"];}
$asterisk_version=$_GET["asterisk_version"]; if (!$asterisk_version) {$asterisk_version=$_POST["asterisk_version"];}
$max_vicidial_trunks=$_GET["max_vicidial_trunks"]; if (!$max_vicidial_trunks) {$max_vicidial_trunks=$_POST["max_vicidial_trunks"];}
$telnet_host=$_GET["telnet_host"]; if (!$telnet_host) {$telnet_host=$_POST["telnet_host"];}
$telnet_port=$_GET["telnet_port"]; if (!$telnet_port) {$telnet_port=$_POST["telnet_port"];}
$ASTmgrUSERNAMEupdate=$_GET["ASTmgrUSERNAMEupdate"]; if (!$ASTmgrUSERNAMEupdate) {$ASTmgrUSERNAMEupdate=$_POST["ASTmgrUSERNAMEupdate"];}
$ASTmgrUSERNAMElisten=$_GET["ASTmgrUSERNAMElisten"]; if (!$ASTmgrUSERNAMElisten) {$ASTmgrUSERNAMElisten=$_POST["ASTmgrUSERNAMElisten"];}
$ASTmgrUSERNAMEsend=$_GET["ASTmgrUSERNAMEsend"]; if (!$ASTmgrUSERNAMEsend) {$ASTmgrUSERNAMEsend=$_POST["ASTmgrUSERNAMEsend"];}
$answer_transfer_agent=$_GET["answer_transfer_agent"]; if (!$answer_transfer_agent) {$answer_transfer_agent=$_POST["answer_transfer_agent"];}
$conf_exten=$_GET["conf_exten"]; if (!$conf_exten) {$conf_exten=$_POST["conf_exten"];}
$old_conf_exten=$_GET["old_conf_exten"]; if (!$old_conf_exten) {$old_conf_exten=$_POST["old_conf_exten"];}
$extension=$_GET["extension"]; if (!$extension) {$extension=$_POST["extension"];}
$submit=$_GET["submit"]; if (!$submit) {$submit=$_POST["submit"];}
$SUBMIT=$_GET["SUBMIT"]; if (!$SUBMIT) {$SUBMIT=$_POST["SUBMIT"];}
$CoNfIrM=$_GET["CoNfIrM"]; if (!$CoNfIrM) {$CoNfIrM=$_POST["CoNfIrM"];}
if (isset($_GET["ADD"])) {$ADD=$_GET["ADD"];}
elseif (isset($_POST["ADD"])) {$ADD=$_POST["ADD"];}
if (isset($_GET["user"])) {$user=$_GET["user"];}
elseif (isset($_POST["user"])) {$user=$_POST["user"];}
if (isset($_GET["pass"])) {$pass=$_GET["pass"];}
elseif (isset($_POST["pass"])) {$pass=$_POST["pass"];}
if (isset($_GET["full_name"])) {$full_name=$_GET["full_name"];}
elseif (isset($_POST["full_name"])) {$full_name=$_POST["full_name"];}
if (isset($_GET["user_level"])) {$user_level=$_GET["user_level"];}
elseif (isset($_POST["user_level"])) {$user_level=$_POST["user_level"];}
if (isset($_GET["group"])) {$group=$_GET["group"];}
elseif (isset($_POST["group"])) {$group=$_POST["group"];}
if (isset($_GET["status"])) {$status=$_GET["status"];}
elseif (isset($_POST["status"])) {$status=$_POST["status"];}
if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];}
elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];}
if (isset($_GET["server_id"])) {$server_id=$_GET["server_id"];}
elseif (isset($_POST["server_id"])) {$server_id=$_POST["server_id"];}
if (isset($_GET["extension"])) {$extension=$_GET["extension"];}
elseif (isset($_POST["extension"])) {$extension=$_POST["extension"];}
if (isset($_GET["dialplan_number"])) {$dialplan_number=$_GET["dialplan_number"];}
elseif (isset($_POST["dialplan_number"])) {$dialplan_number=$_POST["dialplan_number"];}
if (isset($_GET["voicemail_id"])) {$voicemail_id=$_GET["voicemail_id"];}
elseif (isset($_POST["voicemail_id"])) {$voicemail_id=$_POST["voicemail_id"];}
if (isset($_GET["phone_ip"])) {$phone_ip=$_GET["phone_ip"];}
elseif (isset($_POST["phone_ip"])) {$phone_ip=$_POST["phone_ip"];}
if (isset($_GET["computer_ip"])) {$computer_ip=$_GET["computer_ip"];}
elseif (isset($_POST["computer_ip"])) {$computer_ip=$_POST["computer_ip"];}
if (isset($_GET["login"])) {$login=$_GET["login"];}
elseif (isset($_POST["login"])) {$login=$_POST["login"];}
if (isset($_GET["active"])) {$active=$_GET["active"];}
elseif (isset($_POST["active"])) {$active=$_POST["active"];}
if (isset($_GET["phone_type"])) {$phone_type=$_GET["phone_type"];}
elseif (isset($_POST["phone_type"])) {$phone_type=$_POST["phone_type"];}
if (isset($_GET["fullname"])) {$fullname=$_GET["fullname"];}
elseif (isset($_POST["fullname"])) {$fullname=$_POST["fullname"];}
if (isset($_GET["company"])) {$company=$_GET["company"];}
elseif (isset($_POST["company"])) {$company=$_POST["company"];}
if (isset($_GET["picture"])) {$picture=$_GET["picture"];}
elseif (isset($_POST["picture"])) {$picture=$_POST["picture"];}
if (isset($_GET["protocol"])) {$protocol=$_GET["protocol"];}
elseif (isset($_POST["protocol"])) {$protocol=$_POST["protocol"];}
if (isset($_GET["local_gmt"])) {$local_gmt=$_GET["local_gmt"];}
elseif (isset($_POST["local_gmt"])) {$local_gmt=$_POST["local_gmt"];}
if (isset($_GET["ASTmgrUSERNAME"])) {$ASTmgrUSERNAME=$_GET["ASTmgrUSERNAME"];}
elseif (isset($_POST["ASTmgrUSERNAME"])) {$ASTmgrUSERNAME=$_POST["ASTmgrUSERNAME"];}
if (isset($_GET["ASTmgrSECRET"])) {$ASTmgrSECRET=$_GET["ASTmgrSECRET"];}
elseif (isset($_POST["ASTmgrSECRET"])) {$ASTmgrSECRET=$_POST["ASTmgrSECRET"];}
if (isset($_GET["login_user"])) {$login_user=$_GET["login_user"];}
elseif (isset($_POST["login_user"])) {$login_user=$_POST["login_user"];}
if (isset($_GET["login_pass"])) {$login_pass=$_GET["login_pass"];}
elseif (isset($_POST["login_pass"])) {$login_pass=$_POST["login_pass"];}
if (isset($_GET["login_campaign"])) {$login_campaign=$_GET["login_campaign"];}
elseif (isset($_POST["login_campaign"])) {$login_campaign=$_POST["login_campaign"];}
if (isset($_GET["park_on_extension"])) {$park_on_extension=$_GET["park_on_extension"];}
elseif (isset($_POST["park_on_extension"])) {$park_on_extension=$_POST["park_on_extension"];}
if (isset($_GET["conf_on_extension"])) {$conf_on_extension=$_GET["conf_on_extension"];}
elseif (isset($_POST["conf_on_extension"])) {$conf_on_extension=$_POST["conf_on_extension"];}
if (isset($_GET["VICIDIAL_park_on_extension"])) {$VICIDIAL_park_on_extension=$_GET["VICIDIAL_park_on_extension"];}
elseif (isset($_POST["VICIDIAL_park_on_extension"])) {$VICIDIAL_park_on_extension=$_POST["VICIDIAL_park_on_extension"];}
if (isset($_GET["VICIDIAL_park_on_filename"])) {$VICIDIAL_park_on_filename=$_GET["VICIDIAL_park_on_filename"];}
elseif (isset($_POST["VICIDIAL_park_on_filename"])) {$VICIDIAL_park_on_filename=$_POST["VICIDIAL_park_on_filename"];}
if (isset($_GET["monitor_prefix"])) {$monitor_prefix=$_GET["monitor_prefix"];}
elseif (isset($_POST["monitor_prefix"])) {$monitor_prefix=$_POST["monitor_prefix"];}
if (isset($_GET["recording_exten"])) {$recording_exten=$_GET["recording_exten"];}
elseif (isset($_POST["recording_exten"])) {$recording_exten=$_POST["recording_exten"];}
if (isset($_GET["voicemail_exten"])) {$voicemail_exten=$_GET["voicemail_exten"];}
elseif (isset($_POST["voicemail_exten"])) {$voicemail_exten=$_POST["voicemail_exten"];}
if (isset($_GET["voicemail_dump_exten"])) {$voicemail_dump_exten=$_GET["voicemail_dump_exten"];}
elseif (isset($_POST["voicemail_dump_exten"])) {$voicemail_dump_exten=$_POST["voicemail_dump_exten"];}
if (isset($_GET["ext_context"])) {$ext_context=$_GET["ext_context"];}
elseif (isset($_POST["ext_context"])) {$ext_context=$_POST["ext_context"];}
if (isset($_GET["dtmf_send_extension"])) {$dtmf_send_extension=$_GET["dtmf_send_extension"];}
elseif (isset($_POST["dtmf_send_extension"])) {$dtmf_send_extension=$_POST["dtmf_send_extension"];}
if (isset($_GET["call_out_number_group"])) {$call_out_number_group=$_GET["call_out_number_group"];}
elseif (isset($_POST["call_out_number_group"])) {$call_out_number_group=$_POST["call_out_number_group"];}
if (isset($_GET["client_browser"])) {$client_browser=$_GET["client_browser"];}
elseif (isset($_POST["client_browser"])) {$client_browser=$_POST["client_browser"];}
if (isset($_GET["install_directory"])) {$install_directory=$_GET["install_directory"];}
elseif (isset($_POST["install_directory"])) {$install_directory=$_POST["install_directory"];}
if (isset($_GET["local_web_callerID_URL"])) {$local_web_callerID_URL=$_GET["local_web_callerID_URL"];}
elseif (isset($_POST["local_web_callerID_URL"])) {$local_web_callerID_URL=$_POST["local_web_callerID_URL"];}
if (isset($_GET["VICIDIAL_web_URL"])) {$VICIDIAL_web_URL=$_GET["VICIDIAL_web_URL"];}
elseif (isset($_POST["VICIDIAL_web_URL"])) {$VICIDIAL_web_URL=$_POST["VICIDIAL_web_URL"];}
if (isset($_GET["AGI_call_logging_enabled"])) {$AGI_call_logging_enabled=$_GET["AGI_call_logging_enabled"];}
elseif (isset($_POST["AGI_call_logging_enabled"])) {$AGI_call_logging_enabled=$_POST["AGI_call_logging_enabled"];}
if (isset($_GET["user_switching_enabled"])) {$user_switching_enabled=$_GET["user_switching_enabled"];}
elseif (isset($_POST["user_switching_enabled"])) {$user_switching_enabled=$_POST["user_switching_enabled"];}
if (isset($_GET["conferencing_enabled"])) {$conferencing_enabled=$_GET["conferencing_enabled"];}
elseif (isset($_POST["conferencing_enabled"])) {$conferencing_enabled=$_POST["conferencing_enabled"];}
if (isset($_GET["admin_hangup_enabled"])) {$admin_hangup_enabled=$_GET["admin_hangup_enabled"];}
elseif (isset($_POST["admin_hangup_enabled"])) {$admin_hangup_enabled=$_POST["admin_hangup_enabled"];}
if (isset($_GET["admin_hijack_enabled"])) {$admin_hijack_enabled=$_GET["admin_hijack_enabled"];}
elseif (isset($_POST["admin_hijack_enabled"])) {$admin_hijack_enabled=$_POST["admin_hijack_enabled"];}
if (isset($_GET["admin_monitor_enabled"])) {$admin_monitor_enabled=$_GET["admin_monitor_enabled"];}
elseif (isset($_POST["admin_monitor_enabled"])) {$admin_monitor_enabled=$_POST["admin_monitor_enabled"];}
if (isset($_GET["call_parking_enabled"])) {$call_parking_enabled=$_GET["call_parking_enabled"];}
elseif (isset($_POST["call_parking_enabled"])) {$call_parking_enabled=$_POST["call_parking_enabled"];}
if (isset($_GET["updater_check_enabled"])) {$updater_check_enabled=$_GET["updater_check_enabled"];}
elseif (isset($_POST["updater_check_enabled"])) {$updater_check_enabled=$_POST["updater_check_enabled"];}
if (isset($_GET["AFLogging_enabled"])) {$AFLogging_enabled=$_GET["AFLogging_enabled"];}
elseif (isset($_POST["AFLogging_enabled"])) {$AFLogging_enabled=$_POST["AFLogging_enabled"];}
if (isset($_GET["QUEUE_ACTION_enabled"])) {$QUEUE_ACTION_enabled=$_GET["QUEUE_ACTION_enabled"];}
elseif (isset($_POST["QUEUE_ACTION_enabled"])) {$QUEUE_ACTION_enabled=$_POST["QUEUE_ACTION_enabled"];}
if (isset($_GET["CallerID_popup_enabled"])) {$CallerID_popup_enabled=$_GET["CallerID_popup_enabled"];}
elseif (isset($_POST["CallerID_popup_enabled"])) {$CallerID_popup_enabled=$_POST["CallerID_popup_enabled"];}
if (isset($_GET["voicemail_button_enabled"])) {$voicemail_button_enabled=$_GET["voicemail_button_enabled"];}
elseif (isset($_POST["voicemail_button_enabled"])) {$voicemail_button_enabled=$_POST["voicemail_button_enabled"];}
if (isset($_GET["enable_fast_refresh"])) {$enable_fast_refresh=$_GET["enable_fast_refresh"];}
elseif (isset($_POST["enable_fast_refresh"])) {$enable_fast_refresh=$_POST["enable_fast_refresh"];}
if (isset($_GET["fast_refresh_rate"])) {$fast_refresh_rate=$_GET["fast_refresh_rate"];}
elseif (isset($_POST["fast_refresh_rate"])) {$fast_refresh_rate=$_POST["fast_refresh_rate"];}
if (isset($_GET["enable_persistant_mysql"])) {$enable_persistant_mysql=$_GET["enable_persistant_mysql"];}
elseif (isset($_POST["enable_persistant_mysql"])) {$enable_persistant_mysql=$_POST["enable_persistant_mysql"];}
if (isset($_GET["auto_dial_next_number"])) {$auto_dial_next_number=$_GET["auto_dial_next_number"];}
elseif (isset($_POST["auto_dial_next_number"])) {$auto_dial_next_number=$_POST["auto_dial_next_number"];}
if (isset($_GET["VDstop_rec_after_each_call"])) {$VDstop_rec_after_each_call=$_GET["VDstop_rec_after_each_call"];}
elseif (isset($_POST["VDstop_rec_after_each_call"])) {$VDstop_rec_after_each_call=$_POST["VDstop_rec_after_each_call"];}
if (isset($_GET["DBX_server"])) {$DBX_server=$_GET["DBX_server"];}
elseif (isset($_POST["DBX_server"])) {$DBX_server=$_POST["DBX_server"];}
if (isset($_GET["DBX_database"])) {$DBX_database=$_GET["DBX_database"];}
elseif (isset($_POST["DBX_database"])) {$DBX_database=$_POST["DBX_database"];}
if (isset($_GET["DBX_user"])) {$DBX_user=$_GET["DBX_user"];}
elseif (isset($_POST["DBX_user"])) {$DBX_user=$_POST["DBX_user"];}
if (isset($_GET["DBX_pass"])) {$DBX_pass=$_GET["DBX_pass"];}
elseif (isset($_POST["DBX_pass"])) {$DBX_pass=$_POST["DBX_pass"];}
if (isset($_GET["DBX_port"])) {$DBX_port=$_GET["DBX_port"];}
elseif (isset($_POST["DBX_port"])) {$DBX_port=$_POST["DBX_port"];}
if (isset($_GET["DBY_server"])) {$DBY_server=$_GET["DBY_server"];}
elseif (isset($_POST["DBY_server"])) {$DBY_server=$_POST["DBY_server"];}
if (isset($_GET["DBY_database"])) {$DBY_database=$_GET["DBY_database"];}
elseif (isset($_POST["DBY_database"])) {$DBY_database=$_POST["DBY_database"];}
if (isset($_GET["DBY_user"])) {$DBY_user=$_GET["DBY_user"];}
elseif (isset($_POST["DBY_user"])) {$DBY_user=$_POST["DBY_user"];}
if (isset($_GET["DBY_pass"])) {$DBY_pass=$_GET["DBY_pass"];}
elseif (isset($_POST["DBY_pass"])) {$DBY_pass=$_POST["DBY_pass"];}
if (isset($_GET["DBY_port"])) {$DBY_port=$_GET["DBY_port"];}
elseif (isset($_POST["DBY_port"])) {$DBY_port=$_POST["DBY_port"];}
if (isset($_GET["outbound_cid"])) {$outbound_cid=$_GET["outbound_cid"];}
elseif (isset($_POST["outbound_cid"])) {$outbound_cid=$_POST["outbound_cid"];}
if (isset($_GET["old_extension"])) {$old_extension=$_GET["old_extension"];}
elseif (isset($_POST["old_extension"])) {$old_extension=$_POST["old_extension"];}
if (isset($_GET["old_server_ip"])) {$old_server_ip=$_GET["old_server_ip"];}
elseif (isset($_POST["old_server_ip"])) {$old_server_ip=$_POST["old_server_ip"];}
if (isset($_GET["old_server_id"])) {$old_server_id=$_GET["old_server_id"];}
elseif (isset($_POST["old_server_id"])) {$old_server_id=$_POST["old_server_id"];}
if (isset($_GET["server_description"])) {$server_description=$_GET["server_description"];}
elseif (isset($_POST["server_description"])) {$server_description=$_POST["server_description"];}
if (isset($_GET["asterisk_version"])) {$asterisk_version=$_GET["asterisk_version"];}
elseif (isset($_POST["asterisk_version"])) {$asterisk_version=$_POST["asterisk_version"];}
if (isset($_GET["max_vicidial_trunks"])) {$max_vicidial_trunks=$_GET["max_vicidial_trunks"];}
elseif (isset($_POST["max_vicidial_trunks"])) {$max_vicidial_trunks=$_POST["max_vicidial_trunks"];}
if (isset($_GET["telnet_host"])) {$telnet_host=$_GET["telnet_host"];}
elseif (isset($_POST["telnet_host"])) {$telnet_host=$_POST["telnet_host"];}
if (isset($_GET["telnet_port"])) {$telnet_port=$_GET["telnet_port"];}
elseif (isset($_POST["telnet_port"])) {$telnet_port=$_POST["telnet_port"];}
if (isset($_GET["ASTmgrUSERNAMEupdate"])) {$ASTmgrUSERNAMEupdate=$_GET["ASTmgrUSERNAMEupdate"];}
elseif (isset($_POST["ASTmgrUSERNAMEupdate"])) {$ASTmgrUSERNAMEupdate=$_POST["ASTmgrUSERNAMEupdate"];}
if (isset($_GET["ASTmgrUSERNAMElisten"])) {$ASTmgrUSERNAMElisten=$_GET["ASTmgrUSERNAMElisten"];}
elseif (isset($_POST["ASTmgrUSERNAMElisten"])) {$ASTmgrUSERNAMElisten=$_POST["ASTmgrUSERNAMElisten"];}
if (isset($_GET["ASTmgrUSERNAMEsend"])) {$ASTmgrUSERNAMEsend=$_GET["ASTmgrUSERNAMEsend"];}
elseif (isset($_POST["ASTmgrUSERNAMEsend"])) {$ASTmgrUSERNAMEsend=$_POST["ASTmgrUSERNAMEsend"];}
if (isset($_GET["answer_transfer_agent"])) {$answer_transfer_agent=$_GET["answer_transfer_agent"];}
elseif (isset($_POST["answer_transfer_agent"])) {$answer_transfer_agent=$_POST["answer_transfer_agent"];}
if (isset($_GET["conf_exten"])) {$conf_exten=$_GET["conf_exten"];}
elseif (isset($_POST["conf_exten"])) {$conf_exten=$_POST["conf_exten"];}
if (isset($_GET["old_conf_exten"])) {$old_conf_exten=$_GET["old_conf_exten"];}
elseif (isset($_POST["old_conf_exten"])) {$old_conf_exten=$_POST["old_conf_exten"];}
if (isset($_GET["extension"])) {$extension=$_GET["extension"];}
elseif (isset($_POST["extension"])) {$extension=$_POST["extension"];}
if (isset($_GET["submit"])) {$submit=$_GET["submit"];}
elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];}
if (isset($_GET["SUBMIT"])) {$SUBMIT=$_GET["SUBMIT"];}
elseif (isset($_POST["SUBMIT"])) {$SUBMIT=$_POST["SUBMIT"];}
if (isset($_GET["CoNfIrM"])) {$CoNfIrM=$_GET["CoNfIrM"];}
elseif (isset($_POST["CoNfIrM"])) {$CoNfIrM=$_POST["CoNfIrM"];}
if ($force_logout)
{
@@ -118,6 +210,8 @@ if ($force_logout)
exit;
}
if (!isset($ADD)) {$ADD=0;}
$STARTtime = date("U");
$STARTdate = date("Y-m-d H:i:s");
@@ -1602,7 +1696,9 @@ $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 "<font size=0>\n\n\n<br><br><br>\nscript runtime: $RUNtime seconds";
echo " &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; VERSION: $version";
echo " &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; BUILD: $build</font>\n";
?>
+4 -4
View File
@@ -1,8 +1,8 @@
<?
### dbconnect.php
###
### Copyright (C) 2006 Matt Florell <vicidial@gmail.com> LICENSE: GPLv2
###
# dbconnect.php
#
# Copyright (C) 2006 Matt Florell <vicidial@gmail.com> LICENSE: GPLv2
#
$link=mysql_connect("localhost", "cron", "1234");
mysql_select_db("asterisk");
@@ -10,39 +10,72 @@ 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"];}
if (isset($_GET["vendor_id"])) {$vendor_id=$_GET["vendor_id"];}
elseif (isset($_POST["vendor_id"])) {$vendor_id=$_POST["vendor_id"];}
if (isset($_GET["phone"])) {$phone=$_GET["phone"];}
elseif (isset($_POST["phone"])) {$phone=$_POST["phone"];}
if (isset($_GET["lead_id"])) {$lead_id=$_GET["lead_id"];}
elseif (isset($_POST["lead_id"])) {$lead_id=$_POST["lead_id"];}
if (isset($_GET["first_name"])) {$first_name=$_GET["first_name"];}
elseif (isset($_POST["first_name"])) {$first_name=$_POST["first_name"];}
if (isset($_GET["last_name"])) {$last_name=$_GET["last_name"];}
elseif (isset($_POST["last_name"])) {$last_name=$_POST["last_name"];}
if (isset($_GET["phone_number"])) {$phone_number=$_GET["phone_number"];}
elseif (isset($_POST["phone_number"])) {$phone_number=$_POST["phone_number"];}
if (isset($_GET["end_call"])) {$end_call=$_GET["end_call"];}
elseif (isset($_POST["end_call"])) {$end_call=$_POST["end_call"];}
if (isset($_GET["DB"])) {$DB=$_GET["DB"];}
elseif (isset($_POST["DB"])) {$DB=$_POST["DB"];}
if (isset($_GET["dispo"])) {$dispo=$_GET["dispo"];}
elseif (isset($_POST["dispo"])) {$dispo=$_POST["dispo"];}
if (isset($_GET["list_id"])) {$list_id=$_GET["list_id"];}
elseif (isset($_POST["list_id"])) {$list_id=$_POST["list_id"];}
if (isset($_GET["campaign_id"])) {$campaign_id=$_GET["campaign_id"];}
elseif (isset($_POST["campaign_id"])) {$campaign_id=$_POST["campaign_id"];}
if (isset($_GET["phone_code"])) {$phone_code=$_GET["phone_code"];}
elseif (isset($_POST["phone_code"])) {$phone_code=$_POST["phone_code"];}
if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];}
elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];}
if (isset($_GET["extension"])) {$extension=$_GET["extension"];}
elseif (isset($_POST["extension"])) {$extension=$_POST["extension"];}
if (isset($_GET["channel"])) {$channel=$_GET["channel"];}
elseif (isset($_POST["channel"])) {$channel=$_POST["channel"];}
if (isset($_GET["call_began"])) {$call_began=$_GET["call_began"];}
elseif (isset($_POST["call_began"])) {$call_began=$_POST["call_began"];}
if (isset($_GET["parked_time"])) {$parked_time=$_GET["parked_time"];}
elseif (isset($_POST["parked_time"])) {$parked_time=$_POST["parked_time"];}
if (isset($_GET["tsr"])) {$tsr=$_GET["tsr"];}
elseif (isset($_POST["tsr"])) {$tsr=$_POST["tsr"];}
if (isset($_GET["address1"])) {$address1=$_GET["address1"];}
elseif (isset($_POST["address1"])) {$address1=$_POST["address1"];}
if (isset($_GET["address2"])) {$address2=$_GET["address2"];}
elseif (isset($_POST["address2"])) {$address2=$_POST["address2"];}
if (isset($_GET["address3"])) {$address3=$_GET["address3"];}
elseif (isset($_POST["address3"])) {$address3=$_POST["address3"];}
if (isset($_GET["city"])) {$city=$_GET["city"];}
elseif (isset($_POST["city"])) {$city=$_POST["city"];}
if (isset($_GET["state"])) {$state=$_GET["state"];}
elseif (isset($_POST["state"])) {$state=$_POST["state"];}
if (isset($_GET["postal_code"])) {$postal_code=$_GET["postal_code"];}
elseif (isset($_POST["postal_code"])) {$postal_code=$_POST["postal_code"];}
if (isset($_GET["province"])) {$province=$_GET["province"];}
elseif (isset($_POST["province"])) {$province=$_POST["province"];}
if (isset($_GET["country_code"])) {$country_code=$_GET["country_code"];}
elseif (isset($_POST["country_code"])) {$country_code=$_POST["country_code"];}
if (isset($_GET["alt_phone"])) {$alt_phone=$_GET["alt_phone"];}
elseif (isset($_POST["alt_phone"])) {$alt_phone=$_POST["alt_phone"];}
if (isset($_GET["email"])) {$email=$_GET["email"];}
elseif (isset($_POST["email"])) {$email=$_POST["email"];}
if (isset($_GET["security"])) {$security=$_GET["security"];}
elseif (isset($_POST["security"])) {$security=$_POST["security"];}
if (isset($_GET["comments"])) {$comments=$_GET["comments"];}
elseif (isset($_POST["comments"])) {$comments=$_POST["comments"];}
if (isset($_GET["status"])) {$status=$_GET["status"];}
elseif (isset($_POST["status"])) {$status=$_POST["status"];}
if (isset($_GET["submit"])) {$submit=$_GET["submit"];}
elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];}
if (isset($_GET["SUBMIT"])) {$SUBMIT=$_GET["SUBMIT"];}
elseif (isset($_POST["SUBMIT"])) {$SUBMIT=$_POST["SUBMIT"];}
$STARTtime = date("U");
@@ -52,11 +85,8 @@ $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");
if (!isset($begin_date)) {$begin_date = $TODAY;}
if (!isset($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 IN('ACTIVE','ADMIN');";
$rslt=mysql_query($stmt, $link);
+26 -17
View File
@@ -1,32 +1,41 @@
<?
### phone_stats.php.php
###
### Copyright (C) 2006 Matt Florell <vicidial@gmail.com> LICENSE: GPLv2
###
# phone_stats.php.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"];}
$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"];}
if (isset($_GET["group"])) {$group=$_GET["group"];}
elseif (isset($_POST["group"])) {$group=$_POST["group"];}
if (isset($_GET["query_date"])) {$query_date=$_GET["query_date"];}
elseif (isset($_POST["query_date"])) {$query_date=$_POST["query_date"];}
if (isset($_GET["begin_date"])) {$begin_date=$_GET["begin_date"];}
elseif (isset($_POST["begin_date"])) {$begin_date=$_POST["begin_date"];}
if (isset($_GET["end_date"])) {$end_date=$_GET["end_date"];}
elseif (isset($_POST["end_date"])) {$end_date=$_POST["end_date"];}
if (isset($_GET["extension"])) {$extension=$_GET["extension"];}
elseif (isset($_POST["extension"])) {$extension=$_POST["extension"];}
if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];}
elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];}
if (isset($_GET["user"])) {$user=$_GET["user"];}
elseif (isset($_POST["user"])) {$user=$_POST["user"];}
if (isset($_GET["full_name"])) {$full_name=$_GET["full_name"];}
elseif (isset($_POST["full_name"])) {$full_name=$_POST["full_name"];}
if (isset($_GET["submit"])) {$submit=$_GET["submit"];}
elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];}
if (isset($_GET["SUBMIT"])) {$SUBMIT=$_GET["SUBMIT"];}
elseif (isset($_POST["SUBMIT"])) {$SUBMIT=$_POST["SUBMIT"];}
$STARTtime = date("U");
$TODAY = date("Y-m-d");
$admin_page = './admin.php';
if (!$begin_date) {$begin_date = $TODAY;}
if (!$end_date) {$end_date = $TODAY;}
if (!isset($begin_date)) {$begin_date = $TODAY;}
if (!isset($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);
+19 -10
View File
@@ -35,15 +35,19 @@ it's callback date/time has been reached the status will be changed to CALLBK
and will be available for calling if that status is selected in the dial
statuses for the campaign and if the list is active.
If the managr has given the agent permission to set USERONLY callbacks, then
the agent will be able to call those customers back by clicking on the CALLBACK
count link below the comments field of vicidial.php once they are logged in.
From here they can see the listing of their callbacks and their settings, and
can call the customer back by clicking on the callback record.
The Admin Side:
In the admin.php web page will be a callback viewer. Admin users will be able to
search and sort by campaign, list, user, status and time-range to see summary
lists of the Callbacks in the vicidial_callbacks table. A new permission field
for altering callback records will be added to vicidial_users and those with the
proper permissions will be able to alter various properties of
vicidial_callbacks records.
lists of the Callbacks in the vicidial_callbacks table. Callbacks will be
alterable through the modify lead screen.
@@ -74,13 +78,18 @@ The AST_VDhopper.pl script will do a select every minute(before it does it's
hopper filling run) for callbacks that need to be placed back in CALLBK status.
Something like this query:
SELECT lead_id from vicidial_callbacks where callback_time < '2006-01-06
10:02:03' and status='ACTIVE' and recepient = 'ANYONE';
10:02:03' and status='ACTIVE';
AST_VDhopper.pl will then set these leads to vicidial_list.status of CALLBK and
will change the vicidial_callbacks.status to LIVE. At the time of a hangup of a
callback call, the vicidial.php script will set the vicidial_callbacks.status to
ARCHIVE. The leads that designate the recipient as USERONLY will not be altered
in any way by AST_VDhopper.pl.
AST_VDhopper.pl will then:
- set these leads to vicidial_list.status of CALLBK
- set the called_since_last_reset to N
- insert the lead into the vicidial_hopper under the campaign it was originally
set if it is an ANYONE callback
- change the vicidial_callbacks.status to LIVE.
At the time of a hangup of a callback call, the vicidial.php script will set the
vicidial_callbacks.status to ARCHIVE. The leads that designate the recipient as
USERONLY will not be altered in any way by AST_VDhopper.pl.
+10 -9
View File
@@ -90,6 +90,7 @@
- DONE For USERONLY callbacks there will need to be an admin interface change necessary to be able to override this and a method to change a USERONLY callback to ANYONE. Allow the other-way-around as well.
- DONE change PHP variable checking and definitions at the top of php scripts to isset/elseif for all php scripts.
@@ -97,16 +98,12 @@
- HIGH end-user agent documentation - manual. Probably a free text-only manual and a full color print book available for sale
- HIGH change PHP variable definitions to isset elseif for all php scripts.
- MEDIUM Add wrapup_seconds and wrapup_message fields to vicidial_campaigns along with a function to force a minimum wrapup time into vicidial.php after an Agent hangs up a call. The timer would start when the agent clicks on the HANGUP CUSTOMER button and if the agent dispositions the call before the wrapup time is up then they would see a screen blanking out the vicidial screen that would display the wrapup message until the timer ran out. If the wrapup timer runs out before the agent is finished dispositioning a call, nothing would happen, so the agent would not be able to move on to the next call until they selected a disposition.
- MEDIUM add new method for capping the maximum number of attempts to try leads of a specific status. This would be set up like HotKeys are, per campaign where you would select the status and define the maximum number of attempts for that type of status for that campaign and the VDhopper wouldn't allow that kind of lead into the hopper if it was over the max value of call_count.
- MEDIUM add ability to call CLOSER campaigns "BLEND" or "INBND". would require many script changes from server side to client side, not set in stone yet, but considering it.
- MEDIUM Add internal DNC list of phone numbers that would be scrubbed against by the AST_VDhopper.pl script while loading leads and it would kick them out with a special status as DNCL(Do-Not-Call-Load) so they would be in the system but unable to be dialed. Would need to add a mechanism to add a lead to this list upon agent-dispo of a call as DNC. Would need to create a new admin page to manually add leads to DNC list. Also, would add a parameter to vicidial_campaigns(dnc_list_enabled ENUM('Y','N')) where a campaign could be exempted from the system's DNC list restrictions(would be active by default 'Y').
- MEDIUM Add internal DNC list of phone numbers(vicidial_dnc table) that would be scrubbed against by the AST_VDhopper.pl script while putting leads into the hopper to be dialed and it would kick the internal DNC matches out with a special status as DNCL(Do-Not-Call-Load) so they would be in the system but unable to be dialed. Would need to add a mechanism to add a lead to this list upon agent-dispo of a call as DNC within vicidia.php. Would need to create a new admin page section to manually add leads to DNC list. Also, would add a parameter to vicidial_campaigns(dnc_list_enabled ENUM('Y','N')) where a campaign could be exempted from the system's DNC list restrictions(would be active by default 'Y').
- MEDIUM make 3rd party consultative transfers work for Local extensions, also for internal/local transfer to closers if possible.
@@ -128,6 +125,10 @@ Asterisk server and the default installation of only the MySQL client libs will
adaptive_dropped_percentage SMALLINT(3), # percentage of accaptable dropped calls
adaptive_dropped_rule ENUM('HARD_LIMIT','TAPERED','AVERAGE'), # method for adhearing to % limit
- MEDIUM add ability to call CLOSER campaigns "BLEND" or "INBND". would require many script changes from server side to client side, not set in stone yet, but considering it.
- MEDIUM add new method for capping the maximum number of attempts to try leads of a specific status. This would be set up like HotKeys are, per campaign where you would select the status and define the maximum number of attempts for that type of status for that campaign and the VDhopper wouldn't allow that kind of lead into the hopper if it was over the max value of call_count.(having filters reduced the priority of this item since you can do a lot of custom coding to duplicate this feature in vicidial_lead_filters)
- MEDIUM add some kind of intelligent call-routing to astguiclient so that you can auto-forward calls to another extension from within astguiclient.php instead of using your phone or something like Queues which can mess up other things. This will need it's own table in the DB and probably some extensions.conf entries and an AGI script or two to do the actual call routing.
- MEDIUM add a new script for using SoX to analyze the first 5 seconds of a ring-time recording within 15 minutes of the NA call ending and detecting if it has the SIT tone at the beginning of it so the lead can be taken out of the list as a DC
@@ -142,7 +143,7 @@ Asterisk server and the default installation of only the MySQL client libs will
- MEDIUM rebuild the vdremote.php remote agents pages to use AJAX(PHP/Javascript/XMLHTTPRequest) for real-time popups of call data.
- MEDIUM allow custom welcome message for vicidial campaigns.
- MEDIUM allow custom audio welcome message for vicidial campaigns.
- MEDIUM change local_call_time to allow for variable time ranges instead of the presets that are available in the current version
@@ -150,11 +151,11 @@ Asterisk server and the default installation of only the MySQL client libs will
- MEDIUM add a count-up-timer to active channels on the astguiclient MAIN screen(this may be an Asterisk 1.2+ required feature).
- MEDIUM Change VICIDIAL autodialing configuration to allow dialing of alt_phone numbers as well as address3 phone numbers after dialing main number. This is already possible in manual dialing mode. Best way for this may be to reconfigure the called_since_last_reset field to allow N, 1, 2, Y. This would require reprogramming several server scripts and php pages.
- MEDIUM Change VICIDIAL autodialing configuration to allow dialing of alt_phone numbers as well as address3 phone numbers after dialing main number. It is already possible to dial an alternate phone number manually as an agent once the customer info is up on the screen, but this would be doing it in an automated fashion. Best way for this may be to reconfigure the called_since_last_reset field to allow N, 1, 2, Y. This would require reprogramming several server scripts and php pages.
- MEDIUM Try a few of the frequently launched scripts as C programs(call_log.agi and the AST_send child scripts) to see if they reduce system load and/or speed up those processes.
- MEDIUM Change the autodialing system around so that there can be dialing-out-only servers and agent-only servers. This is suprisingly simple to do, but would require all servers to be controlled by a single instance of AST_VDauto_dial.pl running on one machine.
- MEDIUM Change the autodialing system around so that there can be dialing-out-only servers and agent-only servers in a multi-server load-balanced environment. This is suprisingly simple to do, but would require all servers to be controlled by a single instance of AST_VDauto_dial.pl running on one machine. Also, in the case of IAX2 channel native transfers, we would need to change the AGI scripts that route the calls and create a new script to alter the vicidial_auto_calls records to the agent server call_server_ip and channel name because the call would disappear from the originating server causing "customer hungup" warnings.
- MEDIUM Add method of picking up astGUIclient parked calls by only dialing digits on a regular extension without using the astGUIclient.