diff --git a/htdocs/admin/index.php b/htdocs/admin/index.php
index 509776aec7c..53da1237d85 100644
--- a/htdocs/admin/index.php
+++ b/htdocs/admin/index.php
@@ -20,6 +20,17 @@
*/
require("./pre.inc.php");
+if ($HTTP_POST_VARS["action"] == 'changetheme')
+{
+ $sql = "REPLACE INTO llx_const SET name = 'MAIN_THEME', value='".$HTTP_POST_VARS["theme"]."', visible=0";
+
+ if ($db->query($sql))
+ {
+
+ }
+ Header('Location: index.php');
+}
+
llxHeader();
print_titre("Configuration Dolibarr (version ".DOL_VERSION.")");
@@ -30,17 +41,39 @@ print '
Nom | Valeur | Action | ';
print "\n";
print '| Version | ' . DOL_VERSION . ' | |
';
-print '| css | ' . $conf->css . ' | |
';
-print '| theme | ' . $conf->theme . ' | |
';
-print '| document root | ' . DOL_DOCUMENT_ROOT . ' | |
';
+print '| theme | ';
-print '
| Database |
';
-print '| type | ' . $conf->db->type . ' | |
';
-print '| host | ' . $conf->db->host . ' | |
';
-print '| user | ' . $conf->db->user . ' | |
';
-print '| pass | ' . $conf->db->pass . ' | |
';
-print '| Database name | ' . $conf->db->name . ' | |
';
+if ($action == 'modtheme')
+{
+ clearstatcache();
+ $dir = "../theme/";
+ $handle=opendir($dir);
+
+ print '';
+}
+else
+{
+print '' . $conf->theme . ' | Changer | ';
+}
+
+print '| Document root | ' . DOL_DOCUMENT_ROOT . ' | |
';
+
+print '| Base de données |
';
+print '| Type | ' . $conf->db->type . ' | |
';
+print '| Serveur | ' . $conf->db->host . ' | |
';
+print '| Nom | ' . $conf->db->name . ' | |
';
print '';