summaryrefslogtreecommitdiffstats
path: root/admin/login.php
diff options
context:
space:
mode:
authorPascal Chevrel <pascal@chevrel.org>2012-03-06 17:29:13 +0100
committerPascal Chevrel <pascal@chevrel.org>2012-03-06 17:29:13 +0100
commit4fd51adf879e376220f7d97a9e084a62892870ad (patch)
tree5ece900283fdc4da172b3f063d379947b9103b2d /admin/login.php
parente12c2e50cdbe996130c8f707df9713a5bad3192e (diff)
downloadplanet-4fd51adf879e376220f7d97a9e084a62892870ad.tar
planet-4fd51adf879e376220f7d97a9e084a62892870ad.tar.gz
planet-4fd51adf879e376220f7d97a9e084a62892870ad.tar.bz2
planet-4fd51adf879e376220f7d97a9e084a62892870ad.tar.xz
planet-4fd51adf879e376220f7d97a9e084a62892870ad.zip
Use a centralized template for the admin section to avoid repeating html
Diffstat (limited to 'admin/login.php')
-rw-r--r--admin/login.php35
1 files changed, 10 insertions, 25 deletions
diff --git a/admin/login.php b/admin/login.php
index 0dbc794..b779b36 100644
--- a/admin/login.php
+++ b/admin/login.php
@@ -3,40 +3,21 @@ if (isset($_POST['password'])) {
setcookie('auth',md5($_POST['password']));
header('Location: index.php');
}
-header('Content-type: text/html; charset=UTF-8');
-?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
-<head>
- <meta http-equiv="Content-Type" content="text/HTML; charset=UTF-8" />
- <meta http-equiv="Content-Script-Type" content="text/javascript" />
- <meta http-equiv="Content-Style-Type" content="text/css" />
- <meta http-equiv="Content-Language" content="en" />
- <title>moonmoon administration</title>
- <link rel="stylesheet" media="screen" type="text/css" href="default.css" />
-</head>
-<body id="admin-feed">
- <div id="page">
- <div id="header">
- <h1>moonmoon</h1>
- <p><a href="../">Back to main page</a></p>
- </div>
-
- <div id="content">
+$page_content = <<<FRAGMENT
<form action="" method="post" class="login">
<fieldset>
<p class="field">
<label for="password">Password:</label>
<input type="password" name="password" id="password"/>
-
<input type="submit" class="submit" value="OK"/>
</p>
</fieldset>
</form>
- </div>
- </div>
+FRAGMENT;
+
+$footer_extra = <<<FRAGMENT
<script type="text/javascript">
<!--
window.onload = function() {
@@ -44,5 +25,9 @@ header('Content-type: text/html; charset=UTF-8');
}
-->
</script>
-</body>
-</html> \ No newline at end of file
+
+FRAGMENT;
+
+$page_id = 'admin-login';
+$admin_access = 0;
+require_once dirname(__FILE__) . '/template.php';