<?
require("config.php");

if ($allow=="no") {
echo "<html>

<head>

<title>$sitename -- Login --- Error</title>
</head>

<body>

<font size=\"2\"><font face=\"Tahoma\">Sorry but the Staff at $sitename are
currently configuring the members Area please return soon<br>
</font>
</body>

</html>";
}
else if ($allow =="yes")

if (!$action)
echo "<html>

<head>

<title>$sitename -- Login</title>
</head>

<body>

<form method=\"POST\" action=\"?action=process_login\">
<font size=\"2\"><font face=\"Tahoma\">Welcome to $sitename, Please Login
below <br>
Username:<br>
</font>
<input type=\"text\" name=\"logusername\" size=\"19\" style=\"font-family:
Tahoma; font-size: 10pt; border: 1px solid #000000; background-color:
#FFFFFF\"><font face=\"Tahoma\"><br>
Password:<br>
</font>
<input type=\"password\" name=\"logpassword\" size=\"19\"
style=\"font-family: Tahoma; font-size: 10pt; border: 1px solid #000000;
background-color: #FFFFFF\"></font><font face=\"Tahoma\" size=\"2\"><br>
</font>
<input type=\"submit\" value=\"Submit\" name=\"B1\" style=\"font-family:
Tahoma; font-size: 10pt; border: 1px solid #000000; background-color:
#FFFFFF\"><input type=\"reset\" value=\"Reset\" name=\"B2\"
style=\"font-family: Tahoma; font-size: 10pt; border-style: solid;
border-width: 1; background-color: #FFFFFF\"><br>
<font face=\"Tahoma\" size=\"2\">
<a title=\"Register for your Free Account\"
href=\"signup.php\">Register</a></font><br>
<font face=\"Tahoma\" size=\"2\">
<a title=\"Forget Your Password Click here\"
href=\"forgotpassword.php\">Forget
Password</a></font></p>
</form>

</body>

</html>";

if ($action="process_login") {
$line = file("data/$logusername.txt");
$password = $line[4];
$username = $line[0];

if (file_exists("data/$logusername.txt")) {
echo " ";
}
else {
echo "<html>

<head>

<title>$sitename -- Login --- Error</title>
</head>

<body>

<font size=\"2\"><font face=\"Tahoma\">Username not in our database<br>
</font>
</body>

</html>";
}
if (!$logusername)
echo "<html>

<head>

<title>$sitename -- Login --- Error</title>
</head>

<body>

<font size=\"2\"><font face=\"Tahoma\">Please enter Your Username or Sign
Up<br>
</font>
</body>

</html>";
}
else if (!$logpassword)
echo "<html>

<head>

<title>$sitename -- Login --- Error</title>
</head>

<body>

<font size=\"2\"><font face=\"Tahoma\">No Password<br>
</font>
</body>

</html>";
else if (!$logpassword == $password) {
echo "<html>

<head>

<title>$sitename -- Login --- Error</title>
</head>

<body>

<font size=\"2\"><font face=\"Tahoma\">Password does not match<br>
</font>
</body>

</html>";
}
else if ($logusername == $username && $logpassword == $password) {
setcookie ("$logusername", $value,time()+3600);
echo "<html>

<head>

<title>$sitename -- Logged in</title>
</head>

<body>

<font size=\"2\"><font face=\"Tahoma\">You are now logged in <br>
</font>
</body>

</html>";
}
?>





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to