Changes adopted from version 0.4
This commit is contained in:
93
login.php
93
login.php
@@ -1,10 +1,34 @@
|
||||
<?php
|
||||
/*****************************************************************************
|
||||
IP Reg, a PHP/MySQL IPAM tool
|
||||
Copyright (C) 2008 Wietse Warendorff
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
For more information, visit http://sourceforge.net/projects/ipreg,
|
||||
or contact me at wietsew@users.sourceforge.net
|
||||
*****************************************************************************/
|
||||
|
||||
// start session with default language
|
||||
session_start();
|
||||
include('lang/en.php');
|
||||
|
||||
// includes
|
||||
include("config.php");
|
||||
include("dbconnect.php");
|
||||
include("functions.php");
|
||||
include("yapter.php");
|
||||
|
||||
// check for submit
|
||||
if ($_SERVER['REQUEST_METHOD']=="POST" ) {
|
||||
@@ -21,7 +45,7 @@
|
||||
$_SESSION['suser_mac'] = mysql_result($result, 0, "user_mac");
|
||||
$_SESSION['suser_lang'] = mysql_result($result, 0, "user_lang");
|
||||
|
||||
header("Location: index.php");
|
||||
header_location("index.php");
|
||||
} else {
|
||||
// not ok, break session
|
||||
$_SESSION = array();
|
||||
@@ -31,61 +55,18 @@
|
||||
mysql_free_result($result);
|
||||
}
|
||||
}
|
||||
echo '<b>Error!</b>';
|
||||
}
|
||||
?>
|
||||
|
||||
<html>
|
||||
<header>
|
||||
<title>IP Reg</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<link rel="stylesheet" href="tpl/style.css" type="text/css">
|
||||
</header>
|
||||
<body>
|
||||
<br>
|
||||
|
||||
// start output
|
||||
// set template
|
||||
$tp = new Template("tpl/login.tpl");
|
||||
|
||||
<hr>
|
||||
// set language variables
|
||||
$tp->setvars($lang);
|
||||
|
||||
// output
|
||||
$tp->parse();
|
||||
$tp->spit();
|
||||
|
||||
<form action="login.php" method="post">
|
||||
<table border="0">
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<b>IP Reg <?php echo $config_version; ?></b>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
Username:
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" name="user_name">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
Password:
|
||||
</td>
|
||||
<td>
|
||||
<input type="password" name="user_pass">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" align="right">
|
||||
<input type="submit" value="Submit"><input type="reset" value="Reset">
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
|
||||
<hr>
|
||||
|
||||
<table border="0" width="100%">
|
||||
<tr>
|
||||
<td align="center">
|
||||
<a href="index.php" class="label">IP Reg <?php echo $config_version; ?></a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
include("footer.php");
|
||||
?>
|
||||
Reference in New Issue
Block a user