blob: e1cc3c17501a3ecb07159049ea87e11f368eae82 (
plain) (
blame)
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
|
<?php
$title = "Mes articles";
require("tpl/general/top.php");
echo '<div class="small_right">';
echo '<a href="?p=post-blog">écrire un article</a></div>';
echo '<h2>Mes brouillons</h2>';
if (count($drafts) > 0) {
echo '<table><tr><th>Title</th><th>Actions</th></tr>';
foreach ($drafts as $post) {
/*echo '<div class="blog_post">';
echo '<div class="small_right">';
echo '<a href="?p=edit-blog-' . $post['id'] . '">edit</a>';
echo ' | <a href="?p=delete-blog-' . $post['id'] . '">delete</a>';
echo ' | <a href="?p=publish-blog-' . $post['id'] . '">publish</a>';
echo '</div>';
echo '<h2>' . $post['title'] . '</h2>';
echo $post['text_html'];
echo '</div>';*/
echo '<tr><td><a href="?p=view-blog-' . $post['id'] . '">' . $post['title'] . '</a></td>';
echo '<td><a href="?p=edit-blog-' . $post['id'] . '">modifier</a>';
echo ' | <a href="?p=delete-blog-' . $post['id'] . '">supprimer</a>';
echo ' | <a href="?p=publish-blog-' . $post['id'] . '">publier</a></td></tr>';
}
echo '</table>';
} else {
echo '<p>Aucun brouillon</p>';
}
echo '<h2>Mes articles publiés</h2>';
if (count($pub) > 0) {
echo '<table><tr><th>Titre</th><th>Actions</th></tr>';
foreach ($pub as $post) {
echo '<tr><td><a href="?p=view-blog-' . $post['id'] . '">' . $post['title'] . '</a></td>';
echo '<td><a href="?p=edit-blog-' . $post['id'] . '">modifier</a>';
echo ' | <a href="?p=delete-blog-' . $post['id'] . '">supprimer</a></td></tr>';
}
echo '</table>';
} else {
echo '<p>Aucun article publié</p>';
}
require("tpl/general/bottom.php");
|