summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2018-04-29 12:08:02 +0200
committerAlex Auvolat <alex@adnab.me>2018-04-29 12:08:02 +0200
commit03685416017163d38f4ef1239ca50df1e38a242a (patch)
treee6801bff28301e17ebb27812bc68c5cd6631d158
parentc69c046ff936c1853fb5bf10a5203ec30609d248 (diff)
downloadBits-update.tar.gz
Bits-update.zip
Add some links with ?p=update
-rw-r--r--tpl/account/list.php4
-rw-r--r--tpl/blog/drafts.php22
-rw-r--r--tpl/blog/index.php14
-rw-r--r--tpl/blog/view.php12
-rw-r--r--tpl/general/top.php4
-rw-r--r--tpl/notes/edit.php2
-rw-r--r--tpl/notes/inc_relativestree.php8
-rw-r--r--tpl/notes/move.php4
-rw-r--r--tpl/notes/new.php2
-rw-r--r--tpl/notes/user.php6
-rw-r--r--tpl/notes/view.php10
11 files changed, 44 insertions, 44 deletions
diff --git a/tpl/account/list.php b/tpl/account/list.php
index a97606f..9a6dd42 100644
--- a/tpl/account/list.php
+++ b/tpl/account/list.php
@@ -9,12 +9,12 @@ echo "<tr><th>Username</th><th>Notebook</th><th>Blog</th></tr>";
foreach($users as $u) {
echo '<tr><td>' . $u['name'] . '</td>';
if ($u['nbNotes'] > 0) {
- echo '<td><a href="user-notes-' . $u['id'] . '">' . $u['nbNotes'] . ' notes</a></td>';
+ echo '<td><a href="?p=user-notes-' . $u['id'] . '">' . $u['nbNotes'] . ' notes</a></td>';
} else {
echo '<td>no notes</td>';
}
if ($u['nbPosts'] > 0) {
- echo '<td><a href="index-blog-author-'.$u['id'].'">' . $u['nbPosts'] . ' posts</a></td>';
+ echo '<td><a href="?p=index-blog-author-'.$u['id'].'">' . $u['nbPosts'] . ' posts</a></td>';
} else {
echo '<td>no posts</td>';
}
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>';
diff --git a/tpl/general/top.php b/tpl/general/top.php
index f9ef6d8..792323e 100644
--- a/tpl/general/top.php
+++ b/tpl/general/top.php
@@ -23,7 +23,7 @@ global $user, $apps; //These might be hidden because this page is called from sq
<div class="right">
<?php
if ($user['id'] == 0) {
- echo '<a href="new-account">Inscription</a><a href="?login">Connexion</a>';
+ echo '<a href="?p=new-account">Inscription</a><a href="?login">Connexion</a>';
} else {
echo '<a href="?logout">Déconnexion (' . $user['name'] . ')</a>';
}
@@ -34,7 +34,7 @@ if ($user['id'] == 0) {
<?php
if ($user['id'] != 0) {
echo '<a href="/~katchup/blog">Blog</a>';
- echo '<a href="user-notes-' . $user['id'] . '">bloc-notes</a>';
+ echo '<a href="?p=user-notes-' . $user['id'] . '">bloc-notes</a>';
echo '<a href="file">fichiers</a>';
}
?>
diff --git a/tpl/notes/edit.php b/tpl/notes/edit.php
index 54f5157..2cf7fbf 100644
--- a/tpl/notes/edit.php
+++ b/tpl/notes/edit.php
@@ -2,7 +2,7 @@
require("tpl/general/top.php");
-echo '<div class="small_right"><a href="view-notes-' . $note['id'] . '">revenir à la note</a></div>';
+echo '<div class="small_right"><a href="?p=view-notes-' . $note['id'] . '">revenir à la note</a></div>';
require("tpl/general/inc_form.php");
diff --git a/tpl/notes/inc_relativestree.php b/tpl/notes/inc_relativestree.php
index 295e552..01cb956 100644
--- a/tpl/notes/inc_relativestree.php
+++ b/tpl/notes/inc_relativestree.php
@@ -23,7 +23,7 @@ for($id = $note['id']; $id != 0; $id = $notes_parents[$id]) {
echo '</div><div class="contents-left">';
echo '<h1>' . $note['ownername'] . '</h1><br />';
-echo '<div class="small_right"><a href="user-notes-' . $note['owner'] . '">voir tout</a></div>';
+echo '<div class="small_right"><a href="?p=user-notes-' . $note['owner'] . '">voir tout</a></div>';
function n_tree_branch($id) {
global $notest, $note, $can_new;
@@ -32,18 +32,18 @@ function n_tree_branch($id) {
if ($branch['id'] == $note['id'])
echo '<p>' . $branch['title'] . '</p>';
else
- echo '<p><a href="view-notes-' . $branch['id'] . '">' . $branch['title'] . '</a></p>';
+ echo '<p><a href="?p=view-notes-' . $branch['id'] . '">' . $branch['title'] . '</a></p>';
if (isset($notest[$branch['id']])) {
echo '<div class="tree_branch">';
n_tree_branch($branch['id']);
echo '</div>';
} else if ($can_new && $branch['id'] == $note['id']) {
echo '<div class="tree_branch">';
- if ($can_new) echo '<p><a class="tool_link" href="new-notes-' . $branch['id'] . '">+ nouvelle note</a></p>';
+ if ($can_new) echo '<p><a class="tool_link" href="?p=new-notes-' . $branch['id'] . '">+ nouvelle note</a></p>';
echo '</div>';
}
}
- if ($can_new) echo '<p><a class="tool_link" href="new-notes-' . $id . '">+ nouvelle note</a></p>';
+ if ($can_new) echo '<p><a class="tool_link" href="?p=new-notes-' . $id . '">+ nouvelle note</a></p>';
}
echo '<div class="tree_root">';
diff --git a/tpl/notes/move.php b/tpl/notes/move.php
index 985b89a..69882a1 100644
--- a/tpl/notes/move.php
+++ b/tpl/notes/move.php
@@ -4,12 +4,12 @@ require("tpl/general/top.php");
function f($n) {
global $note;
- return $n['title'] . ' - <a class="tool_link" href="move-notes-' . $note['id'] . '-' . $n['id'] . '">déplacer ici</a>';
+ return $n['title'] . ' - <a class="tool_link" href="?p=move-notes-' . $note['id'] . '-' . $n['id'] . '">déplacer ici</a>';
}
require("tpl/general/inc_tree.php");
tree($notes_tree, @f);
-echo '<a class="tool_link" href="move-notes-'.$note['id'].'-0">déplacer à la racine</a>';
+echo '<a class="tool_link" href="?p=move-notes-'.$note['id'].'-0">déplacer à la racine</a>';
$can_new = false;
require("tpl/notes/inc_relativestree.php");
diff --git a/tpl/notes/new.php b/tpl/notes/new.php
index ca17f21..7ef6a59 100644
--- a/tpl/notes/new.php
+++ b/tpl/notes/new.php
@@ -3,7 +3,7 @@
require("tpl/general/top.php");
if (isset($parent)) {
- echo '<div class="small_right"><a href="view-notes-' . $parent['id'] . '">back to ' .
+ echo '<div class="small_right"><a href="?p=view-notes-' . $parent['id'] . '">back to ' .
$parent['title'] . '</a></div>';
}
diff --git a/tpl/notes/user.php b/tpl/notes/user.php
index 06099ac..9a1ef0b 100644
--- a/tpl/notes/user.php
+++ b/tpl/notes/user.php
@@ -3,13 +3,13 @@ $title = "Bloc-notes de " . $note_owner['name'] ;
require("tpl/general/top.php");
function f($n) {
- return '<a href="view-notes-' . $n['id'] . '">' . $n['title'] . '</a>';
+ return '<a href="?p=view-notes-' . $n['id'] . '">' . $n['title'] . '</a>';
}
require("tpl/general/inc_tree.php");
tree($notes_tree, @f);
if ($note_owner['id'] == $user['id']) {
- echo '<a class="tool_link" href="new-notes-0">nouvelle note</a>';
+ echo '<a class="tool_link" href="?p=new-notes-0">nouvelle note</a>';
}
echo '</div><div class="contents-left">';
@@ -19,7 +19,7 @@ foreach($users as $u) {
if ($u['id'] == $userid) {
echo '<li>' . $u['name'] . ' (' . $u['nbNotes'] . ' notes)</li>';
} else {
- echo '<li><a href="user-notes-' . $u['id'] . '">' . $u['name'] . '</a> (' . $u['nbNotes'] . ' notes)</li>';
+ echo '<li><a href="?p=user-notes-' . $u['id'] . '">' . $u['name'] . '</a> (' . $u['nbNotes'] . ' notes)</li>';
}
}
echo "</ul>";
diff --git a/tpl/notes/view.php b/tpl/notes/view.php
index 559c39e..e5838b6 100644
--- a/tpl/notes/view.php
+++ b/tpl/notes/view.php
@@ -4,12 +4,12 @@ require("tpl/general/top.php");
$t = array();
if ($note['parent_id'] != 0) {
- $t[] = 'parent : <a href="view-notes-'. $note['parent_id'] . '">' . $note['parent_title'] . '</a>';
+ $t[] = 'parent : <a href="?p=view-notes-'. $note['parent_id'] . '">' . $note['parent_title'] . '</a>';
}
-if ($can_edit) $t[] = '<a href="edit-notes-' . $note['id'] . '">modifier</a>';
-$t[] = '<a href="source-notes-' . $note['id'] . '">code source</a>';
-if ($can_move) $t[] = '<a href="move-notes-' . $note['id'] . '">déplacer</a>';
-if ($can_delete) $t[] = '<a href="delete-notes-' . $note['id'] . '">supprimer</a>';
+if ($can_edit) $t[] = '<a href="?p=edit-notes-' . $note['id'] . '">modifier</a>';
+$t[] = '<a href="?p=source-notes-' . $note['id'] . '">code source</a>';
+if ($can_move) $t[] = '<a href="?p=move-notes-' . $note['id'] . '">déplacer</a>';
+if ($can_delete) $t[] = '<a href="?p=delete-notes-' . $note['id'] . '">supprimer</a>';
echo '<div class="small_align_right">' . implode(' | ', $t) . '</div>';
echo $note['html'];