RCC: Write blog posts online
This commit is contained in:
parent
5568943994
commit
e8a2557c4a
6 changed files with 378 additions and 222 deletions
|
@ -60,7 +60,7 @@ THE SOFTWARE.
|
|||
$_SESSION['login'] = true;
|
||||
?>
|
||||
<section class="card">
|
||||
<div class="headline">File Upload</div>
|
||||
<div class="headline">Post Upload</div>
|
||||
<form enctype="multipart/form-data" action="uploaded/" method="POST">
|
||||
<select name="blog">
|
||||
<?php
|
||||
|
@ -80,6 +80,36 @@ THE SOFTWARE.
|
|||
<input id="button" type="submit" value="Upload" class="button"/>
|
||||
</form>
|
||||
</section>
|
||||
<section class="card">
|
||||
<div class="headline">New Post</div>
|
||||
<form action="newpost/" method="POST">
|
||||
<p>Blog:</p>
|
||||
<select name="blog">
|
||||
<?php
|
||||
$blogs = scandir("../blogs/");
|
||||
foreach ($blogs as $blog) {
|
||||
if (strlen($blog) >= 3 && substr($blog, -3) == ".md") {
|
||||
$blog = substr($blog, 0, -3);
|
||||
echo "<option value='$blog'>$blog</option>";
|
||||
}
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
|
||||
<p>Title:<br><br><input type="text" class="itextfield" name="title"/></p>
|
||||
|
||||
<p>Date:<br><br><input type="text" class="itextfield" name="date"/></p>
|
||||
|
||||
<p>Author:<br><br><input type="text" class="itextfield" name="author"/></p>
|
||||
|
||||
<p>Tags:<br><br><input type="text" class="itextfield" name="tags"/></p>
|
||||
|
||||
<p>Text:</p>
|
||||
<textarea class="itextarea" name="text"></textarea>
|
||||
<br><br>
|
||||
<input id="button" type="submit" value="Post" class="button"/>
|
||||
</form>
|
||||
</section>
|
||||
<?php
|
||||
} else {
|
||||
?>
|
||||
|
@ -105,5 +135,6 @@ THE SOFTWARE.
|
|||
}
|
||||
?>
|
||||
</div>
|
||||
<script src="./res/rcc.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
Reference in a new issue