<?php include SERVER_ROOT . '/classes/feed.class.php'; // RSS feeds authorize(); if (!Bookmarks::can_bookmark($_GET['type'])) { error(404); } $Feed = new FEED(); $Type = $_GET['type']; list($Table, $Col) = Bookmarks::bookmark_schema($Type); if (!is_number($_GET['id'])) { error(0); } $PageID = $_GET['id']; $DB->query("\n\tSELECT UserID\n\tFROM {$Table}\n\tWHERE UserID = '{$LoggedUser['ID']}'\n\t\tAND {$Col} = {$PageID}"); if (!$DB->has_results()) { if ($Type === 'torrent') { $DB->query("\n\t\t\tSELECT MAX(Sort)\n\t\t\tFROM `bookmarks_torrents`\n\t\t\tWHERE UserID = {$LoggedUser['ID']}"); list($Sort) = $DB->next_record(); if (!$Sort) { $Sort = 0; } $Sort += 1; $DB->query("\n\t\t\tINSERT IGNORE INTO {$Table} (UserID, {$Col}, Time, Sort)\n\t\t\tVALUES ('{$LoggedUser['ID']}', {$PageID}, '" . sqltime() . "', {$Sort})"); } else { $DB->query("\n\t\t\tINSERT IGNORE INTO {$Table} (UserID, {$Col}, Time)\n\t\t\tVALUES ('{$LoggedUser['ID']}', {$PageID}, '" . sqltime() . "')"); } $Cache->delete_value('bookmarks_' . $Type . '_' . $LoggedUser['ID']); if ($Type == 'torrent') { $Cache->delete_value("bookmarks_group_ids_{$UserID}");
<?php authorize(); if ($UserID != $LoggedUser['ID'] || !Bookmarks::can_bookmark('torrent')) { error(403); } if ($_POST['type'] === 'torrents') { // require_once SERVER_ROOT.'/classes/mass_user_bookmarks_editor.class.php'; //Bookmark Updater Class $BU = new MASS_USER_BOOKMARKS_EDITOR(); if ($_POST['delete']) { $BU->mass_remove(); } elseif ($_POST['update']) { $BU->mass_update(); } } header('Location: bookmarks.php?type=torrents');