2003-01-18 18:15:23 +01:00
|
|
|
|
<?PHP
|
|
|
|
|
|
/* Copyright (C) 2001-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
|
|
|
|
|
*
|
|
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
|
|
* it under the terms of the GNU General Public License 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.
|
|
|
|
|
|
*
|
|
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
|
|
* along with this program; if not, write to the Free Software
|
|
|
|
|
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
|
|
|
|
*
|
|
|
|
|
|
* $Id$
|
|
|
|
|
|
* $Source$
|
|
|
|
|
|
*/
|
|
|
|
|
|
require("./pre.inc.php");
|
|
|
|
|
|
|
2003-09-01 01:34:20 +02:00
|
|
|
|
if ($HTTP_POST_VARS["action"] == 'changetheme')
|
|
|
|
|
|
{
|
2004-02-01 01:55:46 +01:00
|
|
|
|
$sql = "REPLACE INTO ".MAIN_DB_PREFIX."const SET name = 'MAIN_THEME', value='".$HTTP_POST_VARS["theme"]."', visible=0";
|
2003-09-01 01:34:20 +02:00
|
|
|
|
|
|
|
|
|
|
if ($db->query($sql))
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
Header('Location: index.php');
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2003-01-18 18:15:23 +01:00
|
|
|
|
llxHeader();
|
|
|
|
|
|
|
2003-06-22 12:09:29 +02:00
|
|
|
|
print_titre("Configuration Dolibarr (version ".DOL_VERSION.")");
|
2003-01-18 18:15:23 +01:00
|
|
|
|
|
2003-10-24 11:57:49 +02:00
|
|
|
|
print '<table class="border" cellpadding="3" cellspacing="0">';
|
|
|
|
|
|
print '<tr class="liste_titre">';
|
2003-06-22 14:16:11 +02:00
|
|
|
|
print '<td>Nom</td><td>Valeur</td><td>Action</td>';
|
|
|
|
|
|
print "</TR>\n";
|
2003-02-01 18:35:38 +01:00
|
|
|
|
|
2003-09-13 15:39:12 +02:00
|
|
|
|
print '<tr class="pair"><td>Version</td><td>' . DOL_VERSION . '</td><td> </td></tr>';
|
2003-01-18 18:15:23 +01:00
|
|
|
|
|
2003-09-13 15:39:12 +02:00
|
|
|
|
print '<tr class="impair"><td>theme</td>';
|
2003-09-01 01:34:20 +02:00
|
|
|
|
|
|
|
|
|
|
if ($action == 'modtheme')
|
|
|
|
|
|
{
|
|
|
|
|
|
clearstatcache();
|
|
|
|
|
|
$dir = "../theme/";
|
|
|
|
|
|
$handle=opendir($dir);
|
|
|
|
|
|
|
|
|
|
|
|
print '<form method="post" action="index.php">';
|
|
|
|
|
|
print '<input type="hidden" name="action" value="changetheme">';
|
|
|
|
|
|
print '<td><select name="theme">';
|
|
|
|
|
|
|
|
|
|
|
|
while (($file = readdir($handle))!==false)
|
|
|
|
|
|
{
|
|
|
|
|
|
if (is_dir($dir.$file) && substr($file, 0, 1) <> '.' && substr($file, 0, 3) <> 'CVS')
|
|
|
|
|
|
{
|
2004-01-31 12:55:14 +01:00
|
|
|
|
if ($file == MAIN_THEME)
|
|
|
|
|
|
{
|
|
|
|
|
|
print '<option value="'.$file.'" SELECTED>'.$file;
|
|
|
|
|
|
}
|
|
|
|
|
|
else
|
|
|
|
|
|
{
|
|
|
|
|
|
print '<option value="'.$file.'">'.$file;
|
|
|
|
|
|
}
|
2003-09-01 01:34:20 +02:00
|
|
|
|
}
|
2004-01-31 12:55:14 +01:00
|
|
|
|
|
2003-09-01 01:34:20 +02:00
|
|
|
|
}
|
|
|
|
|
|
print '</td><td><input type="submit" value="Enregistrer"></td></form>';
|
|
|
|
|
|
}
|
|
|
|
|
|
else
|
|
|
|
|
|
{
|
|
|
|
|
|
print '<td>' . $conf->theme . '</td><td><a href="index.php?action=modtheme">Changer</a></td></tr>';
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2003-09-13 15:39:12 +02:00
|
|
|
|
print '<tr class="pair"><td>Document root</td><td>' . DOL_DOCUMENT_ROOT . '</td><td> </td></tr>';
|
2003-01-18 18:15:23 +01:00
|
|
|
|
|
2003-09-01 01:34:20 +02:00
|
|
|
|
print '<tr class="liste_titre"><td colspan="3">Base de donn<6E>es</td></tr>';
|
2003-09-13 15:39:12 +02:00
|
|
|
|
print '<tr class="pair"><td>Type</td><td>' . $conf->db->type . '</td><td> </td></tr>';
|
|
|
|
|
|
print '<tr class="impair"><td>Serveur</td><td>' . $conf->db->host . '</td><td> </td></tr>';
|
|
|
|
|
|
print '<tr class="pair"><td>Nom</td><td>' . $conf->db->name . '</td><td> </td></tr>';
|
2003-01-18 18:15:23 +01:00
|
|
|
|
|
|
|
|
|
|
print '</table>';
|
|
|
|
|
|
|
2003-06-22 14:16:11 +02:00
|
|
|
|
llxFooter("<em>Dernière modification $Date$ révision $Revision$</em>");
|
2003-01-18 18:15:23 +01:00
|
|
|
|
?>
|