Beispiel #1
0
if (!empty($_POST['callback'])) {
    $json->callback = $_POST['callback'];
}
if (!empty($_POST['fbAppId']) && $json->status == 'OK') {
    $fbAppId = $_POST['fbAppId'];
    if (!empty($_POST['session']) && $json->status == 'OK') {
        $sessionId = $_POST['session'];
        if ($memcache = new Memcache()) {
            if ($memcache->connect('localhost', 11211, 3)) {
                try {
                    if ($json->status == 'OK') {
                        $session = verify_session($memcache, $sessionId, $_SERVER, __DOMAIN__);
                        if (!empty($session)) {
                            if (!empty($session->admin) || !empty($session->developer) || !empty($session->content_creator)) {
                                $dirs = dirToArray(DOCUMENT_ROOT, false, array(".", "..", "templates", "_thumbs", "css", "js", "upload", "email_templates", "engine", "fonts", "plugins", "bootstrap", "php"));
                                $json->data = array2jstree($dirs);
                            }
                        } else {
                            $json->status = 'ERROR';
                            $json->message = 'Invalid session';
                        }
                    }
                } catch (PDOException $e) {
                    error_log(__FILE__ . ' : ' . $e->getMessage());
                    $json->status = 'ERROR';
                    $json->message = 'PDOException: ' . $e->getMessage();
                } catch (MemcacheException $e) {
                    error_log(__FILE__ . ' : ' . $e->getMessage());
                    $json->status = 'ERROR';
                    $json->message = 'MEMCACHEException: ' . $e->getMessage();
                } catch (Exception $e) {
Beispiel #2
0
<?php

$defaults = get_role_defaults($db, $memcache, $session);
$smarty->assign('_allroles', 'YES');
if (!empty($session->tags)) {
    if ($session->tags) {
        $smarty->assign('_tags', 'YES');
    }
    // set the request page
}
$dirs = dirToArray(DOCUMENT_ROOT, false, array(".", "..", "templates", "v1", "v1-engine", "_thumbs", "font-awesome", "css", "css-engine", "js", "js-engine", "fonts-engine", "images-engine", "bower_components", "libs", "smarty", "vendor", "ckeditor", "ckfinder", "font-awesome-4.2.0", "php", "rs-plugin", "upload"));
$dirs = array2jstree($dirs);
$smarty->assign('_tree', $dirs);
Beispiel #3
0
    //$downloadJson = json_decode(file_get_contents("https://getstrike.net/api/v2/torrents/download/?hash=$hash") , true);
    $downloadLink = "https://getstrike.net/torrents/api/download/{$hash}.torrent";
    //$downloadJson["message"];
    $verifiedStatus = "This torrent has received no feedback and status cannot be decided";
    //get_data("http://bitsnoop.com/api/fakeskan.php?hash=$torrentHash");
    $date = new DateTime("@{$ts}");
    $publicDate = $date->format('M d, Y');
    $rssDate = $date->format(DateTime::RSS);
    $encodedTrackers = "&tr=udp://open.demonii.com:1337&tr=udp://tracker.coppersurfer.tk:6969&tr=udp://tracker.leechers-paradise.org:6969&tr=udp://exodus.desync.com:6969";
    $magnentString = "magnet:?xt=urn:btih:{$torrentHash}&dn={$encodedTitle}{$encodedTrackers}";
    $rssFeed = "https://getstrike.net/torrents/{$torrentHash}?rss=1";
    //sort($fileNames);
    //sort($fileSizes);
    ksort($contentArray);
    //print_r($contentArray);
    $jsTree = array2jstree($contentArray);
    if ($_GET['rss']) {
        $rssFlag = $_GET['rss'];
        if ($rssFlag == "1") {
            header('Content-type: text/xml');
            $rssFeed = <<<END
<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
    xmlns:torrent="https://getstrike.net/torrents/">
    <channel>
        <title>Torrent RSS feed - Strike Search</title>
        <link>http://getstrike.net/torrents/</link>
        <description>An RSS feed for Strike Search torrents</description>
        <item>
            <title>{$encodedTitle}</title>
            <category>{$torrentCategory} - {$torrentSubCategory}</category>