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

facturation.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 // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr
00020 /* $Revision$ */
00025 include ("ac_common.php");
00026 include ("check_priv.php");
00027 include_once ("class_user.php");
00028 include_once ("postgres.php");
00029 include ("user_menu.php");
00030 include_once("class_invoice.php");
00031 if ( isset ($_REQUEST['dos'])) 
00032 {
00033   $_SESSION["g_dossier"]=$_REQUEST['dos'];
00034 }
00035 $g_dossier=(isset ($_SESSION['g_dossier']))?$_SESSION['g_dossier']:-1;
00036 
00037 // List of customer select * from fiche_def where frd_id=9;
00038 if (  $g_dossier==-1  ) {
00039   echo "You must choose a Dossier ";
00040   exit -2;
00041 }
00042 // Check user
00043 $rep=DbConnect($g_dossier);
00044 $User=new cl_user($rep);
00045 $User->Check();
00046 
00047 // Save Folder's name
00048 $g_name=GetDossierName($g_dossier);
00049 $_SESSION["g_name"]=$g_name;
00050 
00051 
00052 if ( $User->CheckAction($g_dossier,FACT) == 0 ){
00053     /* Cannot Access */
00054      NoAccess();
00055      exit -1;
00056 }
00058 // update preference
00060 if ( isset ( $_POST['style_user']) ) {
00061   $User->update_global_pref('THEME',$_POST['style_user']);
00062   $_SESSION['g_theme']=$_POST['style_user'];
00063   $User->theme=$_POST['style_user'];
00064 }
00065 // Met a jour le pagesize
00066 if ( isset ( $_POST['p_size']) ) {
00067   $User->update_global_pref('PAGESIZE',$_POST['p_size']);
00068   $_SESSION['g_pagesize']=$_POST['p_size'];
00069   
00070 }
00071 
00073 html_page_start($User->theme);
00074 
00075 $cn=DbConnect($g_dossier);
00076 
00077 echo "<H2 class=\"info\"> Facturation ".$_SESSION['g_name']." </H2>";
00078 
00079 // Show Menu
00080 echo ShowItem(array(                      
00081                array('?p_action=create_invoice&dos='.$g_dossier,'Nouvelle'),
00082                array('?p_action=view_invoice&dos='.$g_dossier,'Voir'),
00083                array('?p_action=pref','Préférence'),
00084                array('parametre.php?p_action=invoice&dos='.$g_dossier,'Paramètre'),
00085                array('login.php','Accueil',"Accueil"),
00086                array('logout.php','logout',"Sortie")
00087                ),
00088          'H',"mtitle","mtitle");
00090 // Action requested
00091 //
00093 if ( isset ($_REQUEST["p_action"] ))  {
00094   $action=$_REQUEST["p_action"];
00096   // p_action == pref
00098   if ( $action == "pref" ) 
00099     {
00100       require_once("pref.inc.php");
00101     }
00102 
00104   // See All invoices
00105   if ($action == "create_invoice" ) {
00106   }
00108   // See only unpaid invoices
00109   if ($action=="view_invoice") {
00110   }
00112   // Create an invoice
00113 
00114 }//get action
00115 
00116 html_page_stop();
00117 
00118 ?>

Generated on Fri Jun 23 00:12:45 2006 for phpcompta by  doxygen 1.4.4