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,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