Exemple #1
0
        print json_encode($response);
        exit;
    }
} else {
    require_once "../../includes/decaptcher.poster.php";
    define('HOST', $decaptcher->url);
    // HOST
    define('PORT', 80);
    // PORT 80 or 443
    define('USERNAME', $decaptcher->username);
    // YOUR LOGIN
    define('PASSWORD', $decaptcher->password);
    // YOUR PASSWORD
}
if (isset($id) && $id && is_numeric($id)) {
    $show = $shows->getEpisodeById($id, "en");
    if (count($show)) {
        $sr = $settings->getSetting("sidereel");
        if ($sidereel->checkLogged($sr->username) || $sidereel->login($sr->username, $sr->password)) {
            // getting the captcha
            $data = $sidereel->getCaptcha($show['showtitle'], $show['season'], $show['episode']);
            if ($data) {
                $text = '';
                if (isset($decaptcher->port) && $decaptcher->port) {
                    $pict = file_get_contents("{$basepath}/cachefiles/" . $data['image'] . ".jpg");
                    $res = $ccp->picture2($pict, $pict_to, $pict_type, $text, $major_id, $minor_id);
                } else {
                    $res = poster_curl(HOST, PORT, USERNAME, PASSWORD, "{$basepath}/cachefiles/" . $data['image'] . ".jpg", NULL, ptUNSPECIFIED);
                    if (!is_numeric($res)) {
                        $text = $res;
                    }
Exemple #2
0
if ($user_id && $target_id && $target_type) {
    $data = array();
    $data['user_id'] = $user_id;
    $data['target_id'] = $target_id;
    $data['target_type'] = $target_type;
    $data['date_added'] = date("Y-m-d H:i:s");
    $res = $stream->addWatch($data);
    if ($res) {
        $data = array();
        $data['user_id'] = $user_id;
        $data['target_id'] = $target_id;
        $data['user_data'] = $_SESSION['loggeduser_details'];
        $data['target_type'] = $target_type;
        if ($target_type == 1) {
            // show
            $show = new Show();
            $data['target_data'] = $show->getShow($target_id, 0);
        } elseif ($target_type == 2) {
            // movie
            $movie = new Movie();
            $data['target_data'] = $movie->getMovie($target_id);
        } elseif ($target_type == 3) {
            // episode
            $show = new Show();
            $data['target_data'] = $show->getEpisodeById($target_id);
        }
        $data['event_type'] = 5;
        $data['event_date'] = date("Y-m-d H:i:s");
        $stream->addActivity($data);
    }
}
Exemple #3
0
session_start();
if (!isset($_SESSION['admin_user_id']) || !$_SESSION['admin_user_id']) {
    exit;
}
extract($_POST);
require_once "../../vars.php";
require_once "../../includes/show.class.php";
require_once "../../includes/settings.class.php";
require_once "../../includes/sidereel.class.php";
require_once "../../includes/curl.php";
$settings = new Settings();
$shows = new Show();
$sidereel = new Sidereel();
if (isset($id) && $id && is_numeric($id)) {
    $show = $shows->getEpisodeById($id, 'en');
    if (count($show)) {
        if (isset($authenticity_token) && isset($recaptcha_challenge_field) && isset($answer) && isset($sidereel_url)) {
            // submitting the episode
            $data = array();
            $data['authenticity_token'] = $authenticity_token;
            $data['recaptcha_challenge_field'] = $recaptcha_challenge_field;
            $data['sidereel_url'] = $sidereel_url;
            $data['recaptcha_response_field'] = trim($answer);
            $data['link[url]'] = $baseurl . $show['url'];
            if (isset($image_id) && file_exists($basepath . "/cachefiles/" . $image_id . ".jpg")) {
                unlink($basepath . "/cachefiles/" . $image_id . ".jpg");
            }
            $message = $sidereel->submit($show['showtitle'], $show['season'], $show['episode'], $data);
            $result = array();
            $result['status'] = 0;