Your IP : 216.73.217.64
<?php
/* *************************************************
*
* Document Manager (C) 2002-2010
* Version 4 - dmanager MySQL
* Benjamin Sonntag <benjamin@sonntag.fr>
* Chantal Bernard-Putz <chantal@bernard-putz.net>
* Franck Denis
* This software is protected by copyright laws,
* please read the file COPYRIGHT
* This software is provided as is with no warranty.
*
************************************************* */
/* $Id: admin_config.php 29 2009-11-26 07:02:26Z chantal $ */
$admin = 1;
require_once ("common.php");
$title = _l("Main configuration");
$fields = array (
"conf_lang" => array ("request", "string", ""),
"conf_adminmail" => array ("request", "string", ""),
"conf_mailcondition" => array ("request", "integer", 0),
"conf_sendrecipient" => array ("request", "integer", 0),
"conf_showhelpbutton" => array ("request", "integer", 0),
"conf_shcom" => array ("request", "integer", 0),
"conf_style" => array ("request", "string", ""),
"action" => array ("request", "string", ""),
);
getFields($fields);
require_once ("head.php");
?>
<p style="display: inline"><br /></p>
<h1><?php __l("Main configuration") ?></h1>
<?php if (!empty($error)) { echo "<p class=\"error\">" . $error . "</p>"; }
echo "<p class=\"center\">";
__l("This is the main configuration of the document manager.");
echo " ";
__l("Don't forget to setup the Administrator email, and the sendmail capability.");
echo "</p>";
?>
<form method="post" action="admin_doconfig.php">
<div id="formConfig">
<table border="1" cellpadding="4" cellspacing="0" class="center">
<tr>
<th><?php __l("Default language to use") ?></th>
<td><select class="int" name="conf_lang">
<?php
reset($available_lang);
while (list($key, $val) = each($available_lang)) {
echo "<option value=\"" . $key . "\"";
if ($doc->config["conf_lang"] == $key) echo " selected=\"selected\"";
echo ">" . $val . "</option>";
}
?>
</select></td>
</tr>
<tr>
<th><?php __l("Administrator's email") ?></th>
<td><input type="text" class="int" name="conf_adminmail" value="<?php echo $doc->config["conf_adminmail"]; ?>" size="30" maxlength="255" /></td>
</tr>
<tr>
<th><?php __l("When shall we send an email?") ?></th>
<td><select class="int" name="conf_mailcondition">
<?php
reset($available_mailcondition);
while (list($key, $val) = each($available_mailcondition))
{
echo "<option value=\"" . $key . "\"";
if ($doc->config["conf_mailcondition"] == $key) echo " selected=\"selected\"";
echo ">" . _l($val) . "</option>";
}
?>
</select></td>
</tr>
<tr>
<th><?php __l("Who will receive the emails?") ?></th>
<td><select class="int" name="conf_sendrecipient">
<?php
reset($available_sendrecipient);
while (list($key, $val) = each($available_sendrecipient))
{
echo "<option value=\"" . $key . "\"";
if ($doc->config["conf_sendrecipient"] == $key) echo " selected=\"selected\"";
echo ">" . _l($val) . "</option>";
}
?>
</select></td>
</tr>
<tr>
<th><?php __l("Show help button?") ?></th>
<td><select class="int" name="conf_showhelpbutton">
<?php
reset($yesno);
while (list($key, $val) = each($yesno))
{
echo "<option value=\"" . $key . "\"";
if ($doc->config["conf_showhelpbutton"] == $key) echo " selected=\"selected\"";
echo ">" . _l($val) . "</option>";
}
?>
</select></td>
</tr>
<tr>
<th><?php __l("Show comments (default value) ?") ?></th>
<td><select class="int" name="conf_shcom">
<?php
reset($yesno);
while (list($key, $val) = each($yesno))
{
echo "<option value=\"" . $key . "\"";
if ($doc->config["conf_shcom"] == $key) echo " selected=\"selected\"";
echo ">" . _l($val) . "</option>";
}
?>
</select></td>
</tr>
<tr>
<th><?php __l("Choose color scheme") ?></th>
<td><select class="int" name="conf_style">
<?php
/* Lecture des styles possibles : */
$t = opendir("styles" . SEP);
$styles = array();
while ($c = readdir($t))
{
if (is_file("styles" . SEP . $c))
{
$f = fopen("styles" . SEP . $c, "rb");
$tofind = true;
while ($tofind && $s = fgets($f, 1024))
{
if (ereg("\\/\\* " . $_SESSION["lang"] . " (.*)\\*\\/", $s, $match))
$tofind = false;
}
fclose($f);
if ($tofind)
$styles[$c] = $c;
else
$styles[$c] = $match[1];
}
} // Loop on the style files
closedir($t);
$f = fopen("style.css", "rb");
if ($f)
{
$s = fgets($f, 1024);
ereg("\\/\\* (.*) \\*\\/", $s, $match);
$currentstyle = $match[1];
fclose($f);
}
reset($styles);
while (list($key, $val) = each($styles))
{
echo "<option value=\"" . $key . "\"";
if ($doc->config["conf_style"] == $key) echo " selected=\"selected\"";
echo ">" . $val . "</option>";
}
?>
</select></td>
</tr>
<tr>
<td class="center" colspan="2"><input class="inb" type="submit" name="action" value="<?php __l("Edit the main configuration") ?>" /></td>
</tr>
</table>
</div>
</form>
<p style="display: inline"><br /></p>
<table style="width: 70%" cellpadding="1" cellspacing="0" class="center">
<tr>
<td class="center"><img class="vmiddle noborder" src="<?php echo $pngPath; ?>users.png" alt="<?php __l("User Administration") ?>" /> <a href="users_admin.php"><?php __l("User Administration") ?></a></td>
<td class="center"><img class="vmiddle noborder" src="<?php echo $pngPath; ?>folder.png" alt="<?php __l("Back to the Document Manager") ?>" /> <a href="browser.php"><?php __l("Back to the Document Manager") ?></a></td>
</tr>
</table>
<?php require_once ("foot.php"); ?>