unauthorized domain."); exit(); } return $found; }else{ return true; } } if (!check_referer($referers)) { } ?> Eco-$mart Catalog - Assign Web Contact <<<<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 Web Contact  Help 
Could not retrieve Representative Data
' . mysql_error() .'

'; } $rowa = mysql_fetch_array($ok); $repid = $rowa['ID']; $repname1 = $rowa['first_name']; $repname2 = $rowa['last_name']; $usremail = $rowa['email']; $recipient = $usremail; $subject = "Web Contact assigned to you from ecosmartinc.com"; mysql_select_db('ecosmar_contacts', $dbcnx); $up = @mysql_query("INSERT INTO con_main SET first_Name='$first_name',Name='$last_name',Title='$Title',Company='$Company',biztype='$biztype',Phone='$Phone',Address='$Address',FAX='$FAX',City='$City',email='$email',State='$State',ZipCode='$ZipCode',dtnum='$dtnum',dtup='$dtup',usrn='$repusrn',usremail='$usremail',referred_by='Web Contact',ref_RID='$ref_RID'"); if (!$up) { echo '

Could not enter Contact in Representative Contacts
' . mysql_error() .'

'; }else{ $CID = mysql_insert_id(); $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='$dtnum'"); 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='$dtnum'"); 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='$dtnum'"); if ($ok3) {echo("

Successful Addition to this Contact Notes

"); }else{ echo ("

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

'); } } $not = @mysql_query("DELETE FROM webcontacts WHERE ID='$ID' LIMIT 1"); if (!$not){ echo ("

Error Removing Web Contact from New Web Contacts List!
". 'Error:' . mysql_error() . '

'); } mysql_select_db('ecosmar_friendly', $dbcnx); $quo = @mysql_query("INSERT INTO task SET Project_Name='$Project_Name',usrn='$repusrn',CID='$CID',contact='$Name',product='$Product',action='$action',note='$note',status='$status',due='$due',dtnum='$dtnum'"); if (!$quo){ echo ("

Error Adding Quote Request!
Error:" . mysql_error() . "

"); }else{ echo("

Quote Request Recorded

"); $message = "CONTACT TYPE: $Contact_Type" . "\n" . "PRODUCT: $Product" . "\n" . "NAME: $Name" . "\n" . "COMPANY: $Company" . "\n" . "ADDRESS: $Address" . "\n" . "CITY: $City" . "\n" . "STATE: $State" . "\n" . "ZIP: $ZipCode" . "\n" . "COUNTRY: $Country" . "\n" . "PHONE: $Phone" . "\n" . "FAX: $FAX" . "\n" . "EMAIL: $email" . "\n" . "\n" . "PROJECT TYPE: $Project_Type" . "\n" . "EST. QTY.: $est_qty $issue" . "\n" . "PROJECT DESCRIPTION:" . "\n" . "$Project_Description" . "\n" . "\n" . "This Contact has been added to your Contact List and a New Project has been started." . "\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!

"); } } ?>
 Your Contacts   All Contacts   Return to Your Page 
Eco-$mart Contacts
©2007 - Data Base Interface - Custom Built at:  kwgrubbs.com