<<<<Restricted Area>>>>" . "
Sorry, you must Log In to view this Page

"); exit(); } $usrn = $_GET['usrn']; if($usrn == ""){ $usrn = $_POST['usrn']; } if($usrn == ""){ echo("

<<<<Restricted Area>>>>" . "
Problem with your username. Please Log In again.

"); exit(); } ?>
Contacts Eco-$mart, Inc.  On-line Administration
 Assign Special Pricing Contact  Help 
Could not retrieve Representative Data
' . mysql_error() .'

'; }else{ $rowa = mysql_fetch_array($ok); $repid = $rowa['ID']; $repname1 = $rowa['first_name']; $repname2 = $rowa['last_name']; $usremail = $rowa['email']; } $regchk = mysql_query("SELECT name_1,name_2,region,director FROM repcon WHERE name_1='$repname1' and name_2='$repname2'"); if(!$regchk){ echo("Could not get regional information for email."); $recipient = $usremail; }else{ $rows = mysql_fetch_array($regchk); if($rows[2] != "" and $rows[3] == 'z'){ $getregdir = mysql_query("SELECT email FROM repcon WHERE region='$rows[2]' and director='a'"); if(!$getregdir){ echo("Could not get regional director for email."); }else{ $numrows = mysql_num_rows($getregdir); $diremail = mysql_fetch_array($getregdir); if($numrows > 0){ $recipient = $usremail.",".$diremail[0]; } } }else{ $recipient = $usremail; } } $subject = "Web Contact assigned from eco-smart.com"; mysql_select_db('ecosmar_contacts', $dbcnx); $up = @mysql_query("INSERT INTO con_main SET first_Name='$first_Name',Name='$Name',Company='$Company',biztype='$biztype',Phone='$Phone',Address='$Address',City='$City',email='$email',State='$State',ZipCode='$ZipCode',dtnum='$dtnum',dtup='$dtup',usrn='$repusrn',usremail='$usremail',referred_by='Special Pricing'"); if(!$up){ echo "

Could not enter Contact in Representative Contacts
Error: ".mysql_error()."

"; }else{ $CID = mysql_insert_id(); echo("

Successful Assignment to $repusrn

"); $ok2 = @mysql_query("INSERT INTO con_activity SET CID='$CID',act_year='$act_year',act_month='$act_month',act_day='$act_day',contact_type='$web',act_respond='$act_respond',dtnum='$dtup'"); if($ok2){ echo("

Successful Addition to Activity Report

"); }else{ echo("

Error Adding to Activity Report!
Error: ".mysql_error()."

"); } $ok2b = @mysql_query("INSERT INTO con_reactivity SET CID='$CID',react_year='0',react_month='0',react_day='0',usrn='$repusrn',dtnum='$dtup'"); if($ok2b){ echo("

Contact Flagged for Action

"); }else{ echo("

Error Flagging Contact for Action!
Error: ".mysql_error()."

"); } if($note != ""){ $ok3 = @mysql_query("INSERT INTO con_notes SET CID='$CID',Notes='$note',dtnum='$dtup'"); if($ok3){ echo("

Successful Addition to this Contact Notes

"); }else{ echo("

Error Adding Contact Notes!
Error: ".mysql_error()."

"); } $message = "CONTACT TYPE: Website Special Pricing" . "\n" . "NAME: $Namely" . "\n" . "COMPANY: $Company" . "\n" . "ADDRESS: $Address" . "\n" . "CITY: $City" . "\n" . "STATE: $State" . "\n" . "ZIP: $ZipCode" . "\n" . "COUNTRY: $Country" . "\n" . "PHONE: $Phone" . "\n" . "EMAIL: $email" . "\n" . "\n" . "This Contact has been added to your Contact List." . "\n" . "Go to Eco-\$mart On-Line Administration to View and Respond to this Contact." . "\n" . "http://www.ecosmartinc.com/ecos/ecologin.htm" . "\n"; } if (@mail($recipient, $subject, $message, "From: Matt Ross " )) { echo("

Email sent to Representative

"); }else{ echo("

Error Emailing Representative!

"); } }//ifinsertedintoconmain ?>
 Special Price Home   All Accounts   Special Accounts 
 Dealer Accounts   Distributor Accounts   Accounts on Hold 
 Web Authorized Special   Authorize New Account   Add New Account 
 Search Accounts   Help   Return to Your Page 
Eco-$mart Contacts
©2007 - Data Base Interface - Custom Built at:  kwgrubbs.com