public function get() { $ret = "hostCookies = ["; foreach ($this->list as $host => $cookies) { $c = ''; foreach ($cookies as $name => $value) { $c .= $name . "=" . $value . ";"; } $ret .= "{ host: " . quoteAndDeslashEachItem($host) . ", cookies: '" . addslashes($c) . "' },"; } $len = strlen($ret); if ($ret[$len - 1] == ',') { $ret = substr($ret, 0, $len - 1); } return $ret . "];\n"; }
public function get() { $ret = "theSearchEngines.globalLimit = " . $this->limit . "; theSearchEngines.sites = {"; foreach ($this->engines as $name => $nfo) { $ret .= "'" . $name . "': { enabled: " . intval($nfo["enabled"]) . ", global: " . intval($nfo["global"]) . ", auth: " . intval($nfo["auth"]) . ", limit: " . $nfo["limit"] . ", public: " . intval($nfo["public"]) . ", cookies: " . quoteAndDeslashEachItem($nfo["cookies"]) . ", cats: ["; foreach ($nfo["cats"] as $cat => $prm) { $ret .= quoteAndDeslashEachItem($cat); $ret .= ','; } $len = strlen($ret); if ($ret[$len - 1] == ',') { $ret = substr($ret, 0, $len - 1); } $ret .= ']},'; } $len = strlen($ret); if ($ret[$len - 1] == ',') { $ret = substr($ret, 0, $len - 1); } return $ret . "};\n"; }
public function get() { $ret = "theWebUI.theAccounts = {"; foreach ($this->accounts as $name => $nfo) { $ret .= "'" . $name . "': { login: "******"login"]) . ", password: "******"password"]) . ", enabled: " . $nfo["enabled"] . ", auto: " . $nfo["auto"] . " },"; } $len = strlen($ret); if ($ret[$len - 1] == ',') { $ret = substr($ret, 0, $len - 1); } return $ret . "};\n"; }
public function get() { $ret = "theWebUI.ratios = ["; foreach ($this->rat as $item) { $tm = array_key_exists("time", $item) ? $item["time"] : -1; $ret .= "{ action: " . $item["action"] . ", min: " . $item["min"] . ", max: " . $item["max"] . ", time: " . $tm . ", upload: " . $item["upload"] . ", name : " . quoteAndDeslashEachItem($item["name"]) . " },"; } $len = strlen($ret); if ($ret[$len - 1] == ',') { $ret = substr($ret, 0, $len - 1); } return $ret . "];\ntheWebUI.maxRatio = " . MAX_RATIO . ";\ntheWebUI.defaultRatio = " . $this->default . ";\n"; }
public function get() { $ret = "theWebUI.throttles = ["; foreach ($this->thr as $item) { $ret .= "{ up: " . $item["up"] . ", down: " . $item["down"] . ", name : " . quoteAndDeslashEachItem($item["name"]) . " },"; } $len = strlen($ret); if ($ret[$len - 1] == ',') { $ret = substr($ret, 0, $len - 1); } return $ret . "];\ntheWebUI.maxThrottle = " . MAX_THROTTLE . ";\ntheWebUI.defaultThrottle = " . $this->default . ";\n"; }
<?php eval(getPluginConf('lookat')); require_once "lookat.php"; $theSettings->registerPlugin($plugin["name"], $pInfo["perms"]); $look = rLook::load(); $jResult .= 'plugin.lookData=' . $look->get() . ';'; $jResult .= 'plugin.partsToRemove=' . quoteAndDeslashEachItem($partsToRemove) . ';';