Exemplo n.º 1
0
// gestion des types d'extension de fichiers
$att_icons = "";
$handle = opendir("{$racine_fma}/images/upload/file_types");
while (false !== ($file = readdir($handle))) {
    if ($file != "." && $file != "..") {
        $prefix = strtoLower(substr($file, 0, strpos($file, '.')));
        $att_icons[$prefix] = "<img src=\"images/upload/file_types/" . $file . "\" border=\"0\" alt=\"\" />";
    }
}
closedir($handle);
$att_icon_dir = "<img src=\"images/upload/file_types/dir.gif\" border=\"0\" alt=\"\" />";
// Répertoires
$subdirs = "";
$sizeofDir = 0;
$linked = "onmouseOver=\"this.className='ligna'; this.style.cursor='default';\" onmouseOut=\"this.className='lignb';\"";
while ($obj->NextDir()) {
    if (fma_autorise("d", $obj->FieldName)) {
        $subdirs .= "<tr class=\"lignb\" " . $linked . ">";
        $clik_url = "<a href=\"modules.php?ModPath={$ModPath}&amp;ModStart={$ModStart}&amp;FmaRep={$FmaRep}&amp;browse=" . rawurlencode(encrypt("{$base}/{$obj->FieldName}")) . "\">";
        if ($dirpres_fma[0]) {
            $subdirs .= "<td width=\"3%\">{$clik_url}{$att_icon_dir}</a></td>";
        }
        if ($dirpres_fma[1]) {
            $subdirs .= "<td nowrap=\"nowrap\" width=\"50%\">{$clik_url}" . extend_ascii($obj->FieldName) . "</a></td>";
        }
        if ($dirpres_fma[2]) {
            $subdirs .= "<td>" . $obj->FieldDate . "</td>";
        }
        if ($dirpres_fma[3]) {
            $sizeofD = $obj->FieldSize;
            $sizeofDir = $sizeofDir + $sizeofD;