示例#1
0
    global $_REQUEST;
    if (isset($_REQUEST[$name]) == FALSE) {
        return $default;
    }
    return $_REQUEST[$name];
}
// NGWinamp Client Interface (instance $ngwc)
include "ngwinamp.class.php";
$ngwc = new NGWINAMPCLIENT();
// Loading parameters
$host = loadgvar("host", "");
$action = loadgvar("action", "");
$pl_op = loadgvar("pl_op", "");
$bw_path = loadgvar("bw_path", "");
$bw_addfile = loadgvar("bw_addfile", "");
$bw_op = loadgvar("bw_op", "");
// Default parameters
if (strlen($host) == 0) {
    $host = "localhost";
}
if (strlen($bw_path) > 0) {
    $bw_path = stripslashes($bw_path);
    if ($bw_path[strlen($bw_path) - 1] == '\\') {
        $bw_path = substr($bw_path, 0, strlen($bw_path) - 1);
    }
    if ($bw_path[0] == '\\' && $bw_path[1] == '\\') {
        $bw_path = str_replace("\\\\", "\\", $bw_path);
        $bw_path = "\\" . $bw_path;
    } else {
        $bw_path = str_replace("\\\\", "\\", $bw_path);
    }
示例#2
0
$ngwc = new NGWINAMPCLIENT();
// browsing variable
$curcount = 0;
$maxcount = 100;
$host = loadgvar("host", "");
$passwd = loadgvar("passwd", "");
$action = loadgvar("action", "");
$sn_op = loadgvar("sn_op", "");
$sn_volume = loadgvar("sn_volume", "");
$sn_pan = loadgvar("sn_pan", "");
$sn_pos = loadgvar("sn_pos", "");
$pl_op = loadgvar("pl_op", "");
$bw_op = loadgvar("bw_op", "");
$bw_path = loadgvar("bw_path", "");
$bw_addfile = loadgvar("bw_addfile", "");
$bw_maxcount = loadgvar("bw_maxcount", 0);
// Default parameters
if (strlen($host) == 0) {
    $host = "localhost";
}
if (strlen($passwd) == 0) {
    $passwd = "abcdef";
}
if (strlen($bw_maxcount) == 0) {
    $bw_maxcount = $maxcount;
}
if (strlen($bw_path) > 0) {
    $bw_path = stripslashes($bw_path);
    if ($bw_path[strlen($bw_path) - 1] == '\\') {
        $bw_path = substr($bw_path, 0, strlen($bw_path) - 1);
    }