Example #1
0
                }
                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;
    }
}
cachedEcho(json_encode($output), "application/json");
Example #2
0
<?php

require_once 'ratio.php';
$rat = new rRatio();
$rat->set();
cachedEcho($rat->get(), "application/javascript");