当前位置: 首页>>代码示例>>PHP>>正文


PHP getPluginConf函数代码示例

本文整理汇总了PHP中getPluginConf函数的典型用法代码示例。如果您正苦于以下问题:PHP getPluginConf函数的具体用法?PHP getPluginConf怎么用?PHP getPluginConf使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了getPluginConf函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: save_settings

 public function save_settings()
 {
     if (!$this->postlist['fls'] || ($settings = json_decode($this->postlist['fls'], true)) === FALSE) {
         $this->sdie('Invalid settings');
     }
     eval(getPluginConf('fileupload'));
     foreach ($services as $s => $o) {
         if ($o['enabled']) {
             if (!isset($settings[$s])) {
                 $this->sdie('Invalid settings');
             }
             if ($s == 'megaupload') {
                 $services[$s]['email'] = $settings[$s]['email'];
             }
             foreach ($this->fields as $v) {
                 if (!isset($o[$v])) {
                     continue 2;
                 }
                 if (array_key_exists($v, $o) && !array_key_exists($v, $settings[$s])) {
                     $this->sdie('Invalid settings');
                 }
                 $services[$s][$v] = $settings[$s][$v];
             }
         }
     }
     $this->services = $services;
     $this->write();
     $this->shout = true;
 }
开发者ID:stroebs,项目名称:rutorrent-thirdparty-plugins,代码行数:29,代码来源:fileup.class.php

示例2: dirname

<?php

require_once dirname(__FILE__) . "/../../php/xmlrpc.php";
require_once $rootPath . '/php/cache.php';
eval(getPluginConf('scheduler'));
@define('SCH_FAST', 0);
@define('SCH_STOP', 1);
@define('SCH_SEEDONLY', 2);
@define('SCH_RESTRICT1', 3);
@define('SCH_RESTRICT2', 4);
@define('SCH_RESTRICT3', 5);
class rScheduler
{
    public $hash = "scheduler.dat";
    public $enabled = 0;
    public $UL = array();
    public $DL = array();
    public $week = array();
    public $seedStopped = array();
    public $leechStopped = array();
    public static function load()
    {
        $cache = new rCache();
        $rt = new rScheduler();
        if (!$cache->get($rt)) {
            $rt->fillWeek();
        }
        return $rt;
    }
    public function fillWeek()
    {
开发者ID:NetOverflow,项目名称:ruTorrent,代码行数:31,代码来源:scheduler.php

示例3: eval

<?php

require_once 'xmlrpc.php';
eval(getPluginConf($plugin["name"]));
$listPath = getSettingsPath() . "/erasedata";
@makeDirectory($listPath);
$thisDir = dirname(__FILE__);
$req = new rXMLRPCRequest(array($theSettings->getOnEraseCommand(array('erasedata0' . getUser(), getCmd('d.open') . '= ; ' . getCmd('branch=') . getCmd('d.get_custom5') . '=,"' . getCmd('f.multicall') . '=,\\"' . getCmd('execute') . '={' . $thisDir . '/cat.sh,' . $listPath . ',$system.pid=,$' . getCmd('f.get_frozen_path') . '=}\\""')), $theSettings->getOnEraseCommand(array('erasedata1' . getUser(), getCmd('branch=') . getCmd('d.get_custom5') . '=,"' . getCmd('execute') . '={' . $thisDir . '/fin.sh,' . $listPath . ',$' . getCmd('system.pid') . '=,$' . getCmd('d.get_hash') . '=,$' . getCmd('d.get_base_path') . '=,$' . getCmd('d.is_multi_file') . '=,$' . getCmd('d.get_custom5') . '=}"')), $theSettings->getAbsScheduleCommand("erasedata", $garbageCheckInterval, getCmd('execute') . '={sh,-c,' . escapeshellarg(getPHP()) . ' ' . escapeshellarg($thisDir . '/update.php') . ' ' . escapeshellarg(getUser()) . ' &}')));
if ($req->success()) {
    $theSettings->registerPlugin($plugin["name"], $pInfo["perms"]);
} else {
    $jResult .= "plugin.disable(); noty('erasedata: '+theUILang.pluginCantStart,'error');";
}
开发者ID:NetOverflow,项目名称:ruTorrent,代码行数:13,代码来源:init.php

示例4: die

if (!isset($_GET['ses'])) {
    die('404 bUfU');
}
$oldses = session_id();
if (!empty($oldses)) {
    die('404 Its not for you');
}
session_id($_GET['ses']);
session_start();
$_SERVER['REMOTE_USER'] = $_SESSION['uname'];
unset($_POST);
$_POST = $_GET;
require_once dirname(__FILE__) . "/../../php/xmlrpc.php";
require_once dirname(__FILE__) . "/../filemanager/flm.class.php";
require_once dirname(__FILE__) . "/../filemanager/xmlfix.php";
eval(getPluginConf('filemanager'));
class vs extends FLM
{
    public function stream($file)
    {
        $this->shout = FALSE;
        if (!preg_match('/^(avi|divx|mpeg|mp4|mkv)$/i', $this->fext($file))) {
            $this->sdie('404 Invalid format');
        }
        if (!is_file($this->workdir . $file)) {
            $this->sdie('404 File not found');
        }
        header('Content-Type: video/divx');
        header('Content-Disposition: inline; filename="' . $file . '"');
        $this->get_file($this->workdir . $file);
    }
开发者ID:stroebs,项目名称:rutorrent-thirdparty-plugins,代码行数:31,代码来源:view.php

示例5: foreach

     $disabled[$file] = $info;
     continue;
 }
 $extError = false;
 foreach ($info['php.extensions.error'] as $extension) {
     if (!in_array($extension, $loadedExtensions)) {
         $jResult .= "noty('" . $file . ": '+theUILang.phpExtensionNotFoundError+' ('+'" . $extension . "'+').','error');";
         $extError = true;
     }
 }
 if ($extError) {
     $disabled[$file] = $info;
     continue;
 }
 if (count($info['web.external.error']) || count($info['web.external.warning']) || count($info['rtorrent.external.error']) || count($info['rtorrent.external.warning'])) {
     eval(getPluginConf($file));
 }
 foreach ($info['web.external.error'] as $external) {
     if (findEXE($external) == false) {
         $jResult .= "noty('" . $file . ": '+theUILang.webExternalNotFoundError+' ('+'" . $external . "'+').','error');";
         $extError = true;
     } else {
         if ($external == 'php') {
             $phpRequired = true;
         }
     }
 }
 if ($extError) {
     $disabled[$file] = $info;
     continue;
 }
开发者ID:PreK,项目名称:ruTorrent,代码行数:31,代码来源:getplugins.php

示例6: eval

<?php

if (!chdir(dirname(__FILE__))) {
    exit;
}
if (count($argv) > 1) {
    $_SERVER['REMOTE_USER'] = $argv[1];
}
require_once "../../php/rtorrent.php";
require_once "./util_rt.php";
require_once "./autotools.php";
eval(getPluginConf('autotools'));
function Debug($str)
{
    global $autodebug_enabled;
    if ($autodebug_enabled) {
        rtDbg("AutoWatch", $str);
    }
}
Debug("");
Debug("--- begin ---");
$is_ok = true;
// Read configuration
if ($is_ok) {
    $at = rAutoTools::load();
    Debug("enabled          : " . $at->enable_watch);
    Debug("autostart        : " . $at->watch_start);
    if ($at->enable_watch) {
        $auto_start = $at->watch_start;
        $path_to_watch = rtAddTailSlash(trim($at->path_to_watch));
        Debug("path_to_watch    : " . $path_to_watch);
开发者ID:NetOverflow,项目名称:ruTorrent,代码行数:31,代码来源:watch.php

示例7: dirname

<?php

require_once dirname(__FILE__) . "/../../php/xmlrpc.php";
require_once dirname(__FILE__) . "/../../php/cache.php";
require_once dirname(__FILE__) . "/../../php/settings.php";
require_once dirname(__FILE__) . '/../_task/task.php';
eval(getPluginConf('unpack'));
class rUnpack
{
    public $hash = "unpack.dat";
    public $enabled = 0;
    public $filter = '/.*/';
    public $path = "";
    public $addLabel = 0;
    public $addName = 0;
    public static function load()
    {
        $cache = new rCache();
        $up = new rUnpack();
        $cache->get($up);
        return $up;
    }
    public function store()
    {
        $cache = new rCache();
        return $cache->set($this);
    }
    public function set()
    {
        if (!isset($HTTP_RAW_POST_DATA)) {
            $HTTP_RAW_POST_DATA = file_get_contents("php://input");
开发者ID:jcvfen,项目名称:rutorrent,代码行数:31,代码来源:unpack.php

示例8: dirname

<?php

require_once dirname(__FILE__) . "/../../php/cache.php";
eval(getPluginConf('theme'));
class rTheme
{
    public $hash = "theme.dat";
    public $current = "";
    public static function load()
    {
        global $defaultTheme;
        $cache = new rCache();
        $theme = new rTheme();
        $theme->current = $defaultTheme;
        if (!$cache->get($theme)) {
            $theme->current = $defaultTheme;
        }
        return $theme;
    }
    public function store()
    {
        $cache = new rCache();
        return $cache->set($this);
    }
    public function isValid()
    {
        return $this->current != '' && is_dir(dirname(__FILE__) . '/themes/' . $this->current);
    }
    public function get()
    {
        return "theWebUI.theme = '" . $this->current . "';";
开发者ID:NetOverflow,项目名称:ruTorrent,代码行数:31,代码来源:theme.php

示例9: dirname

<?php

require_once dirname(__FILE__) . "/../../php/util.php";
require_once $rootPath . '/php/cache.php';
require_once $rootPath . '/php/Snoopy.class.inc';
eval(getPluginConf('loginmgr'));
class privateData
{
    public $hash = '';
    public $cookies = null;
    public $referer = null;
    public $loaded = false;
    public static function load($owner, $client = null)
    {
        $rt = new privateData($owner);
        if ($client) {
            $cache = new rCache('/accounts');
            if ($cache->get($rt)) {
                $client->cookies = $rt->cookies;
                $client->referer = $rt->referer;
                $rt->loaded = true;
            }
        }
        return $rt;
    }
    public function privateData($owner)
    {
        $this->hash = $owner . ".dat";
        $this->loaded = false;
    }
    public function remove()
开发者ID:chaitanya11,项目名称:rtorrent,代码行数:31,代码来源:accounts.php

示例10: dirname

<?php

require_once dirname(__FILE__) . "/../../php/xmlrpc.php";
require_once $rootPath . '/php/cache.php';
require_once $rootPath . '/php/settings.php';
eval(getPluginConf('ratio'));
@define('RAT_STOP', 0);
@define('RAT_STOP_AND_REMOVE', 1);
@define('RAT_ERASE', 2);
@define('RAT_ERASEDATA', 3);
@define('RAT_FIRSTTHROTTLE', 10);
class rRatio
{
    public $hash = "ratio.dat";
    public $rat = array();
    public $default = 0;
    public static function load()
    {
        $cache = new rCache();
        $rt = new rRatio();
        if (!$cache->get($rt)) {
            $rt->fillArray();
        } else {
            $rt->pad();
        }
        return $rt;
    }
    public function pad()
    {
        for ($i = count($this->rat); $i < MAX_RATIO; $i++) {
            $this->rat[] = array("action" => RAT_STOP, "min" => 100, "max" => 300, "upload" => 20, "name" => "ratio" . $i, "time" => -1);
开发者ID:chaitanya11,项目名称:rtorrent,代码行数:31,代码来源:ratio.php

示例11: eval

 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
 * for the specific language governing rights and limitations under the
 * License.
 *
 * The Original Code is IRC Auto Downloader.
 *
 * The Initial Developer of the Original Code is
 * David Nilsson.
 * Portions created by the Initial Developer are Copyright (C) 2010, 2011
 * the Initial Developer. All Rights Reserved.
 *
 * Contributor(s):
 *
 * ***** END LICENSE BLOCK ***** */
require_once '../../php/util.php';
eval(getPluginConf('autodl-irssi'));
// Checks if there are missing PHP modules, and if so returns JSON data with an
// error message saying exactly which PHP modules are missing.
function checkPhpModules()
{
    $missing = "";
    foreach (array('xml', 'sockets', 'json') as $module) {
        if (!extension_loaded($module)) {
            $missing = "{$missing} {$module}";
        }
    }
    if ($missing === "") {
        return;
    }
    $jsonData = "{\"error\":\"Missing PHP modules:{$missing}\"}";
    header('Content-Type: application/json; charset=UTF-8');
开发者ID:BlackPearl01,项目名称:quick-box,代码行数:31,代码来源:getConf.php

示例12: eval

<?php

require_once '../../php/util.php';
eval(getPluginConf('geoip'));
require_once 'ip_db.php';
$db = new ipDB();
$db->add($_REQUEST["ip"], $_REQUEST["comment"]);
cachedEcho(json_encode(array("ip" => $_REQUEST["ip"], "comment" => $_REQUEST["comment"])), "application/json");
开发者ID:NetOverflow,项目名称:ruTorrent,代码行数:8,代码来源:action.php

示例13: eval

}
# Script arguments are:
# 0: script name
# 1: hash
# 2: target datadir
# 3: flag, "1" means "add torrent's path"
# 4: flag, "1" means "move datafiles"
# 5: flag, "1" means "fast resume"
# 6: username
if (count($argv) > 6) {
    $_SERVER['REMOTE_USER'] = $argv[6];
}
require_once '../../php/xmlrpc.php';
require_once './util_setdir.php';
require_once './util_rt.php';
eval(getPluginConf('datadir'));
$DataDir_Sem = rtSemGet(fileinode(__FILE__));
rtSemLock($DataDir_Sem);
function Debug($str)
{
    global $datadir_debug_enabled;
    if ($datadir_debug_enabled) {
        rtDbg("SetDir", $str);
    }
}
Debug("");
Debug("--- begin ---");
$is_ok = true;
if (count($argv) < 6) {
    Debug("called without arguments (at least 5 params wanted)");
    $is_ok = false;
开发者ID:NetOverflow,项目名称:ruTorrent,代码行数:31,代码来源:setdir.php

示例14: dirname

<?php

require_once dirname(__FILE__) . "/../../php/xmlrpc.php";
require_once $rootPath . '/php/cache.php';
eval(getPluginConf('throttle'));
@define('MAX_SPEED', 100 * 1024 * 1024);
class rThrottle
{
    public $hash = "throttle.dat";
    public $thr = array();
    public $default = 0;
    public static function load()
    {
        $cache = new rCache();
        $rt = new rThrottle();
        if (!$cache->get($rt) || count($rt->thr) != MAX_THROTTLE) {
            $rt->fillArray();
        }
        return $rt;
    }
    public function fillArray()
    {
        $this->thr = array();
        $v = 16;
        for ($i = 0; $i < MAX_THROTTLE / 2; $i++) {
            $this->thr[] = array("up" => $v, "down" => 0, "name" => "up" . $v);
            $v = $v * 2;
        }
        $v = 16;
        for ($i = 0; $i < MAX_THROTTLE / 2; $i++) {
            $this->thr[] = array("up" => 0, "down" => $v, "name" => "down" . $v);
开发者ID:NetOverflow,项目名称:ruTorrent,代码行数:31,代码来源:throttle.php

示例15: eval

<?php

require_once 'stat.php';
eval(getPluginConf('trafic'));
$ret = null;
$storages = array("global.csv");
if (isset($_REQUEST['tracker'])) {
    if ($_REQUEST['tracker'] == "none") {
        if (!isset($HTTP_RAW_POST_DATA)) {
            $HTTP_RAW_POST_DATA = file_get_contents("php://input");
        }
        $tstorages = array();
        if (isset($HTTP_RAW_POST_DATA)) {
            $vars = explode('&', $HTTP_RAW_POST_DATA);
            foreach ($vars as $var) {
                $parts = explode("=", $var);
                if ($parts[0] == "hash") {
                    $tstorages[] = 'torrents/' . $parts[1] . ".csv";
                }
            }
        }
        if (count($tstorages)) {
            $storages = $tstorages;
        }
    } else {
        if ($_REQUEST['tracker'] != "global") {
            $storages = array("trackers/" . $_REQUEST['tracker'] . ".csv");
        }
    }
}
function sum($e1, $e2)
开发者ID:Rapiddot,项目名称:ruTorrent,代码行数:31,代码来源:getdata.php


注:本文中的getPluginConf函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。