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(); } ?>
Close this Window

Eco-$mart Contacts
Web Contacts

 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 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'"); 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($memo !=""){ $ok3 = @mysql_query("INSERT INTO con_notes SET CID='$CID',Notes='$memo',dtnum='$dtnum'"); if ($ok3) {echo("

Successful Addition to this Contact Notes

"); }else{echo ("

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

'); } if($Contact_Type == 'Quote Request'){ mysql_select_db('ecosmar_friendly', $dbcnx); $Project_ID = $dtnum.$repid.$CID.$item_no; $quo = @mysql_query("INSERT INTO quote SET CID='$CID',Project_ID='$Project_ID',Project_Type='$Project_Type',Project_Description='$Project_Description',Product='$Product',item_no='$item_no',est_qty='$est_qty',issue='$issue',repusrn='$repusrn',dtnum='$dtnum'"); if ($quo) {echo("

Quote Request Recorded

"); }else{echo ("

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

'); } $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 Code: $ZipCode" . "\n" . "Country: $Country" . "\n" . "Phone: $Phone" . "\n" . "FAX: $FAX" . "\n" . "Email: $email" . "\n" . "\n" . "Project_Type: $Project_Type" . "\n" . "Estimated Quantity Required: $est_qty $issue" . "\n" . "Project_Description:" . "\n" . "$Project_Des" . "\n" . "\n" . "Go to Eco-\$mart On-Line Administration to View and Respond to this Contact." . "\n" . "www.ecosmartinc.com/ecos/ecologin.htm" . "\n"; }else{ $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 Code: $ZipCode" . "\n" . "Country: $Country" . "\n" . "Phone: $Phone" . "\n" . "FAX: $FAX" . "\n" . "Email: $email" . "\n" . "\n" . "Go to Eco-\$mart On-Line Administration to View and Respond to this Contact." . "\n" . "www.ecosmartinc.com/ecos/ecologin.htm" . "\n"; } if (@mail($recipient, $subject, $message, "From: $Name <$email>" )) { echo("

Email sent to Representative

"); }else{ echo("

Error Emailing Representative!

"); } } } ?>
 Eco-$mart Administration   Web Contacts   Close 
Eco-$mart Products
©2006 - Data Base Interface - Custom Built at:  kwgrubbs.com