00001 <?
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
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
00038 if ( $g_dossier==-1 ) {
00039 echo "You must choose a Dossier ";
00040 exit -2;
00041 }
00042
00043 $rep=DbConnect($g_dossier);
00044 $User=new cl_user($rep);
00045 $User->Check();
00046
00047
00048 $g_name=GetDossierName($g_dossier);
00049 $_SESSION["g_name"]=$g_name;
00050
00051
00052 if ( $User->CheckAction($g_dossier,FACT) == 0 ){
00053
00054 NoAccess();
00055 exit -1;
00056 }
00058
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
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
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
00091
00093 if ( isset ($_REQUEST["p_action"] )) {
00094 $action=$_REQUEST["p_action"];
00096
00098 if ( $action == "pref" )
00099 {
00100 require_once("pref.inc.php");
00101 }
00102
00104
00105 if ($action == "create_invoice" ) {
00106 }
00108
00109 if ($action=="view_invoice") {
00110 }
00112
00113
00114 }
00115
00116 html_page_stop();
00117
00118 ?>