2006-04-26 12:28:53 +00:00
|
|
|
<?php
|
|
|
|
/*
|
|
|
|
----------------------------------------------------------------------
|
|
|
|
LICENSE
|
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or
|
|
|
|
modify it under the terms of the GNU General Public License (GPL)
|
|
|
|
as published by the Free Software Foundation; either version 2
|
|
|
|
of the License, or (at your option) any later version.
|
|
|
|
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU General Public License for more details.
|
|
|
|
|
|
|
|
To read the license please visit http://www.gnu.org/copyleft/gpl.html
|
|
|
|
----------------------------------------------------------------------
|
|
|
|
*/
|
2017-10-12 15:54:48 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Form to set the preferences of the file browser of AlternC
|
|
|
|
*
|
|
|
|
* @copyright AlternC-Team 2000-2017 https://alternc.com/
|
|
|
|
*/
|
|
|
|
|
2006-04-26 12:28:53 +00:00
|
|
|
require_once("../class/config.php");
|
|
|
|
|
2012-08-20 15:34:04 +00:00
|
|
|
$fields = array (
|
|
|
|
"submit" => array ("post", "string", ""),
|
|
|
|
"editsizex" => array ("post", "string", ""),
|
|
|
|
"listmode" => array ("post", "string", ""),
|
|
|
|
"editsizey" => array ("post", "string", ""),
|
|
|
|
"showicons" => array ("post", "string", ""),
|
|
|
|
"downfmt" => array ("post", "string", ""),
|
|
|
|
"createfile" => array ("post", "string", ""),
|
|
|
|
"showtype" => array ("post", "string", ""),
|
|
|
|
"editor_font" => array ("post", "string", ""),
|
|
|
|
"editor_size" => array ("post", "string", ""),
|
|
|
|
"golastdir" => array ("post", "string", ""),
|
|
|
|
);
|
|
|
|
getFields($fields);
|
|
|
|
|
2012-08-21 12:53:29 +00:00
|
|
|
if (!empty($submit)) {
|
2006-04-26 12:28:53 +00:00
|
|
|
$bro->SetPrefs($editsizex, $editsizey, $listmode, $showicons, $downfmt, $createfile, $showtype, $editor_font, $editor_size, $golastdir);
|
2017-10-06 16:04:36 +00:00
|
|
|
$msg->raise("INFO", "bro", _("Your preferences have been updated."));
|
2006-04-26 12:28:53 +00:00
|
|
|
include("bro_main.php");
|
|
|
|
exit;
|
|
|
|
}
|
|
|
|
$p=$bro->GetPrefs();
|
|
|
|
|
2009-09-08 05:29:38 +00:00
|
|
|
include_once("head.php");
|
|
|
|
|
2006-04-26 12:28:53 +00:00
|
|
|
?>
|
2012-08-20 15:34:04 +00:00
|
|
|
<?php if (isset($error) && $error) echo "<font color=\"red\">$error</font><br />"; ?>
|
2009-09-08 05:29:38 +00:00
|
|
|
<h3><?php __("File browser preferences"); ?></h3>
|
2010-05-02 05:34:36 +00:00
|
|
|
<hr id="topbar"/>
|
|
|
|
<br />
|
2006-04-26 12:28:53 +00:00
|
|
|
<form action="bro_pref.php" method="post">
|
2016-05-20 12:21:47 +00:00
|
|
|
<?php csrf_get(); ?>
|
2009-09-08 05:29:38 +00:00
|
|
|
|
2013-01-31 17:33:32 +00:00
|
|
|
<table cellpadding="6" border="1" cellspacing="0" class='tedit'>
|
|
|
|
<tr><th><?php __("Horizontal window size"); ?></th><td><select class="inl" name="editsizex">
|
2006-04-26 12:28:53 +00:00
|
|
|
<?php
|
2009-09-08 05:29:38 +00:00
|
|
|
for($i=50;$i<=200;$i+=10) {
|
2006-04-26 12:28:53 +00:00
|
|
|
echo "<option";
|
2013-04-19 15:31:04 +00:00
|
|
|
if ($p["editsizex"]==$i) echo " selected='selected'";
|
|
|
|
echo ">$i</option>";
|
2006-04-26 12:28:53 +00:00
|
|
|
}
|
|
|
|
?></select></td></tr>
|
2013-01-31 17:33:32 +00:00
|
|
|
<tr><th><?php __("Vertical window size"); ?></th><td><select class="inl" name="editsizey">
|
2006-04-26 12:28:53 +00:00
|
|
|
<?php
|
2009-09-08 05:29:38 +00:00
|
|
|
for($i=4;$i<=80;$i+=2) {
|
2006-04-26 12:28:53 +00:00
|
|
|
echo "<option";
|
2013-04-19 15:31:04 +00:00
|
|
|
if ($p["editsizey"]==$i) echo " selected='selected'";
|
|
|
|
echo ">$i</option>";
|
2006-04-26 12:28:53 +00:00
|
|
|
}
|
|
|
|
?></select></td></tr>
|
2013-01-31 17:33:32 +00:00
|
|
|
<tr><th><?php __("File editor font name"); ?></th><td><select class="inl" name="editor_font">
|
2006-04-26 12:28:53 +00:00
|
|
|
<?php
|
|
|
|
for($i=0;$i<count($bro->l_editor_font);$i++) {
|
|
|
|
echo "<option";
|
2013-04-19 15:31:04 +00:00
|
|
|
if ($p["editor_font"]==$bro->l_editor_font[$i]) echo " selected='selected'";
|
|
|
|
echo ">"._($bro->l_editor_font[$i])."</option>";
|
2006-04-26 12:28:53 +00:00
|
|
|
}
|
|
|
|
?></select></td></tr>
|
2013-01-31 17:33:32 +00:00
|
|
|
<tr><th><?php __("File editor font size"); ?></th><td><select class="inl" name="editor_size">
|
2006-04-26 12:28:53 +00:00
|
|
|
<?php
|
|
|
|
for($i=0;$i<count($bro->l_editor_size);$i++) {
|
|
|
|
echo "<option";
|
2013-04-19 15:31:04 +00:00
|
|
|
if ($p["editor_size"]==$bro->l_editor_size[$i]) echo " selected='selected'";
|
|
|
|
echo ">"._($bro->l_editor_size[$i])."</option>";
|
2006-04-26 12:28:53 +00:00
|
|
|
}
|
|
|
|
?></select></td></tr>
|
2013-01-31 17:33:32 +00:00
|
|
|
<tr><th><?php __("File list view"); ?></th><td><select class="inl" name="listmode">
|
2006-04-26 12:28:53 +00:00
|
|
|
<?php
|
|
|
|
for($i=0;$i<count($bro->l_mode);$i++) {
|
|
|
|
echo "<option";
|
2013-04-19 15:31:04 +00:00
|
|
|
if ($p["listmode"]==$i) echo " selected='selected'";
|
2006-04-26 12:28:53 +00:00
|
|
|
echo " value=\"$i\">"._($bro->l_mode[$i])."</option>";
|
|
|
|
}
|
|
|
|
?></select></td></tr>
|
2013-01-31 17:33:32 +00:00
|
|
|
<tr><th><?php __("Downloading file format"); ?></th><td><select class="inl" name="downfmt">
|
2006-04-26 12:28:53 +00:00
|
|
|
<?php
|
|
|
|
for($i=0;$i<count($bro->l_tgz);$i++) {
|
|
|
|
echo "<option";
|
2013-04-19 15:31:04 +00:00
|
|
|
if ($p["downfmt"]==$i) echo " selected='selected'";
|
2006-04-26 12:28:53 +00:00
|
|
|
echo " value=\"$i\">"._($bro->l_tgz[$i])."</option>";
|
|
|
|
}
|
|
|
|
?></select></td></tr>
|
2013-01-31 17:33:32 +00:00
|
|
|
<tr><th><?php __("What to do after creating a file"); ?></th><td><select class="inl" name="createfile">
|
2006-04-26 12:28:53 +00:00
|
|
|
<?php
|
|
|
|
for($i=0;$i<count($bro->l_createfile);$i++) {
|
|
|
|
echo "<option";
|
2013-04-19 15:31:04 +00:00
|
|
|
if ($p["createfile"]==$i) echo " selected='selected'";
|
2006-04-26 12:28:53 +00:00
|
|
|
echo " value=\"$i\">"._($bro->l_createfile[$i])."</option>";
|
|
|
|
}
|
|
|
|
?></select></td></tr>
|
2013-01-31 17:33:32 +00:00
|
|
|
<tr><th><?php __("Show icons?"); ?></th><td><select class="inl" name="showicons">
|
2006-04-26 12:28:53 +00:00
|
|
|
<?php
|
|
|
|
for($i=0;$i<count($bro->l_icons);$i++) {
|
|
|
|
echo "<option";
|
2013-04-19 15:31:04 +00:00
|
|
|
if ($p["showicons"]==$i) echo " selected='selected'";
|
2006-04-26 12:28:53 +00:00
|
|
|
echo " value=\"$i\">"._($bro->l_icons[$i])."</option>";
|
|
|
|
}
|
|
|
|
?></select></td></tr>
|
2013-01-31 17:33:32 +00:00
|
|
|
<tr><th><?php __("Show file types?"); ?></th><td><select class="inl" name="showtype">
|
2006-04-26 12:28:53 +00:00
|
|
|
<?php
|
|
|
|
for($i=0;$i<count($bro->l_icons);$i++) {
|
|
|
|
echo "<option";
|
2013-04-19 15:31:04 +00:00
|
|
|
if ($p["showtype"]==$i) echo " selected='selected'";
|
2006-04-26 12:28:53 +00:00
|
|
|
echo " value=\"$i\">"._($bro->l_icons[$i])."</option>";
|
|
|
|
}
|
|
|
|
?></select></td></tr>
|
2013-01-31 17:33:32 +00:00
|
|
|
<tr><th><?php __("Remember last visited directory?"); ?></th><td><select class="inl" name="golastdir">
|
2006-04-26 12:28:53 +00:00
|
|
|
<?php
|
|
|
|
for($i=0;$i<count($bro->l_icons);$i++) {
|
|
|
|
echo "<option";
|
2013-04-19 15:31:04 +00:00
|
|
|
if ($p["golastdir"]==$i) echo " selected='selected'";
|
2006-04-26 12:28:53 +00:00
|
|
|
echo " value=\"$i\">"._($bro->l_icons[$i])."</option>";
|
|
|
|
}
|
|
|
|
?></select></td></tr>
|
2013-01-31 17:33:32 +00:00
|
|
|
</table>
|
|
|
|
<br/>
|
2006-04-26 12:28:53 +00:00
|
|
|
|
2010-04-29 08:31:15 +00:00
|
|
|
<input type="submit" name="submit" class="inb" value="<?php __("Change my settings"); ?>" />
|
|
|
|
<input type="button" class="inb" name="cancel" value="<?php __("Cancel"); ?>" onclick="document.location='bro_main.php'"/>
|
|
|
|
|
2006-04-26 12:28:53 +00:00
|
|
|
|
|
|
|
</form>
|
2010-05-02 05:34:36 +00:00
|
|
|
<?php include_once("foot.php"); ?>
|