<?php
// Copyright (C) 2002 JP Durman(
[email protected])
$self = "login.php";
include("../config.php");
// Define DBASE file
$dbase = "$datadir/users.db";
// Read DBASE file into variable
$dbasecontent = join ('', file($dbase));
if ($dbasecontent){
}
else {
$userline = "1|sitenews|admin";
// "a" is voor append, toevoegen aan het eind van het bestand, i.p.v. overschrijven!
$file = fopen("$dbase", "a");
// Schrijf de regel met user-info
fputs($file, $userline);
// Sluit en bewaar het bestand
fclose($file);
}
if ($login_user && $login_password) {
$pass = md5($login_password);
setcookie("username");
setcookie("username", "$login_user");
setcookie("password", "$pass");
header("Location: admin.php");
exit;
}
include("include/top.php");
?>
<form method="post" enctype="multipart/form-data" action="<?php echo"$self" ?>">
<table border="0" align="center" cellspacing="0" cellpadding="0" width="100%">
<tr>
<td valign="top">
<font face="<?php echo "$workspacefontface" ?>" size="<?php echo "$workspacefontsize" ?>" color="<?php echo "$workspacefontcolor" ?>">
<b>
Username:
</b>
</font>
</td>
<td>
<input type="text" name="login_user" size="47">
</td>
</tr>
<tr>
<td valign="top">
<font face="<?php echo "$workspacefontface" ?>" size="<?php echo "$workspacefontsize" ?>" color="<?php echo "$workspacefontcolor" ?>">
<b>
Password:
</b>
</font>
</td>
<td>
<input type="Password" name="login_password" size="47">
</td>
</tr>
<tr>
<td colspan="2" align="center">
<br>
<input type="reset" value="Reset" name="reset">
<input type="submit" value="Login" name="submit">
</td>
</tr>
</table>
</form>
<?php
include("include/footer.php");
?>
<center>
<embed width="360" height="60" src="http://escool2.netfirms.com/girl.swf">