Probleme d'affichage de la taille de fenetre d'edition de fichiers

This commit is contained in:
Alan Garcia 2012-08-23 12:49:20 +00:00
parent f346c48470
commit 439d9400d9
2 changed files with 8 additions and 15 deletions

View File

@ -71,14 +71,14 @@ include_once("head.php");
?>
<p>
<?php if (isset($error) && $error) echo "<p class=\"error\">$error</p>"; ?>
<?php echo _("File editing")." <code>$R/<b>$editfile</b></code><br />"; ?>
<h3><?php echo _("File editing")." <code>$R/<b>$editfile</b></code><br />"; ?></h3>
</p>
<form action="bro_editor.php" method="post"><br />
<div id="resizer" style="left: 0px; top: 0px; z-index: 54; width: <?php echo $p["editsizex"]*8; ?>px; height: <?php echo $p["editsizey"]*8; ?>px; cursor: auto;"><textarea class="int" style="font-family: <?php echo $p["editor_font"]; ?>; font-size: <?php echo $p["editor_size"]; ?>; width: 90%; height: 90%;" name="texte"><?php
<textarea class="int" style="font-family: <?php echo $p["editor_font"]; ?>; font-size: <?php echo $p["editor_size"]; ?>; width: 90%; height: 400px;" name="texte"><?php
$failed=false;
if (!$bro->content($R,$editfile)) {
$failed=true;
}
$content=$bro->content($R,$editfile);
if (empty($content)) $failed=true;
?></textarea>
<?php if ($failed) echo "<p class=\"error\">".$err->errstr()."</p>"; ?>
<input type="hidden" name="editfile" value="<?php echo str_replace("\"","&quot;",$editfile); ?>" />

View File

@ -671,19 +671,11 @@ class m_bro {
function content($R,$file) {
global $err;
$absolute=$this->convertabsolute($R,0);
$std="";
if (!strpos($file,"/")) {
$absolute.="/".$file;
if (file_exists($absolute)) {
$f=fopen($absolute,"rb");
if ($f) {
while ($s=fgets($f,1024)) {
echo str_replace("<","&lt;",str_replace("&","&amp;",$s));
}
fclose($f);
} else {
$err->raise("bro",6);
return false;
}
$std=str_replace("<","&lt;",str_replace("&","&amp;",file_get_contents($absolute)));
} else {
$err->raise("bro",6);
return false;
@ -692,6 +684,7 @@ class m_bro {
$err->raise("bro",1);
return false;
}
return $std;
}
/** Cache des urls pour VIEW