diff --git a/html/index.html b/html/index.html index 037b8cda6..db1fe7986 100644 --- a/html/index.html +++ b/html/index.html @@ -1,7 +1,7 @@
diff --git a/html/login.php b/html/login.php
index 58e7535d4..5081a644a 100644
--- a/html/login.php
+++ b/html/login.php
@@ -32,13 +32,21 @@ if ( isset ($_POST["p_user"] ) ) {
$g_pass=$_POST["p_pass"];
session_register("g_user");
session_register("g_pass");
-html_page_start("classic");
+ $cn=pg_connect("dbname=account_repository user='webcompta' ");
+
+ // Verif if User and Pass match DB
+ // if no, then redirect to the login page
+ CheckUser();
+ $g_UserProperty=GetUserProperty($cn,$g_user);
+ session_register("g_UserProperty");
+
+ html_page_start($g_UserProperty['use_theme']);
} else
{
if ( strlen($g_user) != 0 ) {
echo_debug("user is not null");
- html_page_start("classic");
+ html_page_start($g_UserProperty['use_theme']);
} else
{
html_page_start("classic");
@@ -58,13 +66,6 @@ if ( isset ($db_page) ) {
echo_debug("USER=$g_user - ");
echo_debug("PAGE = $db_page");
-$cn=pg_connect("dbname=account_repository user='webcompta' ");
-$IsValid=0;
-// Verif if User and Pass match DB
-// if no, then redirect to the login page
-CheckUser();
-$g_UserProperty=GetUserProperty($cn,$g_user);
-session_register("g_UserProperty");
echo_debug("theme =".$g_UserProperty['use_theme']);
include("top_menu_compta.php");
diff --git a/include/ac_common.php b/include/ac_common.php
index 4fc0bee84..0bfaf599e 100644
--- a/include/ac_common.php
+++ b/include/ac_common.php
@@ -117,6 +117,7 @@ function html_page_start($p_theme,$p_script="")
{
include_once ("postgres.php");
$cn=DbConnect();
+$bg="";
$Res=ExecSql($cn,"select the_filestyle from theme
where the_name='".$p_theme."'");
if (pg_NumRows($Res)==0) $style="style.css";
diff --git a/include/top_menu_compta.php b/include/top_menu_compta.php
index 09effd4af..d54eac064 100644
--- a/include/top_menu_compta.php
+++ b/include/top_menu_compta.php
@@ -38,7 +38,7 @@
/* $p_check == 1 si test sur Admin */
include_once("postgres.php");
echo '| Administrator Menu | '; diff --git a/sql/theme.sql b/sql/theme.sql index 6796d4622..0b2190551 100644 --- a/sql/theme.sql +++ b/sql/theme.sql @@ -25,4 +25,6 @@ create table theme ( insert into theme (the_name,the_filestyle,the_filebutton) values ('classic','style.css',null); insert into theme (the_name,the_filestyle,the_filebutton) - values ('aqua','style-aqua.css',null); + values ('Aqua','style-aqua.css',null); + insert into theme (the_name,the_filestyle,the_filebutton) + values ('Elegant','style-elegant.css',null); diff --git a/style-aqua.css b/style-aqua.css index bf979b782..863509999 100644 --- a/style-aqua.css +++ b/style-aqua.css @@ -31,7 +31,7 @@ div.mtitle { position: absolute; top:15px; right:300px; - width:100px; + width:330px; background:#E3F0FF; } @@ -122,9 +122,9 @@ td.mltitle { } td.mtitle { text-align:center; - background:url('image/freebtn1.gif') no-repeat; + background:url('image/freebtn1.gif') no-repeat center; height:30px; - width:110px; + width:100px; font-size:12px; } span.mtitle2 { diff --git a/style-elegant.css b/style-elegant.css new file mode 100644 index 000000000..909ae1f33 --- /dev/null +++ b/style-elegant.css @@ -0,0 +1,218 @@ +