diff --git a/AUTHORS b/AUTHORS
index 20a8b81a8..5043b4e39 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -1 +1,2 @@
Dany De Bontridder dany.debontridder@yahoo.fr
+Stan Pinte stanpinte@sauvages.be
diff --git a/html/jrn_detail.php b/html/jrn_detail.php
index b363b6648..0510219a8 100644
--- a/html/jrn_detail.php
+++ b/html/jrn_detail.php
@@ -110,13 +110,7 @@ $Res=ExecSql($cn,"select jrn_def_name,jrn_def_class_deb,jrn_def_class_cred,".
" from jrn_def where".
" jrn_def_id=".$_SESSION['g_jrn']);
$l_line=pg_fetch_array($Res,0);
-if ( isset ($_GET["PHPSESSID"] ) ) {
- $sessid=$_GET["PHPSESSID"];
-}
-if ( isset ($_POST["PHPSESSID"] ) ) {
- $sessid=$_POST["PHPSESSID"];
-}
-
+$sessid = $_REQUEST['PHPSESSID'];
$search='";
echo '
';
echo '
Fiches
';
diff --git a/html/priv_user.php b/html/priv_user.php
index 750d551a3..1fc83fee8 100644
--- a/html/priv_user.php
+++ b/html/priv_user.php
@@ -75,12 +75,13 @@ if ( isset ( $reset_passwd) ){
$Res=ExecSql($cn, "update ac_users set use_pass='$l_pass' where use_id=$uid");
echo ' Password remis à phpcompta
';
}
-if ( isset ($SAVE) ){
+if ( isset ($_POST['SAVE']) ){
+ $uid = $_POST['UID'];
echo_debug(__FILE__,__LINE__,"SAVE is set");
// Update User
$cn=DbConnect();
- $Sql="update ac_users set use_first_name='".$fname."', use_name='".$lname."'
- ,use_login='".$login."',use_active=".$Actif.",use_admin=".$Admin." where
+ $Sql="update ac_users set use_first_name='".$_POST['fname']."', use_name='".$_POST['lname']."'
+ ,use_login='".$_POST['login']."',use_active=".$_POST['Actif'].",use_admin=".$_POST['Admin']." where
use_id=".$uid;
$Res=ExecSql($cn,$Sql);
// Update Priv on Folder
@@ -218,7 +219,7 @@ foreach ( $Dossier as $rDossier) {
|
|
- |
+ |
diff --git a/html/sec_pdf.php b/html/sec_pdf.php
new file mode 100755
index 000000000..46f47b711
--- /dev/null
+++ b/html/sec_pdf.php
@@ -0,0 +1,40 @@
+
+
+/*
+ * 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
+*/
+// Copyright Stanislas Pinte stanpinte@sauvages.be
+// $Revision$
+
+if ( ! isset($_SESSION['g_dossier']) ) {
+ echo "INVALID G_DOSSIER UNKNOWN !!! ";
+ exit();
+}
+include_once("ac_common.php");
+include_once("postgres.php");
+include_once("class.ezpdf.php");
+
+echo_debug(__FILE__,__LINE__,"imp pdf securité");
+$cn=DbConnect($_SESSION['g_dossier']);
+
+$pdf=& new Cezpdf("A4");
+$pdf->selectFont('./addon/fonts/Helvetica.afm');
+
+$pdf->ezText("hello",12,array('justification'=>'right'));
+$pdf->ezStream();
+
+?>
diff --git a/html/user_jrn.php b/html/user_jrn.php
index d50e79ef9..0efabfff9 100644
--- a/html/user_jrn.php
+++ b/html/user_jrn.php
@@ -105,6 +105,11 @@ if ( isset ($_GET['JRN_TYPE'] ) ) {
echo '';
}
+if ( $jrn_type=='FIN' )
+{
+ //show balance of all bank accounts. Let's say their ID start with 5500
+}
+
// if a journal is selected show the journal's menu
if ( $_SESSION['g_jrn'] != -1 ) {
$result=ShowJrn( "user_jrn.php?JRN_TYPE=".$jrn_type);
diff --git a/include/user_action_fin.php b/include/user_action_fin.php
index d9e601702..329a53d01 100644
--- a/include/user_action_fin.php
+++ b/include/user_action_fin.php
@@ -25,11 +25,8 @@ include_once("class_widget.php");
// phpinfo();
$cn=DbConnect($_SESSION['g_dossier']);
-if ( ! isset ($_GET['action']) && ! isset ($_POST["action"]) ) {
- // echo u_ShowMenuJrn($cn,$jrn_type);
- exit;
-
- return;
+if ( ! isset ($_GET['action']) && ! isset ($_POST["action"]) ) {
+ return;
}
include_once ("preference.php");
include_once ("user_common.php");
diff --git a/scripts/add-db.sh b/scripts/add-db.sh
index 656b11968..477a1f297 100755
--- a/scripts/add-db.sh
+++ b/scripts/add-db.sh
@@ -1,7 +1,11 @@
NR_DOSSIER=$1
BACKUP_FILE=$2
+USER_NAME=$3
dropdb -h localhost -U phpcompta dossier$NR_DOSSIER
createdb -h localhost -U phpcompta dossier$NR_DOSSIER
psql -h localhost -U phpcompta dossier$NR_DOSSIER -f $BACKUP_FILE
-psql -h localhost -U phpcompta --command "INSERT INTO ac_users (use_login, use_active, use_pass, use_admin, use_usertype) VALUES ('stan', 1, md5('plogastel'), 1, 'user')" account_repository
+psql -h localhost -U phpcompta -f html/admin/sql/patch/upgrade4.sql dossier$NR_DOSSIER
+psql -h localhost -U phpcompta --command "INSERT INTO ac_users (use_login, use_active, use_pass, use_admin, use_usertype) VALUES ('$USER_NAME', 1, md5('plogastel'), 1, 'user')" account_repository
psql -h localhost -U phpcompta --command "INSERT INTO ac_dossier (dos_id, dos_name, dos_description) VALUES ($NR_DOSSIER, 'Sauvages', 'Comptabilité Sauvages SPRL')" account_repository
+psql -h localhost -U phpcompta --command "INSERT INTO jnt_use_dos (use_id, dos_id) SELECT use_id,$NR_DOSSIER from ac_users WHERE use_login='$USER_NAME'" account_repository
+