<<<<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(); } $reuse = explode(" ", $usrn); $dbcnx = mysql_connect('mysql.plainhost.com', 'ecosmar_ecosmart', 'ecoman1'); mysql_select_db('ecosmar_website', $dbcnx); $usckem = mysql_query("SELECT email from psw where first_name='$reuse[0]' and last_name='$reuse[1]'"); if(!$usckem){ echo("Error: Incomplete User Data."); exit(); }else{ $rob = mysql_fetch_array($usckem); $usremail = $rob[0]; } $tt = $_POST['tt']; if($tt == "new"){ $jewel = "refcon_new.php?usrn=".$usrn."&fr=".$dnum."&wh=".$wh; }else{ $jewel = "refcon_list.php?usrn=".$usrn."&fr=".$dnum."&wh=".$wh; } ?>
New Referrers Eco-$mart, Inc.  Eco-$mart Referrers
 Referrer Status Set?  Help 
Error adding to Referrers List.
" . 'Error: '. mysql_error(). '

'); }else{ $RID = mysql_insert_id(); echo("

Successful Addition to Eco-\$mart Referrers List. ID Assigned: $RID

"); } $out = mysql_query("DELETE FROM refcon_new WHERE ID='$ID' LIMIT 1"); if (!$out) { echo("

Error removing Contact from New Referrers List.
" . "Error: ". mysql_error(). "

"); }else{ echo("

Removed from New Referrers List.

"); } $sql = "OPTIMIZE TABLE refcon_new"; if(!$sql){ echo("

Problem Optimizing Data Base
" . "Error:" . mysql_error() . "

"); }else{ echo("

Data Base Optimization complete.

"); } $Notes = "Became Authorized Referrer. Referrer ID: ".$RID; $recordit = mysql_query("INSERT INTO con_notes SET CID='$CID',Notes='$Notes',usrn='$repusrn',dtnum='$dum'"); if(!$recordit){ $bad[] = "Could not insert contact notes."; } if($trak == "Yes"){ mysql_select_db('ecosmar_website', $dbcnx); $intrack = mysql_query("INSERT INTO webtrack SET RID='$RID',name_1='$name_1',name_2='$name_2',Company='$Company',email='$email',dom='$Link',count='0',dtup='$dtnum',dtnum='$dtnum'"); if(!$intrack){ echo("

Problem Starting Web Tracker
" . "Error:" . mysql_error() . "

"); }else{ $recipient = "mross@eco-smart.com".", "."kent@kwgrubbs.com".", ".$email; $subject = "Eco-Smart.com Web Tracker Account Started"; $message ="This is to inform you a Web Tracker Account has been started at eco-smart.com" . "\n" . "FOR:" . "\n" . "\n" . "NAME: $name" . "\n" . "COMPANY: $Company" . "\n" . "DOMAIN: $Link" . "\n" . "REFERRER ID: $RID" . "\n" . "\n" . "Visits to eco-smart.com from your website will be counted, and visitor contact with Eco-\$mart will be logged with your Referrer ID." . "\n" . "In order for visits to be counted, the link to our website must be:" . "\n" . "http://www.eco-smart.com/" . "\n" . "There are several addresses one can use to access the Eco-\$mart Website. This is the only one that counts!" . "\n" . "\n" . "View an activity report for your Referrer ID at Eco-\$mart Web Tracker. Go to:" . "\n" . "http://www.ecosmartinc.com/trak/" . "\n" . "You will need your Referrer ID to access your Web Tracker Page" . "\n" . "\n" . "Please let us know if you need assistance." . "\n" . "Matt Ross" . "\n" . "President, Eco-\$mart, Inc." . "\n" . "(888)329-2705" . "\n" . "info@eco-smart.com" . "\n" . "www.eco-smart.com" . "\n"; $headers = 'From: info@ecosmartinc.com' . "\r\n" . 'Reply-To: info@ecosmartinc.com' . "\r\n" . 'X-Mailer: PHP/' . phpversion(); if(@mail($recipient, $subject, $message, $headers)) { echo("

Webtracker Started. Referrer Code: $RID
" . "Email Notification Sent

"); }//if mail }//if successful wt insert }//if trak is yes else{// no tracking if($refstat == "Active"){ $recipients[] = "mross@eco-smart.com"; $recipients[] = "ecosmart@kwgrubbs.com"; $recipients[] = $email; foreach($recipients as $value){ $subject = "Eco-Smart.com Referrer Account Started"; $message ="This is to inform you that a Referrer Account has been started for you at Eco-Smart.com." . "\n" . "FOR:" . "\n" . "\n" . "NAME: $name" . "\n" . "COMPANY: $Company" . "\n" . "REFERRER ID: $RID" . "\n" . "\n" . "Customers who provide your Referrer ID when making a purchase $mailproduct are logged as your referral and payment will be made to you when the purchase is complete." . "\n" . "In order for your referral to be counted, the customer must include your Referrer ID when ordering." . "\n" . "Your Referrer ID should be included on any sales materials or Eco-\$mart Referrer Cards used to promote our products." . "\n" . "\n" . "View an activity report for your Referrer ID at our website. Go to:" . "\n" . "http://www.ecosmartinc.com/$prodcut1/ref/" . "\n" . "You will need your Referrer ID and the email address you gave when registering to access your Referrer Log." . "\n" . "\n" . "Please let us know if you need assistance." . "\n" . "Matt Ross" . "\n" . "President, Eco-\$mart, Inc." . "\n" . "(888)329-2705" . "\n" . "info@eco-smart.com" . "\n" . "www.eco-smart.com" . "\n"; $headers = 'From: info@ecosmartinc.com' . "\r\n" . 'Reply-To: info@ecosmartinc.com' . "\r\n" . 'X-Mailer: PHP/' . phpversion(); if(@mail($value, $subject, $message, $headers)) { echo("

Notification Sent. Referrer Code: $RID
"); }//if mail else{ echo("

Could not send notification to $value

"); }//could not send mail }//foreach recipient }//status is Active }//no tracking ?>
" . "" . "
" . "" . "
" . " Add Referrer " . "" . " New Referrers " . "" . " List Referrers " . "
" . " Your Contacts " . "" . " All Contacts " . "" . " Return to Your Page " . "
" . "
" . "Eco-$mart Products" . "
" . "" . "
©2007 - Data Base Interface - Custom Built at: " . "kwgrubbs.com" . "
"); }else{ echo("
" . "" . "
" . "" . "
" . " Eco-\$mart Administration " . "" . " New Referrers " . "
" . "
" . "Eco-$mart Products" . "
" . "" . "
©2007 - Data Base Interface - Custom Built at: " . "kwgrubbs.com" . "
"); } ?>