for different profile, it is added for the user profile
This commit is contained in:
parent
40caf68bd4
commit
7d01acb15b
8 changed files with 496 additions and 0 deletions
106
html/compta_login.php
Normal file
106
html/compta_login.php
Normal file
|
|
@ -0,0 +1,106 @@
|
|||
<?
|
||||
/*
|
||||
* This file is part of WCOMPTA.
|
||||
*
|
||||
* WCOMPTA 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.
|
||||
*
|
||||
* WCOMPTA 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 WCOMPTA; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
// Auteur Dany De Bontridder ddebontridder@yahoo.fr
|
||||
// $Revision$
|
||||
include_once ("ac_common.php");
|
||||
|
||||
|
||||
|
||||
/* $Revision$ */
|
||||
|
||||
include ("postgres.php");
|
||||
include_once("debug.php");
|
||||
|
||||
html_page_start($g_UserProperty['use_theme']);
|
||||
|
||||
if ( isset ($db_page) ) {
|
||||
echo_debug("db_page is set ".$db_page);
|
||||
} else
|
||||
{
|
||||
echo_debug("db_page is NOT set");
|
||||
$db_page=0;
|
||||
|
||||
}
|
||||
|
||||
|
||||
include("top_menu_compta.php");
|
||||
// Show the first menu
|
||||
ShowMenu($g_UserProperty['use_admin']);
|
||||
if ( $g_UserProperty['use_admin'] != 0 || $g_user=='webcompta' ) {
|
||||
/* Administrator */
|
||||
$l_MaxLine=0;
|
||||
$r_database=ShowDossier('all',$db_page,$db_page+15,&$l_MaxLine);
|
||||
$action="Encoder";
|
||||
$priv="Administrateur";
|
||||
} else {
|
||||
/* User */
|
||||
$l_MaxLine=0;
|
||||
$r_database=ShowDossier('lim',$db_page,$db_page+15,&$l_MaxLine);
|
||||
$priv="Utilisateur";
|
||||
}
|
||||
|
||||
echo '<H1 class="title"> Dossier </H1>';
|
||||
echo "<TABLE>";
|
||||
|
||||
if ( $r_database != null ) {
|
||||
$row=0;
|
||||
foreach ( $r_database as $l_db ) {
|
||||
$row++;
|
||||
if ( $l_db['priv_priv'] == "W") {
|
||||
$action="Encoder";
|
||||
} else {
|
||||
$action="Lire";
|
||||
}
|
||||
|
||||
if ( $row %2 == 0 ) {
|
||||
$tr='<TR class="odd">';
|
||||
$td='<TD class="odd">';
|
||||
} else {
|
||||
$tr='<TR class="even">';
|
||||
$td='<TD class="even">';
|
||||
}
|
||||
printf("%s $td <B> %s</B></TD> $td %s</TD> <td style=\"border-width:1pt;border-style:solid\";> %s</TD> <TD class=\"mtitle\"> <A class=\"mtitle\" HREF=\"compta.php?dos=%d\">%s</A></TD></TR>",
|
||||
$tr,
|
||||
$l_db['dos_name'],
|
||||
$l_db['dos_description'],
|
||||
$priv,
|
||||
$l_db['dos_id'],
|
||||
$action);
|
||||
|
||||
|
||||
}
|
||||
|
||||
echo "</TABLE>";
|
||||
$db_debut=15+$db_page;
|
||||
if ($db_debut < $l_MaxLine) {
|
||||
printf ("<A HREF=\"login.php?db_page=%d\">Suivant</A>",$db_debut);
|
||||
}
|
||||
if ( $db_page !=0 ) {
|
||||
$db_debut=$db_page-15;
|
||||
printf ("<A HREF=\"login.php?db_page=%d\">Précédent</A>",$db_debut);
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
|
||||
|
||||
<?
|
||||
|
||||
html_page_stop();
|
||||
?>
|
||||
31
html/index.php
Normal file
31
html/index.php
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
<?
|
||||
echo '<!DOCTYPE HTML PUBLIC "-//W3C/DTD HTML 3.2 FINAL//EN">
|
||||
<HTML>
|
||||
<TITLE> Gnu Accountancy</TITLE>
|
||||
<BODY BGCOLOR="white">
|
||||
<BR><BR><BR><BR><BR>
|
||||
<center>
|
||||
<IMG SRC="image/logo7.jpg" alt="Logo">
|
||||
<BR>
|
||||
<form action=login.php method=post>
|
||||
<TABLE BGCOLOR="#4851FF"><TR><TD>
|
||||
<TABLE Bgcolor="#4851FF" BORDER=0 CELLSPACING=0>
|
||||
<TR>
|
||||
<TD><FONT COLOR="white"> LOGIN</FONT> </TD>
|
||||
<TD><input type=text name=p_user></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD><FONT color="white"> PASSWORD</FONT></TD>
|
||||
<TD><INPUT TYPE=PASSWORD NAME=p_pass></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD COLSPAN=2 ALIGN=CENTER><INPUT TYPE=SUBMIT value="Log in"></TD>
|
||||
</TR>
|
||||
</table>
|
||||
</TD></TR></TABLE>
|
||||
</form>
|
||||
</Center>
|
||||
</body>
|
||||
</html>';
|
||||
|
||||
?>
|
||||
63
html/user_achat.php
Normal file
63
html/user_achat.php
Normal file
|
|
@ -0,0 +1,63 @@
|
|||
<?
|
||||
/*
|
||||
* This file is part of WCOMPTA.
|
||||
*
|
||||
* WCOMPTA 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.
|
||||
*
|
||||
* WCOMPTA 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 WCOMPTA; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
// Auteur Dany De Bontridder ddebontridder@yahoo.fr
|
||||
/* $Revision$ */
|
||||
include_once("ac_common.php");
|
||||
include("top_menu_compta.php");
|
||||
include_once ("constant.php");
|
||||
|
||||
html_page_start($g_UserProperty['use_theme']);
|
||||
if ( ! isset ( $g_dossier ) ) {
|
||||
echo "You must choose a Dossier ";
|
||||
exit -2;
|
||||
}
|
||||
include_once ("postgres.php");
|
||||
include_once ("check_priv.php");
|
||||
/* Admin. Dossier */
|
||||
CheckUser();
|
||||
if ( isset( $p_jrn )) {
|
||||
session_register("g_jrn");
|
||||
$g_jrn=$p_jrn;
|
||||
}
|
||||
$l_Db=sprintf("dossier%d",$g_dossier);
|
||||
$cn=DbConnect($l_Db);
|
||||
|
||||
ShowMenuCompta($g_dossier,$g_UserProperty);
|
||||
ShowMenuComptaRight($g_dossier,$g_UserProperty);
|
||||
if ( $g_UserProperty['use_admin'] == 0 ) {
|
||||
$r=CheckAction($g_dossier,$g_user,ENCJRN);
|
||||
if ($r == 0 ){
|
||||
/* Cannot Access */
|
||||
NoAccess();
|
||||
}
|
||||
if ( isset ($g_jrn)) {
|
||||
$right=CheckJrn($g_dossier,$g_user,$g_jrn);
|
||||
if ($right == 0 ){
|
||||
/* Cannot Access */
|
||||
NoAccess();
|
||||
exit -1;
|
||||
}
|
||||
} // if isset g_jrn
|
||||
|
||||
}
|
||||
|
||||
ShowMenuJrnUser($g_dossier,$g_UserProperty,ACH,$g_jrn);
|
||||
|
||||
html_page_stop();
|
||||
?>
|
||||
65
html/user_banque.php
Normal file
65
html/user_banque.php
Normal file
|
|
@ -0,0 +1,65 @@
|
|||
<?
|
||||
/*
|
||||
* This file is part of WCOMPTA.
|
||||
*
|
||||
* WCOMPTA 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.
|
||||
*
|
||||
* WCOMPTA 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 WCOMPTA; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
// Auteur Dany De Bontridder ddebontridder@yahoo.fr
|
||||
/* $Revision$ */
|
||||
include_once("ac_common.php");
|
||||
include("top_menu_compta.php");
|
||||
include_once ("constant.php");
|
||||
|
||||
html_page_start($g_UserProperty['use_theme']);
|
||||
if ( ! isset ( $g_dossier ) ) {
|
||||
echo "You must choose a Dossier ";
|
||||
exit -2;
|
||||
}
|
||||
include_once ("postgres.php");
|
||||
include_once ("check_priv.php");
|
||||
/* Admin. Dossier */
|
||||
CheckUser();
|
||||
if ( isset( $p_jrn )) {
|
||||
session_register("g_jrn");
|
||||
$g_jrn=$p_jrn;
|
||||
} else {
|
||||
$g_jrn=-1;
|
||||
}
|
||||
$l_Db=sprintf("dossier%d",$g_dossier);
|
||||
$cn=DbConnect($l_Db);
|
||||
|
||||
ShowMenuCompta($g_dossier,$g_UserProperty);
|
||||
ShowMenuComptaRight($g_dossier,$g_UserProperty);
|
||||
if ( $g_UserProperty['use_admin'] == 0 ) {
|
||||
$r=CheckAction($g_dossier,$g_user,ENCJRN);
|
||||
if ($r == 0 ){
|
||||
/* Cannot Access */
|
||||
NoAccess();
|
||||
}
|
||||
if ( isset ($g_jrn)) {
|
||||
$right=CheckJrn($g_dossier,$g_user,$g_jrn);
|
||||
if ($right == 0 ){
|
||||
/* Cannot Access */
|
||||
NoAccess();
|
||||
exit -1;
|
||||
}
|
||||
} // if isset g_jrn
|
||||
|
||||
}
|
||||
|
||||
ShowMenuJrnUser($g_dossier,$g_UserProperty,BQE,$g_jrn);
|
||||
|
||||
html_page_stop();
|
||||
?>
|
||||
63
html/user_compta.php
Normal file
63
html/user_compta.php
Normal file
|
|
@ -0,0 +1,63 @@
|
|||
<?
|
||||
/*
|
||||
* This file is part of WCOMPTA.
|
||||
*
|
||||
* WCOMPTA 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.
|
||||
*
|
||||
* WCOMPTA 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 WCOMPTA; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
// Auteur Dany De Bontridder ddebontridder@yahoo.fr
|
||||
include_once ("ac_common.php");
|
||||
/* $Revision$ */
|
||||
|
||||
html_page_start($g_UserProperty['use_theme']);
|
||||
|
||||
if ( isset ( $dos ) ) {
|
||||
$g_dossier=$dos;
|
||||
session_register("g_dossier");
|
||||
echo_debug("admin_dossier = $g_dossier ");
|
||||
$g_name=GetDossierName($g_dossier);
|
||||
session_register("g_name");
|
||||
|
||||
} else {
|
||||
echo "You must choose a Dossier ";
|
||||
exit -2;
|
||||
}
|
||||
include_once ("postgres.php");
|
||||
echo_debug ("user is $g_user");
|
||||
/* CheckUser */
|
||||
CheckUser();
|
||||
|
||||
// Synchronize rights
|
||||
SyncRight($g_dossier,$g_user);
|
||||
|
||||
// Get The priv on the selected folder
|
||||
if ( $g_UserProperty['use_admin'] == 0 ) {
|
||||
|
||||
$r=GetPriv($g_dossier,$g_user);
|
||||
if ($r == 0 ){
|
||||
/* Cannot Access */
|
||||
NoAccess();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
include_once ("user_menu.php");
|
||||
include_once ("top_menu_compta.php");
|
||||
ShowMenuCompta($g_dossier,$g_UserProperty);
|
||||
ShowMenuComptaRight($g_dossier,$g_UserProperty);
|
||||
html_page_stop();
|
||||
|
||||
?>
|
||||
65
html/user_facture.php
Normal file
65
html/user_facture.php
Normal file
|
|
@ -0,0 +1,65 @@
|
|||
<?
|
||||
/*
|
||||
* This file is part of WCOMPTA.
|
||||
*
|
||||
* WCOMPTA 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.
|
||||
*
|
||||
* WCOMPTA 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 WCOMPTA; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
// Auteur Dany De Bontridder ddebontridder@yahoo.fr
|
||||
/* $Revision$ */
|
||||
include_once("ac_common.php");
|
||||
include("top_menu_compta.php");
|
||||
include_once ("constant.php");
|
||||
|
||||
html_page_start($g_UserProperty['use_theme']);
|
||||
if ( ! isset ( $g_dossier ) ) {
|
||||
echo "You must choose a Dossier ";
|
||||
exit -2;
|
||||
}
|
||||
include_once ("postgres.php");
|
||||
include_once ("check_priv.php");
|
||||
/* Admin. Dossier */
|
||||
CheckUser();
|
||||
if ( isset( $p_jrn )) {
|
||||
session_register("g_jrn");
|
||||
$g_jrn=$p_jrn;
|
||||
} else {
|
||||
$g_jrn=-1;
|
||||
}
|
||||
$l_Db=sprintf("dossier%d",$g_dossier);
|
||||
$cn=DbConnect($l_Db);
|
||||
|
||||
ShowMenuCompta($g_dossier,$g_UserProperty);
|
||||
ShowMenuComptaRight($g_dossier,$g_UserProperty);
|
||||
if ( $g_UserProperty['use_admin'] == 0 ) {
|
||||
$r=CheckAction($g_dossier,$g_user,ENCJRN);
|
||||
if ($r == 0 ){
|
||||
/* Cannot Access */
|
||||
NoAccess();
|
||||
}
|
||||
if ( isset ($g_jrn)) {
|
||||
$right=CheckJrn($g_dossier,$g_user,$g_jrn);
|
||||
if ($right == 0 ){
|
||||
/* Cannot Access */
|
||||
NoAccess();
|
||||
exit -1;
|
||||
}
|
||||
} // if isset g_jrn
|
||||
|
||||
}
|
||||
|
||||
ShowMenuJrnUser($g_dossier,$g_UserProperty,VEN,$g_jrn);
|
||||
|
||||
html_page_stop();
|
||||
?>
|
||||
40
html/user_login.php
Normal file
40
html/user_login.php
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
<?
|
||||
/*
|
||||
* This file is part of WCOMPTA.
|
||||
*
|
||||
* WCOMPTA 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.
|
||||
*
|
||||
* WCOMPTA 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 WCOMPTA; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
// Auteur Dany De Bontridder ddebontridder@yahoo.fr
|
||||
// $Revision$
|
||||
include_once ("ac_common.php");
|
||||
include_once("postgres.php");
|
||||
CheckUser();
|
||||
html_page_start($g_UserProperty['use_theme']);
|
||||
include_once("user_menu.php");
|
||||
u_ShowMenu($g_UserProperty['use_admin']);
|
||||
|
||||
|
||||
$priv=($g_UserProperty['use_admin']==1)?"Administrator":"User";
|
||||
|
||||
echo '<H2 class="info"> Welcome '.$g_UserProperty['use_first_name'].' '.
|
||||
$g_UserProperty['use_name'].', your are an '. $priv.' Please Select your folder</H2>';
|
||||
// Show default menu (preference,...)
|
||||
|
||||
// If admin show everything otherwise only the available dossier
|
||||
$res=u_ShowDossier($g_user,$g_UserProperty['use_admin']);
|
||||
echo $res;
|
||||
|
||||
html_page_stop();
|
||||
?>
|
||||
63
html/user_od.php
Normal file
63
html/user_od.php
Normal file
|
|
@ -0,0 +1,63 @@
|
|||
<?
|
||||
/*
|
||||
* This file is part of WCOMPTA.
|
||||
*
|
||||
* WCOMPTA 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.
|
||||
*
|
||||
* WCOMPTA 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 WCOMPTA; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
// Auteur Dany De Bontridder ddebontridder@yahoo.fr
|
||||
/* $Revision$ */
|
||||
include_once("ac_common.php");
|
||||
include("top_menu_compta.php");
|
||||
include_once ("constant.php");
|
||||
|
||||
html_page_start($g_UserProperty['use_theme']);
|
||||
if ( ! isset ( $g_dossier ) ) {
|
||||
echo "You must choose a Dossier ";
|
||||
exit -2;
|
||||
}
|
||||
include_once ("postgres.php");
|
||||
include_once ("check_priv.php");
|
||||
/* Admin. Dossier */
|
||||
CheckUser();
|
||||
if ( isset( $p_jrn )) {
|
||||
session_register("g_jrn");
|
||||
$g_jrn=$p_jrn;
|
||||
}
|
||||
$l_Db=sprintf("dossier%d",$g_dossier);
|
||||
$cn=DbConnect($l_Db);
|
||||
|
||||
ShowMenuCompta($g_dossier,$g_UserProperty);
|
||||
ShowMenuComptaRight($g_dossier,$g_UserProperty);
|
||||
if ( $g_UserProperty['use_admin'] == 0 ) {
|
||||
$r=CheckAction($g_dossier,$g_user,ENCJRN);
|
||||
if ($r == 0 ){
|
||||
/* Cannot Access */
|
||||
NoAccess();
|
||||
}
|
||||
if ( isset ($g_jrn)) {
|
||||
$right=CheckJrn($g_dossier,$g_user,$g_jrn);
|
||||
if ($right == 0 ){
|
||||
/* Cannot Access */
|
||||
NoAccess();
|
||||
exit -1;
|
||||
}
|
||||
} // if isset g_jrn
|
||||
|
||||
}
|
||||
|
||||
ShowMenuJrnUser($g_dossier,$g_UserProperty,ODS,$g_jrn);
|
||||
|
||||
html_page_stop();
|
||||
?>
|
||||
Loading…
Add table
Add a link
Reference in a new issue