summaryrefslogtreecommitdiff
path: root/tpl/blog
diff options
context:
space:
mode:
Diffstat (limited to 'tpl/blog')
-rw-r--r--tpl/blog/drafts.php22
-rw-r--r--tpl/blog/index.php14
-rw-r--r--tpl/blog/view.php12
3 files changed, 24 insertions, 24 deletions
diff --git a/tpl/blog/drafts.php b/tpl/blog/drafts.php
index 6e18a6c..e1cc3c1 100644
--- a/tpl/blog/drafts.php
+++ b/tpl/blog/drafts.php
@@ -5,7 +5,7 @@ $title = "Mes articles";
require("tpl/general/top.php");
echo '<div class="small_right">';
-echo '<a href="post-blog">écrire un article</a></div>';
+echo '<a href="?p=post-blog">écrire un article</a></div>';
echo '<h2>Mes brouillons</h2>';
@@ -14,17 +14,17 @@ if (count($drafts) > 0) {
foreach ($drafts as $post) {
/*echo '<div class="blog_post">';
echo '<div class="small_right">';
- echo '<a href="edit-blog-' . $post['id'] . '">edit</a>';
- echo ' | <a href="delete-blog-' . $post['id'] . '">delete</a>';
- echo ' | <a href="publish-blog-' . $post['id'] . '">publish</a>';
+ 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="view-blog-' . $post['id'] . '">' . $post['title'] . '</a></td>';
- echo '<td><a href="edit-blog-' . $post['id'] . '">modifier</a>';
- echo ' | <a href="delete-blog-' . $post['id'] . '">supprimer</a>';
- echo ' | <a href="publish-blog-' . $post['id'] . '">publier</a></td></tr>';
+ 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 {
@@ -36,9 +36,9 @@ 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="view-blog-' . $post['id'] . '">' . $post['title'] . '</a></td>';
- echo '<td><a href="edit-blog-' . $post['id'] . '">modifier</a>';
- echo ' | <a href="delete-blog-' . $post['id'] . '">supprimer</a></td></tr>';
+ 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 {
diff --git a/tpl/blog/index.php b/tpl/blog/index.php
index b2d6f93..f68c57c 100644
--- a/tpl/blog/index.php
+++ b/tpl/blog/index.php
@@ -3,8 +3,8 @@ require("tpl/general/top.php");
if ($can_post) {
echo '<div class="small_right">';
- echo '<a href="post-blog">écrire un article</a>';
- echo ' | <a href="drafts-blog">brouillons</a>';
+ echo '<a href="?p=post-blog">écrire un article</a>';
+ echo ' | <a href="?p=drafts-blog">brouillons</a>';
echo '</div>';
}
@@ -16,12 +16,12 @@ if(count($posts) == 0) {
} else {
echo '<table><tr><th></th><th style="width: 150px">Date</th><th style="width: 100px">Auteur</th></tr>';
foreach ($posts as $post) {
- echo '<tr><td><a href="view-blog-'.$post['id'].'">' . $post['title'] . '</a> <div class="small_right">';
+ echo '<tr><td><a href="?p=view-blog-'.$post['id'].'">' . $post['title'] . '</a> <div class="small_right">';
$k = array();
if ($can_edit && $post['owner_id'] == $user['id'])
- $k[] = '<a href="edit-blog-' . $post['id'] . '">modifier</a>';
+ $k[] = '<a href="?p=edit-blog-' . $post['id'] . '">modifier</a>';
if ($can_delete && $post['owner_id'] == $user['id'])
- $k[] = '<a href="delete-blog-' . $post['id'] . '">supprimer</a>';
+ $k[] = '<a href="?p=delete-blog-' . $post['id'] . '">supprimer</a>';
echo implode(' | ', $k);
echo '</div>';
if ($post['tags'] != ''){
@@ -47,14 +47,14 @@ foreach ($fa as $kname => $kdata) {
foreach ($fvalues as $k => $v) {
if ($k != $kname) $n[] = "$k-$v";
}
- echo '<a href="index-blog-' . implode('-', $n) . '">remove filtering</a></p>';
+ echo '<a href="?p=index-blog-' . implode('-', $n) . '">remove filtering</a></p>';
} else {
echo '<ul>';
foreach ($kdata as $vid => $vdata) {
$n = array();
foreach ($fvalues as $k => $v) $n[] = "$k-$v";
$n[] = "$kname-$vid";
- echo '<li><a href="index-blog-' . implode('-', $n) . '">' . $vdata['name'] . ' (' . $vdata['count'] . ')</a></li>';
+ echo '<li><a href="?p=index-blog-' . implode('-', $n) . '">' . $vdata['name'] . ' (' . $vdata['count'] . ')</a></li>';
}
echo '</ul>';
}
diff --git a/tpl/blog/view.php b/tpl/blog/view.php
index fc4107d..e453a19 100644
--- a/tpl/blog/view.php
+++ b/tpl/blog/view.php
@@ -7,13 +7,13 @@ require("tpl/general/top.php");
echo '<div class="small_align_right">';
echo 'Écrit par ' . $post['owner'];
if ($can_edit && $post['owner_id'] == $user['id'])
- echo ' | <a href="edit-blog-' . $post['id'] . '">modifier</a>';
+ echo ' | <a href="?p=edit-blog-' . $post['id'] . '">modifier</a>';
if ($can_delete && $post['owner_id'] == $user['id'])
- echo ' | <a href="delete-blog-' . $post['id'] . '">supprimer</a>';
+ echo ' | <a href="?p=delete-blog-' . $post['id'] . '">supprimer</a>';
if ($can_comment && !$is_draft)
- echo ' | <a href="comment-blog-' . $post['id'] . '">commenter</a>';
+ echo ' | <a href="?p=comment-blog-' . $post['id'] . '">commenter</a>';
if ($is_draft)
- echo ' | <a href="publish-blog-' . $post['id'] . '">publier</a>';
+ echo ' | <a href="?p=publish-blog-' . $post['id'] . '">publier</a>';
echo '</div>';
echo '<div class="small_align_right">publié le ' . $post['date'] . '</div>';
if ($post['tags'] != '') {
@@ -31,9 +31,9 @@ if (!$is_draft) {
foreach ($comments as $comment) {
echo '<div class="blog_post">';
$a = array();
- if ($can_delcom) $a[] = '<a href="delcom-blog-' . $comment['id'] . '">supprimer</a>';
+ if ($can_delcom) $a[] = '<a href="?p=delcom-blog-' . $comment['id'] . '">supprimer</a>';
if ($can_comment && $comment['author_id'] == $user['id'])
- $a[] = '<a href="edcom-blog-' . $comment['id'] . '">modifier</a>';
+ $a[] = '<a href="?p=edcom-blog-' . $comment['id'] . '">modifier</a>';
if (count($a) > 0)
echo '<div class="small_right">' . implode(" | ", $a) . '</div>';