-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathwidget.php
More file actions
30 lines (25 loc) · 779 Bytes
/
widget.php
File metadata and controls
30 lines (25 loc) · 779 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
<h4 class="no_martop">Quick Post</h4>
<form method="post" action="<?=\lf\requestGet('AdminUrl');?>apps/blog/create">
<ul class="vlist">
<li>
<input type="text" name="title" placeholder="Post Title"/>
</li>
<li>
<input type="text" name="newcat" placeholder="Category"/>
</li>
<li>
<textarea name="content" placeholder="Write a post..." id="" cols="30" rows="10"></textarea>
</li>
<li>
<input class="green button" type="submit" />
</li>
</ul>
</form>
<h4>Recent Posts</h4>
<ul>
<?php
include __DIR__.'/model/blog.php';
foreach( (new \BlogThreads)->order('id', 'DESC')->limit(5)->getAll() as $thread ): ?>
<li><a href="<?=\lf\requestGet('AdminUrl');?>apps/blog/edit/<?=$thread['id'];?>"><?=$thread['title'];?></a></li>
<?php endforeach; ?>
</ul>