diff --git a/html/user_pref.php b/html/user_pref.php
index 58b7a5786..38b485d70 100644
--- a/html/user_pref.php
+++ b/html/user_pref.php
@@ -33,17 +33,17 @@ if ( isset ( $_POST['style_user']) ) {
}
// // Met à jour le profil
-// if ( isset ( $_POST['profile_user']) ) {
-// $g_UserProperty['use_usertype']=$_POST['profile_user'];
+if ( isset ( $_POST['profile_user']) ) {
+ $g_UserProperty['use_usertype']=$_POST['profile_user'];
+}
-// }
html_page_start($g_UserProperty['use_theme']);
-// clean session variable from user interface (make prob. with compta interfac)
-//
-if ( isset ($g_jrn) ) {
- session_unregister("g_jrn");
-}
+// // clean session variable from user interface (make prob. with compta interfac)
+// //
+// if ( isset ($g_jrn) ) {
+// session_unregister("g_jrn");
+// }
/* Admin. Dossier */
$rep=DbConnect();
@@ -92,15 +92,6 @@ if ( isset ( $_POST['style_user']) ) {
$g_UserProperty['use_theme']=$_POST['style_user'];
}
-// Met à jour le profil
-// if ( isset ( $_POST['profile_user']) ) {
-// $CnRepo=DbConnect();
-// $Res=ExecSql($CnRepo,
-// "update ac_users set use_usertype='".$_POST['profile_user'].
-// "' where use_login='$g_user'");
-// $g_UserProperty['use_usertype']=$_POST['profile_user'];
-
-// }
?>
Password
@@ -143,32 +134,7 @@ $disp_style.="";
-
-// // charge tous les profiles
-// $aprofile=array("compta","user");
-// $disp_pro="";
-?>
-
+
// Si utilise un dossier alors propose de changer
diff --git a/include/class_fiche.php b/include/class_fiche.php
index e636a624a..102007e06 100644
--- a/include/class_fiche.php
+++ b/include/class_fiche.php
@@ -1,4 +1,24 @@
+/*
+ * This file is part of PhpCompta.
+ *
+ * PhpCompta is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * PhpCompta is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with PhpCompta; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+*/
+/* $Revision$ */
+// Copyright Author Dany De Bontridder ddebontridder@yahoo.fr
+
class fiche {
var $cn;// database connection
var $a_attribut; // array of attribut
@@ -7,9 +27,18 @@ class fiche {
function fiche($p_cn,$p_id=0) {
$this->cn=$p_cn;
$this->id=$p_id;
+ $this->ad_id[0]='undefined';
+ $this->jft_id[0]='undefined';
+ $this->fd_id[0]='undefined';
+ $this->description[0]='undefined';
+ $this->libelle[0]='undefined';
+
}
function getAttribut() {
+ if ( $p_id == 0){
+ return;
+ }
$sql="select *
from jnt_fic_att_value
natural join fiche
@@ -17,7 +46,7 @@ class fiche {
join attr_def where f_id=".$this->id;
$Ret=ExecSql($this->cn,$sql);
if ( ($Max=pg_NumRows($Ret)) == 0 )
- return null;
+ return ;
for ($i=0;$i<$Max;$i++) {
$row=pg_fetch_array($Ret,$i);
$this->ad_id[$i]=$row['ad_id'];