debugging bro_editor on var

This commit is contained in:
Benjamin Sonntag 2011-03-28 12:00:33 +00:00
parent 90c77142b4
commit b044ad1dd9
2 changed files with 18 additions and 18 deletions

View File

@ -29,7 +29,7 @@
*/
require_once("../class/config.php");
$file=ssla($file);
$editfile=ssla($editfile);
$texte=ssla($texte);
$R=$bro->convertabsolute($R,1);
@ -40,14 +40,14 @@ if ($cancel) {
exit();
}
if ($saveret) {
$bro->Save($file,$R,$texte);
$error=sprintf(_("Your file %s has been saved"),$file)." (".format_date('%3$d-%2$d-%1$d %4$d:%5$d',date("Y-m-d H:i:s")).")";
$bro->Save($editfile,$R,$texte);
$error=sprintf(_("Your file %s has been saved"),$editfile)." (".format_date('%3$d-%2$d-%1$d %4$d:%5$d',date("Y-m-d H:i:s")).")";
include("bro_main.php");
exit();
}
if ($save) {
$bro->Save($file,$R,$texte);
$error=sprintf(_("Your file %s has been saved"),$file)." (".format_date('%3$d-%2$d-%1$d %4$d:%5$d',date("Y-m-d H:i:s")).")";
$bro->Save($editfile,$R,$texte);
$error=sprintf(_("Your file %s has been saved"),$editfile)." (".format_date('%3$d-%2$d-%1$d %4$d:%5$d',date("Y-m-d H:i:s")).")";
}
include_once("head.php");
@ -55,13 +55,13 @@ include_once("head.php");
?>
<p>
<?php if ($error) echo "<font color=\"red\">$error</font><br />"; ?>
<?php echo _("File editing")." <code>$R/<b>$file</b></code><br />"; ?>
<?php echo _("File editing")." <code>$R/<b>$editfile</b></code><br />"; ?>
</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
$bro->content($R,$file);
$bro->content($R,$editfile);
?></textarea><img src="/admin/icon/winresize.gif" alt="<?php __("ctrl+click or shift+click and drag to resize the editing zone"); ?>" title="<?php __("ctrl+click or shift+click and drag to resize the editing zone"); ?>" height="20" width="20" /></div><br />
<input type="hidden" name="file" value="<?php echo str_replace("\"","&quot;",$file); ?>" />
<input type="hidden" name="editfile" value="<?php echo str_replace("\"","&quot;",$editfile); ?>" />
<input type="hidden" name="R" value="<?php echo str_replace("\"","&quot;",$R); ?>" />
<input type="submit" class="inb" value="<?php __("Save"); ?>" name="save" />

View File

@ -65,7 +65,7 @@ if (isset($formu) && $formu) {
}
$p=$bro->GetPrefs();
if ($p["createfile"]==1) {
$file=$nomfich;
$editfile=$nomfich;
include("bro_editor.php");
exit();
}
@ -85,9 +85,9 @@ if (isset($formu) && $formu) {
<input type="hidden" name="actdel" value="1" />
<input type="hidden" name="R" value="<?php echo $R?>" />
<p class="error"><?php __("WARNING: Confirm the deletion of this files"); ?></p>
<?php foreach($_REQUEST["d"] as $file){ ?>
<p><?php echo stripslashes($file); ?></p>
<input type="hidden" name="d[]" value="<?php echo htmlentities(stripslashes($file)); ?>" />
<?php foreach($_REQUEST["d"] as $editfile){ ?>
<p><?php echo stripslashes($editfile); ?></p>
<input type="hidden" name="d[]" value="<?php echo htmlentities(stripslashes($editfile)); ?>" />
<?php } ?>
<blockquote>
<input type="submit" class="inb" name="del_confirm" value="<?php __("Yes"); ?>" />&nbsp;&nbsp;
@ -322,7 +322,7 @@ if ($p["showicons"]) {
echo "<td width=\"28\"><img src=\"icon/".$bro->icon($c[$i]["name"])."\" width=\"16\" height=\"16\" alt=\"\" /></td>";
}
echo "<td><a href=\"";
echo "bro_editor.php?file=".urlencode($c[$i]["name"])."&amp;R=".urlencode($R);
echo "bro_editor.php?editfile=".urlencode($c[$i]["name"])."&amp;R=".urlencode($R);
echo "\">".htmlentities($c[$i]["name"])."</a></td>\n";
echo " <td>".format_size($c[$i]["size"])."</td>";
echo "<td>".format_date('%3$d-%2$d-%1$d %4$d:%5$d',date("Y-m-d H:i:s",$c[$i]["date"]))."<br /></td>";
@ -376,7 +376,7 @@ $col=3-$col;
echo "<tr class=\"lst$col\">\n";
if ($c[$i]["type"]) {
echo " <td width=\"28\"><input type=\"checkbox\" class=\"inc\" name=\"d[]\" value=\"".$c[$i]["name"]."\" /></td><td><a href=\"";
echo "bro_editor.php?file=".urlencode($c[$i]["name"])."&amp;R=".urlencode($R);
echo "bro_editor.php?editfile=".urlencode($c[$i]["name"])."&amp;R=".urlencode($R);
echo "\">".htmlentities($c[$i]["name"])."</a></td>\n";
echo " <td>".format_size($c[$i]["size"])."</td><td>";
$vu=$bro->viewurl($R,$c[$i]["name"]);
@ -406,7 +406,7 @@ $col=3-$col;
echo "<tr class=\"lst$col\">\n";
if ($c[$i]["type"]) {
echo " <td width=\"28\"><input TYPE=checkbox class=\"inc\" name=\"d[]\" value=\"".$c[$i]["name"]."\"></td><td><a href=\"";
echo "bro_editor.php?file=".urlencode($c[$i]["name"])."&amp;R=".urlencode($R);
echo "bro_editor.php?editfile=".urlencode($c[$i]["name"])."&amp;R=".urlencode($R);
echo "\">".htmlentities($c[$i]["name"])."</a></td>\n";
echo " <td>".format_size($c[$i]["size"])."</td><td>";
$vu=$bro->viewurl($R,$c[$i]["name"]);
@ -443,7 +443,7 @@ $col=3-$col;
echo "<tr class=\"lst$col\">\n";
if ($c[$i]["type"]) {
echo " <td width=\"28\"><input TYPE=checkbox class=\"inc\" name=\"d[]\" value=\"".$c[$i]["name"]."\"></td><td><a href=\"";
echo "bro_editor.php?file=".urlencode($c[$i]["name"])."&amp;R=".urlencode($R);
echo "bro_editor.php?editfile=".urlencode($c[$i]["name"])."&amp;R=".urlencode($R);
echo "\">".htmlentities($c[$i]["name"])."</a></td>\n";
echo " <td>".format_size($c[$i]["size"])."</td><td>";
$vu=$bro->viewurl($R,$c[$i]["name"]);
@ -473,7 +473,7 @@ $col=3-$col;
echo "<tr class=\"lst$col\">\n";
if ($c[$i]["type"]) {
echo " <td width=\"28\"><input TYPE=checkbox class=\"inc\" name=\"d[]\" value=\"".$c[$i]["name"]."\"></td><td><a href=\"";
echo "bro_editor.php?file=".urlencode($c[$i]["name"])."&amp;R=".urlencode($R);
echo "bro_editor.php?editfile=".urlencode($c[$i]["name"])."&amp;R=".urlencode($R);
echo "\">".htmlentities($c[$i]["name"])."</a></td>\n";
echo " <td>".format_size($c[$i]["size"])."</td><td>";
$vu=$bro->viewurl($R,$c[$i]["name"]);
@ -504,7 +504,7 @@ $col=3-$col;
echo "<tr class=\"lst$col\">\n";
if ($c[$i]["type"]) {
echo " <td width=\"28\"><input TYPE=checkbox class=\"inc\" name=\"d[]\" value=\"".$c[$i]["name"]."\"></td><td><a href=\"";
echo "bro_editor.php?file=".urlencode($c[$i]["name"])."&amp;R=".urlencode($R);
echo "bro_editor.php?editfile=".urlencode($c[$i]["name"])."&amp;R=".urlencode($R);
echo "\">".htmlentities($c[$i]["name"])."</a></td>\n";
echo " <td>".format_size($c[$i]["size"])."</td><td>";
$vu=$bro->viewurl($R,$c[$i]["name"]);