diff options
| author | Stefan Suhren <suhren.stefan@fh-swf.de> | 2015-06-01 18:46:12 +0200 |
|---|---|---|
| committer | Stefan Suhren <suhren.stefan@fh-swf.de> | 2015-06-01 18:46:12 +0200 |
| commit | af6dd5f8f9844596e85db25a8e97df9e08cb795c (patch) | |
| tree | 8408e754dd335571635bcde041bbce69213af592 /login.php | |
| parent | be50d9ed4ba2b844bbc29686cee46b1dc149372a (diff) | |
| download | Catalog-af6dd5f8f9844596e85db25a8e97df9e08cb795c.tar.gz Catalog-af6dd5f8f9844596e85db25a8e97df9e08cb795c.zip | |
Port alls sites to smarty and use the inheritance model
Diffstat (limited to 'login.php')
| -rw-r--r-- | login.php | 52 |
1 files changed, 8 insertions, 44 deletions
@@ -1,5 +1,7 @@ <?php session_start(); + require_once('vendor.inc.php'); + if(isset($_GET['logout'])) { session_destroy(); @@ -13,8 +15,7 @@ { $username = $_POST['username']; $password = $_POST['password']; - require_once('vendor.inc.php'); - + $user = UserQuery::create()->findOneByUsername($username); if ( !is_object($user) ) { @@ -26,45 +27,8 @@ } header('Location: .'); } -?> -<!DOCTYPE html> -<html> -<head> -<meta charset="UTF-8"> -<title>User</title> -<link rel="stylesheet" type="text/css" href="styles/style.css"> -</head> -<body> - <header><h1>Customer login</h1></header> - <nav> - <dl> - <dt><a href="contact.php">Contact us</a></dt> - <dt><a href="categories.php">Categories</a></dt> - <dt><a href=".">Home</a></dt> - </dl> - </nav> - <div id="content"> - <form action="login.php" method="post"> - <h1>User</h1> - <div class="row"> - <label for="username"><u>U</u>sername:</label><input class="formw" type="text" - placeholder="Username" id="username" name="username" accesskey="u" - maxlength="100"> - </div> - <div class="row"> - <label for="password"><u>P</u>assword:</label><input class="formw" type="password" - placeholder="Password" id="password" name="password" accesskey="p"> - </div> - <div class="spacer"> </div> - <button type="submit" accesskey="l"> - <u>L</u>ogin - </button> - <button type="reset" accesskey="r"> - <u>R</u>eset - </button> - </form> - <div class="spacer"></div> - </div> - <footer>Copyright by SomeCompany Ltd.</footer> -</body> -</html>
\ No newline at end of file + + $smarty = new Smarty; + + $smarty->display('login.tpl'); +?>
\ No newline at end of file |
