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

show_fiche.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 /* $Revision: 1.3 $ */
00020 
00021 // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr
00022 
00031 require_once ('class_user.php');
00032 require_once ('class_fiche.php');
00033 require_once ('postgres.php');
00034 require_once ('debug.php');
00035 require_once ('ac_common.php');
00036 require_once('class_widget.php');
00037 
00038 $User=new cl_user(DbConnect());
00039 $User->Check();
00040 html_page_start($_SESSION['g_theme'],"onLoad='window.focus();'");
00041 
00042 
00043 if ( ! isset ($_REQUEST['q'])) {
00044   echo 'appel invalide';
00045   exit();
00046 }
00047 // connect to the database
00048 $cn=DbConnect($_SESSION['g_dossier']);
00049 if ( $User->CheckAction($cn,FICHE_READ) == 0 ){
00050     /* Cannot Access */
00051     echo '<h2 class="error"> Vous n\' avez pas accès</h2>';
00052     return;
00053 }
00054 
00055 // Create a object fiche
00056 
00057 $f=new fiche($cn);
00058 $f->GetByQCode($_REQUEST['q'],false);
00059 
00060 echo $f->Display(true);
00061 ?>