Updated with frontend and added new features

This commit is contained in:
root
2012-07-21 05:55:30 -07:00
parent 41b83c3553
commit 1166c879f5
33 changed files with 243 additions and 52 deletions

31
admin.php Executable file
View File

@@ -0,0 +1,31 @@
<?php
if ($_POST) {
$text = preg_replace("/\s{2}/i","\n",$_POST['text']);
file_put_contents("mac_log.csv",$text);
header ("Location: ".$_SERVER['PHP_SELF']."?saved=true");
exit;
}
$text = htmlspecialchars(file_get_contents("mac_log.csv"));
if($_GET['saved'] == "true") {
$message = "Saved successfully.";
}
?><html>
<head>
<style type="text/css">
textarea { height: 600px; width: 400px; }
</style>
</head>
<body>
<span class="message">
<?php echo $message; ?>
</span>
<form method="POST">
<textarea name="text"><?php echo $text; ?></textarea>
<input type="submit" value="Save">
</form>
</body>
</html>