root/alternc/trunk/bureau/admin/bro_editor.php

Revision 1642, 3.1 kB (checked in by benjamin, 3 years ago)

changement du systeme de dimension de la fenêtre d'édition, Closes #671

Line 
1 <?php
2 /*
3  $Id: bro_editor.php,v 1.5 2005/05/03 14:49:06 anarcat Exp $
4  ----------------------------------------------------------------------
5  AlternC - Web Hosting System
6  Copyright (C) 2002 by the AlternC Development Team.
7  http://alternc.org/
8  ----------------------------------------------------------------------
9  Based on:
10  Valentin Lacambre's web hosting softwares: http://altern.org/
11  ----------------------------------------------------------------------
12  LICENSE
13
14  This program is free software; you can redistribute it and/or
15  modify it under the terms of the GNU General Public License (GPL)
16  as published by the Free Software Foundation; either version 2
17  of the License, or (at your option) any later version.
18
19  This program is distributed in the hope that it will be useful,
20  but WITHOUT ANY WARRANTY; without even the implied warranty of
21  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
22  GNU General Public License for more details.
23
24  To read the license please visit http://www.gnu.org/copyleft/gpl.html
25  ----------------------------------------------------------------------
26  Original Author of file: Benjamin Sonntag
27  Purpose of file: Editor of the browser
28  ----------------------------------------------------------------------
29 */
30 require_once("../class/config.php");
31
32 $file=ssla($file);
33 $texte=ssla($texte);
34
35 $R=$bro->convertabsolute($R,1);
36 $p=$bro->GetPrefs();
37
38 if ($cancel) {
39     include("bro_main.php");
40     exit();
41 }
42 if ($saveret) {
43     $bro->Save($file,$R,$texte);
44     $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")).")";
45     include("bro_main.php");
46     exit();
47 }
48 if ($save) {
49     $bro->Save($file,$R,$texte);
50     $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")).")";
51 }
52
53 include("head.php");
54 ?>
55 <script src="/admin/js/wz_dragdrop.js" type="text/javascript"></script>
56 </head>
57 <body>
58 <p>
59 <?php if ($error) echo "<font color=\"red\">$error</font><br />"; ?>
60 <?php echo _("File editing")." <code>$R/<b>$file</b></code><br />"; ?>
61 </p>
62 <form action="bro_editor.php" method="post"><p>
63 <div id="resizer" style="left: 0px; top: 0px; z-index: 54; width: <?php echo $p["editsizex"]*6; ?>px; height: <?php echo $p["editsizex"]*6; ?>px; cursor: auto;"><textarea class="int" style="width: 90%; height: 95%; font-family: <?php echo $p["editor_font"]; ?>; font-size: <?php echo $p["editor_size"]; ?>;" name="texte"><?php
64 $bro->content($R,$file);
65 ?></textarea><img src="/admin/icon/winresize.gif" alt="shift+click and drag to resize textarea" title="shift+click and drag to resize textarea" height="20" width="20"></div>
66
67     <input type="submit" class="inb" value="<?php __("Save"); ?>" name="save" />
68     <input type="submit" class="inb" value="<?php __("Save &amp; Quit"); ?>" name="saveret" />
69     <input type="submit" class="inb" value="<?php __("Quit"); ?>" name="cancel" />
70 </p>
71 <input type="hidden" name="file" value="<?php echo str_replace("\"","&quot;",$file); ?>" />
72 <input type="hidden" name="R" value="<?php echo str_replace("\"","&quot;",$R); ?>" />
73 <script type="text/javascript">
74 <!--
75 SET_DHTML("resizer"+RESIZABLE);
76 //-->
77 </script>
78 </form>
79 </body>
80 </html>
81
Note: See TracBrowser for help on using the browser.