Ejemplo n.º 1
0
    }
    $hash = md5('s5l6t0mu55yt4hwa7e5' . $torrentid . 'delete' . 's5l6t0mu55yt4hwa7e5');
    if (!$sure) {
        stderr("Delete Bookmark", "Do you really want to delete this bookmark? Click\n" . "<a href='?torrent={$torrentid}&amp;action=delete&amp;sure=1&amp;h={$hash}'>here</a> if you are sure.", FALSE);
    }
    if ($_GET['h'] != $hash) {
        stderr('Error', 'what are you doing?');
    }
    function deletebookmark($torrentid)
    {
        global $CURUSER, $mc1, $INSTALLER09;
        sql_query("DELETE FROM bookmarks WHERE torrentid = " . sqlesc($torrentid) . " AND userid = " . sqlesc($CURUSER['id']));
        $mc1->delete_value('bookmm_' . $CURUSER['id']);
        make_bookmarks($CURUSER['id'], 'bookmm_');
    }
    $HTMLOUT .= deletebookmark($torrentid);
    $HTMLOUT .= "<h2>Bookmark deleted!</h2>";
} elseif ($action == 'public') {
    $torrentid = (int) $_GET['torrent'];
    $sure = isset($_GET['sure']) ? 0 + $_GET['sure'] : '';
    if (!is_valid_id($torrentid)) {
        stderr("Error", "Invalid ID.");
    }
    $hash = md5('s5l6t0mu55yt4hwa7e5' . $torrentid . 'public' . 's5l6t0mu55yt4hwa7e5');
    if (!$sure) {
        stderr("Share Bookmark", "Do you really want to mark this bookmark public? Click\n" . "<a href='?torrent={$torrentid}&amp;action=public&amp;sure=1&amp;h={$hash}'>here</a> if you are sure.", FALSE);
    }
    if ($_GET['h'] != $hash) {
        stderr('Error', 'what are you doing?');
    }
    function publickbookmark($torrentid)
Ejemplo n.º 2
0
    if (!is_valid_id($torrentid)) {
        stderr("Error", "Invalid ID.");
    }
    $hash = md5('the salt to' . $torrentid . 'add' . 'mu55y');
    if (!$sure) {
        stderr("Confirm Bookmark", "Do you really want to delete this bookmark? Click\n" . "<a href=?torrent={$torrentid}&action=delete&sure=1&h={$hash}>here</a> if you are sure.", false);
    }
    if ($_GET['h'] != $hash) {
        stderr('Error', 'what are you doing?');
    }
    function deletebookmark($torrentid)
    {
        global $CURUSER;
        mysql_query("DELETE FROM bookmarks WHERE torrentid = {$torrentid} AND userid = {$CURUSER['id']}");
    }
    deletebookmark($torrentid);
    stdhead("Bookmark deleted!");
    echo '<h2>Bookmark deleted!</h2>';
} elseif ($action == 'public') {
    $torrentid = (int) $_GET['torrent'];
    $sure = safeChar($_GET['sure']);
    if (!is_valid_id($torrentid)) {
        stderr("Error", "Invalid ID.");
    }
    $hash = md5('the salt to' . $torrentid . 'add' . 'mu55y');
    if (!$sure) {
        stderr("Confirm Bookmark", "Do you really want to mark this bookmark public? Click\n" . "<a href=?torrent={$torrentid}&action=public&sure=1&h={$hash}>here</a> if you are sure.", false);
    }
    if ($_GET['h'] != $hash) {
        stderr('Error', 'what are you doing?');
    }