Update of /cvsroot/phpsqliteadmin/phpsqliteadmin
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31131
Modified Files:
login.php
Log Message:
Modified html to make it look more phpsla-alike ;-)
4 spaces -> 1 tab
Formfield "Username" gets focus onload
Index: login.php
===================================================================
RCS file: /cvsroot/phpsqliteadmin/phpsqliteadmin/login.php,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- login.php 21 May 2004 17:17:10 -0000 1.1
+++ login.php 22 May 2004 20:20:51 -0000 1.2
@@ -5,53 +5,55 @@
$obj =& new login($_POST['user'], $_POST['pass']);
$obj->SPSQLite("phpsla.sqlite");
-if ((isset($_GET['logoff'])) && ($_GET['logoff'] == 1)) {
- $obj->logOff();
+if ((isset($_GET['logoff'])) && ($_GET['logoff'] == '1')) {
+ $obj->logOff();
}
if (isset($_POST['empty'])) {
- $obj->register($_POST['realname'], $_POST['email']);
+ $obj->register($_POST['realname'], $_POST['email']);
} elseif (isset($_POST['notempty'])) {
- if ($obj->checkLogin()) {
- header("Location: index.php");
- }
+ if ($obj->checkLogin()) {
+ header("Location: index.php");
+ exit();
+ }
}
?>
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
<html>
<head>
-<title>phpSQLiteAdmin - Login</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+ <title>phpSQLiteAdmin - Login</title>
+ <meta http-equiv="expires" content="0">
+ <link href="phpsla.css" rel="stylesheet" type="text/css">
</head>
-<body>
-<form method="POST" action="<?php echo $_SERVER['PHP_SELF']; ?>">
+<body class="right" onload="document.login.user.focus();">
+
+<h1>phpSQLiteAdmin 0.3</h1>
+<p>Running on <em><?=$_SERVER['HTTP_HOST']?></em></p>
+
+<form name="login" method="post" action="<?=$_SERVER['PHP_SELF']?>">
<table>
<tr>
-<td>
-User:
-</td>
-<td>
-<input type="text" name="user">
-</td>
+<td>Username:</td>
+<td><input type="text" name="user"></td>
</tr>
<tr>
-<td>
-Pass:
-</td>
-<td>
-<input type="password" name="pass">
+<td>Password:</td>
+<td><input type="password" name="pass">
<?php
if ($obj->isEmpty()) {
- echo "</td></tr>";
- echo "<tr><td>Realname:</td><td><input type=\"text\" name=\"realname\"></td></tr>\n";
- echo "<tr><td>Email:</td><td><input type=\"text\" name=\"email\">\n";
- echo "<input type=\"hidden\" name=\"empty\">\n";
+ echo "</td></tr>";
+ echo "<tr><td>Realname:</td><td><input type=\"text\" name=\"realname\"></td></tr>\n";
+ echo "<tr><td>Email:</td><td><input type=\"text\" name=\"email\">\n";
+ echo "<input type=\"hidden\" name=\"empty\">\n";
} else {
- echo "<input type=\"hidden\" name=\"notempty\">\n";
+ echo "<input type=\"hidden\" name=\"notempty\">\n";
}
?>
-<input type="submit" value="login" >
+ <input type="submit" value="Login">
</td>
</tr>
</table>
|