\n";
if ($c[$i]["type"]) {
- echo " | ".htmlentities($c[$i]["name"])." | \n";
+ echo " | ";
+ echo "can_edit($R,$c[$i]["name"]);
+ if ($canedit&&($c[$i]["size"]<$memory_limit)) {
+ 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"])." | ";
$vu=$bro->viewurl($R,$c[$i]["name"]);
if ($vu) {
@@ -444,8 +457,14 @@ function actmoveto_not_empty() {
echo " | \n";
if ($c[$i]["type"]) {
echo " | ".htmlentities($c[$i]["name"])." | \n";
+ $canedit = $bro->can_edit($R,$c[$i]["name"]);
+ if ($canedit&&($c[$i]["size"]<$memory_limit)) {
+ 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"])." | ";
$vu=$bro->viewurl($R,$c[$i]["name"]);
if ($vu) {
@@ -479,8 +498,14 @@ function actmoveto_not_empty() {
echo " |
\n";
if ($c[$i]["type"]) {
echo " | ".htmlentities($c[$i]["name"])." | \n";
+ $canedit = $bro->can_edit($R,$c[$i]["name"]);
+ if ($canedit&&($c[$i]["size"]<$memory_limit)) {
+ 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"])." | ";
$vu=$bro->viewurl($R,$c[$i]["name"]);
if ($vu) {
@@ -507,8 +532,14 @@ function actmoveto_not_empty() {
echo " |
\n";
if ($c[$i]["type"]) {
echo " | ".htmlentities($c[$i]["name"])." | \n";
+ $canedit = $bro->can_edit($R,$c[$i]["name"]);
+ if ($canedit&&($c[$i]["size"]<$memory_limit)) {
+ 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"])." | ";
$vu=$bro->viewurl($R,$c[$i]["name"]);
if ($vu) {
@@ -536,8 +567,14 @@ function actmoveto_not_empty() {
echo " |
\n";
if ($c[$i]["type"]) {
echo " | ".htmlentities($c[$i]["name"])." | \n";
+ $canedit = $bro->can_edit($R,$c[$i]["name"]);
+ if ($canedit&&($c[$i]["size"]<$memory_limit)) {
+ 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"])." | ";
$vu=$bro->viewurl($R,$c[$i]["name"]);
if ($vu) {
diff --git a/bureau/class/functions.php b/bureau/class/functions.php
index d06e6e7b..03328db8 100644
--- a/bureau/class/functions.php
+++ b/bureau/class/functions.php
@@ -488,6 +488,9 @@ function format_date($format, $date) {
$hh = $h;
$am = "am";
}
+
+ // we want every number to be treated as a string.
+ $format=str_replace('$d', '$s', $format);
return sprintf($format, $d, $m, $y, $h, $i, $hh, $am);
}
@@ -627,7 +630,7 @@ function eoption($values, $cur, $onedim = false) {
*/
function ehe($str, $affiche = TRUE) {
global $charset;
- $retour = htmlspecialchars($str, ENT_QUOTES, $charset);
+ $retour = htmlspecialchars($str, ENT_QUOTES|ENT_SUBSTITUTE, $charset);
if ($affiche) {
echo $retour;
}
|