-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwrite_article.php
executable file
·61 lines (40 loc) · 1.66 KB
/
write_article.php
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
<?php
// TODO: use modals edit the articles
include_once "views_preprocessor.php";
// previously, this line below here were in the preprocessor above
// it seemed that not all needed it
// as a measure, that the user does't break any thing, autologout user here every time..
if (!check_session()) {
redirect_to("includes/logout.php");
}
?>
<div class="index-body container">
<div class="container">
<!-- <h1>Write article..</h1> -->
<div class="card-header">Write Article</div>
<form action="controllers/write_article_processor.php" method="post">
<input class="form-control rounded-0" type="text" name="post_title" id="" placeholder="article header.." value="<?php //if(isset($_GET['post_title'])) echo $_GET['post_title'];?>" autofocus />
<!-- TODO: find a better way to add the key words -->
<!-- look into controllers/write_article_processor.php -->
<br>
<div class="text-area">
<textarea name="post_content" id="post_content" class="p-1 md-textarea form-control rounded-0" rows="3" placeholder="article body.." value="<?php if (isset($_GET['post_content'])) {
echo $_GET['post_content'];
}?>"></textarea>
<br>
<button name="post_submit_button" type="submit" class="btn btn-success btn-block">POST ARTICLE</button>
</div>
</form>
</div>
</div>
<!-- <script src='https://cdn.tiny.cloud/1/no-api-key/tinymce/5/tinymce.min.js' referrerpolicy="origin"></script> -->
<script src="statics/js/tinymce/js/tinymce/tinymce.min.js"></script>
<script>
tinymce.init({
selector: '#post_content'
});
</script>
<?php
/* include footer */
include_once "templates/footer.php";
?>