pnbp

a terrible but reliable site builder
Log | Files | Refs | README

index.template (998B)


      1 <!DOCTYPE html>
      2 <html>
      3 	<head>
      4 		<title>Admin Page</title>
      5 		<style>
      6 html {
      7 	font-family:sans-serif;
      8 	background-color:#EFEFEF;
      9 	border-top:5px solid #FF9311;
     10 }
     11 a {
     12 	text-decoration:none;
     13 	color:#4183c4;
     14 }
     15 a:hover {
     16 	text-decoration:underline;
     17 }
     18 a:visited {
     19 	color:#4183c4;
     20 }
     21 #container {
     22 	width:700px;
     23 	margin:0 auto;
     24 }
     25 .container {
     26 	margin-left:50px;
     27 }
     28 		</style>
     29 	</head>
     30 	<body>
     31 	<div id="container">
     32 	<a href="/admin" class="nav">Home</a>
     33 	<a href="/admin/post.php">Update</a>
     34 <?php
     35 $databases = [%db%];
     36 $name = [%dbn%];
     37 $index = 0;
     38 foreach ($databases as $db) {
     39 	$data = json_decode(file_get_contents($db),TRUE);
     40 	echo '<h1>'.$name[$index].'</h1>';
     41 	echo '<div class="container">';
     42 	$new = 0;
     43 	foreach ($data as $val) {
     44 		echo '<a href="edit.php?location='.$db.'&post='.$val["post"].'">'.$val["title"].'</a><br/>';
     45 		$new = $new + 1;
     46 	}
     47 	echo '<br /><a href="edit.php?location='.$db.'&newpost='.$new.'">New Post</a><br/>';
     48 	echo '</div>';
     49 	$index = $index + 1;
     50 }
     51 ?>
     52 	</div>
     53 	</body>
     54 </html>
     55