Esempio n. 1
0
<?php

require_once 'throttle.php';
$thr = new rThrottle();
$thr->set();
cachedEcho($thr->get(), "application/javascript");
Esempio n. 2
0
             if ($file == ".." && $dir == $topDirectory) {
                 continue;
             }
             if (is_dir($path) && is_readable($path) && strpos(addslash($path), $topDirectory) === 0 && ($theSettings->uid < 0 || isUserHavePermission($theSettings->uid, $theSettings->gid, $path, 0x7))) {
                 $files[] = $file;
             }
         }
         closedir($dh);
         sort($files, SORT_STRING);
         $output["basedir"] = fullpath($dir);
         $output["dirlist"] = $files;
     }
 }
 if (in_array("channels", $modes) && $theSettings->isPluginRegistered('throttle')) {
     require_once '../throttle/throttle.php';
     $trt = rThrottle::load();
     $tnames = array();
     foreach ($trt->thr as $thr) {
         $tnames[] = $thr["name"];
     }
     $output["channels"] = $tnames;
 }
 if (in_array("ratios", $modes) && $theSettings->isPluginRegistered('ratio')) {
     require_once '../ratio/ratio.php';
     $rat = rRatio::load();
     $rnames = array();
     foreach ($rat->rat as $r) {
         $rnames[] = $r["name"];
     }
     $output["ratios"] = $rnames;
 }
Esempio n. 3
0
<?php

require_once '../plugins/throttle/throttle.php';
$thr = rThrottle::load();
if (!$thr->obtain()) {
    $jResult .= "plugin.disable(); noty('throttle: '+theUILang.pluginCantStart,'error');";
} else {
    $theSettings->registerPlugin($plugin["name"], $pInfo["perms"]);
}
$jResult .= $thr->get();