• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP getPluginConf函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: dirname

<?php

require_once dirname(__FILE__) . "/../../php/cache.php";
eval(getPluginConf('cpuload'));
class rCPU
{
    public $hash = "cpu.dat";
    public $count = 1;
    public static function load()
    {
        global $processorsCount;
        $cpu = new rCPU();
        if (is_null($processorsCount)) {
            $cache = new rCache();
            if (!$cache->get($cpu)) {
                $cpu->obtain();
            }
        } else {
            $cpu->count = $processorsCount;
        }
        return $cpu;
    }
    public function store()
    {
        $cache = new rCache();
        return $cache->set($this);
    }
    public function obtain()
    {
        $this->count = max(intval(shell_exec('grep -c processor /proc/cpuinfo')), 1);
        $this->store();
开发者ID:Snusel,项目名称:ruTorrent,代码行数:31,代码来源:cpu.php


示例17: dirname

<?php

require_once dirname(__FILE__) . '/../../php/cache.php';
require_once dirname(__FILE__) . '/../../php/Snoopy.class.inc';
require_once dirname(__FILE__) . '/../../php/rtorrent.php';
eval(getPluginConf('rss'));
class rRSS
{
    public $items = array();
    public $channel = array();
    public $url = null;
    public $srcURL = null;
    public $hash = null;
    public $cookies = array();
    public $lastModified = null;
    public $etag = null;
    public $encoding = null;
    public $version = 0;
    private $channeltags = array('title', 'link', 'lastBuildDate');
    private $itemtags = array('title', 'link', 'pubDate', 'enclosure', 'guid', 'source', 'description', 'dc:date');
    private $atomtags = array('title', 'updated');
    private $entrytags = array('title', 'link', 'updated', 'content', 'summary');
    public function rRSS($url = null)
    {
        $this->version = 1;
        if ($url) {
            $pos = strpos($url, ':COOKIE:');
            if ($pos !== false) {
                $this->url = substr($url, 0, $pos);
                $tmp = explode(";", substr($url, $pos + 8));
                foreach ($tmp as $item) {
开发者ID:chaitanya11,项目名称:rtorrent,代码行数:31,代码来源:rss.php


示例18: dirname

<?php

require_once dirname(__FILE__) . "/../../php/util.php";
require_once "chat.php";
eval(getPluginConf("chat"));
unset($ret);
function updateChatLog($chat)
{
    $log = getSettingsPath() . "/chat/" . $chat . ".log";
    if (!file_exists($log . ".new")) {
        return FALSE;
    }
    if (!is_readable($log . ".new")) {
        return "theUILang.newUnreadable";
    }
    if (filesize($log . ".new") == 0) {
        if (!unlink($log . ".new")) {
            return "theUILang.newUndeletable";
        } else {
            return FALSE;
        }
    }
    if (!file_exists($log) || filesize($log) == 0) {
        if (!copy($log . ".new", $log)) {
            return "theUILang.logUnwritable";
        } else {
            if (!unlink($log . ".new")) {
                return "theUILang.newDeleteFail";
            } else {
                return FALSE;
            }
开发者ID:ravenstar,项目名称:rutorrent-essential,代码行数:31,代码来源:action.php


示例19: dirname

<?php

require_once dirname(__FILE__) . "/../../php/util.php";
require_once $rootPath . '/php/cache.php';
require_once $rootPath . '/php/settings.php';
require_once $rootPath . '/php/Snoopy.class.inc';
eval(getPluginConf('extsearch'));
class commonEngine
{
    public $defaults = array("public" => true, "page_size" => 100);
    public $categories = array('All' => '');
    public function action($what, $cat, &$arr, $limit, $useGlobalCats)
    {
    }
    public function getSource()
    {
        $className = get_class($this);
        $pos = strpos($className, "Engine");
        if ($pos !== false) {
            $className = substr($className, 0, $pos);
        }
        return $className;
    }
    public function getNewEntry()
    {
        return array("time" => 0, "cat" => '', "size" => 0, "desc" => '', "name" => '', "src" => $this->getSource(), "seeds" => 0, "peers" => 0);
    }
    public function makeClient($url)
    {
        global $HTTPTimeoutPerSite;
        $client = new Snoopy();
开发者ID:NetOverflow,项目名称:ruTorrent,代码行数:31,代码来源:engines.php


示例20: dirname

<?php

require_once dirname(__FILE__) . '/../_task/task.php';
eval(getPluginConf('mediainfo'));
class mediainfoSettings
{
    public $hash = "mediainfo.dat";
    public $data = array();
    public static function load()
    {
        $cache = new rCache();
        $rt = new mediainfoSettings();
        return $cache->get($rt) ? $rt : null;
    }
}
$ret = array("status" => 255, "errors" => array("Can't retrieve information"));
if (isset($_REQUEST['hash']) && isset($_REQUEST['no']) && isset($_REQUEST['cmd'])) {
    switch ($_REQUEST['cmd']) {
        case "mediainfo":
            $req = new rXMLRPCRequest(new rXMLRPCCommand("f.get_frozen_path", array($_REQUEST['hash'], intval($_REQUEST['no']))));
            if ($req->success()) {
                $filename = $req->val[0];
                if ($filename == '') {
                    $req = new rXMLRPCRequest(array(new rXMLRPCCommand("d.open", $_REQUEST['hash']), new rXMLRPCCommand("f.get_frozen_path", array($_REQUEST['hash'], intval($_REQUEST['no']))), new rXMLRPCCommand("d.close", $_REQUEST['hash'])));
                    if ($req->success()) {
                        $filename = $req->val[1];
                    }
                }
                if ($filename !== '') {
                    $commands = array();
                    $flags = '';
开发者ID:Snusel,项目名称:ruTorrent,代码行数:31,代码来源:action.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP getPluginFiles函数代码示例发布时间:2022-05-15
下一篇:
PHP getPlugin函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap