$ID = $_POST['ID'];
$name_1 = $_POST['name_1'];
$name_2 = $_POST['name_2'];
$address = $_POST['address'];
$Company = $_POST['Company'];
$city = $_POST['city'];
$state = $_POST['state'];
if($state == ""){
$warn = 'on';
$mess[] = 'No State';
}
$Country = $_POST['Country'];
if($Country == ""){
$warn = 'on';
$mess[] = 'No Country';
}
if($state == "US" OR $state == "USA"){
$Cntry = " ";
}else{
$Cntry = "
".$Country;
}
$ZipCode = $_POST['ZipCode'];
$phone = $_POST['phone'];
$email = $_POST['email'];
$Link = $_POST['Link'];
$trak = $_POST['track'];
$status = $_POST['status'];
$pay = $_POST['pay'];
$rate = $_POST['rate'];
$product = $_POST['product'];
$productname = $_POST['productname'];
$productall = $_POST['productall'];
if($productall == "all" or $product == "all:all:all"){
$product = "all";
$prodmess = "Registered Referrer for all Eco-\$mart Products.";
}else{
$prodmess = "Registered Referrer for: ".$productname;
}
$req_by = $_POST['req_by'];
$dtnum = $_POST['dtnum'];
$chunk_dtnum = chunk_split($dtnum, 2, ':');
$chunk_arr = explode(":", $chunk_dtnum);
$datus = $chunk_arr[2].'-'.$chunk_arr[3].'-'.$chunk_arr[0].$chunk_arr[1];
$newcount = $_POST['newcount'];
$newstart = $_POST['newstart'];
$drop = $_POST['drop'];
if($status == "Inactive" and $trak == 'Yes'){
$trak = "No";
$newstart = "off";
$drop = "on";
$dropnote = "Web Tracker requires Active Account.";
}else{
$dropnote = "Drops only the Web Track. Referrer remains.";
}
$since = $_POST['since'];
$wcnt = $_POST['wcnt'];
if($newcount == "on" and $drop == "on"){
$wmess = "
No Change to Web Track
Cannot Delete AND Reset";
$thru = "";
}elseif($drop == "on"){
$wmess = "
Drop Web Track for this Referrer?
".$dropnote."
Cannot be undone.";
$thru = "0";
}elseif($newstart == "on"){
$wmess = "
Start a New Web Track for this Referrer?";
$thru = "1";
}elseif($newcount == "on"){
$wmess = "
Reset this Web Track counter to 0?
".$wcnt." since ".$since;
$thru = "2";
}else{
if($trak == "Yes"){
$wmess = "
No Change
".$wcnt." since ".$since;
$thru = "";
}else{
$wmess = "
Web Tracker Off";
$thru = "";
}
}
?>