$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();
}
$type = $_GET['type'];
if($type == 'Wholesale'){
$callit = "special";
}else{
$callit = $type;
}
?>
|
Eco-$mart, Inc. On-line Administration
|
Accounts
|
Name
| Company
| Status
| Edit
|
$dbcnx = @mysql_connect('mysql.plainhost.com', 'ecosmar_ecosmart', 'ecoman1');
mysql_select_db('ecosmar_contacts', $dbcnx);
$listem = @mysql_query("SELECT ID,name,biz_name,status FROM special WHERE status = '$type'");
if (!$listem) {
echo("Error retrieving data from data base. " . 'Error: '. mysql_error(). ' |
');
}else{
$count = mysql_num_rows($listem);
if($count < 1 or $count == ""){
echo("No $type Accounts. |
");
}else{
while ($row = mysql_fetch_array($listem)) {
$ID = $row['ID'];
$name = $row['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];
}elseif($result == 4){
$Name1 = $namecut[0].' '.$namecut[1];
$Name1a = $namecut[2];
$Name2 = $namecut[3];
}else{
$Name1 = 'One';
$Name1a = 'Name';
$Name2 = $namecut[0];
}
$bizname = $row['biz_name'];
$status = $row['status'];
if($status == 'wholesale'){
$called = 'Special';
}else{
$called = $status;
}
$BID[] = $ID;
$BNAME1[] = $Name1;
$BNAME1a[] = $Name1a;
$BNAME2[] = $Name2;
$BBIZ[] = $bizname;
$BSTAT[] = $status;
$CSTAT[] = $called;
}
natcasesort($BNAME2);
foreach ($BNAME2 as $key => $val) {
echo(" $BNAME1[$key] $BNAME1a[$key] $val | $BBIZ[$key] | $CSTAT[$key] | " .
" Edit " .
" DEL |
");
}
}
}
?>
©2007 - Data Base Interface - Custom Built at:
|