diff --git a/include/ac_common.php b/include/ac_common.php index 5036b3aa0..f7c5673f1 100644 --- a/include/ac_common.php +++ b/include/ac_common.php @@ -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 ''; - echo ""; - echo " - Gnu Accountancy - - - "; - echo ""; + 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 ''; + echo ""; + echo " + Gnu Accountancy + + + "; + echo ""; } /* function html_page_stop() * Purpose : diff --git a/include/class_jrn.php b/include/class_jrn.php index 85c5157c1..93caf8b50 100644 --- a/include/class_jrn.php +++ b/include/class_jrn.php @@ -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 ". diff --git a/include/user_menu.php b/include/user_menu.php index 077ca5a38..8c55cc2e8 100644 --- a/include/user_menu.php +++ b/include/user_menu.php @@ -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,''.$access_key.'',$action['ja_name'],1); + $lib=str_replace($access_key,''.$access_key.'',$action['ja_name']); + $ret.=sprintf('%s', $access_key, $action['ja_desc'], $action['ja_url'],$action['ja_action'],