From 53c9c035c48952e73899ec794d4b5bbc9cbe1f57 Mon Sep 17 00:00:00 2001 From: Stefan Frech Date: Tue, 10 Jun 2008 19:45:39 +0000 Subject: [PATCH] Added header above bookmarks in order to sort by name or date. --- bookmarks.php | 2 +- images/ascending.gif | Bin 0 -> 82 bytes images/descending.gif | Bin 0 -> 82 bytes index.php | 31 +++++++++++++++++++++++++++---- lib/lib.php | 18 ++++++++++++++++-- shared.php | 4 ++-- style.css | 12 ++++++++---- 7 files changed, 54 insertions(+), 13 deletions(-) create mode 100644 images/ascending.gif create mode 100644 images/descending.gif diff --git a/bookmarks.php b/bookmarks.php index b55b542..9229269 100644 --- a/bookmarks.php +++ b/bookmarks.php @@ -21,7 +21,7 @@ function list_bookmarks ($bookmarks, $show_checkbox, $show_folder, $show_icon, $ $tree = & new folder; } - echo '
' . "\n"; + echo '' . "\n"; foreach ($bookmarks as $value) { echo '
' . "\n"; diff --git a/images/ascending.gif b/images/ascending.gif new file mode 100644 index 0000000000000000000000000000000000000000..c01166352bddd0afb8b47a8782dfa9049fda7a57 GIT binary patch literal 82 zcmZ?wbhEHb&d&b-|G(ltQRkx6#FEq$h4Rdj426)4R0VfW-v9>1pDc`A j42%pq3_t+V!oVcZ)4%dG8}FkolZ(~s^7brdVz34P1Lqi+ literal 0 HcmV?d00001 diff --git a/images/descending.gif b/images/descending.gif new file mode 100644 index 0000000000000000000000000000000000000000..c7d38d6fb931d86aa21e5639f1c70d1558274f2c GIT binary patch literal 82 zcmZ?wbhEHbS-_yTx^@IO>JsEmcGw

's Online Bookmarks

@@ -71,7 +73,7 @@ else {
-
+ +
-
+
+ + escape ($username), $mysql->escape ($folderid)); diff --git a/lib/lib.php b/lib/lib.php index 62de9d8..b01f89d 100644 --- a/lib/lib.php +++ b/lib/lib.php @@ -172,6 +172,22 @@ function set_get_noconfirm () { return $return; } +function set_get_order () { + if (!isset ($_GET['order']) || $_GET['order'] == '') { + $return = "title"; + } + else if ($_GET['order'] == 'date') { + $return = 'date'; + } + else if ($_GET['order'] == 'title') { + $return = 'title'; + } + else { + $return = 'title'; + } + return $return; +} + /* * Verify some POST variables */ @@ -265,8 +281,6 @@ function set_post_browser () { return input_validation ($return); } - - ######################################################### ### diff --git a/shared.php b/shared.php index 619653c..c17fe9e 100644 --- a/shared.php +++ b/shared.php @@ -58,7 +58,7 @@ if (isset ($_GET['user']) && check_username ($user)) { -
+
-
+