<<<<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(); } $first_Name = stripslashes($_POST['first_Name']); $Name = stripslashes($_POST['Name']); $Title = stripslashes($_POST['Title']); $Company = stripslashes($_POST['Company']); $mailCompany = $Company; $first_Name = htmlspecialchars($first_Name, ENT_QUOTES, 'utf-8'); $Name = htmlspecialchars($Name, ENT_QUOTES, 'utf-8'); $Title = htmlspecialchars($Title, ENT_QUOTES, 'utf-8'); $Company = htmlspecialchars($Company, ENT_QUOTES, 'utf-8'); $biztype = $_POST['biztype']; $Phone = $_POST['Phone']; $Address = stripslashes($_POST['Address']); $Address = htmlspecialchars($Address, ENT_QUOTES, 'utf-8'); $FAX = $_POST['FAX']; $City = stripslashes($_POST['City']); $City = htmlspecialchars($City, ENT_QUOTES, 'utf-8'); $email = $_POST['email']; $price_level = $_POST['price_level']; $referred_by = $_POST['referred_by']; $referee = explode(':', $referred_by); $referrer = $referee[2]; $refer = $_POST['refer']; $mkt = $_POST['mkt']; $State = $_POST['State']; $Country = $_POST['Country']; $ZipCode = $_POST['ZipCode']; $alt_con = $_POST['alt_con']; $alt_title = $_POST['alt_title']; $alt_email = $_POST['alt_email']; $Link = $_POST['Link']; $act_month = $_POST['act_month']; $act_day = $_POST['act_day']; $act_year = $_POST['act_year']; $contact_type = $_POST['contact_type']; $act_respond = $_POST['act_respond']; $react_month = $_POST['react_month']; $react_day = $_POST['react_day']; $react_year = $_POST['react_year']; $Notes = stripslashes($_POST['Notes']); $mailNotes = $Notes; $Notes = htmlspecialchars($Notes, ENT_QUOTES, 'utf-8'); $dtnum = $_POST['dtnum']; $dtup = $_POST['dtup']; $pswcon = $_POST['pswcon']; $usremail = $_POST['usremail']; $repname1 = $_POST['repname1']; $repname2 = $_POST['repname2']; $today = date("F j, Y"); $us = explode(" ", $usrn); $dbcnx = @mysql_connect('mysql.plainhost.com', 'ecosmar_ecosmart', 'ecoman1'); mysql_select_db('ecosmar_website', $dbcnx); $regionck = mysql_query("SELECT region,director FROM repcon WHERE name_1='$us[0]' AND name_2='$us[1]'"); if(!$regionck){ echo("

Could not retrieve Regional information.

"); exit(); }else{ $row = mysql_fetch_array($regionck); $region = $row['region']; $direct = $row['director']; } if($region != "" AND $direct == "z"){ $checkit = mysql_query("SELECT email FROM repcon WHERE region='$region' AND director='a'"); if(!$checkit){ echo("Could not get Regional Director information."); }else{ $rod = mysql_fetch_array($checkit); $dirmail = $rod[0]; $recipient = "info@ecosmartinc.com".","."kwgrubbs@kwgrubbs.com".",".$dirmail; } }else{ $recipient = "info@ecosmartinc.com".","."kwgrubbs@kwgrubbs.com"; } ?>
Contacts Eco-$mart, Inc.  On-line Administration
New Contact for   ~ ~
Successful Addition to Contact Data Base

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

Successful Addition to Activity Report

"); }else{echo ("

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

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

Successful Re-contact Set

"); }else{echo ("

Error Adding to Re-contact Report!
". 'Error:' . mysql_error() . '

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

Successful Addition to this Contact's Notes

"); }else{echo ("

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

'); } } $subject = "New Contact Added to Eco-\$mart Contacts"; $message = "BY: $usrn" . "\n" . "EMAIL: $usremail" . "\n" . "\n" . "-------------------------------" . "\n" . "New Contact:" . "\n" . "$first_Name $Name" . "\n" . "$mailCompany" . "\n" . "$Address" . "\n" . "$City, $State $ZipCode" . "\n" . "PHONE: $Phone" . "\n" . "EMAIL: $email" . "\n" . "BUSINESS TYPE: $biztype" . "\n" . "\n" . "NOTE: $mailNotes" . "\n" . "-------------------------------" . "\n" . "\n" . "View or Edit this Contact in Eco-\$mart Contacts On-line:" . "\n" . "Go to http://www.ecosmartinc.com/ecos/ecologin.htm" . "\n"; if(@mail($recipient, $subject, $message, "From: $usrn <$usremail>")){ echo("

Administration Notification Sent

"); }else{ echo ("

Error Sending Notice of New Contact!
". 'Error:' . error() . '

'); } }else{echo ("

Error Adding Contact to Data Base!
". 'Error:' . mysql_error() . '

'); } ?>
Eco-$mart Contact Options
» Register Contact with Manufacturer « 
» Register Contact as an Eco-$mart Dealer « 
» Request Referral Payments TO THIS CONTACT « 
» Start a New Project for this Contact « 
 Your Contacts   New Contact  Search Your Contacts
Get CSV Help  Return to Your Page 
Eco-$mart Products
©2007 - Data Base Interface - Custom Built at:  kwgrubbs.com