Main Page | Namespace List | Class Hierarchy | Data Structures | Directories | File List | Data Fields | Globals | Related Pages

user_compta.php

Go to the documentation of this file.
00001 <?
00002 /*
00003  *   This file is part of PHPCOMPTA
00004  *
00005  *   PhpCompta is free software; you can redistribute it and/or modify
00006  *   it under the terms of the GNU General Public License as published by
00007  *   the Free Software Foundation; either version 2 of the License, or
00008  *   (at your option) any later version.
00009  *
00010  *   PhpCompta is distributed in the hope that it will be useful,
00011  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013  *   GNU General Public License for more details.
00014  *
00015  *   You should have received a copy of the GNU General Public License
00016  *   along with PHPCOMPTA; if not, write to the Free Software
00017  *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00018 */
00019 // Auteur Dany De Bontridder ddebontridder@yahoo.fr
00020 include_once ("ac_common.php");
00021 /* $Revision: 1.11 $ */
00022 include_once ("class_user.php");
00023 include_once ("postgres.php");
00028 $rep=DbConnect();
00029 
00030 $User=new cl_user($rep);
00031 $User->Check();
00032 
00033 html_page_start($User->theme);
00034 
00035 if ( isset ( $_GET['dos'] ) ) {
00036   $g_dossier=$_GET['dos'];
00037   $_SESSION[ "g_dossier"]=$g_dossier;
00038   echo_debug('user_compta.php',__LINE__,"admin_dossier = $g_dossier ");
00039   $g_name=GetDossierName($g_dossier);
00040   $_SESSION["g_name"]=$g_name;
00041 
00042 } else {
00043   echo "You must choose a Dossier ";
00044   exit -2;
00045 }
00046 echo_debug('user_compta.php',__LINE__,"user is ".$_SESSION['g_user']);
00047 
00048 // Synchronize rights
00049 SyncRight($_SESSION['g_dossier'],$_SESSION['g_user']);
00050 
00051 // Get The priv on the selected folder
00052 if ( $User->admin == 0 ) {
00053   
00054   $r=GetPriv($_SESSION['g_dossier'],$_SESSION['g_user']);
00055   if ($r == 0 ){
00056     /* Cannot Access */
00057     NoAccess();
00058   }
00059 }
00060 
00061 
00062 
00063 
00064 include_once ("user_menu.php");
00065 echo '<div class="u_tmenu">';
00066 
00067 echo ShowMenuCompta($g_dossier);
00068 echo '</div>';
00069 html_page_stop();
00070 
00071 ?>