Yannick Improve html_page_start
Fix prob with GetRow
This commit is contained in:
parent
bd6e1b6c8a
commit
95bdbfdcc9
3 changed files with 25 additions and 20 deletions
|
|
@ -134,26 +134,30 @@ function formatDate($p_date) {
|
|||
* return:
|
||||
* none
|
||||
*/
|
||||
function html_page_start($p_theme,$p_script="")
|
||||
function html_page_start($p_theme="",$p_script="")
|
||||
{
|
||||
include_once ("postgres.php");
|
||||
$cn=DbConnect();
|
||||
$bg='bgcolor="#EDF3FF"';
|
||||
$Res=ExecSql($cn,"select the_filestyle from theme
|
||||
ini_set('magic_quotes_gpc','Off');
|
||||
ini_set('session.use_trans_sid',1);
|
||||
$cn=DbConnect();
|
||||
if ( $p_theme != "") {
|
||||
$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'];
|
||||
}
|
||||
echo '<!DOCTYPE HTML PUBLIC "-//W3C/DTD HTML 3.2 FINAL//EN">';
|
||||
echo "<HTML>";
|
||||
echo "<HEAD>
|
||||
<TITLE> Gnu Accountancy</TITLE>
|
||||
<META http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\">
|
||||
<LINK REL=\"stylesheet\" type=\"text/css\" href=\"$style\">
|
||||
</HEAD>";
|
||||
echo "<BODY $bg $p_script>";
|
||||
if (pg_NumRows($Res)==0) $style="style.css";
|
||||
else {
|
||||
$s=pg_fetch_array($Res,0);
|
||||
$style=$s['the_filestyle'];
|
||||
} else {
|
||||
$style="style.css";
|
||||
} // end if
|
||||
echo '<!DOCTYPE HTML PUBLIC "-//W3C/DTD HTML 3.2 FINAL//EN">';
|
||||
echo "<HTML>";
|
||||
echo "<HEAD>
|
||||
<TITLE> Gnu Accountancy</TITLE>
|
||||
<META http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\">
|
||||
<LINK REL=\"stylesheet\" type=\"text/css\" href=\"$style\">
|
||||
</HEAD>";
|
||||
echo "<BODY $p_script>";
|
||||
}
|
||||
/* function html_page_stop()
|
||||
* Purpose :
|
||||
|
|
|
|||
|
|
@ -81,7 +81,7 @@ class jrn {
|
|||
case j_debit when 't' then j_montant::text else ' ' end as deb_montant,
|
||||
case j_debit when 'f' then j_montant::text else ' ' end as cred_montant,
|
||||
j_debit as debit,j_poste as poste,jr_montant , ".
|
||||
"pcm_lib as description,j_grpt as grp,jr_comment||' ('||c_internal||')' as jr_comment ,
|
||||
"pcm_lib as description,j_grpt as grp,jr_comment||' ('||jr_internal||')' as jr_comment ,
|
||||
jr_rapt as oc, j_tech_per as periode from jrnx left join jrn on ".
|
||||
"jr_grpt_id=j_grpt ".
|
||||
" left join tmp_pcmn on pcm_val=j_poste ".
|
||||
|
|
@ -124,7 +124,7 @@ class jrn {
|
|||
case j_debit when 'f' then j_montant::text else ' ' end as cred_montant,
|
||||
j_debit as debit,j_poste as poste,".
|
||||
"pcm_lib as description,j_grpt as grp,
|
||||
jr_comment||' ('||c_internal||')' as jr_comment,
|
||||
jr_comment||' ('||jr_internal||')' as jr_comment,
|
||||
jr_montant,
|
||||
jr_rapt as oc, j_tech_per as periode from jrnx left join jrn on ".
|
||||
"jr_grpt_id=j_grpt left join tmp_pcmn on pcm_val=j_poste where ".
|
||||
|
|
|
|||
|
|
@ -319,7 +319,8 @@ function u_ShowMenuJrn($p_cn,$p_jrn_type)
|
|||
for ($i=0;$i<$num;$i++) {
|
||||
$action=pg_fetch_array($Res,$i);
|
||||
$access_key=get_quick_key($action['ja_name'],$access_key_list);
|
||||
$lib=str_replace($access_key,'<u>'.$access_key.'</u>',$action['ja_name'],1);
|
||||
$lib=str_replace($access_key,'<u>'.$access_key.'</u>',$action['ja_name']);
|
||||
|
||||
$ret.=sprintf('<TR><TD class="cell"><A class="mtitle" accesskey="%s" title="%s" '.
|
||||
'HREF="%s?%s">%s</A></td></tR>',
|
||||
$access_key, $action['ja_desc'], $action['ja_url'],$action['ja_action'],
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue