Ejemplo n.º 1
0
    }
    $ibid = str_replace("..", "", $ibid);
    // contraint à rester dans la zone de repertoire définie
    $ibid = $basedir_fma . substr($ibid, strlen($basedir_fma));
    $base = $ibid;
} else {
    $base = $basedir_fma;
}
// initialisation de la classe
$obj = new Navigator();
$obj->Extension = explode(" ", $extension_fma);
// Construction de la Classe
if ($obj->File_Navigator($base, $tri_fma['tri'], $tri_fma['sens'], $dirsize_fma)) {
    // Current PWD and Url_back / match by OS determination
    if (substr(@php_uname(), 0, 7) == "Windows") {
        $cur_nav = str_replace("\\", "/", $obj->Pwd());
        $cur_nav_back = dirname($base);
    } else {
        $cur_nav = $obj->Pwd();
        $cur_nav_back = str_replace("\\", "/", dirname($base));
    }
    $home = "/" . basename($basedir_fma);
    $cur_nav_href_back = "<a href=\"modules.php?ModPath={$ModPath}&amp;ModStart={$ModStart}&amp;FmaRep={$FmaRep}&amp;browse=" . rawurlencode(encrypt($cur_nav_back)) . "\">" . str_replace(dirname($basedir_fma), "", $cur_nav_back) . "</a>/" . basename($cur_nav);
    if ($home_fma != "") {
        $cur_nav_href_back = str_replace($home, $home_fma, $cur_nav_href_back);
    }
    $cur_nav_encrypt = rawurlencode(encrypt($cur_nav));
} else {
    // le répertoire ou sous répertoire est protégé (ex : chmod)
    redirect_url("modules.php?ModPath={$ModPath}&amp;ModStart={$ModStart}&amp;FmaRep={$FmaRep}&amp;browse=" . rawurlencode(encrypt(dirname($base))));
}