diff --git a/bureau/admin/bro_main.php b/bureau/admin/bro_main.php index 2bf0e8a0..3474c7d8 100644 --- a/bureau/admin/bro_main.php +++ b/bureau/admin/bro_main.php @@ -1,56 +1,56 @@ array ("request", "string", ""), - "o" => array ("request", "array", ""), - "d" => array ("request", "array", ""), - "perm" => array ("post", "array", array()), - "formu" => array ("request", "integer", ""), - "actextract" => array ("request", "string", ""), - "fileextract" => array ("request", "string", ""), - "actperms" => array ("request", "string", ""), - "actdel" => array ("request", "string", ""), - "actcopy" => array ("request", "string", ""), - "actrename" => array ("request", "string", ""), - "actmove" => array ("request", "string", ""), - "actmoveto" => array ("request", "string", ""), - "nomfich" => array ("request", "string", ""), - "del_confirm" => array ("request", "string", ""), - "cancel" => array ("request", "string", ""), - "showdirsize" => array ("request", "integer", "0"), - "nomfich" => array ("request", "string", ""), - ); + "R" => array ("request", "string", ""), + "o" => array ("request", "array", ""), + "d" => array ("request", "array", ""), + "perm" => array ("post", "array", array()), + "formu" => array ("request", "integer", ""), + "actextract" => array ("request", "string", ""), + "fileextract" => array ("request", "string", ""), + "actperms" => array ("request", "string", ""), + "actdel" => array ("request", "string", ""), + "actcopy" => array ("request", "string", ""), + "actrename" => array ("request", "string", ""), + "actmove" => array ("request", "string", ""), + "actmoveto" => array ("request", "string", ""), + "nomfich" => array ("request", "string", ""), + "del_confirm" => array ("request", "string", ""), + "cancel" => array ("request", "string", ""), + "showdirsize" => array ("request", "integer", "0"), + "nomfich" => array ("request", "string", ""), + ); getFields($fields); @@ -63,78 +63,78 @@ $R=$bro->convertabsolute($R,1); // on fait ? if (!empty($formu) && $formu) { switch ($formu) { - case 1: // Créer le répertoire $R.$nomfich - if (!$bro->CreateDir($R,$nomfich)) { - $error = $err->errstr(); - } - $p=$bro->GetPrefs(); - break; - case 6: // Créer le fichier $R.$nomfich - if (!$bro->CreateFile($R,$nomfich)) { - $error = $err->errstr(); - } - $p=$bro->GetPrefs(); - if ($p["createfile"]==1) { - $editfile=$nomfich; - include("bro_editor.php"); - exit(); - } - break; - case 2: // act vaut Supprimer Copier ou Renommer. - if ($actdel) { - if (!empty($del_confirm) ) { - if (!$bro->DeleteFile($d,$R)) { - $error = $err->errstr(); - } - } elseif (empty($cancel) && is_array($d)) { - include_once("head.php"); -?> -

:

-
- - - -

- -

- - -
- " />   - " /> -
-
-CreateDir($R,$nomfich)) { + $error = $err->errstr(); + } + $p=$bro->GetPrefs(); + break; + case 6: // Créer le fichier $R.$nomfich + if (!$bro->CreateFile($R,$nomfich)) { + $error = $err->errstr(); + } + $p=$bro->GetPrefs(); + if ($p["createfile"]==1) { + $editfile=$nomfich; + include("bro_editor.php"); exit(); } - } - if ($actcopy) { - if (!$bro->CopyFile($d,$R,$actmoveto)) { + break; + case 2: // act vaut Supprimer Copier ou Renommer. + if ($actdel) { + if (!empty($del_confirm) ) { + if (!$bro->DeleteFile($d,$R)) { + $error = $err->errstr(); + } + } elseif (empty($cancel) && is_array($d)) { + include_once("head.php"); + ?> +

:

+
+ + + +

+ +

+ + +
+ " />   + " /> +
+
+ CopyFile($d,$R,$actmoveto)) { + $error = $err->errstr(); + } + } + if ($actmove) { + if (!$bro->MoveFile($d,$R,$actmoveto)) { + $error = $err->errstr(); + } + } + break; + case 4: // Renommage Effectif... + if (!$bro->RenameFile($R,$o,$d)) { // Rename $R (directory) $o (old) $d (new) names + $error = $err->errstr(); + } + break; + case 3: // Upload de fichier... + if (!$bro->UploadFile($R)) { $error = $err->errstr(); } - } - if ($actmove) { - if (!$bro->MoveFile($d,$R,$actmoveto)) { + break; + case 7: // Changement de permissions [ML] + if (!@$bro->ChangePermissions($R, $d, $perm)) { $error = $err->errstr(); } - } - break; - case 4: // Renommage Effectif... - if (!$bro->RenameFile($R,$o,$d)) { // Rename $R (directory) $o (old) $d (new) names - $error = $err->errstr(); - } - break; - case 3: // Upload de fichier... - if (!$bro->UploadFile($R)) { - $error = $err->errstr(); - } - break; - case 7: // Changement de permissions [ML] - if (!@$bro->ChangePermissions($R, $d, $perm)) { - $error = $err->errstr(); - } - break; + break; } } @@ -163,7 +163,7 @@ if ($c===false) $error=$err->errstr(); $error

"; ?> @@ -171,17 +171,17 @@ if ($c===false) $error=$err->errstr(); @@ -264,302 +264,302 @@ if ($formu==2 && ! (empty($actperms)) && count($d)) { /* We draw the file list and button bar only if there is files here ! */ if (count($c)) { -?> - - - + ?> + + + -
+
-
-
- - + + + -
+
- +
- " /> +" /> -
+
 
-
+ + + -
-" /> -" /> -" /> -  |  -" /> -" /> - - - + " /> + " /> + " /> +   |  + " /> + " /> + + + -
+
-"; -?> - - - - - - - - - - - - - - -"; + ?> + + + + + + + + + + + + + + + \n"; -if ($c[$i]["type"]) { -echo " "; -if ($p["showicons"]) { -echo "icon($c[$i]["name"])."\" width=\"16\" height=\"16\" alt=\"\" />"; -} -echo "can_edit($R,$c[$i]["name"]); -if ($canedit) { - echo "bro_editor.php?editfile=".urlencode($c[$i]["name"])."&R=".urlencode($R); -} else { - echo "bro_downloadfile.php?dir=".urlencode($R)."&file=".urlencode($c[$i]["name"]); -} -echo "\">"; ehe($c[$i]["name"]); echo"\n"; -echo " ".format_size($c[$i]["size"]).""; -echo "".format_date(_('%3$d-%2$d-%1$d %4$d:%5$d'),date("Y-m-d H:i:s",$c[$i]["date"]))."
"; -if ($p["showtype"]) { -echo ""._($bro->mime($c[$i]["name"])).""; -} -$vu=$bro->viewurl($R,$c[$i]["name"]); -if ($vu) { -echo ""._("View").""; -} else { -echo " "; -} -$e = $bro->is_extractable($R,$c[$i]["name"]); -if ($e) { - echo " "; - echo _("Extract"); - echo ""; -} + $col=1; + for($i=0;$i\n"; + if ($c[$i]["type"]) { + echo " "; + if ($p["showicons"]) { + echo "icon($c[$i]["name"])."\" width=\"16\" height=\"16\" alt=\"\" />"; + } + echo "can_edit($R,$c[$i]["name"]); + if ($canedit) { + echo "bro_editor.php?editfile=".urlencode($c[$i]["name"])."&R=".urlencode($R); + } else { + echo "bro_downloadfile.php?dir=".urlencode($R)."&file=".urlencode($c[$i]["name"]); + } + echo "\">"; ehe($c[$i]["name"]); echo"\n"; + echo " ".format_size($c[$i]["size"]).""; + echo "".format_date(_('%3$d-%2$d-%1$d %4$d:%5$d'),date("Y-m-d H:i:s",$c[$i]["date"]))."
"; + if ($p["showtype"]) { + echo ""._($bro->mime($c[$i]["name"])).""; + } + $vu=$bro->viewurl($R,$c[$i]["name"]); + if ($vu) { + echo ""._("View").""; + } else { + echo " "; + } + $e = $bro->is_extractable($R,$c[$i]["name"]); + if ($e) { + echo " "; + echo _("Extract"); + echo ""; + } -echo "\n"; -} else { // DOSSIER : -echo " "; -if ($p["showicons"]) { -echo "\"\""; -} -echo "".htmlentities($c[$i]["name"])."/\n"; -echo " ".format_size($c[$i]["size"]).""; -echo "".format_date(_('%3$d-%2$d-%1$d %4$d:%5$d'),date("Y-m-d h:i:s",$c[$i]["date"]))."
"; -if ($p["showtype"]) { - echo ""._("Folder").""; -} -echo " "; -echo "\n"; -} + echo "\n"; + } else { // DOSSIER : + echo " "; + if ($p["showicons"]) { + echo "\"\""; + } + echo "".htmlentities($c[$i]["name"])."/\n"; + echo " ".format_size($c[$i]["size"]).""; + echo "".format_date(_('%3$d-%2$d-%1$d %4$d:%5$d'),date("Y-m-d h:i:s",$c[$i]["date"]))."
"; + if ($p["showtype"]) { + echo ""._("Folder").""; + } + echo " "; + echo "\n"; + } -echo "\n"; -} -echo ""; -break; -case 1: -/* AFFICHE 2 COLONNES COURTES */ -reset($c); -echo ""; -echo "
"; -echo ""; -$col=1; -for($i=0;$i\n"; -if ($c[$i]["type"]) { -echo " \n"; -echo " \n"; -} else { -echo " \n"; -echo " \n"; -} + echo "\n"; + } + echo "
".htmlentities($c[$i]["name"])."".format_size($c[$i]["size"]).""; -$vu=$bro->viewurl($R,$c[$i]["name"]); -if ($vu) { -echo ""._("V").""; -} else { -echo " "; -} -echo "".htmlentities($c[$i]["name"])."/".format_size($c[$i]["size"]).""; -echo " "; -echo "
"; + break; + case 1: + /* AFFICHE 2 COLONNES COURTES */ + reset($c); + echo ""; + echo ""; -echo "
"; + echo ""; + $col=1; + for($i=0;$i\n"; + if ($c[$i]["type"]) { + echo " \n"; + echo " \n"; + } else { + echo " \n"; + echo " \n"; + } -echo "\n"; -} -echo "
".htmlentities($c[$i]["name"])."".format_size($c[$i]["size"]).""; + $vu=$bro->viewurl($R,$c[$i]["name"]); + if ($vu) { + echo ""._("V").""; + } else { + echo " "; + } + echo "".htmlentities($c[$i]["name"])."/".format_size($c[$i]["size"]).""; + echo " "; + echo "
"; -echo "
"; -echo ""; -$col=1; -for($i=round(count($c)/2);$i\n"; -if ($c[$i]["type"]) { -echo " \n"; -echo " \n"; -} else { -echo " \n"; -echo " \n"; -} + echo "\n"; + } + echo "
".htmlentities($c[$i]["name"])."".format_size($c[$i]["size"]).""; -$vu=$bro->viewurl($R,$c[$i]["name"]); -if ($vu) { -echo ""._("V").""; -} else { -echo " "; -} -echo "".htmlentities($c[$i]["name"])."/".format_size($c[$i]["size"]).""; -echo " "; -echo "
"; + echo "
"; + echo ""; + $col=1; + for($i=round(count($c)/2);$i\n"; + if ($c[$i]["type"]) { + echo " \n"; + echo " \n"; + } else { + echo " \n"; + echo " \n"; + } -echo "\n"; -} -echo "
".htmlentities($c[$i]["name"])."".format_size($c[$i]["size"]).""; + $vu=$bro->viewurl($R,$c[$i]["name"]); + if ($vu) { + echo ""._("V").""; + } else { + echo " "; + } + echo "".htmlentities($c[$i]["name"])."/".format_size($c[$i]["size"]).""; + echo " "; + echo "
"; -echo "
"; -break; -case 2: -/* AFFICHE 3 COLONNES COURTES */ -reset($c); -echo ""; -echo ""; + echo "
"; -echo ""; -$col=1; -for($i=0;$i\n"; -if ($c[$i]["type"]) { -echo " \n"; -echo " \n"; -} else { -echo " \n"; -echo " \n"; -} + echo "\n"; + } + echo "
".htmlentities($c[$i]["name"])."".format_size($c[$i]["size"]).""; -$vu=$bro->viewurl($R,$c[$i]["name"]); -if ($vu) { -echo ""._("V").""; -} else { -echo " "; -} -echo "".htmlentities($c[$i]["name"])."/".format_size($c[$i]["size"]).""; -echo " "; -echo "
"; + echo "
"; + break; + case 2: + /* AFFICHE 3 COLONNES COURTES */ + reset($c); + echo ""; + echo ""; -echo "
"; + echo ""; + $col=1; + for($i=0;$i\n"; + if ($c[$i]["type"]) { + echo " \n"; + echo " \n"; + } else { + echo " \n"; + echo " \n"; + } -echo "\n"; -} -echo "
".htmlentities($c[$i]["name"])."".format_size($c[$i]["size"]).""; + $vu=$bro->viewurl($R,$c[$i]["name"]); + if ($vu) { + echo ""._("V").""; + } else { + echo " "; + } + echo "".htmlentities($c[$i]["name"])."/".format_size($c[$i]["size"]).""; + echo " "; + echo "
"; -echo "
"; -echo ""; -$col=1; -for($i=round(count($c)/3);$i\n"; -if ($c[$i]["type"]) { -echo " \n"; -echo " \n"; + } + echo "
".htmlentities($c[$i]["name"])."".format_size($c[$i]["size"]).""; -$vu=$bro->viewurl($R,$c[$i]["name"]); -if ($vu) { -echo ""._("V").""; -} else { -echo " "; -} + echo "
"; + echo "
"; + echo ""; + $col=1; + for($i=round(count($c)/3);$i\n"; + if ($c[$i]["type"]) { + echo " \n"; + echo " \n"; -} else { -echo " \n"; -echo " \n"; -} + echo "\n"; + } else { + echo " \n"; + echo " \n"; + } -echo "\n"; -} -echo "
".htmlentities($c[$i]["name"])."".format_size($c[$i]["size"]).""; + $vu=$bro->viewurl($R,$c[$i]["name"]); + if ($vu) { + echo ""._("V").""; + } else { + echo " "; + } -echo "".htmlentities($c[$i]["name"])."/".format_size($c[$i]["size"]).""; -echo " "; -echo "".htmlentities($c[$i]["name"])."/".format_size($c[$i]["size"]).""; + echo " "; + echo "
"; -echo "
"; -echo ""; -$col=1; -for($i=round(2*count($c)/3);$i\n"; -if ($c[$i]["type"]) { -echo " \n"; -echo " \n"; -} else { -echo " \n"; -echo " \n"; -} + echo "\n"; + } + echo "
".htmlentities($c[$i]["name"])."".format_size($c[$i]["size"]).""; -$vu=$bro->viewurl($R,$c[$i]["name"]); -if ($vu) { -echo ""._("View").""; -} else { -echo " "; -} -echo "".htmlentities($c[$i]["name"])."/".format_size($c[$i]["size"]).""; -echo " "; -echo "
"; + echo "
"; + echo ""; + $col=1; + for($i=round(2*count($c)/3);$i\n"; + if ($c[$i]["type"]) { + echo " \n"; + echo " \n"; + } else { + echo " \n"; + echo " \n"; + } -echo "\n"; -} -echo "
".htmlentities($c[$i]["name"])."".format_size($c[$i]["size"]).""; + $vu=$bro->viewurl($R,$c[$i]["name"]); + if ($vu) { + echo ""._("View").""; + } else { + echo " "; + } + echo "".htmlentities($c[$i]["name"])."/".format_size($c[$i]["size"]).""; + echo " "; + echo "
"; -echo "
"; -break; -} -?> - -\n"; + } + echo "
"; + echo ""; + echo ""; + break; + } + ?> + + "._("No files in this folder")."

"; } ?> - - + + -

 

+

 

is_protected($R)) { -echo ""._("Edit this folder's protection").""; + echo ""._("Edit this folder's protection").""; } else { echo ""._("Protect this folder").""; @@ -567,33 +567,33 @@ else { ?>

- +   - l_tgz[$p["downfmt"]]); ?> +l_tgz[$p["downfmt"]]); ?> -

- is_ftp($R)) { -?> - - -   +

is_ftp($R)) { + ?> + + +   + - + ?> + -   -   +

 

- +