Ejemplo n.º 1
0
Free Software Foundation; either version 2 of the License, or (at your
option) any later version.
*/
$columns = 3;
require "../../Group-Office.php";
$GO_SECURITY->authenticate();
require $GO_LANGUAGE->get_language_file('bookmarks');
$GO_MODULES->authenticate('bookmarks');
require $GO_MODULES->path . 'classes/bookmarks.class.inc';
$bookmarks = new bookmarks();
$bookmarks2 = new bookmarks();
$task = isset($_REQUEST['task']) ? $_REQUEST['task'] : '';
if (isset($_REQUEST['delete_catagory'])) {
    if ($catagory = $bookmarks->get_catagory($_REQUEST['delete_catagory'])) {
        if ($GO_SECURITY->user_id == $catagory['user_id']) {
            if ($bookmarks->delete_catagory($_REQUEST['delete_catagory'])) {
                $GO_SECURITY->delete_acl($catagory['acl_write']);
                $GO_SECURITY->delete_acl($catagory['acl_read']);
            }
        }
    }
}
if (isset($_POST['bookmarks'])) {
    switch ($task) {
        case 'delete':
            while ($bookmark_id = array_shift($_POST['bookmarks'])) {
                if ($bookmark = $bookmarks->get_bookmark($bookmark_id)) {
                    $catagory = $bookmarks->get_catagory($bookmark['catagory_id']);
                    if ($GO_SECURITY->has_permission($GO_SECURITY->user_id, $catagory['acl_write'])) {
                        if ($bookmarks->delete_bookmark($GO_SECURITY->user_id, $bookmark_id)) {
                            $GO_SECURITY->delete_acl($bookmark['acl_read']);