$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();
}
$listrep = $_POST['listrep'];
if($listrep == ""){
$listrep = $_GET['listrep'];
}
$dbcnx = @mysql_connect('mysql.plainhost.com', 'ecosmar_ecosmart', 'ecoman1');
mysql_select_db('ecosmar_website', $dbcnx);
$passem = @mysql_query("SELECT ID,pswcon FROM psw WHERE usrn='$usrn'");
if (!$passem) {
die("Error Checking Password.
" . "Error: " . mysql_error(). "
");
}
$row = mysql_fetch_array($passem);
$pswcon = $row[1];
if($pswcon != 'All'){
echo("<<<<Restricted Area>>>>" .
"
Sorry, you must have clearance to view All Contacts
");
exit();
}else{
$getem = @mysql_query("SELECT ID,first_name,last_name,pswcon FROM psw WHERE usrn='$listrep'");
if (!$getem) {
die("Error retrieving data from data base.
" . "Error: " . mysql_error(). "
");
}
$row2 = mysql_fetch_array($getem);
$first_name = $row2[1];
$last_name = $row2[2];
$status = $row2[3];
}
?>
|
Eco-$mart, Inc. On-line Administration
|