Пример #1
0
            $Cache->delete_value('imdb_id_' . $thenumbers . '_median', true);
            $Cache->delete_value('imdb_id_' . $thenumbers . '_minor', true);
            header("Location: " . get_protocol_prefix() . "{$BASEURL}/details.php?id=" . htmlspecialchars($id));
        }
        break;
    case 2:
        $imdb_id = parse_imdb_id($row["url"]);
        if ($imdb_id) {
            $dbdata = new douban();
            $dbdata->setid($imdb_id);
            set_cachetimestamp($id, "cache_stamp");
            $Cache->delete_value('imdb_id_' . $thenumbers . '_movie_name');
            $Cache->delete_value('imdb_id_' . $thenumbers . '_large', true);
            $Cache->delete_value('imdb_id_' . $thenumbers . '_median', true);
            $Cache->delete_value('imdb_id_' . $thenumbers . '_minor', true);
            header("Location: " . get_protocol_prefix() . "{$BASEURL}/details.php?id=" . htmlspecialchars($id));
        }
        break;
    case 3:
        $douban_id = parse_douban_id($row["dburl"]);
        if ($douban_id) {
            $dbdata = new douban();
            $dbdata->setid($douban_id, "douban");
            set_cachetimestamp($id, "cache_stamp");
            header("Location: " . get_protocol_prefix() . "{$BASEURL}/details.php?id=" . htmlspecialchars($id));
        }
        break;
    default:
        die("Error!");
        break;
}
Пример #2
0
function get_dbexternal_tr($imdb_url = "")
{
	global $lang_functions;
	global $showextinfo;
	$imdbNumber = parse_douban_id($imdb_url);
	($showextinfo['imdb'] == 'yes' ? tr($lang_functions['row_douban_url'],  "<input type=\"text\" style=\"width: 650px;\" name=\"dburl\" value=\"".($imdbNumber ? "http://movie.douban.com/subject/".parse_douban_id($imdb_url) : "")."\" /><br /><font class=\"medium\">".$lang_functions['text_douban_url_note']."</font>", 1) : "");
}
Пример #3
0
<?php

require "include/bittorrent.php";
require_once "douban/douban.class.php";
dbconn();
//Send some headers to keep the user's browser from caching the response.
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . "GMT");
header("Cache-Control: no-cache, must-revalidate");
header("Pragma: no-cache");
header("Content-Type: text/xml; charset=utf-8");
$douban_url = $_GET['douban_url'];
$mode = $_GET['type'];
$cache_stamp = $_GET['cache'];
$douban_id = parse_douban_id($douban_url);
$douban_type = parse_douban_type($douban_url);
$Cache->new_page('douban_id_' . $douban_id . '_' . $mode, 1296000, true);
if (!$Cache->get_page()) {
    $infoblock = getdouban($douban_id, $douban_type, $cache_stamp, $mode);
    if ($infoblock) {
        $Cache->add_whole_row();
        print $infoblock;
        $Cache->end_whole_row();
        $Cache->cache_page();
        echo $Cache->next_row();
    }
} else {
    echo $Cache->next_row();
}
Пример #4
0
$row = mysql_fetch_array($res);
$torrentAddedTimeString = $row['added'];
if (!$row) {
    die("没有这个id的种子");
}
if ($CURUSER["id"] != $row["owner"] && get_user_class() < $torrentmanage_class) {
    bark($lang_takeedit['std_not_owner']);
}
$oldcatmode = get_single_value("categories", "mode", "WHERE id=" . sqlesc($row['category']));
$updateset = array();
//$fname = $row["filename"];
//preg_match('/^(.+)\.torrent$/si', $fname, $matches);
//$shortfname = $matches[1];
//$dname = $row["save_as"];
$url = parse_imdb_id($_POST['imdburl']);
$dburl = parse_douban_id($_POST['dburl']);
if ($enablenfo_main == 'yes') {
    $nfoaction = $_POST['nfoaction'];
    if ($nfoaction == "update") {
        $nfofile = $_FILES['nfo'];
        if (!$nfofile) {
            die("No data " . var_dump($_FILES));
        }
        if ($nfofile['size'] > 65535) {
            bark($lang_takeedit['std_nfo_too_big']);
        }
        $nfofilename = $nfofile['tmp_name'];
        if (@is_uploaded_file($nfofilename) && @filesize($nfofilename) > 0) {
            $updateset[] = "nfo = " . sqlesc(str_replace("\r\r\n", "\r\n", file_get_contents($nfofilename)));
        }
        $Cache->delete_value('nfo_block_torrent_id_' . $id);