start of php admin interface to update macs - pre-alfa state

This commit is contained in:
sandb
2010-02-28 19:16:52 +01:00
parent 7d0161f6e2
commit eda14cdca4
11 changed files with 94 additions and 0 deletions

50
admin.php Normal file
View File

@@ -0,0 +1,50 @@
<?php
require_once("lib/trans.php");
?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Pamela</title>
<script src="js/jquery-1.3.2.js" type="text/javascript"></script>
<link rel="stylesheet" href="pamela.css" type="text/css" media="screen" />
</head>
<body>
<header id="hdr">
<div>
<img src="img/pamela-logo.png" alt="Pamela" />
</div>
</header>
<h1>Name your macs</h1>
<p>If you want to have a name shown instead of your mac, enter your mac and desired name below.</p>
<form method="post">
<table>
<thead>
<th>Mac</th>
<th>Name</th>
<th>Visible</th>
</thead>
<tbody>
<?php
$known_macs = known_macs_get();
$counter = 0;
foreach ($known_macs as $mac => $name) {
?>
<tr>
<td><input name="mac-<?=$counter?>" type="text" value="<?=$mac?>" /></td>
<td><input name="name-<?=$counter?>" type="text" value="<?=$name?>" /></td>
<td><input name="show-<?=$counter?>" type="checkbox" <?=$name==NULL?"":"checked"?> /></td>
</tr>
<?php
$counter++;
}
?>
<tr>
<td><input name="mac-<?=$counter?>" type="text" /></td>
<td><input name="name-<?=$counter?>" type="text" /></td>
<td><input name="show-<?=$counter?>" type="checkbox" /></td>
</tr>
</tbody>
</table>
<input type="submit" value="submit" name="submit" />
</form>
</body>
</html>