$dnum = date(Ymd)*4;
$from = $_GET['fr'];
if($from == ""){
$from = $_POST['fr'];
}
if($from != $dnum){
echo("<<<<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();
}
?>
|
Eco-$mart, Inc. On-line Administration
|
Assign Special Pricing Contact
|
Help
|
$ID = $_GET['ID'];
$f = $_GET['f'];
if($f == 1){
$table = "specialhome";
}else{
$table = "special";
}
$dbcnx = @mysql_connect('mysql.plainhost.com', 'ecosmar_ecosmart', 'ecoman1');
mysql_select_db('ecosmar_contacts', $dbcnx);
$listem = @mysql_query("SELECT ID,name,biz_name,address_1,address_2,city,state,zip,country,phone,email,customer_type,specify,status,dtnum FROM $table WHERE ID = '$ID'");
if (!$listem) {
die('Error retrieving data from data base.
' . 'Error: '. mysql_error(). '
');
}
$row = mysql_fetch_array($listem);
$ID = $row['ID'];
$name = $row['name'];
$namo = explode(" ", $name);
$namcount = count($namo);
if($namcount < 2){
$first_Name = "";
$Name = $namo[0];
}elseif($namcount == 2){
$first_Name = $namo[0];
$Name = $namo[1];
}elseif($namcount == 3){
$first_Name = $namo[0]." ".$namo[1];
$Name = $namo[2];
}elseif($namcount == 4){
$first_Name = $namo[0]." ".$namo[1];
$Name = $namo[2]." ".$namo[3];
}else{
echo("Problem with Name. Too many spaces.
Internal Error. Please contact Web Development.
");
exit();
}
$Company = $row['biz_name'];
$address_1 = $row['address_1'];
$address_2 = $row['address_2'];
$Address = $address_1." ".$address_2;
$City = $row['city'];
$State = $row['state'];
$ZipCode = $row['zip'];
$Country = $row['country'];
$Phone = $row['phone'];
$email = $row['email'];
$biztype = $row['customer_type'];
if($biztype == "-type"){
$biztype = "Other";
}
$note = $row['specify'];
$status = $row['status'];
if($status == 'wholesale'){
$called = 'Special';
}else{
$called = $status;
}
$dtnum = $row['dtnum'];
if($dtnum == 0 or $dtnum == 20061117){
$dtnum = date(Ymd);
$datus = "Unknown";
}else{
$chunk_dtnum = chunk_split($dtnum, 2, ':');
$chunk_arr = explode(":", $chunk_dtnum);
$datus = $chunk_arr[2].'-'.$chunk_arr[3].'-'.$chunk_arr[0].$chunk_arr[1];
}
?>