<?php
$con= @mysql_connect("localhost","root","");
$db = @mysql_select_db("amr",$con);
include('class.php');
$Amr = new login_Amr;
$Amr->SESSION_NAME = 'test';
$Amr->table = 'admin';
$Amr->Grade_name = 'username';
$Amr->Grade_pass = 'password';
if(empty($_GET)){
echo $Amr->free("<center>welcome ".$Amr->name().'<br><a href="?logoff">تسجيل الخروج</a>','<form method="POST" action="?login">
<p><input type="text" name="name" size="20">
<input type="text" name="pass" size="20">
<input type="submit" value="إرسال" name="B1"><input type="reset" value="إعادة تعيين" name="B2"></p>
</form>');
}elseif(isset($_GET['login'])){
if(isset($_POST['name'])){
echo $Amr->login(1,$_POST['name'],$_POST['pass']);
}
}elseif(isset($_GET['logoff'])){
echo $Amr->logoff();
}
?>
|