Beispiel #1
0
<?php

$theSettings->registerPlugin($plugin["name"], $pInfo["perms"]);
require_once "engines.php";
$em = engineManager::load();
if ($em === false) {
    $em = new engineManager();
}
$em->obtain();
$jResult .= "plugin.sites = cloneObject(theSearchEngines.sites);";
$jResult .= $em->get();
Beispiel #2
0
<?php

require_once dirname(__FILE__) . "/../../php/util.php";
require_once dirname(__FILE__) . "/../../php/rtorrent.php";
require_once "engines.php";
set_time_limit(0);
$em = engineManager::load();
if ($em === false) {
    $em = new engineManager();
    $em->obtain("./engines");
}
if (isset($_REQUEST['mode'])) {
    $cmd = $_REQUEST['mode'];
    switch ($cmd) {
        case "set":
            $em->set();
            cachedEcho($em->get(), "application/javascript");
            break;
        case "get":
            cachedEcho(safe_json_encode($em->action($_REQUEST['eng'], $_REQUEST['what'], $_REQUEST['cat'])), "application/json");
            break;
        case "loadtorrents":
            if (!isset($HTTP_RAW_POST_DATA)) {
                $HTTP_RAW_POST_DATA = file_get_contents("php://input");
            }
            if (isset($HTTP_RAW_POST_DATA)) {
                $vars = explode('&', $HTTP_RAW_POST_DATA);
                $lbl = null;
                $dir = null;
                $isStart = true;
                $isAddPath = true;