diff --git a/VERSION b/VERSION index 224d486..5c91f1f 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.8.10_beta +0.8.11_beta \ No newline at end of file diff --git a/admin.php b/admin.php index 1e8ac20..fecdd1b 100644 --- a/admin.php +++ b/admin.php @@ -14,269 +14,231 @@ $message1 = ''; $message2 = ''; ?> - - - +

Admin Page

- - -
Admin Page - -
-
-
+ +
+ + - - - - - - - -
- - - - - - - - - -
- - - - - - - - - - -
- - - - +
+ + escape ($new_username), - $mysql->escape ($new_password), - $mysql->escape ($new_admin)); - - if ($mysql->query ($query)) { - $message1 = "User $new_username created."; + + if ($create == 'Create') { + if ($new_username == '' || $new_password == '') { + $message1 = 'Username and Password fields must not be empty.'; + } + else if (check_username ($new_username)) { + $message1 = 'User already exists.'; } else { - message ($mysql->error); + $query = sprintf ("INSERT INTO user (username, password, admin) VALUES ('%s', md5('%s'), '%d')", + $mysql->escape ($new_username), + $mysql->escape ($new_password), + $mysql->escape ($new_admin)); + + if ($mysql->query ($query)) { + $message1 = "User $new_username created."; + } + else { + message ($mysql->error); + } + unset ($new_password, $_POST['new_password']); } - unset ($new_password, $_POST['new_password']); } -} -?> + ?> + +
+

Create User

+ +
+ + + + + + + + + + + + + + + + + + + + +
Username: + + +
Password: + + +
Admin: + + +
+ + +
+
+ +
-
- Create User +
+

Delete User

-
- - - - - - - - - - - - - - - - - - - - -
Username: - - -
Password: - - -
Admin: - - -
- - -
-
- -
- - -
- Delete User - - escape ($existing_user)); + escape ($existing_user)); + if ($mysql->query ($query)) { + $message2 = "User $existing_user deleted.
"; + } + else { + message ($mysql->error); + } + + $query = sprintf ("DELETE FROM bookmark WHERE md5(user)=md5('%s')", + $mysql->escape ($existing_user)); + if (!$mysql->query ($query)) { + message ($mysql->error); + } + + $query = sprintf ("DELETE FROM folder WHERE md5(user)=md5('%s')", + $mysql->escape ($existing_user)); + if (!$mysql->query ($query)) { + message ($mysql->error); + } + list_users (); + } + else { + ?> + +

Are you sure you want to delete the user and all it's Bookmarks and Folders?

+
" method="POST" name="userdelete"> + + + +
+ + + +
+
+ query ($query)) { - $message2 = "User $existing_user deleted.
"; + while ($row = mysql_fetch_object ($mysql->result)) { + echo ''; + if ($row->admin) { + echo " " . $row->username . "
\n"; + } + else { + echo " " . $row->username . "
\n"; + } + } } else { message ($mysql->error); } - - $query = sprintf ("DELETE FROM bookmark WHERE md5(user)=md5('%s')", - $mysql->escape ($existing_user)); - if (!$mysql->query ($query)) { - message ($mysql->error); - } - - $query = sprintf ("DELETE FROM folder WHERE md5(user)=md5('%s')", - $mysql->escape ($existing_user)); - if (!$mysql->query ($query)) { - message ($mysql->error); - } - list_users (); - } - else { ?> - -

Are you sure you want to delete the user and all it's Bookmarks and Folders?

- " method="POST" name="userdelete"> - - - - - - - -
- - - - - - - -
-
- query ($query)) { - while ($row = mysql_fetch_object ($mysql->result)) { - echo ''; - if ($row->admin) { - echo " " . $row->username . "
\n"; - } - else { - echo " " . $row->username . "
\n"; - } - } - } - else { - message ($mysql->error); - } - ?> -
-
- - -
- -
- - - -
- -
- Version - - - - - - - - - - - -
This Version:
Newest Version available:
- +
+ + + + + + + + +
+

Version

+ + + + + + + + + + + +
This Version:
Newest Version available:
+ + - - - -
+ ?> + +
+ diff --git a/bookmark_delete.php b/bookmark_delete.php index 48e8db4..9e91b6b 100644 --- a/bookmark_delete.php +++ b/bookmark_delete.php @@ -30,7 +30,7 @@ else { $query_string = "?bmlist=" . implode ("_", $bmlist) . "&noconfirm=1"; ?> -

Delete these Bookmarks?

+

Delete these Bookmarks?

1) { $query_string = "?bmlist=" . implode ("_", $bmlist); ?> -

Change public state:

+

Change public state:

-

Edit Bookmark

+

Edit Bookmark

Title

diff --git a/bookmark_move.php b/bookmark_move.php index 0c84c79..e34f19e 100644 --- a/bookmark_move.php +++ b/bookmark_move.php @@ -7,7 +7,7 @@ $bmlist = set_post_num_list ('bmlist'); if (count ($bmlist) == 0) { ?> -

Move bookmarks to:

+

Move bookmarks to:

diff --git a/bookmark_new.php b/bookmark_new.php index 98c7171..e042326 100644 --- a/bookmark_new.php +++ b/bookmark_new.php @@ -42,7 +42,7 @@ if ($post_title == '' || $post_url == '') { ?> -

New Bookmark

+

New Bookmark

Title

diff --git a/bookmarks.php b/bookmarks.php index 5bd900b..6314763 100644 --- a/bookmarks.php +++ b/bookmarks.php @@ -21,11 +21,10 @@ function list_bookmarks ($bookmarks, $show_checkbox, $show_folder, $show_icon, $ $tree = & new folder; } - echo '' . "\n"; - echo '' . "\n"; + echo '' . "\n"; foreach ($bookmarks as $value) { - echo '' . "\n"; + echo '
' . "\n"; # the folders, only needed when searching for bookmarks if ($show_folder) { @@ -46,28 +45,62 @@ function list_bookmarks ($bookmarks, $show_checkbox, $show_folder, $show_icon, $ echo "\n"; } + # the checkbox and favicon section + echo "\t" . '
' . "\n"; + # the checkbox if ($show_checkbox){ - # the checkbox, needed in any case - echo '
\n"; + echo "\t\t" . '' . "\n"; } - # the bookmark image if configured to be displayed + # the favicon + echo "\t\t"; if ($show_icon){ - echo '\n"; + } + echo "\n\t\n"; + + # the share, date and edit/move/delete icon section + echo "\t" . '
' . "\n"; + if ($show_share) { + $share = $value['public'] ? 'public' : 'private'; + echo "\t\t" . '' . $share . "\n"; } - # the link if configured to be displayed - echo '
\n"; - if ($show_date) { - echo '\n"; - } - - - if ($show_share) { - echo '\n"; - } - - - # the edit column if configured to be displayed - if ($show_edit) { - echo '\n"; - } - - # the move column if configured to be displayed - if ($show_move) { - echo '\n"; - } - - # the delete column if configured to be displayed - if ($show_delete) { - echo '\n"; - } - - echo "\n"; + echo "\n\n"; } - echo "
'; - echo ''; - echo "'; if ($value['favicon'] && is_file ($value['favicon'])) { echo ''; } else { echo $bookmark_image; } - echo "'; + if ($show_date) { + echo "\t\t" . ''; + echo date ($date_formats[$settings['date_format']], $value['timestamp']); + echo "\t\n"; + } + # the edit column + if ($show_edit) { + echo "\t\t" . ''; + echo sprintf ($edit_image, "Edit"); + echo "\n"; + } + + # the move column + if ($show_move) { + echo "\t\t" . ''; + echo sprintf ($move_image, "Move"); + echo "\n"; + } + + # the delete column + if ($show_delete) { + echo "\t\t" . ''; + echo sprintf ($delete_image, "Delete"); + echo "\n"; + } + + echo "\t\n"; + + # the link if ($settings['open_new_window']) { $target = ' target="_blank"'; } @@ -81,58 +114,16 @@ function list_bookmarks ($bookmarks, $show_checkbox, $show_folder, $show_icon, $ else { $link = $value['title']; } - echo '
' . $link . "
\n"; + echo "\t" . '\n"; - # the description if configured to be displayed and if not empty - # thanks to Tim Hogan - # also display the public status here + # the description and if not empty if ($show_desc && $value['description'] != "") { echo '
' . $value['description'] . "
\n"; } - echo "
'; - echo '
'. date ($date_formats[$settings['date_format']], $value['timestamp']) .'
'; - echo "
'; - $share = $value['public'] ? 'public' : 'private'; - echo '
'.$share.'
'; - echo "
'; - echo ''; - echo sprintf ($edit_image, "Edit"); - echo "'; - echo ''; - echo sprintf ($move_image, "Move"); - echo "'; - echo ''; - echo sprintf ($delete_image, "Delete"); - echo "
\n"; + echo "\n"; } ?> diff --git a/change_password.php b/change_password.php index fe87539..2f352f8 100644 --- a/change_password.php +++ b/change_password.php @@ -37,7 +37,7 @@ if (isset ($_POST['settings_password']) && $_POST['settings_password'] == 1) { ?> -

Change Password

+

Change Password

diff --git a/export.php b/export.php index dbbf4ba..03f9d5a 100644 --- a/export.php +++ b/export.php @@ -26,63 +26,39 @@ if (!isset ($_POST['browser']) || $_POST['browser'] == "" || } ?> -
- - +

Export Bookmarks

- - -
Export Bookmarks - -
-
-
+ +
+ + - - - - - - - -
- - - - - - - - - -
- - - - - - - - - - -
- - + +
+
- +
Export Bookmarks to Browser: @@ -142,9 +118,11 @@ if (!isset ($_POST['browser']) || $_POST['browser'] == "" ||
-
+
+ +
+ +
result); ?> -

Delete this Folder?

+

Delete this Folder?

public ? $folder_opened_public : $folder_opened; echo " " . $row->name; ?>

" method="POST" name="fdelete"> diff --git a/folder_edit.php b/folder_edit.php index ba1f8c0..f0a56d1 100644 --- a/folder_edit.php +++ b/folder_edit.php @@ -27,7 +27,7 @@ else if ($foldername == "") { } ?> -

Edit Folder

+

Edit Folder

public ? $folder_opened_public : $folder_opened; ?>

public) {echo "checked";} ?>> Public

diff --git a/folder_move.php b/folder_move.php index 789db3f..d4abb22 100644 --- a/folder_move.php +++ b/folder_move.php @@ -10,7 +10,7 @@ $parents = $tree->get_path_to_root ($folderid); if ($sourcefolder == "") { ?> -

Move Folder

+

Move Folder

" method="POST" id="fmove">
diff --git a/folder_new.php b/folder_new.php index 97f4341..6dd9b28 100644 --- a/folder_new.php +++ b/folder_new.php @@ -8,7 +8,7 @@ $public = set_post_bool_var ("public", false); if ($foldername == "") { ?> -

New Folder

+

New Folder

Public

diff --git a/header.php b/header.php index 7a1473a..14caf99 100644 --- a/header.php +++ b/header.php @@ -20,8 +20,8 @@ require_once (ABSOLUTE_PATH . "lib/lib.php"); require_once (ABSOLUTE_PATH . "lib/login.php"); ?> - - + Online-Bookmarks @@ -30,9 +30,6 @@ require_once (ABSOLUTE_PATH . "lib/login.php"); - diff --git a/import.php b/import.php index 46648c6..2d28462 100644 --- a/import.php +++ b/import.php @@ -3,60 +3,36 @@ require_once ("./header.php"); logged_in_only (); ?> - - - +

Import Bookmarks

- - -
Import Bookmarks - -
-
-
+ +
+ + - - - - - -
- - - - - - - - - -
- - - - - - - - - - -
- - + +
+
- +
- - -
from Browser: @@ -121,7 +96,7 @@ if (!isset ($_FILES['importfile']['tmp_name']) || $_FILES['importfile']['tmp_nam
+ Destination Folder: @@ -174,9 +149,11 @@ else{ ?> -
+
+ +
+ + diff --git a/index.php b/index.php index 1174fdb..db89335 100644 --- a/index.php +++ b/index.php @@ -12,218 +12,107 @@ else { ?> - - - +

's Online Bookmarks

- - -
's Online Bookmarks - -
-
-
- - - - - - - - - - - - - - - - -
- - - - - - - - - - - -
- - - - - - - - - - -
- - - - - - - - - - -
- - - - - - - - - - -
- - -
- - - escape ($username), - $mysql->escape ($search), - $mysql->escape ($search), - $mysql->escape ($search)); - - if ($mysql->query ($query)) { - $bookmarks = array (); - while ($row = mysql_fetch_assoc ($mysql->result)) { - array_push ($bookmarks, $row); - } - if (count ($bookmarks) > 0) { - require_once (ABSOLUTE_PATH . "bookmarks.php"); - list_bookmarks ($bookmarks, - true, - true, - $settings['show_bookmark_icon'], - true, - $settings['show_bookmark_description'], - $settings['show_column_date'], - $settings['show_column_edit'], - $settings['show_column_move'], - $settings['show_column_delete'], - $settings['show_public']); - } - else { - echo '
No Bookmarks found matching ' . $search . '.
'; - } - } - else { - message ($mysql->error); - } - - ?> - -
-
-
- make_tree (0); - $tree->print_tree (); - ?> -
-
-
- - escape ($username), - $mysql->escape ($folderid)); + +
+ + -
-
+ +
+ + +
+ + make_tree (0); + $tree->print_tree (); + ?> + + +
+ + +
+ + escape ($username), + $mysql->escape ($folderid)); + + if ($mysql->query ($query)) { + $bookmarks = array (); + while ($row = mysql_fetch_assoc ($mysql->result)) { + array_push ($bookmarks, $row); + } + list_bookmarks ($bookmarks, + true, + false, + $settings['show_bookmark_icon'], + true, + $settings['show_bookmark_description'], + $settings['show_column_date'], + $settings['show_column_edit'], + $settings['show_column_move'], + $settings['show_column_delete'], + $settings['show_public']); + } + else { + message ($mysql->error); + } + ?> + + +
+ + +
+ + diff --git a/lib/lib.php b/lib/lib.php index f6d81b2..62de9d8 100644 --- a/lib/lib.php +++ b/lib/lib.php @@ -415,9 +415,11 @@ function set_num_array ($array){ } function print_footer () { + echo '\n"; } function object_count () { diff --git a/select_folder.php b/select_folder.php index 1a11b5d..a8f56ae 100644 --- a/select_folder.php +++ b/select_folder.php @@ -3,7 +3,7 @@ require_once ('./header.php'); logged_in_only (); ?> -

Select Folder

+

Select Folder

diff --git a/settings.php b/settings.php index 104ea9f..da42fc9 100644 --- a/settings.php +++ b/settings.php @@ -108,60 +108,35 @@ function check_date_format () { ?> - - - +

My Settings

- - -
My Settings - -
-
-
+ +
+ + - - - - - - - -
- - - - - - - - - -
- - - - - - - - - - -
- - + +
@@ -199,35 +174,35 @@ function check_date_format () { @@ -249,56 +224,56 @@ function check_date_format () { @@ -386,9 +361,10 @@ function check_date_format () {
Confirm deletions of bookmarks an folders - > + >
Open a new window when clicking a bookmark - > + >
Show the bookmarks description in the overview - > + >
Enable favicon support: - > + >
Show the column with the change date: - > + >
Show the private/public column: private - > + >
Show the column to edit a bookmark: - > + >
Show the column to move a bookmark: - > + >
Show the column to delete a bookmark: - > + >
Collapse tree when clicking on folder icon: - > + >
Expand tree when clicking on folder icon: - > + >
Select folder when clicking on plus/minus symbol - > + >
Allways open just one tree - > + >
-
+ +
+ +
- - - +

- - -
Shared Bookmarks - -
-
-
- - - - - - - - -
- - - - - - - - - -
- - - - - - - - - + +
-
- - - - - - - -
-
- make_tree (0); - $tree->print_tree (); - ?> + +
-
-
-
+ make_tree (0); + $tree->print_tree (); + ?> - escape ($user), - $mysql->escape ($folderid)); + +
- if ($mysql->query ($query)) { - $bookmarks = array (); - while ($row = mysql_fetch_assoc ($mysql->result)) { - array_push ($bookmarks, $row); - } - list_bookmarks ($bookmarks, - false, - false, - $settings['show_bookmark_icon'], - true, - $settings['show_bookmark_description'], - $settings['show_column_date'], - false, - false, - false, - false); - } - else { - message ($mysql->error); - } - ?> + +
- -
-
+ escape ($user), + $mysql->escape ($folderid)); + + if ($mysql->query ($query)) { + $bookmarks = array (); + while ($row = mysql_fetch_assoc ($mysql->result)) { + array_push ($bookmarks, $row); + } + list_bookmarks ($bookmarks, + false, + false, + $settings['show_bookmark_icon'], + true, + $settings['show_bookmark_description'], + $settings['show_column_date'], + false, + false, + false, + false); + } + else { + message ($mysql->error); + } + ?> + + + '; $query = "SELECT user, SUM(bookmarks) AS bookmarks, SUM(folders) AS folders FROM ( SELECT user, 1 AS bookmarks, 0 AS folders FROM bookmark WHERE public='1' AND deleted!='1' UNION ALL @@ -146,22 +118,28 @@ else { ) AS tmp GROUP BY user"; if ($mysql->query ($query)) { - echo '
' . "\n"; while ($row = mysql_fetch_object ($mysql->result)) { echo '

' . $row->user . "
\n"; echo "Shares $row->folders Folders and $row->bookmarks Bookmarks

\n"; } - echo "
"; } else { message ($mysql->error); } + echo "
"; } ?> -
+ + + + + + + + + +