-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpost.php
More file actions
37 lines (31 loc) · 747 Bytes
/
post.php
File metadata and controls
37 lines (31 loc) · 747 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<?php
//Include the main page
include("rec/main.php");
//Set the page title
$title = "New Blog Post";
//Load the header
include("rec/header.php");
//Must be logged in
if(!$loggedin) {
echo("MEOW");
die();
header('Location: login.php?e=login');
die();
}
//Editor only
if(!$user['editor']) {
header('Location: login.php?e=denied');
die();
}
?>
<script src="//cdn.ckeditor.com/4.4.4/standard/ckeditor.js"></script>
<h1>Add a new Blog Post</h1>
<form action="rec/func/newpost.php" method="post">
Title: <input type="text" name="title"><p>
<textarea class="ckeditor" name="post"></textarea><p>
<input type="submit" class="right" value="Submit Post">
</form>
<?php
//Include the footer
include("rec/footer.php");
?>