$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
|
HELP
Search Special Pricing Accounts Results
|
$db = $_POST['db'];
if($db == 'special'){
$linkedit = 'specialedit.php';
$linkdel = 'specialdelete.php';
}else{
$linkedit = 'specialedithome.php';
$linkdel = 'specialdeletehome.php';
}
$by = $_POST['by'];
$for = $_POST['for'];
$dbcnx = @mysql_connect('mysql.plainhost.com', 'ecosmar_ecosmart', 'ecoman1');
mysql_select_db('ecosmar_contacts', $dbcnx);
$search = @mysql_query("SELECT ID,name,biz_name,zip,phone,email,status FROM $db WHERE $by = '$for'");
if (!$search){
echo("Error Searching the Data Base! " .
"Error: " . mysql_error() . " |
");
}else{
$count = mysql_num_rows($search);
if($count < 1 or $count == ""){
echo("No Results Found |
");
}else{
while ($result = mysql_fetch_array($search)) {
$id = $result['ID'];
$name = $result['name'];
$namecut = explode(" ", $name);
$result = count($namecut);
if($result == 2){
$Name1 = $namecut[0];
$Name1a = " ";
$Name2 = $namecut[1];
}elseif($result == 3){
$Name1 = $namecut[0];
$Name1a = $namecut[1];
$Name2 = $namecut[2];
}else{
$Name1 = 'One';
$Name1a = 'Name';
$Name2 = $namecut[0];
}
$biz_name = $result['biz_name'];
$zip = $result['zip'];
$phone = $result['phone'];
$email = $result['email'];
$status = $result['status'];
if($status == 'wholesale'){
$status = 'special';
}
$BID[] = $id;
$BNAME1[] = $Name1;
$BNAME1a[] = $Name1a;
$BNAME2[] = $Name2;
$BBIZ[] = $bizname;
$BZIP[] = $zip;
$BPHONE[] = $phone;
$BMAIL[] = $email;
$BSTAT[] = $status;
}
natcasesort($BNAME2);
foreach ($BNAME2 as $key => $val) {
echo("$BNAME1[$key] $BNAME1a[$key] $val | " .
"$BBIZ[$key] | $BSTAT[$key] | $BPHONE[$key] | $BMAIL[$key] | " .
" Edit " .
" DEL |
");
}
}
}
?>
Search Again
|
©2007 - Data Base Interface - Custom Built at:
|