source: alternc/branches/franck-desktop/bureau/admin/bro_pref.php @ 1803

Revision 1803, 6.2 KB checked in by franck, 6 years ago (diff)

Le bureau ne dépend plus de register_globals (tester en register_globals off et error_reporting E_ALL)
Ajout de jQuery pour le menu et pour les futurs développements JS
Ajout d'une demande de suppression pour les listes mailmans
... je sais plus :)

Line 
1<?php
2/*
3 $Id: bro_pref.php,v 1.2 2003/06/10 06:45:16 root 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: Configuration of the file browser
28 ----------------------------------------------------------------------
29*/
30require_once("../class/config.php");
31
32$fields = array (
33        "submit"          => array ("request", "string", ""),
34        "editsizex"       => array ("request", "string", ""),
35        "editsizey"       => array ("request", "string", ""),
36        "listmode"        => array ("request", "string", ""),
37        "showicons"       => array ("request", "string", ""),
38        "downfmt"         => array ("request", "string", ""),
39        "createfile"      => array ("request", "string", ""),
40        "showtype"        => array ("request", "string", ""),
41        "editor_font"     => array ("request", "string", ""),
42        "editor_size"     => array ("request", "string", ""),
43        "golastdir"       => array ("request", "string", ""),
44);
45getFields($fields);
46
47if ($submit)
48{
49        $bro->SetPrefs($editsizex, $editsizey, $listmode, $showicons, $downfmt, $createfile, $showtype, $editor_font, $editor_size, $golastdir);
50        $error = _("Your preferences have been updated.");
51        include ("bro_main.php");
52        exit;
53}
54
55$p = $bro->GetPrefs();
56
57include_once("head.php");
58
59if ($error)
60        echo "<p class=\"error\">" . $error . "</p>";
61
62?>
63<h3><?php __("File editor preferences"); ?></h3>
64<form action="bro_pref.php" method="post">
65<table cellpadding="6" border="1" cellspacing="0">
66        <tr>
67                <td colspan="2"><h4><?php __("File editor preferences"); ?></h4></td>
68        </tr>
69        <tr>
70                <td><?php __("Horizontal window size"); ?></td>
71                <td><select class="inl" name="editsizex">
72<?php
73
74for ($i = 400; $i <= 1000; $i += 100)
75{
76        echo "<option value=\"" . $i . "\"";
77        if ($p["editsizex"] == $i) echo " selected=\"selected\"";
78        echo ">" . $i . "</option>";
79}
80
81?>
82</select></td>
83</tr>
84<tr>
85<td><?php __("Vertical window size"); ?></td>
86<td><select class="inl" name="editsizey">
87<?php
88
89for ($i = 200; $i <= 500; $i += 50)
90{
91        echo "<option value=\"" . $i . "\"";
92        if ($p["editsizey"] == $i)
93                echo " selected=\"selected\"";
94        echo ">" . $i . "</option>";
95}
96
97?>
98</select></td>
99</tr>
100<tr>
101<td><?php __("File editor font name"); ?></td>
102<td><select class="inl" name="editor_font">
103<?php
104
105for ($i = 0; $i < count($bro->l_editor_font); $i++)
106{
107        echo "<option value=\"" . $bro->l_editor_font[$i] . "\"";
108        if ($p["editor_font"] == $bro->l_editor_font[$i])
109                echo " selected=\"selected\"";
110        echo ">" . _($bro->l_editor_font[$i]) . "</option>";
111}
112
113?>
114</select></td>
115</tr>
116<tr>
117<td><?php __("File editor font size"); ?></td>
118<td><select class="inl" name="editor_size">
119<?php
120
121for ($i = 0; $i < count($bro->l_editor_size); $i++)
122{
123        echo "<option value=\"" . $bro->l_editor_size[$i] . "\"";
124        if ($p["editor_size"] == $bro->l_editor_size[$i])
125                echo " selected=\"selected\"";
126        echo ">" . _($bro->l_editor_size[$i]) . "</option>";
127}
128
129?>
130</select>
131</td>
132</tr>
133</table>
134
135<p>&nbsp;</p>
136
137<table cellpadding="6" border="1" cellspacing="0">
138        <tr>
139                <td colspan="2"><h4><?php __("File browser preferences"); ?></h4></td>
140        </tr>
141        <tr>
142                <td><?php __("File list view"); ?></td>
143                <td><select class="inl" name="listmode">
144<?php
145
146for ($i = 0; $i < count($bro->l_mode); $i++)
147{
148        echo "<option value=\"" . $i . "\"";
149        if ($p["listmode"] == $i)
150                echo " selected=\"selected\"";
151        echo ">" . _($bro->l_mode[$i]) . "</option>";
152}
153
154?>
155                        </select>
156                </td>
157        </tr>
158        <tr>
159                <td><?php __("Downloading file format"); ?></td>
160                <td><select class="inl" name="downfmt">
161<?php
162
163for($i = 0; $i <count($bro->l_tgz); $i++)
164{
165        echo "<option value=\"" . $i . "\"";
166        if ($p["downfmt"] == $i)
167                echo " selected=\"selected\"";
168        echo ">" . _($bro->l_tgz[$i]) . "</option>";
169}
170
171?>
172                        </select>
173                </td>
174        </tr>
175        <tr>
176                <td><?php __("What to do after creating a file"); ?></td>
177                <td><select class="inl" name="createfile">
178<?php
179
180for($i = 0; $i < count($bro->l_createfile); $i++)
181{
182        echo "<option value=\"" . $i . "\"";
183        if ($p["createfile"] == $i)
184                echo " selected=\"selected\"";
185        echo ">" . _($bro->l_createfile[$i]) . "</option>";
186}
187
188?>
189                        </select>
190                </td>
191        </tr>
192        <tr>
193                <td><?php __("Show icons?"); ?></td>
194                <td><select class="inl" name="showicons">
195<?php
196
197for($i = 0; $i < count($bro->l_icons); $i++)
198{
199        echo "<option value=\"" . $i . "\"";
200        if ($p["showicons"] == $i)
201                echo " selected=\"selected\"";
202        echo ">" . _($bro->l_icons[$i]) . "</option>";
203}
204
205?>
206                        </select>
207                </td>
208        </tr>
209        <tr>
210                <td><?php __("Show file types?"); ?></td>
211                <td><select class="inl" name="showtype">
212<?php
213
214for($i = 0; $i < count($bro->l_icons); $i++)
215{
216        echo "<option value=\"" . $i . "\"";
217        if ($p["showtype"] == $i)
218                echo " selected=\"selected\"";
219        echo ">" . _($bro->l_icons[$i]) . "</option>";
220}
221
222?>
223                        </select>
224                </td>
225        </tr>
226        <tr>
227                <td><?php __("Remember last visited directory?"); ?></td>
228                <td><select class="inl" name="golastdir">
229<?php
230
231for($i = 0; $i < count($bro->l_icons); $i++)
232{
233        echo "<option value=\"" . $i . "\"";
234        if ($p["golastdir"] == $i)
235                echo " selected=\"selected\"";
236        echo ">" . _($bro->l_icons[$i]) . "</option>";
237}
238
239?>
240                        </select>
241                </td>
242        </tr>
243</table>
244<p><input type="submit" name="submit" class="inb" value="<?php __("Change my settings"); ?>" /></p>
245
246</form>
247<p>&nbsp;</p>
248<a href="bro_main.php"><?php __("Back to the file browser"); ?></a>
249<?php include_once("foot.php"); ?>
Note: See TracBrowser for help on using the repository browser.