| 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 | */ |
|---|
| 30 | require_once("../class/config.php"); |
|---|
| 31 | |
|---|
| 32 | if ($submit) { |
|---|
| 33 | $bro->SetPrefs($editsizex, $editsizey, $listmode, $showicons, $downfmt, $createfile, $showtype, $editor_font, $editor_size, $golastdir); |
|---|
| 34 | $error=_("Your preferences have been updated."); |
|---|
| 35 | include("bro_main.php"); |
|---|
| 36 | exit; |
|---|
| 37 | } |
|---|
| 38 | $p=$bro->GetPrefs(); |
|---|
| 39 | |
|---|
| 40 | include_once("head.php"); |
|---|
| 41 | |
|---|
| 42 | ?> |
|---|
| 43 | <?php if ($error) echo "<font color=\"red\">$error</font><br />"; ?> |
|---|
| 44 | <h3><?php __("File browser preferences"); ?></h3> |
|---|
| 45 | <form action="bro_pref.php" method="post"> |
|---|
| 46 | |
|---|
| 47 | |
|---|
| 48 | <table cellpadding="6" border="1" cellspacing="0"> |
|---|
| 49 | <tr><td><?php __("Horizontal window size"); ?></td><td><select class="inl" name="editsizex"> |
|---|
| 50 | <?php |
|---|
| 51 | for($i=50;$i<=200;$i+=10) { |
|---|
| 52 | echo "<option"; |
|---|
| 53 | if ($p["editsizex"]==$i) echo " selected"; |
|---|
| 54 | echo ">$i"; |
|---|
| 55 | } |
|---|
| 56 | ?></select></td></tr> |
|---|
| 57 | <tr><td><?php __("Vertical window size"); ?></td><td><select class="inl" name="editsizey"> |
|---|
| 58 | <?php |
|---|
| 59 | for($i=4;$i<=80;$i+=2) { |
|---|
| 60 | echo "<option"; |
|---|
| 61 | if ($p["editsizey"]==$i) echo " selected"; |
|---|
| 62 | echo ">$i"; |
|---|
| 63 | } |
|---|
| 64 | ?></select></td></tr> |
|---|
| 65 | <tr><td><?php __("File editor font name"); ?></td><td><select class="inl" name="editor_font"> |
|---|
| 66 | <?php |
|---|
| 67 | for($i=0;$i<count($bro->l_editor_font);$i++) { |
|---|
| 68 | echo "<option"; |
|---|
| 69 | if ($p["editor_font"]==$bro->l_editor_font[$i]) echo " selected"; |
|---|
| 70 | echo ">"._($bro->l_editor_font[$i]); |
|---|
| 71 | } |
|---|
| 72 | ?></select></td></tr> |
|---|
| 73 | <tr><td><?php __("File editor font size"); ?></td><td><select class="inl" name="editor_size"> |
|---|
| 74 | <?php |
|---|
| 75 | for($i=0;$i<count($bro->l_editor_size);$i++) { |
|---|
| 76 | echo "<option"; |
|---|
| 77 | if ($p["editor_size"]==$bro->l_editor_size[$i]) echo " selected"; |
|---|
| 78 | echo ">"._($bro->l_editor_size[$i]); |
|---|
| 79 | } |
|---|
| 80 | ?></select></td></tr> |
|---|
| 81 | <tr><td><?php __("File list view"); ?></td><td><select class="inl" name="listmode"> |
|---|
| 82 | <?php |
|---|
| 83 | for($i=0;$i<count($bro->l_mode);$i++) { |
|---|
| 84 | echo "<option"; |
|---|
| 85 | if ($p["listmode"]==$i) echo " selected"; |
|---|
| 86 | echo " value=\"$i\">"._($bro->l_mode[$i])."</option>"; |
|---|
| 87 | } |
|---|
| 88 | ?></select></td></tr> |
|---|
| 89 | <tr><td><?php __("Downloading file format"); ?></td><td><select class="inl" name="downfmt"> |
|---|
| 90 | <?php |
|---|
| 91 | for($i=0;$i<count($bro->l_tgz);$i++) { |
|---|
| 92 | echo "<option"; |
|---|
| 93 | if ($p["downfmt"]==$i) echo " selected"; |
|---|
| 94 | echo " value=\"$i\">"._($bro->l_tgz[$i])."</option>"; |
|---|
| 95 | } |
|---|
| 96 | ?></select></td></tr> |
|---|
| 97 | <tr><td><?php __("What to do after creating a file"); ?></td><td><select class="inl" name="createfile"> |
|---|
| 98 | <?php |
|---|
| 99 | for($i=0;$i<count($bro->l_createfile);$i++) { |
|---|
| 100 | echo "<option"; |
|---|
| 101 | if ($p["createfile"]==$i) echo " selected"; |
|---|
| 102 | echo " value=\"$i\">"._($bro->l_createfile[$i])."</option>"; |
|---|
| 103 | } |
|---|
| 104 | ?></select></td></tr> |
|---|
| 105 | <tr><td><?php __("Show icons?"); ?></td><td><select class="inl" name="showicons"> |
|---|
| 106 | <?php |
|---|
| 107 | for($i=0;$i<count($bro->l_icons);$i++) { |
|---|
| 108 | echo "<option"; |
|---|
| 109 | if ($p["showicons"]==$i) echo " selected"; |
|---|
| 110 | echo " value=\"$i\">"._($bro->l_icons[$i])."</option>"; |
|---|
| 111 | } |
|---|
| 112 | ?></select></td></tr> |
|---|
| 113 | <tr><td><?php __("Show file types?"); ?></td><td><select class="inl" name="showtype"> |
|---|
| 114 | <?php |
|---|
| 115 | for($i=0;$i<count($bro->l_icons);$i++) { |
|---|
| 116 | echo "<option"; |
|---|
| 117 | if ($p["showtype"]==$i) echo " selected"; |
|---|
| 118 | echo " value=\"$i\">"._($bro->l_icons[$i])."</option>"; |
|---|
| 119 | } |
|---|
| 120 | ?></select></td></tr> |
|---|
| 121 | <tr><td><?php __("Remember last visited directory?"); ?></td><td><select class="inl" name="golastdir"> |
|---|
| 122 | <?php |
|---|
| 123 | for($i=0;$i<count($bro->l_icons);$i++) { |
|---|
| 124 | echo "<option"; |
|---|
| 125 | if ($p["golastdir"]==$i) echo " selected"; |
|---|
| 126 | echo " value=\"$i\">"._($bro->l_icons[$i])."</option>"; |
|---|
| 127 | } |
|---|
| 128 | ?></select></td></tr> |
|---|
| 129 | |
|---|
| 130 | <tr class="trbtn"><td colspan="2"> |
|---|
| 131 | <input type="submit" name="submit" class="inb" value="<?php __("Change my settings"); ?>" /> |
|---|
| 132 | <input type="button" class="inb" name="cancel" value="<?php __("Cancel"); ?>" onclick="document.location='bro_main.php'"/> |
|---|
| 133 | |
|---|
| 134 | </td></tr> |
|---|
| 135 | </table> |
|---|
| 136 | |
|---|
| 137 | </form> |
|---|
| 138 | <?php include_once("foot.php"); ?> |
|---|