LICENSE: GPLv2 ### require("dbconnect.php"); $PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; $PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; $PHP_SELF=$_SERVER['PHP_SELF']; $vendor_id=$_GET["vendor_id"]; if (!$vendor_id) {$vendor_id=$_POST["vendor_id"];} $phone=$_GET["phone"]; if (!$phone) {$phone=$_POST["phone"];} $lead_id=$_GET["lead_id"]; if (!$lead_id) {$lead_id=$_POST["lead_id"];} $submit=$_GET["submit"]; if (!$submit) {$submit=$_POST["submit"];} $SUBMIT=$_GET["SUBMIT"]; if (!$SUBMIT) {$SUBMIT=$_POST["SUBMIT"];} ### AST GUI database administration search for lead info ### admin_modify_lead.php # this is the administration lead information modifier screen, the administrator just needs to enter the leadID and then they can view and modify the information in the record for that lead $STARTtime = date("U"); $TODAY = date("Y-m-d"); $NOW_TIME = date("Y-m-d H:i:s"); $stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 7;"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $auth=$row[0]; if ($WeBRooTWritablE > 0) {$fp = fopen ("./project_auth_entries.txt", "a");} $date = date("r"); $ip = getenv("REMOTE_ADDR"); $browser = getenv("HTTP_USER_AGENT"); if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or (!$auth)) { Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\""); Header("HTTP/1.0 401 Unauthorized"); echo "Invalid Username/Password: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n"; exit; } else { if($auth>0) { $office_no=strtoupper($PHP_AUTH_USER); $password=strtoupper($PHP_AUTH_PW); $stmt="SELECT full_name,modify_leads from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW'"; $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $LOGfullname =$row[0]; $LOGmodify_leads =$row[1]; if ($WeBRooTWritablE > 0) { fwrite ($fp, "VICIDIAL|GOOD|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|$LOGfullname|\n"); fclose($fp); } } else { if ($WeBRooTWritablE > 0) { fwrite ($fp, "VICIDIAL|FAIL|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|\n"); fclose($fp); } } } ?> VICIDIAL ADMIN: Lead Search Lead Lookup
\n"; echo "
\n"; echo "Please enter a:
Vendor ID(vendor lead code): or \n"; echo "
a Home Phone Number: or\n"; echo "
a lead ID:

\n"; echo "
\n"; echo "\n
\n"; echo "\n"; exit; } else { if ($vendor_id) { $stmt="SELECT * from vicidial_list where vendor_lead_code='$vendor_id'"; } else { if ($phone) { $stmt="SELECT * from vicidial_list where phone_number='$phone'"; } else { if ($lead_id) { $stmt="SELECT * from vicidial_list where lead_id='$lead_id'"; } else { print "ERROR: you must search for something! Go back and search for something"; exit; } } } if (eregi('10.10.10.2',$ip)) { echo "\n\n$stmt\n\n"; } $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); if ( (strlen($row[0]) < 3) && (strlen($row[1]) < 3) ) { echo date("l F j, Y G:i:s A"); echo "\n

\n"; echo "The search variables you entered are not active in the system

\n"; echo "Please go back and double check the information you entered and submit again\n"; echo "
\n"; echo "\n"; exit; } else { echo "\n
\n\n";
		echo "lead ID: $row[0]\n";
		echo "status: $row[3]\n";
		echo "vendor_id: $row[5]\n";
		echo "last rep called: $row[4]\n";
		echo "list_id: $row[7]\n";
		echo "phone: $row[11]\n";
		echo "Name: $row[13] $row[15]\n";
		echo "City: $row[19]\n";
		echo "Security: $row[28]\n";
		echo "Comments: $row[29]\n\n";
		echo "\n";
		echo "
\n"; # https://www.vicimarketing.com/internal/back_end_sys/uk_cust_serv/index.php?person_id=$row[7]&people_packages_id=&secure_lvl=2&display=2&username=$username&passwd=$passwd echo "Click here to see the Lead Details\n"; } } $ENDtime = date("U"); $RUNtime = ($ENDtime - $STARTtime); echo "\n\n\n


\nNEW SEARCH"; echo "\n\n\n


\nscript runtime: $RUNtime seconds"; ?>