Add feature : theme

Add theme aqua
Fix bug in centralized printing: need to drop and recreate table and REcentralize
Improve printing
Add documentation and code cleaning
This commit is contained in:
sparkyx 2003-10-19 18:59:21 +00:00
parent 6bc12929ec
commit b2a264ae09
61 changed files with 887 additions and 274 deletions

63
Changelog Normal file
View file

@ -0,0 +1,63 @@
2003-09-26 sparkyx <sparkyx@july.summer>
* include/postgres.php, include/top_menu_compta.php, doc/makedoc, html/admin_repo.php, html/central.php, html/compta.php, html/dossier_prefs.php, html/enc_jrn.php, html/facturation.php, html/fiche.php, html/form.php, html/impress.php, html/jrn_add.php, html/jrn_detail.php, html/jrn_update.php, html/line_update.php, html/login.php, html/pcmn_update.php, html/priv_user.php, html/rate_chg.php, html/user_pref.php, html/user_sec.php, include/ac_common.php:
remove html/verif.php
add ./makedoc for creating automatically doc
add doc/mod_function header for the functions
New GetUserProperties to get the user profile
-> replace the checkAdmin function
2003-09-14 sparkyx <sparkyx@july.summer>
* html/enc_jrn.php: Fix problem with period
2003-09-07 sparkyx <sparkyx@july.summer>
* html/enc_jrn.php: When date change the tech periode must also change
* html/enc_jrn.php: Fix bug when not g_jrn is defined
2003-08-31 sparkyx <sparkyx@july.summer>
* sql/theme.sql: Starting with themes
* html/admin_repo.php, html/compta.php, html/index.html, html/login.php, html/priv_user.php, include/ac_common.php, include/top_menu_compta.php, install.sh, sql/ac_users.sql:
remove unused file
fix warning in the jrn file
fix bug in jrn table (jr_rapt text)
fix bug in jrn_search problem when checking if a number is valid
Improve the administration repository (user & folder)
2003-08-17 sparkyx <sparkyx@july.summer>
* html/jrn_search.php: Fix filter for amount
2003-08-16 sparkyx <sparkyx@july.summer>
* include/impress_inc.php: Fix the order by date
* html/send_poste_pdf.php: Remove the new page
* include/impress_inc.php: Fix problem in the order of GetDataPoste
2003-08-15 sparkyx <sparkyx@july.summer>
* include/jrn.php: Fix problem in the search menu
* html/send_poste_pdf.php, include/impress_inc.php:
Perform printing : avoid empty account
* include/jrn.php, sql/journal.sql, cvs-set, html/enc_jrn.php, html/jrn_search.php, log:
remove unused file
fix warning in the jrn file
fix bug in jrn table (jr_rapt text)
fix bug in jrn_search problem when checking if a number is valid
2003-07-31 sparkyx <sparkyx@july.summer>
* include/ac_common.php, include/central_inc.php, include/check_priv.php, include/constant.php, include/debug.php, include/facture_inc.php, include/fiche_inc.php, include/form_inc.php, include/impress_inc.php, include/jrn.php, include/poste.php, include/postgres.php, include/preference.php, include/top_menu_compta.php:
First release
* addon/fonts/ZapfDingbats.afm, addon/fonts/php_Courier-Bold.afm, addon/fonts/php_Courier-BoldOblique.afm, addon/fonts/php_Courier-Oblique.afm, addon/fonts/php_Courier.afm, addon/fonts/php_Helvetica-Bold.afm, addon/fonts/php_Helvetica-BoldOblique.afm, addon/fonts/php_Helvetica-Oblique.afm, addon/fonts/php_Helvetica.afm, addon/fonts/php_Symbol.afm, addon/fonts/php_Times-Bold.afm, addon/fonts/php_Times-BoldItalic.afm, addon/fonts/php_Times-Italic.afm, addon/fonts/php_Times-Roman.afm, addon/fonts/php_ZapfDingbats.afm, addon/fonts/php_a0100131.afm, addon/fonts/php_a010013l.afm, doc/installation.sxw, doc/manual.sxw, doc/php.ini-minimum, html/admin_repo.php, html/calculator.js, html/calendar.js, html/central.php, html/compta.php, html/compute.js, html/dossier_prefs.php, html/enc_jrn.php, html/facturation.php, html/fiche.php, html/form.php, html/impress.php, html/index.html, html/jrn_add.php, html/jrn_detail.php, html/jrn_op_detail.php, html/jrn_search.php, html/jrn_update.php, html/line_update.php, html/login.php, html/logout.php, html/not_implemented.php, html/pcmn_update.php, html/poste_search.php, html/priv_user.php, html/rate_chg.php, html/send.php, html/send_jrn_pdf.php, html/send_poste_pdf.php, html/user_pref.php, html/user_sec.php, html/verif.php, html/win_detail_jrn.js, html/win_search_jrn.js, html/win_search_poste.js, sql/ac_dossier.sql, sql/ac_users.sql, sql/centralized.sql, sql/dos_pref.sql, sql/fiche.sql, sql/form.sql, sql/insert_pcmn.sql, sql/jnt_use_dos.sql, sql/journal.sql, sql/priv_user.sql, sql/struct-repository.sql, sql/struct.sql, sql/tmp_pcmn.sql, sql/user_pref.sql, sql/user_sec.sql, sql/version.sql, AUTHORS, COPYING, Faq, INSTALL, Todo, addon/class.ezpdf.php, addon/class.pdf.php, addon/data.txt, addon/fonts/Courier-Bold.afm, addon/fonts/Courier-BoldOblique.afm, addon/fonts/Courier-Oblique.afm, addon/fonts/Courier.afm, addon/fonts/Helvetica-Bold.afm, addon/fonts/Helvetica-BoldOblique.afm, addon/fonts/Helvetica-Oblique.afm, addon/fonts/Helvetica.afm, addon/fonts/Symbol.afm, addon/fonts/Times-Bold.afm, addon/fonts/Times-BoldItalic.afm, addon/fonts/Times-Italic.afm, addon/fonts/Times-Roman.afm, addon/readme.pdf, addon/readme.php, addon/ros.jpg, backup-db, cvs-set, install.sh, license.txt, log, setenv.sh, style.css:
Import in repository

View file

@ -22,7 +22,7 @@
include_once("ac_common.php");
include_once("postgres.php");
include_once("debug.php");
html_page_start();
html_page_start($g_UserProperty['use_theme']);
echo_debug("entering admin_repo");
//echo_debug("user $g_user");

View file

@ -20,7 +20,9 @@
// Auteur Dany De Bontridder ddebontridder@yahoo.fr
/* $Revision$ */
include_once ("ac_common.php");
html_page_start();
html_page_start($g_UserProperty['use_theme']);
if ( ! isset ( $g_dossier ) ) {
echo "You must choose a Dossier ";
exit -2;
@ -47,7 +49,9 @@ include_once("central_inc.php");
$l_Db=sprintf("dossier%d",$g_dossier);
$cn=DbConnect($l_Db);
echo '<DIV CLASS="ccontent">';
echo '<H2 CLASS="info"> Centralise </H2><BR>';
if ( isset ($_POST["central"] )) {
//demande centralise

View file

@ -17,10 +17,11 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
// Auteur Dany De Bontridder ddebontridder@yahoo.fr
include ("ac_common.php");
include_once ("ac_common.php");
/* $Revision$ */
session_start();
html_page_start();
html_page_start($g_UserProperty['use_theme']);
if ( isset ( $dos ) ) {
$g_dossier=$dos;
session_register("g_dossier");
@ -30,7 +31,7 @@ if ( isset ( $dos ) ) {
// phpinfo();
exit -2;
}
include ("postgres.php");
include_once ("postgres.php");
echo_debug ("user is $g_user");
/* CheckUser */
CheckUser();

View file

@ -20,7 +20,7 @@
// Auteur Dany De Bontridder ddebontridder@yahoo.fr
/* $Revision$ */
include_once ("ac_common.php");
html_page_start();
html_page_start($g_UserProperty['use_theme']);
if ( ! isset ( $g_dossier ) ) {
echo "You must choose a Dossier ";
phpinfo();

View file

@ -24,7 +24,7 @@ include_once("jrn.php");
include_once("preference.php");
include_once("poste.php");
include_once("error.php");
html_page_start(0,"onLoad=\"CheckTotal();\"");
html_page_start($g_UserProperty['use_theme'],"onLoad=\"CheckTotal();\"");
if ( ! isset ( $g_dossier ) ) {
echo "You must choose a Dossier ";
exit -2;

View file

@ -20,7 +20,7 @@
include ("ac_common.php");
include ("check_priv.php");
/* $Revision$ */
html_page_start();
html_page_start($g_UserProperty['use_theme']);
if ( ! isset ( $g_dossier ) ) {
echo "You must choose a Dossier ";
exit -2;

View file

@ -20,7 +20,9 @@
// Auteur Dany De Bontridder ddebontridder@yahoo.fr
/* $Revision$ */
include_once ("ac_common.php");
html_page_start();
html_page_start($g_UserProperty['use_theme']);
if ( ! isset ( $g_dossier ) ) {
echo "You must choose a Dossier ";
exit -2;

View file

@ -21,7 +21,8 @@
/* $Revision$ */
include_once ("ac_common.php");
html_page_start();
html_page_start($g_UserProperty['use_theme']);
if ( ! isset ( $g_dossier ) ) {
echo "You must choose a Dossier ";
exit -2;

BIN
html/image/body-aqua.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

BIN
html/image/bouton.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

BIN
html/image/bouton2.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

BIN
html/image/bouton3.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
html/image/bouton4.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 385 B

BIN
html/image/clouds2.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 962 B

BIN
html/image/clouds3.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1 KiB

BIN
html/image/freebtn1-b.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

BIN
html/image/freebtn1-l.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

BIN
html/image/freebtn1-l.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

BIN
html/image/freebtn1-ll.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

BIN
html/image/freebtn1.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

BIN
html/image/freebtn21.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2 KiB

BIN
html/image/freebtn31.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

BIN
html/image/freebtn91.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

BIN
html/image/glaslake1.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 995 B

BIN
html/image/glaslake2.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1 KiB

BIN
html/image/logo-wcompta Normal file

Binary file not shown.

BIN
html/image/logo-wcompta.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

BIN
html/image/logo7.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

View file

@ -19,7 +19,7 @@
// Auteur Dany De Bontridder ddebontridder@yahoo.fr
/* $Revision$ */
include_once ("ac_common.php");
html_page_start();
html_page_start($g_UserProperty['use_theme']);
if ( ! isset ( $g_dossier ) ) {
echo "You must choose a Dossier ";
exit -2;
@ -71,13 +71,11 @@ if ( isset ( $_POST["print"]) ) {
echo "<SCRIPT>alert(\"Aucune période choisie\"); </SCRIPT>";
return;
}
if ( $result== NO_POST_SELECTED) {
echo "<SCRIPT>alert(\"Aucun poste choisi\"); </SCRIPT>";
if ($result== NO_POST_SELECTED) {
echo "<SCRIPT>alert(\"Aucune post choisie\"); </SCRIPT>";
return;
}
// foreach($HTTP_POST_VARS as $e=>$element) {
// echo_debug("$e $element");
// }
if ( $_POST["action"]=="viewhtml") {
echo "<TABLE>";
echo $result;

View file

@ -1,20 +1,20 @@
<!DOCTYPE HTML PUBLIC "-//W3C/DTD HTML 3.2 FINAL//EN">
<HTML>
<TITLE> Gnu Accountancy</TITLE>
<BODY BGCOLOR="#4851FF">
<BODY BGCOLOR="#6b30ea">
<BR><BR><BR><BR><BR>
<center>
<H2>Bienvenue dans wcompta</H2>
<BR><BR>
<IMG SRC="image/logo-wcompta.jpg" alt="Logo">
<BR>
<form action=login.php method=post>
<TABLE BGCOLOR="#4851FF"><TR><TD>
<TABLE Bgcolor="#4851FF" BORDER=0 CELLSPACING=0>
<TR>
<TD> LOGIN </TD>
<TD><FONT COLOR="white"> LOGIN</FONT> </TD>
<TD><input type=text name=p_user></TD>
</TR>
<TR>
<TD> PASSWORD</TD>
<TD><FONT color="white"> PASSWORD</FONT></TD>
<TD><INPUT TYPE=PASSWORD NAME=p_pass></TD>
</TR>
<TR>

View file

@ -21,7 +21,7 @@
/* $Revision$ */
include_once ("ac_common.php");
include_once("jrn.php");
html_page_start();
html_page_start($g_UserProperty['use_theme']);
if ( ! isset ( $g_dossier ) ) {
echo "You must choose a Dossier ";
exit -2;

View file

@ -19,7 +19,7 @@
// Auteur Dany De Bontridder ddebontridder@yahoo.fr
/* $Revision$ */
include_once ("ac_common.php");
html_page_start();
html_page_start($g_UserProperty['use_theme']);
if ( ! isset ( $g_dossier ) ) {
echo "You must choose a Dossier ";
exit -2;

View file

@ -20,7 +20,7 @@
/* $Revision$ */
include_once ("ac_common.php");
include_once ("poste.php");
html_page_start();
html_page_start($g_UserProperty['use_theme']);
if ( ! isset ( $g_dossier ) ) {
echo "You must choose a Dossier ";
phpinfo();

View file

@ -19,7 +19,7 @@
// Auteur Dany De Bontridder ddebontridder@yahoo.fr
/* $Revision$ */
include_once ("ac_common.php");
html_page_start();
html_page_start($g_UserProperty['use_theme']);
if ( ! isset ( $g_dossier ) ) {
echo "You must choose a Dossier ";
phpinfo();

View file

@ -19,7 +19,7 @@
// Auteur Dany De Bontridder ddebontridder@yahoo.fr
/* $Revision$ */
include_once ("ac_common.php");
html_page_start();
html_page_start($g_UserProperty['use_theme']);
if ( ! isset ( $g_dossier ) ) {
echo "You must choose a Dossier ";
phpinfo();

View file

@ -19,7 +19,7 @@
// Auteur Dany De Bontridder ddebontridder@yahoo.fr
// $Revision$
include ("ac_common.php");
html_page_start();
html_page_start($g_UserProperty['use_theme']);
if ( !isset ($g_dossier)) {
echo "You must choose a Dossier ";
phpinfo();

View file

@ -32,16 +32,16 @@ if ( isset ($_POST["p_user"] ) ) {
$g_pass=$_POST["p_pass"];
session_register("g_user");
session_register("g_pass");
html_page_start();
html_page_start("classic");
} else
{
if ( strlen($g_user) != 0 ) {
echo_debug("user is not null");
html_page_start();
html_page_start("classic");
} else
{
html_page_start(1);
html_page_start("classic");
}
}
@ -56,7 +56,6 @@ if ( isset ($db_page) ) {
echo_debug("USER=$g_user - ");
//echo_debug($HTTP_SESSION_VARS["user"]);
echo_debug("PAGE = $db_page");
$cn=pg_connect("dbname=account_repository user='webcompta' ");

View file

@ -20,7 +20,7 @@
include ("ac_common.php");
include ("postgres.php");
html_page_start();
html_page_start("classic");
session_unset();
echo '<META HTTP-EQUIV="REFRESH" content="0;url=index.html">';

View file

@ -19,7 +19,7 @@
// Auteur Dany De Bontridder ddebontridder@yahoo.fr
/* $Revision$ */
include_once ("ac_common.php");
html_page_start();
html_page_start($g_UserProperty['use_theme']);
if ( ! isset ( $g_dossier ) ) {
echo "You must choose a Dossier ";
phpinfo();

View file

@ -20,7 +20,7 @@
/* $Revision$ */
include_once ("ac_common.php");
html_page_start();
html_page_start($g_UserProperty['use_theme']);
include_once ("postgres.php");
/* Admin. Dossier */
CheckUser();

View file

@ -21,7 +21,7 @@ include_once("ac_common.php");
include_once("postgres.php");
include_once("debug.php");
include_once("top_menu_compta.php");
html_page_start();
html_page_start($g_UserProperty['use_theme']);
echo_debug("entering priv_users");

View file

@ -18,7 +18,7 @@
*/
// Auteur Dany De Bontridder ddebontridder@yahoo.fr
include_once("ac_common.php");
html_page_start();
html_page_start($g_UserProperty['use_theme']);
echo_debug("code : $code");
include_once("postgres.php");
?>

View file

@ -32,13 +32,15 @@
$l_Db=sprintf("dossier%d",$g_dossier);
$cn=DbConnect($l_Db);
$l_type="JRN";
$centr=" Non centralisé";
$l_centr=0;
if ( isset ($_POST["central"]) ) {
$centr=($_POST["central"]=='no')?" Non centralisé":" centralisé ";
$l_type=$_POST["central"] == 'no'?"GL-NOCENTRAL":"GL-CENTRAL";
$centr=" centralisé ";
$l_centr=1;
}
if ( $_POST["filter"] == YES) {
$name_jrn=GetJrnName($cn,$_POST["p_id"]);
$name_jrn=GetJrnName($cn,$_POST["p_id"]).$centr;
} else {
$name_jrn="Grand livre ".$centr;
}
@ -64,15 +66,21 @@ while (1) {
$Exercice=GetExercice($cn,$a_jrn[0]['periode']);
list($rap_deb,$rap_cred)=GetRappel($cn,$first_id,$_POST["p_id"],$Exercice,FIRST,$l_type);
list($rap_deb,$rap_cred)=GetRappel($cn,$first_id,$_POST["p_id"],$Exercice,FIRST,
$_POST['filter'],
$l_centr
);
echo_debug("MONTANT $rap_deb,$rap_cred");
echo_debug(" list($rap_deb,$rap_cred)=GetRappel($cn,$first_id,".$_POST["p_id"].",$Exercice,FIRST)");
$pdf->ezText($name_jrn,30);
if ( $l_centr == 1 ) {
// si centralisé montre les montants de rappel
$str_debit=sprintf( "report Débit % 10.2f",$rap_deb);
$str_credit=sprintf("report Crédit % 10.2f",$rap_cred);
$pdf->ezText($str_debit,12,array('justification'=>'right'));
$pdf->ezText($str_credit,12,array('justification'=>'right'));
}
$pdf->ezTable($a_jrn,
array ('internal'=>'Opération',
@ -100,13 +108,14 @@ while (1) {
$count=count($a_jrn)-1;
$last_id=$a_jrn[$count]['j_id'];
$Exercice=GetExercice($cn,$a_jrn[$count]['periode']);
list($rap_deb,$rap_cred)=GetRappel($cn,$last_id,$_POST["p_id"],$Exercice,LAST,$l_type);
$str_debit=sprintf( "à reporter Débit % 10.2f",$rap_deb);
$str_credit=sprintf("à reporter Crédit % 10.2f",$rap_cred);
$pdf->ezText($str_debit,12,array('justification'=>'right'));
$pdf->ezText($str_credit,12,array('justification'=>'right'));
if ( $l_centr == 1) {
// Montant de rappel si centralisé
list($rap_deb,$rap_cred)=GetRappel($cn,$last_id,$_POST["p_id"],$Exercice,LAST,$_POST['filter'],$l_centr);
$str_debit=sprintf( "à reporter Débit % 10.2f",$rap_deb);
$str_credit=sprintf("à reporter Crédit % 10.2f",$rap_cred);
$pdf->ezText($str_debit,12,array('justification'=>'right'));
$pdf->ezText($str_credit,12,array('justification'=>'right'));
}
//New page
$pdf->ezNewPage();
}
@ -123,7 +132,7 @@ $pdf->ezTable($apage,
$last_id=$a_jrn[$count]['j_id'];
$Exercice=GetExercice($cn,$a_jrn[$count]['periode']);
list($rap_deb,$rap_cred)=GetRappel($cn,$last_id,$_POST["p_id"],$Exercice,LAST,$l_type);
list($rap_deb,$rap_cred)=GetRappel($cn,$last_id,$_POST["p_id"],$Exercice,LAST,$l_POST['filter'],$l_centr);
$str_debit=sprintf( "à reporter Débit % 10.2f",$rap_deb);
$str_credit=sprintf("à reporter Crédit % 10.2f",$rap_cred);
$pdf->ezText($str_debit,12,array('justification'=>'right'));

View file

@ -33,6 +33,15 @@ include("poste.php");
foreach ($HTTP_POST_VARS as $key=>$element) {
${"$key"}=$element;
}
if ( isset ( $all_poste) ){ //choisit de voir tous les postes
$r_poste=ExecSql($cn,"select pcm_val from tmp_pcmn where pcm_val = any ".
" (select j_poste from jrnx) order by pcm_val::text");
$nPoste=pg_numRows($r_poste);
for ( $i=0;$i<$nPoste;$i++) {
$t_poste=pg_fetch_array($r_poste,$i);
$poste[]=$t_poste['pcm_val'];
}
}
$ret="";
@ -54,6 +63,7 @@ for ( $i =0;$i<count($poste);$i++) {
array ('jr_internal'=>'Opération',
'j_date' => 'Date',
'jrn_name'=>'Journal',
'description'=>'Description',
'debit'=> 'Type',
'montant'=> 'Montant',
),$Libelle,

View file

@ -20,9 +20,22 @@
// Auteur Dany De Bontridder ddebontridder@yahoo.fr
/* $Revision$ */
include_once ("ac_common.php");
html_page_start();
include_once ("postgres.php");
// Met a jour le theme utilisateur (style)
if ( isset ( $_POST['style_user']) ) {
$CnRepo=DbConnect();
$Res=ExecSql($CnRepo,
"update ac_users set use_theme='".$_POST['style_user'].
"' where use_login='$g_user'");
// echo '<H2 class="info"> Theme utilisateur changé </H1>';
$g_UserProperty['use_theme']=$_POST['style_user'];
}
html_page_start($g_UserProperty['use_theme']);
/* Admin. Dossier */
CheckUser();
@ -48,10 +61,19 @@ if ( isset ($spass) ) {
$l_pass=md5($pass_1);
$Res=ExecSql($Cn,"update ac_users set use_pass='$l_pass' where use_login='$g_user'");
$pass=$pass_1;
echo '<H2 class="info"> Mot de passe changé </H1>';
// echo '<H2 class="info"> Mot de passe changé </H1>';
}
}
// Met a jour le theme utilisateur (style)
if ( isset ( $_POST['style_user']) ) {
$CnRepo=DbConnect();
$Res=ExecSql($CnRepo,
"update ac_users set use_theme='".$_POST['style_user'].
"' where use_login='$g_user'");
// echo '<H2 class="info"> Theme utilisateur changé </H1>';
$g_UserProperty['use_theme']=$_POST['style_user'];
}
?>
<H2 CLASS="info"> Password</H2>
<FORM ACTION="user_pref.php" METHOD="POST">
@ -62,6 +84,42 @@ if ( isset ($spass) ) {
</TABLE>
</FORM>
<?
// charge tous les styles
$cnRepo=DbConnect();
$res=ExecSql($cnRepo,"select the_name from theme
order by the_name");
for ($i=0;$i < pg_NumRows($res);$i++){
$st=pg_fetch_array($res,$i);
$style[]=$st['the_name'];
}
// Formatte le display
$disp_style="<SELECT NAME=\"style_user\" >";
foreach ($style as $st){
if ( $st == $g_UserProperty['use_theme'] ) {
$disp_style.='<OPTION VALUE="'.$st.'" SELECTED>'.$st;
} else {
$disp_style.='<OPTION VALUE="'.$st.'">'.$st;
}
}
$disp_style.="</SELECT>";
?>
<H2 class="info">Thème</H2>
<FORM ACTION="user_pref.php" METHOD="post">
<TABLE ALIGN="center">
<TR>
<TD> Style </TD>
<TD> <? print $disp_style;?> </TD>
</TR>
<TR>
<td colspan=2> <INPUT TYPE="submit" Value="Sauve"></TD>
</TR>
</TABLE>
</FORM>
<?
// Si utilise un dossier alors propose de changer
// la periode par defaut
if ( isset ($g_dossier) ) {
include_once("preference.php");

View file

@ -21,7 +21,7 @@
include_once ("ac_common.php");
include_once("check_priv.php");
html_page_start();
html_page_start($g_UserProperty['use_theme']);
if ( ! isset ( $g_dossier ) ) {
echo "You must choose a Dossier ";
exit -2;
@ -50,7 +50,10 @@ $User=ExecSql($cn,"select use_id,use_first_name,use_name,use_login from ac_user
$MaxUser=pg_NumRows($User);
ShowMenuComptaRight($g_dossier);
echo '<DIV CLASS="ccontent">';
echo '<H2 class="info"> Sécurité </H2>';
echo '<TABLE CELLSPACING="20" ALIGN="CENTER">';
for ($i = 0;$i < $MaxUser;$i++) {
$l_line=pg_fetch_array($User,$i);

View file

@ -89,39 +89,91 @@ function isDate ( $p_date) {
}// !ereg
return $p_date;
}
/* function
* Purpose :
*
* parm :
* -
* gen :
* -
* return:
*/
function formatDate($p_date) {
if ( isDate($p_date)== null) return "null";
return "'".$p_date."'";
}
function html_page_start($p_first=0,$p_script="")
/* function html_page_start
* Purpose : Default page header for each page
*
* parm :
* - default theme
* - $p_script
* gen :
* - none
* return:
* none
*/
function html_page_start($p_theme,$p_script="")
{
/*global $user,$pass;
if ($p_first == 1 ) {
echo_debug("Start session explicit");
session_start();
}
session_register("user");
session_register("pass");
echo_debug("user = ".$user." pass=".$pass);
*/
echo '<!DOCTYPE HTML PUBLIC "-//W3C/DTD HTML 3.2 FINAL//EN">';
include_once ("postgres.php");
$cn=DbConnect();
$Res=ExecSql($cn,"select the_filestyle from theme
where the_name='".$p_theme."'");
if (pg_NumRows($Res)==0) $style="style.css";
else {
$s=pg_fetch_array($Res,0);
$style=$s['the_filestyle'];
// TO FIX
// Ugly but I cannot change the background color thanks CSS !!!!
$bg="bgcolor=white";
if ($style=="style-aqua.css") $bg="bgcolor=\"#E3F0FF\"";
}
echo '<!DOCTYPE HTML PUBLIC "-//W3C/DTD HTML 3.2 FINAL//EN">';
echo "<HTML>";
echo "<HEAD>
<TITLE> Gnu Accountancy</TITLE>
<LINK REL=\"stylesheet\" type=\"text/css\" href=\"style.css\">
<LINK REL=\"stylesheet\" type=\"text/css\" href=\"$style\">
</HEAD>";
echo "<BODY $p_script>";
echo "<BODY $bg class=\"defaut\" $p_script>";
}
/* function
* Purpose :
*
* parm :
* -
* gen :
* -
* return:
*/
function html_page_stop()
{
echo "</BODY>";
echo "</HTML>";
}
/* function
* Purpose :
*
* parm :
* -
* gen :
* -
* return:
*/
function html_button_logout() {
echo "<A class=\"mtitle\" HREF=logout.php> Logout </A>";
}
/* function
* Purpose :
*
* parm :
* -
* gen :
* -
* return:
*/
function NoAccess() {
echo "<BR><BR><BR><BR><BR><BR>";
echo "<P ALIGN=center><BLINK>
@ -131,6 +183,17 @@ function NoAccess() {
exit -1;
}
/* function
* Purpose :
*
* parm :
* -
* gen :
* -
* return:
*/
function FormatString($p_string)
{
if ( !isset ($p_string) ) {
@ -142,6 +205,16 @@ function FormatString($p_string)
$p_string=str_replace("'","\'",$p_string);
return $p_string;
}
/* function
* Purpose :
*
* parm :
* -
* gen :
* -
* return:
*/
/* GetUserType
* purpose : get the type of an user (compta,developper or user)
@ -157,4 +230,4 @@ function GetUserType($p_user)
$Ret=pg_fetch_row($Res,0);
return $Ret[0];
}
?>
?>

View file

@ -21,15 +21,18 @@
// Auteur Dany De Bontridder ddebontridder@yahoo.fr
/* function
/* function Centralise
* Purpose :
* Met les donnees centralisees dans la table
* centralize
*
* parm :
* -
* - p_cn connection
* - periode a centraliser
* gen :
* -
* - none
* return:
* -
* - code error
*
*/
function Centralise($p_cn,$p_periode) {
@ -42,6 +45,7 @@ $sql="insert into centralized( c_j_id,
c_poste,
c_description,
c_grp,
c_jrn_def,
c_comment,
c_rapt,
c_periode) select j_id,
@ -52,6 +56,7 @@ $sql="insert into centralized( c_j_id,
j_poste ,
j_text ,
j_grpt ,
j_jrn_def,
jr_comment,
j_rapt,
j_tech_per

View file

@ -22,6 +22,7 @@
// Auteur Dany De Bontridder ddebontridder@yahoo.fr
function echo_debug ($p_log) {
$fdebug=fopen("/tmp/debug_log","a+");
if ( $fdebug != false ) {
fwrite($fdebug,date("Ymd H:i:s").$p_log."\n");

View file

@ -1,6 +1,4 @@
<?
/*
* This file is part of WCOMPTA.
*
@ -22,15 +20,17 @@
// Auteur Dany De Bontridder ddebontridder@yahoo.fr
// $Revision$
/* function
* Purpose :
/* function addFiche
* Purpose : ajoute une nouvelle fiche
*
* parm :
* -
* - connexion
* - type de la fiche
* - tableau
* gen :
* -
* - none
* return:
* -
* - none
*
*/
function AddFiche($p_cn,$p_type,$p_array) {
@ -61,19 +61,25 @@ function AddFiche($p_cn,$p_type,$p_array) {
}
}
/* function
* Purpose :
/* function EncodeFiche
* Purpose : Affiche les détails d'une fiche et propose
* de mettre à jour
* ou si array est a null, permet d'ajouter une
* fiche
*
* parm :
* -
* - p_cn connexion
* - p_type id du modele fichedef(fd_id) de la fiche SI array est null
* sinon correspond au id d'une fiche fiche(f_id)
* gen :
* -
* - none
* return:
* -
* - none
*
*/
function EncodeFiche($p_cn,$p_type,$p_array=null) {
echo_debug("function EncodeFiche($p_cn,$p_type) ");
$ch_col="</TD><TD>";
$ch_li='</TR><TR>';
echo '<FORM action="fiche.php" method="post">';
@ -81,6 +87,7 @@ function EncodeFiche($p_cn,$p_type,$p_array=null) {
echo "<TABLE>";
if ($p_array == null) {
echo '<H2 class="info">'.getFicheName($p_cn,$p_type).'</H2>';
$p_f_id="";
echo_debug("Array is null");
$sql="select isd_id,isd_label from isupp_def where isd_fd_id=".$p_type;
@ -102,11 +109,13 @@ function EncodeFiche($p_cn,$p_type,$p_array=null) {
echo '<INPUT TYPE="SUBMIT" name="add_fiche" value="ajoute">';
echo '</FORM>';
}else {
$sql="select f_label,f_fd_id from fiche where f_id=".$p_type;
$Res=ExecSql($p_cn,$sql);
$Max=pg_NumRows($Res);
if ( $Max == 0 ) return;
$l_line=pg_fetch_array($Res,0);
echo '<H2 class="info">'.getFicheName($p_cn,$l_line['f_fd_id']).'</H2>';
printf('<input TYPE="TEXT" name="f_label" value="%s"><BR>',
$l_line['f_label']);
echo '<INPUT TYPE="HIDDEN" name="f_fd_id" value="'.$l_line['f_fd_id'].'">';
@ -135,15 +144,16 @@ function EncodeFiche($p_cn,$p_type,$p_array=null) {
}
}
/* function
* Purpose :
*
/* function GetBaseFiche
* Purpose : donne la classe comptable de base d'une fiche
*
* parm :
* -
* - p_cn connexion
* - p_type fiche id
* gen :
* -
* - none
* return:
* -
* - return la classe id ou rien
*
*/
function GetBaseFiche($p_cn,$p_type) {
@ -153,18 +163,20 @@ function GetBaseFiche($p_cn,$p_type) {
$base=pg_fetch_array($Res,0);
return $base['fd_class_base'];
}
/* function
* Purpose :
/* function ViewFiche
* Purpose : Montre les fiches d'une rubrique
*
* parm :
* -
* - p_cn connexion
* - $p_type f_id
* gen :
* -
* - none
* return:
* -
* - none
*
*/
function ViewFiche($p_cn,$p_type) {
echo '<H2 class="info">'.getFicheName($p_cn,$p_type).'</H2>';
$Res=ExecSql($p_cn,"select f_id,f_label from fiche where f_fd_id='".$p_type."' order by f_id");
$Max=pg_NumRows($Res);
@ -187,11 +199,13 @@ function ViewFiche($p_cn,$p_type) {
echo '</FORM>';
}
/* function
* Purpose :
/* function GetNextFiche
* Purpose : Crée le poste suivant pour une fiche en fonction
* de la classe de base (fichedef(fd_class_base))
*
* parm :
* -
* - p_cn connexion
* - p_base
* gen :
* -
* return:
@ -228,11 +242,14 @@ function GetDataFiche($p_cn,$p_fiche_id) {
}
/* function
* Purpose :
/* function ViewFicheDetail
* Purpose : Montre le detail d'une fiche
* et ajoute les lignes manquantes
* dans le cas le modèle à changer
*
* parm :
* -
* - p_cn
* - id de la fiche fiche(f_id)
* gen :
* -
* return:
@ -249,11 +266,13 @@ $sql="insert into isupp (is_f_id,is_isd_id) select".
$Res=ExecSql($p_cn,$sql);
EncodeFiche ($p_cn,$p_id,1);
}
/* function
* Purpose :
*
/* function UpdateFiche
* Purpose : Met a jour une fiche
* change dans le plan comptable, fiche,et isupp
*
* parm :
* -
* - p_cn
* - p_array
* gen :
* -
* return:
@ -283,7 +302,7 @@ function UpdateFiche($p_cn,$p_array) {
$Res=ExecSql($p_cn,$sql);
}
}
/* function
/* function EncodeModele
* Purpose :
*
* parm :
@ -414,23 +433,27 @@ function AddModele($p_cn,$p_array) {
}
}
}
/* function
/* function UpdateModele
* Purpose :
*
* parm :
* -
* - p_cn connexion
* - p_fiche fichedef(f_id)
* - p_js
* gen :
* -
* - none
* return:
* -
* - none
*
*/
function UpdateModele($p_cn,$p_fiche,$p_js) {
$array=GetDataModele($p_cn,$p_fiche);
if ($array==null) {
echo_error ("fiche_inc:UpdateModele Fiche non trouvée");
return;
}
echo '<H2 class="info">'.getFicheName($p_cn,$p_fiche).'</H2>';
foreach ( $array as $key=>$element) echo_debug("$key => $element");
DefModele($p_js,$array,$array['ligne']);
@ -475,15 +498,16 @@ function GetDataModele($p_cn,$p_fiche) {
return $array;
}
/* function
* Purpose :
/* function SaveModele
* Purpose : Sauve un modele de fiche
*
* parm :
* -
* - connexion
* - tableau de valeurs
* gen :
* -
* - none
* return:
* -
* - none
*
*/
function SaveModele($p_cn,$p_array) {
@ -527,6 +551,18 @@ function SaveModele($p_cn,$p_array) {
$Res=ExecSql($p_cn,$sql);
}//for
}
/* function Remove
* Purpose : enleve une fiche dans isupp et fiche
* a la condition que ce poste n'aie jamais
* été utilisé
* parm :
* - p_cn
* - p_fid fiche(f_id)
* gen :
* - none
* return:
* - none
*/
function Remove ($p_cn, $p_fid) {
if ( ! isset ($p_cn) ||
! isset ($p_fid) ) {
@ -540,4 +576,23 @@ function Remove ($p_cn, $p_fid) {
echo "<SCRIPT> alert('Impossible ce poste est utilisé dans un journal'); </SCRIPT>";
}
}
/* function getFicheName
* Purpose : retourne le nom de la fiche
*
* parm :
* - p_cn connexion
* - p_id fiche id
* gen :
* - none
* return:
* - string avec nom fiche
*/
function getFicheName($p_cn,$p_id) {
$Res=ExecSql($p_cn,"select fd_label from fichedef where fd_id='".$p_id."'");
if ( pg_NumRows($Res) == 0 ) return "Unknown";
$st=pg_fetch_array($Res,0);
return $st['fd_label'];
}
?>

View file

@ -41,27 +41,38 @@ function ViewImp($p_array,$p_cn) {
${"$key"}=$element;
}
if ( ! isset($type) ) return;
if ( $action=="viewhtml") echo '<FORM ACTION=impress.php METHOD="POST">';
else {
$centr="";
if ( $action=="viewhtml") {
echo '<FORM ACTION=impress.php METHOD="POST">';
if ( $type=="jrn")
$centr='<BR>Centralisé :
<INPUT TYPE="CHECKBOX" NAME="central" unchecked><BR>';
}
else {
if ( $type=="jrn") {
echo '<FORM ACTION=send_jrn_pdf.php METHOD="POST">';
$centr='<BR>Centralisé :
<INPUT TYPE="CHECKBOX" NAME="central" unchecked><BR>';
}
if ( $type=="poste")
echo '<FORM ACTION=send_poste_pdf.php METHOD="POST">';
}
echo $periode;
echo '<INPUT TYPE="HIDDEN" NAME="type" value="'.$type.'">';
echo '<INPUT TYPE="HIDDEN" NAME="action" value="'.$action.'">';
if (isset ($central)) {
echo '<INPUT TYPE="HIDDEN" NAME="central" value="'.$central.'">';
}
echo $centr;
if ( isset($filter))
echo '<INPUT TYPE="HIDDEN" NAME="filter" value="'.$filter.'">';
if ( isset ($p_id)) {
echo '<INPUT TYPE="HIDDEN" NAME="p_id" value="'.$p_id.'">';
} else {
include_once("poste.php");
echo "<BR>";
echo PosteForm($p_cn);
echo ' <BR>Tous les postes ';
echo '<INPUT TYPE="checkbox" NAME="all_poste"><BR>';
}
echo '<INPUT TYPE="SUBMIT" name="print" Value="Executer">';
@ -138,11 +149,19 @@ function ImpHtml($p_array,$p_cn)
}//form
if ($type=="poste") {
if ( ! isset ( $poste )) return NO_POST_SELECTED;
if ( ! isset ( $all_poste) && ! isset ( $poste )) return NO_POST_SELECTED;
if ( !isset ($periode)) return NO_PERIOD_SELECTED;
include_once("poste.php");
$cond=CreatePeriodeCond($periode);
$ret="" ;
if ( isset ( $all_poste) ){ //choisit de voir tous les postes
$r_poste=ExecSql($p_cn,"select pcm_val from tmp_pcmn");
$nPoste=pg_numRows($r_poste);
for ( $i=0;$i<$nPoste;$i++) {
$t_poste=pg_fetch_array($r_poste,$i);
$poste[]=$t_poste['pcm_val'];
}
}
for ( $i =0;$i<count($poste);$i++) {
list ($array,$tot_deb,$tot_cred)=GetDataPoste($p_cn,$poste[$i],$cond);
if ( count($array) == 0) continue;
@ -159,10 +178,11 @@ function ImpHtml($p_array,$p_cn)
$ret.=sprintf("<TD> debit</TD><TD ALIGN=\"right\"> % 8.2f</TD>",$element['montant']);
} else {
$ret.=sprintf("<TD>credit</TD> $colvide <TD ALIGN=\"right\"> % 8.2f</TD>",$element['montant']);
}
$ret.="</TR>";
}//foreach
$ret.=sprintf("$colvide $colvide $colvide $colvide ".
"<TD ALIGN=\"right\">% 8.2f</TD>".
"<TD ALIGN=\"right\">% 8.2f</TD>",
@ -182,6 +202,7 @@ function ImpHtml($p_array,$p_cn)
return $ret;
}//poste
if ($type=="jrn") {
if ( !isset ($periode)) return NO_PERIOD_SELECTED;
echo_debug("imp html journaux");
$ret="";
@ -235,7 +256,7 @@ function GetDataPoste($p_cn,$p_poste,$p_condition)
{
$Res=ExecSql($p_cn,"select to_char(j_date,'DD.MM.YYYY') as j_date,".
"to_char(j_montant,'999999999.99') as montant,".
" j_text as description,jrn_def_name as jrn_name,".
" jr_comment as description,jrn_def_name as jrn_name,".
"j_debit, jr_internal, ".
" case when j_debit='t' then 'debit' else 'credit' end as debit".
" from jrnx left join jrn_def on jrn_def_id=j_jrn_def ".
@ -274,17 +295,32 @@ function GetDataPoste($p_cn,$p_poste,$p_condition)
function GetDataJrn($p_cn,$p_array,$filter=YES)
{
if ( !isset ($p_array['periode']) ) return NO_PERIOD_SELECTED;
$cond=CreatePeriodeCond($p_array['periode']);
if ( $filter==YES) {
$Res=ExecSql($p_cn,"select to_char(j_date,'DD.MM.YYYY') as j_date,
if ( ! isset ( $p_array['central'])){
$cond=CreatePeriodeCond($p_array['periode']);
$Res=ExecSql($p_cn,"select to_char(j_date,'DD.MM.YYYY') as j_date,
j_montant as montant,j_debit as debit,j_poste as poste,".
"j_text as description,j_grpt as grp,jr_comment as comment,
j_rapt as oc,jr_internal from jrnx left join jrn on ".
"jr_grpt_id=j_grpt where j_jrn_def=".$p_array['p_id'].
" and ".$cond." order by j_date::date,j_grpt,j_debit desc");
}
} else {
// create
$cond=CreatePeriodeCond($p_array['periode'],"c_periode");
$Res=ExecSql($p_cn,"select to_char(c_date,'DD.MM.YYYY') as j_date,
c_montant as montant,c_debit as debit,c_poste as poste,".
"c_description as description,c_grp as grp,c_comment as comment,
c_rapt as oc,c_internal as jr_internal from centralized left join jrn on ".
"jr_grpt_id=c_grp where c_jrn_def=".$p_array['p_id']." and ".
$cond." order by c_id,c_date,c_grp,c_debit desc");
}
} // if filter == YES
if ( $filter == NO) {
if ( $p_array['central']=='no') {
if ( ! isset ($p_array['central']) ) {
$cond=CreatePeriodeCond($p_array['periode']);
$Res=ExecSql($p_cn,"select to_char(j_date,'DD.MM.YYYY') as j_date,
j_montant as montant,j_debit as debit,j_poste as poste,".
"j_text as description,j_grpt as grp,jr_comment as comment,
@ -297,7 +333,7 @@ function GetDataJrn($p_cn,$p_array,$filter=YES)
$Res=ExecSql($p_cn,"select to_char(c_date,'DD.MM.YYYY') as j_date,
c_montant as montant,c_debit as debit,c_poste as poste,".
"c_description as description,c_grp as grp,c_comment as comment,
c_rapt as oc,c_internal from centralized left join jrn on ".
c_rapt as oc,c_internal as jr_internal from centralized left join jrn on ".
"jr_grpt_id=c_grp where ".
$cond." order by c_id,c_date,c_grp,c_debit desc");
@ -323,7 +359,30 @@ function GetDataJrn($p_cn,$p_array,$filter=YES)
*
*/
function CreatePeriodeCond($p_periode,$p_field=" j_tech_per") {
if ( count($p_periode) == 1) {
return $p_field."=".$p_periode[0];
}
$cond_periode=" $p_field in (";
// condition periode
$old=0;
$follow=0;
foreach ( $p_periode as $per) {
if ( $old == 0) {
$old=$per;
$follow=1;
continue;
}
if ( $per == $old+1 ) {
$old=$per;
$follow++;
}
}// foreach
if ( count($p_periode) == $follow) {
$cond=$p_field." >= ".$p_periode[0].' and '.$p_field.' <= '.$p_periode[count($p_periode)-1];
return $cond;
}
// condition periode
foreach ( $p_periode as $per) {
@ -354,6 +413,8 @@ function GetDataJrnPdf($p_cn,$p_array,$p_limit,$p_offset)
if ( $p_array['filter']==YES) {
$cond=CreatePeriodeCond($p_array['periode']);
if ( ! isset ($p_array['central']) ) {
// Journaux non centralisés
$Res=ExecSql($p_cn,"select j_id,to_char(j_date,'DD.MM.YYYY') as j_date,
jr_internal,
case j_debit when 't' then j_montant::text else ' ' end as deb_montant,
@ -366,8 +427,35 @@ function GetDataJrnPdf($p_cn,$p_array,$p_limit,$p_offset)
" where j_jrn_def=".$p_array['p_id'].
" and ".$cond." order by j_id,j_date::date,j_grpt,j_debit desc".
" limit ".$p_limit." offset ".$p_offset);
}else {
// Journaux centralisés
$cond=CreatePeriodeCond($p_array['periode'],"c_periode");
$Sql="select c_id as j_id,
c_j_id,
to_char (c_date,'DD.MM.YYYY') as j_date ,
c_internal as jr_internal,
case c_debit when 't' then c_montant::text else ' ' end as deb_montant,
case c_debit when 'f' then c_montant::text else ' ' end as cred_montant,
c_debit as j_debit,
c_poste as poste,
pcm_lib as description,
jr_comment,
jr_montant,
c_grp as grp,
c_comment as comment,
c_rapt as oc,
c_periode as periode
from centralized left join jrn on ".
"jr_grpt_id=c_grp left join tmp_pcmn on pcm_val=c_poste where ".
" c_jrn_def=".$p_array['p_id']." and ".
$cond." order by c_id ";
$Res=ExecSql($p_cn,$Sql." limit ".$p_limit." offset ".$p_offset);
}
} else {
// Grand Livre
if ( $p_array['central']=='no' ) {
// Non centralisé
$cond=CreatePeriodeCond($p_array['periode']);
$Res=ExecSql($p_cn,"select j_id,to_char(j_date,'DD.MM.YYYY') as j_date,
jr_internal,
@ -382,6 +470,7 @@ function GetDataJrnPdf($p_cn,$p_array,$p_limit,$p_offset)
" limit ".$p_limit." offset ".$p_offset);
} else {
// Centralisé
$cond=CreatePeriodeCond($p_array['periode'],"c_periode");
$Sql="select c_id as j_id,
c_j_id,
@ -419,6 +508,9 @@ function GetDataJrnPdf($p_cn,$p_array,$p_limit,$p_offset)
$jr_montant=($line['jr_montant']!=0)?sprintf("% 8.2f",$line['jr_montant']):"";
$tot_deb+=$line['deb_montant'];
$tot_cred+=$line['cred_montant'];
echo_debug(" GetJrnDataPdf : mont_Deb ".$mont_deb);
echo_debug(" GetJrnDataPdf : mont_cred ".$mont_cred);
if ( $case != $line['grp'] ) {
$case=$line['grp'];
$array[]=array (
@ -506,7 +598,7 @@ function GetDataGrpt($p_cn,$p_array)
*
*/
function GetRappel($p_cn,$p_jrnx_id,$p_jrn_id,$p_exercice,$which,$p_type)
function GetRappel($p_cn,$p_jrnx_id,$p_jrn_id,$p_exercice,$which,$p_type,$p_central)
{
include_once("preference.php");
@ -515,73 +607,87 @@ function GetRappel($p_cn,$p_jrnx_id,$p_jrn_id,$p_exercice,$which,$p_type)
else
$cmp="<";
if ( $p_type == 'JRN' ) {
$c_line=CountSql($p_cn,"select * from jrnx left join parm_periode on j_tech_per=p_id ".
"where j_jrn_def=$p_jrn_id and p_exercice='".$p_exercice."'".
" and j_id $cmp $p_jrnx_id ");
if ($c_line == 0 ) { return array (0,0); }
$sql="select sum(j_montant) as tot_amount ".
" from jrnx ".
" left join parm_periode on j_tech_per=p_id ".
" where j_jrn_def=$p_jrn_id and ".
" p_exercice='".$p_exercice."'".
" and j_id $cmp $p_jrnx_id " ;
$Res=ExecSql($p_cn,$sql." and j_debit='t' ");
if ( pg_NumRows($Res) == 0 )
$deb=0;
else {
$line=pg_fetch_array($Res,0);
$deb=$line['tot_amount'];
}
$Res=ExecSql($p_cn,$sql." and j_debit='f' ");
if ( pg_NumRows($Res) == 0 )
$cred=0;
else {
if ( $p_type == 1 ) {
// Vue filtree => Journaux
if ( $p_central == 0 ) { // Vue non centralisée
return array(0,0);
} // p_central == 0
// Vue filtree => Journaux & Jrn centralisé
if ( $p_central == 1 ) {
$c_line=CountSql($p_cn,"select * from centralized left join parm_periode on c_periode=p_id ".
" where c_jrn_def=$p_jrn_id and p_exercice='".$p_exercice."'".
" and c_id $cmp $p_jrnx_id ");
$line=pg_fetch_array($Res,0);
$cred=$line['tot_amount'];
}
echo_debug("MONTANT $deb,$cred");
$a=array($deb,$cred);
return $a;
}
if ($p_type=='GL-CENTRAL') { // Si Grand Livre, prendre donnée centralisée{
$c_line=CountSql($p_cn,"select * from centralized left join parm_periode on c_periode=p_id ".
"where p_exercice='".$p_exercice."'".
" and c_id $cmp $p_jrnx_id ");
if ($c_line == 0 ) { return array (0,0); }
$sql="select sum(c_montant) as tot_amount ".
" from centralized ".
" left join parm_periode on c_periode=p_id ".
" where ".
" p_exercice='".$p_exercice."'".
" and c_id $cmp $p_jrnx_id " ;
$Res=ExecSql($p_cn,$sql." and c_debit='t' ");
if ( pg_NumRows($Res) == 0 )
$deb=0;
else {
$line=pg_fetch_array($Res,0);
$deb=$line['tot_amount'];
}
$Res=ExecSql($p_cn,$sql." and c_debit='f' ");
if ( pg_NumRows($Res) == 0 )
$cred=0;
else {
if ($c_line == 0 ) { return array (0,0); }
$sql="select sum(c_montant) as tot_amount ".
" from centralized ".
" left join parm_periode on c_periode=p_id ".
" where c_jrn_def=$p_jrn_id and ".
" p_exercice='".$p_exercice."'".
" and c_id $cmp $p_jrnx_id " ;
$Res=ExecSql($p_cn,$sql." and c_debit='t' ");
if ( pg_NumRows($Res) == 0 )
$deb=0;
else {
$line=pg_fetch_array($Res,0);
$deb=$line['tot_amount'];
}
$line=pg_fetch_array($Res,0);
$cred=$line['tot_amount'];
$Res=ExecSql($p_cn,$sql." and c_debit='f' ");
if ( pg_NumRows($Res) == 0 )
$cred=0;
else {
$line=pg_fetch_array($Res,0);
$cred=$line['tot_amount'];
}
echo_debug("MONTANT $deb,$cred");
$a=array($deb,$cred);
return $a;
}
echo_debug("MONTANT $deb,$cred");
$a=array($deb,$cred);
return $a;
}
if ($p_type=='GL-NOCENTRAL') { // Si Grand Livre, prendre donnée non centralisée{
return array(0,0);
}
} // Type = jrn
if ($p_type==0 ) { // Si Grand Livre, prendre donnée centralisée{
if ( $p_central == 1) {
$c_line=CountSql($p_cn,"select * from centralized left join parm_periode on c_periode=p_id ".
"where p_exercice='".$p_exercice."'".
" and c_id $cmp $p_jrnx_id ");
if ($c_line == 0 ) { return array (0,0); }
$sql="select sum(c_montant) as tot_amount ".
" from centralized ".
" left join parm_periode on c_periode=p_id ".
" where ".
" p_exercice='".$p_exercice."'".
" and c_id $cmp $p_jrnx_id " ;
$Res=ExecSql($p_cn,$sql." and c_debit='t' ");
if ( pg_NumRows($Res) == 0 )
$deb=0;
else {
$line=pg_fetch_array($Res,0);
$deb=$line['tot_amount'];
}
$Res=ExecSql($p_cn,$sql." and c_debit='f' ");
if ( pg_NumRows($Res) == 0 )
$cred=0;
else {
$line=pg_fetch_array($Res,0);
$cred=$line['tot_amount'];
}
echo_debug("MONTANT $deb,$cred");
$a=array($deb,$cred);
return $a;
} // central == 1
else // Donnée non centralisée => pas de rappel
{
if ($p_central== 0) { // Si Grand Livre, prendre donnée non centralisée{
return array(0,0);
}
}//else
} // if type==0
}
/* function ParseFormula

View file

@ -659,7 +659,7 @@ function ViewJrn($p_dossier,$p_user,$p_jrn,$p_array=null) {
echo_debug("function ViewJrn($p_dossier,$p_user,$p_jrn,$p_array=null) ");
$db=sprintf("dossier%d",$p_dossier);
$l_prop=GetJrnProp($p_dossier,$p_jrn);
echo $l_prop['jrn_def_name']."( ".$l_prop['jrn_def_code'].")";
echo "<H2 class=\"info\">".$l_prop['jrn_def_name']."( ".$l_prop['jrn_def_code'].")"."</H2>";
$cn=DbConnect($db);
if ( $p_array == null) {
include_once("preference.php");
@ -738,7 +738,7 @@ function ViewJrn($p_dossier,$p_user,$p_jrn,$p_array=null) {
$num_op,$l_line['j_grpt'],$sessid);
// echo $num_op;
echo "</TD>";
echo '<TD class="mtitle">';
echo '<TD class="mlltitle">';
echo "<A class=\"mtitle\" HREF=enc_jrn.php?action=update&line=".$l_line['j_grpt'].">";
echo "M";
echo "</A></TD>";

View file

@ -21,15 +21,17 @@
// Auteur Dany De Bontridder ddebontridder@yahoo.fr
/* $Revision$ */
/* function
* Purpose :
/* function GetPosteLibelle
* Purpose : Return the label of a poste
*
* parm :
* -
* - p_dossier
* - p_id tmp_pcmn (pcm_val)
* - is_cn conneciton
* gen :
* -
* - none
* return:
* -
* - string
*
*/
function GetPosteLibelle($p_dossier,$p_id,$is_cn=0)
@ -47,15 +49,16 @@ function GetPosteLibelle($p_dossier,$p_id,$is_cn=0)
$l_poste=pg_fetch_row($Res,0);
return $l_poste[0];
}
/* function
* Purpose :
/* function GetNumberLine
* Purpose : Max of ligne definie dans le journal
*
* parm :
* -
* - p_dossier
* - p_jrn
* gen :
* -
* - none
* return:
* -
* -
*
*/
function GetNumberLine($p_dossier,$p_jrn)
@ -73,19 +76,21 @@ function GetNumberLine($p_dossier,$p_jrn)
// return ($l_deb,$l_cred);
}
/* function
* Purpose :
/* function PosteForm
* Purpose : Cree un form pour prendre les postes
*
* parm :
* -
* - connection
* gen :
* -
* - noen
* return:
* -
* - morceau de code d'html qui contient un multiselect
* pour les postes
*
*/
function PosteForm($p_cn) {
$Res=ExecSql($p_cn,"select pcm_val,pcm_lib from tmp_pcmn order by pcm_val::text");
$Res=ExecSql($p_cn,"select pcm_val,pcm_lib from tmp_pcmn
where pcm_val = any (select j_poste from jrnx) order by pcm_val::text");
$Max=pg_NumRows($Res);
if ($Max==0) return null;
$ret='<SELECT NAME="poste[]" SIZE="15" MULTIPLE>';

View file

@ -359,7 +359,6 @@ function GetUserProperty($p_cn,$p_user)
'use_theme'=>'classic');
$a=pg_fetch_array($Ret,0);
return $a;
}

View file

@ -56,42 +56,15 @@
echo "</TR></TABLE>";
echo "</div>";
}
/* function
* Purpose :
/* function ShowMenuCompta
* Purpose : Montre le menu du haut
*
* parm :
* -
* - dossier
* gen :
* -
* - none
* return:
* -
*
*/
function ShowMenuAdmin($p_dossier)
{
include_once("postgres.php");
$l_name=GetDossierName($p_dossier);
echo "<P> <H2 class=\"info\"> $l_name </H2></P>";
echo '<div class="tmenu">';
echo '<TABLE ALIGN="CENTER"><TR>';
echo '<TD class="mtitle"><A class="mtitle" HREF="pcmn_update.php?p_start=1">Mise à jour Plan Comptable</A></TD>';
echo '<TD class="mtitle"><A class="mtitle" HREF="jrn_update.php">Gestion Journaux</A></TD>';
echo '<TD class="mtitle"><A class="mtitle" HREF="dossier_prefs.php">Préférences</A></TD>';
echo '<TD class="mtitle"><A class="mtitle" HREF="user_sec.php">Sécurité Utilisateur</A></TD>';
echo '</TR></TABLE>';
echo "</DIV>";
}
/* function
* Purpose :
*
* parm :
* -
* gen :
* -
* return:
* -
* - none
*
*/
@ -99,19 +72,19 @@ function ShowMenuCompta($p_dossier)
{
include_once("postgres.php");
$l_name=GetDossierName($p_dossier);
echo "<P> <H2 class=\"info\"> $l_name </H2></P>";
echo "<P> <H2 class=\"info2\"> $l_name </H2></P>";
echo '<div class="tmenu">';
echo '<TABLE><TR>';
// TODO echo '<TD class="mtitle"><A class="mtitle" HREF="facturation.php">Facturation</A></TD>';
echo '<TD class="mtitle"><A class="mtitle" HREF="enc_jrn.php">Encodage Journaux</A></TD>';
echo '<TD class="mtitle"><A class="mtitle" HREF="enc_jrn.php">Encodage </A></TD>';
echo '<TD class="mtitle"<A class="mtitle" HREF="form.php">Formulaire </A> </TD>';
echo '<TD class="mtitle"><A class="mtitle" HREF="impress.php">Impression</A></TD>';
echo '<TD class="mtitle"><A class="mtitle" HREF="fiche.php">Fiche</A></TD>';
echo '<TD class="mtitle"><A class="mtitle" HREF="pcmn_update.php?p_start=1">Plan Comptable</A></TD>';
echo '<TD class="mtitle"><A class="mtitle" HREF="jrn_update.php">Gestion Journaux</A></TD>';
echo '<TD class="mtitle"><A class="mtitle" HREF="jrn_update.php">Journaux</A></TD>';
echo '<TD class="mtitle"><A class="mtitle" HREF="central.php">Centralise</A></TD>';
echo '<TD class="mtitle"><A class="mtitle" HREF="dossier_prefs.php">Paramètres</A></TD>';
echo '<TD class="mtitle"><A class="mtitle" HREF="user_sec.php">Sécurité</A></TD>';
echo "</TR>";
echo "</TABLE>";
@ -148,15 +121,15 @@ function ShowMenuComptaLeft($p_dossier,$p_item)
// TODO
// Only for developper
// A test must be added
echo '<TR><TD colspan="3" class="mtitle">
echo '<TR><TD colspan="3" class="mshort">
<A class="mtitle" HREF="fiche.php?action=add_modele&fiche=modele">Creation Modele</A></TD></TR>';
$Res=ExecSql($cn,"select fd_id,fd_label from fichedef order by fd_label");
$Max=pg_NumRows($Res);
for ( $i=0; $i < $Max;$i++) {
$l_line=pg_fetch_array($Res,$i);
printf('<TR><TD class="cell">%s</TD><TD class="mtitle"><A class="mtitle" HREF="fiche.php?action=vue&fiche=%d">Voir</A>
printf('<TR><TD class="cell">%s</TD><TD class="mshort"><A class="mtitle" HREF="fiche.php?action=vue&fiche=%d">Voir</A>
</TD>
<TD class="mtitle"><A class="mtitle" HREF="fiche.php?action=modifier&fiche=%d">Modifier</A></TD>
<TD class="mshort"><A class="mtitle" HREF="fiche.php?action=modifier&fiche=%d">Modifier</A></TD>
</TR>',
$l_line['fd_label'],
$l_line['fd_id'],
@ -172,6 +145,7 @@ function ShowMenuComptaLeft($p_dossier,$p_item)
echo '<TABLE>';
echo '<TR><TD class="mtitle"><A class="mtitle" HREF="dossier_prefs.php?p_action=devise">Devises</A></TD></TR>';
echo '<TR><TD class="mtitle"><A class="mtitle" HREF="dossier_prefs.php?p_action=periode">Périodes</A></TD></TR>';
echo '<TR><TD class="mtitle"><A class="mtitle" HREF="user_sec.php">Sécurité</A></TD></TR>';
echo "</TABLE>";
echo '</div>';
break;
@ -351,12 +325,12 @@ function ShowMenuJrnUser($p_dossier,$p_user)
printf ('<TR><TD class="cell">%s</TD>',$l_line['jrn_def_name']);
if ( $right > 0 ) {
// Lecture
printf ('<TD class="mtitle"><A class="mtitle" HREF="enc_jrn.php?p_jrn=%s&action=view">Voir</A></TD>',
printf ('<TD class="mltitle"><A class="mtitle" HREF="enc_jrn.php?p_jrn=%s&action=view">Voir</A></TD>',
$l_line['jrn_def_id']);
}
// ecriture
if ( $right > 1 ) {
printf ('<TD class="mtitle"><A class="mtitle" HREF="enc_jrn.php?p_jrn=%s&action=record&max_deb=%s&max_cred=%s">Encoder</A></TD></TR>',
printf ('<TD class="mltitle"><A class="mtitle" HREF="enc_jrn.php?p_jrn=%s&action=record&max_deb=%s&max_cred=%s">Encoder</A></TD></TR>',
$l_line['jrn_def_id'],
$l_line['jrn_deb_max_line'],
$l_line['jrn_cred_max_line']);
@ -447,7 +421,7 @@ function ShowMenuComptaForm($p_dossier) {
$cn=DbConnect($l_dossier);
echo '<div class="lmenu">';
echo '<TABLE>';
echo '<TR><TD class="mtitle"><A class="mtitle" HREF="form.php?action=add">Ajout de formulaire </A></TD></TR>';
echo '<TR><TD class="mtitle"><A class="mtitle" HREF="form.php?action=add">Ajout</A></TD></TR>';
$l_jrn=sprintf("dossier%d",$p_dossier);
$Cn=DbConnect($l_jrn);
$Ret=ExecSql($Cn,"select fr_id, fr_label
@ -515,10 +489,10 @@ function ShowMenuJrnUserImp($p_cn,$p_user,$p_dossier)
printf ('<TR><TD class="cell">%s</TD>',$l_line['jrn_def_name']);
printf ('<TD class="mtitle"><A class="mtitle" HREF="impress.php?p_id=%s&action=viewhtml&type=jrn&filter=%d">Html</A></TD>',
printf ('<TD class="mshort"><A class="mtitle" HREF="impress.php?p_id=%s&action=viewhtml&type=jrn&filter=%d">Html</A></TD>',
$l_line['jrn_def_id'],YES);
printf ('<TD class="mtitle"><A class="mtitle" HREF="impress.php?p_id=%s&action=viewpdf&type=jrn&filter=%d">Pdf</A></TD></TR>',
printf ('<TD class="mshort"><A class="mtitle" HREF="impress.php?p_id=%s&action=viewpdf&type=jrn&filter=%d">Pdf</A></TD></TR>',
$l_line['jrn_def_id'],YES
);
@ -533,13 +507,9 @@ function ShowMenuJrnUserImp($p_cn,$p_user,$p_dossier)
");
// Pour voir tout les journal ?
if ( $NoPriv == 0 ) {
printf ('<TR><TD class="cell">Grand Livre Non Centralisé</TD>');
printf ('<TD class="mtitle"><A class="mtitle" HREF="impress.php?p_id=all&action=viewhtml&type=jrn&filter=%d&central=no">Html</A></TD>',NO);
printf ('<TD class="mtitle"><A class="mtitle" HREF="impress.php?p_id=all&action=viewpdf&type=jrn&filter=%d&central=no">Pdf</A></TD></TR>',NO);
printf ('<TR><TD class="cell">Grand Livre Centralisé</TD>');
printf ('<TD class="mtitle"><A class="mtitle" HREF="impress.php?p_id=all&action=viewhtml&type=jrn&filter=%d&central=yes">Html</A></TD>',NO);
printf ('<TD class="mtitle"><A class="mtitle" HREF="impress.php?p_id=all&action=viewpdf&type=jrn&filter=%d&central=yes">Pdf</A></TD></TR>',NO);
printf ('<TR><TD class="cell">Grand Livre </TD>');
printf ('<TD class="mshort"><A class="mtitle" HREF="impress.php?p_id=all&action=viewhtml&type=jrn&filter=%d">Html</A></TD>',NO);
printf ('<TD class="mshort"><A class="mtitle" HREF="impress.php?p_id=all&action=viewpdf&type=jrn&filter=%d">Pdf</A></TD></TR>',NO);
}
echo "</TABLE>";
@ -555,11 +525,11 @@ function ShowMenuJrnUserImp($p_cn,$p_user,$p_dossier)
printf ('<TR><TD class="cell">%s</TD>',$l_line['fr_label']);
printf ('<TD class="mtitle"><A class="mtitle"
printf ('<TD class="mshort"><A class="mtitle"
HREF="impress.php?p_id=%s&action=viewhtml&type=form">Html</A></TD>',
$l_line['fr_id']);
printf ('<TD class="mtitle"><A class="mtitle"
printf ('<TD class="mshort"><A class="mtitle"
HREF="impress.php?p_id=%s&action=viewpdf&type=form">Pdf</A></TD></TR>',
$l_line['fr_id']
);
@ -574,11 +544,11 @@ function ShowMenuJrnUserImp($p_cn,$p_user,$p_dossier)
printf ('<TR><TD class="cell">Poste</TD>');
printf ('<TD class="mtitle"><A class="mtitle"
printf ('<TD class="mshort"><A class="mtitle"
HREF="impress.php?action=viewhtml&type=poste">Html</A></TD>'
);
printf ('<TD class="mtitle"><A class="mtitle"
printf ('<TD class="mshort"><A class="mtitle"
HREF="impress.php?action=viewpdf&type=poste">Pdf</A></TD></TR>'
);

View file

@ -58,6 +58,7 @@ if [ $REPO -eq 0 ]; then
$PSQL < sql/jnt_use_dos.sql
$PSQL < sql/version.sql
$PSQL < sql/priv_user.sql
$PSQL < sql/theme.sql
createdb -E latin1 -O $OWNER templ_account
PSQL="psql -U $OWNER templ_account "
$PSQL < sql/tmp_pcmn.sql
@ -69,7 +70,6 @@ if [ $REPO -eq 0 ]; then
$PSQL < sql/form.sql
$PSQL < sql/fiche.sql
$PSQL < sql/centralized.sql
$PSQL < sql/theme.sql
$PSQL < sql/user_sec.sql
# if [ -w $PG_DATA/pg_hba.conf ]; then
@ -83,7 +83,9 @@ fi
# Installation des sources
export COMPTA_HOME=/home/httpd/compta
[ ! -d $COMPTA_HOME ] && mkdir $COMPTA_HOME
[ ! -d $COMPTA_HOME/html ] && mkdir $COMPTA_HOME/html
[ ! -d $COMPTA_HOME/html/image ] && mkdir $COMPTA_HOME/html/image
[ ! -d $COMPTA_HOME/include ] && mkdir $COMPTA_HOME/include
echo "Installing source"
cp -fr include/*.php $COMPTA_HOME/include
@ -96,6 +98,7 @@ for i in html/*.php ;do
A=`basename $i`
sed "s/echo_debug.*(\"/echo_debug(\"html\/$A:\".__LINE__.'--'.\"/g" $i > $COMPTA_HOME/html/`basename $i`
done
cp -f style.css $COMPTA_HOME/html
cp -f style*.css $COMPTA_HOME/html
cp -f html/*.js $COMPTA_HOME/html
cp -fR addon $COMPTA_HOME/html
cp -fR html/image/* $COMPTA_HOME/html/image

View file

@ -25,8 +25,9 @@ CREATE TABLE centralized (
c_j_id integer ,
c_date date not null,
c_internal text not null,
c_montant integer not null,
c_montant float not null,
c_debit boolean default 't',
c_jrn_def int4 not null references jrn_def(jrn_def_id),
c_poste integer references tmp_pcmn(pcm_val),
c_description text,
c_grp integer not null,

View file

@ -24,3 +24,5 @@ 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);

220
style-aqua.css Normal file
View file

@ -0,0 +1,220 @@
<style type="text/css">
BODY {
bgcolor:#E3F0FF;
}
BODY.defaut {
bgcolor:#E3F0FF;
}
h2.info {
background:blue;
color:white;
font-size:20px;
}
h2.info2 {
color:blue;
font-size:20px;
}
h2.error {
background:blue;
color:white;
color:white;
font-size:20px;
}
h1.title {
color: blue;
font-size:25px;
}
div.mtitle {
position: absolute;
top:15px;
right:300px;
width:100px;
background:#E3F0FF;
}
div.tmenu {
position: absolute;
top:10px;
left:120px;
width:800px;
background-color:#E3F0FF;
}
div.lmenu {
position: absolute;
top:50px;
left:30px;
width:100px;
background-color:#E3F0FF;
}
div.lextmenu {
position: absolute;
top:50px;
font-size:11pt;
left:30px;
width:200px;
background-color:#E3F0FF;
}
div.searchmenu {
font-size:11pt;
left:30px;
width:245px;
background-color:#E3F0FF;
}
div.credit{
border-style:solid;
border-width:1pt;
background-color:#E3F0FF;
}
div.debit{
border-style:solid;
border-width:1pt;
background-color:#E3F0FF;
}
div.redcontent{
position: absolute;
top:40px;
left:250px;
width:600px;
background-color:#E3F0FF;
}
div.ccontent{
position: absolute;
top:40px;
left:130px;
width:680px;
background-color:#E3F0FF;
}
div.rmenu {
position: absolute;
top:50px;
right:30px;
width:100px;
background-color:#E3F0FF;
}
table.mtitle {
border:0;
align:center
}
td.mshort {
text-align:center;
border: 1px solid;
color:#5D90CD ;
}
td.mlltitle {
text-align:center;
background:url('image/freebtn1-ll.gif') no-repeat;
height:30px;
width:30px;
font-size:12px;
}
td.mltitle {
text-align:center;
background:url('image/freebtn1-l.gif') no-repeat;
height:30px;
width:100px;
font-size:12px;
}
td.mtitle {
text-align:center;
background:url('image/freebtn1.gif') no-repeat;
height:30px;
width:110px;
font-size:12px;
}
span.mtitle2 {
background-color:red;
font-size:12px;
border-style:groove
}
span.mtitle {
color:gray;
background-color:blue;
font-size:12px;
border-style:groove
}
tr.odd {
background-color:#DDE6FF;
}
td.odd{
background-color:#DDE6FF ;
border:Opt
}
td.cell{
border-style:solid;
border-width:1pt;
font-size:11pt;
}
a.mtitle:link {
text-decoration:none;
color:black;
}
a.mtitle:visited {
text-decoration:none;
color:black;
}
a.mtitle:active {
text-decoration:none;
background:#0F4CD0;
}
a.mtitle:hover {
color:white;
background-color:#5D90CD;
text-decoration:underline;
}
a.one:link {
text-decoration:underline;
color:#3010FF
}
a.one:visited {
text-decoration:underline;
color:#3010FF
}
a.one:active {
background: #0000FF
}
a.one:hover {
background:#3010FF;
color:#FFFFFF
}
a.two:link {
text-decoration:none;
color:#3010FF
}
a.two:visited {
text-decoration:none;
color:#3010FF
}
a.two:active {
background: #0000FF;
}
a.two:hover {
background:#3010FF;
color:#FFFFFF;
font-size:19px
}
th.doc {
background: #0000C5;
color: #FFFFFF
}
table.doc {
width: 60% ;
ALIGN: "center"
}
</style>

View file

@ -7,6 +7,11 @@ h2.info {
color:blue;
font-size:20px;
}
h2.info2 {
color:blue;
font-size:20px;
}
h2.error {
color:red;
font-size:20px;
@ -26,7 +31,7 @@ div.mtitle {
div.tmenu {
position: absolute;
top:10px;
left:120px;
left:190px;
width:750px;
}
@ -79,6 +84,26 @@ table.mtitle {
border:0;
align:center
}
td.mshort {
color:gray;
background-color:#0F4CD0;
font-size:11pt;
border-style:groove
}
td.mltitle {
color:gray;
background-color:#0F4CD0;
font-size:11pt;
border-style:groove
}
td.mlltitle {
color:gray;
background-color:#0F4CD0;
font-size:11pt;
border-style:groove
}
td.mtitle {
color:gray;
background-color:#0F4CD0;