function delete($bookmarkID) { $result = false; if ($bookmarkID != "") { include '../access.php'; $access = checkAccess('n', 't'); if ($access) { $user = new User(); $username = $user->getUsername(); include "../includes/bookmarks.php"; if (b_belongs_to($bookmarkID, $username, "../")) { $result = delete_bookmark($bookmarkID, "../"); } } } return $result; }
$customTitle = T_("My Bookmarks"); if ($bookmarkPage == "js") { $jquery_script = true; $tree_css = true; } require_once 'header.php'; require_once 'includes/protection.php'; include 'access.php'; $access = checkAccess('n', 't'); if ($access) { $user = new User(); include 'conn.php'; include 'bheader.php'; include 'includes/bookmarks.php'; $delBookId = $_POST['delBookId']; if ($delBookId != null && b_belongs_to($delBookId, $user->getUsername())) { if (delete_bookmark($delBookId) == 1) { echo "<p class=\"success\">" . T_("You have successfully deleted this bookmark") . ".</p>"; } else { echo "<p class=\"error\">" . T_("There has been a problem when deleting the bookmark") . ".</p>"; } } //Controller if ($bookmarkPage == "no_js") { include "books_nojs.php"; } else { if ($bookmarkPage == "js") { include "books_js.php"; } else { if ($bookmarkPage == "public") { include "userb.php";
include 'header.php'; include 'access.php'; $access = checkAccess(); if ($access) { $user = new User(); $username = $user->getUsername(); include "includes/bookmarks.php"; echo "<h2>" . T_("Modify bookmark") . "</h2>"; if (isset($_POST["id"])) { $id = $_POST["id"]; } else { if (isset($_GET["id"])) { $id = $_GET["id"]; } } if ($id != null && b_belongs_to($id, $username)) { require_once 'includes/protection.php'; include 'conn.php'; $pid = $_POST["pid"]; $url = $_POST["url"]; $title = $_POST["title"]; $description = $_POST["description"]; $success = false; if ($_POST['submitted']) { if (TAGS) { if (!empty($_POST['publicChk'])) { $newPublic = true; } else { $newPublic = false; } $tags = $_POST["tags"];